Fix possibility of (.bss size) mod 8 != 0

pull/41/head
Andre Richter 4 years ago
parent 573d43e530
commit 6d9641d05f
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -56,7 +56,7 @@ diff -uNr 01_wait_forever/src/arch/aarch64/start.S 02_runtime_init/src/arch/aarc
diff -uNr 01_wait_forever/src/bsp/rpi/link.ld 02_runtime_init/src/bsp/rpi/link.ld
--- 01_wait_forever/src/bsp/rpi/link.ld
+++ 02_runtime_init/src/bsp/rpi/link.ld
@@ -13,5 +13,23 @@
@@ -13,5 +13,24 @@
*(.text._start) *(.text*)
}
@ -70,11 +70,12 @@ diff -uNr 01_wait_forever/src/bsp/rpi/link.ld 02_runtime_init/src/bsp/rpi/link.l
+ *(.data*)
+ }
+
+ /* Align to 8 byte boundary */
+ /* Section is zeroed in u64 chunks, align start and end to 8 bytes */
+ .bss ALIGN(8):
+ {
+ __bss_start = .;
+ *(.bss*);
+ . = ALIGN(8);
+ __bss_end = .;
+ }
+

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -227,7 +227,7 @@ diff -uNr 06_drivers_gpio_uart/src/bsp/rpi/link.ld 07_uart_chainloader/src/bsp/r
.text :
{
*(.text._start) *(.text*)
@@ -31,5 +32,14 @@
@@ -32,5 +33,14 @@
__bss_end = .;
}

@ -24,11 +24,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -275,7 +275,7 @@ diff -uNr 07_uart_chainloader/src/bsp/rpi/link.ld 08_timestamps/src/bsp/rpi/link
.text :
{
*(.text._start) *(.text*)
@@ -32,14 +31,5 @@
@@ -33,14 +32,5 @@
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -26,11 +26,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -26,11 +26,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -1287,7 +1287,7 @@ diff -uNr 12_cpu_exceptions_part1/src/main.rs 13_integrated_testing/src/main.rs
info!("Booting on: {}", bsp::board_name());
@@ -102,30 +84,6 @@
@@ -102,31 +84,6 @@
info!(" {}. {}", i + 1, driver.compatible());
}
@ -1315,9 +1315,10 @@ diff -uNr 12_cpu_exceptions_part1/src/main.rs 13_integrated_testing/src/main.rs
- big_addr = 9 * 1024 * 1024 * 1024;
- unsafe { core::ptr::read_volatile(big_addr as *mut u64) };
-
// Will never reach here in this tutorial.
- // Will never reach here in this tutorial.
info!("Echoing input now");
loop {
let c = bsp::console().read_char();
diff -uNr 12_cpu_exceptions_part1/src/memory.rs 13_integrated_testing/src/memory.rs
--- 12_cpu_exceptions_part1/src/memory.rs

@ -26,11 +26,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

@ -23,11 +23,12 @@ SECTIONS
*(.data*)
}
/* Align to 8 byte boundary */
/* Section is zeroed in u64 chunks, align start and end to 8 bytes */
.bss ALIGN(8):
{
__bss_start = .;
*(.bss*);
. = ALIGN(8);
__bss_end = .;
}

Loading…
Cancel
Save