// Force generation of $d.0 as section is not all data
nop
// RELATIVE: SYMBOL TABLE:
-// RELATIVE: 00001154 .text 00000000 patatino
+// RELATIVE: 00001154 l .text 00000000 patatino
// RELATIVE: Disassembly of section .text:
// RELATIVE-EMPTY:
// RELATIVE: $d.0:
# CHECK: Idx Name Size VMA Type
# CHECK: 2 .bss 00000004 [[ADDR:[0-za-f]+]] BSS
# CHECK: SYMBOL TABLE:
-# CHECK: [[ADDR]] .bss 0000000000000000 __bss_start
+# CHECK: [[ADDR]] g .bss 0000000000000000 __bss_start
.global __bss_start
.text
# CHECK-NEXT: 2 .data 00000002 0000000000202159 DATA
# CHECK-NEXT: 3 .bss 00000006 000000000020215c BSS
# CHECK: SYMBOL TABLE:
-# CHECK-NEXT: 000000000020215b .data 0000000000000000 _edata
-# CHECK-NEXT: 0000000000202162 .bss 0000000000000000 _end
-# CHECK-NEXT: 0000000000201159 .text 0000000000000000 _etext
-# CHECK-NEXT: 0000000000201158 .text 0000000000000000 _start
-# CHECK-NEXT: 000000000020215b .data 0000000000000000 edata
-# CHECK-NEXT: 0000000000202162 .bss 0000000000000000 end
-# CHECK-NEXT: 0000000000201159 .text 0000000000000000 etext
+# CHECK-NEXT: 000000000020215b g .data 0000000000000000 _edata
+# CHECK-NEXT: 0000000000202162 g .bss 0000000000000000 _end
+# CHECK-NEXT: 0000000000201159 g .text 0000000000000000 _etext
+# CHECK-NEXT: 0000000000201158 g .text 0000000000000000 _start
+# CHECK-NEXT: 000000000020215b g .data 0000000000000000 edata
+# CHECK-NEXT: 0000000000202162 g .bss 0000000000000000 end
+# CHECK-NEXT: 0000000000201159 g .text 0000000000000000 etext
# RUN: ld.lld -r %t.o -o %t2
# RUN: llvm-objdump -t %t2 | FileCheck %s --check-prefix=RELOCATABLE
# CHECK: .data 00000008 000000000020215c DATA
-# CHECK: 0000000000202164 .data 0000000000000000 _edata
+# CHECK: 0000000000202164 g .data 0000000000000000 _edata
.text
.globl _start
# RUN: ld.lld %t1.o -o %t.out
# RUN: llvm-objdump -s -t %t.out | FileCheck %s
# CHECK: SYMBOL TABLE:
-# CHECK: 004010b7 .und
+# CHECK: 004010b7 l .und
# CHECK: Contents of section .text:
# CHECK-NEXT: 4010b4 020000
## 0x4010b7 - 0x4010b4 + addend(-1) = 0x02
# RUN: llvm-objdump -s -t %t.out | FileCheck %s
## 0x3 + addend(-1) = 0x02
## 0x3 + addend(-2) = 0x0100
-# CHECK: SYMBOL TABLE:
-# CHECK: 00000003 .und
+# CHECK: SYMBOL TABLE:
+# CHECK-NEXT: 00000003 l .und 00000000 und
# CHECK: Contents of section .text:
# CHECK-NEXT: 0000 020100
# RUN: ld.lld -o %t --script %t.script %t.o
# RUN: llvm-objdump -t %t | FileCheck %s
-# CHECK: 0000000000000001 .text 0000000000000000 _start
-# CHECK: 0000000000000002 .text 0000000000000000 foo
+# CHECK: 0000000000000001 g .text 0000000000000000 _start
+# CHECK: 0000000000000002 g .text 0000000000000000 foo
.global _start
nop
# RUN: llvm-objdump -t %t | FileCheck %s
# CHECK-LABEL: SYMBOL TABLE:
-# CHECK-NEXT: 0000000000014008 .text 0000000000000000 _start
-# CHECK-NEXT: 0000000000010000 *ABS* 0000000000000000 __code_base__
-# CHECK-NEXT: 0000000000001000 *ABS* 0000000000000000 VAR
-# CHECK-NEXT: 0000000000011000 .bbb 0000000000000000 __start_bbb
-# CHECK-NEXT: 0000000000012000 .bbb 0000000000000000 __end_bbb
+# CHECK-NEXT: 0000000000014008 g .text 0000000000000000 _start
+# CHECK-NEXT: 0000000000010000 g *ABS* 0000000000000000 __code_base__
+# CHECK-NEXT: 0000000000001000 g *ABS* 0000000000000000 VAR
+# CHECK-NEXT: 0000000000011000 g .bbb 0000000000000000 __start_bbb
+# CHECK-NEXT: 0000000000012000 g .bbb 0000000000000000 __end_bbb
VAR = 0x1000;
__code_base__ = 0x10000;
.text : { *(.text); }
}
-# CHECK: 0000000000001000 .aaa 0000000000000000 foo
-# CHECK: 0000000000001000 .aaa 0000000000000000 bar
-# CHECK: 0000000000001001 .aaa 0000000000000000 zed1
-# CHECK: 0000000000000fff .aaa 0000000000000000 zed2
+# CHECK: 0000000000001000 g .aaa 0000000000000000 foo
+# CHECK: 0000000000001000 g .aaa 0000000000000000 bar
+# CHECK: 0000000000001001 g .aaa 0000000000000000 zed1
+# CHECK: 0000000000000fff g .aaa 0000000000000000 zed2
# RUN: ld.lld --gc-sections -o %t %t.o --script %t.script
# RUN: llvm-objdump -t %t | FileCheck %s
-# CHECK: 0000000000000008 .rodata 0000000000000000 bar
+# CHECK: 0000000000000008 g .rodata 0000000000000000 bar
.section .rodata.bar
.quad 0x1122334455667788
# RUN: echo "SECTIONS { v = LOADADDR(.zzz); }" > %t.script
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s
-# CHECK: 0000000000002000 *ABS* 0000000000000000 aaa_lma
-# CHECK-NEXT: 0000000000002008 *ABS* 0000000000000000 bbb_lma
-# CHECK-NEXT: 0000000000003000 *ABS* 0000000000000000 ccc_lma
-# CHECK-NEXT: 0000000000004000 *ABS* 0000000000000000 ddd_lma
-# CHECK-NEXT: 0000000000004008 *ABS* 0000000000000000 txt_lma
+# CHECK: 0000000000002000 g *ABS* 0000000000000000 aaa_lma
+# CHECK-NEXT: 0000000000002008 g *ABS* 0000000000000000 bbb_lma
+# CHECK-NEXT: 0000000000003000 g *ABS* 0000000000000000 ccc_lma
+# CHECK-NEXT: 0000000000004000 g *ABS* 0000000000000000 ddd_lma
+# CHECK-NEXT: 0000000000004008 g *ABS* 0000000000000000 txt_lma
# ERROR: {{.*}}.script:1: undefined section .zzz
.global _start
# CHECK: bar 00000000 0000000000001000
# CHECK: SYMBOL TABLE:
-# CHECK: [[ADDR]] abc 0000000000000000 foo
+# CHECK: [[ADDR]] g abc 0000000000000000 foo
# RUN: ld.lld -o %t1 %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck %s
-# CHECK: 0000000000200005 .text 0000000000000000 .hidden newsym
+# CHECK: 0000000000200005 l .text 0000000000000000 .hidden newsym
# RUN: ld.lld -o %t1.so %t.script %t -shared
# RUN: llvm-objdump -t %t1.so | FileCheck --check-prefix=SHARED %s
-# SHARED: 0000000000000005 .dynsym 0000000000000000 .hidden newsym
+# SHARED: 0000000000000005 l .dynsym 0000000000000000 .hidden newsym
# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(__ehdr_start, CONSTANT(MAXPAGESIZE)) + 5);" > %t.script
# RUN: ld.lld -o %t1 %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=ALIGNED %s
-# ALIGNED: 0000000000200005 .text 0000000000000000 .hidden newsym
+# ALIGNED: 0000000000200005 l .text 0000000000000000 .hidden newsym
# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(3, 8) + 10);" > %t.script
# RUN: ld.lld -o %t1 %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=ALIGN-ADD %s
-# ALIGN-ADD: 0000000000000012 *ABS* 0000000000000000 .hidden newsym
+# ALIGN-ADD: 0000000000000012 l *ABS* 0000000000000000 .hidden newsym
# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(11, 8) - 10);" > %t.script
# RUN: ld.lld -o %t1 %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=ALIGN-SUB %s
-# ALIGN-SUB: 0000000000000006 *ABS* 0000000000000000 .hidden newsym
+# ALIGN-SUB: 0000000000000006 l *ABS* 0000000000000000 .hidden newsym
# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(_end, CONSTANT(MAXPAGESIZE)) + 5);" > %t.script
# RUN: ld.lld -o %t1 %t %t.script
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=RELATIVE %s
-# RELATIVE: 0000000000202005 .text 0000000000000000 .hidden newsym
-# RELATIVE: 0000000000201127 .text 0000000000000000 _end
+# RELATIVE: 0000000000202005 l .text 0000000000000000 .hidden newsym
+# RELATIVE: 0000000000201127 g .text 0000000000000000 _end
# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(_end, CONSTANT(MAXPAGESIZE)) + 5);" > %t.script
# RUN: ld.lld -o %t1 --script %p/Inputs/symbol-reserved.script %t %t.script
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=RELATIVE-ADD %s
-# RELATIVE-ADD: 0000000000001005 .text 0000000000000000 .hidden newsym
-# RELATIVE-ADD: 0000000000000007 .text 0000000000000000 .hidden _end
+# RELATIVE-ADD: 0000000000001005 l .text 0000000000000000 .hidden newsym
+# RELATIVE-ADD: 0000000000000007 l .text 0000000000000000 .hidden _end
# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(_end, CONSTANT(MAXPAGESIZE)) - 5);" > %t.script
# RUN: ld.lld -o %t1 --script %p/Inputs/symbol-reserved.script %t %t.script
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=RELATIVE-SUB %s
-# RELATIVE-SUB: 0000000000000ffb .text 0000000000000000 .hidden newsym
-# RELATIVE-SUB: 0000000000000007 .text 0000000000000000 .hidden _end
+# RELATIVE-SUB: 0000000000000ffb l .text 0000000000000000 .hidden newsym
+# RELATIVE-SUB: 0000000000000007 l .text 0000000000000000 .hidden _end
.global _start
_start:
# RUN: echo "SECTIONS { PROVIDE(newsym = 1);}" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE1 %s
-# PROVIDE1: 0000000000000001 *ABS* 0000000000000000 newsym
+# PROVIDE1: 0000000000000001 g *ABS* 0000000000000000 newsym
# Provide new symbol (hidden). The value should be 1
# RUN: echo "SECTIONS { PROVIDE_HIDDEN(newsym = 1);}" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN1 %s
-# HIDDEN1: 0000000000000001 *ABS* 0000000000000000 .hidden newsym
+# HIDDEN1: 0000000000000001 l *ABS* 0000000000000000 .hidden newsym
.global _start
_start:
# CHECK: .nonalloc 00000008 0000000000000000
# CHECK: SYMBOL TABLE:
-# CHECK: 0000000000000008 .nonalloc 0000000000000000 Sym
+# CHECK: 0000000000000008 g .nonalloc 0000000000000000 Sym
SECTIONS {
. = SIZEOF_HEADERS;
# RUN: echo "SECTIONS { PROVIDE(somesym = 1);}" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE2 %s
-# PROVIDE2: 0000000000000000 *ABS* 0000000000000000 somesym
+# PROVIDE2: 0000000000000000 g *ABS* 0000000000000000 somesym
# Provide existing symbol. The value should be 0, even though we
# have value of 1 in PROVIDE_HIDDEN(). Visibility should not change
# RUN: echo "SECTIONS { PROVIDE_HIDDEN(somesym = 1);}" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN2 %s
-# HIDDEN2: 0000000000000000 *ABS* 0000000000000000 somesym
+# HIDDEN2: 0000000000000000 g *ABS* 0000000000000000 somesym
# Hidden symbol assignment.
# RUN: echo "SECTIONS { HIDDEN(newsym = 1);}" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN3 %s
-# HIDDEN3: 0000000000000001 *ABS* 0000000000000000 .hidden newsym
+# HIDDEN3: 0000000000000001 l *ABS* 0000000000000000 .hidden newsym
# The symbol is not referenced. Don't provide it.
# RUN: echo "PROVIDE(newsym = 1);" > %t.script
# RUN: echo "PROVIDE(somesym = 1);" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE5 %s
-# PROVIDE5: 0000000000000000 *ABS* 0000000000000000 somesym
+# PROVIDE5: 0000000000000000 g *ABS* 0000000000000000 somesym
# Provide existing symbol. The value should be 0, even though we
# have value of 1 in PROVIDE_HIDDEN(). Visibility should not change
# RUN: echo "PROVIDE_HIDDEN(somesym = 1);" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN5 %s
-# HIDDEN5: 0000000000000000 *ABS* 0000000000000000 somesym
+# HIDDEN5: 0000000000000000 g *ABS* 0000000000000000 somesym
# Simple symbol assignment. All three symbols should have the
# same value.
# RUN: echo "foo = 0x100; SECTIONS { bar = foo; } baz = bar;" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=SIMPLE2 %s
-# SIMPLE2: 0000000000000100 *ABS* 0000000000000000 foo
-# SIMPLE2: 0000000000000100 *ABS* 0000000000000000 bar
-# SIMPLE2: 0000000000000100 *ABS* 0000000000000000 baz
+# SIMPLE2: 0000000000000100 g *ABS* 0000000000000000 foo
+# SIMPLE2: 0000000000000100 g *ABS* 0000000000000000 bar
+# SIMPLE2: 0000000000000100 g *ABS* 0000000000000000 baz
.global _start
_start:
.eh_frame : {}
}
-# CHECK: 0000000000000128 .foo 0000000000000000 .hidden _end_sec
-# CHECK-NEXT: 0000000000000120 .foo 0000000000000000 _begin_sec
-# CHECK-NEXT: 0000000000000128 *ABS* 0000000000000000 _end_sec_abs
-# CHECK-NEXT: 000000000000104c .text 0000000000000000 _start
-# CHECK-NEXT: 0000000000000120 .foo 0000000000000000 begin_foo
-# CHECK-NEXT: 0000000000000128 .foo 0000000000000000 end_foo
-# CHECK-NEXT: 0000000000000008 *ABS* 0000000000000000 size_foo_1
-# CHECK-NEXT: 0000000000000008 *ABS* 0000000000000000 size_foo_1_abs
-# CHECK-NEXT: 0000000000001000 .foo 0000000000000000 begin_bar
-# CHECK-NEXT: 0000000000001004 .foo 0000000000000000 end_bar
-# CHECK-NEXT: 0000000000000ee4 *ABS* 0000000000000000 size_foo_2
-# CHECK-NEXT: 0000000000000ee4 *ABS* 0000000000000000 size_foo_3
-# CHECK-NEXT: 0000000000001004 .eh_frame_hdr 0000000000000000 __eh_frame_hdr_start
-# CHECK-NEXT: 0000000000001010 *ABS* 0000000000000000 __eh_frame_hdr_start2
-# CHECK-NEXT: 0000000000001018 .eh_frame_hdr 0000000000000000 __eh_frame_hdr_end
-# CHECK-NEXT: 0000000000001020 *ABS* 0000000000000000 __eh_frame_hdr_end2
+# CHECK: 0000000000000128 l .foo 0000000000000000 .hidden _end_sec
+# CHECK-NEXT: 0000000000000120 g .foo 0000000000000000 _begin_sec
+# CHECK-NEXT: 0000000000000128 g *ABS* 0000000000000000 _end_sec_abs
+# CHECK-NEXT: 000000000000104c g .text 0000000000000000 _start
+# CHECK-NEXT: 0000000000000120 g .foo 0000000000000000 begin_foo
+# CHECK-NEXT: 0000000000000128 g .foo 0000000000000000 end_foo
+# CHECK-NEXT: 0000000000000008 g *ABS* 0000000000000000 size_foo_1
+# CHECK-NEXT: 0000000000000008 g *ABS* 0000000000000000 size_foo_1_abs
+# CHECK-NEXT: 0000000000001000 g .foo 0000000000000000 begin_bar
+# CHECK-NEXT: 0000000000001004 g .foo 0000000000000000 end_bar
+# CHECK-NEXT: 0000000000000ee4 g *ABS* 0000000000000000 size_foo_2
+# CHECK-NEXT: 0000000000000ee4 g *ABS* 0000000000000000 size_foo_3
+# CHECK-NEXT: 0000000000001004 g .eh_frame_hdr 0000000000000000 __eh_frame_hdr_start
+# CHECK-NEXT: 0000000000001010 g *ABS* 0000000000000000 __eh_frame_hdr_start2
+# CHECK-NEXT: 0000000000001018 g .eh_frame_hdr 0000000000000000 __eh_frame_hdr_end
+# CHECK-NEXT: 0000000000001020 g *ABS* 0000000000000000 __eh_frame_hdr_end2
PROVIDE_HIDDEN(_begin_sec = _start);
PROVIDE_HIDDEN(_end_sec = ADDR(.text) + SIZEOF(.text));
-# CHECK: 00000000002011ac .text 0000000000000000 .hidden _begin_sec
-# CHECK-NEXT: 00000000002011ad .text 0000000000000000 .hidden _end_sec
+# CHECK: 00000000002011ac l .text 0000000000000000 .hidden _begin_sec
+# CHECK-NEXT: 00000000002011ad l .text 0000000000000000 .hidden _end_sec
PROVIDE_HIDDEN(_end_sec = ADDR(.text) + SIZEOF(.text));
}
-# CHECK: 0000000000201054 .text 0000000000000000 .hidden _begin_sec
-# CHECK-NEXT: 0000000000201055 .text 0000000000000000 .hidden _end_sec
+# CHECK: 0000000000201054 l .text 0000000000000000 .hidden _begin_sec
+# CHECK-NEXT: 0000000000201055 l .text 0000000000000000 .hidden _end_sec
.word v1 # R_MIPS_32 target v1 addend 0
# SYM: SYMBOL TABLE:
-# SYM: 00011000 .data 00000000 v1
+# SYM: 00011000 l .data 00000000 v1
# BE: Contents of section .data:
# BE-NEXT: {{.*}} 00000004 00011000
# RUN: llvm-objdump -d -t --no-show-raw-insn %t.exe | FileCheck %s
# RUN: llvm-readelf -r -s -A %t.exe | FileCheck -check-prefix=GOT %s
-# CHECK: {{[0-9a-f]+}}1c8 .text 0000000000000000 foo
+# CHECK: {{[0-9a-f]+}}1c8 l .text 0000000000000000 foo
# CHECK: __start:
# CHECK-NEXT: {{.*}} ld $2, -32736($gp)
# RUN: llvm-objdump -d -s -t --print-imm-hex --no-show-raw-insn %t.exe | FileCheck %s
# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
-# CHECK: 0000000000037ff0 .got 0000000000000000 .hidden _gp
+# CHECK: 0000000000037ff0 l .got 0000000000000000 .hidden _gp
# CHECK: Contents of section .rodata:
# CHECK-NEXT: {{[0-9a-f]+}} ffffffff fffe9014
.quad v1 # R_MIPS_64 target v1 addend 0
# SYM: SYMBOL TABLE:
-# SYM: 00000000[[V1:[0-9a-f]+]] .data 0000000000000000 v1
+# SYM: 00000000[[V1:[0-9a-f]+]] l .data 0000000000000000 v1
# SYM: Contents of section .data:
# SYM-NEXT: {{.*}} 00000000 00000008 00000000 [[V1]]
# OBJ-NEXT: 00000014: R_MIPS_LO16 .data
# SO: SYMBOL TABLE
-# SO: {{0*}}[[D1:[0-9a-f]{1,4}]] .data {{0+}} data
-# SO: {{0*}}[[D2:[0-9a-f]{1,4}]] .data {{0+}} data
+# SO: {{0*}}[[D1:[0-9a-f]{1,4}]] l .data {{0+}} data
+# SO: {{0*}}[[D2:[0-9a-f]{1,4}]] l .data {{0+}} data
# SO: Disassembly of section .text:
# SO-EMPTY:
# RUN: llvm-readelf -r -A %t.so | FileCheck -check-prefix=GOT %s
# CHECK: SYMBOL TABLE:
-# CHECK: 00024008 .data 00000000 .hidden bar
+# CHECK: 00024008 l .data 00000000 .hidden bar
# CHECK: 00000000 *UND* 00000000 foo
# CHECK: __start:
# INT-SO: 00000000 0 NOTYPE LOCAL HIDDEN ABS _gp_disp
# EXT-SO: 00020000 0 NOTYPE GLOBAL DEFAULT 9 _gp_disp
-# DIS: 00037ff0 .got 00000000 .hidden _gp
-# DIS: 00002000 .text 00000000 __start
+# DIS: 00037ff0 l .got 00000000 .hidden _gp
+# DIS: 00002000 g .text 00000000 __start
# DIS: Disassembly of section .text:
# DIS-EMPTY:
# DIS-NEXT: __start:
# RUN: ld.lld -shared -o %t.abs.so --script %t.abs.script %t.o
# RUN: llvm-objdump -s -t %t.abs.so | FileCheck --check-prefix=ABS %s
-# REL: 000000e0 .text 00000000 foo
-# REL: 00000000 *ABS* 00000000 .hidden _gp_disp
-# REL: 000001ec *ABS* 00000000 .hidden _gp
+# REL: 000000e0 l .text 00000000 foo
+# REL: 00000000 l *ABS* 00000000 .hidden _gp_disp
+# REL: 000001ec l *ABS* 00000000 .hidden _gp
# REL: Contents of section .reginfo:
# REL-NEXT: 0018 10000104 00000000 00000000 00000000
# ^-- 0x30-0x1ec
# foo - GP
-# ABS: 000000e0 .text 00000000 foo
-# ABS: 00000000 *ABS* 00000000 .hidden _gp_disp
-# ABS: 00000200 *ABS* 00000000 .hidden _gp
+# ABS: 000000e0 l .text 00000000 foo
+# ABS: 00000000 l *ABS* 00000000 .hidden _gp_disp
+# ABS: 00000200 l *ABS* 00000000 .hidden _gp
# ABS: Contents of section .reginfo:
# ABS-NEXT: 0018 10000104 00000000 00000000 00000000
# RUN: ld.lld --script %t.script -o %t.exe %t.o
# RUN: llvm-objdump -d -t --no-show-raw-insn %t.exe | FileCheck %s
-# CHECK: 00037ff0 .got 00000000 .hidden _gp
-# CHECK: 00011000 .text 00000000 __start
+# CHECK: 00037ff0 l .got 00000000 .hidden _gp
+# CHECK: 00011000 g .text 00000000 __start
# CHECK: __start:
# CHECK-NEXT: lui $8, 3
# REL: GP: 0x0
# DUMP: SYMBOL TABLE:
-# DUMP: 00020008 .text 00000000 bar
-# DUMP: 00020004 .text 00000000 foo
-# DUMP: 00028000 .got 00000000 .hidden _gp
+# DUMP: 00020008 l .text 00000000 bar
+# DUMP: 00020004 l .text 00000000 foo
+# DUMP: 00028000 l .got 00000000 .hidden _gp
# DUMP: Contents of section .rodata:
# DUMP: 1000 fffffff4 fffffff8
.gpword bar
# CHECK: SYMBOL TABLE:
-# CHECK: 00020008 .text 00000000 bar
-# CHECK: 00020004 .text 00000000 foo
-# CHECK: 00028000 .got 00000000 .hidden _gp
+# CHECK: 00020008 l .text 00000000 bar
+# CHECK: 00020004 l .text 00000000 foo
+# CHECK: 00028000 l .got 00000000 .hidden _gp
# CHECK: Contents of section .rodata:
# CHECK: 1000 ffff8004 ffff8008
addi $t0,$t0,%lo(_gp_disp)
# CHECK: SYMBOL TABLE:
-# CHECK: 0001100c .text 00000000 bar
-# CHECK: 00037ff0 .got 00000000 .hidden _gp
-# CHECK: 00011000 .text 00000000 __start
+# CHECK: 0001100c l .text 00000000 bar
+# CHECK: 00037ff0 l .got 00000000 .hidden _gp
+# CHECK: 00011000 g .text 00000000 __start
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# WARN: can't find matching R_MIPS_LO16 relocation for R_MIPS_HI16
# CHECK: SYMBOL TABLE:
-# CHECK: 00020{{0*}}[[VAL:[0-9a-f]+]] .text 00000000 _label
-# CHECK: 00020{{.*}} .text 00000000 __start
+# CHECK: 00020{{0*}}[[VAL:[0-9a-f]+]] l .text 00000000 _label
+# CHECK: 00020{{.*}} g .text 00000000 __start
# CHECK: __start:
# CHECK-NEXT: lui $8, 0x3
# CHECK: SYMBOL TABLE:
# CHECK: 0021020 l O .data 00000004 l1
-# CHECK: 0021000 .text 00000000 __start
+# CHECK: 0021000 g .text 00000000 __start
# CHECK: 0021024 g O .data 00000004 g1
# CHECK: __start:
# CHECK: SYMBOL TABLE:
# CHECK: 00000000 l O .tdata 00000000 loc0
-# CHECK: [[FOO0:[0-9a-f]+]] .text 00000000 foo0
+# CHECK: [[FOO0:[0-9a-f]+]] g .text 00000000 foo0
# CHECK: 00000000 g O .tdata 00000000 tls0
# CHECK: 00000004 g O .tdata 00000000 tls1
-# CHECK: [[FOO2:[0-9a-f]+]] .text 00000000 foo2
+# CHECK: [[FOO2:[0-9a-f]+]] g .text 00000000 foo2
# CHECK: Contents of section .got:
# CHECK-NEXT: 70000 00000000 80000000 [[FOO0]] [[FOO2]]
# REG: {{0*}}[[FOOT:[0-9a-f]+]] l F .text 0000000e 0x80 __microLA25Thunk_foo
# REG: {{0*}}[[BAR:[0-9a-f]+]] g F .text 00000000 bar
-# REG: {{0*}}[[MIC:[0-9a-f]+]] .text 00000000 0x80 micro
+# REG: {{0*}}[[MIC:[0-9a-f]+]] g .text 00000000 0x80 micro
# REG: __start:
# REG-NEXT: jalx 0x[[MIC]] <micro>
# REG-NEXT: j 0x[[BAR]] <bar>
# MICRO: {{0*}}[[BART:[0-9a-f]+]] l F .text 00000010 __LA25Thunk_bar
-# MICRO: {{0*}}[[START:[0-9a-f]+]] .text 00000000 __start
+# MICRO: {{0*}}[[START:[0-9a-f]+]] g .text 00000000 __start
# MICRO: {{0*}}[[FOO:[0-9a-f]+]] g F .text 00000000 0x80 foo
# MICRO: micro:
# RUN: | FileCheck --check-prefixes=ASM,EL %s
# RUN: llvm-readelf -h %tel.exe | FileCheck --check-prefix=ELF %s
-# ASM: 00038000 .got 00000000 .hidden _gp
+# ASM: 00038000 l .got 00000000 .hidden _gp
# ASM: 00020100 g F .text 00000000 0x80 foo
-# ASM: 00020110 .text 00000000 0x80 __start
+# ASM: 00020110 g .text 00000000 0x80 __start
# EB: Contents of section .data:
# EB-NEXT: 30000 fffe8111
# RUN: | FileCheck %s
# CHECK: 00020100 g F .text 00000000 0x80 foo
-# CHECK: 00020110 .text 00000000 0x80 __start
+# CHECK: 00020110 g .text 00000000 0x80 __start
# CHECK: __start:
# CHECK-NEXT: 20110: lapc $2, -12
.section .rodata,"a",@progbits
.gpword(loc) # R_MIPS_GPREL32
-# CHECK: 00020104 .text 00000000 loc
-# CHECK: 00028100 .got 00000000 .hidden _gp
+# CHECK: 00020104 l .text 00000000 loc
+# CHECK: 00028100 l .got 00000000 .hidden _gp
# CHECK: 00020100 g F .text 00000000 __start
# CHECK: Contents of section .rodata:
# RUN: ld.lld %t1.o %t2.o -o %t.exe
# RUN: llvm-objdump -t -s %t.exe | FileCheck %s
-# CHECK: [[SYM:[0-9a-f]+]] .text 00000000 __start
+# CHECK: [[SYM:[0-9a-f]+]] g .text 00000000 __start
# CHECK: Contents of section .debug_info:
# CHECK-NEXT: 0000 ffffffff [[SYM]] [[SYM]]
.data
.word _foo+8-. # R_MIPS_PC32
-# CHECK: 00020000 .text 00000000 __start
-# CHECK: 00020020 .text 00000000 _foo
+# CHECK: 00020000 g .text 00000000 __start
+# CHECK: 00020020 g .text 00000000 _foo
# CHECK: Contents of section .data:
# CHECK-NEXT: 30000 ffff0028 00000000 00000000 00000000
# DIS: 0000000000000000 l O .tdata 0000000000000000 loc
# DIS: 0000000000000004 g O .tdata 0000000000000000 bar
-# DIS: 0000000000000000 g O *UND* 0000000000000000 foo
+# DIS: 0000000000000000 O *UND* 0000000000000000 foo
# DIS: Contents of section .got:
# DIS-NEXT: 30000 00000000 00000000 80000000 00000000
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
# CHECK: SYMBOL TABLE:
-# CHECK: [[TGA:[0-9a-f]{8}]] .text 0000000000000000 __tls_get_addr
+# CHECK: [[TGA:[0-9a-f]{8}]] g .text 0000000000000000 __tls_get_addr
# CHECK: 0000000000000000 g O .tdata 0000000000000000 tls1
#
# CHECK: Contents of section .data:
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
# CHECK: SYMBOL TABLE:
-# CHECK: [[TGA:[0-9a-f]+]] .text 00000000 __tls_get_addr
+# CHECK: [[TGA:[0-9a-f]+]] g .text 00000000 __tls_get_addr
# CHECK: 00000000 g O .tdata 00000000 tls1
#
# CHECK: Contents of section .data:
# DIS: 00000000 l O .tdata 00000000 loc
# DIS: 00000004 g O .tdata 00000000 bar
-# DIS: 00000000 g O *UND* 00000000 foo
+# DIS: 00000000 O *UND* 00000000 foo
# DIS: Contents of section .got:
# DIS-NEXT: 30000 00000000 80000000 00000000 ffff9004
// RUN: llvm-objdump -t %t | FileCheck -check-prefix=SYM %s
-// SYM: {{.*}} .dynamic 0000000000000000 .hidden _DYNAMIC
-// SYM-NEXT: 0000000000011000 *ABS* 0000000000000000 __real_foo
-// SYM-NEXT: 0000000000011010 *ABS* 0000000000000000 __wrap_foo
-// SYM-NEXT: {{.*}} .text 0000000000000000 _start
-// SYM-NEXT: 0000000000011000 *ABS* 0000000000000000 foo
+// SYM: {{.*}} l .dynamic 0000000000000000 .hidden _DYNAMIC
+// SYM-NEXT: 0000000000011000 g *ABS* 0000000000000000 __real_foo
+// SYM-NEXT: 0000000000011010 g *ABS* 0000000000000000 __wrap_foo
+// SYM-NEXT: {{.*}} g .text 0000000000000000 _start
+// SYM-NEXT: 0000000000011000 g *ABS* 0000000000000000 foo
.global _start
_start:
// CHECK-OBJ-NEXT: 0000: 2040105E
// CHECK-OBJ-NEXT: )
-// CHECK-SYMS-NOT: 0000000000000000 .inst.aarch64_inst 0000000000000000 $d
-// CHECK-SYMS: 0000000000000000 .inst.aarch64_inst 0000000000000000 $x
-// CHECK-SYMS-NOT: 0000000000000000 .inst.aarch64_inst 0000000000000000 $d
+// CHECK-SYMS-NOT: 0000000000000000 l .inst.aarch64_inst 0000000000000000 $d
+// CHECK-SYMS: 0000000000000000 l .inst.aarch64_inst 0000000000000000 $x
+// CHECK-SYMS-NOT: 0000000000000000 l .inst.aarch64_inst 0000000000000000 $d
// + .starts_data to have $d at 0
-// CHECK: 0000000000000000 .starts_data 0000000000000000 $d
-// CHECK-NEXT: 0000000000000000 .text 0000000000000000 $x
-// CHECK-NEXT: 0000000000000000 .wibble 0000000000000000 $x
+// CHECK: 0000000000000000 l .starts_data 0000000000000000 $d
+// CHECK-NEXT: 0000000000000000 l .text 0000000000000000 $x
+// CHECK-NEXT: 0000000000000000 l .wibble 0000000000000000 $x
// CHECK-NOT: ${{[adtx]}}
add r0, r0, r0
-@ ARM: 00000000 .text 00000000 $a
-@ THUMB: 00000000 .text 00000000 $t
+@ ARM: 00000000 l .text 00000000 $a
+@ THUMB: 00000000 l .text 00000000 $t
.arm
add r0, r0, r0
-@ CHECK: 00000000 .text 00000000 $a
-@ CHECK-NEXT: 0000000c .text 00000000 $a
-@ CHECK-NEXT: 00000018 .text 00000000 $a
-@ CHECK-NEXT: 00000004 .text 00000000 $d
-@ CHECK-NEXT: 00000012 .text 00000000 $d
-@ CHECK-NEXT: 00000008 .text 00000000 $t
-@ CHECK-NEXT: 00000010 .text 00000000 $t
+@ CHECK: 00000000 l .text 00000000 $a
+@ CHECK-NEXT: 0000000c l .text 00000000 $a
+@ CHECK-NEXT: 00000018 l .text 00000000 $a
+@ CHECK-NEXT: 00000004 l .text 00000000 $d
+@ CHECK-NEXT: 00000012 l .text 00000000 $d
+@ CHECK-NEXT: 00000008 l .text 00000000 $t
+@ CHECK-NEXT: 00000010 l .text 00000000 $t
@ + .starts_thumb to have $t at 0
@ + .starts_data to have $d at 0
-@ CHECK: 00000000 .text 00000000 $a
-@ CHECK-NEXT: 00000000 .wibble 00000000 $a
-@ CHECK-NEXT: 0000000a .text 00000000 $d
-@ CHECK-NEXT: 00000000 .starts_thumb 00000000 $t
-@ CHECK-NEXT: 00000008 .text 00000000 $t
+@ CHECK: 00000000 l .text 00000000 $a
+@ CHECK-NEXT: 00000000 l .wibble 00000000 $a
+@ CHECK-NEXT: 0000000a l .text 00000000 $d
+@ CHECK-NEXT: 00000000 l .starts_thumb 00000000 $t
+@ CHECK-NEXT: 00000008 l .text 00000000 $t
@ CHECK-NOT: ${{[adt]}}
.word somewhere
add r0, r0, r0
-@ CHECK: 00000000 .text 00000000 $a
-@ CHECK-NEXT: 00000008 .text 00000000 $a
-@ CHECK-NEXT: 00000004 .text 00000000 $d
+@ CHECK: 00000000 l .text 00000000 $a
+@ CHECK-NEXT: 00000008 l .text 00000000 $a
+@ CHECK-NEXT: 00000004 l .text 00000000 $d
.err
.endif
-# CHECK: 00000007 *ABS* 00000000 a
-# CHECK: 0000000b *ABS* 00000000 b
\ No newline at end of file
+# CHECK: 00000007 l *ABS* 00000000 a
+# CHECK: 0000000b l *ABS* 00000000 b
# RUN: llvm-mc -arch=hexagon -filetype=obj %s | llvm-objdump -t - | FileCheck %s
-# CHECK: 00000062 g O *COM* 00000008 quartet_table_isqrt
+# CHECK: 00000062 O *COM* 00000008 quartet_table_isqrt
.common quartet_table_isqrt, 98, 8
.common quartet_table_isqrt, 98, 8
sym_a:
.set sym_d, sym_a + 8
-# CHECK: 00000000 .text 00000000 sym_a
-# CHECK: 00000008 .text 00000000 sym_d
+# CHECK: 00000000 l .text 00000000 sym_a
+# CHECK: 00000008 l .text 00000000 sym_d
CHECK: SYMBOL TABLE:
CHECK-NEXT: 00000001 g F CODE main
CHECK-NEXT: 00000000 l O DATA .L.str
-CHECK-NEXT: 00000000 g F *UND* puts
+CHECK-NEXT: 00000000 F *UND* puts
CHECK-NEXT: 00000019 l F CODE .LSomeOtherFunction_bitcast
-CHECK-NEXT: 00000000 g F *UND* SomeOtherFunction
+CHECK-NEXT: 00000000 F *UND* SomeOtherFunction
CHECK-NEXT: 00000010 g O DATA var
# COMMON: SYMBOL TABLE:
# COMMON-NEXT: 0000000000000001 l F .text 0000000000000000 func
-# COMMON-NEXT: 0000000000000000 .text 0000000000000000 sym
+# COMMON-NEXT: 0000000000000000 l .text 0000000000000000 sym
# COMMON-NEXT: 0000000000000000 l d .text 0000000000000000 .text
# NOADJUST: 0000000000000000 sym:
CHECK: SYMBOL TABLE:
CHECK-NEXT: 00000010 l d .text 00000000 .text
-CHECK-NEXT: 00000010 .text 00000000 _start
-CHECK-NEXT: 00000020 .text 00000000 _fdata
-CHECK-NEXT: 00000010 .text 00000000 _ftext
+CHECK-NEXT: 00000010 l .text 00000000 _start
+CHECK-NEXT: 00000020 g .text 00000000 _fdata
+CHECK-NEXT: 00000010 g .text 00000000 _ftext
CHECK-EMPTY:
CHECK-NEXT: Disassembly of section .text:
CHECK-EMPTY:
// RUN: llvm-objdump -t %p/Inputs/common-symbol-elf | FileCheck %s
-CHECK: 00000400 g O *COM* 00000008 common_symbol
+CHECK: 00000400 O *COM* 00000008 common_symbol
bool Hidden = Flags & SymbolRef::SF_Hidden;
char GlobLoc = ' ';
- if (Type != SymbolRef::ST_Unknown)
+ if ((Section != O->section_end() || Absolute) && !Weak)
GlobLoc = Global ? 'g' : 'l';
char Debug = (Type == SymbolRef::ST_Debug || Type == SymbolRef::ST_File)
? 'd' : ' ';