summaryrefslogtreecommitdiffstats
path: root/contrib/elftoolchain/common
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-10-09 17:46:05 +0000
committeremaste <emaste@FreeBSD.org>2015-10-09 17:46:05 +0000
commitac41e8b0a6a86647d95d96654473088399a00a56 (patch)
tree3bd6905dc0a31e28ae318cfa49b4c6a5691f0ff5 /contrib/elftoolchain/common
parenta74309d279605965878b1d80d3466c661c64e2a8 (diff)
downloadFreeBSD-src-ac41e8b0a6a86647d95d96654473088399a00a56.zip
FreeBSD-src-ac41e8b0a6a86647d95d96654473088399a00a56.tar.gz
Update to ELF Tool Chain r3250
Highlights (not already in the FreeBSD tree): - addr2line: Fixed multiple memory leaks related to DIE allocation - readelf: improve sh_link validation - various man page improvements Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain/common')
-rw-r--r--contrib/elftoolchain/common/_elftc.h6
-rw-r--r--contrib/elftoolchain/common/elfdefinitions.h54
2 files changed, 57 insertions, 3 deletions
diff --git a/contrib/elftoolchain/common/_elftc.h b/contrib/elftoolchain/common/_elftc.h
index 6769519..94272ef 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 3209 2015-05-17 13:40:46Z kaiwang27 $
+ * $Id: _elftc.h 3244 2015-08-31 19:53:08Z emaste $
*/
/**
@@ -372,7 +372,8 @@ extern const char *__progname;
#if defined(__APPLE__)
-#include <machine/endian.h>
+#include <libkern/OSByteOrder.h>
+#define htobe32(x) OSSwapHostToBigInt32(x)
#define roundup2 roundup
#define ELFTC_BYTE_ORDER _BYTE_ORDER
@@ -382,6 +383,7 @@ extern const char *__progname;
#define ELFTC_HAVE_MMAP 1
#define ELFTC_HAVE_STRMODE 1
+#define ELFTC_NEED_BYTEORDER_EXTENSIONS 1
#endif /* __APPLE__ */
diff --git a/contrib/elftoolchain/common/elfdefinitions.h b/contrib/elftoolchain/common/elfdefinitions.h
index 21b415b..ab7001f 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 3198 2015-05-14 18:36:19Z emaste $
+ * $Id: elfdefinitions.h 3247 2015-09-22 16:57:51Z emaste $
*/
/*
@@ -860,6 +860,12 @@ enum {
#define GRP_MASKPROC 0xf0000000 /* processor-specific flags */
/*
+ * Flags / mask for .gnu.versym sections.
+ */
+#define VERSYM_VERSION 0x7fff
+#define VERSYM_HIDDEN 0x8000
+
+/*
* Flags used by program header table entries.
*/
@@ -1183,6 +1189,8 @@ _ELF_DEFINE_SHT(SHT_MIPS_XLATE_OLD, 0x70000028UL, \
"obsolete") \
_ELF_DEFINE_SHT(SHT_MIPS_PDR_EXCEPTION, 0x70000029UL, \
"runtime procedure descriptor table exception information") \
+_ELF_DEFINE_SHT(SHT_MIPS_ABIFLAGS, 0x7000002AUL, \
+ "ABI flags") \
_ELF_DEFINE_SHT(SHT_SPARC_GOTDATA, 0x70000000UL, \
"SPARC-specific data") \
_ELF_DEFINE_SHT(SHT_AMD64_UNWIND, 0x70000001UL, \
@@ -1865,6 +1873,50 @@ _ELF_DEFINE_RELOC(R_PPC64_DTPREL16_HIGHESTA, 106) \
_ELF_DEFINE_RELOC(R_PPC64_TLSGD, 107) \
_ELF_DEFINE_RELOC(R_PPC64_TLSLD, 108)
+#define _ELF_DEFINE_RISCV_RELOCATIONS() \
+_ELF_DEFINE_RELOC(R_RISCV_NONE, 0) \
+_ELF_DEFINE_RELOC(R_RISCV_32, 1) \
+_ELF_DEFINE_RELOC(R_RISCV_64, 2) \
+_ELF_DEFINE_RELOC(R_RISCV_RELATIVE, 3) \
+_ELF_DEFINE_RELOC(R_RISCV_COPY, 4) \
+_ELF_DEFINE_RELOC(R_RISCV_JUMP_SLOT, 5) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_DTPMOD32, 6) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_DTPMOD64, 7) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_DTPREL32, 8) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_DTPREL64, 9) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_TPREL32, 10) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_TPREL64, 11) \
+_ELF_DEFINE_RELOC(R_RISCV_BRANCH, 16) \
+_ELF_DEFINE_RELOC(R_RISCV_JAL, 17) \
+_ELF_DEFINE_RELOC(R_RISCV_CALL, 18) \
+_ELF_DEFINE_RELOC(R_RISCV_CALL_PLT, 19) \
+_ELF_DEFINE_RELOC(R_RISCV_GOT_HI20, 20) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_GOT_HI20, 21) \
+_ELF_DEFINE_RELOC(R_RISCV_TLS_GD_HI20, 22) \
+_ELF_DEFINE_RELOC(R_RISCV_PCREL_HI20, 23) \
+_ELF_DEFINE_RELOC(R_RISCV_PCREL_LO12_I, 24) \
+_ELF_DEFINE_RELOC(R_RISCV_PCREL_LO12_S, 25) \
+_ELF_DEFINE_RELOC(R_RISCV_HI20, 26) \
+_ELF_DEFINE_RELOC(R_RISCV_LO12_I, 27) \
+_ELF_DEFINE_RELOC(R_RISCV_LO12_S, 28) \
+_ELF_DEFINE_RELOC(R_RISCV_TPREL_HI20, 29) \
+_ELF_DEFINE_RELOC(R_RISCV_TPREL_LO12_I, 30) \
+_ELF_DEFINE_RELOC(R_RISCV_TPREL_LO12_S, 31) \
+_ELF_DEFINE_RELOC(R_RISCV_TPREL_ADD, 32) \
+_ELF_DEFINE_RELOC(R_RISCV_ADD8, 33) \
+_ELF_DEFINE_RELOC(R_RISCV_ADD16, 34) \
+_ELF_DEFINE_RELOC(R_RISCV_ADD32, 35) \
+_ELF_DEFINE_RELOC(R_RISCV_ADD64, 36) \
+_ELF_DEFINE_RELOC(R_RISCV_SUB8, 37) \
+_ELF_DEFINE_RELOC(R_RISCV_SUB16, 38) \
+_ELF_DEFINE_RELOC(R_RISCV_SUB32, 39) \
+_ELF_DEFINE_RELOC(R_RISCV_SUB64, 40) \
+_ELF_DEFINE_RELOC(R_RISCV_GNU_VTINHERIT, 41) \
+_ELF_DEFINE_RELOC(R_RISCV_GNU_VTENTRY, 42) \
+_ELF_DEFINE_RELOC(R_RISCV_ALIGN 43) \
+_ELF_DEFINE_RELOC(R_RISCV_RVC_BRANCH, 44) \
+_ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP, 45)
+
#define _ELF_DEFINE_SPARC_RELOCATIONS() \
_ELF_DEFINE_RELOC(R_SPARC_NONE, 0) \
_ELF_DEFINE_RELOC(R_SPARC_8, 1) \
OpenPOWER on IntegriCloud