summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Scripts/GccBase.lds6
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds
index 7e4cdde9bf..281af8a9bd 100644
--- a/BaseTools/Scripts/GccBase.lds
+++ b/BaseTools/Scripts/GccBase.lds
@@ -62,6 +62,12 @@ SECTIONS {
KEEP (*(.hii))
}
+ /*
+ * Retain the GNU build id but in a non-allocatable section so GenFw
+ * does not copy it into the PE/COFF image.
+ */
+ .build-id (INFO) : { *(.note.gnu.build-id) }
+
/DISCARD/ : {
*(.note.GNU-stack)
*(.gnu_debuglink)