This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Align __patchable_function_entries to POINTER_SIZE
- From: "Fangrui Song via gcc-patches" <gcc-patches at gcc dot gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Jan 2020 20:54:03 -0800
- Subject: [PATCH] Align __patchable_function_entries to POINTER_SIZE
- Reply-to: Fangrui Song <maskray at google dot com>
Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93194
>From 60f489f2bf2b32afd1bdbb2405bb028dcedf82cc Mon Sep 17 00:00:00 2001
From: Fangrui Song <maskray@google.com>
Date: Tue, 7 Jan 2020 20:46:26 -0800
Subject: [PATCH] Align __patchable_function_entries to POINTER_SIZE
To: gcc-patches@gcc.gnu.org
---
gcc/ChangeLog | 5 +++++
gcc/targhooks.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 44ae44c8260..74fdb773dc9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-08 Fangrui Song <maskray@google.com>
+
+ * targhooks.c (default_print_patchable_function_entry): Align to
+ POINTER_SIZE.
+
2020-01-08 Luo Xiong Hu <luoxhu@linux.ibm.com>
* ipa-inline.c (caller_growth_limits): Restore the AND.
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 4819bb8058f..a3f83918f8e 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1812,6 +1812,7 @@ default_print_patchable_function_entry (FILE *file,
switch_to_section (get_section ("__patchable_function_entries",
SECTION_WRITE | SECTION_RELRO, NULL));
+ assemble_align (POINTER_SIZE);
fputs (asm_op, file);
assemble_name_raw (file, buf);
fputc ('\n', file);
--
2.24.0