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

Commit

Permalink
Merge pull request #23 from japaric/gh21
Browse files Browse the repository at this point in the history
place the .debug_gdb_scripts at the beginning of the .text section
  • Loading branch information
japaric authored Jul 1, 2017
2 parents 29e590b + dc8ea4f commit 91c9906
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion link.x
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ SECTIONS
remove the allocatable bit. Unfortunately, it appears
that the only way to do this in a linker script is
the extremely obscure "INFO" output section type specifier. */
.debug_gdb_scripts 0 (INFO) : {
/* a rustc hack will force the program to read the first byte of this section,
so we'll set the (fake) start address of this section to something we're
sure can be read at runtime: the start of the .text section */
.debug_gdb_scripts _stext (INFO) : {
KEEP(*(.debug_gdb_scripts))
}

Expand Down

0 comments on commit 91c9906

Please sign in to comment.