summaryrefslogtreecommitdiffstats
path: root/BaseTools/Scripts/GccBase.lds
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Scripts/GccBase.lds')
-rw-r--r--BaseTools/Scripts/GccBase.lds14
1 files changed, 11 insertions, 3 deletions
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds
index 582d00ccba..8d6c29d7b6 100644
--- a/BaseTools/Scripts/GccBase.lds
+++ b/BaseTools/Scripts/GccBase.lds
@@ -10,6 +10,12 @@
**/
+PHDRS {
+ text PT_LOAD FLAGS(5); /* R_X */
+ data PT_LOAD FLAGS(6); /* RW_ */
+ dynamic PT_DYNAMIC FLAGS(4); /* R__ */
+}
+
SECTIONS {
/*
@@ -35,7 +41,7 @@ SECTIONS {
* emitted GUIDs here.
*/
*:AutoGen.obj(.data.g*Guid)
- }
+ } :text
/*
* The alignment of the .data section should be less than or equal to the
@@ -46,19 +52,21 @@ SECTIONS {
.data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
*(.data .data.* .gnu.linkonce.d.*)
*(.bss .bss.*)
- }
+ } :data
.eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : {
KEEP (*(.eh_frame))
}
+ .dynamic : { *(.dynamic) } :data :dynamic
+
.rela (INFO) : {
*(.rela .rela.*)
}
.hii : ALIGN(CONSTANT(COMMONPAGESIZE)) {
KEEP (*(.hii))
- }
+ } :data
.got : {
*(.got)