From ddd74d3cefc91effcba35b753ce9f40007c963c3 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Sat, 19 May 2012 19:23:24 +0000 Subject: [PATCH] * elf32-vax.c (elf_vax_relocate_section) : Use section flags rather than its name as the check for text sections. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-vax.c | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 60e3fb95157..766bd2dc79b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2012-05-19 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_relocate_section) + : Use section flags rather than + its name as the check for text sections. + 2012-05-19 Maciej W. Rozycki * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index d55cdc5ef63..735f2231f6e 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) -- 2.30.2