summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2007-09-15 14:35:34 +0000
committerchristos <christos@NetBSD.org>2007-09-15 14:35:34 +0000
commit664366b805aba646d26454b8f4980dbfb0a409be (patch)
tree06b797354127170e32e4061a6413b5d8115c5d43 /gnu
parent994992627264769cc92c3226366290e15063781c (diff)
Add a warning that prints the symbol that has the text reloc.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/dist/binutils/bfd/elf32-i386.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/dist/binutils/bfd/elf32-i386.c b/gnu/dist/binutils/bfd/elf32-i386.c
index 66b94932774..b16c94684c8 100644
--- a/gnu/dist/binutils/bfd/elf32-i386.c
+++ b/gnu/dist/binutils/bfd/elf32-i386.c
@@ -1690,7 +1690,10 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (s != NULL && (s->flags & SEC_READONLY) != 0)
{
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. */