From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Cc: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
Subject: [PATCH 2/3] aarch64: Fix corrupt GNU_PROPERTY_TYPE (5) size
Date: Mon, 31 Jul 2023 08:41:49 +0200 [thread overview]
Message-ID: <20230731064150.56026-2-sebastian.huber@embedded-brains.de> (raw)
In-Reply-To: <20230731064150.56026-1-sebastian.huber@embedded-brains.de>
For ELF32 the notes alignment is 4 and not 8. See also:
https://github.com/ARM-software/optimized-routines/issues/56
https://github.com/ARM-software/optimized-routines/pull/57
---
newlib/libc/machine/aarch64/asmdefs.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/newlib/libc/machine/aarch64/asmdefs.h b/newlib/libc/machine/aarch64/asmdefs.h
index 069b146f4a..131b95e1fe 100644
--- a/newlib/libc/machine/aarch64/asmdefs.h
+++ b/newlib/libc/machine/aarch64/asmdefs.h
@@ -21,6 +21,19 @@
#define FEATURE_1_PAC 2
/* Add a NT_GNU_PROPERTY_TYPE_0 note. */
+#ifdef __ILP32__
+#define GNU_PROPERTY(type, value) \
+ .section .note.gnu.property, "a"; \
+ .p2align 2; \
+ .word 4; \
+ .word 12; \
+ .word 5; \
+ .asciz "GNU"; \
+ .word type; \
+ .word 4; \
+ .word value; \
+ .text
+#else
#define GNU_PROPERTY(type, value) \
.section .note.gnu.property, "a"; \
.p2align 3; \
@@ -33,6 +46,7 @@
.word value; \
.word 0; \
.text
+#endif
/* If set then the GNU Property Note section will be added to
mark objects to support BTI and PAC-RET. */
--
2.35.3
next prev parent reply other threads:[~2023-07-31 6:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 6:41 [PATCH 1/3] aarch64: Sync with ARM-software/optimized-routines Sebastian Huber
2023-07-31 6:41 ` Sebastian Huber [this message]
2023-07-31 6:41 ` [PATCH 3/3] aarch64: Import memrchr.S Sebastian Huber
2023-07-31 6:54 ` Sebastian Huber
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=20230731064150.56026-2-sebastian.huber@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=Richard.Earnshaw@foss.arm.com \
--cc=newlib@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).