]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/arm/brk.S
Replace FSF snail mail address by URL.
[thirdparty/glibc.git] / sysdeps / unix / arm / brk.S
CommitLineData
7733906d 1/* Copyright (C) 1991, 92, 93, 95, 97, 98 Free Software Foundation, Inc.
db31c863 2 This file is part of the GNU C Library.
57771f20 3
db31c863 4 The GNU C Library is free software; you can redistribute it and/or
3214b89b
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
57771f20 8
db31c863
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3214b89b 12 Lesser General Public License for more details.
57771f20 13
3214b89b 14 You should have received a copy of the GNU Lesser General Public
ab84e3ff
PE
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
57771f20
UD
17
18#include <sysdep.h>
19
20#ifndef SYS_brk
21#define SYS_brk 17
22#endif
23
24.data
25.globl C_SYMBOL_NAME(__curbrk)
26C_LABEL(__curbrk)
27#ifdef HAVE_GNU_LD
28 .long C_SYMBOL_NAME(_end)
29#else
30 .long C_SYMBOL_NAME(end)
31#endif
32
33.text
34SYSCALL__ (brk, 1)
7733906d
UD
35#ifdef PIC
36 ldr r1, 1f
541ee341
UD
37 ldr r2, _cb_addr
382: add r1, pc, r1
7733906d
UD
39 add r1, r1, r2
40#else
57771f20 41 ldr r1, _cb_addr
7733906d 42#endif
57771f20
UD
43 str r0, [r1]
44 mov r0, $0
47f0752a 45 DO_RET (r14)
7733906d 46#ifdef PIC
541ee341 471: .long _GLOBAL_OFFSET_TABLE_ - 2b - 8
7733906d
UD
48_cb_addr:
49 .long C_SYMBOL_NAME(__curbrk)(GOTOFF)
50#else
51_cb_addr:
52 .long C_SYMBOL_NAME(__curbrk)
53#endif
db31c863 54
57771f20 55weak_alias (__brk, brk)