Implement -Z relax-elf-relocations=yes|no
This lets rustc users tweak whether the linker should relax ELF relocations, namely whether it should emit R_X86_64_GOTPCRELX relocations instead of R_X86_64_GOTPCREL, as the former is allowed by the ABI to be further optimised. The default value is whatever the target defines.
This commit is contained in:
@@ -156,7 +156,11 @@ pub fn target_machine_factory(
|
||||
let emit_stack_size_section = sess.opts.debugging_opts.emit_stack_sizes;
|
||||
|
||||
let asm_comments = sess.asm_comments();
|
||||
let relax_elf_relocations = sess.target.options.relax_elf_relocations;
|
||||
let relax_elf_relocations = sess
|
||||
.opts
|
||||
.debugging_opts
|
||||
.relax_elf_relocations
|
||||
.unwrap_or(sess.target.options.relax_elf_relocations);
|
||||
|
||||
let use_init_array = !sess
|
||||
.opts
|
||||
|
||||
Reference in New Issue
Block a user