about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorSebastian Poeplau <poeplau@adacore.com>2025-08-01 12:39:50 +0200
committerSebastian Poeplau <poeplau@adacore.com>2025-08-05 10:55:07 +0200
commit2136c500cdbdd08fe7c25927b5d3ce790d75f68b (patch)
tree56bba9d1ba494177f74ce02b80dfd64bd2e82a6c /compiler/rustc_codegen_gcc
parentc4b91bd9f87391c1dda3784205c0dd10b54ec2e8 (diff)
downloadrust-2136c500cdbdd08fe7c25927b5d3ce790d75f68b.tar.gz
rust-2136c500cdbdd08fe7c25927b5d3ce790d75f68b.zip
Preserve the .debug_gdb_scripts section
Make sure that compiler and linker don't optimize the section's contents
away by adding the global holding the data to "llvm.used". The volatile
load in the main shim is retained because "llvm.used", which translates
to SHF_GNU_RETAIN on ELF targets, requires a reasonably recent linker;
emitting the volatile load ensures compatibility with older linkers, at
least when libstd is used.

Pretty printers in dylib dependencies are now emitted by the main crate
instead of the dylib; apart from matching how rlibs are handled, this
approach has the advantage that `omit_gdb_pretty_printer_section` keeps
working with dylib dependencies.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions