xref: /llvm-project-15.0.7/lld/test/ELF/relocation-undefined-weak.s (revision 0d4e6519)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
3## On some targets (e.g. ARM, AArch64, and PPC), PC relative relocations to
4## weak undefined symbols resolve to special positions. On many others
5## the target symbols as treated as VA 0.
6
7# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
8# RUN: ld.lld %t.o -o %t
9# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s
10
11.global _start
12_start:
13  movl $1, sym1(%rip)
14
15.weak sym1
16
17# CHECK: 201120: movl $0x1, -0x20112a(%rip)
18

served by {OpenGrok

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