fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
769 B22 linesraw
1# ignore-cross-compile
2include ../tools.mk
3
4# only-linux
5#
6# This tests the different -Zrelro-level values, and makes sure that they work properly.
7
8all:
9	# Ensure that binaries built with the full relro level links them with both
10	# RELRO and BIND_NOW for doing eager symbol resolving.
11	$(RUSTC) -Zrelro-level=full hello.rs
12	readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO
13	readelf -d $(TMPDIR)/hello | grep -q BIND_NOW
14
15	$(RUSTC) -Zrelro-level=partial hello.rs
16	readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO
17
18	# Ensure that we're *not* built with RELRO when setting it to off.  We do
19	# not want to check for BIND_NOW however, as the linker might have that
20	# enabled by default.
21	$(RUSTC) -Zrelro-level=off hello.rs
22	! readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO