summaryrefslogtreecommitdiff
path: root/bfd/elf-m10300.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-06-09 08:31:28 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-06-09 08:31:28 +0000
commitbe14dbc7935d65e14f093fafe9fb9ef3c73098bf (patch)
treed24154d81913e0b1be5470e52f7cc2e1a84dcef3 /bfd/elf-m10300.c
parent36b1c598cd88949244d91e0066fbbfca8f365583 (diff)
downloadgdb-be14dbc7935d65e14f093fafe9fb9ef3c73098bf.tar.gz
* elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
(elf_backend_reloc_type_class): New.
Diffstat (limited to 'bfd/elf-m10300.c')
-rw-r--r--bfd/elf-m10300.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index d61df463570..9f5ab836a61 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -4866,6 +4866,25 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Classify relocation types, such that combreloc can sort them
+ properly. */
+
+static enum elf_reloc_type_class
+_bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
+{
+ switch ((int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_MN10300_RELATIVE:
+ return reloc_class_relative;
+ case R_MN10300_JMP_SLOT:
+ return reloc_class_plt;
+ case R_MN10300_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
#ifndef ELF_ARCH
#define TARGET_LITTLE_SYM bfd_elf32_mn10300_vec
#define TARGET_LITTLE_NAME "elf32-mn10300"
@@ -4914,6 +4933,9 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
#define elf_backend_finish_dynamic_sections \
_bfd_mn10300_elf_finish_dynamic_sections
+#define elf_backend_reloc_type_class \
+ _bfd_mn10300_elf_reloc_type_class
+
#define elf_backend_want_got_plt 1
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0