<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff -rupN gcc/config/arm/aout.h gcc.patched/config/arm/aout.h
--- gcc/config/arm/aout.h	2020-12-22 16:14:14.213531654 +0000
+++ gcc.patched/config/arm/aout.h	2020-12-22 16:13:33.765007590 +0000
@@ -31,9 +31,13 @@
 #endif
 
 /* Switch to the text or data segment.  */
-#define TEXT_SECTION_ASM_OP  	"\t.text"
-#define DATA_SECTION_ASM_OP  	"\t.data"
-#define BSS_SECTION_ASM_OP   	"\t.bss"
+#define TEXT_SECTION_ASM_OP arm_text_section
+#define DATA_SECTION_ASM_OP arm_data_section
+#undef READONLY_DATA_SECTION_ASM_OP
+#define READONLY_DATA_SECTION_ASM_OP arm_readonly_data_section
+#define BSS_SECTION_ASM_OP arm_bss_section
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION arm_asm_named_section
 
 /* Note: If USER_LABEL_PREFIX or LOCAL_LABEL_PREFIX are changed,
    make sure that this change is reflected in the function
diff -rupN gcc/config/arm/arm.c gcc.patched/config/arm/arm.c
--- gcc/config/arm/arm.c	2020-12-22 16:14:14.225531809 +0000
+++ gcc.patched/config/arm/arm.c	2020-12-22 16:13:33.773007694 +0000
@@ -2418,6 +2418,11 @@ arm_constant_limit (bool size_p)
   return size_p ? 1 : current_tune-&gt;constant_limit;
 }
 
+const char *arm_text_section = "\t" ARM_DEFAULT_TEXT_SECTION_NAME;
+const char *arm_data_section = "\t" ARM_DEFAULT_DATA_SECTION_NAME;
+const char *arm_readonly_data_section = "\t.section " ARM_DEFAULT_READONLY_DATA_SECTION_NAME;
+const char *arm_bss_section = "\t" ARM_DEFAULT_BSS_SECTION_NAME;
+
 /* Emit an insn that's a simple single-set.  Both the operands must be known
    to be valid.  */
 inline static rtx_insn *
@@ -3621,6 +3626,35 @@ arm_option_override (void)
       flag_reorder_blocks = 1;
     }
 
+  if (strcmp(arm_text_string, ARM_DEFAULT_TEXT_SECTION_NAME))
+    {
+      #define ARM_TEXT_SECTION_FORMAT "\t.section\t%s,\"ax\",%%progbits\n"
+      char *tmp = XNEWVEC (char, strlen (arm_text_string) + sizeof (ARM_TEXT_SECTION_FORMAT) + 1);
+      sprintf (tmp, ARM_TEXT_SECTION_FORMAT, arm_text_string);
+      arm_text_section = tmp;
+    }
+  if (strcmp(arm_data_string, ARM_DEFAULT_DATA_SECTION_NAME))
+    {
+      #define ARM_DATA_SECTION_FORMAT "\t.section\t%s,\"aw\",%%progbits\n"
+      char *tmp = XNEWVEC (char, strlen (arm_data_string) + sizeof (ARM_DATA_SECTION_FORMAT) + 1);
+      sprintf (tmp, ARM_DATA_SECTION_FORMAT, arm_data_string);
+      arm_data_section = tmp;
+    }
+  if (strcmp(arm_readonly_data_string, ARM_DEFAULT_READONLY_DATA_SECTION_NAME))
+    {
+      #define ARM_READONLY_DATA_SECTION_FORMAT "\t.section\t%s,\"a\",%%progbits\n"
+      char *tmp = XNEWVEC (char, strlen (arm_readonly_data_string) + sizeof (ARM_READONLY_DATA_SECTION_FORMAT) + 1);
+      sprintf (tmp, ARM_READONLY_DATA_SECTION_FORMAT, arm_readonly_data_string);
+      arm_readonly_data_section = tmp;
+    }
+  if (strcmp(arm_bss_string, ARM_DEFAULT_BSS_SECTION_NAME))
+    {
+      #define ARM_BSS_SECTION_FORMAT "\t.section\t%s,\"aw\",%%nobits\n"
+      char *tmp = XNEWVEC (char, strlen (arm_bss_string) + sizeof (ARM_BSS_SECTION_FORMAT) + 1);
+      sprintf (tmp, ARM_BSS_SECTION_FORMAT, arm_bss_string);
+      arm_bss_section = tmp;
+    }
+
   if (flag_pic)
     /* Hoisting PIC address calculations more aggressively provides a small,
        but measurable, size reduction for PIC code.  Therefore, we decrease
@@ -3916,6 +3950,32 @@ arm_fdpic_local_funcdesc_p (rtx fnx)
   return ret;
 }
 
+void arm_asm_named_section (const char *name, unsigned int flags, tree t)
+{
+  char local[1024 * 16];
+  if (strstr(name, ARM_DEFAULT_TEXT_SECTION_NAME ".")==name)
+    {
+      sprintf(local, "%s%s", arm_text_string, name+sizeof(ARM_DEFAULT_TEXT_SECTION_NAME)-1);
+      name = local;
+    }
+  else if (strstr(name, ARM_DEFAULT_DATA_SECTION_NAME ".")==name)
+    {
+      sprintf(local, "%s%s", arm_data_string, name+sizeof(ARM_DEFAULT_DATA_SECTION_NAME)-1);
+      name = local;
+    }
+  else if (strstr(name, ARM_DEFAULT_BSS_SECTION_NAME ".")==name)
+    {
+      sprintf(local, "%s%s", arm_bss_string, name+sizeof(ARM_DEFAULT_BSS_SECTION_NAME)-1);
+      name = local;
+    }
+  else if (strstr(name, ARM_DEFAULT_READONLY_DATA_SECTION_NAME ".")==name)
+    {
+      sprintf(local, "%s%s", arm_readonly_data_string, name+sizeof(ARM_DEFAULT_READONLY_DATA_SECTION_NAME)-1);
+      name = local;
+    }
+  default_elf_asm_named_section(name, flags, t);
+}
+
 static void
 arm_add_gc_roots (void)
 {
diff -rupN gcc/config/arm/arm.h gcc.patched/config/arm/arm.h
--- gcc/config/arm/arm.h	2020-12-22 16:14:14.225531809 +0000
+++ gcc.patched/config/arm/arm.h	2020-12-22 16:13:33.777007746 +0000
@@ -1836,6 +1836,17 @@ enum arm_auto_incmodes
   if (TARGET_THUMB2)			\
     thumb2_asm_output_opcode (STREAM);
 
+#define ARM_DEFAULT_TEXT_SECTION_NAME  ".text"
+#define ARM_DEFAULT_DATA_SECTION_NAME  ".data"
+#define ARM_DEFAULT_READONLY_DATA_SECTION_NAME  ".rodata"
+#define ARM_DEFAULT_BSS_SECTION_NAME ".bss"
+
+extern const char *arm_text_section;
+extern const char *arm_data_section;
+extern const char *arm_readonly_data_section;
+extern const char *arm_bss_section;
+void arm_asm_named_section (const char *name, unsigned int flags, tree t);
+
 /* The EABI specifies that constructors should go in .init_array.
    Other targets use .ctors for compatibility.  */
 #ifndef ARM_EABI_CTORS_SECTION_OP
