mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
06eb5aad37
The ELF format is used on Windows by the MCJIT engine. Thus, on Windows, the ELFObjectWriter can encounter symbols mangled using the MS Visual Studio C++ name mangling. Symbols mangled using the MSVC C++ name mangling can legally have "@@@" as a substring. The EFLObjectWriter should not interpret the "@@@" substring as specifying GNU-style symbol versioning. The ELFObjectWriter therefore check for the MSVC C++ name mangling prefix which is either "?", "@?", "imp_?" or "imp_?@". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226830 91177308-0d34-0410-b5e6-96231b3b80d8
60 lines
2.1 KiB
ArmAsm
60 lines
2.1 KiB
ArmAsm
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-windows-elf %s -o - | llvm-readobj -r -t | FileCheck %s
|
|
|
|
// Verify that MSVC C++ mangled symbols are not affected by the ELF
|
|
// GNU-style symbol versioning. The ELF format is used on Windows by
|
|
// the MCJIT execution engine.
|
|
|
|
.long "??_R0?AVexception@std@@@8"
|
|
.long "@??_R0?AVinvalid_argument@std@@@8"
|
|
.long "__imp_??_R0?AVlogic_error@std@@@8"
|
|
.long "__imp_@??_R0PAVexception@std@@@8"
|
|
|
|
|
|
// CHECK: Relocations [
|
|
// CHECK-NEXT: Section (2) .rela.text {
|
|
// CHECK-NEXT: 0x0 R_X86_64_32 ??_R0?AVexception@std@@@8 0x0
|
|
// CHECK-NEXT: 0x4 R_X86_64_32 @??_R0?AVinvalid_argument@std@@@8 0x0
|
|
// CHECK-NEXT: 0x8 R_X86_64_32 __imp_??_R0?AVlogic_error@std@@@8 0x0
|
|
// CHECK-NEXT: 0xC R_X86_64_32 __imp_@??_R0PAVexception@std@@@8 0x0
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK: Symbols [
|
|
// CHECK: Symbol {
|
|
// CHECK: Name: ??_R0?AVexception@std@@@8 (102)
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Global (0x1)
|
|
// CHECK-NEXT: Type: None (0x0)
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: @??_R0?AVinvalid_argument@std@@@8 (1)
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Global (0x1)
|
|
// CHECK-NEXT: Type: None (0x0)
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: __imp_??_R0?AVlogic_error@std@@@8 (35)
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Global (0x1)
|
|
// CHECK-NEXT: Type: None (0x0)
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: __imp_@??_R0PAVexception@std@@@8 (69)
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Global (0x1)
|
|
// CHECK-NEXT: Type: None (0x0)
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|