summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Scripts/GccBase.lds7
1 files changed, 7 insertions, 0 deletions
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds
index 3d99f01db2..4ee6d99853 100644
--- a/BaseTools/Scripts/GccBase.lds
+++ b/BaseTools/Scripts/GccBase.lds
@@ -29,6 +29,13 @@ SECTIONS {
*(.text .text.* .stub .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.got .got.*)
+
+ /*
+ * The contents of AutoGen.c files are constant from the POV of the program,
+ * but most of its contents end up in .data or .bss by default since few of
+ * the variable definitions that get emitted are declared as CONST.
+ */
+ *:AutoGen.obj(.data .data.* .bss .bss.*)
}
/*