diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-02-05 00:00:23 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-02-05 00:00:23 +0000 |
commit | 0f278f29b925d45e715bbf329fef625323478b8e (patch) | |
tree | f1fd59c3046503f596fbb569590619c658f1bd1b /bfd/elf32-hppa.c | |
parent | fd33226ad08b21c538740447adb050b6ad2e6dc4 (diff) | |
download | gdb-0f278f29b925d45e715bbf329fef625323478b8e.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-hppa.c')
-rw-r--r-- | bfd/elf32-hppa.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 0acfb195280..41ec0ce60bd 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -2329,10 +2329,12 @@ elf32_hppa_size_dynamic_sections (output_bfd, info) linker script /DISCARD/, so we'll be discarding the relocs too. */ } - else + else if (p->count != 0) { srel = elf_section_data (p->sec)->sreloc; srel->_raw_size += p->count * sizeof (Elf32_External_Rela); + if ((p->sec->output_section->flags & SEC_READONLY) != 0) + info->flags |= DF_TEXTREL; } } } @@ -2505,7 +2507,9 @@ elf32_hppa_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) { |