aboutsummaryrefslogtreecommitdiff
path: root/contrib/binutils
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2015-05-03 22:51:42 +0000
committerWarner Losh <imp@FreeBSD.org>2015-05-03 22:51:42 +0000
commit729a1e1dec969c633ce10a03e59dd443b84e4b57 (patch)
tree8859c002c07d9fd9d96f39be4e19bb71c65893a9 /contrib/binutils
parentf321ea7845c92a46d32075c3712199b786bdabac (diff)
downloadsrc-729a1e1dec969c633ce10a03e59dd443b84e4b57.tar.gz
src-729a1e1dec969c633ce10a03e59dd443b84e4b57.zip
For eabi 5 (what FreeBSD uses), be sure to tag all executables and
shared libraries as either SOFT or HARD float to comply with the EABI standard. Differential Revision: https://reviews.freebsd.org/D2401
Notes
Notes: svn path=/head/; revision=282380
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/bfd/elf32-arm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c
index 31cf5267e32b..866ef7140295 100644
--- a/contrib/binutils/bfd/elf32-arm.c
+++ b/contrib/binutils/bfd/elf32-arm.c
@@ -9372,6 +9372,16 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT
if (globals->byteswap_code)
i_ehdrp->e_flags |= EF_ARM_BE8;
}
+
+ /*
+ * For EABI 5, we have to tag dynamic binaries and execs as either
+ * soft float or hard float.
+ */
+ if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_VER5 &&
+ (i_ehdrp->e_type == ET_DYN || i_ehdrp->e_type == ET_EXEC))
+ i_ehdrp->e_flags |=
+ bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, Tag_ABI_VFP_args) ?
+ EF_ARM_VFP_FLOAT : EF_ARM_SOFT_FLOAT;
}
static enum elf_reloc_type_class