From 18508739ab4be4bafbda4c481fd6b2b9e3ae3e1a Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 30 Dec 2009 07:45:32 +0000 Subject: [PATCH] PR 10450 * layout.cc (Layout::create_dynamic_symtab): Only set entsize of .gnu.hash table for a 32-bit target. --- gold/ChangeLog | 4 ++++ gold/layout.cc | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 95160724c2..860eda9501 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,6 +1,10 @@ 2009-12-29 Ian Lance Taylor 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 entry if it is externally visible. diff --git a/gold/layout.cc b/gold/layout.cc index 82f18c4b27..5462532576 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -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); } -- 2.11.0