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.
This commit is contained in:
Ian Lance Taylor 2011-06-29 21:39:19 +00:00
parent 886f533ada
commit 4d5e4e62e1
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2011-06-29 Ian Lance Taylor <iant@google.com>
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 <iant@google.com>
PR gold/12695

View File

@ -1132,7 +1132,8 @@ Layout::layout_eh_frame(Sized_relobj_file<size, big_endian>* 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";

View File

@ -511,7 +511,9 @@ bool
Sized_relobj_file<size, big_endian>::check_eh_frame_flags(
const elfcpp::Shdr<size, big_endian>* 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);
}