mirror of
https://github.com/opnsense/src.git
synced 2026-07-14 19:51:17 -04:00
Pull in the NetBSD global offset table handling code. Clang 3.5 creates
relocations the linker complains about. Obtained from: NetBSD MFC after: 1 Week
This commit is contained in:
parent
689c8e8b46
commit
7f9b314ff2
1 changed files with 9 additions and 3 deletions
|
|
@ -112,10 +112,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 ## )
|
||||
|
|
|
|||
Loading…
Reference in a new issue