From 7e6561708a0a7a4d748376c57270e4b753a82ed5 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Mon, 4 May 2020 20:24:16 -0700 Subject: [PATCH] layout.ld: Remove EDK2's /DISCARD/ section This was just copied over, but isn't necessary. The only data this removes is the `.comment` section, but it's fine (and even desireable) to leave that in. Signed-off-by: Joe Richey --- layout.ld | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/layout.ld b/layout.ld index c704c871..045471ba 100644 --- a/layout.ld +++ b/layout.ld @@ -38,18 +38,6 @@ SECTIONS /* ram32.s only maps the first 2 MiB, and that must include the stack. */ ASSERT((. <= 2M), "Stack overflows initial identity-mapped memory region") - /* Match edk2's GccBase.lds DISCARD section */ - /DISCARD/ : { - *(.note.GNU-stack) - *(.gnu_debuglink) - *(.interp) - *(.dynsym) - *(.dynstr) - *(.dynamic) - *(.hash .gnu.hash) - *(.comment) - *(COMMON) - } /* Strip symbols from the output binary (comment out to get symbols) */ /DISCARD/ : { *(.symtab)