mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
BaseTools IA32/X64: move .rodata to PE/COFF .text section
The .rodata ELF section contains constant non-executable data that should never be modified by the program itself. Since the risk of inadvertent modification is typically higher than the risk of inadvertent execution, it makes sense to put this data in the R-X .text section rather than in the RW- .data section. So move it there. 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@18131 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e90ba6e1ea
commit
fa1d29d5cc
@ -6,12 +6,12 @@ SECTIONS
|
||||
.text : ALIGN(0x1000)
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
. = ALIGN(0x20);
|
||||
}
|
||||
.data : ALIGN(0x1000)
|
||||
{
|
||||
*(
|
||||
.rodata .rodata.* .gnu.linkonce.r.*
|
||||
.data .data.* .gnu.linkonce.d.*
|
||||
.bss .bss.*
|
||||
*COM*
|
||||
|
@ -6,12 +6,12 @@ SECTIONS
|
||||
.text ALIGN(0x20) :
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
. = ALIGN(0x20);
|
||||
}
|
||||
.data ALIGN(0x20) :
|
||||
{
|
||||
*(
|
||||
.rodata .rodata.* .gnu.linkonce.r.*
|
||||
.data .data.* .gnu.linkonce.d.*
|
||||
.bss .bss.*
|
||||
*COM*
|
||||
|
@ -6,12 +6,12 @@ SECTIONS
|
||||
.text ALIGN(0x20) :
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
. = ALIGN(0x20);
|
||||
}
|
||||
.data ALIGN(0x40) :
|
||||
{
|
||||
*(
|
||||
.rodata .rodata.* .gnu.linkonce.r.*
|
||||
.data .data.* .gnu.linkonce.d.*
|
||||
.bss .bss.*
|
||||
*COM*
|
||||
|
Loading…
x
Reference in New Issue
Block a user