Skip to content

Commit

Permalink
[LLD][ELF] - Add a test case for DT_SONAME entry reading.
Browse files Browse the repository at this point in the history
This covers a following line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L899

llvm-svn: 339880
  • Loading branch information
George Rimar committed Aug 16, 2018
1 parent 923e499 commit e32c31a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lld/test/ELF/invalid/invalid-soname.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# REQUIRES: x86
# RUN: yaml2obj %s -o %t.so
# RUN: not ld.lld %t.so -o %t.exe 2>&1 | FileCheck %s

# CHECK: error: {{.*}}.so: invalid DT_SONAME entry

--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Machine: EM_X86_64
Sections:
- Name: .test
Type: SHT_DYNAMIC
Flags: [ SHF_ALLOC ]
Content: "0e000000000000000000000000000001"
Link: .strtab

0 comments on commit e32c31a

Please sign in to comment.