[FREELDR] Force alignment of .text section on disk

Fixes boot for clang & GCC-amd64 build
Also rename freeldr_i386.lds to freeldr_gcc.lds for better clarity
This commit is contained in:
Jérôme Gardou 2021-04-12 14:15:33 +02:00 committed by Jérôme Gardou
parent 7513cc9fca
commit 2bf116359b
2 changed files with 3 additions and 3 deletions

View file

@ -293,9 +293,9 @@ if(MSVC)
remove_target_compile_option(freeldr_common "/hotpatch")
else()
add_target_link_flags(freeldr_pe "-Wl,--strip-all,--exclude-all-symbols,--file-alignment,0x200,--section-alignment,0x200")
add_linker_script(freeldr_pe freeldr_i386.lds)
add_linker_script(freeldr_pe freeldr_gcc.lds)
add_target_link_flags(freeldr_pe_dbg "-Wl,--exclude-all-symbols,--file-alignment,0x200,--section-alignment,0x200")
add_linker_script(freeldr_pe_dbg freeldr_i386.lds)
add_linker_script(freeldr_pe_dbg freeldr_gcc.lds)
endif()
set_image_base(freeldr_pe 0x10000)

View file

@ -1,6 +1,6 @@
SECTIONS
{
.text __image_base__ + __section_alignment__ :
.text __image_base__ + __section_alignment__ : ALIGN(__file_alignment__)
{
*(.text)
*(SORT(.text*))