summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/ELFDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj] Should declare `ListScope` for `verneed` entries.Xing GUO2019-04-101-0/+1
| | | | | | | | | | | | | | | | Summary: YAML mappings require keys to be unique. See: https://yaml.org/spec/1.2/spec.html#id2764652 Reviewers: jhenderson, grimar, rupprecht, espindola, ruiu Reviewed By: ruiu Subscribers: ruiu, emaste, arichardson, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60438 llvm-svn: 358078
* [llvm-readobj] Use `reinterpret_cast` instead of C-style casting. NFC.Xing GUO2019-04-081-18/+25
| | | | llvm-svn: 357903
* [llvm-readobj] Add GNU style dumper for .gnu.version sectionXing GUO2019-04-031-1/+51
| | | | | | | | | | | | | | | | Summary: Currently, `llvm-readobj` do not support GNU style dumper for symbol versioning sections. In this patch, I would like to implement dumper for `.gnu.version` section Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59877 llvm-svn: 357578
* fix typo: "\t" => " "Liang Zou2019-03-311-2/+2
| | | | | | | | | | | | | | Reviewers: llvm.org, Jim Reviewed By: Jim Subscribers: arsenm, jvesely, nhaehnle, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59983 llvm-svn: 357365
* [llvm-readobj] Add some generic notes (e.g. NT_VERSION)Jordan Rupprecht2019-03-291-3/+29
| | | | | | | | | | | | | | | | Summary: Support reading notes that don't have a standard note name. Reviewers: MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59969 llvm-svn: 357271
* [llvm-readelf]Merge dynamic and static relocation printing to avoid code ↵James Henderson2019-03-291-45/+23
| | | | | | | | | | | | | | | | duplication The majority of the printRelocation and printDynamicRelocation functions were identical. This patch factors this all out into a new function. There are a couple of minor differences to do with printing of symbols without names, but I think these are harmless, and in some cases a small improvement. Reviewed by: grimar, rupprecht, Higuoxing Differential Revision: https://reviews.llvm.org/D59823 llvm-svn: 357246
* [llvm-readobj] Change variable names to match LLVM-style. NFC.Xing GUO2019-03-291-19/+19
| | | | | | | | | | | | | | | | Summary: This patch helps change variable names to match LLVM-style Reviewers: jhenderson, Higuoxing Reviewed By: Higuoxing Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59931 llvm-svn: 357230
* [llvm-readobj] Fix formatting of unknown note typesJordan Rupprecht2019-03-281-1/+2
| | | | llvm-svn: 357221
* - Addressed commentsXing GUO2019-03-281-3/+3
| | | | llvm-svn: 357166
* - Addressed @jhenderson 's commentsXing GUO2019-03-281-12/+11
| | | | | | - Format patch llvm-svn: 357165
* [llvm-readobj] Add new helper function `getSymbolVersionByIndex()`Xing GUO2019-03-281-32/+43
| | | | | | | | | | | | | | | | Summary: When implementing `GNU style` dumper for `.gnu.version` section, we should find symbol version name by `vs_index`. Reviewers: jhenderson, rupprecht Reviewed By: rupprecht Subscribers: arphaman, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59545 llvm-svn: 357164
* [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU ↵Xing GUO2019-03-251-137/+183
| | | | | | | | | | | | | | | | | | | | style` Summary: Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this patch, I would like to separate these dumpers into GNU style and LLVM style for future implementation. Reviewers: grimar, jhenderson, mattd, rupprecht Reviewed By: jhenderson, rupprecht Subscribers: ormris, dyung, RKSimon, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59186 llvm-svn: 356881
* [llvm-readobj] Revert bad changesXing GUO2019-03-221-175/+101
| | | | llvm-svn: 356777
* [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU ↵Xing GUO2019-03-221-101/+175
| | | | | | | | | | | | | | | | | | | | style` Summary: Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this patch, I would like to separate these dumpers into GNU style and LLVM style for future implementation. Reviewers: grimar, jhenderson, mattd, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59186 llvm-svn: 356764
* [llvm-readobj] Format codes. NFC.Xing GUO2019-03-211-8/+8
| | | | llvm-svn: 356664
* [AMDGPU] Factored PAL metadata handling out into its own classTim Renouf2019-03-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: This commit introduces a new AMDGPUPALMetadata class that: * is inside the AMDGPU target; * keeps an in-memory representation of PAL metadata; * provides a method to read the frontend-supplied metadata from LLVM IR; * provides methods for the asm printer to set metadata items; * provides methods to write the metadata as a binary blob to put in a .note record or as an asm directive; * provides a method to read the metadata as a binary blob from a .note record. Because llvm-readobj cannot call directly into a target, I had to remove llvm-readobj's ability to dump PAL metadata, pending a resolution to https://reviews.llvm.org/D52821 Differential Revision: https://reviews.llvm.org/D57027 Change-Id: I756dc830894fcb6850324cdcfa87c0120eb2cf64 llvm-svn: 356582
* [AMDGPU] Switched HSA metadata to use MsgPackDocumentTim Renouf2019-03-131-11/+6
| | | | | | | | | | | | Summary: MsgPackDocument is the lighter-weight replacement for MsgPackTypes. This commit switches AMDGPU HSA metadata processing to use MsgPackDocument instead of MsgPackTypes. Differential Revision: https://reviews.llvm.org/D57024 Change-Id: I0751668013abe8c87db01db1170831a76079b3a6 llvm-svn: 356081
* [llvm-readobj] Print symbol version when dumping relocations (PR31564)Xing GUO2019-03-121-2/+4
| | | | | | | | | | | | | | | | Summary: This helps resolve https://bugs.llvm.org/show_bug.cgi?id=31564 Reviewers: jhenderson, grimar Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59175 llvm-svn: 355922
* Improve "llvm-nm -f sysv" output for Elf filesSunil Srivastava2019-03-081-10/+0
| | | | | | | | | | Specifically, compute and Print Type and Section columns. This is a re-commit of rL354833, after fixing the Asan problem found a a buildbot. Differential Revision: https://reviews.llvm.org/D59060 llvm-svn: 355742
* [llvm-readelf]Don't lose negative-ness of negative addends for no symbol ↵James Henderson2019-03-081-17/+21
| | | | | | | | | | | | | | | | | | | | relocations llvm-readelf prints relocation addends as: <symbol value>[+-]<absolute addend> where [+-] is determined from whether addend is less than zero or not. However, it does not print the +/- if there is no symbol, which meant that negative addends became their positive value with no indication that this had happened. This patch stops the absolute conversion when addends are negative and there is no associated symbol. Reviewed by: Higuoxing, mattd, MaskRay Differential Revision: https://reviews.llvm.org/D59095 llvm-svn: 355696
* [llvm-readobj] Dump DT_USED value as string like GNU readelf doesXing GUO2019-03-071-0/+3
| | | | | | | | | | | | | | Reviewers: jhenderson Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59089 llvm-svn: 355600
* [llvm-readobj] Display section names for STT_SECTION symbols.Matt Davis2019-03-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch will obtain the section name for symbols that refer to a section. Prior to this patch the Name field for STT_SECTIONs was blank, now it is populated. Before: ``` Symbol table '.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym ``` With this patch: ``` Symbol table '.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 .text 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 .data 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 .bss 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym ``` This fixes PR40788 Reviewers: jhenderson, rupprecht, espindola Reviewed By: rupprecht Subscribers: emaste, javed.absar, arichardson, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58796 llvm-svn: 355207
* llvm-readobj: Try the DWARF CFI dumper on all machines.Peter Collingbourne2019-02-281-8/+5
| | | | | | | | | | | | There's no reason to limit the DWARF CFI dumper to EM_386 and EM_X86_64; ELF files could contain DWARF CFI on almost any platform (even 32-bit ARM; NetBSD uses DWARF CFI on that platform). So start using the DWARF CFI dumper unconditionally so that we can dump .eh_frame sections on the remaining ELF platforms as well as in NetBSD binaries. Differential Revision: https://reviews.llvm.org/D58761 llvm-svn: 355151
* [llvm-readobj] - Fix the invalid dumping of the dynamic sections without ↵George Rimar2019-02-281-19/+13
| | | | | | | | | | | | | | | | terminating DT_NULL entry. This is https://bugs.llvm.org/show_bug.cgi?id=40861, Previously llvm-readobj would print the DT_NULL sometimes for the dynamic section that has no terminator entry. The logic of printDynamicTable was a bit overcomplicated. I rewrote it slightly to fix the issue and commented. Differential revision: https://reviews.llvm.org/D58716 llvm-svn: 355073
* [llvm-readobj] Print section type values for unknown sections.Matt Davis2019-02-271-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch displays a hexadecimal section value (Elf_Shdr::sh_type) or section-relative offset when printing unknown sections. Here is a subset of the output (ignoring the fields following "Type" when dumping an ELF's GNU `--section-headers` table). Section Headers: ``` [Nr] Name Type [16] android_rel LOOS+0x1 [17] android_rela LOOS+0x2 [27] unknown 0x1000: <unknown> [28] loos LOOS+0 [30] hios VERSYM [31] loproc LOPROC+0 [33] hiproc LOPROC+0xFFFFFFF [34] louser LOUSER+0 [36] hiuser LOUSER+0x7FFFFFFF ``` As a comparison, the previous output looked something like the above, but with a blank "Type" field: ``` [Nr] Name Type [27] unknown [28] loos [30] hios VERSYM [31] loproc [33] hiproc [34] louser [36] hiuser ``` This fixes PR40773 Reviewers: jhenderson, rupprecht, Bigcheese Reviewed By: jhenderson, rupprecht, Bigcheese Subscribers: MaskRay, Bigcheese, srhines, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58701 llvm-svn: 355014
* [llvm-readobj] Print DF_1_DISPRELPNDFangrui Song2019-02-271-0/+1
| | | | | | The test will be added by D58677. llvm-svn: 354955
* Revert "Improve "llvm-nm -f sysv" output for Elf files"Vlad Tsyrklevich2019-02-261-0/+10
| | | | | | | This reverts commit r354833, it was causing ASan test failures on sanitizer-x86_64-linux-fast. llvm-svn: 354849
* Improve "llvm-nm -f sysv" output for Elf filesSunil Srivastava2019-02-261-10/+0
| | | | | | | | Specifically, compute and Print Type and Section columns. Differential Revision: https://reviews.llvm.org/D58263 llvm-svn: 354833
* [llvm-readobj] Change "SHT_MIPS_DWARF" to "MIPS_DWARF"Fangrui Song2019-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: This is to be consistent with the display of other MIPS section types. This string is also used by binutils-gdb/binutils/readelf.c:get_mips_section_type_name Since we are here, reorder the two enum constatns because SHT_MIPS_DWARF < SHT_MIPS_ABIFLAGS. Reviewers: jhenderson, atanasyan Reviewed By: jhenderson Subscribers: aprantl, sdardis, arichardson, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58496 llvm-svn: 354571
* [llvm-readobj] - Simplify .gnu.version_d dumping.George Rimar2019-02-181-10/+1
| | | | | | | | | | | | This is similar to D58048. Instead of scanning the dynamic table to read the DT_VERDEFNUM, we could take it from the sh_info field. (https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html) The patch does this. llvm-svn: 354270
* [llvm-readobj] Dump GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} notes in ↵Fangrui Song2019-02-131-0/+41
| | | | | | | | | | | | | | | | .note.gnu.property Reviewers: grimar, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58175 llvm-svn: 353991
* [llvm-readobj] Rename pr_data to PrDataFangrui Song2019-02-131-12/+12
| | | | | | As requested by grimar in D58112. llvm-svn: 353951
* [llvm-readobj] Dump GNU_PROPERTY_X86_FEATURE_2_{NEEDED,USED} notes in ↵Fangrui Song2019-02-131-17/+42
| | | | | | | | | | | | | | | | | | .note.gnu.property Summary: And change the output ("X86 features" -> "x86 feature") a bit. Reviewers: grimar, xiangzhangllvm, hjl.tools, rupprecht Reviewed By: rupprecht Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58112 llvm-svn: 353908
* [llvm-readobj] Only allow 4-byte pr_dataFangrui Song2019-02-121-6/+4
| | | | | | | | | | | | | | | | Summary: AMD64 psABI says: "The pr_data field of each property contains a 4-byte unsigned integer." Thus we don't need to handle 8-byte pr_data. Reviewers: mike.dvoretsky, grimar, craig.topper, xiangzhangllvm, hjl.tools Reviewed By: grimar Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58103 llvm-svn: 353815
* [llvm-readobj] - Simplify .gnu.version_r dumping a bit.George Rimar2019-02-121-8/+1
| | | | | | | | | | | Current implementation takes "Number of needed versions" from DT_VERNEEDNUM dynamic tag entry. Though it would be a bit simpler to take it from sh_info section header field directly: https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html Differential revision: https://reviews.llvm.org/D58048 llvm-svn: 353814
* [llvm-readobj] Display sections that do not belong to a segment in the ↵Matt Davis2019-02-051-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | section-mapping Summary: The following patch adds the "None" line to the section to segment mapping dump. That line lists the sections that do not belong to any segment. I realize that this change differs from GNU readelf which does not display the latter information. I'd rather not add this "feature" under a command line option. I think that might introduce confusion, since users would have to make an additional decision as to if they want to see all of the section-to-segment map or just a subset of it. Another option is to only print the "None" line if the `--section-mapping` option is passed; however, that might also introduce some confusion, because the section-to-segment map would be different between`--program-headers` and the `--section-mapping` output. While the difference is just the "None" line, it seems that if we choose to display the segment-to-section mapping, then we should always display the whole map including the sections that do not belong to segments. ``` Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .gnu.hash 03 .init_array .fini_array .dynamic 04 .dynamic 05 .note.ABI-tag 06 .eh_frame_hdr 07 08 .init_array .fini_array .dynamic .got None .comment .symtab .strtab .shstrtab <--- THIS LINE ``` Reviewers: grimar, rupprecht, jhenderson, espindola Reviewed By: rupprecht Subscribers: khemant, emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D57700 llvm-svn: 353217
* [llvm-readobj] Add a flag to dump just the section-to-segment mapping.Matt Davis2019-02-011-6/+45
| | | | | | | | | | | | | | | | | | Summary: The following patch introduces a new function `printSectionMapping` which is responsible for dumping just the section-to-segment mapping. This patch also introduces a n option `-section-mapping` that outputs that mapping without the program headers. Previously, this functionality was controlled by `printProgramHeaders`, and the output from `-program-headers` has not been changed. I am happy to change the option name, I copied the name that was displayed when outputting the mapping table. Reviewers: khemant, jhenderson, grimar, rupprecht Reviewed By: jhenderson, grimar, rupprecht Subscribers: rupprecht, jhenderson, llvm-commits Differential Revision: https://reviews.llvm.org/D57365 llvm-svn: 352896
* [llvm-readobj] - Few minor cleanups. NFC.George Rimar2019-01-301-76/+49
| | | | | | | Minor code simplifications, relocations, renamings (to match LLVM style). llvm-svn: 352630
* [llvm-readobj] - Simplify the code.George Rimar2019-01-301-152/+96
| | | | | | | | | | | | | | | | | We have a Field struct which has a StringRef member Str. The code needs to create and keep alive the temporarily std::string variables because of that. That is not convenient and makes the code be more complicated than it could be. There seems to be no reason to keep Str be StringRef. The patch changes it to be std::string and rearranges the code around slightly. Differential revision: https://reviews.llvm.org/D57447 llvm-svn: 352623
* [llvm-readelf] Don't suppress static symbol table with --dyn-symbols + --symbolsJames Henderson2019-01-231-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | In r287786, a bug was introduced into llvm-readelf where it didn't print the static symbol table if both --symbols and --dyn-symbols were specified, even if there was no dynamic symbol table. This is obviously incorrect. This patch fixes this issue, by delegating the decision of which symbol tables should be printed to the final dumper, rather than trying to decide in the command-line option handling layer. The decision was made to follow the approach taken in this patch because the LLVM style dumper uses a different order to the original GNU style behaviour (and GNU readelf) for ELF output. Other approaches resulted in behaviour changes for other dumpers which felt wrong. In particular, I wanted to avoid changing the order of the output for --symbols --dyn-symbols for LLVM style, keep what is emitted by --symbols unchanged for all dumpers, and avoid having different orders of .dynsym and .symtab dumping for GNU "--symbols" and "--symbols --dyn-symbols". Reviewed by: grimar, rupprecht Differential Revision: https://reviews.llvm.org/D57016 llvm-svn: 351960
* [llvm-readelf]Revert --dyn-symbols behaviour to make it GNU compatible, and ↵James Henderson2019-01-221-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add new --hash-symbols switch for old behaviour In r287786, the behaviour of --dyn-symbols in llvm-readelf (but not llvm-readobj) was changed to print the dynamic symbols as derived from the hash table, rather than to print the dynamic symbol table contents directly. The original change was initially submitted without review, and some comments were made on the commit mailing list implying that the new behavious is GNU compatible. I argue that it is not: 1) It does not include a null symbol. 2) It prints the symbols based on an order derived from the hash table. 3) It prints an extra column indicating which bucket it came from. This could break parsers that expect a fixed number of columns, with the first column being the symbol index. 4) If the input happens to have both .hash and .gnu.hash section, it prints interpretations of them both, resulting in most symbols being printed twice. 5) There is no way of just printing the raw dynamic symbol table, because --symbols also prints the static symbol table. This patch reverts the --dyn-symbols behaviour back to its old behaviour of just printing the contents of the dynamic symbol table, similar to what is printed by --symbols. As the hashed interpretation is still desirable to validate the hash table, it puts it under a new switch "--hash-symbols". This is a no-op on all output forms except for GNU output style for ELF. If there is no hash table, it does nothing, unlike the previous behaviour which printed the raw dynamic symbol table, since the raw dynsym is available under --dyn-symbols. The yaml input for the test is based on that in test/tools/llvm-readobj/demangle.test, but stripped down to the bare minimum to provide a valid dynamic symbol. Note: some LLD tests needed updating. I will commit a separate patch for those. Reviewed by: grimar, rupprecht Differential Revision: https://reviews.llvm.org/D56910 llvm-svn: 351789
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [llvm-readobj][ELF]Add demangling supportJames Henderson2019-01-171-24/+28
| | | | | | | | | | | | | | | | | | | | | This change adds demangling support to the ELF side of llvm-readobj, under the switch --demangle/-C. The following places are demangled: symbol table dumps (static and dynamic), relocation dumps (static and dynamic), addrsig dumps, call graph profile dumps, and group section signature symbols. Although GNU readelf doesn't support demangling, it is still a useful feature to have, and brings it on a par with llvm-objdump's capabilities. This fixes https://bugs.llvm.org/show_bug.cgi?id=40054. Reviewed by: grimar, rupprecht Differential Revision: https://reviews.llvm.org/D56791 llvm-svn: 351450
* [llvm-readobj] Don't print '@' at end of unversioned dynsym namesJames Henderson2019-01-081-2/+4
| | | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=40097. The problem was caused by a regression in r188022. See also r350614. Reviewed by: rupprecht, mstorsjo, Higuoxing, jakehehrlich Differential Revision: https://reviews.llvm.org/D56319 llvm-svn: 350615
* [binutils] NFC: fix clang-tidy warning: use empty() instead of size() == 0Jordan Rupprecht2018-12-201-1/+1
| | | | llvm-svn: 349710
* [AArch64] - Return address signing dwarf supportLuke Cheeseman2018-12-181-35/+49
| | | | | | | | | | | | | | - Reapply changes intially introduced in r343089 - The archtecture info is no longer loaded whenever a DWARFContext is created - The runtimes libraries (santiziers) make use of the dwarf context classes but do not intialise the target info - The architecture of the object can be obtained without loading the target info - Adding a method to the dwarf context to get this information and multiplex the string printing later on Differential Revision: https://reviews.llvm.org/D55774 llvm-svn: 349472
* [AMDGPU] Emit MessagePack HSA Metadata for v3 code objectScott Linder2018-12-121-10/+65
| | | | | | | | | Continue to present HSA metadata as YAML in ASM and when output by tools (e.g. llvm-readobj), but encode it in Messagepack in the code object. Differential Revision: https://reviews.llvm.org/D48179 llvm-svn: 348963
* [llvm-readobj] Little clean up inside `parseDynamicTable`Xing GUO2018-12-081-13/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: This anoymous function actually has same logic with `Obj->toMappedAddr`. Besides, I have a question on resolving illegal value. `gnu-readelf`, `gnu-objdump` and `llvm-objdump` could parse the test file 'test/tools/llvm-objdump/Inputs/private-headers-x86_64.elf', but `llvm-readobj` will fail when parse `DT_RELR` segment. Because, the value is 0x87654321 which is illegal. So, shall we do this clean up rather then remove the checking statements inside anoymous function? ``` if (Delta >= Phdr.p_filesz) return createError("Virtual address is not in any segment"); ``` Reviewers: rupprecht, jhenderson Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D55329 llvm-svn: 348701
* [llvm-readobj] Improve dynamic section iteration NFC.Xing GUO2018-12-011-3/+9
| | | | llvm-svn: 348074
* Revert r347490 as it breaks address sanitizer buildsLuke Cheeseman2018-11-231-49/+35
| | | | llvm-svn: 347499
OpenPOWER on IntegriCloud