add emit_debug_gdb_scripts target option and ..#49728
Conversation
set it to false for no-std targets like ARM Cortex-M and MSP430. For the rationale of this change see the comment in thumb_base.rs
|
@bors: r+ Nice! |
|
📌 Commit 1eed662 has been approved by |
this commit adds LLD support by removing all INFO sections. LLD kind of supports INFO in the form of NOLOAD but when the linker script contains NOLOAD sections LLD emits a binary with false `size` information: for example, it reported a fake increase of 20KB in .text and a fake increase of 1KB in .bss when compiling a program that only allocates a single Box. As the INFO sections are gone we can no longer support the stack overflow protection added in #43 so all the other related changes, like making _stack_start overridable, have been removed as well. If you want to continue using stack overflow protection you can stick to v0.3.x. As the .debug_gdb_scripts output section has been removed from the linker script these changes will only reliably support both LD and LLD if/when rust-lang/rust#49728 lands. closes #53
|
I forgot to cc @pftbest and @whitequark |
whitequark
left a comment
There was a problem hiding this comment.
Seems reasonable to me other than the macOS change.
| exe_allocation_crate: super::maybe_jemalloc(), | ||
| has_elf_tls: version >= (10, 7), | ||
| abi_return_struct_as_int: true, | ||
| emit_debug_gdb_scripts: false, |
There was a problem hiding this comment.
Is this really right? Does no one use gdb on macOS?
There was a problem hiding this comment.
This doesn't directly answer your question but this is equivalent to the current logic. See the diff on src/librustc_trans/debuginfo/gdb.rs; it has !cx.sess().target.target.options.is_like_osx. So I assume the answer is that people mainly use lldb?
There was a problem hiding this comment.
@whitequark Locally gdb is a pain to use on macOS because it would need to be signed in order to have access to process information and no-one cares to actually sign it and it's not shipped with macOS. It is "usable" for target != host but not necessarily the best option.
…xcrichton add emit_debug_gdb_scripts target option and .. set it to false for no-std targets like ARM Cortex-M and MSP430. For the rationale of this change see the comment in thumb_base.rs this is a temporary workaround until rust-lang#44993 is implemented r? @alexcrichton or @michaelwoerister
Rollup of 9 pull requests Successful merges: - #49510 (Fix anchor position on fields) - #49652 (Fix anchors issue when everything is collapsed) - #49702 (std: Inline some Termination-related methods) - #49728 (add emit_debug_gdb_scripts target option and ..) - #49731 (add THUMB targets to rustup manifest) - #49742 (Using X headings instead of 0.X #49739) - #49748 (proc_macro: Improve Debug representations) - #49750 (bootstrap: Remove the fast path) - #49503 (Inject the `compiler_builtins` crate whenever the `core` crate is injected) Failed merges:
this commit adds LLD support by removing all INFO sections. LLD kind of supports INFO in the form of NOLOAD but when the linker script contains NOLOAD sections LLD emits a binary with false `size` information: for example, it reported a fake increase of 20KB in .text and a fake increase of 1KB in .bss when compiling a program that only allocates a single Box. As the INFO sections are gone we can no longer support the stack overflow protection added in #43 so all the other related changes, like making _stack_start overridable, have been removed as well. If you want to continue using stack overflow protection you can stick to v0.3.x. As the .debug_gdb_scripts output section has been removed from the linker script these changes will only reliably support both LD and LLD if/when rust-lang/rust#49728 lands. closes #53
Same as the other embedded targets, see: rust-lang#49728 This is a temporary workaround for rust-lang#44993.
…ochenkov set emit_debug_gdb_scripts: false for riscv32imac-unknown-none target Same as the other embedded targets, see: rust-lang#49728 This is a temporary workaround for rust-lang#44993.
this commit adds LLD support by removing all INFO sections. LLD kind of supports INFO in the form of NOLOAD but when the linker script contains NOLOAD sections LLD emits a binary with false `size` information: for example, it reported a fake increase of 20KB in .text and a fake increase of 1KB in .bss when compiling a program that only allocates a single Box. As the INFO sections are gone we can no longer support the stack overflow protection added in #43 so all the other related changes, like making _stack_start overridable, have been removed as well. If you want to continue using stack overflow protection you can stick to v0.3.x. As the .debug_gdb_scripts output section has been removed from the linker script these changes will only reliably support both LD and LLD if/when rust-lang/rust#49728 lands. closes #53
this commit adds LLD support by removing all INFO sections. LLD kind of supports INFO in the form of NOLOAD but when the linker script contains NOLOAD sections LLD emits a binary with false `size` information: for example, it reported a fake increase of 20KB in .text and a fake increase of 1KB in .bss when compiling a program that only allocates a single Box. As the INFO sections are gone we can no longer support the stack overflow protection added in rust-embedded#43 so all the other related changes, like making _stack_start overridable, have been removed as well. If you want to continue using stack overflow protection you can stick to v0.3.x. As the .debug_gdb_scripts output section has been removed from the linker script these changes will only reliably support both LD and LLD if/when rust-lang/rust#49728 lands. closes rust-embedded#53
set it to false for no-std targets like ARM Cortex-M and MSP430. For the rationale of this change see the comment in thumb_base.rs
this is a temporary workaround until #44993 is implemented
r? @alexcrichton or @michaelwoerister