summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/yaml2obj
Commit message (Collapse)AuthorAgeFilesLines
...
* [yaml2obj] - Do not assert when .dynsym is specified explicitly, but .dynstr ↵George Rimar2019-06-101-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | is not present. We have a code in buildSectionIndex() that adds implicit sections: // Add special sections after input sections, if necessary. for (StringRef Name : implicitSectionNames()) if (SN2I.addName(Name, SecNo)) { // Account for this section, since it wasn't in the Doc ++SecNo; DotShStrtab.add(Name); } The problem arises when .dynsym is specified explicitly and no DynamicSymbols is used. In that case, we do not add .dynstr implicitly and will assert later when will try to set Link for .dynsym. Seems, in this case, reasonable behavior is to allow Link field to be zero. This is what this patch does. Differential revision: https://reviews.llvm.org/D63001 llvm-svn: 362929
* [yaml2obj] - Change how we handle implicit sections.George Rimar2019-06-051-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a few sections that can be added implicitly to the output: ".dynsym", ".dynstr", ".symtab", ".strtab" and ".shstrtab". Problem appears when such section is listed explicitly in YAML. In that case it's content is written twice: first time during writing of regular sections listed in the document and second time during special handling. Because of that their file offsets can become unexpectedly broken: (yaml file for sample below lists .dynsym explicitly before .text.foo) Before patch: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .dynsym DYNSYM 0000000000000100 00000250 0000000000000030 0000000000000018 A 6 0 8 [ 2] .text.foo PROGBITS 0000000000000200 00000200 0000000000000000 0000000000000000 AX 0 0 0 After patch: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .dynsym DYNSYM 0000000000000100 00000200 0000000000000030 0000000000000018 A 6 0 8 [ 2] .text.foo PROGBITS 0000000000000200 00000230 0000000000000000 0000000000000000 AX 0 0 0 This patch reorganizes our code and fixes the issue described. Differential revision: https://reviews.llvm.org/D62809 llvm-svn: 362602
* [llvm-readelf] - Allow dumping of the .dynamic section even if there is no ↵George Rimar2019-05-291-3/+3
| | | | | | | | | | | | | 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
* [yaml2obj] - Allow setting st_value explicitly for Symbol.George Rimar2019-05-071-0/+37
| | | | | | | | | | In some cases it is useful to explicitly set symbol's st_name value. For example, I am using it in a patch for LLD to remove the broken binary from a test case and replace it with a YAML test. Differential revision: https://reviews.llvm.org/D61180 llvm-svn: 360137
* [yaml2obj] - Report when unknown section is referenced from program header ↵George Rimar2019-05-011-2/+17
| | | | | | | | | | | | declaration block. Previously we did not report this. Also this removes multiple lookups in the map what cleanups the code. Differential revision: https://reviews.llvm.org/D61322 llvm-svn: 359663
* [llvm-readobj] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-0121-22/+22
| | | | | | | | | | 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-nm][llvm-readelf] Avoid single-dash -long-option in testsFangrui Song2019-04-272-2/+2
| | | | llvm-svn: 359383
* [yaml2obj] - Don't crash on invalid inputs.George Rimar2019-04-251-1/+4
| | | | | | | | | | | | | | yaml2obj might crash on invalid input when unable to parse the YAML. Recently a crash with a very similar nature was fixed for an empty files. This patch revisits the fix and does it in yaml::Input instead. It seems to be more correct way to handle such situation. With that crash for invalid inputs is also fixed now. Differential revision: https://reviews.llvm.org/D61059 llvm-svn: 359178
* [llvm-readobj] Should declare `ListScope` for `verneed` entries.Xing GUO2019-04-102-30/+36
| | | | | | | | | | | | | | | | 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
* [yaml2obj] - Check we correctly set the sh_info field of .symtab section.George Rimar2019-04-041-0/+36
| | | | | | | | | | | | initSymtabSectionHeader has the following line: SHeader.sh_info = findLocalsNum(Symbols) + 1; As was mentioned in a review comments for D60122, it is never tested. The patch adds a test. Differential revision: https://reviews.llvm.org/D60192 llvm-svn: 357687
* [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when ↵George Rimar2019-04-0313-68/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [yaml2obj] Fixing opening empty yaml files.Puyan Lotfi2019-03-281-0/+5
| | | | | | | | | | | | | | Essentially echo "" | yaml2obj crashes. This patch attempts to trim whitespace and determine if the yaml string in the file is empty or not. If the input is empty then it will not properly print out an error message and return an error code. Differential Revision: https://reviews.llvm.org/D59964 A test/tools/yaml2obj/empty.yaml M tools/yaml2obj/yaml2obj.cpp llvm-svn: 357219
* [yaml2obj][obj2yaml] - Teach yaml2obj/obj2yaml tools about STB_GNU_UNIQUE ↵George Rimar2019-03-281-0/+21
| | | | | | | | | | | | | symbols. yaml2obj/obj2yaml does not support the symbols with STB_GNU_UNIQUE yet. Currently, obj2yaml fails with llvm_unreachable when met such a symbol. I faced it when investigated the https://bugs.llvm.org/show_bug.cgi?id=41196. Differential revision: https://reviews.llvm.org/D59875 llvm-svn: 357158
* [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU ↵Xing GUO2019-03-253-3/+3
| | | | | | | | | | | | | | | | | | | | 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
* Revert "[llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` ↵Douglas Yung2019-03-223-3/+3
| | | | | | | | | | | | | and `GNU style`" This reverts commit 94a0cffe250c1cd6b8fea5607be502cadf617bdc (r356764). This change was originally committed in r356764, but then partially reverted in r356777 due to "bad changes". This caused test failures because the test changes committed along with the original change were not reverted, so this change reverts the rest of the changes. llvm-svn: 356811
* [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU ↵Xing GUO2019-03-223-3/+3
| | | | | | | | | | | | | | | | | | | | 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
* [ObjectYAML] Add basic minidump generation supportPavel Labath2019-03-226-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the ability to read a yaml form of a minidump file and write it out as binary. Apart from the minidump header and the stream directory, only three basic stream kinds are supported: - Text: This kind is used for streams which contain textual data. This is typically the contents of a /proc file on linux (e.g. /proc/PID/maps). In this case, we just put the raw stream contents into the yaml. - SystemInfo: This stream contains various bits of information about the host system in binary form. We expose the data in a structured form. - Raw: This kind is used as a fallback when we don't have any special knowledge about the stream. In this case, we just print the stream contents in hex. For this code to be really useful, more stream kinds will need to be added (particularly for things like lists of memory regions and loaded modules). However, these can be added incrementally. Reviewers: jhenderson, zturner, clayborg, aprantl Subscribers: mgorny, lemo, llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59482 llvm-svn: 356753
* [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offsetJames Henderson2019-03-151-0/+85
| | | | | | | | | | | | | | yaml2obj currently derives the p_filesz, p_memsz, and p_offset values of program headers from their sections. This makes writing tests for certain formats more complex, and sometimes impossible. This patch allows setting these fields explicitly, overriding the default value, when relevant. Reviewed by: jakehehrlich, Higuoxing Differential Revision: https://reviews.llvm.org/D59372 llvm-svn: 356247
* [yaml2obj]Allow explicit symbol indexes in relocations and emit error for ↵James Henderson2019-03-122-0/+60
| | | | | | | | | | | | | | | | | | | | | 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
* [yaml2obj] - Allow producing ELFDATANONE ELFsGeorge Rimar2019-03-071-0/+15
| | | | | | | | | I need this to remove a binary from LLD test suite. The patch also simplifies the code a bit. Differential revision: https://reviews.llvm.org/D59082 llvm-svn: 355591
* [yaml2obj] - Allow setting custom sh_info for RawContentSection sections.George Rimar2019-03-012-0/+64
| | | | | | | | | | | This is for tweaking SHT_SYMTAB sections. Their sh_info contains the (number of symbols + 1) usually. But for creating invalid inputs for test cases it would be convenient to allow explicitly override this field from YAML. Differential revision: https://reviews.llvm.org/D58779 llvm-svn: 355193
* [yaml2obj]Re-allow dynamic sections to have raw contentJames Henderson2019-02-251-0/+44
| | | | | | | | | | | | | | | | Recently, support was added to yaml2obj to allow dynamic sections to have a list of entries, to make it easier to write tests with dynamic sections. However, this change also removed the ability to provide custom contents to the dynamic section, making it hard to test malformed contents (e.g. because the section is not a valid size to contain an array of entries). This change reinstates this. An error is emitted if raw content and dynamic entries are both specified. Reviewed by: grimar, ruiu Differential Review: https://reviews.llvm.org/D58543 llvm-svn: 354770
* [yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section.George Rimar2019-02-211-0/+69
| | | | | | | | | | This patch adds support for parsing/dumping the .gnu.version section. Description of the section is: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html Differential revision: https://reviews.llvm.org/D58437 llvm-svn: 354574
* [yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVEJames Henderson2019-02-211-22/+31
| | | | | | | | | | | | | | | | | | | | In order to test tool handling of invalid section indexes, I need to create an object containing such an invalid section index. I could create a hex-edited binary, but having the ability to use yaml2obj is preferable. Prior to this change, yaml2obj would reject any explicit section indexes less than SHN_LORESERVE. This patch changes it to allow any value. I had to change the test to use llvm-readelf instead of llvm-readobj, because llvm-readobj does not like invalid section indexes. I've also expanded the test to show that the most common SHN_* values are accepted (SHN_UNDEF, SHN_ABS, SHN_COMMON). Reviewed by: grimar, jakehehrlich Differential Revision: https://reviews.llvm.org/D58445 llvm-svn: 354566
* [obj2yaml][yaml2obj]Locate all .yaml and .test testsJames Henderson2019-02-201-1/+1
| | | | | | | | | | | | | | | | A number of the obj2yaml tests end in .yaml, but .yaml is not a default file type picked up by lit, so these tests weren't being run when running the testsuite as a whole (they could be run explicitly still). This change adds a lit local config file to specify the known file types for obj2yaml tests (.yaml and .test). Additionally, it fixes the yaml2obj config file to allow both .test and .yaml suffixed tests (previously, the two tests ending in '.test' were not being run). Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D58439 llvm-svn: 354474
* [yaml2obj][obj2yaml] Remove section type range markers from allowed mappings ↵James Henderson2019-02-191-0/+27
| | | | | | | | | | | | | | | | | | | | | and support hex values yaml2obj/obj2yaml previously supported SHT_LOOS, SHT_HIOS, and SHT_LOPROC for section types. These are simply values that delineate a range and don't really make sense as valid values. For example if a section has type value 0x70000000, obj2yaml shouldn't print this value as SHT_LOPROC. Additionally, this was missing the three other range markers (SHT_HIPROC, SHT_LOUSER and SHT_HIUSER). This change removes these three range markers. It also adds support for specifying the type as an integer, to allow section types that LLVM doesn't know about. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D58383 llvm-svn: 354344
* [yaml2obj][obj2yaml] - Support SHT_GNU_versym (.gnu.version) section.George Rimar2019-02-191-0/+88
| | | | | | | | | This patch adds support for parsing dumping the .gnu.version section. Description of the section is: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symversion.html#SYMVERTBL Differential revision: https://reviews.llvm.org/D58280 llvm-svn: 354338
* Recommit r354328, r354329 "[obj2yaml][yaml2obj] - Add support of ↵George Rimar2019-02-191-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parsing/dumping of the .gnu.version_r section." Fix: Replace assert(!IO.getContext() && "The IO context is initialized already"); with assert(IO.getContext() && "The IO context is not initialized"); (this was introduced in r354329, where I tried to quickfix the darwin BB and seems copypasted the assert from the wrong place). Original commit message: The section is described here: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverrqmts.html Patch just teaches obj2yaml/yaml2obj to dump and parse such sections. We did the finalization of string tables very late, and I had to move the logic to make it a bit earlier. That was needed in this patch since .gnu.version_r adds strings to .dynstr. This might also be useful for implementing other special sections. Everything else changed in this patch seems to be straightforward. Differential revision: https://reviews.llvm.org/D58119 llvm-svn: 354335
* Revert r354328, r354329 "[obj2yaml][yaml2obj] - Add support of ↵George Rimar2019-02-191-73/+0
| | | | | | | | | parsing/dumping of the .gnu.version_r section." Something went wrong. Bots are unhappy: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/44113/steps/test/logs/stdio llvm-svn: 354332
* [obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r ↵George Rimar2019-02-191-0/+73
| | | | | | | | | | | | | | | | | | | | section. The section is described here: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverrqmts.html Patch just teaches obj2yaml/yaml2obj to dump and parse such sections. We did the finalization of string tables very late, and I had to move the logic to make it a bit earlier. That was needed in this patch since .gnu.version_r adds strings to .dynstr. This might also be useful for implementing other special sections. Everything else changed in this patch seems to be straightforward. Differential revision: https://reviews.llvm.org/D58119 llvm-svn: 354328
* [yaml2obj] - Do not ignore explicit addresses for .dynsym and .dynstrGeorge Rimar2019-02-191-0/+40
| | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=40339 Previously if the addresses were set in YAML they were ignored for .dynsym and .dynstr sections. The patch fixes that. Differential revision: https://reviews.llvm.org/D58168 llvm-svn: 354318
* [yaml2obj] - Fix .dynamic section entries writing for 32bit targets.George Rimar2019-02-101-0/+43
| | | | | | | | | | | | | | | This was introduced by me in r353613. I tried to fix Big-endian bot and replaced uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>, so it is always 8 bytes and that was obviously incorrect. My intention was to use something like packed<uint> actually, which size is target dependent. Patch fixes this bug and adds a test case, since no bots seems reported this. llvm-svn: 353636
* [yaml2obj]Allow number for ELF symbol typeJames Henderson2019-02-061-0/+43
| | | | | | | | | | | | | yaml2obj previously only recognised standard STT_* names, and didn't allow arbitrary numbers. This change allows the user to specify a number for the type instead. It also adds a test to verify the existing behaviour for obj2yaml for unkown symbol types. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D57822 llvm-svn: 353315
* [ObjectYAML] [COFF] Support multiple symbols with the same nameMartin Storsjo2019-01-071-0/+74
| | | | | | Differential Revision: https://reviews.llvm.org/D56294 llvm-svn: 350566
* [yaml2obj/obj2yaml] - Support dumping/parsing ABI version.George Rimar2018-12-201-0/+16
| | | | | | | | | | | These tools were assuming ABI version is 0, that is not always true. Patch teaches them to work with that field. Differential revision: https://reviews.llvm.org/D55884 llvm-svn: 349737
* [obj2yaml] [COFF] Write RVA instead of VA for sections, fix roundtripping ↵Martin Storsjo2018-11-291-3/+8
| | | | | | | | | | executables yaml2obj writes the yaml value as is to the output file. Differential Revision: https://reviews.llvm.org/D54965 llvm-svn: 347916
* [yaml2obj] Treat COFF/ARM64 as a 64 bit architectureMartin Storsjo2018-11-271-0/+89
| | | | | | Differential Revision: https://reviews.llvm.org/D54935 llvm-svn: 347703
* [yaml2obj] - Allow to use numeric sh_link (Link) value for sections.George Rimar2018-08-161-0/+25
| | | | | | | That change allows using numeric values for Link field. It is consistent with the code for another fields in this method. llvm-svn: 339873
* [yaml2elf] - Use check-next in test.George Rimar2018-08-161-9/+9
| | | | | | Its a follow up for rL339870. llvm-svn: 339872
* [yaml2elf] - Simplify code, add a test. NFC.George Rimar2018-08-161-0/+25
| | | | | | | This simplifies the code allowing to set the sh_info for relocations sections. And adds a missing test. llvm-svn: 339870
* [yaml2obj] - Teach yaml2obj to produce SHT_GROUP section with a custom Info ↵George Rimar2018-08-151-0/+27
| | | | | | | | | | | | | field. This allows to set custom Info field value for SHT_GROUP sections. It is useful to allow this because we would be able to replace at least one binary object committed in LLD and replace it with the yaml2obj based test. Differential revision: https://reviews.llvm.org/D50776 llvm-svn: 339772
* [yaml2obj] - Teach tool to produce SHT_GROUP section with a custom type.George Rimar2018-08-151-0/+34
| | | | | | | | | | | | Currently, it is possible to use yaml2obj for producing SHT_GROUP sections of type GRP_COMDAT. For LLD test case I need to produce an object with a broken (different from GRP_COMDAT) type. The patch teaches tool to do such things. Differential revision: https://reviews.llvm.org/D50761 llvm-svn: 339764
* [yaml2obj] - Add a support for changing EntSize.George Rimar2018-08-071-0/+50
| | | | | | | | | | I was trying to add a test case for LLD and found that it is impossible to set sh_entsize via yaml. The patch implements the missing part. Differential revision: https://reviews.llvm.org/D50235 llvm-svn: 339113
* [yaml2obj] Add default sh_entsize for dynamic sectionsPaul Semel2018-07-231-0/+17
| | | | | | | | | | Dynamic section holds a table, so the sh_entsize might be set. As the dynamic section entry size never changes, we can default it to the size of a dynamic entry. Differential Revision: https://reviews.llvm.org/D49619 llvm-svn: 337725
* Add ELF dynamic symbol support to yaml2obj/obj2yamlDave Lee2017-11-161-0/+41
| | | | | | | | | | | | | | | | | | 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
* Allow empty mappings for optional YAML inputDave Lee2017-11-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change fixes a bug where `obj2yaml` can in some cases produce YAML that causes `yaml2obj` to error. The ELF YAML document structure has a `Sections` mapping, which contains three mappings, all of which are optional: `Local`, `Global`, and `Weak.` Any one of these can be missing, but if all three are missing, then `yaml2obj` errors. This change allows YAML input for cases like this one. I have tested this with check-llvm and check-lld, and all tests passed. This change is the result of test failures while working on D39582, which introduces a `DynamicSymbols` mapping, which will be empty at times. Reviewers: compnerd, jakehehrlich, silvas, kledzik, mehdi_amini, pcc Reviewed By: compnerd Subscribers: silvas, llvm-commits Differential Revision: https://reviews.llvm.org/D39908 llvm-svn: 318428
* Reapply: Allow yaml2obj to order implicit sections for ELFDave Lee2017-11-092-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change allows yaml input to control the order of implicitly added sections (`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a placeholder section of the given name to the Sections field. This change is to support changes in D39582, where it is desirable to control the location of the `.dynsym` section. This reapplied version fixes: 1. use of a function call within an assert 2. failing lld test which has an unnamed section 3. incorrect section count when given an unnamed section Additionally, one more test to cover the unnamed section failure. Reviewers: compnerd, jakehehrlich Reviewed By: jakehehrlich Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39749 llvm-svn: 317789
* Revert "Reapply: Allow yaml2obj to order implicit sections for ELF"Dave Lee2017-11-082-43/+0
| | | | | | This reverts commit r317646. llvm-svn: 317654
* Reapply: Allow yaml2obj to order implicit sections for ELFDave Lee2017-11-082-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change allows yaml input to control the order of implicitly added sections (`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a placeholder section of the given name to the Sections field. This change is to support changes in D39582, where it is desirable to control the location of the `.dynsym` section. This reapplied version fixes: 1. use of a function call within an assert 2. failing lld test which has an unnamed section Additionally, one more test to cover the unnamed section failure. Reviewers: compnerd, jakehehrlich Reviewed By: jakehehrlich Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39749 llvm-svn: 317646
* Revert "Allow yaml2obj to order implicit sections for ELF"Dave Lee2017-11-071-29/+0
| | | | | | | | Also, revert "Fix build bots after r317622" This reverts commit r317622, r317626. llvm-svn: 317630
OpenPOWER on IntegriCloud