Discard all sections except .text and .elf in PE linker

This commit is contained in:
Aiden Isik 2025-02-28 17:44:31 +00:00
parent a69cfac73e
commit 17e12fb9cd

View file

@ -15,14 +15,13 @@ SECTIONS
. = SIZEOF_HEADERS;
.text __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :
{
KEEP (*(SORT_NONE(.init)))
*(.text)
*(SORT(.text$*))
*(.text.*)
}
.elf ALIGN(__section_alignment__) :
{
*(.elf*)
*(.elf)
}
/DISCARD/ : {*(*)}
}