CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
61 lines
1.8 KiB
ArmAsm
61 lines
1.8 KiB
ArmAsm
// REQUIRES: x86
|
|
|
|
// Check that we can wrap a dllimported symbol, so that references to
|
|
// __imp_<symbol> gets redirected to a symbol that already exists or a defined
|
|
// local import instead.
|
|
|
|
// RUN: split-file %s %t.dir
|
|
// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %t.dir/main.s -o %t.main.obj
|
|
// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %t.dir/other.s -o %t.other.obj
|
|
|
|
// RUN: lld-link -dll -out:%t.dll %t.other.obj -noentry -safeseh:no -export:foo -export:bar -implib:%t.lib
|
|
// RUN: lld-link -out:%t.exe %t.main.obj %t.lib -entry:entry -subsystem:console -debug:symtab -safeseh:no -wrap:foo -wrap:bar -lldmap:%t.map
|
|
// RUN: llvm-objdump -s -d --print-imm-hex %t.exe | FileCheck %s
|
|
|
|
// CHECK: Contents of section .rdata:
|
|
// CHECK-NEXT: 402000 0c104000
|
|
|
|
// CHECK: Disassembly of section .text:
|
|
// CHECK-EMPTY:
|
|
// CHECK: 00401000 <_entry>:
|
|
// CHECK-NEXT: 401000: ff 25 00 20 40 00 jmpl *0x402000
|
|
// CHECK-NEXT: 401006: ff 25 00 00 00 00 jmpl *0x0
|
|
// CHECK-EMPTY:
|
|
// CHECK-NEXT: 0040100c <___wrap_foo>:
|
|
// CHECK-NEXT: 40100c: c3 retl
|
|
// CHECK-EMPTY:
|
|
// CHECK-NEXT: 0040100d <___wrap_bar>:
|
|
// CHECK-NEXT: 40100d: c3 retl
|
|
|
|
// The first jmpl instruction in _entry points at an address in 0x402000,
|
|
// which is the first 4 bytes of the .rdata section (above), which is a
|
|
// pointer that points at ___wrap_foo.
|
|
|
|
// The second jmpl instruction in _entry points to null because the referenced
|
|
// symbol `__imp____wrap_bar` is declared as a weak reference to prevent pull a
|
|
// reference from an external DLL.
|
|
|
|
#--- main.s
|
|
.global _entry
|
|
_entry:
|
|
jmpl *__imp__foo
|
|
jmpl *__imp__bar
|
|
|
|
.global ___wrap_foo
|
|
___wrap_foo:
|
|
ret
|
|
|
|
.weak __imp____wrap_bar
|
|
.global ___wrap_bar
|
|
___wrap_bar:
|
|
ret
|
|
|
|
#--- other.s
|
|
.global _foo
|
|
_foo:
|
|
ret
|
|
|
|
.global _bar
|
|
_bar:
|
|
ret
|