From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id 4B6DD3857C50; Mon, 11 Oct 2021 20:49:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B6DD3857C50 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Giuliano Belinassi To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/giulianob/heads/pfe_backport)] Backport targhooks.c (default_print_patchable_function_entry): Emit __patchable_function_entries sec X-Act-Checkin: gcc X-Git-Author: Joao Moreira X-Git-Refname: refs/users/giulianob/heads/pfe_backport X-Git-Oldrev: 54f740be2954f2b2676a407e96ffc269f22c7250 X-Git-Newrev: adb3e20ce0d7135e33f4944985ea7a9a436cc924 Message-Id: <20211011204947.4B6DD3857C50@sourceware.org> Date: Mon, 11 Oct 2021 20:49:47 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2021 20:49:47 -0000 https://gcc.gnu.org/g:adb3e20ce0d7135e33f4944985ea7a9a436cc924 commit adb3e20ce0d7135e33f4944985ea7a9a436cc924 Author: Joao Moreira Date: Wed Apr 17 18:24:23 2019 +0000 Backport targhooks.c (default_print_patchable_function_entry): Emit __patchable_function_entries section with writable flags to allow... * targhooks.c (default_print_patchable_function_entry): Emit __patchable_function_entries section with writable flags to allow relocation resolution. Diff: --- gcc/ChangeLog | 10 ++++++++++ gcc/targhooks.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c5cf067063..5ef0ef30c1c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ + +2021-10-07 Giuliano Belinassi + + Backport from mainline + 2019-04-10 Joao Moreira + + * targhooks.c (default_print_patchable_function_entry): Emit + __patchable_function_entries section with writable flags to allow + relocation resolution. + 2021-10-07 Giuliano Belinassi Backport from mainline 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);