[llvm] r241835 - [yaml2obj] Initialize sh_addralign field for the .symtab section

Simon Atanasyan simon at atanasyan.com
Thu Jul 9 11:23:02 PDT 2015


Author: atanasyan
Date: Thu Jul  9 13:23:02 2015
New Revision: 241835

URL: http://llvm.org/viewvc/llvm-project?rev=241835&view=rev
Log:
[yaml2obj] Initialize sh_addralign field for the .symtab section

Modified:
    llvm/trunk/test/Object/yaml2obj-elf-section-basic.yaml
    llvm/trunk/tools/yaml2obj/yaml2elf.cpp

Modified: llvm/trunk/test/Object/yaml2obj-elf-section-basic.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/yaml2obj-elf-section-basic.yaml?rev=241835&r1=241834&r2=241835&view=diff
==============================================================================
--- llvm/trunk/test/Object/yaml2obj-elf-section-basic.yaml (original)
+++ llvm/trunk/test/Object/yaml2obj-elf-section-basic.yaml Thu Jul  9 13:23:02 2015
@@ -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:        }

Modified: llvm/trunk/tools/yaml2obj/yaml2elf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2elf.cpp?rev=241835&r1=241834&r2=241835&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2elf.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2elf.cpp Thu Jul  9 13:23:02 2015
@@ -267,6 +267,7 @@ void ELFState<ELFT>::initSymtabSectionHe
   // 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;
   {





More information about the llvm-commits mailing list