aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoao Moreira <jmoreira@suse.de>2019-04-17 18:24:23 +0000
committerJeff Law <law@gcc.gnu.org>2019-04-17 12:24:23 -0600
commit62a64d0af19020933e975c9b942f5b4f0b7d3ca5 (patch)
tree68899beeb386c5c7b04a6c2ca55265b5ffc596b6
parente050689bb868697eb893b24877efc749b7730562 (diff)
downloadgcc-62a64d0af19020933e975c9b942f5b4f0b7d3ca5.zip
gcc-62a64d0af19020933e975c9b942f5b4f0b7d3ca5.tar.gz
gcc-62a64d0af19020933e975c9b942f5b4f0b7d3ca5.tar.bz2
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. From-SVN: r270417
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/targhooks.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a886044..d184621 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index cfde248..02b9dc5 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -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);