BaseTools IA32/X64: get header size and alignment from ld commandline
Instead of hardcoding the values for the PE/COFF header size and the section alignment, set them on the linker command line. This factors out these values from the various linker scripts, which will allow us to unify them in a subsequent patch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18134 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
abiesheuvel
parent
25e63063e3
commit
c28a4ab663
@ -2,14 +2,14 @@
|
||||
SECTIONS
|
||||
{
|
||||
/* . = 0 + SIZEOF_HEADERS; */
|
||||
. = 0x280;
|
||||
.text : ALIGN(0x1000)
|
||||
. = PECOFF_HEADER_SIZE;
|
||||
.text : ALIGN(CONSTANT(COMMONPAGESIZE))
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
*(.got .got.*)
|
||||
}
|
||||
.data : ALIGN(0x1000)
|
||||
.data : ALIGN(CONSTANT(COMMONPAGESIZE))
|
||||
{
|
||||
*(
|
||||
.data .data.* .gnu.linkonce.d.*
|
||||
@ -17,11 +17,11 @@ SECTIONS
|
||||
*COM*
|
||||
)
|
||||
}
|
||||
.eh_frame : ALIGN(0x1000)
|
||||
.eh_frame : ALIGN(CONSTANT(COMMONPAGESIZE))
|
||||
{
|
||||
KEEP (*(.eh_frame))
|
||||
}
|
||||
.rela : ALIGN(0x1000)
|
||||
.rela : ALIGN(CONSTANT(COMMONPAGESIZE))
|
||||
{
|
||||
*(.rela .rela.*)
|
||||
}
|
||||
|
Reference in New Issue
Block a user