audk/BaseTools/Scripts
Ard Biesheuvel 3cf41b8728 BaseTools: GCC: move most AutoGen.obj contents back to .data section
The generated AutoGen.c files mostly contain read-only data, but due to
lacking annotations, all of it is emitted into the .data section by the
compiler.

Given that GUIDs are UEFI's gaffer tape, having writable GUIDs is a
security hazard, and this was the main rationale for putting AutoGen.obj
in the .text section. However, as it turns out, patchable PCDs are emitted
there as well, which can legally be modified at runtime.

So update the wildcard pattern to only match g...Guid sections, and move
everything else back to .data (Note that this relies on -fdata-sections,
without that option, everything is emitted into .data)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Fixes: 233bd25b00
[lersek@redhat.com: add reference to previous commit being fixed up]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2017-02-24 11:27:56 +01:00
..
BinToPcd.py BaseTools/Scripts: Add BinToPcd utility 2016-11-14 08:40:41 -08:00
ConvertMasmToNasm.py BaseTools ConvertMasmToNasm: Don't try to reconvert .nasm files 2016-06-28 13:16:53 -07:00
ConvertUni.py BaseTools/Scripts: Add ConvertUni.py script 2015-12-15 04:50:50 +00:00
GccBase.lds BaseTools: GCC: move most AutoGen.obj contents back to .data section 2017-02-24 11:27:56 +01:00
MemoryProfileSymbolGen.py BaseTools MemoryProfileSymbolGen.py: Handle 64bits rva from "nm -l xxx.dll" 2016-07-05 17:25:38 +08:00
PatchCheck.py BaseTools/PatchCheck.py: Update to report error for EFI_D_* 2016-10-21 07:28:01 +08:00
Rvct-Align4K.sct BaseTools RVCT: use scatter file to enforce minimum section alignment 2015-12-14 07:55:46 +00:00
Rvct-Align32.sct BaseTools RVCT: use scatter file to enforce minimum section alignment 2015-12-14 07:55:46 +00:00
SetVisualStudio.bat BaseTools: Update Scripts to support VS2015 env 2015-12-22 01:01:54 +00:00
ShowEnvironment.bat BaseTools: Update Scripts to support VS2015 env 2015-12-22 01:01:54 +00:00
SmiHandlerProfileSymbolGen.py BaseTool/Script: Add SmiHandleProfile OS tool to get symbol. 2017-02-22 15:28:22 +08:00
UpdateBuildVersions.py 1. Update UpdateBuildVersion.py; 2015-02-06 03:40:27 +00:00