summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case ↵George Rimar2019-07-242-10/+0
| | | | | | | | | | | | | | and rewrite it to use YAML. This patch removes test/Object/X86/no-start-symbol.test (rewrites it to use YAML and moves it to llvm-objdump tests folder). (This test was initially introduced in rL239039, but now there is no reason to keep the precompiled binary it seems). DIfferential revision: https://reviews.llvm.org/D65136 llvm-svn: 366896
* [Object/llvm-readobj] - Cleanup testing of the dynamic objects.George Rimar2019-07-241-328/+283
| | | | | | | | | | | | | | | | | | | | | | 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
* Recommit rr366796 "[Object/ELF.h] - Improve testing of the fields in ↵George Rimar2019-07-241-0/+54
| | | | | | | | | | | | | | | | ELFFile<ELFT>::sections()." With a fix of the issue found by UBSan. Original commit message: This eliminates a one error untested and also introduces a error for one more possible case which lead to crash previously. Differential revision: https://reviews.llvm.org/D64987 llvm-svn: 366886
* Revert "[Object/ELF.h] - Improve testing of the fields in ↵Vlad Tsyrklevich2019-07-231-55/+0
| | | | | | | | | ELFFile<ELFT>::sections()." This reverts commit r366796 because it was causing ubsan buildbot failures. llvm-svn: 366815
* [Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections().George Rimar2019-07-231-0/+55
| | | | | | | | | | This eliminates a one error untested and also introduces a error for one more possible case which lead to crash previously. Differential revision: https://reviews.llvm.org/D64987 llvm-svn: 366796
* [Object/llvm-readelf/llvm-readobj] - Improve error reporting when e_shstrndx ↵George Rimar2019-07-161-0/+16
| | | | | | | | | | | | | | | | | | 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
* Fix test case of llvm-nm using implicit a.outAlex Brachet2019-07-121-1/+1
| | | | llvm-svn: 365892
* [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.George Rimar2019-07-1211-405/+0
| | | | | | | | | | | | | | | test/Object is not correct place to have tests that check obj2yaml functionality, because we have test/tools/obj2yaml folder for that. In this patch I merged a few test cases with their YAMLs from Inputs folder, converted one of binary inputs and moved them to tools/obj2yaml folder. There are still another tests that might need the same, so it is initial step. Differential revision: https://reviews.llvm.org/D64555 llvm-svn: 365891
* [llvm-readobj/llvm-readelf] - Report a warning instead of a error when ↵George Rimar2019-07-111-9/+9
| | | | | | | | | | | | 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
* [test/Object/nm-trivial-object.test] - Remove 4 precompiled binaries.George Rimar2019-07-105-55/+145
| | | | | | | | | This converts 5 precompiled binaries to YAMLs, removes 4 from inputs and performs a cleanup. Differential revision: https://reviews.llvm.org/D64246 llvm-svn: 365601
* [AMDGPU] gfx908 targetStanislav Mekhanoshin2019-07-091-5/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D64429 llvm-svn: 365525
* [llvm\test\Object] - An initial step to cleanup the test cases.George Rimar2019-07-0818-1480/+1992
| | | | | | | | | | | | 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-23/+23
| | | | | | | | | | | | | | | | | 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
* [Object/invalid.test] - Convert Object/corrupt.test to YAML and merge the ↵George Rimar2019-07-028-65/+197
| | | | | | | | | | | | | | result into invalid.test Object/corrupt.test has the same purpose as Object/invalid.test: it tests the behavior on invalid inputs. In this patch I converted it to YAML, merged into invalid.test, added comments and removed a few precompiled binaries. Differential revision: https://reviews.llvm.org/D63927 llvm-svn: 364916
* [test/Object] - Fix build bot.George Rimar2019-07-021-1/+1
| | | | | | | Fixed mistype in the test case. BB: http://lab.llvm.org:8011/builders/lld-x86_64-ubuntu-fast/builds/2720/steps/test-check-all/logs/stdio llvm-svn: 364905
* [Object/invalid.test] - Convert 3 more sub-tests to YAMLGeorge Rimar2019-07-024-10/+43
| | | | | | | | This allows to remove 3 more precompiled binaries from the inputs. Differential revision: https://reviews.llvm.org/D63880 llvm-svn: 364903
* [Object/invalid.test] - Convert most of the sub tests to YAML.George Rimar2019-06-2713-85/+308
| | | | | | | | | | | | | Object/invalid.test is a test case that is used to check the behavior of tools when broken inputs are used. The most often tool tested there is llvm-readobj. I think we might want to move such tests to test\tools\llvm-readobj. For now this patch converts many sub-tests to use YAML and removes 12 binaries from the inputs. Differential revision: https://reviews.llvm.org/D63762 llvm-svn: 364522
* MC: correct the emission of weak aliases in COFFSaleem Abdulrasool2019-06-261-3/+8
| | | | | | | | | | | The weak alias should have the characteristics set to `IMAGE_EXTERN_WEAK_SEARCH_ALIAS` to indicate that the weak external here is a symbol alias and that the symbol is aliased to a locally defined symbol. We were previously setting the characteristics to `IMAGE_EXTERN_WEAK_SEARCH_LIBRARY` which indicates that the symbol should be looked for in the libraries. llvm-svn: 364370
* [yaml2obj/obj2yaml] - Allow having the symbols and sections with duplicated ↵George Rimar2019-06-251-7/+7
| | | | | | | | | | | | names. The patch teaches yaml2obj/obj2yaml to support parsing/dumping the sections and symbols with the same name. A special suffix is added to a name to make it unique. Differential revision: https://reviews.llvm.org/D63596 llvm-svn: 364282
* [lit] Delete empty lines at the end of lit.local.cfg NFCFangrui Song2019-06-171-1/+0
| | | | llvm-svn: 363538
* [llvm-readobj] Don't abort printing of dynamic table if string reference is ↵James Henderson2019-06-142-7/+0
| | | | | | | | | | | | | | | | | 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
* [yaml2obj/obj2yaml] - Make RawContentSection::Content and ↵George Rimar2019-06-102-8/+1
| | | | | | | | | | | | | | | | RawContentSection::Size optional This is a follow-up for D62809. Content and Size fields should be optional as was discussed in comments of the D62809's thread. With that, we can describe a specific string table and symbol table sections in a more correct way and also show appropriate errors. The patch adds lots of test cases where the behavior is described in details. Differential revision: https://reviews.llvm.org/D62957 llvm-svn: 362931
* Attempt to fix nm-archive.test after r362798Nico Weber2019-06-072-1/+19
| | | | | | | | | llvm-lib now needs a `target triple` for bitcode, so add a new file that's like trivial.ll but has one, and use that in the test. (trivial.ll had a comment that looked like it wasn't supposed to be used in tests directly, so I don't want to change that file.) llvm-svn: 362809
* [llvm-readelf] - Allow dumping of the .dynamic section even if there is no ↵George Rimar2019-05-292-5/+2
| | | | | | | | | | | | | PT_DYNAMIC header. It is now possible after D61937 was landed and was discussed in it's review comments. It is not consistent with GNU, which does not output .dynamic section content in this case for no visible reason. Differential revision: https://reviews.llvm.org/D62179 llvm-svn: 361943
* Add IR support, ELF section and user documentation for partitioning feature.Peter Collingbourne2019-05-291-1/+1
| | | | | | | | | | | | The partitioning feature was proposed here: http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html This is mostly just documentation. The feature itself will be contributed in subsequent patches. Differential Revision: https://reviews.llvm.org/D60242 llvm-svn: 361923
* Change ELF tools to allow multiple sections per file.Peter Collingbourne2019-05-281-0/+62
| | | | | | | | | This is how multi-partition combined output files are going to look. If we see multiple sections, the tools will just read the first one. Differential Revision: https://reviews.llvm.org/D62349 llvm-svn: 361869
* [llvm-readelf] - Rework how we parse the .dynamic section.George Rimar2019-05-202-2/+2
| | | | | | | | | | | | | This is a result of what I found during my work on https://bugs.llvm.org/show_bug.cgi?id=41679. Previously LLVM readelf took the information about .dynamic section from its PT_DYNAMIC segment only. GNU tools have a bit different logic. They also use the information from the .dynamic section header if it is available. This patch changes the code to improve the compatibility with the GNU Binutils. Differential revision: https://reviews.llvm.org/D61937 llvm-svn: 361165
* [ELF] Implement Dependent Libraries FeatureBen Dunbobbin2019-05-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a limited form of autolinking primarily designed to allow either the --dependent-library compiler option, or "comment lib" pragmas ( https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=vs-2017) in C/C++ e.g. #pragma comment(lib, "foo"), to cause an ELF linker to automatically add the specified library to the link when processing the input file generated by the compiler. Currently this extension is unique to LLVM and LLD. However, care has been taken to design this feature so that it could be supported by other ELF linkers. The design goals were to provide: - A simple linking model for developers to reason about. - The ability to to override autolinking from the linker command line. - Source code compatibility, where possible, with "comment lib" pragmas in other environments (MSVC in particular). Dependent library support is implemented differently for ELF platforms than on the other platforms. Primarily this difference is that on ELF we pass the dependent library specifiers directly to the linker without manipulating them. This is in contrast to other platforms where they are mapped to a specific linker option by the compiler. This difference is a result of the greater variety of ELF linkers and the fact that ELF linkers tend to handle libraries in a more complicated fashion than on other platforms. This forces us to defer handling the specifiers to the linker. In order to achieve a level of source code compatibility with other platforms we have restricted this feature to work with libraries that meet the following "reasonable" requirements: 1. There are no competing defined symbols in a given set of libraries, or if they exist, the program owner doesn't care which is linked to their program. 2. There may be circular dependencies between libraries. The binary representation is a mergeable string section (SHF_MERGE, SHF_STRINGS), called .deplibs, with custom type SHT_LLVM_DEPENDENT_LIBRARIES (0x6fff4c04). The compiler forms this section by concatenating the arguments of the "comment lib" pragmas and --dependent-library options in the order they are encountered. Partial (-r, -Ur) links are handled by concatenating .deplibs sections with the normal mergeable string section rules. As an example, #pragma comment(lib, "foo") would result in: .section ".deplibs","MS",@llvm_dependent_libraries,1 .asciz "foo" For LTO, equivalent information to the contents of a the .deplibs section can be retrieved by the LLD for bitcode input files. LLD processes the dependent library specifiers in the following way: 1. Dependent libraries which are found from the specifiers in .deplibs sections of relocatable object files are added when the linker decides to include that file (which could itself be in a library) in the link. Dependent libraries behave as if they were appended to the command line after all other options. As a consequence the set of dependent libraries are searched last to resolve symbols. 2. It is an error if a file cannot be found for a given specifier. 3. Any command line options in effect at the end of the command line parsing apply to the dependent libraries, e.g. --whole-archive. 4. The linker tries to add a library or relocatable object file from each of the strings in a .deplibs section by; first, handling the string as if it was specified on the command line; second, by looking for the string in each of the library search paths in turn; third, by looking for a lib<string>.a or lib<string>.so (depending on the current mode of the linker) in each of the library search paths. 5. A new command line option --no-dependent-libraries tells LLD to ignore the dependent libraries. Rationale for the above points: 1. Adding the dependent libraries last makes the process simple to understand from a developers perspective. All linkers are able to implement this scheme. 2. Error-ing for libraries that are not found seems like better behavior than failing the link during symbol resolution. 3. It seems useful for the user to be able to apply command line options which will affect all of the dependent libraries. There is a potential problem of surprise for developers, who might not realize that these options would apply to these "invisible" input files; however, despite the potential for surprise, this is easy for developers to reason about and gives developers the control that they may require. 4. This algorithm takes into account all of the different ways that ELF linkers find input files. The different search methods are tried by the linker in most obvious to least obvious order. 5. I considered adding finer grained control over which dependent libraries were ignored (e.g. MSVC has /nodefaultlib:<library>); however, I concluded that this is not necessary: if finer control is required developers can fall back to using the command line directly. RFC thread: http://lists.llvm.org/pipermail/llvm-dev/2019-March/131004.html. Differential Revision: https://reviews.llvm.org/D60274 llvm-svn: 360984
* AArch64: support binutils-like things on arm64_32.Tim Northover2019-05-142-0/+5
| | | | | | | | This adds support for the arm64_32 watchOS ABI to LLVM's low level tools, teaching them about the specific MachO choices and constants needed to disassemble things. llvm-svn: 360663
* [AMDGPU] gfx1010 tests. NFC.Stanislav Mekhanoshin2019-05-131-1/+16
| | | | llvm-svn: 360615
* [Object] Fix macho-invalid.testFangrui Song2019-05-101-156/+156
| | | | llvm-svn: 360420
* [llvm-objdump] - Print relocation record in a GNU format.George Rimar2019-05-072-2/+2
| | | | | | | | | | | | | | | This fixes the https://bugs.llvm.org/show_bug.cgi?id=41355. Previously with -r we printed relocation section name instead of the target section name. It was like this: "RELOCATION RECORDS FOR [.rel.text]" Now it is: "RELOCATION RECORDS FOR [.text]" Also when relocation target section has more than one relocation section, we did not combine the output. Now we do. Differential revision: https://reviews.llvm.org/D61312 llvm-svn: 360143
* [llvm-ar][llvm-nm][llvm-size] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-016-23/+23
| | | | llvm-svn: 359688
* [llvm-objdump] Print newlines before and after "Disassembly of section ...:"Fangrui Song2019-05-011-0/+1
| | | | | | | | | | | This improves readability and the behavior is consistent with GNU objdump. The new test test/tools/llvm-objdump/X86/disassemble-section-name.s checks we print newlines before and after "Disassembly of section ...:" Differential Revision: https://reviews.llvm.org/D61127 llvm-svn: 359668
* [llvm-readobj] Change -t to --symbols in tests. NFCFangrui Song2019-05-013-13/+13
| | | | | | | | | | -t is --symbols in llvm-readobj but --section-details (unimplemented) in readelf. The confusing option should not be used since we aim for improving compatibility. Keep just one llvm-readobj -t use case in test/tools/llvm-readobj/symbols.test llvm-svn: 359661
* [llvm-readobj] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-0135-97/+97
| | | | | | | | | | 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-objdump] errorToErrorCode+message -> toStringFangrui Song2019-04-251-1/+1
| | | | | | For test/Object/elf-invalid-phdr.test, the intended error message got lost due to errorToErrorCode(). llvm-svn: 359166
* [WebAssembly] Object: Improve error messages on invalid sectionSam Clegg2019-04-201-0/+6
| | | | | | | | Also add a test. Differential Revision: https://reviews.llvm.org/D60836 llvm-svn: 358801
* [llvm-objdump] Simplify PrintHelpMessage() logicFangrui Song2019-04-161-2/+3
| | | | | | | | This relands rL358418. It missed one test that should also use -macho Note, all the other -private-header -exports-trie tests are used together with -macho. llvm-svn: 358472
* [llvm-readobj] Reapply: Improve error message for --string-dumpStephen Tozer2019-04-151-3/+3
| | | | | | | | | | | | | | | | | This is a resubmission of a previous patch that caused test failures, with the fixes for the relevant tests included. Fixes bug 40630: https://bugs.llvm.org/show_bug.cgi?id=40630 This patch changes the error message when the section specified by --string-dump cannot be found by including the name of the section in the error message and changing the prefix text to not imply that the file itself was invalid. As part of this change some uses of std::error_code have been replaced with the llvm Error class to better encapsulate the error info (rather than passing File strings around), and the WithColor class replaces string literal error prefixes. llvm-svn: 358395
* [StackMaps] Update llvm-readobj to parse V3 StackmapsPhilip Reames2019-04-132-31/+30
| | | | | | | | | | | This updates the StackMap parser in the llvm-readobj tool to parse version 3 StackMaps, which were bumped in https://reviews.llvm.org/D32629. Version 3 StackMaps differ in that they have a uint16 sized "location size" field which was added to the Location block in a StackMap record. The record has additional padding for alignment. This was a backwards incompatible change resulting in a StackMap version bump. Patch By: jacob.hughes@kcl.ac.uk (with a rewrite of tests by me) Differential Revision: https://reviews.llvm.org/D59020 llvm-svn: 358325
* [StackMaps] Add location size to llvm-readobj -stackmap outputPhilip Reames2019-04-131-66/+66
| | | | | | | | | | | | | | | | The size field of a location can be different for each entry, so it is useful to have this displayed in the output of llvm-readobj -stackmap. Below is an example of how the output would look: Record ID: 2882400000, instruction offset: 16 3 locations: #1: Constant 1, size: 8 #2: Constant 2, size: 8 #3: Constant 3, size: 8 0 live-outs: [ ] Patch By: jacob.hughes@kcl.ac.uk (with heavy modification by me) Differential Revision: https://reviews.llvm.org/D59169 llvm-svn: 358324
* [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when ↵George Rimar2019-04-0318-226/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parsing/dumping. Currently, YAML has the following syntax for describing the symbols: Symbols: Local: LocalSymbol1: ... LocalSymbol2: ... ... Global: GlobalSymbol1: ... Weak: ... GNUUnique: I.e. symbols are grouped by their bindings. That is not very convenient, because: It does not allow to set a custom binding, what can be useful for producing broken/special outputs for test cases. Adding a new binding would require to change a syntax (what we observed when added GNUUnique recently). It does not allow to change the order of the symbols in .symtab/.dynsym, i.e. currently all Local symbols are placed first, then Global, Weak and GNUUnique are following, but we are not able to change the order. It is not consistent. Binding is just one of the properties of the symbol, we do not group them by other properties. It makes the code more complex that it can be. This patch shows it can be simplified with the change performed. The patch changes the syntax to just: Symbols: Symbol1: ... Symbol2: ... ... With that, we are able to work with the binding field just like with any other symbol property. Differential revision: https://reviews.llvm.org/D60122 llvm-svn: 357595
* [DWARF] Refactor RelocVisitor and fix computation of SHT_RELA-typed ↵Fangrui Song2019-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relocation entries Summary: getRelocatedValue may compute incorrect value for SHT_RELA-typed relocation entries. // DWARFDataExtractor.cpp uint64_t DWARFDataExtractor::getRelocatedValue(uint32_t Size, uint32_t *Off, ... // This formula is correct for REL, but may be incorrect for RELA if the value // stored in the location (getUnsigned(Off, Size)) is not zero. return getUnsigned(Off, Size) + Rel->Value; In this patch, we * refactor these visit* functions to include a new parameter `uint64_t A`. Since these visit* functions are no longer used as visitors, rename them to resolve*. + REL: A is used as the addend. A is the value stored in the location where the relocation applies: getUnsigned(Off, Size) + RELA: The addend encoded in RelocationRef is used, e.g. getELFAddend(R) * and add another set of supports* functions to check if a given relocation type is handled. DWARFObjInMemory uses them to fail early. Reviewers: echristo, dblaikie Reviewed By: echristo Subscribers: mgorny, aprantl, aheejin, fedor.sergeev, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57939 llvm-svn: 356729
* [Object] Fix reading objects created with -fembed-bitcode-markerSteven Wu2019-03-213-0/+12
| | | | | | | | | | | | | | | | | | | | | Currently, this fails with many tools, e.g. $ clang -fembed-bitcode-marker -c -o test.o test.c $ nm test.o nm: test.o The file was not recognized as a valid object file -fembed-bitcode-marker creates a LLVM,bitcode section consisting of a single byte. When reading the object file, IRObjectFile::findBitcodeInObject succeeds, causing SymbolicFile::createSymbolicFile to try to read the "bitcode" rather than using the outer Mach-O data - when then fails. Fix this by making findBitcodeInObject return an error if the section size <= 1. Patched by: Nicholas Allegra Differential Revision: https://reviews.llvm.org/D44373 llvm-svn: 356718
* [yaml2obj]Allow explicit symbol indexes in relocations and emit error for ↵James Henderson2019-03-124-20/+3
| | | | | | | | | | | | | | | | | | | | | bad names Prior to this change, the "Symbol" field of a relocation would always be assumed to be a symbol name, and if no such symbol existed, the relocation would reference index 0. This confused me when I tried to use a literal symbol index in the field: since "0x1" was not a known symbol name, the symbol index was set as 0. This change falls back to treating unknown symbol names as integers, and emits an error if the name is not found and the string is not an integer. Note that the Symbol field is optional, so if a relocation doesn't reference a symbol, it shouldn't be specified. The new error required a number of test updates. Reviewed by: grimar, ruiu Differential Revision: https://reviews.llvm.org/D58510 llvm-svn: 355938
* Improve "llvm-nm -f sysv" output for Elf filesSunil Srivastava2019-03-081-0/+6
| | | | | | | | | | 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-readobj] Display section names for STT_SECTION symbols.Matt Davis2019-03-011-10/+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
* Fix BB after r354661George Rimar2019-02-222-0/+6
| | | | | | Update 2 test cases after obj2yaml fix in r354661. llvm-svn: 354663
* [WebAssembly] Generalize section ordering constraintsThomas Lively2019-02-201-0/+60
| | | | | | | | | | | | | | | | | | | | | Summary: Changes from using a total ordering of known sections to using a dependency graph approach. This allows our tools to accept and process binaries that are compliant with the spec and tool conventions that would have been previously rejected. It also means our own tools can do less work to enforce an artificially imposed ordering. Using a general mechanism means fewer special cases and exceptions in the ordering logic. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58312 llvm-svn: 354426
OpenPOWER on IntegriCloud