[llvm] r313661 - [llvm-objcopy] Add test to check that architecture specific values are not used on wrong architecture.

Jake Ehrlich via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 12:05:15 PDT 2017


Author: jakehehrlich
Date: Tue Sep 19 12:05:15 2017
New Revision: 313661

URL: http://llvm.org/viewvc/llvm-project?rev=313661&view=rev
Log:
[llvm-objcopy] Add test to check that architecture specific values are not used on wrong architecture.

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.

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

Added:
    llvm/trunk/test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test
      - copied, changed from r313660, llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test
Modified:
    llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test

Copied: llvm/trunk/test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test (from r313660, llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test?p2=llvm/trunk/test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test&p1=llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test&r1=313660&r2=313661&rev=313661&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test (original)
+++ llvm/trunk/test/tools/llvm-objcopy/hexagon-unsupported-on-x86.test Tue Sep 19 12:05:15 2017
@@ -10,6 +10,6 @@ FileHeader:
 Symbols:
   Global:
     - Name:     test
-      Index:    0xff05
+      Index:    SHN_HEXAGON_SCOMMON
 
-# 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: 65280

Modified: llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test?rev=313661&r1=313660&r2=313661&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test (original)
+++ llvm/trunk/test/tools/llvm-objcopy/section-index-unsupported.test Tue Sep 19 12:05:15 2017
@@ -12,4 +12,4 @@ Symbols:
     - 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




More information about the llvm-commits mailing list