[all-commits] [llvm/llvm-project] d39ade: [ELF] Improve R_PPC64_ADDR* relocation tests

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jan 19 11:43:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d39adeaf440bc0db508b7d2a4eb9ace7f40178fc
      https://github.com/llvm/llvm-project/commit/d39adeaf440bc0db508b7d2a4eb9ace7f40178fc
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    A lld/test/ELF/ppc64-reloc-addr-err.s
    M lld/test/ELF/ppc64-reloc-addr.s
    M lld/test/ELF/ppc64-relocs.s

  Log Message:
  -----------
  [ELF] Improve R_PPC64_ADDR* relocation tests


  Commit: e12e0d66c03c89d8ff0b08a4285f5b74a85a5812
      https://github.com/llvm/llvm-project/commit/e12e0d66c03c89d8ff0b08a4285f5b74a85a5812
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M lld/ELF/Arch/PPC64.cpp
    A lld/test/ELF/ppc64-reloc-addr16-err.s

  Log Message:
  -----------
  [ELF] Error for out-of-range R_PPC64_ADDR16_HA, R_PPC64_ADDR16_HI and their friends

There are no tests for REL16_* and TPREL16_*.


  Commit: 5fcb412ed0831ad763810f9b424149b3b353451a
      https://github.com/llvm/llvm-project/commit/5fcb412ed0831ad763810f9b424149b3b353451a
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M lld/ELF/Arch/PPC64.cpp
    M lld/test/ELF/ppc64-reloc-addr.s
    M lld/test/ELF/ppc64-reloc-addr16-err.s

  Log Message:
  -----------
  [ELF] Support R_PPC64_ADDR16_HIGH

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 https://github.com/ClangBuiltLinux/linux/issues/1260


Compare: https://github.com/llvm/llvm-project/compare/a4b42c621b9e...5fcb412ed083


More information about the All-commits mailing list