mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
CIE at .eh_frame start is removed due to no FDEs referencing it.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2002-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
|
||||||
|
CIE at .eh_frame start is removed due to no FDEs referencing it.
|
||||||
|
|
||||||
2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
|
2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
|
||||||
|
|
||||||
* config.bfd (x86_64-*-netbsd*): New target.
|
* config.bfd (x86_64-*-netbsd*): New target.
|
||||||
|
@ -918,6 +918,13 @@ _bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
|
|||||||
if (sec_info->entry[i].removed)
|
if (sec_info->entry[i].removed)
|
||||||
{
|
{
|
||||||
if (sec_info->entry[i].cie)
|
if (sec_info->entry[i].cie)
|
||||||
|
{
|
||||||
|
/* If CIE is removed due to no remaining FDEs referencing it
|
||||||
|
and there were no CIEs kept before it, sec_info->entry[i].sec
|
||||||
|
will be zero. */
|
||||||
|
if (sec_info->entry[i].sec == NULL)
|
||||||
|
cie_offset = 0;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cie_offset = sec_info->entry[i].new_offset;
|
cie_offset = sec_info->entry[i].new_offset;
|
||||||
cie_offset += (sec_info->entry[i].sec->output_section->vma
|
cie_offset += (sec_info->entry[i].sec->output_section->vma
|
||||||
@ -925,8 +932,10 @@ _bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
|
|||||||
- sec->output_section->vma
|
- sec->output_section->vma
|
||||||
- sec->output_offset);
|
- sec->output_offset);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec_info->entry[i].cie)
|
if (sec_info->entry[i].cie)
|
||||||
{
|
{
|
||||||
/* CIE */
|
/* CIE */
|
||||||
|
Reference in New Issue
Block a user