mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
* elf32-xtensa.c (relax_section): Update DIFF relocations in the
same way as other relocations.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2007-12-21 Bob Wilson <bob.wilson@acm.org>
|
||||||
|
|
||||||
|
* elf32-xtensa.c (relax_section): Update DIFF relocations in the
|
||||||
|
same way as other relocations.
|
||||||
|
|
||||||
2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
|
2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* section.c (BFD_FAKE_SECTION): Update.
|
* section.c (BFD_FAKE_SECTION): Update.
|
||||||
|
@ -8240,30 +8240,28 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
|||||||
|
|
||||||
pin_contents (sec, contents);
|
pin_contents (sec, contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the relocation still references a section in the same
|
||||||
|
input file, modify the relocation directly instead of
|
||||||
|
adding a "fix" record. */
|
||||||
|
if (target_sec->owner == abfd)
|
||||||
|
{
|
||||||
|
unsigned r_symndx = ELF32_R_SYM (new_reloc.rela.r_info);
|
||||||
|
irel->r_info = ELF32_R_INFO (r_symndx, r_type);
|
||||||
|
irel->r_addend = new_reloc.rela.r_addend;
|
||||||
|
pin_internal_relocs (sec, internal_relocs);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* If the relocation still references a section in the same
|
bfd_vma addend_displacement;
|
||||||
input file, modify the relocation directly instead of
|
reloc_bfd_fix *fix;
|
||||||
adding a "fix" record. */
|
|
||||||
if (target_sec->owner == abfd)
|
|
||||||
{
|
|
||||||
unsigned r_symndx = ELF32_R_SYM (new_reloc.rela.r_info);
|
|
||||||
irel->r_info = ELF32_R_INFO (r_symndx, r_type);
|
|
||||||
irel->r_addend = new_reloc.rela.r_addend;
|
|
||||||
pin_internal_relocs (sec, internal_relocs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bfd_vma addend_displacement;
|
|
||||||
reloc_bfd_fix *fix;
|
|
||||||
|
|
||||||
addend_displacement =
|
addend_displacement =
|
||||||
new_reloc.target_offset + new_reloc.virtual_offset;
|
new_reloc.target_offset + new_reloc.virtual_offset;
|
||||||
fix = reloc_bfd_fix_init (sec, source_offset, r_type,
|
fix = reloc_bfd_fix_init (sec, source_offset, r_type,
|
||||||
target_sec,
|
target_sec,
|
||||||
addend_displacement, TRUE);
|
addend_displacement, TRUE);
|
||||||
add_fix (sec, fix);
|
add_fix (sec, fix);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user