summaryrefslogtreecommitdiffstats
path: root/contrib/elftoolchain/elfcopy/main.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r317371: elfcopy: allow empty symbol list filesemaste2017-05-081-2/+3
|
* MFC r307808: elfcopy: select mode by the end of the program nameemaste2017-05-031-3/+23
| | | | | | | | | | 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.
* MFC r317075: Update ELF Tool Chain to upstream r3520emaste2017-05-011-1/+6
| | | | | | | | | | | | | 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
* MFC r316284: elfcopy: remove temporary ELF file when converting from binaryemaste2017-04-131-0/+2
| | | | | | | | | | | 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
* Use the in-tree sys/elf_common.h to build libelftc.bdrewery2016-06-051-5/+0
| | | | | | | | | | | | | | | 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
* elftoolchain: backwards compatability for ELFOSABI_CLOUDABI definitionemaste2016-05-211-0/+5
| | | | | | | It is not provided by sys/elf_common.h on older releases or -current before March 2015. Reported by: Jenkins
* Update to ELF Tool Chain r3475emaste2016-05-201-3/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Allow elfcopy to convert between two non-ELF formatsemaste2016-02-161-0/+12
| | | | | | | | | | | | 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
* Update ELF Tool Chain to upstream rev 3400emaste2016-02-121-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update to ELF Tool Chain r3272emaste2015-12-111-2/+4
| | | | | | | | | | | 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
* Update to ELF Tool Chain r3223emaste2015-05-271-2/+18
| | | | | | | | | | | | | | | | | | | | | | 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
* Update elftoolchain to upstream revision 3179emaste2015-04-011-2/+19
| | | | | | | | | | | | | 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
* Update elftoolchain to upstream revision 3163emaste2015-02-171-1/+1
| | | | | | | Most of our changes have now been committed upstream, so this change is largely bookkeeping. Sponsored by: The FreeBSD Foundation
* Preserve hard & symbolic links when modifying source fileemaste2015-01-281-21/+33
| | | | | | | | | | | Strip is often used to modify existing files, rather than creating new files. If the existing file has hard links or is a symbolic link, act as if editing the file in place and preserve the links. Reported by: luigi Reviewed by: imp, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1682
* Update elftoolchain to upstream rev 3130emaste2014-12-241-1/+1
| | | | | | This brings a number of fixes to elfcopy/strip and DWARF4 improvements. Sponsored by: The FreeBSD Foundation
* Do not strip all when stripping an explicit symbolemaste2014-12-171-1/+2
| | | | | | | | | | | When requested to strip specific symbols (-N flag) the default should be to strip nothing (other than the requested symbols). This is consistent with binutils strip(1). PR: 196038 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1327
* Copy elftoolchain binutils replacements from vendor branchemaste2014-11-271-0/+1500
Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud