summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/elf32-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/bfd/elf32-i386.c')
-rw-r--r--contrib/binutils/bfd/elf32-i386.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c
index 1ae5acb..77fbba3 100644
--- a/contrib/binutils/bfd/elf32-i386.c
+++ b/contrib/binutils/bfd/elf32-i386.c
@@ -960,14 +960,16 @@ elf_i386_size_dynamic_sections (output_bfd, info)
relocs = true;
/* If this relocation section applies to a read only
- section, then we probably need a DT_TEXTREL
- entry. The entries in the .rel.plt section
- really apply to the .got section, which we
- created ourselves and so know is not readonly. */
+ section which is in memory at run time, then
+ we probably need a DT_TEXTREL entry. The entries
+ in the .rel.plt section really apply to the
+ .got section, which we created ourselves and so
+ know is not readonly. */
outname = bfd_get_section_name (output_bfd,
s->output_section);
target = bfd_get_section_by_name (output_bfd, outname + 4);
if (target != NULL
+ && (target->flags & SEC_ALLOC) != 0
&& (target->flags & SEC_READONLY) != 0)
reltext = true;
}
OpenPOWER on IntegriCloud