tile: Dump dynamic relocation info to the map file
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Oct 2017 13:01:18 +0000 (06:01 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Oct 2017 13:01:30 +0000 (06:01 -0700)
Dump dynamic relocation info to the map file when generating dynamic
relocation in read-only section relocations if -Map is used.

* elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
in read-only section with minfo.
(tilepro_elf_size_dynamic_sections): Likewise.
* elfxx-tilegx.c (readonly_dynrelocs): Likewise.
(tilegx_elf_size_dynamic_sections): Likewise.

bfd/ChangeLog
bfd/elf32-tilepro.c
bfd/elfxx-tilegx.c

index 4e52880b880e63cf2ea4bbcd4a3fbcf7a1bc2057..84fad70830675a96077ed7a387ce3ce8a0594471 100644 (file)
@@ -1,3 +1,11 @@
+2017-10-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
+       in read-only section with minfo.
+       (tilepro_elf_size_dynamic_sections): Likewise.
+       * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
+       (tilegx_elf_size_dynamic_sections): Likewise.
+
 2017-10-05  Pedro Alves  <palves@redhat.com>
 
        PR 22245
index 13b9bb149972fd14f73f86323200e422e4483565..75a7de5f6e65b12f1f822b27b8058c50ff96cb5f 100644 (file)
@@ -2407,6 +2407,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;
        }
@@ -2496,7 +2499,12 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd,
                  srel = elf_section_data (p->sec)->sreloc;
                  srel->size += p->count * TILEPRO_ELF_RELA_BYTES;
                  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);
+                   }
                }
            }
        }
index 390d0899caf798610e293af462fac3ab896e38d0..a413fb6a9d613e72dc3e512543ba3c8c3c7927a8 100644 (file)
@@ -2674,6 +2674,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;
        }
@@ -2757,7 +2760,12 @@ tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
                  srel = elf_section_data (p->sec)->sreloc;
                  srel->size += p->count * TILEGX_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);
+                   }
                }
            }
        }
This page took 0.031195 seconds and 4 git commands to generate.