sparc: Dump dynamic relocation info to the map file

Dump dynamic relocation info to the map file when generating dynamic
relocation in read-only section relocations if -Map is used.

	* elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
	in read-only section with minfo.
	(_bfd_sparc_elf_size_dynamic_sections): Likewise.
This commit is contained in:
H.J. Lu
2017-10-07 17:30:12 -07:00
parent b05c287c18
commit f0f07ad182
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
in read-only section with minfo.
(_bfd_sparc_elf_size_dynamic_sections): Likewise.
2017-10-06 H.J. Lu <hongjiu.lu@intel.com> 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update

View File

@ -2632,6 +2632,9 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf)
info->flags |= DF_TEXTREL; info->flags |= DF_TEXTREL;
info->callbacks->minfo (_("%B: dynamic relocation in read-only section `%A'\n"),
p->sec->owner, p->sec);
/* Not an error, just cut short the traversal. */ /* Not an error, just cut short the traversal. */
return FALSE; return FALSE;
} }
@ -2727,7 +2730,13 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
srel = htab->elf.irelplt; srel = htab->elf.irelplt;
srel->size += p->count * SPARC_ELF_RELA_BYTES (htab); srel->size += p->count * SPARC_ELF_RELA_BYTES (htab);
if ((p->sec->output_section->flags & SEC_READONLY) != 0) if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL; {
info->flags |= DF_TEXTREL;
info->callbacks->minfo (_("%B: dynamic relocation in read-only section `%A'\n"),
p->sec->owner, p->sec);
}
/* Not an error, just cut short the traversal. */
} }
} }
} }