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

Mark .debug_gdb_scripts as non-allocatable #7

Merged
merged 1 commit into from
May 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions link.x
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ SECTIONS

_sidata = LOADADDR(.data);

/* Due to an unfortunate combination of legacy concerns,
toolchain drawbacks, and insufficient attention to detail,
rustc has no choice but to mark .debug_gdb_scripts as allocatable.
We really do not want to upload it to our target, so we
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) : {
KEEP(*(.debug_gdb_scripts))
}

/DISCARD/ :
{
/* Unused unwinding stuff */
Expand Down