mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
(_bfd_elf_write_section_eh_frame): Do proper
extension when calculating difference of offsets.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2008-08-24 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Do proper
|
||||||
|
extension when calculating difference of offsets.
|
||||||
|
|
||||||
2008-08-24 Alan Modra <amodra@bigpond.net.au>
|
2008-08-24 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* configure.in: Update a number of obsolete autoconf macros.
|
* configure.in: Update a number of obsolete autoconf macros.
|
||||||
|
@ -1445,7 +1445,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
|
|||||||
|
|
||||||
val = read_value (abfd, buf, per_width,
|
val = read_value (abfd, buf, per_width,
|
||||||
get_DW_EH_PE_signed (per_encoding));
|
get_DW_EH_PE_signed (per_encoding));
|
||||||
val += ent->offset - ent->new_offset;
|
val += (bfd_vma) ent->offset - ent->new_offset;
|
||||||
val -= extra_string + extra_data;
|
val -= extra_string + extra_data;
|
||||||
write_value (abfd, buf, val, per_width);
|
write_value (abfd, buf, val, per_width);
|
||||||
action &= ~4;
|
action &= ~4;
|
||||||
@ -1504,7 +1504,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DW_EH_PE_pcrel:
|
case DW_EH_PE_pcrel:
|
||||||
value += ent->offset - ent->new_offset;
|
value += (bfd_vma) ent->offset - ent->new_offset;
|
||||||
address += (sec->output_section->vma
|
address += (sec->output_section->vma
|
||||||
+ sec->output_offset
|
+ sec->output_offset
|
||||||
+ ent->offset + 8);
|
+ ent->offset + 8);
|
||||||
@ -1538,7 +1538,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
|
|||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel)
|
if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel)
|
||||||
value += ent->offset - ent->new_offset;
|
value += (bfd_vma) ent->offset - ent->new_offset;
|
||||||
else if (cie->u.cie.make_lsda_relative)
|
else if (cie->u.cie.make_lsda_relative)
|
||||||
value -= (sec->output_section->vma
|
value -= (sec->output_section->vma
|
||||||
+ sec->output_offset
|
+ sec->output_offset
|
||||||
@ -1577,7 +1577,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((ent->fde_encoding & 0xf0) == DW_EH_PE_pcrel)
|
if ((ent->fde_encoding & 0xf0) == DW_EH_PE_pcrel)
|
||||||
value += ent->offset + 8 - new_offset;
|
value += (bfd_vma) ent->offset + 8 - new_offset;
|
||||||
if (ent->make_relative)
|
if (ent->make_relative)
|
||||||
value -= (sec->output_section->vma
|
value -= (sec->output_section->vma
|
||||||
+ sec->output_offset
|
+ sec->output_offset
|
||||||
|
Reference in New Issue
Block a user