| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifdef HAVE_CONFIG_H |
| # include <config.h> |
| #endif |
| |
| #include <assert.h> |
| #include <elf.h> |
| #include <stddef.h> |
| |
| #define BACKEND x86_64_ |
| #include "libebl_CPU.h" |
| |
| |
| Elf_Type |
| x86_64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, |
| int *addsub __attribute__ ((unused))) |
| { |
| switch (type) |
| { |
| case R_X86_64_64: |
| return ELF_T_XWORD; |
| case R_X86_64_32: |
| return ELF_T_WORD; |
| case R_X86_64_32S: |
| return ELF_T_SWORD; |
| case R_X86_64_16: |
| return ELF_T_HALF; |
| case R_X86_64_8: |
| return ELF_T_BYTE; |
| default: |
| return ELF_T_NUM; |
| } |
| } |
| |
| |
| const char * |
| x86_64_section_type_name (int type, |
| char *buf __attribute__ ((unused)), |
| size_t len __attribute__ ((unused))) |
| { |
| if (type == SHT_X86_64_UNWIND) |
| return "X86_64_UNWIND"; |
| |
| return NULL; |
| } |