History log of /freebsd-head/contrib/elftoolchain/readelf/readelf.c
Revision Date Author Comments
95849b479acd1e768e8f231331186a1d05272b27 31-May-2020 emaste <emaste@FreeBSD.org> readelf: add more DT_FLAGS_1 flags

Reference:
https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html

> DF_1_SINGLETON Singleton symbols exist.
> DF_1_STUB Object is a stub.
> DF_1_PIE Object is a position-independent executable.

Sponsored by: The FreeBSD Foundation
7f6b5f56c043835267db0f98eb2ec083c5a0bbee 21-Mar-2020 emaste <emaste@FreeBSD.org> readelf: simplify Xen string note printing

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24140
08dc17bdc678f4180b0f0daccf9b73fb1f810fd9 20-Mar-2020 markj <markj@FreeBSD.org> readelf: Fix another instance of the leak mentioned in r357542.

CID: 1292493
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
b2d64c4e8fe92f8342c3f34f1c6fcbb82873a8a4 20-Mar-2020 markj <markj@FreeBSD.org> readelf: Avoid leaking ELF descriptors for archive entries.

CID: 1292494
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
137eec9ba03bb9e0e2f14cbf16760af8f9705151 06-Mar-2020 emaste <emaste@FreeBSD.org> readelf: print GNU Build-ID

Sponsored by: The FreeBSD Foundation
2d11d1a3d6be4a5e294b03669946ec35f7e3c5b2 06-Mar-2020 emaste <emaste@FreeBSD.org> readelf: decode and print Xen ELF note strings

Sponsored by: The FreeBSD Foundation
362f18547e0a365343239559736268e2ca0330ae 06-Mar-2020 emaste <emaste@FreeBSD.org> readelf: add XEN_ELFNOTE_PHYS32_ENTRY note

See r336469 for details.

Sponsored by: The FreeBSD Foundation
e9edbfc9478965bc70f1eacc0fdba0399b1df737 04-Mar-2020 emaste <emaste@FreeBSD.org> readelf: simplify namesz / descsz checks

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
e3abca0edc2843469e172a5cc2ac126a2540b14b 04-Mar-2020 emaste <emaste@FreeBSD.org> readelf: check note namesz and descsz

Previously corrupt note namesz or descsz (perhaps caused by readelf's
current lack of endian support for notes) resulted in a crash. Check
that namesz and descsz do not extend beyond the end of the buffer before
trying to access name and desc data.

Reported by: jhb
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
f51acb733ef4008e833219d60b20350dbccd33cc 04-Mar-2020 emaste <emaste@FreeBSD.org> Reserve WXNEEDED ELF feature control flag

This will be used to tag binaries that require W+X mappings, in advance
of the ability to prevent W^X in mmap/mprotect.

There is still some discussion about the flag's name, but the ABI won't
change even if the name does (as kib pointed out in the review).

Reviewed by: csjp, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23909
a2258a36bbf81cc3dcef77a95ca4937a6cab8ece 01-Mar-2020 emaste <emaste@FreeBSD.org> readelf: add PROTMAX_DISABLE and STKGAP_DISABLE

From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited
upstream (in a slightly different form) as r3831.

Sponsored by: The FreeBSD Foundation
0f13c22778abe6a4f95e55f220186fec9f7da777 04-Feb-2020 markj <markj@FreeBSD.org> readelf: Don't leak memory when dwarf_get_fde_info_for_all_regs() fails.

CID: 1292493
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
6e491b7592712241eed10463b95686e0682bee0a 04-Feb-2020 markj <markj@FreeBSD.org> readelf: Fix the check for an error from realloc().

Use err() instead of errx() while here, since realloc() sets errno.

CID: 1401326
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
6194ecf3bc6c7a8c755da5e4d0edd13ab4b3b649 04-Feb-2020 markj <markj@FreeBSD.org> readelf: Fix a double close of the input file.

The caller of dump_object() is responsible for opening the file, let it
be responsible for closing too.

CID: 1411588
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
ec4371dcb1792d7f0806ffa9cc6212751c7f385e 19-Nov-2019 jhibbits <jhibbits@FreeBSD.org> ELF toolchain: Add PowerPC VMX and VSX note decode to readelf

