From: Mao Han <han_mao@c-sky.com>
To: libc-alpha@sourceware.org
Cc: Mao Han <han_mao@c-sky.com>,
c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com
Subject: [PATCH v4 09/13] C-SKY: Add dynamic relocations to elf.h
Date: Wed, 12 Sep 2018 02:57:00 -0000 [thread overview]
Message-ID: <6b48d7718a979b9df1aaed8091847b0048cc7336.1536720821.git.han_mao@c-sky.com> (raw)
In-Reply-To: <cover.1536715883.git.han_mao@c-sky.com>
In-Reply-To: <cover.1536720821.git.han_mao@c-sky.com>
* elf/elf.h (EM_CSKY, R_CKCORE_NONE, R_CKCORE_ADDR32)
(R_CKCORE_PCRELIMM8BY4, R_CKCORE_PCRELIMM11BY2, R_CKCORE_PCREL32)
(R_CKCORE_PCRELJSR_IMM11BY2, R_CKCORE_RELATIVE, R_CKCORE_COPY)
(R_CKCORE_GLOB_DAT, R_CKCORE_JUMP_SLOT, R_CKCORE_GOTOFF)
(R_CKCORE_GOTPC, R_CKCORE_GOT32, R_CKCORE_PLT32, R_CKCORE_ADDRGOT)
(R_CKCORE_ADDRPLT, R_CKCORE_PCREL_IMM26BY2, R_CKCORE_PCREL_IMM16BY2)
(R_CKCORE_PCREL_IMM16BY4, R_CKCORE_PCREL_IMM10BY2)
(R_CKCORE_PCREL_IMM10BY4, R_CKCORE_ADDR_HI16, R_CKCORE_ADDR_LO16)
(R_CKCORE_GOTPC_HI16, R_CKCORE_GOTPC_LO16, R_CKCORE_GOTOFF_HI16)
(R_CKCORE_GOTOFF_LO16, R_CKCORE_GOT12, R_CKCORE_GOT_HI16)
(R_CKCORE_GOT_LO16, R_CKCORE_PLT12, R_CKCORE_PLT_HI16)
(R_CKCORE_PLT_LO16, R_CKCORE_ADDRGOT_HI16, R_CKCORE_ADDRGOT_LO16)
(R_CKCORE_ADDRPLT_HI16, R_CKCORE_ADDRPLT_LO16)
(R_CKCORE_PCREL_JSR_IMM26BY2, R_CKCORE_TOFFSET_LO16)
(R_CKCORE_DOFFSET_LO16, R_CKCORE_PCREL_IMM18BY2)
(R_CKCORE_DOFFSET_IMM18, R_CKCORE_DOFFSET_IMM18BY2)
(R_CKCORE_DOFFSET_IMM18BY4, R_CKCORE_GOT_IMM18BY4)
(R_CKCORE_PLT_IMM18BY4, R_CKCORE_PCREL_IMM7BY4, R_CKCORE_TLS_LE32)
(R_CKCORE_TLS_IE32, R_CKCORE_TLS_GD32, R_CKCORE_TLS_LDM32)
(R_CKCORE_TLS_LDO32, R_CKCORE_TLS_DTPMOD32, R_CKCORE_TLS_DTPOFF32)
(R_CKCORE_TLS_TPOFF32): New Define.
---
elf/elf.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 66 insertions(+), 1 deletion(-)
diff --git a/elf/elf.h b/elf/elf.h
index 226e538..9ff927b 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -360,8 +360,9 @@ typedef struct
#define EM_RISCV 243 /* RISC-V */
#define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
+#define EM_CSKY 252 /* C_SKY */
-#define EM_NUM 248
+#define EM_NUM 253
/* Old spellings/synonyms. */
@@ -3019,6 +3020,70 @@ enum
/* Keep this the last entry. */
#define R_ARM_NUM 256
+/* csky */
+#define R_CKCORE_NONE 0 /* no reloc */
+#define R_CKCORE_ADDR32 1 /* direct 32 bit (S + A) */
+#define R_CKCORE_PCRELIMM8BY4 2 /* disp ((S + A - P) >> 2) & 0xff */
+#define R_CKCORE_PCRELIMM11BY2 3 /* disp ((S + A - P) >> 1) & 0x7ff */
+#define R_CKCORE_PCREL32 5 /* 32-bit rel (S + A - P) */
+#define R_CKCORE_PCRELJSR_IMM11BY2 6 /* disp ((S + A - P) >>1) & 0x7ff */
+#define R_CKCORE_RELATIVE 9 /* 32 bit adjust program base(B + A)*/
+#define R_CKCORE_COPY 10 /* 32 bit adjust by program base */
+#define R_CKCORE_GLOB_DAT 11 /* off between got and sym (S) */
+#define R_CKCORE_JUMP_SLOT 12 /* PLT entry (S) */
+#define R_CKCORE_GOTOFF 13 /* offset to GOT (S + A - GOT) */
+#define R_CKCORE_GOTPC 14 /* PC offset to GOT (GOT + A - P) */
+#define R_CKCORE_GOT32 15 /* 32 bit GOT entry (G) */
+#define R_CKCORE_PLT32 16 /* 32 bit PLT entry (G) */
+#define R_CKCORE_ADDRGOT 17 /* GOT entry in GLOB_DAT (GOT + G) */
+#define R_CKCORE_ADDRPLT 18 /* PLT entry in GLOB_DAT (GOT + G) */
+#define R_CKCORE_PCREL_IMM26BY2 19 /* ((S + A - P) >> 1) & 0x3ffffff */
+#define R_CKCORE_PCREL_IMM16BY2 20 /* disp ((S + A - P) >> 1) & 0xffff */
+#define R_CKCORE_PCREL_IMM16BY4 21 /* disp ((S + A - P) >> 2) & 0xffff */
+#define R_CKCORE_PCREL_IMM10BY2 22 /* disp ((S + A - P) >> 1) & 0x3ff */
+#define R_CKCORE_PCREL_IMM10BY4 23 /* disp ((S + A - P) >> 2) & 0x3ff */
+#define R_CKCORE_ADDR_HI16 24 /* high & low 16 bit ADDR */
+ /* ((S + A) >> 16) & 0xffff */
+#define R_CKCORE_ADDR_LO16 25 /* (S + A) & 0xffff */
+#define R_CKCORE_GOTPC_HI16 26 /* high & low 16 bit GOTPC */
+ /* ((GOT + A - P) >> 16) & 0xffff */
+#define R_CKCORE_GOTPC_LO16 27 /* (GOT + A - P) & 0xffff */
+#define R_CKCORE_GOTOFF_HI16 28 /* high & low 16 bit GOTOFF */
+ /* ((S + A - GOT) >> 16) & 0xffff */
+#define R_CKCORE_GOTOFF_LO16 29 /* (S + A - GOT) & 0xffff */
+#define R_CKCORE_GOT12 30 /* 12 bit disp GOT entry (G) */
+#define R_CKCORE_GOT_HI16 31 /* high & low 16 bit GOT */
+ /* (G >> 16) & 0xffff */
+#define R_CKCORE_GOT_LO16 32 /* (G & 0xffff) */
+#define R_CKCORE_PLT12 33 /* 12 bit disp PLT entry (G) */
+#define R_CKCORE_PLT_HI16 34 /* high & low 16 bit PLT */
+ /* (G >> 16) & 0xffff */
+#define R_CKCORE_PLT_LO16 35 /* G & 0xffff */
+#define R_CKCORE_ADDRGOT_HI16 36 /* high & low 16 bit ADDRGOT */
+ /* (GOT + G * 4) & 0xffff */
+#define R_CKCORE_ADDRGOT_LO16 37 /* (GOT + G * 4) & 0xffff */
+#define R_CKCORE_ADDRPLT_HI16 38 /* high & low 16 bit ADDRPLT */
+ /* ((GOT + G * 4) >> 16) & 0xFFFF */
+#define R_CKCORE_ADDRPLT_LO16 39 /* (GOT+G*4) & 0xffff */
+#define R_CKCORE_PCREL_JSR_IMM26BY2 40 /* disp ((S+A-P) >>1) & x3ffffff */
+#define R_CKCORE_TOFFSET_LO16 41 /* (S+A-BTEXT) & 0xffff */
+#define R_CKCORE_DOFFSET_LO16 42 /* (S+A-BTEXT) & 0xffff */
+#define R_CKCORE_PCREL_IMM18BY2 43 /* disp ((S+A-P) >>1) & 0x3ffff */
+#define R_CKCORE_DOFFSET_IMM18 44 /* disp (S+A-BDATA) & 0x3ffff */
+#define R_CKCORE_DOFFSET_IMM18BY2 45 /* disp ((S+A-BDATA)>>1) & 0x3ffff */
+#define R_CKCORE_DOFFSET_IMM18BY4 46 /* disp ((S+A-BDATA)>>2) & 0x3ffff */
+#define R_CKCORE_GOT_IMM18BY4 48 /* disp (G >> 2) */
+#define R_CKCORE_PLT_IMM18BY4 49 /* disp (G >> 2) */
+#define R_CKCORE_PCREL_IMM7BY4 50 /* disp ((S+A-P) >>2) & 0x7f */
+#define R_CKCORE_TLS_LE32 51 /* 32 bit offset to TLS block */
+#define R_CKCORE_TLS_IE32 52
+#define R_CKCORE_TLS_GD32 53
+#define R_CKCORE_TLS_LDM32 54
+#define R_CKCORE_TLS_LDO32 55
+#define R_CKCORE_TLS_DTPMOD32 56
+#define R_CKCORE_TLS_DTPOFF32 57
+#define R_CKCORE_TLS_TPOFF32 58
+
/* IA-64 specific declarations. */
/* Processor specific flags for the Ehdr e_flags field. */
--
2.7.4
next prev parent reply other threads:[~2018-09-12 2:57 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 2:56 [PATCH v4 00/13] port C-SKY to glibc Mao Han
[not found] ` <cover.1536720821.git.han_mao@c-sky.com>
2018-09-12 2:56 ` [PATCH v4 03/13] C-SKY: Math support Mao Han
2018-09-17 21:49 ` Joseph Myers
2018-09-18 6:05 ` Mao Han
2018-09-12 2:56 ` [PATCH v4 02/13] C-SKY: TLS support Mao Han
2018-09-12 2:56 ` [PATCH v4 05/13] C-SKY: Linux Syscall Interface Mao Han
2018-09-12 2:56 ` [PATCH v4 01/13] C-SKY: ABI related code Mao Han
2018-09-12 4:16 ` H.J. Lu
2018-09-12 7:07 ` Mao Han
2018-09-12 8:23 ` Florian Weimer
2018-09-12 9:06 ` Mao Han
2018-09-29 1:46 ` Palmer Dabbelt
2018-09-30 9:04 ` Manuel A. Fernandez Montecelo
2018-10-01 8:18 ` Richard W.M. Jones
2018-09-17 21:46 ` Joseph Myers
2018-09-18 6:09 ` Mao Han
2018-09-12 2:57 ` [PATCH v4 12/13] C-SKY: Add build-many-glibcs.py support Mao Han
2018-09-12 2:57 ` Mao Han [this message]
2018-09-12 2:57 ` [PATCH v4 11/13] C-SKY: Add ABI definitions in config.h.in Mao Han
2018-09-12 2:57 ` [PATCH v4 08/13] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
2018-09-12 2:57 ` [PATCH v4 13/13] C-SKY: Skeleton documentation Mao Han
2018-09-12 2:57 ` [PATCH v4 06/13] C-SKY: Linux ABI Mao Han
2018-09-12 13:40 ` Arnd Bergmann
2018-09-12 14:21 ` Joseph Myers
2018-09-12 15:34 ` Arnd Bergmann
2018-09-12 21:28 ` struct elf_prstatus and Y2038 (was: Re: [PATCH v4 06/13] C-SKY: Linux ABI) Florian Weimer
2018-09-13 10:48 ` Arnd Bergmann
2018-09-13 10:56 ` struct elf_prstatus and Y2038 Florian Weimer
2018-09-13 8:17 ` [PATCH v4 06/13] C-SKY: Linux ABI Mao Han
2018-09-13 8:46 ` Arnd Bergmann
2018-09-13 15:32 ` [gnu-csky] " Joseph Myers
2018-09-13 16:35 ` Joseph Myers
2018-09-13 20:47 ` Arnd Bergmann
2018-09-13 20:59 ` Joseph Myers
2018-09-13 21:32 ` Arnd Bergmann
2018-09-13 22:57 ` Joseph Myers
2018-09-13 20:31 ` Arnd Bergmann
2018-09-13 20:49 ` Joseph Myers
2018-09-13 21:38 ` Arnd Bergmann
2018-09-12 3:05 ` [PATCH v4 10/13] C-SKY: Build Infastructure Mao Han
2018-09-17 21:52 ` Joseph Myers
2018-09-18 6:02 ` Mao Han
2018-09-12 3:05 ` [PATCH v4 07/13] C-SKY: ABI Lists Mao Han
2018-09-12 6:51 ` Andreas Schwab
2018-09-12 7:12 ` Mao Han
2018-09-12 12:35 ` Joseph Myers
2018-09-12 13:46 ` Andreas Schwab
2018-09-12 15:19 ` Joseph Myers
2018-09-13 8:23 ` Mao Han
2018-09-12 3:05 ` [PATCH v4 04/13] C-SKY: NPTL support and Atomic Mao Han
2018-09-12 3:05 ` [PATCH 1/1] Update config.guess and config.sub to current versions Mao Han
2018-09-12 12:31 ` [PATCH v4 00/13] port C-SKY to glibc Joseph Myers
2018-09-13 8:14 ` Mao Han
2018-09-13 12:36 ` Joseph Myers
2018-09-18 6:22 ` Mao Han
2018-09-18 7:18 ` Mao Han
2018-09-18 11:43 ` Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b48d7718a979b9df1aaed8091847b0048cc7336.1536720821.git.han_mao@c-sky.com \
--to=han_mao@c-sky.com \
--cc=c-sky_gcc_upstream@c-sky.com \
--cc=gnu-csky@mentor.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).