]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools GCC: move AutoGen.obj contents to .text section
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 3 Aug 2015 08:22:50 +0000 (08:22 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Mon, 3 Aug 2015 08:22:50 +0000 (08:22 +0000)
commit233bd25b000f92fc4bbe181fa48edcd72808de8e
tree16861c9c46c0fe2145a2b57d5f8a5e8909bfc452
parent56948ba190b8920f38564050e1c2742b967a4d13
BaseTools GCC: move AutoGen.obj contents to .text section

All AutoGen.obj files consist of global GUID definitions, fixed
and patchable PCDs and other data that is essentially read-only at
runtime but has not been declared as such for various reasons.

By moving these contents to .text we achieve two things:
- global GUIDs and other data items which must be constant for correct
  program operation can no longer be modified, for instance, when
  running a DXE_RUNTIME_MODULE binary under the OS with the Properties
  Table feature for memory protection enabled;
- the .data section becomes smaller, and may be dropped completely for
  many XIP modules, which reduces wasted FV space if the PE/COFF section
  alignment is large.

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>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18137 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Scripts/GccBase.lds