[LV] [PATCH] VAX/ELF: Provide correct relocation classes
Hello, Class annotation for VAX relocations is missing. Here's an obvious fix. Regression-tested successfully with the vax-linux target. 2009-06-04 Maciej W. Rozycki <macro@linux-mips.org> * elf32-vax.c (elf_vax_reloc_type_class): New function. (elf_backend_reloc_type_class): Define. OK to apply? Maciej binutils-2.19.1-vax-reloc-class.patch diff -up --recursive --new-file binutils-2.19.1.macro/bfd/elf32-vax.c binutils-2.19.1/bfd/elf32-vax.c --- binutils-2.19.1.macro/bfd/elf32-vax.c 2008-01-11 09:07:03.000000000 +0000 +++ binutils-2.19.1/bfd/elf32-vax.c 2009-05-05 05:35:06.000000000 +0000 @@ -2068,6 +2068,22 @@ elf_vax_finish_dynamic_sections (bfd *ou return TRUE; } +static enum elf_reloc_type_class +elf_vax_reloc_type_class (const Elf_Internal_Rela *rela) +{ + switch ((int) ELF32_R_TYPE (rela->r_info)) + { + case R_VAX_RELATIVE: + return reloc_class_relative; + case R_VAX_JMP_SLOT: + return reloc_class_plt; + case R_VAX_COPY: + return reloc_class_copy; + default: + return reloc_class_normal; + } +} + #define TARGET_LITTLE_SYM bfd_elf32_vax_vec #define TARGET_LITTLE_NAME "elf32-vax" #define ELF_MACHINE_CODE EM_VAX @@ -2090,6 +2106,7 @@ elf_vax_finish_dynamic_sections (bfd *ou elf_vax_finish_dynamic_symbol #define elf_backend_finish_dynamic_sections \ elf_vax_finish_dynamic_sections +#define elf_backend_reloc_type_class elf_vax_reloc_type_class #define elf_backend_gc_mark_hook elf_vax_gc_mark_hook #define elf_backend_gc_sweep_hook elf_vax_gc_sweep_hook #define bfd_elf32_bfd_merge_private_bfd_data \ _______________________________________________ Linux-Vax mailing list Linux-Vax@mail.pergamentum.com http://mail.pergamentum.com/mailman/listinfo/linux-vax
Teilnehmer (2)
-
Maciej W. Rozycki
-
Nick Clifton