[PATCH] D24363: [ELF] Fix DT_NEEDED value

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 14:27:12 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL280990: [ELF] Fix DT_NEEDED value. (authored by davide).

Changed prior to commit:
  https://reviews.llvm.org/D24363?vs=70749&id=70752#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24363

Files:
  lld/trunk/ELF/InputFiles.cpp
  lld/trunk/test/ELF/as-needed-no-reloc.s
  lld/trunk/test/ELF/shared.s

Index: lld/trunk/test/ELF/shared.s
===================================================================
--- lld/trunk/test/ELF/shared.s
+++ lld/trunk/test/ELF/shared.s
@@ -119,7 +119,6 @@
 // CHECK-NEXT:   EntrySize: 8
 // CHECK-NEXT:   SectionData (
 // CHECK:        )
-// CHECK-NEXT: }
 
 // CHECK:      Name: .symtab
 // CHECK-NEXT: Type: SHT_SYMTAB
Index: lld/trunk/test/ELF/as-needed-no-reloc.s
===================================================================
--- lld/trunk/test/ELF/as-needed-no-reloc.s
+++ lld/trunk/test/ELF/as-needed-no-reloc.s
@@ -16,7 +16,7 @@
 # CHECK-NEXT: Other: 0
 # CHECK-NEXT: Section: Undefined
 
-# CHECK: NEEDED SharedLibrary ({{.*}}2.so)
+# CHECK: NEEDED SharedLibrary (as-needed-no-reloc{{.*}}2.so)
 
         .globl _start
 _start:
Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -19,6 +19,7 @@
 #include "llvm/CodeGen/Analysis.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
 
 using namespace llvm;
@@ -477,7 +478,7 @@
   }
 
   this->initStringTable();
-  SoName = this->getName();
+  SoName = sys::path::filename(this->getName());
 
   if (!DynamicSec)
     return;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24363.70752.patch
Type: text/x-patch
Size: 1326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160908/e973547e/attachment.bin>


More information about the llvm-commits mailing list