Summary: A follow-on to r276634, which added the VMX note to userland cores,
and r334538 for VSX notes.

Copied from note_type_linux_core().

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D22404
37b420014fdd0f6e1ea5aecd05f04ed0a33fa5b7 07-Aug-2019 markj <markj@FreeBSD.org> readelf: Close input files when done with them.

The low fd limit used by poudriere exposed an odd failure mode in
cap_fileargs (used by readelf as of r350516). In particular, when
the limit was hit, both the main process and casper service would
block on their shared socket, waiting forever for the other to send a
message.

Reported by: zeising
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
d7976709ee244c06e484f8ec203dede74ad45ef2 01-Aug-2019 markj <markj@FreeBSD.org> Capsicumize readelf(1).

Reviewed by: oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21108
3b2bdd037b3fc9b134aa43026aa5a10cdc5bb72f 01-Aug-2019 emaste <emaste@FreeBSD.org> readelf: decode NT_GNU_PROPERTY_TYPE_0 / GNU_PROPERTY_X86_FEATURE_1_AND

These bits are used for Intel CET IBT/Shadow Stack.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20516
65b7473beb86063aaacbbd40a6dd76d61c18745b 30-Jun-2019 mhorne <mhorne@FreeBSD.org> readelf: Add RISC-V DWARF register aliases

This allows DWARF debugging output to use the common register
mneumonics, such as ra, sp, or t0.

DWARF registers 0-31 are mapped to the 32 general purpose registers,
which are then followed by the 32 floating point registers.

