[llvm-branch-commits] [llvm] 4936d7c - [llvm-objdump][test] Add verneed-invalid.test

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Sep 15 07:05:13 PDT 2022


Author: Fangrui Song
Date: 2022-09-15T16:04:55+02:00
New Revision: 4936d7ce485292b10a7d18a22fa06fcab8f899f6

URL: https://github.com/llvm/llvm-project/commit/4936d7ce485292b10a7d18a22fa06fcab8f899f6
DIFF: https://github.com/llvm/llvm-project/commit/4936d7ce485292b10a7d18a22fa06fcab8f899f6.diff

LOG: [llvm-objdump][test] Add verneed-invalid.test

(cherry picked from commit 55a72dae1f996e4fb1528c1b6b1bff8550fec303)

Added: 
    llvm/test/tools/llvm-objdump/ELF/verneed-invalid.test

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-objdump/ELF/verneed-invalid.test b/llvm/test/tools/llvm-objdump/ELF/verneed-invalid.test
new file mode 100644
index 0000000000000..30011f613037a
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/ELF/verneed-invalid.test
@@ -0,0 +1,25 @@
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objdump -p %t 2>&1 | FileCheck %s --check-prefix=BROKEN-AUX -DFILE=%t
+
+# BROKEN-AUX:      Version References:
+# BROKEN-AUX-NEXT:   required from :
+# BROKEN-AUX-NEXT:     0x00000000 0x00 00
+
+--- !ELF
+FileHeader:
+  Class: ELFCLASS64
+  Data:  ELFDATA2LSB
+  Type:  ET_EXEC
+Sections:
+  - Name:    .gnu.version
+    Type:    SHT_GNU_versym
+    Flags:   [ SHF_ALLOC ]
+    Entries: [ 2 ]
+  - Name:         .gnu.version_r
+    Type:         SHT_GNU_verneed
+    Flags:        [ SHF_ALLOC ]
+    Info:         1
+    AddressAlign: 4
+## The byte offset to the auxiliary entry is 0x11, i.e. it is not correctly aligned in memory.
+    Content: "0100010001000000110000000000000000000000"
+DynamicSymbols: []


        


More information about the llvm-branch-commits mailing list