bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/19197] gold trunk cannot build LInux kernel


From: markus at trippelsdorf dot de
Subject: [Bug gold/19197] gold trunk cannot build LInux kernel
Date: Mon, 02 Nov 2015 13:36:20 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19197

--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> ---
(In reply to H.J. Lu from comment #5)
> (In reply to Markus Trippelsdorf from comment #2)
> > address@hidden linux % cat foo.c
> > void foo () {};
> > 
> > address@hidden linux % cat setup.ld
> > OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
> > OUTPUT_ARCH(i386)
> > 
> > address@hidden linux % ld.bfd -m elf_x86_64 -T setup.ld foo.o
> 
> What does "readelf -h a.out" say here?

The linker script overwrites the -m argument with ld.bfd:

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
...

> > address@hidden linux % ld.gold -m elf_x86_64 -T setup.ld foo.o
> > ld: error: input file is incompatible with elf_x86_64 output emulation
> 
> What if you remove "-m elf_x86_64" here for both ld.gold and ld.bfd?

Well, of course this works. But I didn't make up this example, I took
it from the Linux kernel. And I agree that it is bizarre to specify
-m elf_x86_64 and then use OUTPUT_ARCH(i386) in the linker script.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]