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:
parent
4e042dc0d8
commit
80ea658d23
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue