mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-15 07:41:45 +00:00
Prevent NULL from ever pointing to some real code or data. (This was
causing the serial console to ignore input, because it happened to end up linked with serial_ischar() at address 0, which core/console.c decided was invalid).
This commit is contained in:
parent
6ceaa158da
commit
43d976edd0
@ -64,6 +64,8 @@ SECTIONS {
|
||||
. = _text16_link_addr;
|
||||
_text16 = .;
|
||||
|
||||
. += 1; /* Prevent NULL being valid */
|
||||
|
||||
.text16 : AT ( _text16_load_offset + __text16 ) {
|
||||
__text16 = .;
|
||||
*(.text.null_trap)
|
||||
@ -80,6 +82,8 @@ SECTIONS {
|
||||
. = _data16_link_addr;
|
||||
_data16 = .;
|
||||
|
||||
. += 1; /* Prevent NULL being valid */
|
||||
|
||||
.rodata16 : AT ( _data16_load_offset + __rodata16 ) {
|
||||
__rodata16 = .;
|
||||
*(.rodata16)
|
||||
|
@ -65,6 +65,8 @@ SECTIONS {
|
||||
. = _text16_link_addr;
|
||||
_text16 = .;
|
||||
|
||||
. += 1; /* Prevent NULL being valid */
|
||||
|
||||
.text16 : AT ( _text16_load_offset + __text16 ) {
|
||||
__text16 = .;
|
||||
*(.text16)
|
||||
@ -78,6 +80,8 @@ SECTIONS {
|
||||
. = _data16_link_addr;
|
||||
_data16 = .;
|
||||
|
||||
. += 1; /* Prevent NULL being valid */
|
||||
|
||||
.rodata16 : AT ( _data16_load_offset + __rodata16 ) {
|
||||
__rodata16 = .;
|
||||
*(.rodata16)
|
||||
@ -115,6 +119,8 @@ SECTIONS {
|
||||
|
||||
_text = .;
|
||||
|
||||
. += 1; /* Prevent NULL being valid */
|
||||
|
||||
.text : AT ( _textdata_load_offset + __text ) {
|
||||
__text = .;
|
||||
*(.text.null_trap)
|
||||
|
Loading…
Reference in New Issue
Block a user