diff options
Diffstat (limited to 'elfutils/libebl/x86_64_symbol.c')
-rw-r--r-- | elfutils/libebl/x86_64_symbol.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/elfutils/libebl/x86_64_symbol.c b/elfutils/libebl/x86_64_symbol.c index b0f53ea9..b8c13b1e 100644 --- a/elfutils/libebl/x86_64_symbol.c +++ b/elfutils/libebl/x86_64_symbol.c @@ -1,5 +1,5 @@ /* x86_64 specific symbolic name handling. - Copyright (C) 2002 Red Hat, Inc. + Copyright (C) 2002, 2005 Red Hat, Inc. Written by Ulrich Drepper <drepper@redhat.com>, 2002. This program is Open Source software; you can redistribute it and/or @@ -39,7 +39,7 @@ static struct } reloc_map_table[] = { [R_X86_64_NONE] = { "R_X86_64_NONE", both }, - [R_X86_64_64] = { "R_X86_64_64", rel }, + [R_X86_64_64] = { "R_X86_64_64", both }, [R_X86_64_PC32] = { "R_X86_64_PC32", rel }, [R_X86_64_GOT32] = { "R_X86_64_GOT32", rel }, [R_X86_64_PLT32] = { "R_X86_64_PLT32", rel }, @@ -48,7 +48,7 @@ static struct [R_X86_64_JUMP_SLOT] = { "R_X86_64_JUMP_SLOT", exec }, [R_X86_64_RELATIVE] = { "R_X86_64_RELATIVE", exec }, [R_X86_64_GOTPCREL] = { "R_X86_64_GOTPCREL", exec }, - [R_X86_64_32] = { "R_X86_64_32", rel }, + [R_X86_64_32] = { "R_X86_64_32", both }, [R_X86_64_32S] = { "R_X86_64_32S", rel }, [R_X86_64_16] = { "R_X86_64_16", rel }, [R_X86_64_PC16] = { "R_X86_64_PC16", rel }, @@ -67,7 +67,8 @@ static struct /* Determine relocation type string for x86-64. */ const char * -x86_64_reloc_type_name (int type, char *buf, size_t len) +x86_64_reloc_type_name (int type, char *buf __attribute__ ((unused)), + size_t len __attribute__ ((unused))) { if (type < 0 || type >= R_X86_64_NUM) return NULL; @@ -105,3 +106,24 @@ x86_64_reloc_valid_use (Elf *elf, int type) assert (reloc_map_table[type].appear == both); return true; } + +/* Check for the simple reloc types. */ +Elf_Type +x86_64_reloc_simple_type (Elf *elf __attribute__ ((unused)), int type) +{ + 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; + } +} |