aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ia64-vms.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-02-22 17:37:26 +1030
committerAlan Modra <amodra@gmail.com>2023-02-23 12:58:53 +1030
commit3a574cce26ee7dca6d6cd4c756dec57a5c0b9c99 (patch)
tree918c2cb37101dfe0433283c5afc332df3b979008 /bfd/elf64-ia64-vms.c
parent81ff113f7852558610855261551410455886cb08 (diff)
downloadfsf-binutils-gdb-3a574cce26ee7dca6d6cd4c756dec57a5c0b9c99.zip
fsf-binutils-gdb-3a574cce26ee7dca6d6cd4c756dec57a5c0b9c99.tar.gz
fsf-binutils-gdb-3a574cce26ee7dca6d6cd4c756dec57a5c0b9c99.tar.bz2
Test SEC_HAS_CONTENTS in relax routines
More places that generally expect instructions, so not zeros. * coff-sh.c (sh_relax_section, sh_relax_delete_bytes): Exclude sections without SEC_HAS_CONTENTS set. * elf-m10200.c (mn10200_elf_relax_section): Likewise. * elf32-arc.c (arc_elf_relax_section): Likewise. * elf32-avr.c (elf32_avr_relax_section): Likewise. * elf32-cr16.c (elf32_cr16_relax_section): Likewise. * elf32-crx.c (elf32_crx_relax_section): Likewise. * elf32-epiphany.c (epiphany_elf_relax_section): Likewise. * elf32-ft32.c (ft32_elf_relax_section): Likewise. * elf32-h8300.c (elf32_h8_relax_section): Likewise. * elf32-ip2k.c (ip2k_elf_relax_section): Likewise. * elf32-m32c.c (m32c_elf_relax_section): Likewise. * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise. * elf32-msp430.c (msp430_elf_relax_section): Likewise. * elf32-pru.c (pru_elf32_relax_section): Likewise. * elf32-rl78.c (rl78_elf_relax_section): Likewise. * elf32-rx.c (elf32_rx_relax_section): Likewise. * elf32-sh.c (sh_elf_relax_section): Likewise. (sh_elf_relax_delete_bytes): Likewise. * elf32-v850.c (v850_elf_relax_section): Likewise. * elf64-alpha.c (elf64_alpha_relax_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise. * elfnn-riscv.c (_bfd_riscv_relax_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relax_section): Likewise.
Diffstat (limited to 'bfd/elf64-ia64-vms.c')
-rw-r--r--bfd/elf64-ia64-vms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 9fb1a93..1866a57 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -370,8 +370,9 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec,
/* Nothing to do if there are no relocations or there is no need for
the current pass. */
- if ((sec->flags & SEC_RELOC) == 0
- || sec->reloc_count == 0
+ if (sec->reloc_count == 0
+ || (sec->flags & SEC_RELOC) == 0
+ || (sec->flags & SEC_HAS_CONTENTS) == 0
|| (link_info->relax_pass == 0 && sec->skip_relax_pass_0)
|| (link_info->relax_pass == 1 && sec->skip_relax_pass_1))
return true;