diff mbox series

Align __patchable_function_entries to POINTER_SIZE

Message ID 20200108045403.bsf2asz33md2l3wl@google.com
State New
Headers show
Series Align __patchable_function_entries to POINTER_SIZE | expand

Commit Message

Li, Pan2 via Gcc-patches Jan. 8, 2020, 4:54 a.m. UTC
Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93194

Comments

Richard Sandiford Jan. 20, 2020, 1:48 p.m. UTC | #1
"Fangrui Song via gcc-patches" <gcc-patches@gcc.gnu.org> writes:
> Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93194

Applied, thanks.

Richard

> 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);
diff mbox series

Patch

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