From 53ee1356322b593c794ab1b2c6cc7a79adf59017 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 5 May 2015 10:35:29 +0000 Subject: [PATCH] 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 --- contrib/binutils/bfd/elf32-arm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c index 866ef7140295..ca40eac0497f 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) {