aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-09-02 22:54:23 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-09-02 22:54:23 -0700
commit7b66eb0c73c6c1b740d794ef49561aa1086a1197 (patch)
tree0282720644550011e2af46ae4e331d08913b6c43
parentb589ce43874fe8fab27d2c11f783ad8146d71ba2 (diff)
parentdc10f7b8d3d500fe9efd389eb01bb111644d74ae (diff)
downloadbak.git-7b66eb0c73c6c1b740d794ef49561aa1086a1197.tar.gz
bak.git-7b66eb0c73c6c1b740d794ef49561aa1086a1197.tar.xz
bak.git-7b66eb0c73c6c1b740d794ef49561aa1086a1197.zip
Merge branch 'fsc' into elflink
-rw-r--r--core/layout.inc1
-rw-r--r--core/pm.inc5
-rw-r--r--core/syslinux.ld14
3 files changed, 17 insertions, 3 deletions
diff --git a/core/layout.inc b/core/layout.inc
index 3df07721..c67105ad 100644
--- a/core/layout.inc
+++ b/core/layout.inc
@@ -38,6 +38,7 @@ LATEBSS_START equ 0B800h
section .earlybss nobits
section .config write progbits align=4
section .replacestub exec write progbits align=16
+ section .gentextnr exec write nobits align=16
; Use .bss16 for things that doesn't have to be in low memory;
; .earlybss should be used for things that absolutely have
diff --git a/core/pm.inc b/core/pm.inc
index 873da08a..9584cda1 100644
--- a/core/pm.inc
+++ b/core/pm.inc
@@ -440,10 +440,11 @@ pm_init:
section .earlybss
alignb 8
IDT: resq 256
-IRQStubs: resb 4*256+3*8
-
RealModeSSSP resd 1 ; Real-mode SS:SP
+ section .gentextnr ; Autogenerated 32-bit code
+IRQStubs: resb 4*256+3*8
+
section .text16
%include "callback.inc" ; Real-mode callbacks
diff --git a/core/syslinux.ld b/core/syslinux.ld
index 92ad3aa3..cb15ca09 100644
--- a/core/syslinux.ld
+++ b/core/syslinux.ld
@@ -61,7 +61,9 @@ SECTIONS
__config_len = __config_end - __config_start;
__config_dwords = (__config_len + 3) >> 2;
- . = ALIGN(16);
+ /* Generated and/or copied code */
+
+ . = ALIGN(128); /* Minimum separation from mutable data */
.replacestub : AT (__replacestub_lma) {
__replacestub_start = .;
*(.replacestub)
@@ -70,6 +72,16 @@ SECTIONS
__replacestub_len = __replacestub_end - __replacestub_start;
__replacestub_dwords = (__replacestub_len + 3) >> 2;
+ . = ALIGN(16);
+ __gentextnr_lma = .;
+ .gentextnr : AT(__gentextnr_lma) {
+ __gentextnr_start = .;
+ *(.gentextnr)
+ __gentextnr_end = .;
+ }
+ __gentextnr_len = __gentextnr_end - __gentextnr_start;
+ __gentextnr_dwords = (__gentextnr_len + 3) >> 2;
+
/* 16-bit stack */
STACK16_BASE = 0x7c00 - STACK16_LEN;