aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2015-01-08 08:02:43 -0800
committerChung-Lin Tang <cltang@codesourcery.com>2015-01-08 08:02:43 -0800
commit1a0a8d152d9ff65315c3e0f2623ccc2933f7695c (patch)
treed9a0ca107f96d5850aaa8f65a96a36cf5f05547e
parentdd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93 (diff)
downloadglibc-1a0a8d152d9ff65315c3e0f2623ccc2933f7695c.tar
glibc-1a0a8d152d9ff65315c3e0f2623ccc2933f7695c.tar.gz
glibc-1a0a8d152d9ff65315c3e0f2623ccc2933f7695c.tar.bz2
glibc-1a0a8d152d9ff65315c3e0f2623ccc2933f7695c.zip
Add Nios II definitions to elf/elf.h.
-rw-r--r--ChangeLog24
-rw-r--r--elf/elf.h53
2 files changed, 77 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 962ec26550..71c8298215 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2015-01-08 Chung-Lin Tang <cltang@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+ Andrew Jenner <andrew@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * elf/elf.h (EM_ALTERA_NIOS2): New machine number for Altera Nios II.
+ (DT_NIOS2_GP): New dynamic entry type for Nios II _gp address.
+ (R_NIOS2_NONE,R_NIOS2_S16,R_NIOS2_U16): Define Nios II relocations.
+ (R_NIOS2_PCREL16,R_NIOS2_CALL26,R_NIOS2_IMM5): Likewise.
+ (R_NIOS2_CACHE_OPX,R_NIOS2_IMM6,R_NIOS2_IMM8,R_NIOS2_HI16): Likewise.
+ (R_NIOS2_LO16,R_NIOS2_HIADJ16,R_NIOS2_BFD_RELOC_32): Likewise.
+ (R_NIOS2_BFD_RELOC_16,R_NIOS2_BFD_RELOC_8,R_NIOS2_GPREL): Likewise.
+ (R_NIOS2_GNU_VTINHERIT,R_NIOS2_GNU_VTENTRY,R_NIOS2_UJMP): Likewise.
+ (R_NIOS2_CJMP,R_NIOS2_CALLR,R_NIOS2_ALIGN,R_NIOS2_GOT16): Likewise.
+ (R_NIOS2_CALL16,R_NIOS2_GOTOFF_LO,R_NIOS2_GOTOFF_HA): Likewise.
+ (R_NIOS2_PCREL_LO,R_NIOS2_PCREL_HA,R_NIOS2_TLS_GD16): Likewise.
+ (R_NIOS2_TLS_LDM16,R_NIOS2_TLS_LDO16,R_NIOS2_TLS_IE16): Likewise.
+ (R_NIOS2_TLS_LE16,R_NIOS2_TLS_DTPMOD,R_NIOS2_TLS_DTPREL): Likewise.
+ (R_NIOS2_TLS_TPREL,R_NIOS2_COPY,R_NIOS2_GLOB_DAT): Likewise.
+ (R_NIOS2_JUMP_SLOT,R_NIOS2_RELATIVE,R_NIOS2_GOTOFF): Likewise.
+ (R_NIOS2_CALL26_NOAT,R_NIOS2_GOT_LO,R_NIOS2_GOT_HA): Likewise.
+ (R_NIOS2_CALL_LO,R_NIOS2_CALL_HA): Likewise.
+
2015-01-08 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/futimens.c (futimens): Use address of first
diff --git a/elf/elf.h b/elf/elf.h
index 9609580822..496f08d515 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -249,6 +249,7 @@ typedef struct
#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
+#define EM_ALTERA_NIOS2 113 /* Altera Nios II */
#define EM_AARCH64 183 /* ARM AARCH64 */
#define EM_TILEPRO 188 /* Tilera TILEPro */
#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
@@ -3243,6 +3244,58 @@ enum
#define R_MICROBLAZE_TLSGOTTPREL32 28 /* TLS Offset From Thread Pointer. */
#define R_MICROBLAZE_TLSTPREL32 29 /* TLS Offset From Thread Pointer. */
+/* Legal values for d_tag (dynamic entry type). */
+#define DT_NIOS2_GP 0x70000002 /* Address of _gp. */
+
+/* Nios II relocations. */
+#define R_NIOS2_NONE 0 /* No reloc. */
+#define R_NIOS2_S16 1 /* Direct signed 16 bit. */
+#define R_NIOS2_U16 2 /* Direct unsigned 16 bit. */
+#define R_NIOS2_PCREL16 3 /* PC relative 16 bit. */
+#define R_NIOS2_CALL26 4 /* Direct call. */
+#define R_NIOS2_IMM5 5 /* 5 bit constant expression. */
+#define R_NIOS2_CACHE_OPX 6 /* 5 bit expression, shift 22. */
+#define R_NIOS2_IMM6 7 /* 6 bit constant expression. */
+#define R_NIOS2_IMM8 8 /* 8 bit constant expression. */
+#define R_NIOS2_HI16 9 /* High 16 bit. */
+#define R_NIOS2_LO16 10 /* Low 16 bit. */
+#define R_NIOS2_HIADJ16 11 /* High 16 bit, adjusted. */
+#define R_NIOS2_BFD_RELOC_32 12 /* 32 bit symbol value + addend. */
+#define R_NIOS2_BFD_RELOC_16 13 /* 16 bit symbol value + addend. */
+#define R_NIOS2_BFD_RELOC_8 14 /* 8 bit symbol value + addend. */
+#define R_NIOS2_GPREL 15 /* 16 bit GP pointer offset. */
+#define R_NIOS2_GNU_VTINHERIT 16 /* GNU C++ vtable hierarchy. */
+#define R_NIOS2_GNU_VTENTRY 17 /* GNU C++ vtable member usage. */
+#define R_NIOS2_UJMP 18 /* Unconditional branch. */
+#define R_NIOS2_CJMP 19 /* Conditional branch. */
+#define R_NIOS2_CALLR 20 /* Indirect call through register. */
+#define R_NIOS2_ALIGN 21 /* Alignment requirement for
+ linker relaxation. */
+#define R_NIOS2_GOT16 22 /* 16 bit GOT entry. */
+#define R_NIOS2_CALL16 23 /* 16 bit GOT entry for function. */
+#define R_NIOS2_GOTOFF_LO 24 /* %lo of offset to GOT pointer. */
+#define R_NIOS2_GOTOFF_HA 25 /* %hiadj of offset to GOT pointer. */
+#define R_NIOS2_PCREL_LO 26 /* %lo of PC relative offset. */
+#define R_NIOS2_PCREL_HA 27 /* %hiadj of PC relative offset. */
+#define R_NIOS2_TLS_GD16 28 /* 16 bit GOT offset for TLS GD. */
+#define R_NIOS2_TLS_LDM16 29 /* 16 bit GOT offset for TLS LDM. */
+#define R_NIOS2_TLS_LDO16 30 /* 16 bit module relative offset. */
+#define R_NIOS2_TLS_IE16 31 /* 16 bit GOT offset for TLS IE. */
+#define R_NIOS2_TLS_LE16 32 /* 16 bit LE TP-relative offset. */
+#define R_NIOS2_TLS_DTPMOD 33 /* Module number. */
+#define R_NIOS2_TLS_DTPREL 34 /* Module-relative offset. */
+#define R_NIOS2_TLS_TPREL 35 /* TP-relative offset. */
+#define R_NIOS2_COPY 36 /* Copy symbol at runtime. */
+#define R_NIOS2_GLOB_DAT 37 /* Create GOT entry. */
+#define R_NIOS2_JUMP_SLOT 38 /* Create PLT entry. */
+#define R_NIOS2_RELATIVE 39 /* Adjust by program base. */
+#define R_NIOS2_GOTOFF 40 /* 16 bit offset to GOT pointer. */
+#define R_NIOS2_CALL26_NOAT 41 /* Direct call in .noat section. */
+#define R_NIOS2_GOT_LO 42 /* %lo() of GOT entry. */
+#define R_NIOS2_GOT_HA 43 /* %hiadj() of GOT entry. */
+#define R_NIOS2_CALL_LO 44 /* %lo() of function GOT entry. */
+#define R_NIOS2_CALL_HA 45 /* %hiadj() of function GOT entry. */
+
/* TILEPro relocations. */
#define R_TILEPRO_NONE 0 /* No reloc */
#define R_TILEPRO_32 1 /* Direct 32 bit */