mirror of https://github.com/acidanthera/audk.git
3cf41b8728
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:
|
||
---|---|---|
.. | ||
BinToPcd.py | ||
ConvertMasmToNasm.py | ||
ConvertUni.py | ||
GccBase.lds | ||
MemoryProfileSymbolGen.py | ||
PatchCheck.py | ||
Rvct-Align4K.sct | ||
Rvct-Align32.sct | ||
SetVisualStudio.bat | ||
ShowEnvironment.bat | ||
SmiHandlerProfileSymbolGen.py | ||
UpdateBuildVersions.py |