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)
> > > markus@x4 linux % cat foo.c
> > > void foo () {};
> > >
> > > markus@x4 linux % cat setup.ld
> > > OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
> > > OUTPUT_ARCH(i386)
> > >
> > > markus@x4 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
> ...
>
> > > markus@x4 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.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils