summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-10-10 00:17:57 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-10-10 00:17:57 +0000
commitefbe94890cb8920a8aecb88d1b8cd71a6553db2f (patch)
treea17b8d73ae04d9961cd0d434ec9372431d966e58 /llvm/test
parent348fb385d5784aa8227b84ded6b9e9d7cec5578b (diff)
downloadbcm5719-llvm-efbe94890cb8920a8aecb88d1b8cd71a6553db2f.tar.gz
bcm5719-llvm-efbe94890cb8920a8aecb88d1b8cd71a6553db2f.zip
obj2yaml, COFF: Handle long section names
Long section names are represented as a slash followed by a numeric ASCII string. This number is an offset into a string table. Print the appropriate entry in the string table instead of the less enlightening /4. N.B. yaml2obj already does the right thing, this test exercises both sides of the (de-)serialization. llvm-svn: 219458
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Object/Inputs/COFF/long-section-name.yaml11
-rw-r--r--llvm/test/Object/obj2yaml-coff-long-section-name.test3
2 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/COFF/long-section-name.yaml b/llvm/test/Object/Inputs/COFF/long-section-name.yaml
new file mode 100644
index 00000000000..a86f9019cd5
--- /dev/null
+++ b/llvm/test/Object/Inputs/COFF/long-section-name.yaml
@@ -0,0 +1,11 @@
+---
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ IMAGE_FILE_RELOCS_STRIPPED, IMAGE_FILE_LINE_NUMS_STRIPPED, IMAGE_FILE_LOCAL_SYMS_STRIPPED, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+ - Name: .long_section_name
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ SectionData: ''
+symbols:
+...
diff --git a/llvm/test/Object/obj2yaml-coff-long-section-name.test b/llvm/test/Object/obj2yaml-coff-long-section-name.test
new file mode 100644
index 00000000000..5457aef28c5
--- /dev/null
+++ b/llvm/test/Object/obj2yaml-coff-long-section-name.test
@@ -0,0 +1,3 @@
+RUN: yaml2obj %p/Inputs/COFF/long-section-name.yaml | obj2yaml | FileCheck %s --check-prefix COFF-I386
+
+COFF-I386: Name: .long_section_name
OpenPOWER on IntegriCloud