forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#120124 - nikic:fix-assembly-test, r=davidtwco
Split assembly tests for ELF and MachO On ELF, the text section is opened with ".text", on MachO with ".section __TEXT,__text". Previously, on ELF this test was actually matching a GNU note section, which is no longer emitted on Solaris starting with LLVM 18. Fixes rust-lang#120105. r? ``@davidtwco``
- Loading branch information
Showing
2 changed files
with
82 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// assembly-output: emit-asm | ||
// ignore-tidy-linelength | ||
// revisions: aarch64_apple_darwin | ||
// [aarch64_apple_darwin] compile-flags: --target aarch64-apple-darwin | ||
// [aarch64_apple_darwin] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_ios | ||
// [aarch64_apple_ios] compile-flags: --target aarch64-apple-ios | ||
// [aarch64_apple_ios] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_ios_macabi | ||
// [aarch64_apple_ios_macabi] compile-flags: --target aarch64-apple-ios-macabi | ||
// [aarch64_apple_ios_macabi] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_ios_sim | ||
// [aarch64_apple_ios_sim] compile-flags: --target aarch64-apple-ios-sim | ||
// [aarch64_apple_ios_sim] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_tvos | ||
// [aarch64_apple_tvos] compile-flags: --target aarch64-apple-tvos | ||
// [aarch64_apple_tvos] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_tvos_sim | ||
// [aarch64_apple_tvos_sim] compile-flags: --target aarch64-apple-tvos-sim | ||
// [aarch64_apple_tvos_sim] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_watchos | ||
// [aarch64_apple_watchos] compile-flags: --target aarch64-apple-watchos | ||
// [aarch64_apple_watchos] needs-llvm-components: aarch64 | ||
// revisions: aarch64_apple_watchos_sim | ||
// [aarch64_apple_watchos_sim] compile-flags: --target aarch64-apple-watchos-sim | ||
// [aarch64_apple_watchos_sim] needs-llvm-components: aarch64 | ||
// revisions: arm64_32_apple_watchos | ||
// [arm64_32_apple_watchos] compile-flags: --target arm64_32-apple-watchos | ||
// [arm64_32_apple_watchos] needs-llvm-components: aarch64 | ||
// revisions: arm64e_apple_darwin | ||
// [arm64e_apple_darwin] compile-flags: --target arm64e-apple-darwin | ||
// [arm64e_apple_darwin] needs-llvm-components: aarch64 | ||
// revisions: arm64e_apple_ios | ||
// [arm64e_apple_ios] compile-flags: --target arm64e-apple-ios | ||
// [arm64e_apple_ios] needs-llvm-components: aarch64 | ||
// revisions: armv7k_apple_watchos | ||
// [armv7k_apple_watchos] compile-flags: --target armv7k-apple-watchos | ||
// [armv7k_apple_watchos] needs-llvm-components: arm | ||
// revisions: armv7s_apple_ios | ||
// [armv7s_apple_ios] compile-flags: --target armv7s-apple-ios | ||
// [armv7s_apple_ios] needs-llvm-components: arm | ||
// revisions: i386_apple_ios | ||
// [i386_apple_ios] compile-flags: --target i386-apple-ios | ||
// [i386_apple_ios] needs-llvm-components: x86 | ||
// revisions: i686_apple_darwin | ||
// [i686_apple_darwin] compile-flags: --target i686-apple-darwin | ||
// [i686_apple_darwin] needs-llvm-components: x86 | ||
// revisions: x86_64_apple_darwin | ||
// [x86_64_apple_darwin] compile-flags: --target x86_64-apple-darwin | ||
// [x86_64_apple_darwin] needs-llvm-components: x86 | ||
// revisions: x86_64_apple_ios | ||
// [x86_64_apple_ios] compile-flags: --target x86_64-apple-ios | ||
// [x86_64_apple_ios] needs-llvm-components: x86 | ||
// revisions: x86_64_apple_ios_macabi | ||
// [x86_64_apple_ios_macabi] compile-flags: --target x86_64-apple-ios-macabi | ||
// [x86_64_apple_ios_macabi] needs-llvm-components: x86 | ||
// revisions: x86_64_apple_tvos | ||
// [x86_64_apple_tvos] compile-flags: --target x86_64-apple-tvos | ||
// [x86_64_apple_tvos] needs-llvm-components: x86 | ||
// revisions: x86_64_apple_watchos_sim | ||
// [x86_64_apple_watchos_sim] compile-flags: --target x86_64-apple-watchos-sim | ||
// [x86_64_apple_watchos_sim] needs-llvm-components: x86 | ||
// revisions: x86_64h_apple_darwin | ||
// [x86_64h_apple_darwin] compile-flags: --target x86_64h-apple-darwin | ||
// [x86_64h_apple_darwin] needs-llvm-components: x86 | ||
|
||
// Sanity-check that each target can produce assembly code. | ||
|
||
#![feature(no_core, lang_items)] | ||
#![no_std] | ||
#![no_core] | ||
#![crate_type = "lib"] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
|
||
pub fn test() -> u8 { | ||
42 | ||
} | ||
|
||
// CHECK: .section __TEXT,__text |