mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-11-04 12:54:17 +00:00 
			
		
		
		
	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
		
			
				
	
	
		
			39 lines
		
	
	
		
			736 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			736 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/* 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)
 | 
						|
  }
 | 
						|
}
 | 
						|
 |