x86-64: shared libs improvement

This correctly resolves local references to global functions from
shared libs to their PLT slot (instead of directly to the target
symbol), so that interposition works.

This is still not 100% conforming (executables don't export symbols
that are also defined in linked shared libs, as they must), but
normal shared lib situations work.
This commit is contained in:
Michael Matz
2014-03-31 05:36:12 +02:00
parent 080ad7e62a
commit 0bd1282059
2 changed files with 46 additions and 26 deletions

2
tcc.h
View File

@ -522,7 +522,7 @@ typedef struct ASMOperand {
struct sym_attr {
unsigned long got_offset;
unsigned char has_plt_entry:1;
unsigned long plt_offset;
#ifdef TCC_TARGET_ARM
unsigned char plt_thumb_stub:1;
#endif