* layout.cc (Layout::create_dynamic_symtab): Only set entsize of
	.gnu.hash table for a 32-bit target.
This commit is contained in:
Ian Lance Taylor 2009-12-30 07:45:32 +00:00
parent 8d6d383d7c
commit 1b81fb710f
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2009-12-29 Ian Lance Taylor <iant@google.com>
PR 10450
* layout.cc (Layout::create_dynamic_symtab): Only set entsize of
.gnu.hash table for a 32-bit target.
PR 10450
* symtab.h (Symbol::needs_dynsym_entry): A symbol in both a
regular and a dynamic object only needs a dynamic symbol table

View File

@ -2978,7 +2978,12 @@ Layout::create_dynamic_symtab(const Input_objects* input_objects,
hashsec->add_output_section_data(hashdata);
hashsec->set_link_section(dynsym);
hashsec->set_entsize(4);
// For a 64-bit target, the entries in .gnu.hash do not have a
// uniform size, so we only set the entry size for a 32-bit
// target.
if (parameters->target().get_size() == 32)
hashsec->set_entsize(4);
odyn->add_section_address(elfcpp::DT_GNU_HASH, hashsec);
}