[lld] r307032 - [ELF] - Remove use of precomipled binary for invalid-relocation-x64.test

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 08:24:50 PDT 2017


Author: grimar
Date: Mon Jul  3 08:24:50 2017
New Revision: 307032

URL: http://llvm.org/viewvc/llvm-project?rev=307032&view=rev
Log:
[ELF] - Remove use of precomipled binary for invalid-relocation-x64.test

Since yaml2obj is now able to parse integer values as relocation types,
there is no need to keep hex edited elf object for this test,
we can produce it on fly, just like this patch do.

Differential revision: https://reviews.llvm.org/D34893

Removed:
    lld/trunk/test/ELF/invalid/Inputs/invalid-relocation-x64.elf
Modified:
    lld/trunk/test/ELF/invalid/invalid-relocation-x64.test

Removed: lld/trunk/test/ELF/invalid/Inputs/invalid-relocation-x64.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/Inputs/invalid-relocation-x64.elf?rev=307031&view=auto
==============================================================================
Binary file - no diff available.

Modified: lld/trunk/test/ELF/invalid/invalid-relocation-x64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/invalid-relocation-x64.test?rev=307032&r1=307031&r2=307032&view=diff
==============================================================================
--- lld/trunk/test/ELF/invalid/invalid-relocation-x64.test (original)
+++ lld/trunk/test/ELF/invalid/invalid-relocation-x64.test Mon Jul  3 08:24:50 2017
@@ -1,7 +1,8 @@
-## invalid-relocation-x64.elf contains relocations with invalid relocation number.
-## Next yaml code was used to create initial binary. After that it
-## was modified with hex-editor to replace known relocations with fake ones,
-## that have 0x98 and 0x98 numbers.
+# RUN: yaml2obj %s -o %t.o
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
+# CHECK: {{.*}}.o: unknown relocation type: Unknown (152)
+# CHECK: {{.*}}.o: unknown relocation type: Unknown (153)
+
 !ELF
 FileHeader:
   Class:           ELFCLASS64
@@ -20,11 +21,7 @@ Sections:
     Relocations:
       - Offset:          0x0000000000000000
         Symbol:          ''
-        Type:            R_X86_64_NONE
+        Type:            0x98
       - Offset:          0x0000000000000000
         Symbol:          ''
-        Type:            R_X86_64_NONE
-
-# RUN: not ld.lld %p/Inputs/invalid-relocation-x64.elf -o %t2 2>&1 | FileCheck %s
-# CHECK: {{.*}}invalid-relocation-x64.elf: unknown relocation type: Unknown (152)
-# CHECK: {{.*}}invalid-relocation-x64.elf: unknown relocation type: Unknown (153)
+        Type:            0x99




More information about the llvm-commits mailing list