The 64-bit PowerPC ABI implemented in binutils 2.15 requires some special
quirks for weak-symbol handling. Text symbols require also marking weak the special dot-symbol associated with the function, and data symbols require that you not do that. To fix this, provide a hacked __weak_reference for powerpc64, and define a new __weak_reference_data for the single weak data symbol in base. Revert after: binutils 2.17 import Obtained from: projects/ppc64
This commit is contained in:
parent
03d07f4e24
commit
8869de5e55
@ -32,7 +32,8 @@ __FBSDID("$FreeBSD$");
|
||||
void _thread_init_stub(void);
|
||||
|
||||
__weak_reference(_thread_init_stub, _thread_init);
|
||||
__weak_reference(_thread_autoinit_dummy_decl_stub, _thread_autoinit_dummy_decl);
|
||||
__weak_reference_data(_thread_autoinit_dummy_decl_stub,
|
||||
_thread_autoinit_dummy_decl);
|
||||
|
||||
int _thread_autoinit_dummy_decl_stub = 0;
|
||||
|
||||
|
@ -356,7 +356,18 @@
|
||||
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
|
||||
#endif
|
||||
#ifdef __STDC__
|
||||
#ifdef __powerpc64__
|
||||
#define __weak_reference(sym,alias) \
|
||||
__asm__(".weak " #alias); \
|
||||
__asm__(".equ " #alias ", " #sym); \
|
||||
__asm__(".weak ." #alias); \
|
||||
__asm__(".equ ." #alias ", ." #sym)
|
||||
#else
|
||||
#define __weak_reference(sym,alias) \
|
||||
__asm__(".weak " #alias); \
|
||||
__asm__(".equ " #alias ", " #sym)
|
||||
#endif
|
||||
#define __weak_reference_data(sym,alias)\
|
||||
__asm__(".weak " #alias); \
|
||||
__asm__(".equ " #alias ", " #sym)
|
||||
#define __warn_references(sym,msg) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user