brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 86c5dd8 Raw
57 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/synthetic-symbols.s -o %t3# RUN: ld.lld -o %t.exe --eh-frame-hdr --script %s %t4# RUN: llvm-objdump -t %t.exe | FileCheck %s5 6# Simple symbol assignment within input section list. The '.' symbol7# is not location counter but offset from the beginning of output8# section .foo9 10SECTIONS {11  . = SIZEOF_HEADERS;12  .foo : {13    begin_foo = .;14    PROVIDE(_begin_sec = .);15    *(.foo)16    end_foo = .;17    PROVIDE_HIDDEN(_end_sec = .);18    PROVIDE(_end_sec_abs = ABSOLUTE(.));19    size_foo_1 = SIZEOF(.foo);20    size_foo_1_abs = ABSOLUTE(SIZEOF(.foo));21    . = ALIGN(0x1000);22    begin_bar = .;23    *(.bar)24    end_bar = .;25    size_foo_2 = SIZEOF(.foo);26  }27 28  size_foo_3 = SIZEOF(.foo);29 30  .eh_frame_hdr : {31     __eh_frame_hdr_start = .;32     __eh_frame_hdr_start2 = ABSOLUTE(ALIGN(0x10));33     *(.eh_frame_hdr)34     __eh_frame_hdr_end = .;35     __eh_frame_hdr_end2 = ABSOLUTE(ALIGN(0x10));36  }37 38  .eh_frame : {}39}40 41# CHECK:      0000000000000160 l       .foo   0000000000000000 .hidden _end_sec42# CHECK-NEXT: 000000000000104c g       .text  0000000000000000 _start43# CHECK-NEXT: 0000000000000158 g       .foo   0000000000000000 _begin_sec44# CHECK-NEXT: 0000000000000160 g       *ABS*  0000000000000000 _end_sec_abs45# CHECK-NEXT: 0000000000000158 g       .foo   0000000000000000 begin_foo46# CHECK-NEXT: 0000000000000160 g       .foo   0000000000000000 end_foo47# CHECK-NEXT: 0000000000000008 g       *ABS*  0000000000000000 size_foo_148# CHECK-NEXT: 0000000000000008 g       *ABS*  0000000000000000 size_foo_1_abs49# CHECK-NEXT: 0000000000001000 g       .foo   0000000000000000 begin_bar50# CHECK-NEXT: 0000000000001004 g       .foo   0000000000000000 end_bar51# CHECK-NEXT: 0000000000000eac g       *ABS*  0000000000000000 size_foo_252# CHECK-NEXT: 0000000000000eac g       *ABS*  0000000000000000 size_foo_353# CHECK-NEXT: 0000000000001004 g       .eh_frame_hdr  0000000000000000 __eh_frame_hdr_start54# CHECK-NEXT: 0000000000001010 g       *ABS*  0000000000000000 __eh_frame_hdr_start255# CHECK-NEXT: 0000000000001018 g       .eh_frame_hdr  0000000000000000 __eh_frame_hdr_end56# CHECK-NEXT: 0000000000001020 g       *ABS*  0000000000000000 __eh_frame_hdr_end257