forked from OSchip/llvm-project
Fix bits check in ELFObjectFile::isSectionZeroInit().
Fixes PR14723. Patch by Sami Liedes! llvm-svn: 171309
This commit is contained in:
parent
4b47f82ac2
commit
c8288c103d
|
@ -1306,10 +1306,7 @@ error_code ELFObjectFile<target_endianness, is64Bits>
|
|||
const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
|
||||
// For ELF, all zero-init sections are virtual (that is, they occupy no space
|
||||
// in the object image) and vice versa.
|
||||
if (sec->sh_flags & ELF::SHT_NOBITS)
|
||||
Result = true;
|
||||
else
|
||||
Result = false;
|
||||
Result = sec->sh_type == ELF::SHT_NOBITS;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ ELF: .tdata {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} d
|
|||
ELF: .dynamic {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} required
|
||||
ELF: .got.plt {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} data,required
|
||||
ELF: .data {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} data,required
|
||||
ELF: .bss {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} {{[a-z,]*}}
|
||||
ELF: .bss {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} bss,required,virtual,zeroinit
|
||||
ELF: .shstrtab {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} rodata
|
||||
ELF: .symtab {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} rodata
|
||||
ELF: .strtab {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} rodata
|
||||
|
|
Loading…
Reference in New Issue