summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/sections.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj][test] - Cleanup and split tests in tools/llvm-readobj folder.Georgii Rymar2019-12-121-548/+0
| | | | | | | | | | | | | tools/llvm-readobj currently contains tests that are either general for all file types or that mix file types inside. This patch refactors these test and leaves only general tests in that folder. All other tests were moved to ELF/COFF/MachO and wasm accordingly. I tried to minimize amount of changes, so most of the test parts remained unchanged. Any further refactorings and improvements for particular tests should be done independently from this patch. Differential revision: https://reviews.llvm.org/D71269
* [llvm-readobj][test] - Move platform specific test cases and their inputs to ↵Georgii Rymar2019-12-101-12/+12
| | | | | | | | | | | | separate folders. This creates the next subfolders in the test directory: "COFF", "ELF", "MachO", "wasm". I've also removed platform specific prefixes, like "coff-*". One unused binary was removed as well: `Inputs/relocs.obj.elf-mips` Differential revision: https://reviews.llvm.org/D71203
* [llvm-readobj][MachO] Fix section type printingSeiya Nuta2019-08-151-21/+21
| | | | | | | | | | | | | | | | | | | Summary: Currently, llvm-readobj mistakenly decodes section type as section attribute. This patch fixes the bug and affected tests. Reviewers: JDevlieghere, jhenderson, rupprecht, alexshap, echristo Reviewed By: jhenderson, rupprecht, alexshap, echristo Subscribers: javed.absar, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66075 llvm-svn: 368974
* [llvm-readobj] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-011-1/+1
| | | | | | | | | | We use both -long-option and --long-option in tests. Switch to --long-option for consistency. In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf. While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf). llvm-svn: 359649
* [llvm-readelf] Make llvm-readelf more compatible with GNU readelf.Jordan Rupprecht2018-11-121-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change adds a bunch of options that GNU readelf supports. There is one breaking change when invoked as `llvm-readobj`, and three breaking changes when invoked as `llvm-readelf`: - Add --all (implies --file-header, --program-headers, etc.) - [Breaking] -a is --all instead of --arm-attributes - Add --file-header as an alias for --file-headers - Replace --sections with --sections-headers, keeping --sections as an alias for it - Add --relocs as an alias for --relocations - Add --dynamic as an alias for --dynamic-table - Add --segments as an alias for --program-headers - Add --section-groups as an alias for --elf-section-groups - Add --dyn-syms as an alias for --dyn-symbols - Add --syms as an alias for --symbols - Add --histogram as an alias for --elf-hash-histogram - [Breaking] When invoked as `llvm-readelf`, -s is --symbols instead of --sections - [Breaking] When invoked as `llvm-readelf`, -t is no longer an alias for --symbols Reviewers: MaskRay, phosek, mcgrathr, jhenderson Reviewed By: MaskRay, jhenderson Subscribers: sbc100, aheejin, edd, jhenderson, silvas, echristo, compnerd, kristina, javed.absar, kristof.beyls, llvm-commits, Bigcheese Differential Revision: https://reviews.llvm.org/D54124 llvm-svn: 346685
* [WebAssembly] Update test cases after FixFunctionBitcastsHeejin Ahn2018-11-071-11/+11
| | | | | | | | | | | | | | Summary: This updates generated binaries and corresponding test cases up to date after applying FixFunctionBitcasts pass. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54070 llvm-svn: 346286
* [WebAssembly] Add version to object file metadataSam Clegg2018-04-261-2/+2
| | | | | | | | | | Summary: See https://github.com/WebAssembly/tool-conventions/issues/54 Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D46069 llvm-svn: 330969
* [WebAssembly] libObject: Don't include the name the size of custom sectionsSam Clegg2018-04-121-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D45579 llvm-svn: 329947
* [WebAssembly] Reorder reloc sections to come between symtab and nameNicholas Wilson2018-03-051-5/+5
| | | | | | | | | | | This is required in order to enable relocs to be validated as they are read in. Also update tests with new section ordering. Differential Revision: https://reviews.llvm.org/D43940 llvm-svn: 326694
* [WebAssembly] Update pre-generated test files to match latest llc output. NFC.Nicholas Wilson2018-03-011-1/+1
| | | | | | | | The ordering of llc's output was changed in rL326334. Differential Revision: https://reviews.llvm.org/D43941 llvm-svn: 326445
* [WebAssembly] Remove DataSize from linking metadata sectionSam Clegg2018-02-271-1/+0
| | | | | | | | | | | Neither the linker nor the runtime need this information anymore. We were originally using this to model BSS size but the plan is now to use the segment metadata to allow for BSS segments. Differential Revision: https://reviews.llvm.org/D41366 llvm-svn: 326267
* [WebAssembly] Add first claass symbol table to wasm objectsSam Clegg2018-02-231-38/+8
| | | | | | | | | | | | | | | | | | | | This is combination of two patches by Nicholas Wilson: 1. https://reviews.llvm.org/D41954 2. https://reviews.llvm.org/D42495 Along with a few local modifications: - One change I made was to add the UNDEFINED bit to the binary format to avoid the extra byte used when writing data symbols. Although this bit is redundant for other symbols types (i.e. undefined can be implied if a function or global is a wasm import) - I prefer to be explicit and consistent and not have derived flags. - Some field renaming. - Some reverting of unrelated minor changes. - No test output differences. Differential Revision: https://reviews.llvm.org/D43147 llvm-svn: 325860
* [WebAssembly] Allow each data segment to specify its own alignmentSam Clegg2017-09-291-1/+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
* Reland "[WebAssembly] Add support for naming wasm data segments"Sam Clegg2017-09-201-0/+6
| | | | | | | | | 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
* Reverting due to Green Dragon bot failure.Mike Edwards2017-09-201-6/+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/+6
| | | | | | | | | 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
* [WebAssembly] Add more details to llvm-readobj for wasm filesSam Clegg2017-07-101-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D35208 llvm-svn: 307588
* [WebAssembly] Be consistent in generating trivial test input filesSam Clegg2017-07-101-59/+70
| | | | | | | | | | | | | For each checked-in wasm file, make sure the there is corresponding .ll file that can be used to regenerate it if needed. Add test/Object/Inputs/trivial-object-test.wasm to match other formats and add some new wasm tests in test/Object. Differential Revision: https://reviews.llvm.org/D35213 llvm-svn: 307585
* [WebAssembly] Write initial memory in pages not bytesSam Clegg2017-04-281-0/+5
| | | | | | | | Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32660 llvm-svn: 301687
* [WebAssembly] Improve readobj and nm support for wasmSam Clegg2017-04-141-42/+53
| | | | | | | | | Now that the libObect support for wasm is better we can have readobj and nm produce more useful output too. Differential Revision: https://reviews.llvm.org/D31514 llvm-svn: 300365
* [WebAssembly] Improve support for WebAssembly binary formatDerek Schuff2017-03-301-1/+1
| | | | | | | | | | | | | | | | | | | Mostly this change adds support converting to and from YAML which will allow us to write more test cases for the WebAssembly MC and lld ports. Better support for objdump, readelf, and nm will be in followup CLs. I had to update the two wasm test binaries because they used the old style 'name' section which is no longer supported. Differential Revision: https://reviews.llvm.org/D31099 Patch by Sam Clegg llvm-svn: 299101
* [WebAssembly] Add wasm support for llvm-readobjDerek Schuff2017-01-301-0/+46
| | | | | | | | | | | Create a WasmDumper subclass of ObjDumper to support Webassembly binary files. Patch by Sam Clegg Differential Revision: https://reviews.llvm.org/D27355 llvm-svn: 293569
* [llvm-readobj] MachO -- correctly dump section field 'Reserved3'Davide Italiano2015-09-011-0/+7
| | | | | | Before we incorrectly ignored it. llvm-svn: 246556
* [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,Simon Atanasyan2014-07-131-0/+33
| | | | | | obj2yaml and yaml2obj tools. llvm-svn: 212908
* At Jim Grosbach's request detemplate Object/MachO.h.Rafael Espindola2013-04-181-0/+121
| | | | | | | We are still able to handle mixed endian objects by swapping one struct at a time. llvm-svn: 179778
* Finish templating MachObjectFile over endianness.Rafael Espindola2013-04-131-0/+178
| | | | | | | We are now able to handle big endian macho files in llvm-readobject. Thanks to David Fang for providing the object files. llvm-svn: 179440
* Add MachO-x86-64 tests.Rafael Espindola2013-04-111-36/+76
| | | | | | The object was already checked in, but was not being tested. llvm-svn: 179256
* Don't fetch pointers from a InMemoryStruct.Rafael Espindola2013-04-051-4/+4
| | | | | | | | InMemoryStruct is extremely dangerous as it returns data from an internal buffer when the endiannes doesn't match. This should fix the tests on big endian hosts. llvm-svn: 178875
* The ppc bots say this is the last broken line, so lets try one more :-(Rafael Espindola2013-04-051-1/+1
| | | | llvm-svn: 178849
* One more try before I just delete the macho bits until tomorrow.Rafael Espindola2013-04-051-1/+1
| | | | llvm-svn: 178847
* More test loosening.Rafael Espindola2013-04-051-3/+3
| | | | | | Sorry for so many commits, but llvm is still building on my ppc vm. llvm-svn: 178843
* Loosen this test.Rafael Espindola2013-04-051-1/+1
| | | | | | | | | Looks like there is a big endian/little endian problem here. Loosen the test to try to get the bots green while llvm builds on a ppc qemu vm. The failure was in http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/ llvm-svn: 178839
* Implements low-level object file format specific output for COFF andEric Christopher2013-04-031-0/+113
ELF with support for: - File headers - Section headers + data - Relocations - Symbols - Unwind data (only COFF/Win64) The output format follows a few rules: - Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses. - Hex numbers are output in uppercase, prefixed with "0x". - Flags are sorted alphabetically. - Lists and groups are always delimited. Example output: ---------- snip ---------- Sections [ Section { Index: 1 Name: .text (5) Type: SHT_PROGBITS (0x1) Flags [ (0x6) SHF_ALLOC (0x2) SHF_EXECINSTR (0x4) ] Address: 0x0 Offset: 0x40 Size: 33 Link: 0 Info: 0 AddressAlignment: 16 EntrySize: 0 Relocations [ 0x6 R_386_32 .rodata.str1.1 0x0 0xB R_386_PC32 puts 0x0 0x12 R_386_32 .rodata.str1.1 0x0 0x17 R_386_PC32 puts 0x0 ] SectionData ( 0000: 83EC04C7 04240000 0000E8FC FFFFFFC7 |.....$..........| 0010: 04240600 0000E8FC FFFFFF31 C083C404 |.$.........1....| 0020: C3 |.| ) } ] ---------- snip ---------- Relocations and symbols can be output standalone or together with the section header as displayed in the example. This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated. Patch by Nico Rieck! llvm-svn: 178679
OpenPOWER on IntegriCloud