sparc: Dump dynamic relocation info to the map file
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 8 Oct 2017 00:30:12 +0000 (17:30 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 8 Oct 2017 00:30:54 +0000 (17:30 -0700)
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.

bfd/ChangeLog
bfd/elfxx-sparc.c

index 79d980d91b13dadaa45e6762831792edc751c966..b68f350372ffa82ea07c0aa0e66818ced884825b 100644 (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>
 
        * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
index ef6e50c63fbbbb043f220447c3363225e8627816..0f2b7ad53eefd0a5a50fa1c5ce05a288e1a17b70 100644 (file)
@@ -2632,6 +2632,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;
        }
@@ -2727,7 +2730,13 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
                    srel = htab->elf.irelplt;
                  srel->size += p->count * SPARC_ELF_RELA_BYTES (htab);
                  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.  */
                }
            }
        }
This page took 0.045151 seconds and 4 git commands to generate.