http://sourceware.org/bugzilla/show_bug.cgi?id=12934
Summary: Multilib gold mixes up 32 and 64 bit when relinking empty lib Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: z...@linux.fjfi.cvut.cz Host: x86_64-linux-gnu Target: x86_64-linux-gnu multilib Created attachment 5821 --> http://sourceware.org/bugzilla/attachment.cgi?id=5821 Test showing the relink with ld.bfd and ld.gold. Using gold on x86_64 with -m elf_i386 produces an ELF64 object when used like this: # create an empty static lib ar rc empty.a # relink with gold ld.gold -m elf_i386 -r -o relinked-gold.o empty.a file relinked-gold.o relinked-gold.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped while the output should be an ELF32 object. With ld.bfd the output is as expected (ELF32 object). Reproducible with 2.21 and with cvs HEAD. As soon as any non-empty ELF32 object is added to the invocation of gold the result is correct (ELF32). While this is a strange usecase, it appears in real world - I run into it when building linux kernel for x86 on x86_64. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils