1
Fork 0

sess: stabilize relro-level

Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
David Wood 2024-02-27 15:05:02 +00:00
parent 9afdb8d1d5
commit 420c58fb11
No known key found for this signature in database
6 changed files with 29 additions and 9 deletions

View file

@ -2013,7 +2013,7 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained:
/// Add options making relocation sections in the produced ELF files read-only
/// and suppressing lazy binding.
fn add_relro_args(cmd: &mut dyn Linker, sess: &Session) {
match sess.opts.unstable_opts.relro_level.unwrap_or(sess.target.relro_level) {
match sess.opts.cg.relro_level.unwrap_or(sess.target.relro_level) {
RelroLevel::Full => cmd.full_relro(),
RelroLevel::Partial => cmd.partial_relro(),
RelroLevel::Off => cmd.no_relro(),