From c4a59af8c1f154a5203da16378fb90f93f3fb3ba Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Mon, 3 Aug 2015 08:23:59 +0000 Subject: [PATCH] BaseTools IA32/X64: Use GccBase.lds instead of gcc*-ld-script These scripts all now have the same contents, so we only need to use GccBase.lds. Therefore we can delete gcc-4K-align-ld-script, gcc4.4-ld-script and gcc4.9-ld-script. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Jordan Justen Tested-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18142 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Conf/tools_def.template | 8 ++--- BaseTools/Scripts/gcc-4K-align-ld-script | 38 ------------------------ BaseTools/Scripts/gcc4.4-ld-script | 38 ------------------------ BaseTools/Scripts/gcc4.9-ld-script | 38 ------------------------ 4 files changed, 4 insertions(+), 118 deletions(-) delete mode 100644 BaseTools/Scripts/gcc-4K-align-ld-script delete mode 100644 BaseTools/Scripts/gcc4.4-ld-script delete mode 100644 BaseTools/Scripts/gcc4.9-ld-script diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index f5e27cfc34..eeb488fb35 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3850,9 +3850,9 @@ DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-p DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections -z common-page-size=0x20 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_IA32_DLINK2_FLAGS = --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script --defsym=PECOFF_HEADER_SIZE=0x220 +DEFINE GCC44_IA32_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x220 DEFINE GCC44_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64 -DEFINE GCC44_X64_DLINK2_FLAGS = --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script --defsym=PECOFF_HEADER_SIZE=0x228 +DEFINE GCC44_X64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x228 DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEFINE GCC45_IA32_CC_FLAGS = DEF(GCC44_IA32_CC_FLAGS) @@ -3922,9 +3922,9 @@ DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) 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_IA32_DLINK2_FLAGS = --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.9-ld-script --defsym=PECOFF_HEADER_SIZE=0x220 +DEFINE GCC49_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS) DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64 -DEFINE GCC49_X64_DLINK2_FLAGS = --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.9-ld-script --defsym=PECOFF_HEADER_SIZE=0x228 +DEFINE GCC49_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS) DEFINE GCC49_ASM_FLAGS = DEF(GCC48_ASM_FLAGS) DEFINE GCC49_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS) DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS) diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script b/BaseTools/Scripts/gcc-4K-align-ld-script deleted file mode 100644 index 51daae04d8..0000000000 --- a/BaseTools/Scripts/gcc-4K-align-ld-script +++ /dev/null @@ -1,38 +0,0 @@ -/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ -SECTIONS -{ - /* . = 0 + SIZEOF_HEADERS; */ - . = PECOFF_HEADER_SIZE; - .text : ALIGN(CONSTANT(COMMONPAGESIZE)) - { - *(.text .stub .text.* .gnu.linkonce.t.*) - *(.rodata .rodata.* .gnu.linkonce.r.*) - *(.got .got.*) - } - .data : ALIGN(CONSTANT(COMMONPAGESIZE)) - { - *( - .data .data.* .gnu.linkonce.d.* - .bss .bss.* - *COM* - ) - } - .eh_frame : ALIGN(CONSTANT(COMMONPAGESIZE)) - { - KEEP (*(.eh_frame)) - } - .rela : ALIGN(CONSTANT(COMMONPAGESIZE)) - { - *(.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 ebb2e1d1b7..0000000000 --- a/BaseTools/Scripts/gcc4.4-ld-script +++ /dev/null @@ -1,38 +0,0 @@ -/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ -SECTIONS -{ - /* . = 0 + SIZEOF_HEADERS; */ - . = PECOFF_HEADER_SIZE; - .text ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - *(.text .stub .text.* .gnu.linkonce.t.*) - *(.rodata .rodata.* .gnu.linkonce.r.*) - *(.got .got.*) - } - .data ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - *( - .data .data.* .gnu.linkonce.d.* - .bss .bss.* - *COM* - ) - } - .eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - KEEP (*(.eh_frame)) - } - .rela ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - *(.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 ebb2e1d1b7..0000000000 --- a/BaseTools/Scripts/gcc4.9-ld-script +++ /dev/null @@ -1,38 +0,0 @@ -/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */ -SECTIONS -{ - /* . = 0 + SIZEOF_HEADERS; */ - . = PECOFF_HEADER_SIZE; - .text ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - *(.text .stub .text.* .gnu.linkonce.t.*) - *(.rodata .rodata.* .gnu.linkonce.r.*) - *(.got .got.*) - } - .data ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - *( - .data .data.* .gnu.linkonce.d.* - .bss .bss.* - *COM* - ) - } - .eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - KEEP (*(.eh_frame)) - } - .rela ALIGN(CONSTANT(COMMONPAGESIZE)) : - { - *(.rela .rela.*) - } - /DISCARD/ : { - *(.note.GNU-stack) *(.gnu_debuglink) - *(.interp) - *(.dynsym) - *(.dynstr) - *(.dynamic) - *(.hash) - *(.comment) - } -} -