bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/22458] libbfd fails to detect elf32-littlearm target when


From: orivej at gmx dot fr
Subject: [Bug binutils/22458] libbfd fails to detect elf32-littlearm target when it is compiled with support for all targets
Date: Tue, 15 May 2018 22:03:27 +0000

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

Orivej Desh <orivej at gmx dot fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |elf32-littlearm
               Host|                            |x86_64 Linux

--- Comment #2 from Orivej Desh <orivej at gmx dot fr> ---
> I suspect what you've done is configured binutils on, say, x86_64-linux with 
> --enable-targets=all.

This is correct. 

> Making your particular arm target higher priority than others by patching 
> match_priority isn't a solution that can be applied to the main binutils 
> sources.

If this is so, you have to close this bug report, but I adhere to the opinion
that you expressed in the linked mail [1] that libbfd should disambiguate
elf32-littlearm-* in favor of elf32-littlearm:

“The first hunk in the following patch stops bfd choosing a generic ELF target
(like elf32-little) when another target is a better match (eg.
elf32-littlearm).  The last hunk effectively banishes "File format is
ambiguous" errors for ELF.  This might be a little controversial, but if
vxworks, symbian and nacl are confused by using the more general machine
specific ELF target then they really should have specified OS_ABI or
implemented target object_p, archive_p and core_file_p functions.”

We have applied the patch that priorities elf32-littlearm in order to support
Rust tests that expect "nm elf32-object.o" to work (on x86_64 Linux) [2].  It
works when binutils are built without --enable-targets=all by selecting
"elf32-little" target, but fails with "File format is ambiguous" error when
binutils are built with more targets.

[1] https://sourceware.org/ml/binutils/2013-05/msg00271.html
[2] https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766

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