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
ld.lld unknown relocation (110) against symbol for powerpc64 #1260
Comments
Relocation number 110 is not listed in "Figure 4-1. Relocation Table" https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#RELOC-TYPE cc @uweigand @MaskRay I wonder if GAS is producing a new 64b relocation type? |
That ABI doc is outdated, the current version is now maintained by OpenPOWER. 110 is R_PPC64_ADDR16_HIGH, see: http://cdn.openpowerfoundation.org/wp-content/uploads/resources/leabi/content/ch03s05s03.html |
https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html is what people usually refer to as ELF v1. The OpenPower document is ELF v2. I did not know The relocation desugars from LOAD_REG_IMMEDIATE_SYM(r14, r15, interrupt_base_book3e)
// arch/powerpc/include/asm/ppc_asm.h defines LOAD_REG_IMMEDIATE_SYM and __AS_ATHIGH Clang generated code does not use |
R_PPC64_ADDR16_HI represents bits 16-31 of a 32-bit value R_PPC64_ADDR16_HIGH represents bits 16-31 of a 64-bit value. In the Linux kernel, `LOAD_REG_IMMEDIATE_SYM` defined in `arch/powerpc/include/asm/ppc_asm.h` uses @l, @high, @higher, @highest to load the 64-bit value of a symbol. Fixes ClangBuiltLinux/linux#1260
R_PPC64_ADDR16_HI represents bits 16-31 of a 32-bit value R_PPC64_ADDR16_HIGH represents bits 16-31 of a 64-bit value. In the Linux kernel, `LOAD_REG_IMMEDIATE_SYM` defined in `arch/powerpc/include/asm/ppc_asm.h` uses @l, @high, @higher, @highest to load the 64-bit value of a symbol. Fixes ClangBuiltLinux/linux#1260
Just filing this from https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/message/X43XFH7N4VREFNFWVMEUHJFFXD4QTWMG.
The text was updated successfully, but these errors were encountered: