llvm-project/lld/test/old-elf/X86_64/weak-zero-sized.test

27 lines
1.1 KiB
Plaintext

# Test for zero sized weak atoms, there is only a single weak atom
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/weak-zero-sized.o -o %t \
RUN: --noinhibit-exec
RUN: llvm-nm %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/weak-zero-sized.o \
RUN: --output-filetype=yaml -o %t2 --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2
WEAKORDER: 004001a4 T _start
WEAKATOMSORDER: alignment: 4
WEAKATOMSORDER: - kind: layout-after
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: [[TARGETC:[-a-zA-Z0-9_]+]]
WEAKATOMSORDER: - name: [[TARGETA:[-a-zA-Z0-9_]+]]
WEAKATOMSORDER: scope: global
WEAKATOMSORDER: merge: as-weak
WEAKATOMSORDER: alignment: 4
WEAKATOMSORDER: references:
WEAKATOMSORDER: - kind: layout-after
WEAKATOMSORDER: offset: 0
WEAKATOMSORDER: target: [[TARGETC]]
WEAKATOMSORDER: - ref-name: [[TARGETC]]
WEAKATOMSORDER: scope: global
WEAKATOMSORDER: content: [ C3 ]
WEAKATOMSORDER: alignment: 4