summaryrefslogtreecommitdiffstats
path: root/tests/run-make/export-executable-symbols
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/run-make/export-executable-symbols
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/export-executable-symbols')
-rw-r--r--tests/run-make/export-executable-symbols/Makefile11
-rw-r--r--tests/run-make/export-executable-symbols/main.rs8
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/run-make/export-executable-symbols/Makefile b/tests/run-make/export-executable-symbols/Makefile
new file mode 100644
index 000000000..daa77c99d
--- /dev/null
+++ b/tests/run-make/export-executable-symbols/Makefile
@@ -0,0 +1,11 @@
+include ../../run-make-fulldeps/tools.mk
+
+# ignore-wasm32
+# ignore-wasm64
+# ignore-none no-std is not supported
+# only-linux
+
+all:
+ $(RUSTC) -Zexport-executable-symbols main.rs --target $(TARGET) --crate-type=bin
+ nm $(TMPDIR)/main | $(CGREP) exported_symbol
+
diff --git a/tests/run-make/export-executable-symbols/main.rs b/tests/run-make/export-executable-symbols/main.rs
new file mode 100644
index 000000000..c498381a3
--- /dev/null
+++ b/tests/run-make/export-executable-symbols/main.rs
@@ -0,0 +1,8 @@
+// edition:2018
+
+fn main() {}
+
+#[no_mangle]
+pub fn exported_symbol() -> i8 {
+ 42
+}