diff -rupN gcc/config/arm/arm.opt gcc.patched/config/arm/arm.opt
--- gcc/config/arm/arm.opt	2020-12-22 16:14:14.225531809 +0000
+++ gcc.patched/config/arm/arm.opt	2020-12-22 16:13:33.777007746 +0000
@@ -275,6 +275,22 @@ munaligned-access
 Target Report Var(unaligned_access) Init(2) Save
 Enable unaligned word and halfword accesses to packed data.
 
+mtext=
+Target RejectNegative Joined Var(arm_text_string) Init(ARM_DEFAULT_TEXT_SECTION_NAME)
+-mtext=SECTION Put functions in SECTION
+
+mdata=
+Target RejectNegative Joined Var(arm_data_string) Init(ARM_DEFAULT_DATA_SECTION_NAME)
+-mdata=SECTION Put data in SECTION
+
+mrodata=
+Target RejectNegative Joined Var(arm_readonly_data_string) Init(ARM_DEFAULT_READONLY_DATA_SECTION_NAME)
+-mrodata=SECTION Put read-only data in SECTION
+
+mbss=
+Target RejectNegative Joined Var(arm_bss_string) Init(ARM_DEFAULT_BSS_SECTION_NAME)
+-mbss=SECTION Put zeroed data in SECTION
+
 mneon-for-64bits
 Target WarnRemoved
 This option is deprecated and has no effect.
diff -rupN gcc/config/host-darwin.c gcc.patched/config/host-darwin.c
--- gcc/config/host-darwin.c	2020-12-22 16:14:14.129530565 +0000
+++ gcc.patched/config/host-darwin.c	2020-12-22 16:13:33.777007746 +0000
@@ -24,7 +24,7 @@
 #include "config/host-darwin.h"
 
 /* Yes, this is really supposed to work.  */
-static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
+static char pch_address_space[1024*1024*1024] __attribute__((aligned (16384)));
 
 /* Return the address of the PCH address space, if the PCH will fit in it.  */
 
diff -rupN gcc/config.host gcc.patched/config.host
--- gcc/config.host	2020-12-22 16:14:13.533522844 +0000
+++ gcc.patched/config.host	2020-12-22 16:13:33.777007746 +0000
@@ -251,7 +251,7 @@ case ${host} in
     host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
     host_lto_plugin_soname=liblto_plugin-0.dll
     ;;
-  i[34567]86-*-darwin* | x86_64-*-darwin*)
+  i[34567]86-*-darwin* | x86_64-*-darwin* | arm-*-darwin*)
     out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
     host_xmake_file="${host_xmake_file} i386/x-darwin"
     ;;
diff -rupN gcc/dwarf2out.c gcc.patched/dwarf2out.c
--- gcc/dwarf2out.c	2020-12-22 16:14:13.417521339 +0000
+++ gcc.patched/dwarf2out.c	2020-12-22 16:13:33.785007850 +0000
@@ -27861,7 +27861,7 @@ dwarf2out_source_line (unsigned int line
   dw_line_info_table *table;
   static var_loc_view lvugid;
 
-  if (debug_info_level &lt; DINFO_LEVEL_TERSE)
+  if (debug_info_level &lt; DINFO_LEVEL_NORMAL)
     return;
 
   table = cur_line_info_table;
@@ -31481,7 +31481,7 @@ dwarf2out_finish (const char *filename)
   if (XCOFF_DEBUGGING_INFO)
     strcat (dl_section_ref, DWARF_INITIAL_LENGTH_SIZE_STR);
 
-  if (debug_info_level &gt;= DINFO_LEVEL_TERSE)
+  if (debug_info_level &gt;= DINFO_LEVEL_NORMAL)
     add_AT_lineptr (main_comp_unit_die, DW_AT_stmt_list,
 		    dl_section_ref);
 
</pre></body></html>