Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / gc-sections-keep-shared-start.s
blob7eb3c6ce3b8520286950f6639d15da1b44bab549
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # RUN: ld.lld -shared --gc-sections -o %t1 %t
5 # RUN: llvm-readelf --file-headers --symbols %t1
6 # | FileCheck %s
7 # CHECK: Entry point address: 0x1000
8 # CHECK: 0000000000001000 0 FUNC LOCAL HIDDEN 4 _start
9 # CHECK: 0000000000001006 0 FUNC LOCAL HIDDEN 4 internal
10 # CHECK: 0000000000001005 0 FUNC GLOBAL DEFAULT 4 foobar
12 .section .text.start,"ax"
13 .globl _start
14 .type _start,%function
15 .hidden _start
16 _start:
17 jmp internal
19 .section .text.foobar,"ax"
20 .globl foobar
21 .type foobar,%function
22 foobar:
23 ret
25 .section .text.internal,"ax"
26 .globl internal
27 .hidden internal
28 .type internal,%function
29 internal:
30 ret