[PATCH] D38017: [llvm-objcopy] Add test to check that architecture specific values are not used on wrong architecture.
Jake Ehrlich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 17:54:15 PDT 2017
jakehehrlich created this revision.
This change adds a test that checks the an error is produced when a hexagon specific reserved section index is used but e_machine is not EM_HEXAGON
Repository:
rL LLVM
https://reviews.llvm.org/D38017
Files:
test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test
test/tools/llvm-objcopy/section-index-unsupported.test
Index: test/tools/llvm-objcopy/section-index-unsupported.test
===================================================================
--- test/tools/llvm-objcopy/section-index-unsupported.test
+++ test/tools/llvm-objcopy/section-index-unsupported.test
@@ -12,4 +12,4 @@
- Name: test
Index: 0xff05
-# CHECK: [[_:.*]] Symbol 'test' has unsupported value greater than or equal to SHN_LORESERVE: 65285
+# CHECK: Symbol 'test' has unsupported value greater than or equal to SHN_LORESERVE: 65285
Index: test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test
===================================================================
--- /dev/null
+++ test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test
@@ -0,0 +1,15 @@
+# RUN: yaml2obj %s > %t
+# RUN: not llvm-objcopy %t %t2 2>&1 >/dev/null | FileCheck %s
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_X86_64
+Symbols:
+ Global:
+ - Name: test
+ Index: SHN_HEXAGON_SCOMMON
+
+# CHECK: Symbol 'test' has unsupported value greater than or equal to SHN_LORESERVE: 65280
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38017.115770.patch
Type: text/x-patch
Size: 1133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/3613a8da/attachment.bin>
More information about the llvm-commits
mailing list