Files
TheRock/compiler/amd-llvm/llvm/test/tools/llvm-objcopy/ELF/discard-mix-local-and-all.test
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

107 lines
3.8 KiB
Plaintext

# RUN: yaml2obj %s -o %t
# Establish baseline objects for further checks. --discard-locals only discards
# compiler-generated local symbols (starting with .L), --discard-all discards
# all regular local symbols.
# RUN: llvm-objcopy %t %t-discard-none
# RUN: llvm-readobj --symbols %t-discard-none | FileCheck %s --check-prefixes=CHECK,LOCAL,COMPILER-LOCAL
# RUN: llvm-objcopy --discard-all %t %t-discard-all
# RUN: llvm-readobj --symbols %t-discard-all | FileCheck %s
# RUN: llvm-objcopy --discard-locals %t %t-discard-locals
# RUN: llvm-readobj --symbols %t-discard-locals | FileCheck %s --check-prefixes=CHECK,LOCAL
# When mixing --discard-all and --discard-locals, the last one wins.
# RUN: llvm-objcopy --discard-all --discard-locals %t %t.1.o
# RUN: cmp %t.1.o %t-discard-locals
# RUN: llvm-objcopy --discard-locals --discard-all %t %t.2.o
# RUN: cmp %t.2.o %t-discard-all
# RUN: llvm-objcopy -x -X %t %t.3.o
# RUN: cmp %t.3.o %t-discard-locals
# RUN: llvm-objcopy -X -x %t %t.4.o
# RUN: cmp %t.4.o %t-discard-all
# RUN: llvm-objcopy -x -X -x -X %t %t.5.o
# RUN: cmp %t.5.o %t-discard-locals
# RUN: llvm-objcopy -X -x -X -x %t %t.6.o
# RUN: cmp %t.6.o %t-discard-all
# RUN: llvm-objcopy -X -x -X -x --discard-locals %t %t.7.o
# RUN: cmp %t.7.o %t-discard-locals
# RUN: llvm-objcopy -X -x -X -x --discard-all %t %t.8.o
# RUN: cmp %t.8.o %t-discard-all
# llvm-strip works in the same way.
# RUN: llvm-strip --discard-all --discard-locals %t -o %t.9.o
# RUN: cmp %t.9.o %t-discard-locals
# RUN: llvm-strip --discard-locals --discard-all %t -o %t.10.o
# RUN: cmp %t.10.o %t-discard-all
# RUN: llvm-strip -x -X %t -o %t.11.o
# RUN: cmp %t.11.o %t-discard-locals
# RUN: llvm-strip -X -x %t -o %t.12.o
# RUN: cmp %t.12.o %t-discard-all
# RUN: llvm-strip -x -X -x -X %t -o %t.13.o
# RUN: cmp %t.13.o %t-discard-locals
# RUN: llvm-strip -X -x -X -x %t -o %t.14.o
# RUN: cmp %t.14.o %t-discard-all
# RUN: llvm-strip -X -x -X -x --discard-locals %t -o %t.15.o
# RUN: cmp %t.15.o %t-discard-locals
# RUN: llvm-strip -X -x -X -x --discard-all %t -o %t.16.o
# RUN: cmp %t.16.o %t-discard-all
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Symbols:
- Name: Local
Type: STT_FUNC
Section: .text
- Name: .L.str
Type: STT_OBJECT
Section: .text
- Name: Global
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
# CHECK: Symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name:
# CHECK-NEXT: Value: 0x0
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Local
# CHECK-NEXT: Type: None
# CHECK-NEXT: Other: 0
# CHECK-NEXT: Section: Undefined
# CHECK-NEXT: }
# LOCAL-NEXT: Symbol {
# LOCAL-NEXT: Name: Local
# LOCAL-NEXT: Value:
# LOCAL-NEXT: Size:
# LOCAL-NEXT: Binding: Local
# LOCAL-NEXT: Type: Function
# LOCAL-NEXT: Other:
# LOCAL-NEXT: Section: .text
# LOCAL-NEXT: }
# COMPILER-LOCAL-NEXT: Symbol {
# COMPILER-LOCAL-NEXT: Name: .L.str
# COMPILER-LOCAL-NEXT: Value:
# COMPILER-LOCAL-NEXT: Size:
# COMPILER-LOCAL-NEXT: Binding: Local
# COMPILER-LOCAL-NEXT: Type: Object
# COMPILER-LOCAL-NEXT: Other:
# COMPILER-LOCAL-NEXT: Section: .text
# COMPILER-LOCAL-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: Global
# CHECK-NEXT: Value:
# CHECK-NEXT: Size:
# CHECK-NEXT: Binding: Global
# CHECK-NEXT: Type: Function
# CHECK-NEXT: Other:
# CHECK-NEXT: Section: .text
# CHECK-NEXT: }
# CHECK-NEXT: ]