5 # This tests the different -Zrelro-level values, and makes sure that they work properly.
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
14 $(RUSTC) -Zrelro-level=partial hello.rs
15 readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO
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
20 $(RUSTC) -Zrelro-level=off hello.rs
21 ! readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO