[RFA] Make incompatible Tag_compatibility attributes cause ld to fail
Matthew Gretton-Dann
matthew.gretton-dann@arm.com
Tue Mar 2 09:54:00 GMT 2010
All,
Please find attached a patch which causes ld to fail when you try to
link two objects with incompatible Tag_compatibility attributes on an
ARM EABI target.
ld already produced an error message in this case, but the link
continued producing, possibly incorrect, ouput files and exiting with
status 0. This patch causes ld to not produce any output and to exit
with non-zero status.
I think the bfd/elf32-ppc.c and bfd/elfxx-mips.c source files have
identical bugs to the issue fixed in bfd/elf32-arm.c - but I don't know
enough about those targets to make the change.
Proposed ld/testsuite/ChangeLog:
2010-03-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-arm/arm-merge-incompatible.d: New test.
* ld-arm/arm-merge-incompatiblea.s: Likewise.
* ld-arm/arm-merge-incompatibleb.s: Likewise.
* ld-arm/arm-elf.exp: Run the new test.
2010-03-01 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check
of the return value from the call to
_bfd_elf_merge_object_attributes.
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer - Tools, PD Software
ARM Limited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1003-compatibility-error.patch
Type: text/x-patch
Size: 2531 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100302/a3bbb3d9/attachment.bin>
More information about the Binutils
mailing list