summaryrefslogtreecommitdiff
path: root/bfd/elf32-s390.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-02-05 00:00:23 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-02-05 00:00:23 +0000
commitb6d834eeb2ffb6cd1844ef8e201bc04d6ae8c797 (patch)
tree5c9c54694703da03d9c71541a91f7e62f046e380 /bfd/elf32-s390.c
parent6d3b2a94f021654a0cf12a8165e0e00659eb1704 (diff)
downloadbinutils-redhat-b6d834eeb2ffb6cd1844ef8e201bc04d6ae8c797.tar.gz
* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
against section syms in readonly sections. Don't do the global sym check if we find one. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. (elf_s390_grok_prstatus): Add missing prototype.
Diffstat (limited to 'bfd/elf32-s390.c')
-rw-r--r--bfd/elf32-s390.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 0e7792fb02..0a913ef81f 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -69,6 +69,7 @@ static enum elf_reloc_type_class elf_s390_reloc_type_class
static boolean elf_s390_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static boolean elf_s390_object_p PARAMS ((bfd *));
+static boolean elf_s390_grok_prstatus PARAMS ((bfd *, Elf_Internal_Note *));
#define USE_RELA 1 /* We want RELA relocations, not REL. */
@@ -1439,10 +1440,12 @@ elf_s390_size_dynamic_sections (output_bfd, info)
linker script /DISCARD/, so we'll be discarding
the relocs too. */
}
- else
+ else if (p->count != 0)
{
srela = elf_section_data (p->sec)->sreloc;
srela->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ if ((p->sec->output_section->flags & SEC_READONLY) != 0)
+ info->flags |= DF_TEXTREL;
}
}
}
@@ -1564,7 +1567,9 @@ elf_s390_size_dynamic_sections (output_bfd, info)
/* If any dynamic relocs apply to a read-only section,
then we need a DT_TEXTREL entry. */
- elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, (PTR) info);
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
+ (PTR) info);
if ((info->flags & DF_TEXTREL) != 0)
{