diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-12-29 20:42:40 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-12-29 20:42:40 -0500 |
commit | 92f95b0fecca029a0c4dd81203e6b42f60c4a382 (patch) | |
tree | 63a9bb2ff504decebbfd73d3a41d22d7c7aaf4be /src/rombios16.lds.S | |
parent | c659fdedadce1566308675d0c44537ade0eb12a2 (diff) | |
download | seabios-hppa-92f95b0fecca029a0c4dd81203e6b42f60c4a382.zip seabios-hppa-92f95b0fecca029a0c4dd81203e6b42f60c4a382.tar.gz seabios-hppa-92f95b0fecca029a0c4dd81203e6b42f60c4a382.tar.bz2 |
Add more linker protections around variables accessed from 16bit mode.
Rename VAR16 to VAR16_32 -- that macro supports accesses from both
16bit and 32bit mode.
Introduce a new macro VAR16 that must be present on all global
variables accessed from 16bit mode.
Diffstat (limited to 'src/rombios16.lds.S')
-rw-r--r-- | src/rombios16.lds.S | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rombios16.lds.S b/src/rombios16.lds.S index 009eb89..2966ce6 100644 --- a/src/rombios16.lds.S +++ b/src/rombios16.lds.S @@ -16,10 +16,7 @@ SECTIONS *(.text) code16_rodata = . ; *(.rodata*) - *(.data) - code16_bss = . ; - *(.bss) - *(COMMON) + *(.data.var16) } freespace1_start = . ; code16_end = . ; @@ -31,4 +28,8 @@ SECTIONS *(.text.fixed.addr) } code16_fixed_end = . ; + + // Discard regular data sections to force a link error if + // 16bit code attempts to access data not marked with VAR16. + /DISCARD/ : { *(.data) *(.bss) *(COMMON) } } |