This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC PATCH 07/11] MIPS/BFD: Move attribute check after ELF file header flag check
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: <binutils at sourceware dot org>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>, Daniel Sanders <Daniel dot Sanders at imgtec dot com>
- Date: Tue, 15 Dec 2015 21:28:53 +0000
- Subject: Re: [RFC PATCH 07/11] MIPS/BFD: Move attribute check after ELF file header flag check
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 00 dot 1511200755190 dot 6915 at tp dot orcam dot me dot uk> <alpine dot DEB dot 2 dot 00 dot 1511200816210 dot 6915 at tp dot orcam dot me dot uk>
"Maciej W. Rozycki" <macro@imgtec.com> writes:
> We have a problem in that in making compatibility checks while merging
> private BFD data on the MIPS target we give priority to the attribute
> check, which may fail and cause the function to abort early on. The
> problem with this is the ABI compatibility aspect recorded in the
> attributes is relatively minor compared to aspects recorded in the ELF
> file header. However the premature exit causes any more important
> compatibility aspect violated to be masked and not reported to the user
> once a problem with attributes has been noticed.
>
> So move the attribute check after the ELF file header flag check in
> `_bfd_mips_elf_merge_private_bfd_data', and do not return prematurely
> there. Take advantage of the resulting grouping of ELF file header
> handling together and remove the premature success return point for the
> first input object being handled, letting the code later on figure out
> output ABI flags even for this object.
>
> Update LD test cases according to messages from ELF file header checks
> now preceding ones from attribute checks.
Nice. The testsuite changes certainly look like improvements.
OK independently of the rest, thanks.
Richard