2024-05-30 15:20:49 -05:00
|
|
|
// When setting the crate type as a "bin" (in app.rs),
|
|
|
|
// this could cause a bug where some symbols would not be
|
|
|
|
// emitted in the object files. This has been fixed, and
|
|
|
|
// this test checks that the correct symbols have been successfully
|
|
|
|
// emitted inside the object files.
|
|
|
|
// See https://github.com/rust-lang/rust/issues/51671
|
|
|
|
|
2024-06-18 13:57:00 -05:00
|
|
|
use run_make_support::{llvm_readobj, rustc};
|
2024-05-30 15:20:49 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
rustc().emit("obj").input("app.rs").run();
|
2024-06-18 13:57:00 -05:00
|
|
|
let out = llvm_readobj().input("app.o").arg("--symbols").run();
|
|
|
|
out.assert_stdout_contains("rust_begin_unwind");
|
|
|
|
out.assert_stdout_contains("rust_eh_personality");
|
|
|
|
out.assert_stdout_contains("__rg_oom");
|
2024-05-30 15:20:49 -05:00
|
|
|
}
|