]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/relro-levels/Makefile
Auto merge of #98100 - bjorn3:use_object_for_bitcode_reading, r=wesleywiser
[rust.git] / src / test / run-make-fulldeps / relro-levels / Makefile
1 include ../tools.mk
2
3 # only-linux
4 #
5 # This tests the different -Zrelro-level values, and makes sure that they work properly.
6
7 all:
8         # Ensure that binaries built with the full relro level links them with both
9         # RELRO and BIND_NOW for doing eager symbol resolving.
10         $(RUSTC) -Zrelro-level=full hello.rs
11         readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO
12         readelf -d $(TMPDIR)/hello | grep -q BIND_NOW
13
14         $(RUSTC) -Zrelro-level=partial hello.rs
15         readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO
16
17         # Ensure that we're *not* built with RELRO when setting it to off.  We do
18         # not want to check for BIND_NOW however, as the linker might have that
19         # enabled by default.
20         $(RUSTC) -Zrelro-level=off hello.rs
21         ! readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO