From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id E60663857C65; Tue, 19 Oct 2021 18:12:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E60663857C65 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_clean)] 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_clean X-Git-Oldrev: 7ade9d11e42346161b5b7a74be7f3fa1d943c96b X-Git-Newrev: 3c3203cb044be5bdaf794e592a5d2d456921cc6b Message-Id: <20211019181242.E60663857C65@sourceware.org> Date: Tue, 19 Oct 2021 18:12:42 +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: Tue, 19 Oct 2021 18:12:43 -0000 https://gcc.gnu.org/g:3c3203cb044be5bdaf794e592a5d2d456921cc6b commit 3c3203cb044be5bdaf794e592a5d2d456921cc6b 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... gcc/ChangeLog 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. Diff: --- 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);