xref: /llvm-project/lld/test/ELF/common-shared.s (revision fcc761bd0e441c4b1a6e90b0a33565364a37e61d)
1# REQUIRES: x86
2## When a common symbol is merged with a shared symbol, pick the larger st_size.
3
4# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
5# RUN: echo '.globl com; .comm com, 16' | llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o
6# RUN: ld.lld -shared %t1.o -o %t1.so
7
8# RUN: ld.lld %t.o %t1.so -o %t
9# RUN: llvm-readelf -s %t | FileCheck %s
10# RUN: ld.lld %t1.so %t.o -o %t
11# RUN: llvm-readelf -s %t | FileCheck %s
12
13# CHECK: 16 OBJECT GLOBAL DEFAULT [[#]] com
14
15.globl com
16.comm com,1
17