diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-08 17:17:29 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-08 17:17:29 -0700 |
commit | a72f95f7760bf85693af393c5e01dd3aedbe5bde (patch) | |
tree | a83ac99664648ffbc404e482d625231fb7a5a4c7 /bfd/elf32-sh.c | |
parent | f9799aae8e51948c1d87fbe7249b3d76dcb4585d (diff) | |
download | gdb-a72f95f7760bf85693af393c5e01dd3aedbe5bde.zip gdb-a72f95f7760bf85693af393c5e01dd3aedbe5bde.tar.gz gdb-a72f95f7760bf85693af393c5e01dd3aedbe5bde.tar.bz2 |
sh: 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.
* elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
in read-only section with minfo.
(sh_elf_size_dynamic_sections): Likewise.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 8f91579..9967587 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -3300,6 +3300,9 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf) 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. */ return FALSE; } @@ -3399,7 +3402,11 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, srel = elf_section_data (p->sec)->sreloc; srel->size += p->count * sizeof (Elf32_External_Rela); 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); + } /* If we need relocations, we do not need fixups. */ if (htab->fdpic_p && !bfd_link_pic (info)) |