targhooks.c (default_print_patchable_function_entry): Emit __patchable_function_entri...
authorJoao Moreira <jmoreira@suse.de>
Wed, 17 Apr 2019 18:24:23 +0000 (18:24 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 17 Apr 2019 18:24:23 +0000 (12:24 -0600)
* targhooks.c (default_print_patchable_function_entry): Emit
__patchable_function_entries section with writable flags to allow
relocation resolution.

From-SVN: r270417

gcc/ChangeLog
gcc/targhooks.c

index a886044d33be486c9d65f29ecac4b4a1c1ed8766..d18462109b06a5360128927917aa337138bbebb1 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2019-04-17  Jonny Grant  <jg@jguk.org>
 
         * collect2.c (main): Change gcc.gnu.org URL to HTTPS.
index cfde248dd3db09d908850478ff9c07574803c085..02b9dc59611699de7bb637850f927ec752916aa4 100644 (file)
@@ -1818,7 +1818,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);