diff options
author | emaste <emaste@FreeBSD.org> | 2016-02-12 20:54:02 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2016-02-12 20:54:02 +0000 |
commit | a6ae90983efabb9784f1e105ffb29eaec3c0573c (patch) | |
tree | cd8537a698afe8dd30dc9c4d04c193e5b3b2e94f /contrib/elftoolchain/libdwarf | |
parent | 0309ab8781484f9cf0561cbbc3cab6df7139d629 (diff) | |
parent | 85217dee0e24c5f3ac285420e843063b4b52c1a0 (diff) | |
download | FreeBSD-src-a6ae90983efabb9784f1e105ffb29eaec3c0573c.zip FreeBSD-src-a6ae90983efabb9784f1e105ffb29eaec3c0573c.tar.gz |
Update ELF Tool Chain to upstream rev 3400
Some notable improvements include:
readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.
elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.
elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.
This update also includes a significant number of bug fixes.
PR: 207091 [exp-run]
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain/libdwarf')
-rw-r--r-- | contrib/elftoolchain/libdwarf/_libdwarf.h | 10 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/dwarf.3 | 6 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/dwarf_str.c | 8 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf.h | 4 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf_rw.c | 14 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/os.NetBSD.mk | 2 |
6 files changed, 28 insertions, 16 deletions
diff --git a/contrib/elftoolchain/libdwarf/_libdwarf.h b/contrib/elftoolchain/libdwarf/_libdwarf.h index e6eb496..6658d2d 100644 --- a/contrib/elftoolchain/libdwarf/_libdwarf.h +++ b/contrib/elftoolchain/libdwarf/_libdwarf.h @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libdwarf.h 3164 2015-02-19 01:20:12Z kaiwang27 $ + * $Id: _libdwarf.h 3298 2016-01-09 15:43:31Z jkoshy $ */ #ifndef __LIBDWARF_H_ @@ -92,8 +92,8 @@ extern struct _libdwarf_globals _libdwarf; typedef struct _Dwarf_CU *Dwarf_CU; struct _Dwarf_AttrDef { - uint64_t ad_attrib; /* DW_AT_XXX */ - uint64_t ad_form; /* DW_FORM_XXX */ + Dwarf_Half ad_attrib; /* DW_AT_XXX */ + Dwarf_Half ad_form; /* DW_FORM_XXX */ uint64_t ad_offset; /* Offset in abbrev section. */ STAILQ_ENTRY(_Dwarf_AttrDef) ad_next; /* Next attribute define. */ }; @@ -102,8 +102,8 @@ struct _Dwarf_Attribute { Dwarf_Die at_die; /* Ptr to containing DIE. */ Dwarf_Die at_refdie; /* Ptr to reference DIE. */ uint64_t at_offset; /* Offset in info section. */ - uint64_t at_attrib; /* DW_AT_XXX */ - uint64_t at_form; /* DW_FORM_XXX */ + Dwarf_Half at_attrib; /* DW_AT_XXX */ + Dwarf_Half at_form; /* DW_FORM_XXX */ int at_indirect; /* Has indirect form. */ union { uint64_t u64; /* Unsigned value. */ diff --git a/contrib/elftoolchain/libdwarf/dwarf.3 b/contrib/elftoolchain/libdwarf/dwarf.3 index dbb4179..863bee6 100644 --- a/contrib/elftoolchain/libdwarf/dwarf.3 +++ b/contrib/elftoolchain/libdwarf/dwarf.3 @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: dwarf.3 3195 2015-05-12 17:22:19Z emaste $ +.\" $Id: dwarf.3 3295 2016-01-08 22:08:10Z jkoshy $ .\" .Dd December 21, 2014 .Os @@ -110,9 +110,7 @@ A pointer to an error handling function. .It Vt Dwarf_Line A descriptor for a source line. .It Vt Dwarf_Off -An unsigned file offset, corresponding to an -.Vt off_t -type supported by the underlying operating system. +An unsigned file offset. .It Vt Dwarf_P_Expr A descriptor for a location expression. .It Vt Dwarf_Ptr diff --git a/contrib/elftoolchain/libdwarf/dwarf_str.c b/contrib/elftoolchain/libdwarf/dwarf_str.c index 71a7f75..c402f21 100644 --- a/contrib/elftoolchain/libdwarf/dwarf_str.c +++ b/contrib/elftoolchain/libdwarf/dwarf_str.c @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: dwarf_str.c 2075 2011-10-27 03:47:28Z jkoshy $"); +ELFTC_VCSID("$Id: dwarf_str.c 3295 2016-01-08 22:08:10Z jkoshy $"); int dwarf_get_str(Dwarf_Debug dbg, Dwarf_Off offset, char **string, @@ -34,7 +34,7 @@ dwarf_get_str(Dwarf_Debug dbg, Dwarf_Off offset, char **string, { Dwarf_Section *ds; - if (dbg == NULL || offset < 0 || string == NULL || ret_strlen == NULL) { + if (dbg == NULL || string == NULL || ret_strlen == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_ARGUMENT); return (DW_DLV_ERROR); } @@ -45,12 +45,12 @@ dwarf_get_str(Dwarf_Debug dbg, Dwarf_Off offset, char **string, return (DW_DLV_NO_ENTRY); } - if ((Dwarf_Unsigned) offset > ds->ds_size) { + if (offset > ds->ds_size) { DWARF_SET_ERROR(dbg, error, DW_DLE_ARGUMENT); return (DW_DLV_ERROR); } - if ((Dwarf_Unsigned) offset == ds->ds_size) { + if (offset == ds->ds_size) { DWARF_SET_ERROR(dbg, error, DW_DLE_NO_ENTRY); return (DW_DLV_NO_ENTRY); } diff --git a/contrib/elftoolchain/libdwarf/libdwarf.h b/contrib/elftoolchain/libdwarf/libdwarf.h index 0cb8b1a..02f0ce5 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf.h +++ b/contrib/elftoolchain/libdwarf/libdwarf.h @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: libdwarf.h 3174 2015-03-27 17:13:41Z emaste $ + * $Id: libdwarf.h 3295 2016-01-08 22:08:10Z jkoshy $ */ #ifndef _LIBDWARF_H_ @@ -33,7 +33,7 @@ #include <libelf.h> typedef int Dwarf_Bool; -typedef off_t Dwarf_Off; +typedef uint64_t Dwarf_Off; typedef uint64_t Dwarf_Unsigned; typedef uint16_t Dwarf_Half; typedef uint8_t Dwarf_Small; diff --git a/contrib/elftoolchain/libdwarf/libdwarf_rw.c b/contrib/elftoolchain/libdwarf/libdwarf_rw.c index 8cb4551..f0286d5 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_rw.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_rw.c @@ -27,7 +27,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_rw.c 2952 2013-06-26 19:09:40Z kaiwang27 $"); +ELFTC_VCSID("$Id: libdwarf_rw.c 3286 2015-12-31 16:45:46Z emaste $"); uint64_t _dwarf_read_lsb(uint8_t *data, uint64_t *offsetp, int bytes_to_read) @@ -42,10 +42,13 @@ _dwarf_read_lsb(uint8_t *data, uint64_t *offsetp, int bytes_to_read) case 8: ret |= ((uint64_t) src[4]) << 32 | ((uint64_t) src[5]) << 40; ret |= ((uint64_t) src[6]) << 48 | ((uint64_t) src[7]) << 56; + /* FALLTHROUGH */ case 4: ret |= ((uint64_t) src[2]) << 16 | ((uint64_t) src[3]) << 24; + /* FALLTHROUGH */ case 2: ret |= ((uint64_t) src[1]) << 8; + /* FALLTHROUGH */ case 1: ret |= src[0]; break; @@ -71,10 +74,13 @@ _dwarf_decode_lsb(uint8_t **data, int bytes_to_read) case 8: ret |= ((uint64_t) src[4]) << 32 | ((uint64_t) src[5]) << 40; ret |= ((uint64_t) src[6]) << 48 | ((uint64_t) src[7]) << 56; + /* FALLTHROUGH */ case 4: ret |= ((uint64_t) src[2]) << 16 | ((uint64_t) src[3]) << 24; + /* FALLTHROUGH */ case 2: ret |= ((uint64_t) src[1]) << 8; + /* FALLTHROUGH */ case 1: ret |= src[0]; break; @@ -171,11 +177,14 @@ _dwarf_write_lsb(uint8_t *data, uint64_t *offsetp, uint64_t value, dst[6] = (value >> 48) & 0xff; dst[5] = (value >> 40) & 0xff; dst[4] = (value >> 32) & 0xff; + /* FALLTHROUGH */ case 4: dst[3] = (value >> 24) & 0xff; dst[2] = (value >> 16) & 0xff; + /* FALLTHROUGH */ case 2: dst[1] = (value >> 8) & 0xff; + /* FALLTHROUGH */ case 1: dst[0] = value & 0xff; break; @@ -222,13 +231,16 @@ _dwarf_write_msb(uint8_t *data, uint64_t *offsetp, uint64_t value, dst[5] = (value >> 16) & 0xff; dst[4] = (value >> 24) & 0xff; value >>= 32; + /* FALLTHROUGH */ case 4: dst[3] = value & 0xff; dst[2] = (value >> 8) & 0xff; value >>= 16; + /* FALLTHROUGH */ case 2: dst[1] = value & 0xff; value >>= 8; + /* FALLTHROUGH */ case 1: dst[0] = value & 0xff; break; diff --git a/contrib/elftoolchain/libdwarf/os.NetBSD.mk b/contrib/elftoolchain/libdwarf/os.NetBSD.mk new file mode 100644 index 0000000..ae214e3 --- /dev/null +++ b/contrib/elftoolchain/libdwarf/os.NetBSD.mk @@ -0,0 +1,2 @@ +# TODO(#511): Revert after the source tree is -Wconversion clean. +WARNS=5 |