Make '.shstrtab' section be explicitly aligned to 1

This commit is contained in:
Serge Lamikhov-Center 2015-09-26 15:01:56 +03:00
parent d50e955ca0
commit 69b6177bd6
2 changed files with 5 additions and 4 deletions

View File

@ -748,7 +748,7 @@ BOOST_AUTO_TEST_CASE( test_dummy_out_i386_32 )
sec = reader.sections[ ".shstrtab" ];
checkSection( sec, 1, ".shstrtab", SHT_STRTAB, 0,
0, 17, 0, 0, 0, 0 );
0, 17, 0, 0, 1, 0 );
sec =reader.sections[ ".note" ];
@ -810,7 +810,7 @@ BOOST_AUTO_TEST_CASE( test_dummy_out_ppc_32 )
sec =reader.sections[ ".shstrtab" ];
checkSection( sec, 1, ".shstrtab", SHT_STRTAB, 0,
0, 17, 0, 0, 0, 0 );
0, 17, 0, 0, 1, 0 );
}
@ -866,7 +866,7 @@ BOOST_AUTO_TEST_CASE( test_dummy_out_i386_64 )
sec =reader.sections[ ".shstrtab" ];
checkSection( sec, 1, ".shstrtab", SHT_STRTAB, 0,
0, 17, 0, 0, 0, 0 );
0, 17, 0, 0, 1, 0 );
}
@ -916,7 +916,7 @@ BOOST_AUTO_TEST_CASE( test_dummy_out_ppc_64 )
sec =reader.sections[ ".shstrtab" ];
checkSection( sec, 1, ".shstrtab", SHT_STRTAB, 0,
0, 17, 0, 0, 0, 0 );
0, 17, 0, 0, 1, 0 );
sec = reader.sections[ ".note" ];

View File

@ -345,6 +345,7 @@ class elfio
set_section_name_str_index( 1 );
section* shstrtab = sections.add( ".shstrtab" );
shstrtab->set_type( SHT_STRTAB );
shstrtab->set_addr_align( 1 );
}
//------------------------------------------------------------------------------