xref: /llvm-project/lld/test/ELF/just-symbols.s (revision 3c9d86f9515e2cdc57dd76095ab9099aa399f652)
1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4# RUN: ld.lld %t.o -o %t1.exe -Ttext=0x10000
5
6# RUN: ld.lld -just-symbols=%t1.exe -o %t2.exe
7# RUN: llvm-readelf -s %t2.exe | FileCheck %s
8
9# CHECK: 0000000000010000     0 NOTYPE  GLOBAL DEFAULT  ABS foo
10# CHECK: 0000000000011001    40 OBJECT  GLOBAL DEFAULT  ABS bar
11
12.globl foo, bar
13foo:
14  ret
15
16.section .data
17.type bar, @object
18.size bar, 40
19bar:
20  .zero 40
21