public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Youling Tang <tangyouling@loongson.cn>
To: elfutils-devel@sourceware.org
Subject: [PATCH 2/2] backends: Add new relocation type handling for LoongArch
Date: Sat,  1 Apr 2023 14:43:44 +0800	[thread overview]
Message-ID: <1680331424-9721-2-git-send-email-tangyouling@loongson.cn> (raw)
In-Reply-To: <1680331424-9721-1-git-send-email-tangyouling@loongson.cn>

Add new relocation type handling.

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
---
 backends/ChangeLog           |  4 ++++
 backends/loongarch_reloc.def | 40 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/backends/ChangeLog b/backends/ChangeLog
index 41071953..cff82b01 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,7 @@
+2023-04-01  Youling Tang  <tangyouling@loongson.cn>
+
+	* loongarch_reloc.def: Add RELOC_TYPE B16 to RELAX.
+
 2023-04-01  Youling Tang <tangyouling@loongson.cn>
 	* loongarch_init.c (loongarch_init): Hook check_special_symbol.
 	* loongarch_symbol.c (loongarch_check_special_symbol): New function.
diff --git a/backends/loongarch_reloc.def b/backends/loongarch_reloc.def
index dd4a6b6d..fd204924 100644
--- a/backends/loongarch_reloc.def
+++ b/backends/loongarch_reloc.def
@@ -79,3 +79,43 @@ RELOC_TYPE (SUB32,			REL)
 RELOC_TYPE (SUB64,			REL)
 RELOC_TYPE (GNU_VTINHERIT,		REL)
 RELOC_TYPE (GNU_VTENTRY,		REL)
+
+/* reserved 59-63 */
+
+RELOC_TYPE (B16,			REL)
+RELOC_TYPE (B21,			REL)
+RELOC_TYPE (B26,			REL)
+RELOC_TYPE (ABS_HI20,			REL)
+RELOC_TYPE (ABS_LO12,			REL)
+RELOC_TYPE (ABS64_LO20,			REL)
+RELOC_TYPE (ABS64_HI12,			REL)
+RELOC_TYPE (PCALA_HI20,			REL)
+RELOC_TYPE (PCALA_LO12,			REL)
+RELOC_TYPE (PCALA64_LO20,		REL)
+RELOC_TYPE (PCALA64_HI12,		REL)
+RELOC_TYPE (GOT_PC_HI20,		REL)
+RELOC_TYPE (GOT_PC_LO12,		REL)
+RELOC_TYPE (GOT64_PC_LO20,		REL)
+RELOC_TYPE (GOT64_PC_HI12,		REL)
+RELOC_TYPE (GOT_HI20,			REL)
+RELOC_TYPE (GOT_LO12,			REL)
+RELOC_TYPE (GOT64_LO20,			REL)
+RELOC_TYPE (GOT64_HI12,			REL)
+RELOC_TYPE (TLS_LE_HI20,		REL)
+RELOC_TYPE (TLS_LE_LO12,		REL)
+RELOC_TYPE (TLS_LE64_LO20,		REL)
+RELOC_TYPE (TLS_LE64_HI12,		REL)
+RELOC_TYPE (TLS_IE_PC_HI20,		REL)
+RELOC_TYPE (TLS_IE_PC_LO12,		REL)
+RELOC_TYPE (TLS_IE64_PC_LO20,		REL)
+RELOC_TYPE (TLS_IE64_PC_HI12,		REL)
+RELOC_TYPE (TLS_IE_HI20,		REL)
+RELOC_TYPE (TLS_IE_LO12,		REL)
+RELOC_TYPE (TLS_IE64_LO20,		REL)
+RELOC_TYPE (TLS_IE64_HI12,		REL)
+RELOC_TYPE (TLS_LD_PC_HI20,		REL)
+RELOC_TYPE (TLS_LD_HI20,		REL)
+RELOC_TYPE (TLS_GD_PC_HI20,		REL)
+RELOC_TYPE (TLS_GD_HI20,		REL)
+RELOC_TYPE (32_PCREL,			REL)
+RELOC_TYPE (RELAX,			REL)
-- 
2.37.1


  reply	other threads:[~2023-04-01  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  6:43 [PATCH 1/2] libelf: Sync elf.h from glibc Youling Tang
2023-04-01  6:43 ` Youling Tang [this message]
2023-04-06 22:44   ` [PATCH 2/2] backends: Add new relocation type handling for LoongArch Mark Wielaard
2023-04-06 22:23 ` [PATCH 1/2] libelf: Sync elf.h from glibc Mark Wielaard

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=1680331424-9721-2-git-send-email-tangyouling@loongson.cn \
    --to=tangyouling@loongson.cn \
    --cc=elfutils-devel@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).