| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This update is primarily bug fixes in C++ symbol demangling, including:
- rvalue reference
- builtin type auto and decltype(auto)
- revamped support for function return types
- formatting fixes
- omit void when its the only param
- ref-qualifiers and others in function types
- type qualifiers in pointer-to-member function types
- incorrect handling regarding CV-qualifiers in function types
- ref-qualifier found in nested-name
- properly handle <name> ::= <substitute><template-args>
- make sure that nested function name is not a substitute candidate
- correctly handle expression in template args
- skip unknown substitution abbreviations
Also r320663 libelftc: bump version, tracking import in r320343
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
| |
PR: 219245
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
| |
Reported by: Coverity
CID: 976023
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
to the elftoolchain target list
FreeBSD uses the full target triple when generating embedded rootfs images
(MFS_IMAGE= make option). Without this change objcopy errors out with:
objcopy: elf64-poewrpc-freebsd: invalid target name
|
|
|
|
|
|
|
|
|
|
| |
The mode of operation (elfcopy, mcs, or strip) is chosen based on the
program name. Broaden this to allow a substring match at the end of the
name to allow prefixes - for example, bsdstrip or aarch64-freebsd-strip.
This improves use of these tools as drop-in replacements for GNU objcopy
and strip, which are often built with a limited set of supported targets
and installed with a target prefix for cross tools.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Add support for extended program header numbers to elftoolchain
'readelf -h'.
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
r310136 (cem): libelf: Fix extended numbering detection
Extended numbering is used for any of these fields overflowing.
r310137 (cem): gelf_getphdr: Allow extended indices
Needed for 'readelf -l' of extended phnum files. (Parity with GNU
binutils.)
|
|
|
|
|
|
|
| |
This is not fully fleshed out but is sufficient to dump the
SHT_MIPS_ABIFLAGS used in FreeBSD.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Highlights of changes between r3490 and r3520:
- Improve C++ demangling
- Improve compatibility with Binutils tools wrt. error messages
- Handle additional types/sections/etc. in readelf and elfdump
- addr2line, cxxfilt: use setvbuf to set line buffering for filter use
Also MFC r317076, version bump.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
| |
Reported by: bz
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
Previously a command like
objcopy --input-target binary --output-target elf64-x86-64-freebsd \
binary_file object.o
would leave a temporary file behind.
ELF Tool Chain ticket #543
|
| |
|
|
|
|
| |
From https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.html
|
|
|
|
|
|
| |
Follow DW_AT_specification when looking up DW_AT_type attributes.
PR: 215350, 215395
|
|
|
|
| |
MFC of r311941, r311942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed a bug that the PE object section names are generated incorrectly
using the section name table found in the original input ELF object
instead of the intermediate ELF object.
Ticket: #541
Do not try to copy section content from a NULL d_buf when creating
uninitialized data COFF section for PE object.
Ticket: #540
Obtained from: ELF Tool Chain r3507, r3508
|
|
|
|
|
|
|
|
|
| |
Previously a command like "strings f1 f2 f3" reported the exit status
based only on processing the last file.
As with GNU strings, report an error exit status if an error was
encountered processing any of the files. While here simplify the
exit status handling to just success (0) / failure (1).
|
|
|
|
| |
libdwarf: Add definitions for Apple's DWARF extension attributes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improvements include:
* readelf: report all relocation types in rel/rela for MIPS N64
* readelf: add ELFOSABI_ARM_AEABI
* elfdump: add ELFOSABI_ARM_AEABI and ELFOSABI_ARM
* Add recent RISC-V relocations
* elfcopy: use elftc_timestamp, to support SOURCE_DATE_EPOCH
MFC r305155: readelf: silence GCC 4.2.1 uninitialized variable warning
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
(Missed in r305838)
|
| |
|
|
|
|
|
| |
Although it's a false positive there is little cost to initializing it
always.
|
| |
|
|
|
|
|
|
|
|
|
| |
"wchar_t" is 7 characters long, not 6.
PR: 208661
Submitted by: Daniel McRobb
Approved by: re (kib)
Obtained from: ELF Tool Chain r3480
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a EFI/PE header issue that prevented elfcopy-produced .efi
files from working with Secure Boot:
Make sure section raw size is always padded to multiple of
FileAlignment from the optional header, as requested by the PE
specification. This change should reduce the diff between PE image
generated by Binutils objcopy and elftoolchain elfcopy.
Submitted by: kaiw
Reported by: ambrisko
|
|
|
|
|
|
|
| |
Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D6559
|
|
|
|
|
|
|
| |
It is not provided by sys/elf_common.h on older releases or -current
before March 2015.
Reported by: Jenkins
|
|
|
|
|
|
| |
It is not provided by sys/elf_common.h on older releases
Reported by: Jenkins
|
|
|
|
| |
It is not provided by sys/elf_common.h on older stable/10.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improvements include:
* Add support for reporting and handling a number of new constants in
various tools, including:
* CloudABI OSABI
* DT_TLSDESC_*
* i386, MIPS, SPARC and amd64 relocations
* C++ demangler bug fixes
* Man page updates
* Improved input validation in several tools
This update also reduces diffs against upstream as a number of fixes
included in upstream were previously cherry-picked into FreeBSD.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
This matches bfd and gold.
Obtained from: ELF Tool Chain r3445
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
.strtab and .shstrtab sections in the end of the output object. If
the input objects have more sections after any of these 3 sections,
the section table will be reordered, and in that case the section
symbols should be regenerated for relocations.
The bug is triggered since newer clang puts .strtab section in the
beginning of the object produced.
Ticket: #525
Reported by: royger
Obtained from: ELF Tool Chain r3443
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge ELF Tool Chain r3434:
Previously, elfcopy defines:
VMA: section virtual address
LMA: PHDR(p_vaddr)
While binutils(libbfd) defines:
VMA: section virtual address and PHDR(p_vaddr).
LMA: PHDR(p_paddr)
For elfcopy, p_paddr is considered not meaningful and is always set
to the same value as p_vaddr.
elfcopy was implemented that way because I thought p_paddr is not
used/meaningful according to the ELF ABI. However it turned out
p_paddr is at least used in some ELF files, e.g. the FreeBSD kernel.
This change made elfcopy treat p_paddr as LMA, same as libbfd.
(However, some VMA/LMA related command line option still need tweaking
to make them compatible with binutils objcopy. This will be improved
later)
Ticket: #524
And typo fixes in r3435 and r3436.
This fixes the Xen kernel build.
Submitted by: kaiw
Tested by: royger
|
|
|
|
|
| |
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Relocation of type SHT_REL must use the current value as addend.
PR: 204084
Obtained from: NetBSD libdwarf_elf_init.c v1.4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An empty debug link target previously returned a confusing and incorrect
error like "objcopy: fread failed: No error: 0". Now, return an explicit
error.
GNU objcopy allows an empty file as the debug link target. However,
that case is nonsensical so diverging from GNU behaviour is fine.
Reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5541
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the output object is not an ELF file, choose an arbitrary ELF format
for the intermediate file. srec, ihex and binary formats are independent
of class, endianness and machine type so these choices do not affect the
output.
ELF Tool Chain ticket #517
Reviewed by: kai
Obtained from: ELF Tool Chain r3411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
From ELF for the ARM(R) 64-bit Architecture, table 4-19.
Obtained from: ELF Tool Chain r3386
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
| |
Obtained from: ELF Tool Chain r3387
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5046
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
The change in r291958 was not consistent with GNU objcopy. The start,
end and size symbols created for ELF objects converted from binary need
to include the full filename including the extension, but with the
periods replaced with underscores.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4474
|
|
|
|
|
|
|
|
|
|
|
| |
When converting from binary to ELF, elfcopy creates symbols
_binary_<filename>_start_, _binary_<filename>_end, and
_binary_<filename>_size. For compatibility with GNU objcopy (and to
produce sensible symbol names) the extension must be stripped off.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4238
|