[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)
Feng Zou via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 28 22:29:41 PDT 2025
fzou1 wrote:
> > > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation types emitted. This is to keep backward compatibility with old version of ld and other linkers without APX support. If there are APX relocation types, old version of linkers would raise "unsupported relocation type" error. Example:
> > > > ```
> > > > $ llvm-mc -filetype=obj -o got.o -triple=x86_64-unknown-linux got.s
> > > > $ ld got.o -o got.exe
> > > > ld: got.o: unsupported relocation type 0x2b
> > > > ...
> > > >
> > > > $ cat got.s
> > > > ...
> > > > movq foo at GOTPCREL(%rip), %r16
> > > >
> > > > $ llvm-objdump -dr got.o
> > > > ...
> > > > 1: d5 48 8b 05 00 00 00 00 movq (%rip), %r16
> > > > 0000000000000005: R_X86_64_CODE_4_GOTPCRELX foo-0x4
> > > > ```
> > >
> > >
> > > Could you add who is the user for such request: LLVM + APX + old BFD linker? The code looks like a dirty workaround. I expect a real user.
> >
> >
> > Agree. But without this, users cannot try APX features with LLVM + old builtin linker on RHEL9 OS which is expected to be EOL in 2032.
>
> Okay, can you add this info into description of this PR?
Updated. Thanks.
https://github.com/llvm/llvm-project/pull/136660
More information about the cfe-commits
mailing list