Don't allow a symbol + offset in a merge section to translated to a
.section + offset reference if offset is negative.
This commit is contained in:
parent
a4ce70f1ad
commit
e34524fa00
|
@ -822,10 +822,11 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
/* Never adjust a reloc against local symbol in a merge section with
|
||||
a non-zero addend if the addend would place the relocation otside
|
||||
the section's limits. */
|
||||
a non-negative addend or if the addend would place the relocation
|
||||
outside the section's limits. */
|
||||
if ((symsec->flags & SEC_MERGE) != 0
|
||||
&& (S_GET_VALUE(sym) + fixp->fx_offset >= bfd_get_section_size(symsec)
|
||||
&& (S_GET_VALUE(sym) + fixp->fx_offset < S_GET_VALUE(sym)
|
||||
|| S_GET_VALUE(sym) + fixp->fx_offset >= bfd_get_section_size(symsec)
|
||||
|| fixp->fx_subsy != NULL))
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue