mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-09 23:32:21 +08:00
* cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
account the impact of relocation count overflow when computing section offsets. * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether or not to apply the PE COFF reloc overflow handling. Fix a fencepost error in deciding whether or not to use that technique.
This commit is contained in:
@ -757,6 +757,10 @@ _bfd_coff_final_link (abfd, info)
|
||||
o->flags |= SEC_RELOC;
|
||||
o->rel_filepos = rel_filepos;
|
||||
rel_filepos += o->reloc_count * relsz;
|
||||
/* In PE COFF, if there are at least 0xffff relocations an
|
||||
extra relocation will be written out to encode the count. */
|
||||
if (obj_pe (abfd) && o->reloc_count >= 0xffff)
|
||||
rel_filepos += relsz;
|
||||
}
|
||||
|
||||
if (bfd_coff_long_section_names (abfd)
|
||||
|
Reference in New Issue
Block a user