Combine read-only .eh_frame sections with read-write .eh_frame

sections.
This commit is contained in:
Ian Lance Taylor
2008-03-12 04:38:42 +00:00
parent e00eeb0a11
commit 1650c4ff50
5 changed files with 89 additions and 4 deletions

View File

@@ -226,7 +226,7 @@ Sized_relobj<size, big_endian>::check_eh_frame_flags(
{
return (shdr->get_sh_size() > 0
&& shdr->get_sh_type() == elfcpp::SHT_PROGBITS
&& shdr->get_sh_flags() == elfcpp::SHF_ALLOC);
&& (shdr->get_sh_flags() & elfcpp::SHF_ALLOC) != 0);
}
// Return whether there is a GNU .eh_frame section, given the section
@@ -275,8 +275,11 @@ Sized_relobj<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
const unsigned char* namesu = sd->section_names->data();
const char* names = reinterpret_cast<const char*>(namesu);
if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
this->has_eh_frame_ = true;
if (memmem(names, sd->section_names_size, ".eh_frame", 10) != NULL)
{
if (this->find_eh_frame(pshdrs, names, sd->section_names_size))
this->has_eh_frame_ = true;
}
sd->symbols = NULL;
sd->symbols_size = 0;