diff options
| author | Rui Ueyama <ruiu@google.com> | 2019-06-14 13:57:25 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2019-06-14 13:57:25 +0000 |
| commit | 9f4e21c69a1ca4ff735b53373d492851a2d1b7a3 (patch) | |
| tree | 166b2cb6eeaf983bc9cbe3b4bdf9da01c7a3dfa2 /llvm/tools/yaml2obj | |
| parent | c74910b842d319a8acc5ffd69d88eb8988bdf5da (diff) | |
| download | bcm5719-llvm-9f4e21c69a1ca4ff735b53373d492851a2d1b7a3.tar.gz bcm5719-llvm-9f4e21c69a1ca4ff735b53373d492851a2d1b7a3.zip | |
Revert r363377: [yaml2obj] - Allow setting custom section types for implicit 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
Diffstat (limited to 'llvm/tools/yaml2obj')
| -rw-r--r-- | llvm/tools/yaml2obj/yaml2elf.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/tools/yaml2obj/yaml2elf.cpp b/llvm/tools/yaml2obj/yaml2elf.cpp index 8e4ea786c85..098c3d6f6bf 100644 --- a/llvm/tools/yaml2obj/yaml2elf.cpp +++ b/llvm/tools/yaml2obj/yaml2elf.cpp @@ -403,11 +403,7 @@ void ELFState<ELFT>::initSymtabSectionHeader(Elf_Shdr &SHeader, zero(SHeader); SHeader.sh_name = DotShStrtab.getOffset(IsStatic ? ".symtab" : ".dynsym"); - - if (YAMLSec) - SHeader.sh_type = YAMLSec->Type; - else - SHeader.sh_type = IsStatic ? ELF::SHT_SYMTAB : ELF::SHT_DYNSYM; + SHeader.sh_type = IsStatic ? ELF::SHT_SYMTAB : ELF::SHT_DYNSYM; if (RawSec && !RawSec->Link.empty()) { // If the Link field is explicitly defined in the document, @@ -471,7 +467,7 @@ void ELFState<ELFT>::initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name, ELFYAML::Section *YAMLSec) { zero(SHeader); SHeader.sh_name = DotShStrtab.getOffset(Name); - SHeader.sh_type = YAMLSec ? YAMLSec->Type : ELF::SHT_STRTAB; + SHeader.sh_type = ELF::SHT_STRTAB; SHeader.sh_addralign = YAMLSec ? (uint64_t)YAMLSec->AddressAlign : 1; ELFYAML::RawContentSection *RawSec = |

