Skip to content

Conversation

@kovdan01
Copy link
Contributor

No description provided.

@kovdan01 kovdan01 self-assigned this Jun 24, 2024
@kovdan01 kovdan01 requested review from MaskRay and asl June 24, 2024 14:58
@kovdan01 kovdan01 marked this pull request as ready for review June 24, 2024 14:58
@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2024

@llvm/pr-subscribers-lld

@llvm/pr-subscribers-lld-elf

Author: Daniil Kovalev (kovdan01)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/96500.diff

2 Files Affected:

  • (modified) lld/ELF/InputFiles.cpp (+2-4)
  • (modified) lld/ELF/InputFiles.h (+1-2)
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index e52d6444c64f2..03ff4eadfe670 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -887,7 +887,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
       // We handle that situation gracefully by discarding dangling relocation
       // sections.
       const uint32_t info = sec.sh_info;
-      InputSectionBase *s = getRelocTarget(i, sec, info);
+      InputSectionBase *s = getRelocTarget(i, info);
       if (!s)
         continue;
 
@@ -1024,9 +1024,7 @@ void readGnuProperty(const InputSection &sec, ObjFile<ELFT> &f) {
 }
 
 template <class ELFT>
-InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx,
-                                                const Elf_Shdr &sec,
-                                                uint32_t info) {
+InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx, uint32_t info) {
   if (info < this->sections.size()) {
     InputSectionBase *target = this->sections[info];
 
diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 834b3b63dd83b..0617f41e1e13a 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -299,8 +299,7 @@ template <class ELFT> class ObjFile : public ELFFileBase {
   void initializeSymbols(const llvm::object::ELFFile<ELFT> &obj);
   void initializeJustSymbols();
 
-  InputSectionBase *getRelocTarget(uint32_t idx, const Elf_Shdr &sec,
-                                   uint32_t info);
+  InputSectionBase *getRelocTarget(uint32_t idx, uint32_t info);
   InputSectionBase *createInputSection(uint32_t idx, const Elf_Shdr &sec,
                                        StringRef name);
 

@kovdan01 kovdan01 merged commit 65f9601 into llvm:main Jun 25, 2024
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants