diff options
| author | Eric Beckmann <ecbeckmann@google.com> | 2017-06-30 18:16:35 +0000 |
|---|---|---|
| committer | Eric Beckmann <ecbeckmann@google.com> | 2017-06-30 18:16:35 +0000 |
| commit | e44afc4aff5fa059839fb15cd1a89069eea82564 (patch) | |
| tree | 0560ca608c2477ed072fa6e831a8f832a3ffce09 /llvm/test/tools | |
| parent | 02a267758e0f2fb0b1475e8c68cdfae8411f2483 (diff) | |
| download | bcm5719-llvm-e44afc4aff5fa059839fb15cd1a89069eea82564.tar.gz bcm5719-llvm-e44afc4aff5fa059839fb15cd1a89069eea82564.zip | |
Fix bug in symbol generation for resource COFF
Symbols in the resource COFF file should be for .rsrc$02, where the
actual resource data is, not .rsrc$01, which contains the directory
tree.
Differential Revision: https://reviews.llvm.org/D34832
Patch by Joe Ranieri.
llvm-svn: 306853
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/llvm-cvtres/symbols.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cvtres/symbols.test b/llvm/test/tools/llvm-cvtres/symbols.test new file mode 100644 index 00000000000..2ca3a193ac4 --- /dev/null +++ b/llvm/test/tools/llvm-cvtres/symbols.test @@ -0,0 +1,33 @@ +// Check COFF emission of cvtres +// The input was generated with the following command, using the original Windows +// rc.exe: +// > rc /fo test_resource.res /nologo test_resource.rc +// The object file we are comparing against was generated with this command using +// the original Windows cvtres.exe. +// > cvtres /machine:X86 /readonly /nologo /out:test_resource.obj.coff \ +// test_resource.res + +RUN: llvm-cvtres /verbose /out:%t %p/Inputs/test_resource.res +RUN: llvm-readobj -symbols %t | FileCheck %s + +CHECK: Name: $R000000 +CHECK-NEXT: Value: 0 +CHECK-NEXT: Section: .rsrc$02 +CHECK: Name: $R000018 +CHECK-NEXT: Value: 24 +CHECK-NEXT: Section: .rsrc$02 +CHECK: Name: $R000340 +CHECK-NEXT: Value: 832 +CHECK-NEXT: Section: .rsrc$02 +CHECK: Name: $R000668 +CHECK-NEXT: Value: 1640 +CHECK-NEXT: Section: .rsrc$02 +CHECK: Name: $R000698 +CHECK-NEXT: Value: 1688 +CHECK-NEXT: Section: .rsrc$02 +CHECK: Name: $R000720 +CHECK-NEXT: Value: 1824 +CHECK-NEXT: Section: .rsrc$02 +CHECK: Name: $R000750 +CHECK-NEXT: Value: 1872 +CHECK-NEXT: Section: .rsrc$02 |

