On 28 July 2015 at 20:51, Jordan Justen <jordan.l.jus...@intel.com> wrote: > On 2015-07-24 05:08:40, Ard Biesheuvel wrote: >> Drop the GCC 4.4/X86 and 4.9/X86 specific linker scripts and use >> the new unified one instead. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> >> --- >> BaseTools/Conf/tools_def.template | 6 ++- >> BaseTools/Scripts/gcc-4K-align-ld-script | 44 -------------------- >> BaseTools/Scripts/gcc4.4-ld-script | 44 -------------------- >> BaseTools/Scripts/gcc4.9-ld-script | 44 -------------------- >> 4 files changed, 4 insertions(+), 134 deletions(-) >> >> diff --git a/BaseTools/Conf/tools_def.template >> b/BaseTools/Conf/tools_def.template >> index b29912c18e5b..84f1fda37661 100644 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -3813,6 +3813,8 @@ NOOPT_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /LTCG /DLL /OPT:REF >> DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = >> --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug >> RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG = >> >> +*_*_IA32_DLINK2_FLAGS = --defsym=PECOFF_HEADER_SIZE=0x220 >> --script=$(EDK_TOOLS_PATH)/Scripts/GCC/gcc-base.lds >> +*_*_X64_DLINK2_FLAGS = --defsym=PECOFF_HEADER_SIZE=0x228 >> --script=$(EDK_TOOLS_PATH)/Scripts/GCC/gcc-base.lds >> *_*_AARCH64_DLINK2_FLAGS = --defsym=PECOFF_HEADER_SIZE=0x228 >> --script=$(EDK_TOOLS_PATH)/Scripts/GCC/gcc-base.lds >> >> DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar >> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h >> @@ -3848,7 +3850,7 @@ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O >> elf64-littleaarch64 -B aarch64 >> DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar >> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections >> -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings >> DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 >> -malign-double -fno-stack-protector -D EFI32 >> DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 >> -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" >> -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large >> -DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections >> --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script >> +DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections -z >> common-page-size=0x20 > > Any idea how old -z common-page-size is? >
It was added to binutils 2.17 in 2006 -- Ard. >> DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) >> --entry ReferenceAcpiTable -u ReferenceAcpiTable >> DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) >> --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map >> $(DEST_DIR_DEBUG)/$(BASE_NAME).map >> DEFINE GCC44_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) >> -melf_x86_64 --oformat=elf64-x86-64 >> @@ -3908,7 +3910,7 @@ DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = >> DEF(GCC47_AARCH64_ASLDLINK_FLAGS) >> >> DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) >> DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) >> -DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections >> --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.9-ld-script >> +DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections -z >> common-page-size=0x40 >> DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) >> --entry ReferenceAcpiTable -u ReferenceAcpiTable >> DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) >> --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map >> $(DEST_DIR_DEBUG)/$(BASE_NAME).map >> DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) >> -melf_x86_64 --oformat=elf64-x86-64 >> diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script >> b/BaseTools/Scripts/gcc-4K-align-ld-script >> deleted file mode 100644 >> index 16cf623a3362..000000000000 >> --- a/BaseTools/Scripts/gcc-4K-align-ld-script >> +++ /dev/null >> @@ -1,44 +0,0 @@ >> -/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ >> -SECTIONS >> -{ >> - /* . = 0 + SIZEOF_HEADERS; */ >> - . = 0x280; >> - .text : ALIGN(0x1000) >> - { >> - *(.text .stub .text.* .gnu.linkonce.t.*) >> - . = ALIGN(0x20); >> - } >> - .data : ALIGN(0x1000) >> - { >> - *( >> - .rodata .rodata.* .gnu.linkonce.r.* >> - .data .data.* .gnu.linkonce.d.* >> - .bss .bss.* >> - *COM* >> - ) >> - . = ALIGN(0x20); >> - } >> - .eh_frame : ALIGN(0x1000) >> - { >> - KEEP (*(.eh_frame)) >> - } >> - .got : ALIGN(0x1000) >> - { >> - *(.got .got.*) >> - . = ALIGN(0x20); >> - } >> - .rela : ALIGN(0x1000) >> - { >> - *(.rela .rela.*) >> - } >> - /DISCARD/ : { >> - *(.note.GNU-stack) *(.gnu_debuglink) >> - *(.interp) >> - *(.dynsym) >> - *(.dynstr) >> - *(.dynamic) >> - *(.hash) >> - *(.comment) >> - } >> -} >> - >> diff --git a/BaseTools/Scripts/gcc4.4-ld-script >> b/BaseTools/Scripts/gcc4.4-ld-script >> deleted file mode 100644 >> index 68b2767590ac..000000000000 >> --- a/BaseTools/Scripts/gcc4.4-ld-script >> +++ /dev/null >> @@ -1,44 +0,0 @@ >> -/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ >> -SECTIONS >> -{ >> - /* . = 0 + SIZEOF_HEADERS; */ >> - . = 0x280; >> - .text ALIGN(0x20) : >> - { >> - *(.text .stub .text.* .gnu.linkonce.t.*) >> - . = ALIGN(0x20); >> - } =0x90909090 >> - .data ALIGN(0x20) : >> - { >> - *( >> - .rodata .rodata.* .gnu.linkonce.r.* >> - .data .data.* .gnu.linkonce.d.* >> - .bss .bss.* >> - *COM* >> - ) >> - . = ALIGN(0x20); >> - } >> - .eh_frame ALIGN(0x20) : >> - { >> - KEEP (*(.eh_frame)) >> - } >> - .got ALIGN(0x20) : >> - { >> - *(.got .got.*) >> - . = ALIGN(0x20); >> - } >> - .rela ALIGN(0x20) : >> - { >> - *(.rela .rela.*) >> - } >> - /DISCARD/ : { >> - *(.note.GNU-stack) *(.gnu_debuglink) >> - *(.interp) >> - *(.dynsym) >> - *(.dynstr) >> - *(.dynamic) >> - *(.hash) >> - *(.comment) >> - } >> -} >> - >> diff --git a/BaseTools/Scripts/gcc4.9-ld-script >> b/BaseTools/Scripts/gcc4.9-ld-script >> deleted file mode 100644 >> index b69232853617..000000000000 >> --- a/BaseTools/Scripts/gcc4.9-ld-script >> +++ /dev/null >> @@ -1,44 +0,0 @@ >> -/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ >> -SECTIONS >> -{ >> - /* . = 0 + SIZEOF_HEADERS; */ >> - . = 0x280; >> - .text ALIGN(0x20) : >> - { >> - *(.text .stub .text.* .gnu.linkonce.t.*) >> - . = ALIGN(0x20); >> - } =0x90909090 >> - .data ALIGN(0x40) : >> - { >> - *( >> - .rodata .rodata.* .gnu.linkonce.r.* >> - .data .data.* .gnu.linkonce.d.* >> - .bss .bss.* >> - *COM* >> - ) >> - . = ALIGN(0x20); >> - } >> - .eh_frame ALIGN(0x20) : >> - { >> - KEEP (*(.eh_frame)) >> - } >> - .got ALIGN(0x20) : >> - { >> - *(.got .got.*) >> - . = ALIGN(0x20); >> - } >> - .rela ALIGN(0x20) : >> - { >> - *(.rela .rela.*) >> - } >> - /DISCARD/ : { >> - *(.note.GNU-stack) *(.gnu_debuglink) >> - *(.interp) >> - *(.dynsym) >> - *(.dynstr) >> - *(.dynamic) >> - *(.hash) >> - *(.comment) >> - } >> -} >> - >> -- >> 1.9.1 >> _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel