This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH V2] elf: Define missing Meta architecture specific relocations
- From: Will Newton <will dot newton at gmail dot com>
- To: Khem Raj <raj dot khem at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 15 Jul 2016 12:50:59 +0100
- Subject: Re: [PATCH V2] elf: Define missing Meta architecture specific relocations
- Authentication-results: sourceware.org; auth=none
- References: <20160714151053.20713-1-raj.khem@gmail.com>
On Thu, Jul 14, 2016 at 4:10 PM, Khem Raj <raj.khem@gmail.com> wrote:
> ---
> 2016-07-14 Ross Burton <ross.burton@intel.com>
> Khem Raj <raj.khem@gmail.com>
>
> * elf/elf.h (R_METAG_HIADDR16, R_METAG_LOADDR16,
> R_METAG_ADDR32, R_METAG_NONE, R_METAG_RELBRANCH,
> R_METAG_GETSETOFF, R_METAG_REG32OP1, R_METAG_REG32OP2,
> R_METAG_REG32OP3, R_METAG_REG16OP1, R_METAG_REG16OP2,
> R_METAG_REG16OP3, R_METAG_REG32OP4, R_METAG_HIOG,
> R_METAG_LOOG, R_METAG_GNU_VTINHERIT, R_METAG_GNU_VTENTRY,
> R_METAG_HI16_GOTOFF, R_METAG_LO16_GOTOFF,
> R_METAG_GETSET_GOTOFF, R_METAG_GETSET_GOT, R_METAG_HI16_GOTPC,
> R_METAG_LO16_GOTPC, R_METAG_HI16_PLT, R_METAG_LO16_PLT,
> R_METAG_RELBRANCH_PLT, R_METAG_GOTOFF, R_METAG_PLT,
> R_METAG_COPY, R_METAG_JMP_SLOT, R_METAG_RELATIVE,
> R_METAG_GLOB_DAT, R_METAG_TLS_TPOFF, R_METAG_TLS_DTPMOD,
> R_METAG_TLS_DTPOFF): New.
> elf/elf.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
This looks ok to me. There are a handful of additional relocs defined
in binutils but this should suffice to get the build fixed.
> diff --git a/elf/elf.h b/elf/elf.h
> index b6112d9..04400ec 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -3682,6 +3682,53 @@ enum
> #define R_BPF_NONE 0 /* No reloc */
> #define R_BPF_MAP_FD 1 /* Map fd to pointer */
>
> +/* Imagination Meta specific relocations. */
> +
> +#define R_METAG_HIADDR16 0
> +#define R_METAG_LOADDR16 1
> +#define R_METAG_ADDR32 2 /* 32bit absolute address */
> +#define R_METAG_NONE 3 /* No reloc */
> +#define R_METAG_RELBRANCH 4
> +#define R_METAG_GETSETOFF 5
> +
> +/* Backward compatability */
> +#define R_METAG_REG32OP1 6
> +#define R_METAG_REG32OP2 7
> +#define R_METAG_REG32OP3 8
> +#define R_METAG_REG16OP1 9
> +#define R_METAG_REG16OP2 10
> +#define R_METAG_REG16OP3 11
> +#define R_METAG_REG32OP4 12
> +
> +#define R_METAG_HIOG 13
> +#define R_METAG_LOOG 14
> +
> +/* GNU */
> +#define R_METAG_GNU_VTINHERIT 30
> +#define R_METAG_GNU_VTENTRY 31
> +
> +/* PIC relocations */
> +#define R_METAG_HI16_GOTOFF 32
> +#define R_METAG_LO16_GOTOFF 33
> +#define R_METAG_GETSET_GOTOFF 34
> +#define R_METAG_GETSET_GOT 35
> +#define R_METAG_HI16_GOTPC 36
> +#define R_METAG_LO16_GOTPC 37
> +#define R_METAG_HI16_PLT 38
> +#define R_METAG_LO16_PLT 39
> +#define R_METAG_RELBRANCH_PLT 40
> +#define R_METAG_GOTOFF 41
> +#define R_METAG_PLT 42
> +#define R_METAG_COPY 43
> +#define R_METAG_JMP_SLOT 44
> +#define R_METAG_RELATIVE 45
> +#define R_METAG_GLOB_DAT 46
> +
> +/* TLS relocations */
> +#define R_METAG_TLS_TPOFF 56
> +#define R_METAG_TLS_DTPMOD 57
> +#define R_METAG_TLS_DTPOFF 58
> +
> __END_DECLS
>
> #endif /* elf.h */
> --
> 2.9.0
>