* elf32-vax.c (elf_vax_relocate_section)
authorMaciej W. Rozycki <macro@linux-mips.org>
Sat, 19 May 2012 19:23:24 +0000 (19:23 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Sat, 19 May 2012 19:23:24 +0000 (19:23 +0000)
<R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
its name as the check for text sections.

bfd/ChangeLog
bfd/elf32-vax.c

index 60e3fb95157f0fe50bdcc9ad3908978a23ff31f0..766bd2dc79bd4c5cbca1b6c33497155d753ff298 100644 (file)
@@ -1,3 +1,9 @@
+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
index d55cdc5ef630148716ef807d3e63387da0acf980..735f2231f6e3f1d5e0ed34fa9e6ce4280c53eada 100644 (file)
@@ -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)
This page took 0.028591 seconds and 4 git commands to generate.