how would I modify rustc so it configures a particular LLVM target as if you'd run
llc -relax-elf-relocations or
problem is I'm trying to use rust-lld, but it treats R_X86_64_GOTPCREL differently from R_X86_64_GOTPCRELX, unlike ld.bfd/ld.gold, which treat it the same
rustc currently emits R_X86_64_GOTPCREL but I think my problem would be solved if it emitted R_X86_64_GOTPCRELX instead
I'm trying to use
-C llvm-args but I can't seem to do anything useful with that option
ok I think I can hook in at
There is config option for it: https://github.com/rust-lang/rust/blob/0f6f66fcdc4abf110171ee06b1a72bdd2883b74f/src/librustc_target/spec/mod.rs#L609
You can change in in the target spec file (
Sorry I misread it.
You could add another option to that file. I don't know if it requires additional changes in rustllvm though.