-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #85395 - 12101111:build-crt, r=petrochenkov
Build crtbegin.o/crtend.o from source code Build crtbengin.o/crtend.o from source code instead of copying from gcc. The crtbegin and crtend implementation from llvm don't need `crtbeginS.o` for PIC. `crtbegin{,S,T}.o` is unified into one generic `crtbegin.o`. See the comments in https://reviews.llvm.org/D28791#1419436 and https://reviews.llvm.org/D28791#1420914 fix: #85310 , fix: #47551 , fix: #84033
- Loading branch information
Showing
6 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# only-linux | ||
# ignore-32bit | ||
|
||
-include ../tools.mk | ||
|
||
all: | ||
$(RUSTC) eh_frame-terminator.rs | ||
$(call RUN,eh_frame-terminator) | $(CGREP) '1122334455667788' | ||
objdump --dwarf=frames $(TMPDIR)/eh_frame-terminator | $(CGREP) 'ZERO terminator' |
23 changes: 23 additions & 0 deletions
23
src/test/run-make-fulldeps/issue-47551/eh_frame-terminator.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// run-pass | ||
|
||
#![feature(backtrace)] | ||
#[derive(Clone, Copy)] | ||
struct Foo { | ||
array: [u64; 10240], | ||
} | ||
|
||
impl Foo { | ||
const fn new() -> Self { | ||
Self { | ||
array: [0x1122_3344_5566_7788; 10240] | ||
} | ||
} | ||
} | ||
|
||
static BAR: [Foo; 10240] = [Foo::new(); 10240]; | ||
|
||
fn main() { | ||
let bt = std::backtrace::Backtrace::force_capture(); | ||
println!("Hello, world! {:?}", bt); | ||
println!("{:x}", BAR[0].array[0]); | ||
} |