irel = elf_section_data (sec)->relocs;
irelend = irel + sec->reloc_count;
+ if (irel == NULL && sec->reloc_count > 0)
+ {
+ /* If the relocs have not been kept in the section data
+ structure (because -no-keep-memory was used) then
+ reread them now. */
+ irel = (_bfd_elf_link_read_relocs
+ (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, FALSE));
+ if (irel == NULL)
+ /* FIXME: Return FALSE instead ? */
+ irelend = irel;
+ }
+
/* Actually delete the bytes. */
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
memset (contents + toaddr - count, 0x03, count);
/* Adjust all the relocs. */
- for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ for (; irel < irelend; irel++)
{
/* Get the new reloc address. */
if (irel->r_offset > addr
else
strcat (buf, ", GCC ABI");
+ if (flags & E_FLAG_RX_SINSNS_SET)
+ strcat (buf, flags & E_FLAG_RX_SINSNS_YES ? ", uses String instructions" : ", bans String instructions");
+
return buf;
}
{
flagword known_flags;
+ if (old_flags & E_FLAG_RX_SINSNS_SET)
+ {
+ if ((new_flags & E_FLAG_RX_SINSNS_SET) == 0)
+ {
+ new_flags &= ~ E_FLAG_RX_SINSNS_MASK;
+ new_flags |= (old_flags & E_FLAG_RX_SINSNS_MASK);
+ }
+ }
+ else if (new_flags & E_FLAG_RX_SINSNS_SET)
+ {
+ old_flags &= ~ E_FLAG_RX_SINSNS_MASK;
+ old_flags |= (new_flags & E_FLAG_RX_SINSNS_MASK);
+ }
+
known_flags = E_FLAG_RX_ABI | E_FLAG_RX_64BIT_DOUBLES
- | E_FLAG_RX_DSP | E_FLAG_RX_PID;
+ | E_FLAG_RX_DSP | E_FLAG_RX_PID | E_FLAG_RX_SINSNS_MASK;
if ((old_flags ^ new_flags) & known_flags)
{