summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-03-01 23:17:03 +0000
committerjdp <jdp@FreeBSD.org>1998-03-01 23:17:03 +0000
commitcad024a2bae99b96c92ef3d613710800dc4af3b7 (patch)
treec5f44421d9a8cb7242c8d778efb67c3bc9ac3fe6 /contrib/binutils
parentd26a0cda0384c0c770ff035ff812c969cc2d79e3 (diff)
downloadFreeBSD-src-cad024a2bae99b96c92ef3d613710800dc4af3b7.zip
FreeBSD-src-cad024a2bae99b96c92ef3d613710800dc4af3b7.tar.gz
Fix a bug which incorrectly caused files to be labeled as having
text relocations in certain situations.
Diffstat (limited to 'contrib/binutils')
-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