[yaml2obj] Initialize sh_addralign field for the .symtab section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Atanasyan 2015-07-09 18:23:02 +00:00
parent 085d10b151
commit ba8d948e93
2 changed files with 4 additions and 0 deletions

View File

@ -65,12 +65,15 @@ Sections:
# CHECK: Section {
# CHECK: Name: .symtab (25)
# CHECK: Type: SHT_SYMTAB (0x2)
# CHECK: AddressAlignment: 8
# CHECK: }
# CHECK: Section {
# CHECK: Name: .strtab (17)
# CHECK: Type: SHT_STRTAB (0x3)
# CHECK: AddressAlignment: 1
# CHECK: }
# CHECK: Section {
# CHECK: Name: .shstrtab (7)
# CHECK: Type: SHT_STRTAB (0x3)
# CHECK: AddressAlignment: 1
# CHECK: }

View File

@ -267,6 +267,7 @@ void ELFState<ELFT>::initSymtabSectionHeader(Elf_Shdr &SHeader,
// One greater than symbol table index of the last local symbol.
SHeader.sh_info = Doc.Symbols.Local.size() + 1;
SHeader.sh_entsize = sizeof(Elf_Sym);
SHeader.sh_addralign = 8;
std::vector<Elf_Sym> Syms;
{