Fix a bug which incorrectly caused files to be labeled as having

text relocations in certain situations.
This commit is contained in:
John Polstra 1998-03-01 23:17:03 +00:00
parent 4f24af7764
commit ff0c247c3c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33970

View File

@ -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;
}