mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
Before include system specific ELF header define
START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. For now used for ppc, mips, and mn10300.
This commit is contained in:
@ -1,7 +1,13 @@
|
|||||||
|
1998-07-22 13:51 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* readelf.c: Before include system specific ELF header define
|
||||||
|
START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. For now
|
||||||
|
used for ppc, mips, and mn10300.
|
||||||
|
|
||||||
Wed Jul 22 10:26:32 1998 Nick Clifton <nickc@cygnus.com>
|
Wed Jul 22 10:26:32 1998 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* readelf.c (dump_relocations): Display number of unrecognised
|
* readelf.c (dump_relocations): Display number of unrecognised
|
||||||
relocations.
|
relocations.
|
||||||
|
|
||||||
1998-07-21 13:13 Ulrich Drepper <drepper@cygnus.com>
|
1998-07-21 13:13 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
@ -38,10 +38,7 @@
|
|||||||
#include "elf/i386.h"
|
#include "elf/i386.h"
|
||||||
#include "elf/m32r.h"
|
#include "elf/m32r.h"
|
||||||
#include "elf/m68k.h"
|
#include "elf/m68k.h"
|
||||||
#include "elf/mips.h"
|
|
||||||
#include "elf/mn10200.h"
|
#include "elf/mn10200.h"
|
||||||
#include "elf/mn10300.h"
|
|
||||||
#include "elf/ppc.h"
|
|
||||||
#include "elf/sh.h"
|
#include "elf/sh.h"
|
||||||
#include "elf/sparc.h"
|
#include "elf/sparc.h"
|
||||||
#include "elf/v850.h"
|
#include "elf/v850.h"
|
||||||
@ -543,22 +540,24 @@ get_sh_rel_type (rtype)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
/* Define the function to get MN10300 relocations. */
|
||||||
get_mn10300_rel_type (rtype)
|
#define START_RELOC_NUMBERS(name) static const char * \
|
||||||
unsigned long rtype;
|
get_mn10300_rel_type (rtype) \
|
||||||
{
|
unsigned long rtype; \
|
||||||
switch (rtype)
|
{ \
|
||||||
{
|
switch (rtype) {
|
||||||
case R_MN10300_NONE: return "R_MN10300_NONE";
|
#ifdef __STDC__
|
||||||
case R_MN10300_32: return "R_MN10300_32";
|
# define RELOC_NUMBER(name, number) case number: return #name;
|
||||||
case R_MN10300_16: return "R_MN10300_16";
|
#else
|
||||||
case R_MN10300_8: return "R_MN10300_8";
|
# define RELOC_NUMBER(name, number) case number: return "name";
|
||||||
case R_MN10300_PCREL32: return "R_MN10300_PCREL32";
|
#endif
|
||||||
case R_MN10300_PCREL16: return "R_MN10300_PCREL16";
|
#define END_RELOC_NUMBERS default: return NULL; \
|
||||||
case R_MN10300_PCREL8: return "R_MN10300_PCREL8";
|
} \
|
||||||
default: return NULL;
|
}
|
||||||
}
|
#include "elf/mn10300.h"
|
||||||
}
|
#undef START_RELOC_NUMBERS
|
||||||
|
#undef RELOC_NUMBER
|
||||||
|
#undef END_RELOC_NUMBERS
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
@ -580,93 +579,44 @@ get_mn10200_rel_type (rtype)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
/* Define the function to get PPC relocations. */
|
||||||
get_ppc_rel_type (rtype)
|
#define START_RELOC_NUMBERS(name) static const char * \
|
||||||
unsigned long rtype;
|
get_ppc_rel_type (rtype) \
|
||||||
{
|
unsigned long rtype; \
|
||||||
switch (rtype)
|
{ \
|
||||||
{
|
switch (rtype) {
|
||||||
case R_PPC_NONE: return "R_PPC_NONE";
|
#ifdef __STDC__
|
||||||
case R_PPC_ADDR32: return "R_PPC_ADDR32";
|
# define RELOC_NUMBER(name, number) case number: return #name;
|
||||||
case R_PPC_ADDR24: return "R_PPC_ADDR24";
|
#else
|
||||||
case R_PPC_ADDR16: return "R_PPC_ADDR16";
|
# define RELOC_NUMBER(name, number) case number: return "name";
|
||||||
case R_PPC_ADDR16_LO: return "R_PPC_ADDR16_LO";
|
#endif
|
||||||
case R_PPC_ADDR16_HI: return "R_PPC_ADDR16_HI";
|
#define END_RELOC_NUMBERS default: return NULL; \
|
||||||
case R_PPC_ADDR16_HA: return "R_PPC_ADDR16_HA";
|
} \
|
||||||
case R_PPC_ADDR14: return "R_PPC_ADDR14";
|
}
|
||||||
case R_PPC_ADDR14_BRTAKEN: return "R_PPC_ADDR14_BRTAKEN";
|
#include "elf/ppc.h"
|
||||||
case R_PPC_ADDR14_BRNTAKEN: return "R_PPC_ADDR14_BRNTAKEN";
|
#undef START_RELOC_NUMBERS
|
||||||
case R_PPC_REL24: return "R_PPC_REL24";
|
#undef RELOC_NUMBER
|
||||||
case R_PPC_REL14: return "R_PPC_REL14";
|
#undef END_RELOC_NUMBERS
|
||||||
case R_PPC_REL14_BRTAKEN: return "R_PPC_REL14_BRTAKEN";
|
|
||||||
case R_PPC_REL14_BRNTAKEN: return "R_PPC_REL14_BRNTAKEN";
|
|
||||||
case R_PPC_GOT16: return "R_PPC_GOT16";
|
|
||||||
case R_PPC_GOT16_LO: return "R_PPC_GOT16_LO";
|
|
||||||
case R_PPC_GOT16_HI: return "R_PPC_GOT16_HI";
|
|
||||||
case R_PPC_GOT16_HA: return "R_PPC_GOT16_HA";
|
|
||||||
case R_PPC_PLTREL24: return "R_PPC_PLTREL24";
|
|
||||||
case R_PPC_COPY: return "R_PPC_COPY";
|
|
||||||
case R_PPC_GLOB_DAT: return "R_PPC_GLOB_DAT";
|
|
||||||
case R_PPC_JMP_SLOT: return "R_PPC_JMP_SLOT";
|
|
||||||
case R_PPC_RELATIVE: return "R_PPC_RELATIVE";
|
|
||||||
case R_PPC_LOCAL24PC: return "R_PPC_LOCAL24PC";
|
|
||||||
case R_PPC_UADDR32: return "R_PPC_UADDR32";
|
|
||||||
case R_PPC_UADDR16: return "R_PPC_UADDR16";
|
|
||||||
case R_PPC_REL32: return "R_PPC_REL32";
|
|
||||||
case R_PPC_PLT32: return "R_PPC_PLT32";
|
|
||||||
case R_PPC_PLTREL32: return "R_PPC_PLTREL32";
|
|
||||||
case R_PPC_PLT16_LO: return "R_PPC_PLT16_LO";
|
|
||||||
case R_PPC_PLT16_HI: return "R_PPC_PLT16_HI";
|
|
||||||
case R_PPC_PLT16_HA: return "R_PPC_PLT16_HA";
|
|
||||||
case R_PPC_SDAREL16: return "R_PPC_SDAREL16";
|
|
||||||
case R_PPC_SECTOFF: return "R_PPC_SECTOFF";
|
|
||||||
case R_PPC_SECTOFF_LO: return "R_PPC_SECTOFF_LO";
|
|
||||||
case R_PPC_SECTOFF_HI: return "R_PPC_SECTOFF_HI";
|
|
||||||
case R_PPC_SECTOFF_HA: return "R_PPC_SECTOFF_HA";
|
|
||||||
case R_PPC_EMB_NADDR32: return "R_PPC_EMB_NADDR32";
|
|
||||||
case R_PPC_EMB_NADDR16: return "R_PPC_EMB_NADDR16";
|
|
||||||
case R_PPC_EMB_NADDR16_LO: return "R_PPC_EMB_NADDR16_LO";
|
|
||||||
case R_PPC_EMB_NADDR16_HI: return "R_PPC_EMB_NADDR16_HI";
|
|
||||||
case R_PPC_EMB_NADDR16_HA: return "R_PPC_EMB_NADDR16_HA";
|
|
||||||
case R_PPC_EMB_SDAI16: return "R_PPC_EMB_SDAI16";
|
|
||||||
case R_PPC_EMB_SDA2I16: return "R_PPC_EMB_SDA2I16";
|
|
||||||
case R_PPC_EMB_SDA2REL: return "R_PPC_EMB_SDA2REL";
|
|
||||||
case R_PPC_EMB_SDA21: return "R_PPC_EMB_SDA21";
|
|
||||||
case R_PPC_EMB_MRKREF: return "R_PPC_EMB_MRKREF";
|
|
||||||
case R_PPC_EMB_RELSEC16: return "R_PPC_EMB_RELSEC16";
|
|
||||||
case R_PPC_EMB_RELST_LO: return "R_PPC_EMB_RELST_LO";
|
|
||||||
case R_PPC_EMB_RELST_HI: return "R_PPC_EMB_RELST_HI";
|
|
||||||
case R_PPC_EMB_RELST_HA: return "R_PPC_EMB_RELST_HA";
|
|
||||||
case R_PPC_EMB_BIT_FLD: return "R_PPC_EMB_BIT_FLD";
|
|
||||||
case R_PPC_EMB_RELSDA: return "R_PPC_EMB_RELSDA";
|
|
||||||
case R_PPC_TOC16: return "R_PPC_TOC16";
|
|
||||||
default: return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
/* Define the function to get MIPS relocations. */
|
||||||
get_mips_rel_type (rtype)
|
#define START_RELOC_NUMBERS(name) static const char * \
|
||||||
unsigned long rtype;
|
get_mips_rel_type (rtype) \
|
||||||
{
|
unsigned long rtype; \
|
||||||
switch (rtype)
|
{ \
|
||||||
{
|
switch (rtype) {
|
||||||
case R_MIPS_NONE: return "R_MIPS_NONE";
|
#ifdef __STDC__
|
||||||
case R_MIPS_16: return "R_MIPS_16";
|
# define RELOC_NUMBER(name, number) case number: return #name;
|
||||||
case R_MIPS_32: return "R_MIPS_32";
|
#else
|
||||||
case R_MIPS_REL32: return "R_MIPS_REL32";
|
# define RELOC_NUMBER(name, number) case number: return "name";
|
||||||
case R_MIPS_26: return "R_MIPS_26";
|
#endif
|
||||||
case R_MIPS_HI16: return "R_MIPS_HI16";
|
#define END_RELOC_NUMBERS default: return NULL; \
|
||||||
case R_MIPS_LO16: return "R_MIPS_LO16";
|
} \
|
||||||
case R_MIPS_GPREL16: return "R_MIPS_GPREL16";
|
}
|
||||||
case R_MIPS_LITERAL: return "R_MIPS_LITERAL";
|
#include "elf/mips.h"
|
||||||
case R_MIPS_GOT16: return "R_MIPS_GOT16";
|
#undef START_RELOC_NUMBERS
|
||||||
case R_MIPS_PC16: return "R_MIPS_PC16";
|
#undef RELOC_NUMBER
|
||||||
case R_MIPS_CALL16: return "R_MIPS_CALL16";
|
#undef END_RELOC_NUMBERS
|
||||||
case R_MIPS_GPREL32: return "R_MIPS_GPREL32";
|
|
||||||
default: return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
Reference in New Issue
Block a user