Date: Tue, 12 Sep 2017 17:06:35 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323500 - in head: . libexec/rtld-elf/arm Message-ID: <201709121706.v8CH6ZAG024985@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Tue Sep 12 17:06:35 2017 New Revision: 323500 URL: https://svnweb.freebsd.org/changeset/base/323500 Log: End softfp->hardfp transition period for arm On hard-float 32-bit arm platforms, always search for the soft float binaries in the alternative locations. Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D12274 MFC After: 1 week Modified: head/UPDATING head/libexec/rtld-elf/arm/reloc.c head/libexec/rtld-elf/arm/rtld_machdep.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Sep 12 16:00:51 2017 (r323499) +++ head/UPDATING Tue Sep 12 17:06:35 2017 (r323500) @@ -51,6 +51,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20170912: + For 32-bit arm compiled for hard-float support, soft-floating point + binaries now always get their shared libraries from + LD_SOFT_LIBRARY_PATH (in the past, this was only used if + /usr/libsoft also existed). Only users with a hard-float ld.so, but + soft-float everything else should be affected. + 20170826: During boot the geli passphrase will be hidden. To restore previous behavior see geli(8) configuration options. Modified: head/libexec/rtld-elf/arm/reloc.c ============================================================================== --- head/libexec/rtld-elf/arm/reloc.c Tue Sep 12 16:00:51 2017 (r323499) +++ head/libexec/rtld-elf/arm/reloc.c Tue Sep 12 17:06:35 2017 (r323500) @@ -18,11 +18,18 @@ __FBSDID("$FreeBSD$"); #include "rtld.h" #include "paths.h" +#ifdef __ARM_FP +/* + * On processors that have hard floating point supported, we also support + * running soft float binaries. If we're being built with hard float support, + * check the ELF headers to make sure that this is a hard float binary. If it is + * a soft float binary, force the dynamic linker to use the alternative soft + * float path. + */ void arm_abi_variant_hook(Elf_Auxinfo **aux_info) { Elf_Word ehdr; - struct stat sb; /* * If we're running an old kernel that doesn't provide any data fail @@ -40,17 +47,6 @@ arm_abi_variant_hook(Elf_Auxinfo **aux_info) return; /* - * If there's no /usr/libsoft, then we don't have a system with both - * hard and soft float. In that case, hope for the best and just - * return. Such systems are required to have all soft or all hard - * float ABI binaries and libraries. This is, at best, a transition - * compatibility hack. Once we're fully hard-float, this should - * be removed. - */ - if (stat("/usr/libsoft", &sb) != 0 || !S_ISDIR(sb.st_mode)) - return; - - /* * This is a soft float ABI binary. We need to use the soft float * settings. */ @@ -60,6 +56,7 @@ arm_abi_variant_hook(Elf_Auxinfo **aux_info) ld_standard_library_path = SOFT_STANDARD_LIBRARY_PATH; ld_env_prefix = LD_SOFT_; } +#endif void init_pltgot(Obj_Entry *obj) Modified: head/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/arm/rtld_machdep.h Tue Sep 12 16:00:51 2017 (r323499) +++ head/libexec/rtld-elf/arm/rtld_machdep.h Tue Sep 12 17:06:35 2017 (r323500) @@ -31,6 +31,7 @@ #include <sys/types.h> #include <machine/atomic.h> +#include <machine/acle-compat.h> struct Struct_Obj_Entry; @@ -74,7 +75,11 @@ extern void *__tls_get_addr(tls_index *ti); extern void arm_abi_variant_hook(Elf_Auxinfo **); +#ifdef __ARM_FP #define md_abi_variant_hook(x) arm_abi_variant_hook(x) #define RTLD_VARIANT_ENV_NAMES +#else +#define md_abi_variant_hook(x) +#endif #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709121706.v8CH6ZAG024985>