diff options
author | emaste <emaste@FreeBSD.org> | 2015-04-01 01:08:01 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-04-01 01:08:01 +0000 |
commit | 55208361ba5f1ea64b978cfd570feefd302f879c (patch) | |
tree | 55f82032e95d8fb3fba2e48a25de3d257af7f7ed /contrib/elftoolchain/common | |
parent | cb7d12714503777dbaaa780fca372adfad849d0d (diff) | |
download | FreeBSD-src-55208361ba5f1ea64b978cfd570feefd302f879c.zip FreeBSD-src-55208361ba5f1ea64b978cfd570feefd302f879c.tar.gz |
Update elftoolchain to upstream revision 3179
Some notable changes:
- libdwarf: Fixed DWARF4 line section
- elfcopy: Implement --localize-hidden
- nm: handle object name referenced by DW_AT_specification
- elfcopy: Add --strip-dwo and --extract-dwo options for split DWARF
- readelf: add remaining arm64 dynamic relocation names
- nm: Avoid integer overflow in value comparison
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain/common')
-rw-r--r-- | contrib/elftoolchain/common/_elftc.h | 32 | ||||
-rw-r--r-- | contrib/elftoolchain/common/elfdefinitions.h | 4 | ||||
-rwxr-xr-x | contrib/elftoolchain/common/native-elf-format | 4 |
3 files changed, 28 insertions, 12 deletions
diff --git a/contrib/elftoolchain/common/_elftc.h b/contrib/elftoolchain/common/_elftc.h index d6c8784..45f0abd 100644 --- a/contrib/elftoolchain/common/_elftc.h +++ b/contrib/elftoolchain/common/_elftc.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _elftc.h 3139 2015-01-05 03:17:06Z kaiwang27 $ + * $Id: _elftc.h 3175 2015-03-27 17:21:24Z emaste $ */ /** @@ -294,7 +294,8 @@ struct name { \ #define ELFTC_VCSID(ID) __FBSDID(ID) #endif -#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) +#if defined(__APPLE__) || defined(__GLIBC__) || defined(__GNU__) || \ + defined(__linux__) #if defined(__GNUC__) #define ELFTC_VCSID(ID) __asm__(".ident\t\"" ID "\"") #else @@ -330,8 +331,8 @@ struct name { \ #ifndef ELFTC_GETPROGNAME -#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__minix) || \ - defined(__NetBSD__) +#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__minix) || defined(__NetBSD__) #include <stdlib.h> @@ -340,7 +341,7 @@ struct name { \ #endif /* __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */ -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__linux__) /* * GLIBC based systems have a global 'char *' pointer referencing @@ -350,7 +351,7 @@ extern const char *program_invocation_short_name; #define ELFTC_GETPROGNAME() program_invocation_short_name -#endif /* __GLIBC__ */ +#endif /* __GLIBC__ || __linux__ */ #if defined(__OpenBSD__) @@ -368,6 +369,21 @@ extern const char *__progname; ** Per-OS configuration. **/ +#if defined(__APPLE__) + +#include <machine/endian.h> +#define roundup2 roundup + +#define ELFTC_BYTE_ORDER _BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN + +#define ELFTC_HAVE_MMAP 1 +#define ELFTC_HAVE_STRMODE 1 + +#endif /* __APPLE__ */ + + #if defined(__DragonFly__) #include <osreldate.h> @@ -381,7 +397,7 @@ extern const char *__progname; #endif -#if defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__linux__) #include <endian.h> @@ -401,7 +417,7 @@ extern const char *__progname; #define roundup2 roundup -#endif /* __GLIBC__ */ +#endif /* __GLIBC__ || __linux__ */ #if defined(__FreeBSD__) diff --git a/contrib/elftoolchain/common/elfdefinitions.h b/contrib/elftoolchain/common/elfdefinitions.h index f0a2fc2..a53acde 100644 --- a/contrib/elftoolchain/common/elfdefinitions.h +++ b/contrib/elftoolchain/common/elfdefinitions.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3149 2015-02-15 19:00:06Z emaste $ + * $Id: elfdefinitions.h 3178 2015-03-30 18:29:13Z emaste $ */ /* @@ -171,7 +171,7 @@ _ELF_DEFINE_DT(DT_MOVEENT, 0x6FFFFDFAUL, \ "size of DT_MOVETAB entries") \ _ELF_DEFINE_DT(DT_MOVESZ, 0x6FFFFDFBUL, \ "total size of the MOVETAB table") \ -_ELF_DEFINE_DT(DT_FEATURE_1, 0x6FFFFDFCUL, "feature values") \ +_ELF_DEFINE_DT(DT_FEATURE, 0x6FFFFDFCUL, "feature values") \ _ELF_DEFINE_DT(DT_POSFLAG_1, 0x6FFFFDFDUL, \ "dynamic position flags") \ _ELF_DEFINE_DT(DT_SYMINSZ, 0x6FFFFDFEUL, \ diff --git a/contrib/elftoolchain/common/native-elf-format b/contrib/elftoolchain/common/native-elf-format index af70759..34d84bf 100755 --- a/contrib/elftoolchain/common/native-elf-format +++ b/contrib/elftoolchain/common/native-elf-format @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: native-elf-format 2064 2011-10-26 15:12:32Z jkoshy $ +# $Id: native-elf-format 3167 2015-02-24 19:10:08Z emaste $ # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -19,7 +19,7 @@ touch ${tmp_c} echo "/* Generated by ${program} on `date` */" cc -c ${tmp_c} -o ${tmp_o} -readelf -h ${tmp_o} | awk ' +LC_ALL=C readelf -h ${tmp_o} | awk ' $1 ~ "Class:" { sub("ELF","",$2); elfclass = $2; } |