From: Ian Lance Taylor Date: Wed, 29 Jun 2011 21:39:19 +0000 (+0000) Subject: PR gold/12675 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d5e4e62e11291ffec0c5039c9b396a07e9a2d39;p=binutils-gdb.git PR gold/12675 * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for SHT_X86_64_UNWIND. * layout.cc (Layout::layout_eh_frame): Likewise. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index bfb9a408764..342fc1981c4 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2011-06-29 Ian Lance Taylor + + PR gold/12675 + * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for + SHT_X86_64_UNWIND. + * layout.cc (Layout::layout_eh_frame): Likewise. + 2011-06-29 Ian Lance Taylor PR gold/12695 diff --git a/gold/layout.cc b/gold/layout.cc index a52d35c7b2d..3152622fb13 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -1132,7 +1132,8 @@ Layout::layout_eh_frame(Sized_relobj_file* object, unsigned int reloc_shndx, unsigned int reloc_type, off_t* off) { - gold_assert(shdr.get_sh_type() == elfcpp::SHT_PROGBITS); + gold_assert(shdr.get_sh_type() == elfcpp::SHT_PROGBITS + || shdr.get_sh_type() == elfcpp::SHT_X86_64_UNWIND); gold_assert((shdr.get_sh_flags() & elfcpp::SHF_ALLOC) != 0); const char* const name = ".eh_frame"; diff --git a/gold/object.cc b/gold/object.cc index 778f03be8e2..322f56edf2a 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -511,7 +511,9 @@ bool Sized_relobj_file::check_eh_frame_flags( const elfcpp::Shdr* shdr) const { - return (shdr->get_sh_type() == elfcpp::SHT_PROGBITS + elfcpp::Elf_Word sh_type = shdr->get_sh_type(); + return ((sh_type == elfcpp::SHT_PROGBITS + || sh_type == elfcpp::SHT_X86_64_UNWIND) && (shdr->get_sh_flags() & elfcpp::SHF_ALLOC) != 0); }