[lld] r257471 - [ELF][MIPS] Do not use 'sed' to modify binary files
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 08:38:01 PDT 2016
Hi,
On Mon, Apr 4, 2016 at 2:52 AM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
>> Added: lld/trunk/test/ELF/Inputs/mips-gp-disp.so
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/mips-gp-disp.so?rev=257471&view=auto
>> ==============================================================================
>> Binary files lld/trunk/test/ELF/Inputs/mips-gp-disp.so (added) and lld/trunk/test/ELF/Inputs/mips-gp-disp.so Tue Jan 12 06:38:43 2016 differ
>
> How have you created this file? I just noticed something odd about it:
> It has 2 local symbols, but the sh_info of both symbol tables is 1.
% cat test.s
.data
.global XXXXXXXX
XXXXXXXX:
.word 0
% llvm-mc -filetype=obj -triple=mips-unknown-linux test.s -o test.o
% lld -flavor gnu -shared test.o
% sed -e 's/XXXXXXXX/_gp_disp/g' a.out > a.so
It looks like the Writer<ELFT>::copyLocalSymbols() method does not
take in account synthetic local symbols which can be created during
linking.
--
Simon Atanasyan
More information about the llvm-commits
mailing list