Skip to content

Commit 1780a6a

Browse files
committed
make minor improvements to linker script
1 parent 8095ebd commit 1780a6a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

compiler/rustc_target/src/spec/targets/armv7a_vex_v5_linker_script.ld

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ MEMORY {
1111
}
1212

1313
__stack_length = 0x400000;
14-
__heap_end = __user_ram_end - __stack_length - 64;
14+
/*
15+
It's currently unclear why subtracting anything is necessary, but it fixes memory permission errors.
16+
0x100 is an arbitrary number that works.
17+
*/
18+
__heap_end = __user_ram_end - __stack_length - 0x1000;
1519

1620
SECTIONS {
1721
.code_signature __user_ram_start : {
@@ -25,10 +29,12 @@ SECTIONS {
2529

2630
.rodata : {
2731
*(.rodata .rodata.*)
32+
*(.rodata1 .rodata1.*)
2833
} > USER_RAM
2934

3035
.data : {
3136
*(.data .data.*)
37+
*(.data1 .data1.*)
3238
} > USER_RAM
3339

3440
.bss : {

library/std/src/sys/pal/vexos/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ unsafe impl dlmalloc::Allocator for Vexos {
4040
}
4141

4242
fn free(&self, _ptr: *mut u8, _size: usize) -> bool {
43-
return false;
43+
false
4444
}
4545

4646
fn can_release_part(&self, _flags: u32) -> bool {

0 commit comments

Comments
 (0)