Files
TheRock/compiler/amd-llvm/lld/test/ELF/mips-got-weak.s
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

57 lines
1.7 KiB
ArmAsm

# REQUIRES: mips
# Check R_MIPS_GOT16 relocation against weak symbols.
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
# RUN: ld.lld %t.o -shared -o %t1.so
# RUN: llvm-readelf -r --dyn-syms --dynamic-table -A %t1.so \
# RUN: | FileCheck -check-prefixes=CHECK,NOSYM %s
# RUN: ld.lld %t.o -shared -Bsymbolic -o %t2.so
# RUN: llvm-readelf -r --dyn-syms --dynamic-table -A %t2.so \
# RUN: | FileCheck -check-prefixes=CHECK,SYM %s
# CHECK: Dynamic section
# CHECK: (MIPS_SYMTABNO) 4
# NOSYM: (MIPS_LOCAL_GOTNO) 2
# NOSYM: (MIPS_GOTSYM) 0x1
# SYM: (MIPS_LOCAL_GOTNO) 4
# SYM: (MIPS_GOTSYM) 0x3
# CHECK: There are no relocations in this file.
# CHECK: Symbol table '.dynsym'
# CHECK-DAG: [[FOO:[0-9a-f]+]] 0 NOTYPE WEAK DEFAULT 8 foo
# CHECK-DAG: 00000000 0 NOTYPE WEAK DEFAULT UND bar
# CHECK-DAG: [[SYM:[0-9a-f]+]] 0 NOTYPE GLOBAL DEFAULT 8 sym
# NOSYM: Primary GOT:
# NOSYM-NOT: Local entries:
# NOSYM: Global entries:
# NOSYM-NEXT: Access Initial Sym.Val. Type Ndx Name
# NOSYM-NEXT: -32744(gp) [[FOO]] [[FOO]] NOTYPE 8 foo
# NOSYM-NEXT: -32740(gp) 00000000 00000000 NOTYPE UND bar
# NOSYM-NEXT: -32736(gp) [[SYM]] [[SYM]] NOTYPE 8 sym
# SYM: Primary GOT:
# SYM: Local entries:
# SYM-NEXT: Access Initial
# SYM-NEXT: -32744(gp) [[FOO]]
# SYM-NEXT: -32740(gp) [[SYM]]
# SYM: Global entries:
# SYM-NEXT: Access Initial Sym.Val. Type Ndx Name
# SYM-NEXT: -32736(gp) 00000000 00000000 NOTYPE UND bar
.text
.global sym
.weak foo,bar
func:
lw $t0,%got(foo)($gp)
lw $t0,%got(bar)($gp)
lw $t0,%got(sym)($gp)
.data
.weak foo
foo:
.word 0
sym:
.word 0