brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · a32a936 Raw
37 lines · plain
1# REQUIRES: x862## __start/__stop symbols retain the associated empty sections with C identifier names.3 4# RUN: rm -rf %t && split-file %s %t5# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/test.s -o %t.o6# RUN: ld.lld -T %t/ldscript -o %t.out %t.o -z start-stop-visibility=default7# RUN: llvm-objdump -h -t %t.out | FileCheck %s8 9# CHECK:      .text10# CHECK-NEXT: empty111# CHECK-NEXT: empty212# CHECK-NEXT: empty313 14# CHECK:      [[#%x,ADDR:]]       l       empty1 0000000000000000 .hidden __start_empty115# CHECK-NEXT: {{0*}}[[#ADDR]]     g       empty2 0000000000000000 .protected __stop_empty216# CHECK-NEXT: {{0*}}[[#ADDR]]     g       empty3 0000000000000000 __stop_empty317 18#--- ldscript19SECTIONS {20  .text : { *(.text .text.*) }21  empty0 : { *(empty0) }22  empty1 : { *(empty1) }23  empty2 : { *(empty2) }24  empty3 : { *(empty3) }25}26 27#--- test.s28.weak __start_empty1, __stop_empty2, __stop_empty329.hidden __start_empty130.protected __stop_empty231 32.globl _start33_start:34  movq __start_empty1@GOTPCREL(%rip),%rax35  movq __stop_empty2@GOTPCREL(%rip),%rax36  movq __stop_empty3@GOTPCREL(%rip),%rax37