Copy the change made by christos to elf32-i386.c to other targets where

it's easy:

Add a warning that prints the symbol that has the text reloc.
This commit is contained in:
skrll 2009-11-06 10:59:17 +00:00
parent 4e042dc0d8
commit 80ea658d23
5 changed files with 20 additions and 0 deletions

View File

@ -9969,6 +9969,10 @@ elf32_arm_readonly_dynrelocs (struct elf_link_hash_entry * h, void * inf)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
if (info->warn_shared_textrel)
(*_bfd_error_handler)
(_("warning: dynamic relocation in readonly section `%s'"),
h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */

View File

@ -2220,6 +2220,10 @@ readonly_dynrelocs (struct elf_link_hash_entry *eh, void *inf)
{
struct bfd_link_info *info = inf;
if (info->warn_shared_textrel)
(*_bfd_error_handler)
(_("warning: dynamic relocation in readonly section `%s'"),
eh->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */

View File

@ -2911,6 +2911,10 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
if (info->warn_shared_textrel)
(*_bfd_error_handler)
(_("warning: dynamic relocation in readonly section `%s'"),
h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */

View File

@ -1926,6 +1926,10 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
if (info->warn_shared_textrel)
(*_bfd_error_handler)
(_("warning: dynamic relocation in readonly section `%s'"),
h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */

View File

@ -2132,6 +2132,10 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
if (info->warn_shared_textrel)
(*_bfd_error_handler)
(_("warning: dynamic relocation in readonly section `%s'"),
h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */