Line 1... |
Line 1... |
/* PPC ELF support for BFD.
|
/* PPC ELF support for BFD.
|
Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005
|
Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2008,
|
Free Software Foundation, Inc.
|
2009 Free Software Foundation, Inc.
|
|
|
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
|
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
|
in the System V Application Binary Interface, PowerPC Processor Supplement
|
in the System V Application Binary Interface, PowerPC Processor Supplement
|
and the PowerPC Embedded Application Binary Interface (eabi).
|
and the PowerPC Embedded Application Binary Interface (eabi).
|
|
|
Line 69... |
Line 69... |
RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
|
RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
|
RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
|
RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
|
RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
|
RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
|
RELOC_NUMBER (R_PPC_ADDR30, 37)
|
RELOC_NUMBER (R_PPC_ADDR30, 37)
|
|
|
|
#ifndef RELOC_MACROS_GEN_FUNC
|
|
/* Fake relocations for branch stubs, only used internally by ld. */
|
|
RELOC_NUMBER (R_PPC_RELAX, 48)
|
|
RELOC_NUMBER (R_PPC_RELAX_PLT, 49)
|
|
RELOC_NUMBER (R_PPC_RELAX_PLTREL24, 50)
|
|
#endif
|
|
|
/* Relocs added to support TLS. */
|
/* Relocs added to support TLS. */
|
RELOC_NUMBER (R_PPC_TLS, 67)
|
RELOC_NUMBER (R_PPC_TLS, 67)
|
RELOC_NUMBER (R_PPC_DTPMOD32, 68)
|
RELOC_NUMBER (R_PPC_DTPMOD32, 68)
|
RELOC_NUMBER (R_PPC_TPREL16, 69)
|
RELOC_NUMBER (R_PPC_TPREL16, 69)
|
RELOC_NUMBER (R_PPC_TPREL16_LO, 70)
|
RELOC_NUMBER (R_PPC_TPREL16_LO, 70)
|
Line 98... |
Line 105... |
RELOC_NUMBER (R_PPC_GOT_TPREL16_HA, 90)
|
RELOC_NUMBER (R_PPC_GOT_TPREL16_HA, 90)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16, 91)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16, 91)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94)
|
RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94)
|
|
RELOC_NUMBER (R_PPC_TLSGD, 95)
|
|
RELOC_NUMBER (R_PPC_TLSLD, 96)
|
|
|
/* The remaining relocs are from the Embedded ELF ABI, and are not
|
/* The remaining relocs are from the Embedded ELF ABI, and are not
|
in the SVR4 ELF ABI. */
|
in the SVR4 ELF ABI. */
|
RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
|
RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
|
RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
|
RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
|
Line 118... |
Line 127... |
RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
|
RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
|
RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
|
RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
|
RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
|
RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
|
RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
|
RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
|
|
|
/* Fake relocations for branch stubs, only used internally by ld. */
|
/* Support STT_GNU_IFUNC plt calls. */
|
#define R_PPC_RELAX32 245
|
RELOC_NUMBER (R_PPC_IRELATIVE, 248)
|
#define R_PPC_RELAX32PC 246
|
|
#define R_PPC_RELAX32_PLT 247
|
|
#define R_PPC_RELAX32PC_PLT 248
|
|
|
|
/* These are GNU extensions used in PIC code sequences. */
|
/* These are GNU extensions used in PIC code sequences. */
|
RELOC_NUMBER (R_PPC_REL16, 249)
|
RELOC_NUMBER (R_PPC_REL16, 249)
|
RELOC_NUMBER (R_PPC_REL16_LO, 250)
|
RELOC_NUMBER (R_PPC_REL16_LO, 250)
|
RELOC_NUMBER (R_PPC_REL16_HI, 251)
|
RELOC_NUMBER (R_PPC_REL16_HI, 251)
|
Line 144... |
Line 150... |
|
|
#define IS_PPC_TLS_RELOC(R) \
|
#define IS_PPC_TLS_RELOC(R) \
|
((R) >= R_PPC_TLS && (R) <= R_PPC_GOT_DTPREL16_HA)
|
((R) >= R_PPC_TLS && (R) <= R_PPC_GOT_DTPREL16_HA)
|
|
|
/* Specify the value of _GLOBAL_OFFSET_TABLE_. */
|
/* Specify the value of _GLOBAL_OFFSET_TABLE_. */
|
#define DT_PPC_GOT DT_LOPROC
|
#define DT_PPC_GOT (DT_LOPROC)
|
|
|
|
/* Specify that tls descriptors should be optimized. */
|
|
#define DT_PPC_TLSOPT (DT_LOPROC + 1)
|
|
|
/* Processor specific flags for the ELF header e_flags field. */
|
/* Processor specific flags for the ELF header e_flags field. */
|
|
|
#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */
|
#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */
|
|
|
Line 175... |
Line 184... |
/* Object attribute tags. */
|
/* Object attribute tags. */
|
enum
|
enum
|
{
|
{
|
/* 0-3 are generic. */
|
/* 0-3 are generic. */
|
Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
|
Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
|
soft-float; 0 for not tagged or not
|
soft-float, 3 for single=precision
|
|
hard-float; 0 for not tagged or not
|
using any ABIs affected by the
|
using any ABIs affected by the
|
differences. */
|
differences. */
|
|
|
/* Value 1 for general purpose registers only, 2 for AltiVec
|
/* Value 1 for general purpose registers only, 2 for AltiVec
|
registers, 3 for SPE registers; 0 for not tagged or not using any
|
registers, 3 for SPE registers; 0 for not tagged or not using any
|
ABIs affected by the differences. */
|
ABIs affected by the differences. */
|
Tag_GNU_Power_ABI_Vector = 8,
|
Tag_GNU_Power_ABI_Vector = 8,
|
|
|
|
/* Value 1 for ABIs using r3/r4 for returning structures <= 8 bytes,
|
|
2 for ABIs using memory; 0 for not tagged or not using any ABIs
|
|
affected by the differences. */
|
|
Tag_GNU_Power_ABI_Struct_Return = 12
|
};
|
};
|
|
|
#endif /* _ELF_PPC_H */
|
#endif /* _ELF_PPC_H */
|
|
|
No newline at end of file
|
No newline at end of file
|