From dafe0fedc5085b6f117068ef1faacb6176512d87 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 28 Jul 2014 17:37:10 +0000 Subject: BaseTools: Add GCC49 toolchain; align data sections to 0x40 GCC 4.9 may use 64-byte (0x40) alignment for data sections. Therefore we use a different link script for GCC 4.9. The only difference from the gcc4.4-ld-script is the alignment for data sections. When using the GCC48 toolchain with GCC 4.9, this error would be encountered by GenFw: > GenFw: ERROR 3000: Invalid > Unsupported section alignment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen Reviewed-by: Yingke Liu git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15697 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Scripts/gcc4.9-ld-script | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 BaseTools/Scripts/gcc4.9-ld-script (limited to 'BaseTools/Scripts') diff --git a/BaseTools/Scripts/gcc4.9-ld-script b/BaseTools/Scripts/gcc4.9-ld-script new file mode 100644 index 0000000000..b692328536 --- /dev/null +++ b/BaseTools/Scripts/gcc4.9-ld-script @@ -0,0 +1,44 @@ +/* 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) + } +} + -- cgit v1.2.3