xref: /llvm-project-15.0.7/llvm/test/MC/ELF/gnu-unique.s (revision 6bdad85b)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc -triple=x86_64 %s | FileCheck %s --check-prefix=ASM
2# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
3# RUN: llvm-readelf -h -s %t | FileCheck %s --check-prefix=OBJ
4# RUN: llvm-objdump -d -r --no-show-raw-insn %t | FileCheck %s --check-prefix=DISASM
5
6# ASM: .type unique,@gnu_unique_object
7
8# OBJ: OS/ABI: UNIX - GNU
9# OBJ: Type   Bind   Vis     Ndx Name
10# OBJ: OBJECT UNIQUE DEFAULT [[#]] unique
11
12# DISASM-LABEL: <.text>:
13# DISASM-NEXT:    movl $1, 0
14## unique has a non-local binding. Reference unique instead of .data
15# DISASM-NEXT:      R_X86_64_32S unique
16
17  movl $1, unique
18
19.data
20.globl unique
21.type unique, @gnu_unique_object
22unique:
23

served by {OpenGrok

Last Index Update: Fri May 15 20:09:11 GMT 2026