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: hjl.tools at gmail dot com
Subject: [Bug gold/19197] gold trunk cannot build LInux kernel
Date: Mon, 02 Nov 2015 21:24:12 +0000

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|ccoutant at gmail dot com          |hjl.tools at gmail dot 
com
   Target Milestone|---                         |2.26

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Markus Trippelsdorf from comment #6)
> (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.

I will take care of it this weekend.

-- 
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]