summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj/llvm-readelf] - Improve/cleanup the error reporting API.George Rimar2019-08-179-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | urrently we have the following functions for error reporting: -- LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg); void reportError(Error Err, StringRef Input); void reportWarning(Twine Msg); void reportWarning(StringRef Input, Error Err); void warn(llvm::Error Err); void error(std::error_code EC); --- Problems are: naming is inconsistent, arguments order is inconsistent, some of the functions looks excessive. After applying this patch we have: --- LLVM_ATTRIBUTE_NORETURN void reportError(Error Err, StringRef Input); LLVM_ATTRIBUTE_NORETURN void reportError(std::error_code EC, StringRef Input); void reportWarning(Error Err, StringRef Input); --- I'd be happy to remove reportError(std::error_code EC, StringRef Input) too, but it is used by COFF heavily. Test cases were updated, they show an improvement introduced. Differential revision: https://reviews.llvm.org/D66286 llvm-svn: 369190
* [test] - Remove precomiled openbsd-phdrs.elf-x86-64 objects.George Rimar2019-08-171-187/+164
| | | | | | | | | | | There are 2 similar openbsd-phdrs.elf-x86-64 objects committed and used in test/Object and test/tools/llvm-objdump test cases. There is no reason to have them, we can use YAML instead. Patch does that. Differential revision: https://reviews.llvm.org/D66342 llvm-svn: 369189
* [llvm-readobj] Unwrap the value first to avoid the errorPetr Hosek2019-08-171-5/+5
| | | | | | | | | This addresses the issue introduced in r369169, we need to unwrap the value first before we can check whether it's empty. This also swaps the two branches to put the common path first which should be NFC. llvm-svn: 369177
* [llvm-readobj] Fallback to PT_NOTE if file doesn't have sectionsPetr Hosek2019-08-161-3/+29
| | | | | | | | | This is useful when trying to read notes from stripped files and matches the behavior of GNU readelf and eu-readelf. Differential Revision: https://reviews.llvm.org/D66358 llvm-svn: 369169
* [llvm-readobj][MachO] Fix section type printingSeiya Nuta2019-08-154-52/+366
| | | | | | | | | | | | | | | | | | | 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-readelf] Implement note parsing for NT_FILE and unknown descriptorsJordan Rupprecht2019-08-135-6/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements two note parsers; one for NT_FILE coredumps, e.g.: ``` CORE 0x00000080 NT_FILE (mapped files) Page size: 4096 Start End Page Offset 0x0000000000001000 0x0000000000002000 0x0000000000003000 /path/to/a.out 0x0000000000004000 0x0000000000005000 0x0000000000006000 /path/to/libc.so 0x0000000000007000 0x0000000000008000 0x0000000000009000 [stack] ``` (A more realistic example can be tested locally by creating a crashing program and running `llvm-readelf -n core`) And also implements a raw hex dump for unknown descriptor data for unhandled descriptor types. Reviewers: MaskRay, jhenderson, grimar, alexshap Reviewed By: MaskRay, grimar Subscribers: emaste, llvm-commits, labath Tags: #llvm Differential Revision: https://reviews.llvm.org/D65832 llvm-svn: 368698
* [llvm-readobj] - Remove 'error(Error EC)' helper.George Rimar2019-08-131-12/+12
| | | | | | | | | We do not need it. I replaced it with reportError(StringRef Input, Error Err). Differential revision: https://reviews.llvm.org/D66011 llvm-svn: 368677
* [llvm-readobj] Downgrade 'PT_DYNAMIC segment offset + size exceeds the size ↵Jordan Rupprecht2019-08-121-4/+4
| | | | | | | | | | | | | | | | | | of the file' from an error to a warning Summary: This allows llvm-readobj to print other useful information for truncated files instead of giving up. Reviewers: jhenderson, grimar, MaskRay Reviewed By: jhenderson, grimar, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66036 llvm-svn: 368576
* Print reasonable representations of type names in llvm-nm, readelf and readobjSunil Srivastava2019-08-091-12/+45
| | | | | | | | | | | For type values that do not have proper names, print reasonable representation in llvm-nm, llvm-readobj and llvm-readelf, matching GNU tools.s Fixes PR41713. Differential Revision: https://reviews.llvm.org/D65537 llvm-svn: 368451
* [llvm-readelf]Print filename for multiple inputs and fix formatting regressionJames Henderson2019-08-093-3/+47
| | | | | | | | | | | | | | | | | | | This patch addresses two closely related bugs: https://bugs.llvm.org/show_bug.cgi?id=42930 and https://bugs.llvm.org/show_bug.cgi?id=42931. GNU readelf prints the file name for every input unless there is only one input and that input is not an archive. This patch adds the printing for multiple inputs. A previous change did it for archives, but introduced a regression with GNU compatibility for single-output formatting, resulting in a spurious initial blank line. This is fixed in this patch too. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D65953 llvm-svn: 368435
* [llvm-readobj] - Remove deprecated unwrapOrError(Expected<T> EO).George Rimar2019-08-095-5/+5
| | | | | | | | | This patch changes the code to use a modern unwrapOrError(StringRef Input, Expected<T> EO) version that contains the input source name and removes the deprecated version. Differential revision: https://reviews.llvm.org/D65946 llvm-svn: 368428
* [llcm-readobj] - Fix BB after t368272.George Rimar2019-08-081-2/+1
| | | | | | Seems I forgot to update this test case. llvm-svn: 368273
* [yaml2obj/obj2yaml] - Add a basic support for extended section indexes.George Rimar2019-08-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases a symbol might have section index == SHN_XINDEX. This is an escape value indicating that the actual section header index is too large to fit in the containing field. Then the SHT_SYMTAB_SHNDX section is used. It contains the 32bit values that stores section indexes. ELF gABI says that there can be multiple SHT_SYMTAB_SHNDX sections, i.e. for example one for .symtab and one for .dynsym (1) https://groups.google.com/forum/#!topic/generic-abi/-XJAV5d8PRg (2) DT_SYMTAB_SHNDX: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html In this patch I am only supporting a single SHT_SYMTAB_SHNDX associated with a .symtab. This is a more or less common case which is used a few tests I saw in LLVM. I decided not to create the SHT_SYMTAB_SHNDX section as "implicit", but implement is like a kind of regular section for now. i.e. tools do not recreate this section or its content, like they do for symbol table sections, for example. That should allow to write all kind of possible broken test cases for our needs and keep the output closer to requested. Differential revision: https://reviews.llvm.org/D65446 llvm-svn: 368272
* [llvm-readobj/libObject] - Introduce a custom warning handler for ↵George Rimar2019-08-081-6/+29
| | | | | | | | | | | | | | | | | | | | `ELFFile<ELFT>` methods. Currently, we have a code duplication in llvm-readobj which was introduced in D63266. The duplication was introduced to allow llvm-readobj to dump the partially broken object. Methods in ELFFile<ELFT> perform a strict validation of the inputs, what is itself good, but not for dumper tools, that might want to dump the information, even if some pieces are broken/unexpected. This patch introduces a warning handler which can be passed to ELFFile<ELFT> methods and can allow skipping the non-critical errors when needed/possible. For demonstration, I removed the duplication from llvm-readobj and implemented a warning using the new custom warning handler. It also deduplicates the strings printed, making the output less verbose. Differential revision: https://reviews.llvm.org/D65515 llvm-svn: 368260
* [llvm-readobj][test] Add baseline tests for FreeBSD/AMD/AMDGPU note printingJordan Rupprecht2019-08-073-0/+251
| | | | llvm-svn: 368221
* [llvm-readelf] --notes: move 'Data size' column left by 1Fangrui Song2019-08-071-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readelf -n: ``` // "Data size" is not left justified Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) ``` llvm-readelf -n (before): ``` // "Data size" column shifted by 1 Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) ``` llvm-readelf -n (after): ``` Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) ``` This change is made to reduce the diff with readelf -n, so that it is slightly easier to check what features readelf implements but we don't. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D65847 llvm-svn: 368138
* [llvm-readelf] Support dumping of stack sizes sections with readelf ↵Wolfgang Pieb2019-08-051-0/+473
| | | | | | | | | | --stack-sizes Reviewers: jhenderson, grimar, rupprecht Differential Revision: https://reviews.llvm.org/D65313 llvm-svn: 367942
* [llvm-readobj][test] Add llvm-readobj style test cases for r367878Jordan Rupprecht2019-08-051-8/+41
| | | | llvm-svn: 367884
* [llvm-readelf] Fix core note descriptionsJordan Rupprecht2019-08-051-0/+28
| | | | | | | | | | | | | | | | | | | | | | | Summary: Core files have different descriptions for note values. llvm-readelf currently prints the generic note type, which is wrong when using it to read a core file. To verify the constants/strings, see: Values: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=75c4fb7e9d7c0f780d635ac305f579546b7b071b;hb=HEAD#l571 Strings: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/readelf.c;h=c31a5c1266b7bb62a485895b01b49e1f832ade35;hb=HEAD#l16881 Note: this does not handle printing the note data for NT_FILE, it just fixes the descriptions. Reviewers: MaskRay Reviewed By: MaskRay Subscribers: labath, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65608 llvm-svn: 367878
* [AARCH64] Switch relocations R_AARCH64_TLS_TPREL64 and R_AARCH64_DTPMOD64Peter Smith2019-07-312-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ELF for the Arm 64-bit Architecture document originally specified R_AARCH64_TLS_DTPREL64 = 0x404 R_AARCH64_TLS_DTPMOD64 = 0x405 LLVM correctly followed the document. Unfortunately in binutils these two codes were reversed: R_AARCH64_TLS_DTPMOD64 = 0x404 R_AARCH64_TLS_DTPREL64 = 0x405 Given that binaries had shipped this change has become the defacto standard interpretation of these relocation codes for any toolchain that wanted to remain compatible with GNU. To recognize this the latest version of the ABI document has renamed the relocations to R_AARCH64_TLS_IMPDEF1 and R_AARCH64_TLS_IMPDEF2 permitting a toolchain to choose between the two relocation types, and recommending that toolchains follow the GNU interpretation for maximum compatibility. Given that upstream llvm has never implemented the standard TLS model for AArch64 so we have no binary legacy, synchronize with GCC so that we don't create incompatible objects in the future. So far the only visible change is in llvm-readobj as it can decode these relocations. Tthis change will mean that llvm-readobj decodes the same way as GNU readelf. fixes PR40507 llvm-svn: 367437
* [Object/llvm-readobj] - Cleanup testing of the dynamic objects.George Rimar2019-07-244-10/+204
| | | | | | | | | | | | | | | | | | | | | | This patch touches a few test cases: It removes dtflags.elf-x86-64 binary and elf-dtflags.test. elf-dtflags.test is excessive because we have the elf-dynamic-tags.test which test all non-machine specific tags. It removes testing of --dynamic-table from test\Object\readobj-shared-object.test (we have the elf-dynamic-tags.test for that), and simplifies this test case. It moves testing of the headers from readobj-shared-object.test to elf-file-headers.test. Adds test/tools/llvm-readobj/elf-file-types.test and test/tools/llvm-readobj/elf-loadname.test. It opens road for removing the readobj-shared-object.test completely soon. Differential revision: https://reviews.llvm.org/D65068 llvm-svn: 366895
* [llvm-readobj] - Stop using precompiled objects in file-headers.testGeorge Rimar2019-07-229-394/+624
| | | | | | | | This converts all sub-tests except one to YAML instead of precompiled inputs. Differential revision: https://reviews.llvm.org/D64800 llvm-svn: 366668
* [llvm-readelf] - A fix for: "--hash-symbols asserts for 64-bit ELFs"George Rimar2019-07-191-3/+83
| | | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=42622. (--hash-symbols switch is currently broken for 64-bit ELF files, due to r352630.) Differential revision: https://reviews.llvm.org/D64788 llvm-svn: 366558
* [NFC][llvm-readobj] Refactor dynamic string table indexing into a function.Yuanfang Chen2019-07-181-18/+18
| | | | | | | | | | | | | Restore printDynamicString removed in rL363868. It provides better error handling whenever indexing dynamic string table is needed. Reviewers: jhenderson, MaskRay, grimar Reviewed by: jhenderson, MaskRay, grimar Differential Revision: https://reviews.llvm.org/D64674 llvm-svn: 366464
* [llvm-readelf] - Remove the precompiled binary from gnu-hash-symbols.testGeorge Rimar2019-07-183-104/+283
| | | | | | | | | | I am working on https://bugs.llvm.org/show_bug.cgi?id=42622 and this patch reworks the gnu-hash-symbols.test so that it will be easier to expand it with x86_64 case. Differential revision: https://reviews.llvm.org/D64750 llvm-svn: 366430
* [Object/llvm-readelf/llvm-readobj] - Improve error reporting when e_shstrndx ↵George Rimar2019-07-161-0/+26
| | | | | | | | | | | | | | | | | | is broken. When e_shstrndx is broken, it is impossible to get a section name. In this patch I improved the error message we show and added tests for Object and for llvm-readelf/llvm-readobj Message was changed in two places: 1) llvm-readelf/llvm-readobj previously used a code from Object/ELF.h, now they have a modified version of it (it has less checks and allows dumping broken things). 2) Code in Object/ELF.h is still used for generic cases. Differential revision: https://reviews.llvm.org/D64714 llvm-svn: 366203
* [llvm-readelf] Print "File: lib.a(file.o)" info when dumping archive files.Yuanfang Chen2019-07-154-15/+37
| | | | | | | | | | | | | | Match GNU readelf. https://bugs.llvm.org/show_bug.cgi?id=35351 Reviewers: jhenderson, grimar, MaskRay, rupprecht Reviewed by: jhenderson, MaskRay, grimar Differential Revision: https://reviews.llvm.org/D64361 llvm-svn: 366147
* [Object/ELF] - Improve error reporting for notes.George Rimar2019-07-121-75/+117
| | | | | | | | | | This patch improves the error messages reported for note sections and phdrs and also makes a cleanup for existent test case. Differential revision: https://reviews.llvm.org/D64470 llvm-svn: 365884
* Revert r365775 - "[Object/ELF] - Improve error reporting for notes."George Rimar2019-07-111-117/+75
| | | | | | It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15419 llvm-svn: 365779
* [Object/ELF] - Improve error reporting for notes.George Rimar2019-07-111-75/+117
| | | | | | | | | | This patch improves the error messages reported for note sections and phdrs and also makes a cleanup for existent test case. Differential revision: https://reviews.llvm.org/D64470 llvm-svn: 365775
* [llvm-readobj/llvm-readelf] - Report a warning instead of a error when ↵George Rimar2019-07-111-9/+32
| | | | | | | | | | | | dumping a broken dynamic section. It does not make sence to stop dumping the object if the broken dynamic section was found. In this patch I changed the behavior from "report an error" to "report a warning". This matches GNU. Differential revision: https://reviews.llvm.org/D64472 llvm-svn: 365762
* [Object][XCOFF] Add support for 64-bit file header and section header dumping.Sean Fertile2019-07-093-0/+181
| | | | | | | | | | | Adds a readobj dumper for 32-bit and 64-bit section header tables, and extend support for the file-header dumping to include 64-bit object files. Also refactors the binary file parsing to be done in a helper function in an attempt to cleanup error handeling. Differential Revision: https://reviews.llvm.org/D63843 llvm-svn: 365524
* [llvm\test\Object] - An initial step to cleanup the test cases.George Rimar2019-07-081-0/+50
| | | | | | | | | | | | This patch removes trivial-object-test.elf-i386, trivial-object-test.elf-x86-64 and trivial-object-test2.elf-x86-64 precompiled objects from test/Object/Inputs folder. I adjusted the existent test cases to use YAML instead. Differential revision: https://reviews.llvm.org/D64206 llvm-svn: 365348
* [Object/ELF.h] - Improve error reporting.George Rimar2019-07-052-3/+4
| | | | | | | | | | | | | | | | | The errors coming from ELF.h are usually not very useful because they are uninformative. This patch is a first step to improve the situation. I tested this patch with a run of check-llvm and found that few messages are untested. In this patch, I did not add more tests but marked all such cases with a "TODO" comment. For all tested messages I extended the error text to provide more details (see test cases changed). Differential revision: https://reviews.llvm.org/D64014 llvm-svn: 365183
* [llvm-readobj/llvm-readelf] - Eliminate the elf-groups.x86_64 precompiled ↵George Rimar2019-06-243-62/+80
| | | | | | | | | | | | | | | | binary from the inputs. We do not need the elf-groups.x86_64. In one of the tests, it was used for no solid reason, and for the second test case we can use YAML input with SHT_GROUP sections. The patch performs a cleanup of one of the test cases, removes another one completely (since during the review was found out it actually duplicates one of the existent tests) and removes the precompiled binary. Differential revision: https://reviews.llvm.org/D63647 llvm-svn: 364167
* [llvm-readobj] - Inline a few yaml inputs into test cases.George Rimar2019-06-216-294/+293
| | | | | | | | | There are some test that are splitted into main part + input yaml for no visible reason. This patch inines the yaml part for the 3 test cases I found. Differential revision: https://reviews.llvm.org/D63644 llvm-svn: 364049
* [binutils] Add response file option to help and docsJames Henderson2019-06-211-4/+10
| | | | | | | | | | | | | | | | | | | | | Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036
* [llvm-readobj] Match GNU output for DT_RPATH and DT_RUNPATH when dumping ↵Yuanfang Chen2019-06-193-9/+9
| | | | | | | | | | | | | | dynamic symbol table. Reviewers: jhenderson, grimar, MaskRay, rupprecht, espindola Subscribers: emaste, nemanjai, arichardson, kbarton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63347 llvm-svn: 363868
* [llvm-readobj] Allow --hex-dump/--string-dump to dump multiple sectionsFangrui Song2019-06-186-66/+110
| | | | | | | | | | | | | | | | | | 1) `-x foo` currently dumps one `foo`. This change makes it dump all `foo`. 2) `-x foo -x foo` currently dumps `foo` twice. This change makes it dump `foo` once. In addition, if foo has section index 9, `-x foo -x 9` dumps `foo` once. 3) Give a warning instead of an error if `foo` does not exist. The new behaviors match GNU readelf. Also, print a new line as a separator between two section dumps. GNU readelf uses two lines, but one seems good enough. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D63475 llvm-svn: 363683
* [lit] Delete empty lines at the end of lit.local.cfg NFCFangrui Song2019-06-172-2/+0
| | | | llvm-svn: 363538
* Revert "Revert r363377: [yaml2obj] - Allow setting custom section types for ↵George Rimar2019-06-142-5/+16
| | | | | | | | | | | | | | | | | | | | implicit sections." LLD test case will be fixed in a following commit. Original commit message: [yaml2obj] - Allow setting custom section types for implicit sections. We were hardcoding the final section type for sections that are usually implicit. The patch fixes that. This also fixes a few issues in existent test cases and removes one precompiled object. Differential revision: https://reviews.llvm.org/D63267 llvm-svn: 363401
* Revert r363377: [yaml2obj] - Allow setting custom section types for implicit ↵Rui Ueyama2019-06-142-16/+5
| | | | | | | | | sections. This reverts commit r363377 because lld's ELF/invalid/undefined-local-symbol-in-dso.test test started failing after this commit. llvm-svn: 363394
* [yaml2obj] - Allow setting custom section types for implicit sections.George Rimar2019-06-142-5/+16
| | | | | | | | | | | | We were hardcoding the final section type for sections that are usually implicit. The patch fixes that. This also fixes a few issues in existent test cases and removes one precompiled object. Differential revision: https://reviews.llvm.org/D63267 llvm-svn: 363377
* [llvm-readobj] Don't abort printing of dynamic table if string reference is ↵James Henderson2019-06-141-9/+44
| | | | | | | | | | | | | | | | | invalid If dynamic table is missing, output "dynamic strtab not found'. If the index is out of range, output "Invalid Offset<..>". https://bugs.llvm.org/show_bug.cgi?id=40807 Reviewed by: jhenderson, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D63084 Patch by Yuanfang Chen. llvm-svn: 363374
* [llvm-readobj] - Do not fail to dump the object which has wrong type of ↵George Rimar2019-06-142-0/+11
| | | | | | | | | | | | | | | | | | | | | | .shstrtab. Imagine we have object that has .shstrtab with type != SHT_STRTAB. In this case, we fail to dump the object, though GNU readelf dumps it without any issues and warnings. This patch fixes that. It adds a code to ELFDumper.cpp which is based on the implementation of getSectionName from the ELF.h: https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L608 https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L431 https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L539 The difference is that all non critical errors are ommitted what allows us to improve the dumping on a tool side. Also, this opens a road for a follow-up that should allow us to dump the section headers, but drop the section names in case if .shstrtab is completely absent and/or broken. Differential revision: https://reviews.llvm.org/D63266 llvm-svn: 363371
* [llvm-readobj] Fix output interleaving issue caused by using multiple ↵Jordan Rupprecht2019-06-121-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | streams at the same time. Summary: Use llvm::fouts() as the default stream for outputing. No new stream should be constructed to output at the same time. https://bugs.llvm.org/show_bug.cgi?id=42140 Reviewers: jhenderson, grimar, MaskRay, phosek, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63115 Patch by Yuanfang Chen! llvm-svn: 363198
* [llvm-readobj] - Do not use precompiled binary in elf-broken-dynsym-link.testGeorge Rimar2019-06-112-10/+18
| | | | | | | Now we can remove the "TODO" since https://bugs.llvm.org/show_bug.cgi?id=42216 was fixed. llvm-svn: 363045
* [llvm-readobj/llvm-readelf] - Don't fail to dump the object if .dynsym has ↵George Rimar2019-06-102-0/+60
| | | | | | | | | | | | | | | broken sh_link field. This is https://bugs.llvm.org/show_bug.cgi?id=42215. GNU readelf allows to dump the objects in that case, but llvm-readobj/llvm-readelf reports an error and stops. The patch fixes that. Differential revision: https://reviews.llvm.org/D63074 llvm-svn: 362938
* [llvm-readobj] - Remove TODOs from gnu-hash-symbols.test and demangle.test ↵George Rimar2019-06-052-22/+6
| | | | | | | | | | test cases. We can remove this TODOs now. Differential revision: https://reviews.llvm.org/D62846 llvm-svn: 362614
* [llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support DT_PPC_GOT and DT_PPC_OPTFangrui Song2019-06-052-13/+70
| | | | | | | | | | | | | | In glibc, DT_PPC_GOT indicates that PowerPC32 Secure PLT ABI is used. I plan to use it in D62464. DT_PPC_OPT currently indicates if a TLSDESC inspired TLS optimization is enabled. Reviewed By: grimar, jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D62851 llvm-svn: 362569
OpenPOWER on IntegriCloud