-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R_LARCH_TLS_{LD,GD,DESC}_PCREL20_S2 #12
Comments
Both gnu-as and llvm-as can emit these relocations:
What do you mean that these are GNU ld's internal relocations? |
My guessing is that they are implemented to GNU/LLVM assembler just because they are in this psABI spec, but they don't seem to be necessary in the first place (i.e. I suspect this is a spec bug). What are the real use cases of these relocations? For RISC-V, GNU ld defines bunch of implementation-defined relocations for relaxations, and they were accidentally registered to the psABI spec. We've removed them; see riscv-non-isa/riscv-elf-psabi-doc@9f15402 for example. |
I'm also pretty sure that you guys want to remove |
There may be a tiny model on LoongArch, (in the future ?). https://gcc.gnu.org/onlinedocs/gcc/LoongArch-Options.html#index-mcmodel_003d-1 |
Since LoongArch defines section-shrinking linker relaxations, there's no use for these _S2 variant of relocations over their corresponding HI/LO pair of relocations, is there? It seems ratifying the _S2 variant only causes issues in the future; you guys don't really want any compiler to use these relocations. After all, it's your psABI, so that's just my two cents. I just wanted you guys know that we've fixed the same problem for RISC-V. |
I think bolt needs these relocation types (--emit-relocs). |
I think it's primarily a decision over whether we want to be able to express (1) any possible relocation operation permitted by the ISA capability, or (2) just those relevant to the typical compile-link workflow. In the latter case, all relocations are emitted by the compiler in the longest form possible, to be shrinked by the linker's relaxation pass, later and once. But if we want to still preserve the relocations in the linker output we'd probably still want to have additional reloc types around. Is my understanding correct? |
Is it really the case that compiler/assembler emits R_LARCH_TLS_{LD,GD,DESC}_PCREL20_S2 relocations? It looks like these are GNU ld's internal relocations and never occur in real-world object files. If that's the case, these relocations should be removed from the psABI. We've removed GNU ld's internal relocations from RISC-V's psABI, too.
The text was updated successfully, but these errors were encountered: