Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit dc8ea4f

Browse files
committed
place the .debug_gdb_scripts at the beginning of the .text section
closes #21
1 parent 29e590b commit dc8ea4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

link.x

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ SECTIONS
5959
remove the allocatable bit. Unfortunately, it appears
6060
that the only way to do this in a linker script is
6161
the extremely obscure "INFO" output section type specifier. */
62-
.debug_gdb_scripts 0 (INFO) : {
62+
/* a rustc hack will force the program to read the first byte of this section,
63+
so we'll set the (fake) start address of this section to something we're
64+
sure can be read at runtime: the start of the .text section */
65+
.debug_gdb_scripts _stext (INFO) : {
6366
KEEP(*(.debug_gdb_scripts))
6467
}
6568

0 commit comments

Comments
 (0)