diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2009-06-16 02:16:54 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2009-06-16 02:16:54 +0000 |
commit | 9b90d8fd50a55656173fb1f61c0b3577ccc4dee1 (patch) | |
tree | 844152b0d387454e62ce7ff2002bf4be41c88ae8 /bfd | |
parent | 04981bc1fb2151ec0d6adf57793eea41779c2f34 (diff) | |
download | gdb-9b90d8fd50a55656173fb1f61c0b3577ccc4dee1.zip gdb-9b90d8fd50a55656173fb1f61c0b3577ccc4dee1.tar.gz gdb-9b90d8fd50a55656173fb1f61c0b3577ccc4dee1.tar.bz2 |
bfd/
* elf32-vax.c (elf_vax_reloc_type_class): New function.
(elf_backend_reloc_type_class): Define.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-vax.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 211e0a5..1bc2789 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org> + * elf32-vax.c (elf_vax_reloc_type_class): New function. + (elf_backend_reloc_type_class): Define. + +2009-06-16 Maciej W. Rozycki <macro@linux-mips.org> + * elf32-vax.c (elf_vax_relocate_section): For symbol references from an executable to a shared library treat R_VAX_PC32 relocations as R_VAX_PLT32 ones. diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index 80c5046..f0ab1ef 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -2075,6 +2075,22 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) 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 @@ -2097,6 +2113,7 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) 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 \ |