summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-05-05 10:35:29 +0000
committerandrew <andrew@FreeBSD.org>2015-05-05 10:35:29 +0000
commitdfa310bc17391897a5105a72feb2065c48911d80 (patch)
tree9d240c950b67ea3ae1be0acd6e794ef1d17a152f /contrib/binutils
parent5bf47c36d02c1d2b39a716a10f5facafc61fe64a (diff)
downloadFreeBSD-src-dfa310bc17391897a5105a72feb2065c48911d80.zip
FreeBSD-src-dfa310bc17391897a5105a72feb2065c48911d80.tar.gz
Copy new attribute types when linking. bfd will copy attributes as needed,
however it will fail to output them if the type is not set correctly. This can happen when it finds an attribute it hasn't seen before, for example when building shared objects it will use the attributes from crti.o, hwever this file has no attributes set. Differential Revision: https://reviews.freebsd.org/D2413 Reviewed by: imp
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/bfd/elf32-arm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c
index 866ef71..ca40eac 100644
--- a/contrib/binutils/bfd/elf32-arm.c
+++ b/contrib/binutils/bfd/elf32-arm.c
@@ -6816,6 +6816,9 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
{
+ if (out_attr[i].type == 0)
+ out_attr[i].type = in_attr[i].type;
+
/* Merge this attribute with existing attributes. */
switch (i)
{
OpenPOWER on IntegriCloud