bolt/deps/llvm-18.1.8/lld/test/ELF/linkerscript/sizeofheaders.s

18 lines
580 B
ArmAsm
Raw Normal View History

2025-02-14 19:21:04 +01:00
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
# RUN: echo " SECTIONS { \
# RUN: . = SIZEOF_HEADERS; \
# RUN: _size = SIZEOF_HEADERS; \
# RUN: .text : {*(.text*)} \
# RUN: }" > %t.script
# RUN: ld.lld -o %t --script %t.script %t.o
# RUN: llvm-readelf -s %t | FileCheck %s
# CHECK: Value Size Type Bind Vis Ndx Name
# CHECK: 0000000000000120 0 NOTYPE GLOBAL DEFAULT 1 _start
# CHECK-NEXT: 0000000000000120 0 NOTYPE GLOBAL DEFAULT ABS _size
.global _start
_start:
nop