summaryrefslogtreecommitdiffstats
path: root/lib/libc/arm
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-09-09 22:24:01 +0000
committerian <ian@FreeBSD.org>2014-09-09 22:24:01 +0000
commit8a1958876831eb70c472ced915114915eafb844a (patch)
treee54bc1142cf9ebc5791f625d6b51d3604bdf427e /lib/libc/arm
parent30e366f556dde8950782845d6a3bdbc2c5a84b6f (diff)
downloadFreeBSD-src-8a1958876831eb70c472ced915114915eafb844a.zip
FreeBSD-src-8a1958876831eb70c472ced915114915eafb844a.tar.gz
MFC r270882, r270930:
In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo). The EABI unwind info requires a .fnend for every .fnstart, and newer binutils will complain about seeing two .fnstart in a row. This change allows newer tools to compile our code. Do not generate unwind info in asm functions if _STANDALONE is defined. The .fnend op causes the assembler to emit RELOC references to unwind support functions that don't exist in libstand. Approved by: re(gjb)
Diffstat (limited to 'lib/libc/arm')
-rw-r--r--lib/libc/arm/gen/__aeabi_read_tp.S1
-rw-r--r--lib/libc/arm/gen/_ctx_start.S1
-rw-r--r--lib/libc/arm/gen/_setjmp.S2
-rw-r--r--lib/libc/arm/gen/alloca.S1
-rw-r--r--lib/libc/arm/gen/divsi3.S4
-rw-r--r--lib/libc/arm/gen/setjmp.S3
-rw-r--r--lib/libc/arm/gen/sigsetjmp.S2
-rw-r--r--lib/libc/arm/string/ffs.S1
-rw-r--r--lib/libc/arm/string/memcmp.S1
-rw-r--r--lib/libc/arm/string/memcpy_arm.S1
-rw-r--r--lib/libc/arm/string/memcpy_xscale.S1
-rw-r--r--lib/libc/arm/string/memmove.S5
-rw-r--r--lib/libc/arm/string/memset.S5
-rw-r--r--lib/libc/arm/string/strcmp.S1
-rw-r--r--lib/libc/arm/string/strlen.S1
-rw-r--r--lib/libc/arm/string/strncmp.S1
-rw-r--r--lib/libc/arm/sys/Ovfork.S1
-rw-r--r--lib/libc/arm/sys/brk.S1
-rw-r--r--lib/libc/arm/sys/cerror.S1
-rw-r--r--lib/libc/arm/sys/pipe.S1
-rw-r--r--lib/libc/arm/sys/ptrace.S1
-rw-r--r--lib/libc/arm/sys/sbrk.S1
22 files changed, 36 insertions, 1 deletions
diff --git a/lib/libc/arm/gen/__aeabi_read_tp.S b/lib/libc/arm/gen/__aeabi_read_tp.S
index c3ea99d..670d0b8 100644
--- a/lib/libc/arm/gen/__aeabi_read_tp.S
+++ b/lib/libc/arm/gen/__aeabi_read_tp.S
@@ -38,6 +38,7 @@ ENTRY(__aeabi_read_tp)
mrc p15, 0, r0, c13, c0, 3
#endif
RET
+END(__aeabi_read_tp)
#ifdef ARM_TP_ADDRESS
.Larm_tp_address:
diff --git a/lib/libc/arm/gen/_ctx_start.S b/lib/libc/arm/gen/_ctx_start.S
index fbde357..41bfff9 100644
--- a/lib/libc/arm/gen/_ctx_start.S
+++ b/lib/libc/arm/gen/_ctx_start.S
@@ -7,3 +7,4 @@ ENTRY(_ctx_start)
mov r0, r5
bl _C_LABEL(ctx_done)
bl _C_LABEL(abort)
+END(_ctx_start)
diff --git a/lib/libc/arm/gen/_setjmp.S b/lib/libc/arm/gen/_setjmp.S
index b475f1e..387f8a9 100644
--- a/lib/libc/arm/gen/_setjmp.S
+++ b/lib/libc/arm/gen/_setjmp.S
@@ -89,6 +89,7 @@ ENTRY(_setjmp)
mov r0, #0x00000000
RET
+END(_setjmp)
.L_setjmp_magic:
.word _JB_MAGIC__SETJMP
@@ -140,3 +141,4 @@ botch:
#else
b .
#endif
+END(_longjmp)
diff --git a/lib/libc/arm/gen/alloca.S b/lib/libc/arm/gen/alloca.S
index 9569d86..e4a73d4 100644
--- a/lib/libc/arm/gen/alloca.S
+++ b/lib/libc/arm/gen/alloca.S
@@ -43,3 +43,4 @@ ENTRY(alloca)
sub sp, sp, r0 /* Adjust the stack pointer */
mov r0, sp /* r0 = base of new space */
RET
+END(alloca)
diff --git a/lib/libc/arm/gen/divsi3.S b/lib/libc/arm/gen/divsi3.S
index 104a958..82de5de 100644
--- a/lib/libc/arm/gen/divsi3.S
+++ b/lib/libc/arm/gen/divsi3.S
@@ -29,6 +29,7 @@ ENTRY(__umodsi3)
add sp, sp, #4 /* unalign stack */
mov r0, r1
ldmfd sp!, {pc}
+END(__umodsi3)
ENTRY(__modsi3)
stmfd sp!, {lr}
@@ -48,6 +49,7 @@ ENTRY(__modsi3)
mvn r0, #0
#endif
RET
+END(__modsi3)
ENTRY(__udivsi3)
.L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */
@@ -70,6 +72,7 @@ ENTRY(__udivsi3)
mov r0, r1
mov r1, #0
RET
+END(__udivsi3)
ENTRY(__divsi3)
.L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */
@@ -385,3 +388,4 @@ ENTRY(__divsi3)
addhs r3, r3, r2
mov r0, r3
RET
+END(__divsi3)
diff --git a/lib/libc/arm/gen/setjmp.S b/lib/libc/arm/gen/setjmp.S
index b7af33b..ad4ba38 100644
--- a/lib/libc/arm/gen/setjmp.S
+++ b/lib/libc/arm/gen/setjmp.S
@@ -101,7 +101,7 @@ ENTRY(setjmp)
.Lfpu_present:
.word PIC_SYM(_libc_arm_fpu_present, GOTOFF)
#endif /* __ARM_EABI__ */
-
+END(setjmp)
.weak _C_LABEL(longjmp)
.set _C_LABEL(longjmp), _C_LABEL(__longjmp)
@@ -150,3 +150,4 @@ ENTRY(__longjmp)
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
bl PIC_SYM(_C_LABEL(abort), PLT)
b . - 8 /* Cannot get here */
+END(__longjmp)
diff --git a/lib/libc/arm/gen/sigsetjmp.S b/lib/libc/arm/gen/sigsetjmp.S
index 79f1f9d..3743e89 100644
--- a/lib/libc/arm/gen/sigsetjmp.S
+++ b/lib/libc/arm/gen/sigsetjmp.S
@@ -51,6 +51,7 @@ ENTRY(sigsetjmp)
teq r1, #0
beq PIC_SYM(_C_LABEL(_setjmp), PLT)
b PIC_SYM(_C_LABEL(setjmp), PLT)
+END(sigsetjmp)
.L_setjmp_magic:
.word _JB_MAGIC__SETJMP
@@ -64,3 +65,4 @@ ENTRY(siglongjmp)
teq r2, r3 /* magic correct? */
beq PIC_SYM(_C_LABEL(_longjmp), PLT)
b PIC_SYM(_C_LABEL(longjmp), PLT)
+END(siglongjmp)
diff --git a/lib/libc/arm/string/ffs.S b/lib/libc/arm/string/ffs.S
index af4e118..d3684ed 100644
--- a/lib/libc/arm/string/ffs.S
+++ b/lib/libc/arm/string/ffs.S
@@ -80,3 +80,4 @@ ENTRY(ffs)
rsbne r0, r0, #32
RET
#endif
+END(ffs)
diff --git a/lib/libc/arm/string/memcmp.S b/lib/libc/arm/string/memcmp.S
index a81c960..63a00ef 100644
--- a/lib/libc/arm/string/memcmp.S
+++ b/lib/libc/arm/string/memcmp.S
@@ -178,3 +178,4 @@ ENTRY(memcmp)
sub r0, r3, r2 /* r0 = b1#5 - b2#5 */
RET
#endif
+END(memcmp)
diff --git a/lib/libc/arm/string/memcpy_arm.S b/lib/libc/arm/string/memcpy_arm.S
index b84a32e..eff1eb0 100644
--- a/lib/libc/arm/string/memcpy_arm.S
+++ b/lib/libc/arm/string/memcpy_arm.S
@@ -330,3 +330,4 @@ ENTRY(memcpy)
.Lmemcpy_srcul3l4:
sub r1, r1, #1
b .Lmemcpy_l4
+END(memcpy)
diff --git a/lib/libc/arm/string/memcpy_xscale.S b/lib/libc/arm/string/memcpy_xscale.S
index 02cca5e..1f48cd9 100644
--- a/lib/libc/arm/string/memcpy_xscale.S
+++ b/lib/libc/arm/string/memcpy_xscale.S
@@ -1781,3 +1781,4 @@ ENTRY(memcpy)
strb r1, [r0, #0x0b]
bx lr
#endif /* !_STANDALONE */
+END(memcpy)
diff --git a/lib/libc/arm/string/memmove.S b/lib/libc/arm/string/memmove.S
index 8b8baaf..75a2744 100644
--- a/lib/libc/arm/string/memmove.S
+++ b/lib/libc/arm/string/memmove.S
@@ -580,3 +580,8 @@ ENTRY(bcopy)
.Lmemmove_bsrcul1l4:
add r1, r1, #1
b .Lmemmove_bl4
+#ifndef _BCOPY
+END(memmove)
+#else
+END(bcopy)
+#endif
diff --git a/lib/libc/arm/string/memset.S b/lib/libc/arm/string/memset.S
index 5387aab..458f8f7 100644
--- a/lib/libc/arm/string/memset.S
+++ b/lib/libc/arm/string/memset.S
@@ -234,3 +234,8 @@ ENTRY(memset)
strgeb r3, [ip], #0x01 /* Set another byte */
strgtb r3, [ip] /* and a third */
RET /* Exit */
+#ifdef _BZERO
+END(bzero)
+#else
+END(memset)
+#endif
diff --git a/lib/libc/arm/string/strcmp.S b/lib/libc/arm/string/strcmp.S
index e5cba7d..3dd7453 100644
--- a/lib/libc/arm/string/strcmp.S
+++ b/lib/libc/arm/string/strcmp.S
@@ -41,3 +41,4 @@ ENTRY(strcmp)
beq 1b
sub r0, r2, r3
RET
+END(strcmp)
diff --git a/lib/libc/arm/string/strlen.S b/lib/libc/arm/string/strlen.S
index 378257d..3d7726f 100644
--- a/lib/libc/arm/string/strlen.S
+++ b/lib/libc/arm/string/strlen.S
@@ -76,3 +76,4 @@ ENTRY(strlen)
.Lexit:
mov r0, r1
RET
+END(strlen)
diff --git a/lib/libc/arm/string/strncmp.S b/lib/libc/arm/string/strncmp.S
index fce0159..ac59deb 100644
--- a/lib/libc/arm/string/strncmp.S
+++ b/lib/libc/arm/string/strncmp.S
@@ -52,3 +52,4 @@ ENTRY(strncmp)
beq 1b
sub r0, r2, r3
RET
+END(strncmp)
diff --git a/lib/libc/arm/sys/Ovfork.S b/lib/libc/arm/sys/Ovfork.S
index 286347e..4520e02 100644
--- a/lib/libc/arm/sys/Ovfork.S
+++ b/lib/libc/arm/sys/Ovfork.S
@@ -52,3 +52,4 @@ ENTRY(vfork)
sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */
and r0, r0, r1 /* r0 == 0 if child, else unchanged */
mov r15, r2
+END(vfork)
diff --git a/lib/libc/arm/sys/brk.S b/lib/libc/arm/sys/brk.S
index 5fdf90c..f3d8d87 100644
--- a/lib/libc/arm/sys/brk.S
+++ b/lib/libc/arm/sys/brk.S
@@ -98,3 +98,4 @@ ENTRY(_brk)
.word PIC_SYM(_C_LABEL(minbrk), GOT)
.Lcurbrk:
.word PIC_SYM(CURBRK, GOT)
+END(_brk)
diff --git a/lib/libc/arm/sys/cerror.S b/lib/libc/arm/sys/cerror.S
index e807285..26f5211 100644
--- a/lib/libc/arm/sys/cerror.S
+++ b/lib/libc/arm/sys/cerror.S
@@ -46,3 +46,4 @@ ASENTRY(CERROR)
mvn r0, #0x00000000
mvn r1, #0x00000000
ldmfd sp!, {r4, pc}
+END(CERROR)
diff --git a/lib/libc/arm/sys/pipe.S b/lib/libc/arm/sys/pipe.S
index 83518fc2..77ce0fc 100644
--- a/lib/libc/arm/sys/pipe.S
+++ b/lib/libc/arm/sys/pipe.S
@@ -48,3 +48,4 @@ ENTRY(_pipe)
str r1, [r2, #0x0004]
mov r0, #0x00000000
RET
+END(_pipe)
diff --git a/lib/libc/arm/sys/ptrace.S b/lib/libc/arm/sys/ptrace.S
index 3cc13f3..876da32 100644
--- a/lib/libc/arm/sys/ptrace.S
+++ b/lib/libc/arm/sys/ptrace.S
@@ -46,3 +46,4 @@ ENTRY(ptrace)
SYSTRAP(ptrace)
bcs PIC_SYM(CERROR, PLT)
RET
+END(ptrace)
diff --git a/lib/libc/arm/sys/sbrk.S b/lib/libc/arm/sys/sbrk.S
index d76e85a..7d22aa7 100644
--- a/lib/libc/arm/sys/sbrk.S
+++ b/lib/libc/arm/sys/sbrk.S
@@ -86,3 +86,4 @@ ENTRY(_sbrk)
#endif
.Lcurbrk:
.word PIC_SYM(CURBRK, GOT)
+END(_sbrk)
OpenPOWER on IntegriCloud