Reviewed by: markj
Approved by: markj (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D20779
c0d9f65d2d4d653fd7b2545dbcb5a8a436bab93d 28-Jun-2019 luporl <luporl@FreeBSD.org> [PowerPC64] readelf: print description for 'e_flags' in ELF header (ABI type)

This prints out description text with the meaning of 'Flags' value in PowerPC64.

Example:

$ readelf -h ~/tmp/t1-Flag2
ELF Header:

Magic: 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: FreeBSD
ABI Version: 0
Type: EXEC (Executable file)
Machine: PowerPC 64-bit
Version: 0x1
Entry point address: 0x10010000
Start of program headers: 64 (bytes into file)
Start of section headers: 209368 (bytes into file)
Flags: 0x2, OpenPOWER ELF V2 ABI
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 10
Size of section headers: 64 (bytes)
Number of section headers: 34
Section header string table index: 31

Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: luporl
Differential Revision: https://reviews.freebsd.org/D20782
86dfd2f8205883eccf32e9a875e1f6033747b4ad 28-Jun-2019 mhorne <mhorne@FreeBSD.org> readelf: Add support for RISC-V specific e_flags

Reviewed by: markj
Approved by: markj (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D20767
1cb7944721e65b05cfa8b13ede794e3ed98f47b0 07-Jun-2019 csjp <csjp@FreeBSD.org> Teach readelf about some OpenBSD ELF program headers

- Add constants for OpenBSD wxneeded, bootdata and randomize to the
FreeBSD elf_common.h file. This is the file that gets used by the
elftoolchain library.
- Update readelf and elfdump utilities to decode these program headers
if they are encountered.

Note: FreeBSD has it's own version of elfdump(1), which will be updated
in a subsequent commit. I am adding it here anyway because this diff is
going to be submitted upstream.

Discussed with: emaste
Reviewed by: imp
MFC afer: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20548

M contrib/elftoolchain/elfdump/elfdump.c
M contrib/elftoolchain/readelf/readelf.c
M sys/sys/elf_common.h
b94f1ced81ab3c48f7bf19e5b01666720306d68b 30-May-2019 markj <markj@FreeBSD.org> readelf: Make -t imply -S, for compatibility with GNU binutils.

Reported by: jhb
Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20475
ee93d86cd82de5aa722bb03cd94ad4bc5ed022ae 17-Apr-2019 emaste <emaste@FreeBSD.org> readelf: use size_t for object counts

PR: 212539
Reported by: cem
Sponsored by: The FreeBSD Foundation
6f62c923936fdecfa3d829aa253457bb54050e78 17-Apr-2019 emaste <emaste@FreeBSD.org> readelf: speed up readelf -wo

Use an array instead of STAILQ, and sort at the end instead of while
adding new elements.

PR: 212539
Submitted by: Bora Özarslan <borako.ozarslan@gmail.com>
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
305fc634eabb080a19521d77f049c075a443b2a5 28-Mar-2019 emaste <emaste@FreeBSD.org> readelf: add newline after dumping dynamic FLAGS / FLAGS_1

All three dump_flags() callers need a newline after printing the flags.

Sponsored by: The FreeBSD Foundation
bd8d44c9447c9c52a2b02f73ebb8916c7cab2160 28-Mar-2019 emaste <emaste@FreeBSD.org> Revert other accidentally committed part of r345625
2648698edf3370791ee02c8a0fd76c0a2704db66 28-Mar-2019 emaste <emaste@FreeBSD.org> revert r341429 "disable BIND_NOW in libc, libthr, and rtld"

r345620 by kib@ fixed the rtld issue that caused a crash at startup
during resolution of libc's ifuncs with BIND_NOW.

PR: 233333
Sponsored by: The FreeBSD Foundation
3d924dc10170347b23932eb3008fcbe307a28fd3 01-Feb-2019 emaste <emaste@FreeBSD.org> readelf: decode FreeBSD note types

Decode NT_FREEBSD_ABI_TAG, NT_FREEBSD_ARCH_TAG, and NT_FREEBSD_FEATURE_CTL.

Reviewed by: brooks, kib (earlier)
MFC after: 2 weeks
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19054
ab08890a66b8bd905def429e046e40db314558d2 01-Feb-2019 emaste <emaste@FreeBSD.org> readelf: use table-based DT_FLAGS and DT_FLAGS_1 decoding

Fewer lines of code and more maintainable.

Reviewed by: brooks, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19053
0273f68fc0d8d6aa6e651952f18584510d988ff0 31-Jan-2019 emaste <emaste@FreeBSD.org> readelf: dump elf note data

Output format is compatible with GNU readelf's handling of unknown note
types (modulo a GNU char signedness bug); future changes will add type-
specific decoding.

Reviewed by: kib
MFC after: 1 week
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
cad19bf054dcb6b58c9e3bd0c30bcc7f8f57684c 30-Jan-2019 emaste <emaste@FreeBSD.org> readelf: fix i386 build

Use %jx and (uintmax_t) cast.

PR: 232983
MFC with: r343592
Sponsored by: The FreeBSD Foundation
f5707e56808a37a945a6caac0c22730bc9010a16 30-Jan-2019 emaste <emaste@FreeBSD.org> readelf: decode flag bits in DT_FLAGS/DT_FLAGS_1

Decode d_val when the tag is DT_FLAGS or DT_FLAGS_1 based on the
information at:

https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-42444.html

PR: 232983
Submitted by: Bora Ozarslan borako.ozarslan@gmail.com
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18784
90bad5f3b97373c13388cd1f31210c9b824900c6 21-Nov-2018 sobomax <sobomax@FreeBSD.org> Fix CU: output of the --debug-dump=decodedline, the problem there
is that both file name and current directory is recorded, however
file name sometimes already contains absolute path. In which case
prefixing it with directory name results in an invalid pathname.

Only append directory name if the file name does not start with '/'.
This seems to DTRT.

Approved by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18290
6957cb73fe713cff83408f78e75cd9ae3e522eb6 02-Nov-2018 emaste <emaste@FreeBSD.org> Define NT_FREEBSD_FEATURE_CTL ELF note type

This ELF note will be used to allow binaries to opt out of, or in to,
upcoming vulnerability mitigation and other features.

Committing the definition and readelf change separately to allow
independent MFC.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
ce98938f82a06ac620b8891b09c2a5735e472c7d 10-Aug-2018 emaste <emaste@FreeBSD.org> readelf: display NT_GNU_PROPERTY_TYPE_0 note name

NT_GNU_PROPERTY_TYPE_0 in a .note.gnu.property section "contains a
program property note which describes special handling requirements
for linker and run-time loader." (from the System V Application Binary
Interface - Linux Extensions")

Intel CET uses two processor-specific program properties in
NT_GNU_PROPERTY_TYPE_0: GNU_PROPERTY_X86_FEATURE_1_IBT to indicate that
all executable sections are compatible with Indirect Branch Tracking,
and GNU_PROPERTY_X86_FEATURE_1_SHSTK to indicate that sections are
compatible with shadow stack.

A later change should add decoding of the individual properties.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation
58ce5b116ee170d9d3cf40e5b616170e85ebc824 14-May-2018 phil <phil@FreeBSD.org> Handle thread-local storage (TLS) segments correctly when
copying (objcopy) and displaying (readelf) them.

PR: 227552
Submitted by: kaiw (maintainer)
Reported by: jachmann@unitix.org
Reviewed by: phil
MFC after: 1 day
994b0b9af9bd71d89affd2e96090dfdd4b66f82c 27-Apr-2018 emaste <emaste@FreeBSD.org> Update ELF Tool Chain to r3614

MFC after: 1 week
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
946f084b93c81b3432eef6d48eb6b6262be48c03 26-Dec-2017 emaste <emaste@FreeBSD.org> readelf: report byte size for DT_PREINIT_ARRAYSZ

Sponsored by: The FreeBSD Foundation
8f0dcc72d20f2cc15162b12e683c1b5f7e203f78 15-Sep-2017 jhb <jhb@FreeBSD.org> Add missing newline after unknown MIPS-specific dynamic entries.

Reviewed by: emaste
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D12384
6502329d17ea447ce5e80602ef15e504d78ac2f4 14-Sep-2017 jhb <jhb@FreeBSD.org> Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores.

Reviewed by: emaste
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D12371
5ef505d17816b0f5901ff4dab8be99f643a73850 16-Jul-2017 emaste <emaste@FreeBSD.org> readelf: correct printing of DT_FILTER and DT_AUXILIARY values

Previously these were shown only for MIPS objects.

Obtained from: ELF Tool Chain r3564
MFC after: 1 week
MFC with: r321045
Sponsored by: The FreeBSD Foundation
506c6506821bf306c7d82d71e956d796bd31dc13 16-Jul-2017 emaste <emaste@FreeBSD.org> readelf: fix printing of DT_FILTER and some other DT_* values

Some non-processor-specific DT_* values overlap the range DT_LOPROC to
DT_HIPROC. Handle common ones first, then the processor-specific ones.

Obtained from: ELF Tool Chain r3563
Sponsored by: The FreeBSD Foundation
a0953c0a3e92634ebf39d34c9a8b198f1baad807 19-Apr-2017 emaste <emaste@FreeBSD.org> readelf: dump MIPS abiflags section

This is not fully fleshed out but is sufficient to dump the
SHT_MIPS_ABIFLAGS used in FreeBSD.

Reviewed by: imp
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8241
8101419292c0aa76e0d1bdb0b208688fdd5b46d4 07-Dec-2016 cem <cem@FreeBSD.org> readelf(1) -S: Include zero index and match binutils' no-name

Include the SHN_UNDEF (zero) index special section in extended-attribute
ELF files, like GNU binutils' readelf.

Additionally, print "<no-name>" for sections without names, like GNU
binutils.

Reviewed by: kaiw@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8707
f22f024dd79e393a4a1e05a5b851ae6748965c33 05-Dec-2016 cem <cem@FreeBSD.org> readelf(1): Add support for extended program header numbers

Add support for extended program header numbers to elftoolchain
'readelf -h'.

Reviewed by: emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8702
60b7a9ba9d7a4999b8d1dffaacd0e2b73ee7a12d 31-Aug-2016 emaste <emaste@FreeBSD.org> readelf: silence GCC 4.2.1 uninitialized variable warning

Sponsored by: The FreeBSD Foundation
d9111a980d08d7b02904402892a524ad10f3e327 02-Aug-2016 emaste <emaste@FreeBSD.org> readelf: report ARM program and section header types

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7390
3456e2d15bd813b18a8e16b7b309dd6ca35b8f5b 05-Jun-2016 bdrewery <bdrewery@FreeBSD.org> Use the in-tree sys/elf_common.h to build libelftc.

This fixes build failures on older releases that lack various
definitions such as EM_AARCH64 (which was unfixed before this).

Revert all of the recent compatibility changes that worked around this
problem.

This uses the same method of using the in-tree header as lib/libelf,
lib/libdwarf and usr.bin/readelf.

Reviewed by: emaste
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6734
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
70ecb891fe97435b1afb41582c56041ca554388b 21-May-2016 emaste <emaste@FreeBSD.org> elftoolchain: backwards compatability for ELFOSABI_CLOUDABI definition

It is not provided by sys/elf_common.h on older releases or -current
before March 2015.

Reported by: Jenkins
8b9acc6e766908c85f390f990f9fedac8c2551a5 20-May-2016 emaste <emaste@FreeBSD.org> elftoolchain: backwards compatability for EM_RISCV definition

It is not provided by sys/elf_common.h on older releases

Reported by: Jenkins
e171aa4de413b7c6477e2e97b1a2f19e33fcc870 20-May-2016 emaste <emaste@FreeBSD.org> elftoolchain: backwards compatability for EM_IAMCU definition

It is not provided by sys/elf_common.h on older stable/10.
752d332a4b9c16a487f568188302b49395f489b5 05-Feb-2016 emaste <emaste@FreeBSD.org> readelf: decode AArch64 TLS descriptor relocations

From ELF for the ARM(R) 64-bit Architecture, table 4-19.

Obtained from: ELF Tool Chain r3386
Sponsored by: The FreeBSD Foundation
e76c56eec876ba994cae09d2d465992d9be5d093 05-Feb-2016 emaste <emaste@FreeBSD.org> readelf: report value of unknown relocation types

Obtained from: ELF Tool Chain r3387
Sponsored by: The FreeBSD Foundation
860ed9e53f6883401334547dea3fcede88e39d50 05-Feb-2016 emaste <emaste@FreeBSD.org> readelf: avoid accidental fallthrough in RISC-V relocations

This would have printed an unknown RISC-V relocation type as a SPARC
relocation.

CID: 1331398
Obtained from: ELF Tool Chain r3283
Sponsored by: The FreeBSD Foundation
0f120b427b87875206ff7d1076f677baddb201f1 13-Dec-2015 kaiw <kaiw@FreeBSD.org> Fixed uninitialized variable warnings.
8d8726ea868dc8e8e2dbaf693c2933d8aecd6e40 11-Dec-2015 emaste <emaste@FreeBSD.org> Update to ELF Tool Chain r3272

Highlights (not already in the FreeBSD tree):
- addr2line: Speed up and support searching inlined functions
- addr2line: Support -i, -a, -p options
- readelf: Add some ARM relocation types
- readelf, libelf: Avoid reading beyond end of buffer/file

Relnotes: Yes
Sponsored by: The FreeBSD Foundation
7e478f47e9fcf4393708e1111c3c84ad230b6cbc 03-Dec-2015 emaste <emaste@FreeBSD.org> readelf: add Xen ELF notes

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4356
c85c1e4bd7322c3b4f511e20ad1d6430db0b9ec0 09-Oct-2015 kan <kan@FreeBSD.org> Add definitions for MIPS TLS relocations to elftoolchain.

This makes our readelf more useful when looking for TLS-related
issues.
ac41e8b0a6a86647d95d96654473088399a00a56 09-Oct-2015 emaste <emaste@FreeBSD.org> 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
47a49e1e6cd1f4b2d0c68abdf3186595a39423c1 24-Sep-2015 emaste <emaste@FreeBSD.org> Rename ELFOSABI_SYSV to ELFOSABI_NONE to match current spec

Source: http://www.sco.com/developers/gabi/latest/ch4.eheader.html

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3731
aed1dae8846e14832a3516ab98dca71b65c44b73 24-Sep-2015 emaste <emaste@FreeBSD.org> readelf: Correct typo HPUS -> HPUX

Submitted by: kib
06d81bde61f2fca37e142fd10605faf5ca128fc4 24-Jul-2015 emaste <emaste@FreeBSD.org> readelf: avoid division by zero on section entry size

ELF Tool Chain tickets #439, #444, #445, #467
Reported by: Alexander Cherepanov <cherepan@mccme.ru> (#467)
Reported by: antiAgainst (others)

Reviewed by: brooks
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2338
faf3fc6a75d0302eb7cfbbb6e3d57da093c7c019 24-Jul-2015 emaste <emaste@FreeBSD.org> Add RISC-V ELF machine type definition

EM_RISCV is now officially registered as e_machine 243.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
aa01a21e0c7d20fb276cc0628a159a595e0e617e 27-May-2015 emaste <emaste@FreeBSD.org> Update to ELF Tool Chain r3223

Highlights (upstream revisions):
- Fix SHT_GROUP handling in elfcopy/strip (3206 3220 3221)
- Misc elfcopy / strip bug fixes (3215 3216 3217)
- Many C++ demangler improvements (3199 3200 3201 3202 3203 3204 3205
3208 3210 3211 3212)
- Improve GNU binutils compatibility in elfcopy / strip (3213 3214)
- Add -g option to readelf(1): dump contents of section groups (3219)
- Add EM_IAMCU 32-bit Intel MCU (3198)

Also add a compat #define for building with older FreeBSD ELF headers.
The GRP_COMDAT flag was added to elf_common.h in r283110, but it's not
available during the bootstrap build. It is also convenient to be able
to build on older hosts.

Thanks to antoine@ for tracking down issues through multiple exp-runs
and to kaiw@ for fixing.

PR: 198611 (exp-run), 200350
Sponsored by: The FreeBSD Foundation
a4c24f2588a858878b30f781ab7780f8a7565dec 14-May-2015 emaste <emaste@FreeBSD.org> Update to ELF Tool Chain r3197

Highlights:
- Fix man page markup, whitespace, and typos
- Fix sh_info of SHT_GROUP section to point to the correct string
- Improve validation in readelf and elfcopy/strip
- Handle DWARF 4's DW_AT_high_pc in addr2line

Sponsored by: The FreeBSD Foundation
55208361ba5f1ea64b978cfd570feefd302f879c 01-Apr-2015 emaste <emaste@FreeBSD.org> 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
a86377a7d01dfcfb77f8143e978090043e18a3e3 17-Feb-2015 emaste <emaste@FreeBSD.org> Update elftoolchain to upstream revision 3163

Most of our changes have now been committed upstream, so this change is
largely bookkeeping.

Sponsored by: The FreeBSD Foundation
b0c7bd39a20a4d8cfcb56c20be0428c1a6474ae8 21-Jan-2015 emaste <emaste@FreeBSD.org> redelf: Add missing R_X86_64_ relocation types

PR: 196918
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1570
e016e1f4c67c7d939da7934ac7cff834ef87b5d3 05-Jan-2015 emaste <emaste@FreeBSD.org> readelf: Handle note types from different operating systems

Previously elftoolchain readelf(1) produced correct description text
only for Linux note types.

Upstream elftoolchain ticket #473

Differential Revision: https://reviews.freebsd.org/D1428
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
d0987293c184ec842e00ce78f7d0e0e269a5b47e 02-Jan-2015 emaste <emaste@FreeBSD.org> readelf: Correct rounding on note padding

In general 64-bit ELF notes use 4-byte padding, not 8, despite what is
claimed in various specs.

Upstream elftoolchain ticket 472
https://sourceforge.net/p/elftoolchain/tickets/472/

Sponsored by: The FreeBSD Foundation
904cd98f8489a8472a07f3facec1f35b890f124b 31-Dec-2014 emaste <emaste@FreeBSD.org> readelf: Add stdint.h for C99 fixed size types

Upstream elftoolchain brings in stdint.h via an ELF header that we
do not use in FreeBSD.

Sponsored by: The FreeBSD Foundation
39410e980c283cd4115be3c103d03b940a828a6d 29-Dec-2014 emaste <emaste@FreeBSD.org> Rename DT_FEATURE_1 to DT_FEATURE

Track r270303:

This provides a minor cleanup in elfdump; there are otherwise no
consumers in the tree. Old SUN documentation can be found for either
variant, but GNU binutils switched to DT_FEATURE around 2000.

Sponsored by: The FreeBSD Foundation
6e6cdef9591aead048181a049544a0be9a696f71 22-Dec-2014 emaste <emaste@FreeBSD.org> Add AArch64 machine time and relocations for readelf

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1333