This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils testsuite pr21231b


On Mon, Apr 10, 2017 at 4:51 PM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Apr 10, 2017 at 08:57:42AM -0700, H.J. Lu wrote:
>> On Sun, Apr 9, 2017 at 9:15 PM, Alan Modra <amodra@gmail.com> wrote:
>> > You can't emit errors/warnings in _bfd_elf_parse_gnu_properties except
>> > for those that will occur for all targets.  Please fix.
>> >
>>
>> Here is a patch to make generic ELF target vectors the last resort.
>
> Not a good idea.  It sets a bad precedent that the target vector order
> can be changed to suit poorly written code.  Next thing you'll be
> wanting x86_64_elf64_fbsd_vec to sort before x86_64_elf64_vec, or
> someone else will want something similar for other targets, and we'll
> have breakage if the vector order is changed.
>

BFD shouldn't try generic target vector before real one and config.bfd
has

# If we support any ELF target, then automatically add support for the
# generic ELF targets.  This permits an objdump with some ELF support
# to be used on an arbitrary ELF file for anything other than
# relocation information.
case "${targ_defvec} ${targ_selvecs}" in
  *elf64* | *mips_elf32_n*)
    targ_selvecs="${targ_selvecs} elf64_le_vec elf64_be_vec
elf32_le_vec elf32_be_vec"
    ;;
  *elf32*)
    targ_selvecs="${targ_selvecs} elf32_le_vec elf32_be_vec"
    ;;
esac

If generic ELF target vectors are moved first, we may run into similar
problems.

As for x86_64_elf64_fbsd_vec vs x86_64_elf64_vec,  either there is
already an issue, which we have been living with, or there is no issue
at all.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]