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
121 lines
4.5 KiB
LLVM
121 lines
4.5 KiB
LLVM
## Show that when bitcode is added to an archive it is handled correctly.
|
|
## The symbol table is as expected and it can be extracted without issue.
|
|
|
|
# RUN: rm -rf %t
|
|
# RUN: split-file %s %t && mkdir -p %t/extracted
|
|
# RUN: cd %t
|
|
# RUN: llvm-as a.ll -o a.bc
|
|
|
|
## Create symtab from bitcode for a new archive.
|
|
# RUN: llvm-ar rcs new.a a.bc
|
|
# RUN: llvm-ar t new.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap new.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
# FILES: a.bc
|
|
|
|
# SYMS: Archive map
|
|
# SYMS-NEXT: gfunc in a.bc
|
|
# SYMS-NEXT: gdata in a.bc
|
|
|
|
# SYMS: a.bc:
|
|
# SYMS-NEXT: -------- D gdata
|
|
# SYMS-NEXT: -------- T gfunc
|
|
# SYMS-NEXT: -------- d ldata
|
|
# SYMS-NEXT: -------- t lfunc
|
|
|
|
## Update symtab from bitcode in an existing archive.
|
|
# RUN: llvm-ar rcS update.a a.bc
|
|
# RUN: llvm-ar t update.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
## Check no symbol table is present.
|
|
# RUN: llvm-nm --print-armap update.a | FileCheck --check-prefix=NOSYMS %s --implicit-check-not={{.}}
|
|
# RUN: llvm-ar s update.a
|
|
# RUN: llvm-ar t update.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap update.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
# NOSYMS: a.bc:
|
|
# NOSYMS-NEXT: -------- D gdata
|
|
# NOSYMS-NEXT: -------- T gfunc
|
|
# NOSYMS-NEXT: -------- d ldata
|
|
# NOSYMS-NEXT: -------- t lfunc
|
|
|
|
## Create symtab from bitcode for a regular archive via MRI script.
|
|
# RUN: llvm-ar -M < add.mri
|
|
# RUN: llvm-ar t mri.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap mri.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Create symtab from bitcode for a new thin archive.
|
|
# RUN: llvm-ar rcs --thin new-thin.a a.bc
|
|
# RUN: llvm-ar t new-thin.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap new-thin.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Update symtab from bitcode in an existing thin archive.
|
|
# RUN: llvm-ar rcS --thin update-thin.a a.bc
|
|
# RUN: llvm-ar t update-thin.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
## Check no symbol table is present.
|
|
# RUN: llvm-nm --print-armap update-thin.a | FileCheck --check-prefix=NOSYMS %s --implicit-check-not={{.}}
|
|
# RUN: llvm-ar s update-thin.a
|
|
# RUN: llvm-ar t update-thin.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap update-thin.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Create symtab from bitcode for a thin archive via MRI script.
|
|
# RUN: llvm-ar -M < add-thin.mri
|
|
# RUN: llvm-ar t mri-thin.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap mri-thin.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Create symtab from bitcode from another archive.
|
|
# RUN: llvm-ar rcs input.a a.bc
|
|
# RUN: llvm-ar cqsL lib.a input.a
|
|
# RUN: llvm-ar t lib.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap lib.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Create symtab from bitcode from another archive via MRI script.
|
|
# RUN: llvm-ar -M < addlib.mri
|
|
# RUN: llvm-ar t mri-addlib.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap mri-addlib.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Create symtab from bitcode from another thin archive.
|
|
# RUN: llvm-ar rcs --thin input-thin.a a.bc
|
|
# RUN: llvm-ar cqsL --thin lib-thin.a input-thin.a
|
|
# RUN: llvm-ar t lib-thin.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap lib-thin.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Create symtab from bitcode from another thin archive via MRI script.
|
|
# RUN: llvm-ar -M < addlib-thin.mri
|
|
# RUN: llvm-ar t mri-addlib-thin.a | FileCheck --check-prefix=FILES %s --implicit-check-not={{.}}
|
|
# RUN: llvm-nm --print-armap mri-addlib-thin.a | FileCheck --check-prefix=SYMS %s --implicit-check-not={{.}}
|
|
|
|
## Extract bitcode and ensure it has not been changed.
|
|
# RUN: cd extracted
|
|
# RUN: llvm-ar x ../new.a a.bc
|
|
# RUN: cmp a.bc a.bc
|
|
|
|
#--- a.ll
|
|
@gdata = global i32 0
|
|
@ldata = internal global i32 0
|
|
define void @gfunc() { ret void }
|
|
define internal void @lfunc() { ret void }
|
|
|
|
#--- add.mri
|
|
CREATE mri.a
|
|
ADDMOD a.bc
|
|
SAVE
|
|
END
|
|
|
|
#--- add-thin.mri
|
|
CREATETHIN mri-thin.a
|
|
ADDMOD a.bc
|
|
SAVE
|
|
END
|
|
|
|
#--- addlib.mri
|
|
CREATE mri-addlib.a
|
|
ADDLIB input.a
|
|
SAVE
|
|
END
|
|
|
|
#--- addlib-thin.mri
|
|
CREATE mri-addlib-thin.a
|
|
ADDLIB input-thin.a
|
|
SAVE
|
|
END
|