Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lgtm
This morning I didn't know why this was interesting, but then @inglorion told me about the new .init_array + reloc-none GC sections strategy. I still have concerns about dropping debug info as LLD is doing now, but I'll pass them along separately.
lib/Target/X86/MCTargetDesc/X86FixupKinds.h | ||
---|---|---|
17 ↗ | (On Diff #199848) | The comment isn't accurate. Should this be a generic fixup kind (i.e. MCFixupKind)? It seems that both ELF and COFF support it on all targets. |
.init_array+R_*_NONE is a missed optimization in linkers (ld.bfd+gold+lld) but I'm not sure how useful it is. It may break semantics and I think usually it indicates real bugs, see PR41693 for a recent issue.
This is interesting as I want Android guys to use a better workaround than the current PT_TLS hack in lld ELF ARM/AArch64. (https://reviews.llvm.org/D61824#1500063)
@pcc told me this trick long ago and mentioned .reloc is not supported in llvm:) The trick is also mentioned on https://lwn.net/Articles/741494/
The R_386_NONE support can be used to add tests for a bug in lld that I want to fix https://reviews.llvm.org/D61973#1504227
lib/Target/X86/MCTargetDesc/X86FixupKinds.h | ||
---|---|---|
17 ↗ | (On Diff #199848) | Thanks for pointing this out. I'll add a generic fixup in the ARM patch D61992. |