18 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: echo " SECTIONS { \4# RUN: . = SIZEOF_HEADERS; \5# RUN: _size = SIZEOF_HEADERS; \6# RUN: .text : {*(.text*)} \7# RUN: }" > %t.script8# RUN: ld.lld -o %t --script %t.script %t.o9# RUN: llvm-readelf -s %t | FileCheck %s10 11# CHECK: Value Size Type Bind Vis Ndx Name12# CHECK: 0000000000000120 0 NOTYPE GLOBAL DEFAULT 1 _start13# CHECK-NEXT: 0000000000000120 0 NOTYPE GLOBAL DEFAULT ABS _size14 15.global _start16_start:17 nop18