brintos

brintos / llvm-project-archived public Read only

0
0
Text · 996 B · e30f05b Raw
38 lines · plain
1// REQUIRES: x862// Should set the value of the "_end" symbol to the end of the data segment.3 4// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o5 6// By default, the .bss section is the latest section of the data segment.7// RUN: ld.lld %t.o -o %t8// RUN: llvm-readobj --sections --symbols %t | FileCheck %s --check-prefix=DEFAULT9 10// DEFAULT: Sections [11// DEFAULT:     Name: .bss12// DEFAULT-NEXT:     Type:13// DEFAULT-NEXT:     Flags [14// DEFAULT-NEXT:       SHF_ALLOC15// DEFAULT-NEXT:       SHF_WRITE16// DEFAULT-NEXT:     ]17// DEFAULT-NEXT:     Address: 0x20215B18// DEFAULT-NEXT:     Offset:19// DEFAULT-NEXT:     Size: 620// DEFAULT: ]21// DEFAULT: Symbols [22// DEFAULT:     Name: _end23// DEFAULT-NEXT:     Value: 0x20216124// DEFAULT: ]25 26// RUN: ld.lld -r %t.o -o %t27// RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=RELOCATABLE28// RELOCATABLE: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _end29 30.global _start,_end31.text32_start:33    nop34.data35    .word 136.bss37    .space 638