diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-06-29 03:20:25 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-06-29 03:20:25 +0000 |
commit | 16e3d2e89f1d044cd97009cf567044fbc1f22f03 (patch) | |
tree | bd83f319107bbef5c4aa865df3beeabe70a78d0c /BaseTools | |
parent | 54b1b57a59b5297304a8d7fd3838e1122bebc2b2 (diff) | |
download | edk2-16e3d2e89f1d044cd97009cf567044fbc1f22f03.tar.gz edk2-16e3d2e89f1d044cd97009cf567044fbc1f22f03.tar.bz2 edk2-16e3d2e89f1d044cd97009cf567044fbc1f22f03.zip |
BaseTools: Added GCC ld script to support 4K alignment.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17728 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Scripts/gcc-4K-align-ld-script | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script b/BaseTools/Scripts/gcc-4K-align-ld-script new file mode 100644 index 0000000000..1f23079023 --- /dev/null +++ b/BaseTools/Scripts/gcc-4K-align-ld-script @@ -0,0 +1,44 @@ +/* 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)
+ }
+}
+
|