brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.0 KiB · 6cbbbfb Raw
125 lines · plain
1# REQUIRES: ppc2# RUN: echo 'SECTIONS { \3# RUN:   .text_default_stother0 0x10010000: { *(.text_default_stother0) } \4# RUN:   .text_default_stother1 0x10020000: { *(.text_default_stother1) } \5# RUN:   .text_hidden_stother0 0x10030000: { *(.text_hidden_stother0) } \6# RUN:   .text_hidden_stother1 0x10040000: { *(.text_hidden_stother1) } \7# RUN:   }' > %t.script8 9# RUN: llvm-mc -filetype=obj -triple=powerpc64le -defsym HIDDEN=1 %s -o %t1.o10# RUN: llvm-mc -filetype=obj -triple=powerpc64le %p/Inputs/ppc64-callee-global-hidden.s -o %t2.o11# RUN: ld.lld -T %t.script -shared %t1.o %t2.o -o %t.so12# RUN: llvm-readelf -s %t.so | FileCheck %s --check-prefix=SYMBOL13# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HIDDEN %s14 15# RUN: llvm-mc -filetype=obj -triple=powerpc64le -defsym GLOBAL=1 %s -o %t3.o16# RUN: ld.lld -T %t.script %t3.o -o %t17# RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYMBOL-GLOBAL18# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s19 20# RUN: llvm-mc -filetype=obj -triple=powerpc64 -defsym HIDDEN=1 %s -o %t1.o21# RUN: llvm-mc -filetype=obj -triple=powerpc64 %p/Inputs/ppc64-callee-global-hidden.s -o %t2.o22# RUN: ld.lld -T %t.script -shared %t1.o %t2.o -o %t.so23# RUN: llvm-readelf -s %t.so | FileCheck %s --check-prefix=SYMBOL24# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HIDDEN %s25 26# RUN: llvm-mc -filetype=obj -triple=powerpc64 -defsym GLOBAL=1 %s -o %t3.o27# RUN: ld.lld -T %t.script %t3.o -o %t28# RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYMBOL-GLOBAL29# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s30 31# SYMBOL:      2: 0000000010010000 0 NOTYPE LOCAL DEFAULT 5 callee1_stother0_default32# SYMBOL-NEXT: 3: 0000000010010004 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 5 caller133# SYMBOL-NEXT: 4: 0000000010020000 0 NOTYPE LOCAL DEFAULT 6 func_local34# SYMBOL-NEXT: 5: 0000000010020004 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 6 callee2_stother1_default35# SYMBOL-NEXT: 6: 000000001002000c 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 6 caller236# SYMBOL-NEXT: 7: 0000000010030000 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 7 caller337# SYMBOL-NEXT: 8: 0000000010040000 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 8 caller438# SYMBOL-NEXT: 9: 0000000010040008 0 NOTYPE LOCAL DEFAULT 9 func_extern39# SYMBOL-NEXT: 10: 000000001004000c 0 NOTYPE LOCAL HIDDEN 9 callee3_stother0_hidden40# SYMBOL-NEXT: 11: 0000000010040010 0 NOTYPE LOCAL HIDDEN [<other: 0x22>] 9 callee4_stother1_hidden41 42# SYMBOL-GLOBAL:      2: 0000000010010004 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 1 caller143# SYMBOL-GLOBAL-NEXT: 3: 0000000010020000 0 NOTYPE LOCAL DEFAULT 2 func_local44# SYMBOL-GLOBAL-NEXT: 4: 000000001002000c 0 NOTYPE LOCAL DEFAULT [<other: 0x20>] 2 caller245# SYMBOL-GLOBAL-NEXT: 5: 0000000010010000 0 NOTYPE GLOBAL DEFAULT 1 callee1_stother0_default46# SYMBOL-GLOBAL-NEXT: 6: 0000000010020004 0 NOTYPE GLOBAL DEFAULT [<other: 0x20>] 2 callee2_stother1_default47 48# CHECK-LABEL: <callee1_stother0_default>:49# CHECK-NEXT:  10010000: blr50 51# CHECK-LABEL: <caller1>:52# CHECK:       10010004: bl 0x1001000053# CHECK-NEXT:  10010008: b 0x1001000054.section .text_default_stother0, "ax", %progbits55.ifdef GLOBAL56.globl callee1_stother0_default57.endif58callee1_stother0_default:59  blr60caller1:61  .localentry caller1, 162  ## nop is not needed after bl for R_PPC64_REL24_NOTOC63  bl callee1_stother0_default@notoc64  b callee1_stother0_default@notoc65 66# CHECK-LABEL: <func_local>:67# CHECK-NEXT:  10020000: blr68 69# CHECK-LABEL: <callee2_stother1_default>:70# CHECK-NEXT:  10020004: bl 0x1002000071# CHECK-NEXT:  10020008: blr72 73# CHECK-LABEL: <caller2>:74# CHECK:       1002000c: bl 0x1002000475# CHECK-NEXT:  10020010: b 0x1002000476.section .text_default_stother1, "ax", %progbits77func_local:78  blr79.ifdef GLOBAL80.globl callee2_stother1_default81.endif82callee2_stother1_default:83  .localentry callee2_stother1_default, 184  ## nop is not needed after bl for R_PPC64_REL24_NOTOC85  bl func_local@notoc86  blr87caller2:88  .localentry caller2, 189  ## nop is not needed after bl for R_PPC64_REL24_NOTOC90  bl callee2_stother1_default@notoc91  b callee2_stother1_default@notoc92 93# CHECK-HIDDEN-LABEL: <caller3>:94# CHECK-HIDDEN-NEXT:  10030000: bl 0x1004000c95# CHECK-HIDDEN-NEXT:  10030004: b 0x1004000c96 97# CHECK-HIDDEN-LABEL: <caller4>:98# CHECK-HIDDEN-NEXT:  10040000: bl 0x1004001099# CHECK-HIDDEN-NEXT:  10040004: b 0x10040010100 101# CHECK-HIDDEN-LABEL: <func_extern>:102# CHECK-HIDDEN-NEXT:  10040008: blr103 104# CHECK-HIDDEN-LABEL: <callee3_stother0_hidden>:105# CHECK-HIDDEN-NEXT:  1004000c: blr106 107# CHECK-HIDDEN-LABEL: <callee4_stother1_hidden>:108# CHECK-HIDDEN-NEXT:  10040010: bl 0x10040008109# CHECK-HIDDEN-NEXT:  10040014: blr110.ifdef HIDDEN111.section .text_hidden_stother0, "ax", %progbits112caller3:113  .localentry caller3, 1114  ## nop is not needed after bl for R_PPC64_REL24_NOTOC115  bl callee3_stother0_hidden@notoc116  b callee3_stother0_hidden@notoc117 118.section .text_hidden_stother1, "ax", %progbits119caller4:120  .localentry caller4, 1121  ## nop is not needed after bl for R_PPC64_REL24_NOTOC122  bl callee4_stother1_hidden@notoc123  b callee4_stother1_hidden@notoc124.endif125