gcc7/gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Richard Biener 7dfb0b41ce Accepting request 927326 from home:gbelinassi:branches:devel:gcc
Remove backported tests:

- g++.dg/pr93195a.C
- gcc.dg/tree-ssa/pr84859.c

Fix assembly match on i586:

- gcc.target/i386/pr93492-3.c
- gcc.target/i386/pr93492-5.c

OBS-URL: https://build.opensuse.org/request/show/927326
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc7?expand=0&rev=219
2021-10-26 06:17:33 +00:00

37 lines
1.2 KiB
Diff

From 2d35914acc611b8780c52c2e6df78d56da37a61d Mon Sep 17 00:00:00 2001
From: Joao Moreira <jmoreira@suse.de>
Date: Wed, 17 Apr 2019 18:24:23 +0000
Subject: [PATCH 13/22] Backport targhooks.c
(default_print_patchable_function_entry): Emit __patchable_function_entries
section with writable flags to allow...
gcc/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2019-04-10 Joao Moreira <jmoreira@suse.de>
* targhooks.c (default_print_patchable_function_entry): Emit
__patchable_function_entries section with writable flags to allow
relocation resolution.
---
gcc/targhooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index c57967966c5..be0c557f1a2 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1643,7 +1643,7 @@ default_print_patchable_function_entry (FILE *file,
ASM_GENERATE_INTERNAL_LABEL (buf, "LPFE", patch_area_number);
switch_to_section (get_section ("__patchable_function_entries",
- 0, NULL));
+ SECTION_WRITE | SECTION_RELRO, NULL));
fputs (asm_op, file);
assemble_name_raw (file, buf);
fputc ('\n', file);
--
2.33.1