[all-commits] [llvm/llvm-project] 1a6bf9: [MC] Remove ELFRelocationEntry::OriginalAddend

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Aug 18 15:48:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a6bf94407af7962345ffaf6ac9e9a9766fd8913
      https://github.com/llvm/llvm-project/commit/1a6bf94407af7962345ffaf6ac9e9a9766fd8913
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-08-18 (Sun, 18 Aug 2024)

  Changed paths:
    M llvm/include/llvm/MC/MCELFObjectWriter.h
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp

  Log Message:
  -----------
  [MC] Remove ELFRelocationEntry::OriginalAddend

For MIPS's o32 ABI (REL), https://reviews.llvm.org/D19718 introduced
`OriginalAddend` to find the matching R_MIPS_LO16 relocation for
R_MIPS_GOT16 when STT_SECTION conversion is applicable.

    lw $2, %lo(local1)
    lui $2, %got(local1)

However, we could just store the original `Addend` in
`ELFRelocationEntry` and remove `OriginalAddend`.

Note: The relocation ordering algorithm in
https://reviews.llvm.org/D19718 is inefficient (#104562), which will be
addressed by another patch.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list