Add support for m32r-linux target, including a RELA ABI and PIC.

This commit is contained in:
Nick Clifton 2003-12-19 11:44:00 +00:00
parent 50ce56d06a
commit 2e20d0cc3b
2 changed files with 59 additions and 12 deletions

View File

@ -1,3 +1,20 @@
2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* elf/m32r.h : Added m32r-linux and PIC support. Add new ABI that
uses RELA.
(R_M32R_16_RELA, R_M32R_32_RELA, R_M32R_24_RELA,
R_M32R_10_PCREL_RELA, R_M32R_18_PCREL_RELA,
R_M32R_26_PCREL_RELA, R_M32R_HI16_ULO_RELA,
R_M32R_HI16_SLO_RELA, R_M32R_LO16_RELA,
R_M32R_SDA16_RELA, R_M32R_RELA_GNU_VTINHERIT,
R_M32R_RELA_GNU_VTENTRY, R_M32R_GOT24,
R_M32R_26_PLTREL, R_M32R_COPY, R_M32R_GLOB_DAT,
R_M32R_JMP_SLOT, R_M32R_RELATIVE, R_M32R_GOTOFF,
R_M32R_GOTPC24, R_M32R_GOT16_HI_ULO,
R_M32R_GOT16_HI_SLO, R_M32R_GOT16_LO,
R_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_SLO,
R_M32R_GOTPC_LO): New relocs.
2003-12-06 Alan Modra <amodra@bigpond.net.au> 2003-12-06 Alan Modra <amodra@bigpond.net.au>
From Jan Beulich <JBeulich@novell.com> From Jan Beulich <JBeulich@novell.com>

View File

@ -25,18 +25,48 @@
/* Relocations. */ /* Relocations. */
START_RELOC_NUMBERS (elf_m32r_reloc_type) START_RELOC_NUMBERS (elf_m32r_reloc_type)
RELOC_NUMBER (R_M32R_NONE, 0) RELOC_NUMBER (R_M32R_NONE, 0)
RELOC_NUMBER (R_M32R_16, 1) /* REL relocations */
RELOC_NUMBER (R_M32R_32, 2) RELOC_NUMBER (R_M32R_16, 1) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_24, 3) RELOC_NUMBER (R_M32R_32, 2) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_10_PCREL, 4) RELOC_NUMBER (R_M32R_24, 3) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_18_PCREL, 5) RELOC_NUMBER (R_M32R_10_PCREL, 4) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_26_PCREL, 6) RELOC_NUMBER (R_M32R_18_PCREL, 5) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_HI16_ULO, 7) RELOC_NUMBER (R_M32R_26_PCREL, 6) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_HI16_SLO, 8) RELOC_NUMBER (R_M32R_HI16_ULO, 7) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_LO16, 9) RELOC_NUMBER (R_M32R_HI16_SLO, 8) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_SDA16, 10) RELOC_NUMBER (R_M32R_LO16, 9) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11) RELOC_NUMBER (R_M32R_SDA16, 10) /* For backwards compatibility. */
RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12) RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11)/* For backwards compatibility. */
RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12) /* For backwards compatibility. */
/* RELA relocations */
RELOC_NUMBER (R_M32R_16_RELA, 33)
RELOC_NUMBER (R_M32R_32_RELA, 34)
RELOC_NUMBER (R_M32R_24_RELA, 35)
RELOC_NUMBER (R_M32R_10_PCREL_RELA, 36)
RELOC_NUMBER (R_M32R_18_PCREL_RELA, 37)
RELOC_NUMBER (R_M32R_26_PCREL_RELA, 38)
RELOC_NUMBER (R_M32R_HI16_ULO_RELA, 39)
RELOC_NUMBER (R_M32R_HI16_SLO_RELA, 40)
RELOC_NUMBER (R_M32R_LO16_RELA, 41)
RELOC_NUMBER (R_M32R_SDA16_RELA, 42)
RELOC_NUMBER (R_M32R_RELA_GNU_VTINHERIT, 43)
RELOC_NUMBER (R_M32R_RELA_GNU_VTENTRY, 44)
RELOC_NUMBER (R_M32R_GOT24, 48)
RELOC_NUMBER (R_M32R_26_PLTREL, 49)
RELOC_NUMBER (R_M32R_COPY, 50)
RELOC_NUMBER (R_M32R_GLOB_DAT, 51)
RELOC_NUMBER (R_M32R_JMP_SLOT, 52)
RELOC_NUMBER (R_M32R_RELATIVE, 53)
RELOC_NUMBER (R_M32R_GOTOFF, 54)
RELOC_NUMBER (R_M32R_GOTPC24, 55)
RELOC_NUMBER (R_M32R_GOT16_HI_ULO, 56)
RELOC_NUMBER (R_M32R_GOT16_HI_SLO, 57)
RELOC_NUMBER (R_M32R_GOT16_LO, 58)
RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59)
RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60)
RELOC_NUMBER (R_M32R_GOTPC_LO, 61)
END_RELOC_NUMBERS (R_M32R_max) END_RELOC_NUMBERS (R_M32R_max)
/* Processor specific section indices. These sections do not actually /* Processor specific section indices. These sections do not actually