about summary refs log tree commit diff
path: root/tests/ui/errors
diff options
context:
space:
mode:
authorOneirical <manchot@videotron.ca>2024-05-28 11:17:17 -0400
committerOneirical <manchot@videotron.ca>2024-05-29 11:35:51 -0400
commit0697884ea970ebca67b2de41dc1d380e66fd9c2b (patch)
tree04cfe3fbfa48f8624648bfc0e5a69e625fa02553 /tests/ui/errors
parent22953b3f52a06c5b4826d455fba526c36ef8cb58 (diff)
downloadrust-0697884ea970ebca67b2de41dc1d380e66fd9c2b.tar.gz
rust-0697884ea970ebca67b2de41dc1d380e66fd9c2b.zip
convert fpic to ui test
Diffstat (limited to 'tests/ui/errors')
-rw-r--r--tests/ui/errors/pic-linker.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/errors/pic-linker.rs b/tests/ui/errors/pic-linker.rs
new file mode 100644
index 00000000000..9fea42484ed
--- /dev/null
+++ b/tests/ui/errors/pic-linker.rs
@@ -0,0 +1,12 @@
+// `-z text` caused the linker to error if there were any non-position-independent
+// code (PIC) sections. This test checks that this no longer happens.
+// See https://github.com/rust-lang/rust/pull/39803
+
+//@ ignore-windows
+//@ ignore-macos
+//@ ignore-cross-compile
+
+//@ compile-flags -Clink-args=-Wl,-z,text
+//@ run-pass
+
+fn main() {}