[ELF] Fix DT_NEEDED value.

Differential Revision: https://reviews.llvm.org/D24363

llvm-svn: 280990
This commit is contained in:
Davide Italiano 2016-09-08 21:18:38 +00:00
parent e349b6da2c
commit e02ba98f8f
3 changed files with 3 additions and 3 deletions

View File

@ -19,6 +19,7 @@
#include "llvm/CodeGen/Analysis.h" #include "llvm/CodeGen/Analysis.h"
#include "llvm/IR/LLVMContext.h" #include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h" #include "llvm/Support/raw_ostream.h"
using namespace llvm; using namespace llvm;
@ -477,7 +478,7 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() {
} }
this->initStringTable(); this->initStringTable();
SoName = this->getName(); SoName = sys::path::filename(this->getName());
if (!DynamicSec) if (!DynamicSec)
return; return;

View File

@ -16,7 +16,7 @@
# CHECK-NEXT: Other: 0 # CHECK-NEXT: Other: 0
# CHECK-NEXT: Section: Undefined # CHECK-NEXT: Section: Undefined
# CHECK: NEEDED SharedLibrary ({{.*}}2.so) # CHECK: NEEDED SharedLibrary (as-needed-no-reloc{{.*}}2.so)
.globl _start .globl _start
_start: _start:

View File

@ -119,7 +119,6 @@
// CHECK-NEXT: EntrySize: 8 // CHECK-NEXT: EntrySize: 8
// CHECK-NEXT: SectionData ( // CHECK-NEXT: SectionData (
// CHECK: ) // CHECK: )
// CHECK-NEXT: }
// CHECK: Name: .symtab // CHECK: Name: .symtab
// CHECK-NEXT: Type: SHT_SYMTAB // CHECK-NEXT: Type: SHT_SYMTAB