summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj] Fix double 0x prefix in RVA table printing after r321527Reid Kleckner2018-01-231-1/+1
| | | | llvm-svn: 323280
* [WebAssembly] Remove debug names from symbol tableSam Clegg2018-01-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Get rid of DEBUG_FUNCTION_NAME symbols. When we actually debug data, maybe we'll want somewhere to put it... but having a symbol that just stores the name of another symbol seems odd. It means you have multiple Symbols with the same name, one containing the actual function and another containing the name! Store the names in a vector on the WasmObjectFile when reading them in. Also stash them on the WasmFunctions themselves. The names are //not// "symbol names" or aliases or anything, they're just the name that a debugger should show against the function body itself. NB. The WasmObjectFile stores them so that they can be exported in the YAML losslessly, and hence the tests can be precise. Enforce that the CODE section has been read in before reading the "names" section. Requires minor adjustment to some tests. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42075 llvm-svn: 322741
* Instead of ELFFile<ELFT>::Type, use ELFT::Type. NFC.Rui Ueyama2018-01-122-40/+37
| | | | llvm-svn: 322346
* Use ELF{32,64}{LE,BE} instead of ELFType<{little,big}, {true,false}>. NFC.Rui Ueyama2018-01-121-4/+3
| | | | llvm-svn: 322342
* [llvm-readobj] Consistent use of ScopedPrinterSam Clegg2018-01-107-71/+83
| | | | | | | | | There were a few places where outs() was being used directly rather than the ScopedPrinter object. Differential Revision: https://reviews.llvm.org/D41370 llvm-svn: 322141
* [llvm-readobj] Support -needed-libs option for Mach-O filesPetr Hosek2018-01-081-0/+30
| | | | | | | | This implements the -needed-libs option in Mach-O dumper. Differential Revision: https://reviews.llvm.org/D41527 llvm-svn: 321980
* Fix tests after move to utohexstr.Benjamin Kramer2017-12-281-1/+1
| | | | llvm-svn: 321527
* Avoid int to string conversion in Twine or raw_ostream contexts.Benjamin Kramer2017-12-282-3/+3
| | | | | | Some output changes from uppercase hex to lowercase hex, no other functionality change intended. llvm-svn: 321526
* [llvm-readobj] Support -needed-libs option for COFF filesPetr Hosek2017-12-271-0/+22
| | | | | | | | This implements the -needed-libs option in the COFF dumper. Differential Revision: https://reviews.llvm.org/D41529 llvm-svn: 321498
* [llvm-readobj] Fix ambiguous call to the `printNumber`Simon Atanasyan2017-12-211-1/+1
| | | | llvm-svn: 321254
* [llvm-readobj] Support 'GNU' style for MIPS GOT/PLT dumpingSimon Atanasyan2017-12-211-261/+445
| | | | | | | | | | This change adds `printMipsGOT` and `printMipsPLT` methods to the `DumpStyle` class and overrides them in the `GNUStyle` and `LLVMStyle` descendants. To pass information about GOT/PLT layout into these methods, the `MipsGOTParser` class has been extended to hold all necessary data. llvm-svn: 321253
* [llvm-readobj] Dump wasm init functionsSam Clegg2017-12-191-2/+8
| | | | llvm-svn: 321042
* Remove redundant includes from tools.Michael Zolotukhin2017-12-134-16/+0
| | | | llvm-svn: 320631
* Teach llvm-pdbutil to dump types from object files.Zachary Turner2017-12-051-0/+1
| | | | llvm-svn: 319859
* [llvm-readobj] Remove redundant local variables to reduce the code. NFCSimon Atanasyan2017-12-021-9/+5
| | | | llvm-svn: 319617
* [llvm-readobj] Print static MIPS GOTSimon Atanasyan2017-12-021-30/+55
| | | | | | | | | | If a linked binary file contains a dynamic section, the GOT layout defined by the dynamic section entries. In a statically linked file the GOT is just a series of entries. This change teaches `llvm-readobj` to print the GOT in that case. That provides a feature parity with GNU `readelf`. llvm-svn: 319616
* [llvm-readobj] Delete unused method argument. NFCSimon Atanasyan2017-12-021-8/+9
| | | | llvm-svn: 319615
* Split TypeTableBuilder into two classes.Zachary Turner2017-11-303-17/+19
| | | | llvm-svn: 319456
* [llvm-readobj] Fix mismatched line endingsZachary Turner2017-11-301-7/+7
| | | | llvm-svn: 319453
* Make TypeTableBuilder inherit from TypeCollection.Zachary Turner2017-11-291-2/+2
| | | | | | | | | | | | | | A couple of places in LLD were passing references to TypeTableCollections around, which makes it hard to change the implementation at runtime. However, these cases only needed to iterate over the types in the collection, and TypeCollection already provides a handy abstract interface for this purpose. By implementing this interface, we can get rid of the need to pass TypeTableBuilder references around, which should allow us to swap the implementation at runtime in subsequent patches. llvm-svn: 319345
* Attempt to fix inscrutible build break...David Blaikie2017-11-161-1/+1
| | | | llvm-svn: 318463
* llvm-readobj/ARMEHABIPrinter.h: Make this a real/modular headerDavid Blaikie2017-11-161-62/+79
| | | | | | | Had several non-inline/strong function definitions that needed to be marked inline, etc. llvm-svn: 318461
* Add ELF dynamic symbol support to yaml2obj/obj2yamlDave Lee2017-11-161-0/+1
| | | | | | | | | | | | | | | | | | Summary: This change introduces a `DynamicSymbols` field to the ELF specific YAML supported by `yaml2obj` and `obj2yaml`. This grouping of symbols provides a way to represent ELF dynamic symbols. The `DynamicSymbols` structure is identical to the existing `Symbols`. Reviewers: compnerd, jakehehrlich, silvas Reviewed By: silvas Subscribers: silvas, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D39582 llvm-svn: 318433
* Add llvm::for_each as a range-based extensions to <algorithm> and make use ↵Aaron Ballman2017-11-031-8/+7
| | | | | | of it in some cases where it is a more clear alternative to std::for_each. llvm-svn: 317356
* [tools] Add option to install binutils symlinksShoaib Meenai2017-11-021-0/+4
| | | | | | | | | | | | The LLVM tools can be used as a replacement for binutils, in which case it's convenient to create symlinks with the binutils names. Add support for these symlinks in the build system. As with any other llvm tool symlinks, the user can limit the installed symlinks by only adding the desired ones to `LLVM_TOOLCHAIN_TOOLS`. Differential Revision: https://reviews.llvm.org/D39530 llvm-svn: 317272
* Inline compareAddr function into its only caller. NFCI.Peter Collingbourne2017-10-311-2/+5
| | | | llvm-svn: 317045
* ELF: Add support for emitting dynamic relocations in the Android relocation ↵Peter Collingbourne2017-10-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | packing format. The Android relocation packing format is a more compact format for dynamic relocations in executables and DSOs that is based on delta encoding and SLEBs. An overview of the format can be found in the Android source code: https://android.googlesource.com/platform/bionic/+/refs/heads/master/tools/relocation_packer/src/delta_encoder.h This patch implements relocation packing using that format. This implementation uses a more intelligent algorithm for compressing relative relocations than Android's own relocation packer. As a result it can generally create smaller relocation sections than that packer. If I link Chromium for Android targeting ARM32 I get a .rel.dyn of size 174693 bytes, as compared to 371832 bytes with gold and the Android packer. Differential Revision: https://reviews.llvm.org/D39152 llvm-svn: 316775
* llvm-readobj: Add support for reading relocations in the Android packed format.Peter Collingbourne2017-10-251-5/+24
| | | | | | | | | | | This is in preparation for testing lld's upcoming relocation packing feature (D39152). I have verified that this implementation correctly unpacks the relocations from a Chromium DSO built with gold and the Android relocation packer for ARM32 and ARM64. Differential Revision: https://reviews.llvm.org/D39272 llvm-svn: 316543
* llvm-readobj: Print AMDGPU note contentsKonstantin Zhuravlyov2017-10-143-43/+35
| | | | | | Differential Revision: https://reviews.llvm.org/D38752 llvm-svn: 315819
* llvm-readobj: Print AMDGPU note type namesKonstantin Zhuravlyov2017-10-141-2/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D38751 llvm-svn: 315813
* Convert a few ErrorOr to Expected.Rafael Espindola2017-10-111-4/+4
| | | | llvm-svn: 315477
* Remove unused variables. No functionality change.Benjamin Kramer2017-10-081-1/+0
| | | | llvm-svn: 315185
* AMDGPU: Add and set AMDGPU-specific e_flagsKonstantin Zhuravlyov2017-10-051-0/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D38556 llvm-svn: 314987
* AMDGPU: Add ELFOSABI_AMDGPU_MESA3DKonstantin Zhuravlyov2017-10-031-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D38387 llvm-svn: 314846
* AMDGPU: Add ELFOSABI_AMDGPU_PALKonstantin Zhuravlyov2017-10-031-1/+2
| | | | llvm-svn: 314843
* [llvm-readobj][RISCV] Pretty-print RISCV e_flagsAlex Bradbury2017-10-031-0/+10
| | | | llvm-svn: 314772
* Add ELFOSABI_FIRST_ARCH, ELFOSABI_LAST_ARCH and start using those in ↵Konstantin Zhuravlyov2017-10-021-10/+29
| | | | | | | | llvm-readobj Differential Revision: https://reviews.llvm.org/D38418 llvm-svn: 314717
* [WebAssembly] Allow each data segment to specify its own alignmentSam Clegg2017-09-291-2/+0
| | | | | | | | | Also, add a flags field as we will almost certainly be needing that soon too. Differential Revision: https://reviews.llvm.org/D38296 llvm-svn: 314534
* llvm-readobj: fix a few typos (NFC)Saleem Abdulrasool2017-09-291-3/+3
| | | | | | | | Correct the spelling of multiple in a couple of sites. Patch by Alex Langford! llvm-svn: 314485
* Update the description of AVR32 for the ELFDumperDylan McKay2017-09-271-1/+1
| | | | | | AVR32 is an unrelated architecture with 32-bit addressing. llvm-svn: 314359
* [llvm-readobj] Fix big-endian byte swap in WindowsResourceDumper.Marek Sokolowski2017-09-211-1/+1
| | | | | | | | | | | The previous version of dumper implemented UTF-16 byte swap incorrectly on big-endian machines. This now gets fixed. Thanks to Bill Seurer for testing the patch locally. Differential Review: https://reviews.llvm.org/D38150 llvm-svn: 313912
* [llvm-readobj] Fix 'Teach readobj to dump .res files', pt 3.Marek Sokolowski2017-09-201-1/+2
| | | | | | Fix (r313790) missing ulittle{}_t error on some buildbots. llvm-svn: 313834
* [llvm-readobj] Fix 'Teach readobj to dump .res files', pt 2.Marek Sokolowski2017-09-201-2/+5
| | | | | | | Another fix-up for r313790. Big-endian hosts swapped byte order in UTF16 words. llvm-svn: 313833
* [llvm-readobj] Fix 'Teach readobj to dump .res files'.Marek Sokolowski2017-09-201-1/+1
| | | | | | | Fix-up for r313790. Some buildbots couldn't convert size_t to uint{}_t; do it manually. llvm-svn: 313816
* Reland "[WebAssembly] Add support for naming wasm data segments"Sam Clegg2017-09-201-1/+14
| | | | | | | | | Add adds support for naming data segments. This is useful useful linkers so that they can merge similar sections. Differential Revision: https://reviews.llvm.org/D37886 llvm-svn: 313795
* [llvm-readobj] Teach readobj to dump .res files (WindowsResource).Marek Sokolowski2017-09-204-0/+130
| | | | | | | | | | This enables readobj to output Windows resource files (.res). This way, we'll be able to test .res outputs without comparing them byte-by-byte with "magic binary files" generated by MS toolchain. Differential Revision: https://reviews.llvm.org/D38058 llvm-svn: 313790
* Reverting due to Green Dragon bot failure.Mike Edwards2017-09-201-12/+0
| | | | | | http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/42594/ llvm-svn: 313706
* [WebAssembly] Add support for naming wasm data segmentsSam Clegg2017-09-191-0/+12
| | | | | | | | | Add adds support for naming data segments. This is useful useful linkers so that they can merge similar sections. Differential Revision: https://reviews.llvm.org/D37886 llvm-svn: 313692
* [llvm-readobj] - Teach tool to report error if some section is in multiple ↵George Rimar2017-09-161-2/+38
| | | | | | | | | | | | COMDAT groups at once. readelf tool reports an error when output contains the same section in multiple COMDAT groups. That can be useful. Path teaches llvm-readobj to do the same. Differential revision: https://reviews.llvm.org/D37567 llvm-svn: 313459
* Recommit r313234 "[llvm-readobj] - Refactor printGroupSections methods."George Rimar2017-09-141-55/+73
| | | | | | | | | | | | | | | | With fix in formatting for GNU style output. Original commit message: This refactors GNUStyle<ELFT>::printGroupSections and LLVMStyle<ELFT>::printGroupSections to split out all duplicated code. After the change these methods just prints the data provided by introduced getGroups in a corresponding LLVM/GNU format. Differential revision: https://reviews.llvm.org/D37621 llvm-svn: 313236
OpenPOWER on IntegriCloud