summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-05-19 19:23:23 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-05-19 19:23:23 +0000
commit9eeeb68e88dc0c018475f97cb56c857d1749c347 (patch)
tree2f5eaa72be7b52c3ccb12358b6b14407a6bbf261
parentaab5a54ac9b5c0aacb14d52f782eb59f2f775d07 (diff)
downloadbinutils-redhat-9eeeb68e88dc0c018475f97cb56c857d1749c347.tar.gz
* 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.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-vax.c15
2 files changed, 13 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 60e3fb9515..766bd2dc79 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
+ * 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.
+
+2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
+
* elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
the third reloc offset is the same as the first.
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index d55cdc5ef6..735f2231f6 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)