[PATCH] D34993: Hack to keep __real_foo
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 11:08:07 PDT 2017
> I disagree with this. The current meaning of --wrap in other linkers is to redirect references to symbols, not to change the symbols themselves, so if anything, `__real_foo` and `foo` should have the same value and `__wrap_foo` a second, different value. (As an aside, the current test has three different values, not two, so is definitely wrong).
This actually implements the same behavior as bfd. The symbol references
become:
201000: ba 10 10 01 00 mov $0x11010,%edx
201005: ba 10 10 01 00 mov $0x11010,%edx
20100a: ba 00 10 01 00 mov $0x11000,%edx
And the symbols in the symbol table are unchanged:
0000000000011000 A foo
0000000000011020 A __real_foo
0000000000011010 A __wrap_foo
Cheers,
Rafael
More information about the llvm-commits
mailing list