yaml2obj-coff-multi-doc.test 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # RUN: yaml2obj -format=coff -docnum=1 %s \
  2. # RUN: | llvm-readobj -symbols - | FileCheck -check-prefix=DOC1 %s
  3. # RUN: yaml2obj -format=coff -docnum=2 %s \
  4. # RUN: | llvm-readobj -symbols - | FileCheck -check-prefix=DOC2 %s
  5. # RUN: not yaml2obj -format=coff -docnum=3 %s 2>&1 \
  6. # RUN: | FileCheck -check-prefix=DOC3 %s
  7. # DOC1: Name: _sym1
  8. # DOC2: Name: _sym2
  9. # DOC3: yaml2obj: Cannot find the 3rd document
  10. ---
  11. header:
  12. Machine: IMAGE_FILE_MACHINE_I386
  13. Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
  14. sections:
  15. - Name: .text
  16. Alignment: 16
  17. Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE,
  18. IMAGE_SCN_MEM_READ ]
  19. SectionData: "00000000"
  20. symbols:
  21. - Name: .text
  22. Value: 0
  23. SectionNumber: 1
  24. SimpleType: IMAGE_SYM_TYPE_NULL
  25. ComplexType: IMAGE_SYM_DTYPE_NULL
  26. StorageClass: IMAGE_SYM_CLASS_STATIC
  27. SectionDefinition:
  28. Length: 36
  29. NumberOfRelocations: 3
  30. NumberOfLinenumbers: 0
  31. CheckSum: 0
  32. Number: 1
  33. - Name: _main
  34. Value: 0
  35. SectionNumber: 1
  36. SimpleType: IMAGE_SYM_TYPE_NULL
  37. ComplexType: IMAGE_SYM_DTYPE_FUNCTION
  38. StorageClass: IMAGE_SYM_CLASS_EXTERNAL
  39. - Name: _sym1
  40. Value: 0
  41. SectionNumber: 0
  42. SimpleType: IMAGE_SYM_TYPE_NULL
  43. ComplexType: IMAGE_SYM_DTYPE_NULL
  44. StorageClass: IMAGE_SYM_CLASS_EXTERNAL
  45. ---
  46. header:
  47. Machine: IMAGE_FILE_MACHINE_I386
  48. Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
  49. sections:
  50. - Name: .text
  51. Alignment: 16
  52. Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE,
  53. IMAGE_SCN_MEM_READ ]
  54. SectionData: "00000000"
  55. symbols:
  56. - Name: .text
  57. Value: 0
  58. SectionNumber: 1
  59. SimpleType: IMAGE_SYM_TYPE_NULL
  60. ComplexType: IMAGE_SYM_DTYPE_NULL
  61. StorageClass: IMAGE_SYM_CLASS_STATIC
  62. SectionDefinition:
  63. Length: 36
  64. NumberOfRelocations: 3
  65. NumberOfLinenumbers: 0
  66. CheckSum: 0
  67. Number: 1
  68. - Name: _main
  69. Value: 0
  70. SectionNumber: 1
  71. SimpleType: IMAGE_SYM_TYPE_NULL
  72. ComplexType: IMAGE_SYM_DTYPE_FUNCTION
  73. StorageClass: IMAGE_SYM_CLASS_EXTERNAL
  74. - Name: _sym2
  75. Value: 0
  76. SectionNumber: 0
  77. SimpleType: IMAGE_SYM_TYPE_NULL
  78. ComplexType: IMAGE_SYM_DTYPE_NULL
  79. StorageClass: IMAGE_SYM_CLASS_EXTERNAL
  80. ...