public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Shahab Vahedi <Shahab.Vahedi@synopsys.com>
Cc: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>,
	Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>,
	Francois Bedard <Francois.Bedard@synopsys.com>
Subject: Re: [PATCH] Add support for ARCv2
Date: Thu, 1 Dec 2022 00:36:32 +0100	[thread overview]
Message-ID: <Y4fpAMlzn2XoGalR@wildebeest.org> (raw)
In-Reply-To: <7df84682-6291-bf7e-0915-ef766af240cb@synopsys.com>

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

Hi Shahab,

On Wed, Nov 30, 2022 at 08:15:55AM +0000, Shahab Vahedi via Elfutils-devel wrote:
> The necessary changes are in glibc now [1]. How/When does the sync happen? Should
> I submit a patch, or trigger a request, etc.?

Nice. I just synced elf.h.

Thanks,

Mark

[-- Attachment #2: 0001-libelf-Sync-elf.h-from-glibc.patch --]
[-- Type: text/x-diff, Size: 3210 bytes --]

From 86347d80bec28c762ddc47aee866fcdaf781f25a Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Thu, 1 Dec 2022 00:25:01 +0100
Subject: [PATCH] libelf: Sync elf.h from glibc

Adds various new ARC related declarations.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 libelf/ChangeLog |  4 ++++
 libelf/elf.h     | 36 +++++++++++++++++++++++++++++-------
 2 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 8107c71e..3ae3afe3 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2022-11-30  Mark Wielaard  <mark@klomp.org>
+
+	* elf.h: Update from glibc.
+
 2022-10-28  Mark Wielaard  <mark@klomp.org>
 
 	* elf.h: Update from glibc.
diff --git a/libelf/elf.h b/libelf/elf.h
index f51300bc..da41bad3 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -4093,8 +4093,11 @@ enum
 #define R_NDS32_TLS_DESC	119
 
 /* LoongArch ELF Flags */
-#define EF_LARCH_ABI    	0x07
-#define EF_LARCH_ABI_LP64D	0x03
+#define EF_LARCH_ABI_MODIFIER_MASK  0x07
+#define EF_LARCH_ABI_SOFT_FLOAT     0x01
+#define EF_LARCH_ABI_SINGLE_FLOAT   0x02
+#define EF_LARCH_ABI_DOUBLE_FLOAT   0x03
+#define EF_LARCH_OBJABI_V1          0x40
 
 /* LoongArch specific dynamic relocations */
 #define R_LARCH_NONE		0
@@ -4156,6 +4159,15 @@ enum
 #define R_LARCH_GNU_VTINHERIT  57
 #define R_LARCH_GNU_VTENTRY  58
 
+/* ARC specific declarations.  */
+
+/* Processor specific flags for the Ehdr e_flags field.  */
+#define EF_ARC_MACH_MSK	    0x000000ff
+#define EF_ARC_OSABI_MSK    0x00000f00
+#define EF_ARC_ALL_MSK	    (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK)
+
+/* Processor specific values for the Shdr sh_type field.  */
+#define SHT_ARC_ATTRIBUTES	(SHT_LOPROC + 1) /* ARC attributes section.  */
 
 /* ARCompact/ARCv2 specific relocs.  */
 #define R_ARC_NONE		0x0
@@ -4163,7 +4175,7 @@ enum
 #define R_ARC_16		0x2
 #define R_ARC_24		0x3
 #define R_ARC_32		0x4
-#define R_ARC_B26		0x5
+
 #define R_ARC_B22_PCREL		0x6
 #define R_ARC_H30		0x7
 #define R_ARC_N8		0x8
@@ -4203,16 +4215,23 @@ enum
 #define R_ARC_SECTOFF_ME_2	0x2A
 #define R_ARC_SECTOFF_1		0x2B
 #define R_ARC_SECTOFF_2		0x2C
+#define R_ARC_SDA_12		0x2D
+#define R_ARC_SDA16_ST2		0x30
+#define R_ARC_32_PCREL		0x31
 #define R_ARC_PC32		0x32
 #define R_ARC_GOTPC32		0x33
 #define R_ARC_PLT32		0x34
 #define R_ARC_COPY		0x35
 #define R_ARC_GLOB_DAT		0x36
-#define R_ARC_JUMP_SLOT		0x37
+#define R_ARC_JMP_SLOT		0x37
 #define R_ARC_RELATIVE		0x38
 #define R_ARC_GOTOFF		0x39
 #define R_ARC_GOTPC		0x3A
 #define R_ARC_GOT32		0x3B
+#define R_ARC_S21W_PCREL_PLT	0x3C
+#define R_ARC_S25H_PCREL_PLT	0x3D
+
+#define R_ARC_JLI_SECTOFF	0x3F
 
 #define R_ARC_TLS_DTPMOD	0x42
 #define R_ARC_TLS_DTPOFF	0x43
@@ -4221,9 +4240,12 @@ enum
 #define R_ARC_TLS_GD_LD	        0x46
 #define R_ARC_TLS_GD_CALL	0x47
 #define R_ARC_TLS_IE_GOT	0x48
-#define R_ARC_TLS_DTPOFF_S9	0x4a
-#define R_ARC_TLS_LE_S9		0x4a
-#define R_ARC_TLS_LE_32		0x4b
+#define R_ARC_TLS_DTPOFF_S9	0x49
+#define R_ARC_TLS_LE_S9		0x4A
+#define R_ARC_TLS_LE_32		0x4B
+#define R_ARC_S25W_PCREL_PLT	0x4C
+#define R_ARC_S21H_PCREL_PLT	0x4D
+#define R_ARC_NPS_CMEM16	0x4E
 
 /* OpenRISC 1000 specific relocs.  */
 #define R_OR1K_NONE		0
-- 
2.30.2


  reply	other threads:[~2022-11-30 23:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 13:43 Shahab Vahedi
2022-10-31 14:52 ` [PATCH v2] " Shahab Vahedi
     [not found] ` <Y13Tk6e/qsoolka+@wildebeest.org>
2022-10-31 14:54   ` [PATCH] " Shahab Vahedi
2022-11-01 21:01     ` Mark Wielaard
2022-11-09 16:33       ` Shahab Vahedi
2022-11-30  8:15       ` Shahab Vahedi
2022-11-30 23:36         ` Mark Wielaard [this message]
2022-12-01  9:44           ` Shahab Vahedi
2022-12-13 14:05             ` Mark Wielaard
2022-12-15  8:49               ` Shahab Vahedi

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=Y4fpAMlzn2XoGalR@wildebeest.org \
    --to=mark@klomp.org \
    --cc=Claudiu.Zissulescu@synopsys.com \
    --cc=Francois.Bedard@synopsys.com \
    --cc=Shahab.Vahedi@synopsys.com \
    --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).