diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2004-02-07 06:02:08 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2004-02-07 06:02:08 +0000 |
commit | 8ee1040e7646c2eaabdd1a7653a23818d7174759 (patch) | |
tree | 7eed45e2634079bb1949d84f68ef2f27761de94f | |
parent | 05e780b2273263dc4bdf41c5f3418152f9170239 (diff) |
Do not generate text relocations in PIC code.
-rw-r--r-- | lib/libc/arch/arm/sys/brk.S | 6 | ||||
-rw-r--r-- | lib/libc/arch/arm/sys/cerror.S | 8 | ||||
-rw-r--r-- | lib/libc/arch/arm/sys/sbrk.S | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/libc/arch/arm/sys/brk.S b/lib/libc/arch/arm/sys/brk.S index c6b50ecd41f..4a7dc02b2ae 100644 --- a/lib/libc/arch/arm/sys/brk.S +++ b/lib/libc/arch/arm/sys/brk.S @@ -54,9 +54,9 @@ SYSENTRY(_brk) #ifdef PIC /* Setup the GOT */ ldr r3, .Lgot - add r3, pc, r3 -.L1: ldr r1, .Lminbrk +.L1: + add r3, pc, r3 ldr r1, [r3, r1] #else ldr r1, .Lminbrk @@ -90,7 +90,7 @@ SYSENTRY(_brk) .align 2 #ifdef PIC .Lgot: - .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (.L1+4)) + .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (.L1+8) #endif .Lminbrk: .word PIC_SYM(_C_LABEL(__minbrk), GOT) diff --git a/lib/libc/arch/arm/sys/cerror.S b/lib/libc/arch/arm/sys/cerror.S index 2c4805f7902..26f6f818435 100644 --- a/lib/libc/arch/arm/sys/cerror.S +++ b/lib/libc/arch/arm/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.2 2004/02/01 05:40:52 drahn Exp $ */ +/* $OpenBSD: cerror.S,v 1.3 2004/02/07 06:02:07 drahn Exp $ */ /* $NetBSD: cerror.S,v 1.5 2003/08/07 16:42:04 agc Exp $ */ /*- @@ -47,9 +47,9 @@ ASENTRY(CERROR) #ifdef PIC /* Setup the GOT */ ldr r3, .Lgot - add r3, pc, r3 -.L1: ldr r1, .Lerrno +.L1: + add r3, pc, r3 ldr r1, [r3, r1] #else ldr r1, .Lerrno @@ -62,7 +62,7 @@ ASENTRY(CERROR) #ifdef PIC .align 0 .Lgot: - .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (.L1+4)) + .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (.L1+8) #endif /* PIC */ .globl _C_LABEL(errno) diff --git a/lib/libc/arch/arm/sys/sbrk.S b/lib/libc/arch/arm/sys/sbrk.S index d66e49137c7..15b8b57e14f 100644 --- a/lib/libc/arch/arm/sys/sbrk.S +++ b/lib/libc/arch/arm/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.3 2004/02/02 15:58:19 drahn Exp $ */ +/* $OpenBSD: sbrk.S,v 1.4 2004/02/07 06:02:07 drahn Exp $ */ /* $NetBSD: sbrk.S,v 1.7 2003/08/07 16:42:05 agc Exp $ */ /*- @@ -58,9 +58,9 @@ SYSENTRY(_sbrk) #ifdef PIC /* Setup the GOT */ ldr r3, .Lgot - add r3, pc, r3 -.L1: ldr r2, .Lcurbrk +.L1: + add r3, pc, r3 ldr r2, [r3, r2] #else ldr r2, .Lcurbrk @@ -85,7 +85,7 @@ SYSENTRY(_sbrk) .align 0 #ifdef PIC .Lgot: - .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (.L1+4)) + .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (.L1+8) #endif .Lcurbrk: .word PIC_SYM(CURBRK, GOT) |