[PATCH] D137384: [MC][LoongArch] Fix needsRelocateWithSymbol() implementation

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 23:53:03 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb18cdeac79d0: [MC][LoongArch] Fix needsRelocateWithSymbol() implementation (authored by tangyouling, committed by SixWeining).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137384/new/

https://reviews.llvm.org/D137384

Files:
  llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp
  llvm/test/MC/LoongArch/Relocations/fde-reloc.s


Index: llvm/test/MC/LoongArch/Relocations/fde-reloc.s
===================================================================
--- llvm/test/MC/LoongArch/Relocations/fde-reloc.s
+++ llvm/test/MC/LoongArch/Relocations/fde-reloc.s
@@ -10,5 +10,5 @@
  .cfi_endproc
 
 # CHECK:   Section (4) .rela.eh_frame {
-# CHECK-NEXT:   0x1C R_LARCH_32_PCREL - 0x0
+# CHECK-NEXT:   0x1C R_LARCH_32_PCREL .text 0x0
 # CHECK-NEXT: }
Index: llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp
===================================================================
--- llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp
+++ llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp
@@ -24,13 +24,6 @@
 
   ~LoongArchELFObjectWriter() override;
 
-  // Return true if the given relocation must be with a symbol rather than
-  // section plus offset.
-  bool needsRelocateWithSymbol(const MCSymbol &Sym,
-                               unsigned Type) const override {
-    return true;
-  }
-
 protected:
   unsigned getRelocType(MCContext &Ctx, const MCValue &Target,
                         const MCFixup &Fixup, bool IsPCRel) const override;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137384.475701.patch
Type: text/x-patch
Size: 1160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221116/3b7b4067/attachment.bin>


More information about the llvm-commits mailing list