2 # RUN: llvm-mc -triple powerpc64-unknown-unknown -filetype=obj %s | \
3 # RUN: llvm-readobj -h -r --symbols | FileCheck %s
4 # RUN: llvm-mc -triple powerpc64le-unknown-unknown -filetype=obj %s | \
5 # RUN: llvm-readobj -h -r --symbols | FileCheck %s
7 .type callee1, @function
11 .localentry callee1, .-callee1
14 .size callee1, .-callee1
16 .type callee2, @function
20 .size callee2, .-callee2
22 .type caller, @function
28 .size caller, .-caller
36 .size caller_other, .-caller_other
41 # Verify that use of .localentry implies ABI version 2
43 # CHECK: Flags [ (0x2)
45 # Verify that fixups to local function symbols are performed only
46 # if the target symbol does not use .localentry
47 # CHECK: Relocations [
48 # CHECK: Section ({{[0-9]*}}) .rela.text {
49 # CHECK-NEXT: R_PPC64_REL24 callee1
51 # CHECK-NOT: R_PPC64_REL24 callee2
52 # CHECK: Section ({{[0-9]*}}) .rela.text.other {
53 # CHECK-NEXT: R_PPC64_REL24 callee1
54 # CHECK-NEXT: R_PPC64_REL24 .text
57 # Verify that .localentry is encoded in the Other field.
59 # CHECK: Name: callee1
61 # CHECK-NEXT: Size: 16
62 # CHECK-NEXT: Binding: Local
63 # CHECK-NEXT: Type: Function
64 # CHECK-NEXT: Other [ (0x60)
66 # CHECK-NEXT: Section: .text
67 # CHECK: Name: callee2
70 # CHECK-NEXT: Binding: Local
71 # CHECK-NEXT: Type: Function
72 # CHECK-NEXT: Other: 0
73 # CHECK-NEXT: Section: .text
75 # Verify that symbol assignment copies the Other bits.
78 # CHECK-NEXT: Size: 16
79 # CHECK-NEXT: Binding: Local
80 # CHECK-NEXT: Type: Function
81 # CHECK-NEXT: Other [ (0x60)
83 # CHECK-NEXT: Section: .text
87 # CHECK-NEXT: Binding: Local
88 # CHECK-NEXT: Type: Function
89 # CHECK-NEXT: Other: 0
90 # CHECK-NEXT: Section: .text