aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-vax.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-05-19 19:23:24 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-05-19 19:23:24 +0000
commitddd74d3cefc91effcba35b753ce9f40007c963c3 (patch)
tree175b43f3da5468adf68bf85a83c09d9df0240c89 /bfd/elf32-vax.c
parentb0189df0335494087465543e963d58eb30307569 (diff)
downloadgdb-ddd74d3cefc91effcba35b753ce9f40007c963c3.zip
gdb-ddd74d3cefc91effcba35b753ce9f40007c963c3.tar.gz
gdb-ddd74d3cefc91effcba35b753ce9f40007c963c3.tar.bz2
* elf32-vax.c (elf_vax_relocate_section)
<R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than its name as the check for text sections.
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r--bfd/elf32-vax.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index d55cdc5..735f223 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1691,14 +1691,13 @@ elf_vax_relocate_section (bfd *output_bfd,
}
}
- if (!strcmp (bfd_get_section_name (input_bfd, input_section),
- ".text") != 0 ||
- (info->shared
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_32
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT))
+ if ((input_section->flags & SEC_CODE) != 0
+ || (info->shared
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_32
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_COPY
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_JMP_SLOT
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_GLOB_DAT))
{
if (h != NULL)
(*_bfd_error_handler)