diff options
author | andrew <andrew@FreeBSD.org> | 2014-12-14 18:23:30 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2014-12-14 18:23:30 +0000 |
commit | 56edfadd1e4d7a610e5dc50bc9f7d4d790158220 (patch) | |
tree | 2a34ba4c4c3af38d7c16e39bc8a423f102dc0c2c /sys/arm | |
parent | 8889da92636399027a53d6b6ecc1c6ead738f213 (diff) | |
download | FreeBSD-src-56edfadd1e4d7a610e5dc50bc9f7d4d790158220.zip FreeBSD-src-56edfadd1e4d7a610e5dc50bc9f7d4d790158220.tar.gz |
MFC 275378:
Pull in the NetBSD global offset table handling code. Clang 3.5 creates
relocations the linker complains about.
Obtained from: NetBSD
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/include/asm.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h index e5f06e7..8a40bee 100644 --- a/sys/arm/include/asm.h +++ b/sys/arm/include/asm.h @@ -118,10 +118,16 @@ ldr x, [x, got] #define GOT_INIT(got,gotsym,pclabel) \ ldr got, gotsym; \ - add got, got, pc; \ - pclabel: + pclabel: add got, got, pc +#ifdef __thumb__ #define GOT_INITSYM(gotsym,pclabel) \ - gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (pclabel+4)) + .align 0; \ + gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4) +#else +#define GOT_INITSYM(gotsym,pclabel) \ + .align 0; \ + gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8) +#endif #ifdef __STDC__ #define PIC_SYM(x,y) x ## ( ## y ## ) |