Skip to content

Commit 24290f1

Browse files
committed
remove hackery for .debug_gdb_scripts section
This is no longer necessary now that we can configure the target to exclude the .debug_gdb_scripts section. See: rust-lang/rust#53139
1 parent 3538946 commit 24290f1

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

riscv-rt/link.x

-16
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,6 @@ SECTIONS
7373
KEEP(*(.got .got.*));
7474
_egot = .;
7575
} > RAM AT > FLASH /* LLD fails on AT > FLASH */
76-
77-
78-
/* Due to an unfortunate combination of legacy concerns,
79-
toolchain drawbacks, and insufficient attention to detail,
80-
rustc has no choice but to mark .debug_gdb_scripts as allocatable.
81-
We really do not want to upload it to our target, so we
82-
remove the allocatable bit. Unfortunately, it appears
83-
that the only way to do this in a linker script is
84-
the extremely obscure "INFO" output section type specifier. */
85-
/* a rustc hack will force the program to read the first byte of this section,
86-
so we'll set the (fake) start address of this section to something we're
87-
sure can be read at runtime: the start of the .text section */
88-
/* LLD fails to parse _stext (INFO) */
89-
.debug_gdb_scripts _stext (INFO) : {
90-
KEEP(*(.debug_gdb_scripts))
91-
}
9276
}
9377

9478
/* Do not exceed this mark in the error messages below | */

0 commit comments

Comments
 (0)