]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* targhooks.c (default_print_patchable_function_entry): Emit
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Apr 2019 18:24:23 +0000 (18:24 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Apr 2019 18:24:23 +0000 (18:24 +0000)
__patchable_function_entries section with writable flags to allow
relocation resolution.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270417 138bc75d-0d04-0410-961f-82ee72b054a4

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);