mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Revert "[Object, ELF] Fix segmentation fault in ELFFile::getSectionName()."
This reverts commit r239124. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -928,7 +928,7 @@ ErrorOr<StringRef> ELFFile<ELFT>::getSymbolName(const Elf_Shdr *Section,
|
||||
template <class ELFT>
|
||||
ErrorOr<StringRef>
|
||||
ELFFile<ELFT>::getSectionName(const Elf_Shdr *Section) const {
|
||||
if (!dot_shstrtab_sec || Section->sh_name >= dot_shstrtab_sec->sh_size)
|
||||
if (Section->sh_name >= dot_shstrtab_sec->sh_size)
|
||||
return object_error::parse_failed;
|
||||
return StringRef(getString(dot_shstrtab_sec, Section->sh_name));
|
||||
}
|
||||
|
Reference in New Issue
Block a user