Replace coff-/elf-dump with llvm-readobj

llvm-svn: 179361
This commit is contained in:
Nico Rieck 2013-04-12 04:06:46 +00:00
parent e351732942
commit ba848e3bca
150 changed files with 4562 additions and 5024 deletions

View File

@ -1,4 +1,4 @@
; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -filetype=obj < %s | elf-dump | FileCheck %s
; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -filetype=obj < %s | llvm-readobj -s -r | FileCheck %s
define i64 @testfn() nounwind {
entry:
@ -19,17 +19,9 @@ entry:
; relative offsets of testfn and foo) because its value depends on where this
; object file's .text section gets relocated in memory.
; CHECK: .rela.text
; CHECK: # Relocation 0
; CHECK-NEXT: (('r_offset', 0x0000000000000010)
; CHECK-NEXT: ('r_sym', 0x00000007)
; CHECK-NEXT: ('r_type', 0x00000113)
; CHECK-NEXT: ('r_addend', 0x0000000000000000)
; CHECK-NEXT: ),
; CHECK-NEXT: Relocation 1
; CHECK-NEXT: (('r_offset', 0x0000000000000014)
; CHECK-NEXT: ('r_sym', 0x00000007)
; CHECK-NEXT: ('r_type', 0x00000115)
; CHECK-NEXT: ('r_addend', 0x0000000000000000)
; CHECK-NEXT: ),
; CHECK: Relocations [
; CHECK-NEXT: Section (1) .text {
; CHECK-NEXT: 0x10 R_AARCH64_ADR_PREL_PG_HI21 testfn 0x0
; CHECK-NEXT: 0x14 R_AARCH64_ADD_ABS_LO12_NC testfn 0x0
; CHECK-NEXT: }
; CHECK-NEXT: ]

View File

@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | elf-dump | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
; External symbols are a different concept to global variables but should still
; get relocations and so on when used.
@ -10,12 +10,8 @@ define i32 @check_extern() {
ret i32 0
}
; CHECK: .rela.text
; CHECK: ('r_sym', 0x00000009)
; CHECK-NEXT: ('r_type', 0x0000011b)
; CHECK: .symtab
; CHECK: Symbol 9
; CHECK-NEXT: memcpy
; CHECK: Relocations [
; CHECK: Section (1) .text {
; CHECK: 0x{{[0-9,A-F]+}} R_AARCH64_CALL26 memcpy
; CHECK: }
; CHECK: ]

View File

@ -1,5 +1,5 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | elf-dump | FileCheck %s -check-prefix=CHECK-ELF
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-ELF
define i32 @test_jumptable(i32 %in) {
; CHECK: test_jumptable
@ -44,13 +44,15 @@ lbl4:
; ELF tests:
; First make sure we get a page/lo12 pair in .text to pick up the jump-table
; CHECK-ELF: .rela.text
; CHECK-ELF: ('r_sym', 0x00000008)
; CHECK-ELF-NEXT: ('r_type', 0x00000113)
; CHECK-ELF: ('r_sym', 0x00000008)
; CHECK-ELF-NEXT: ('r_type', 0x00000115)
; CHECK-ELF: Relocations [
; CHECK-ELF: Section ({{[0-9]+}}) .text {
; CHECK-ELF-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 .rodata
; CHECK-ELF-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC .rodata
; CHECK-ELF: }
; Also check the targets in .rodata are relocated
; CHECK-ELF: .rela.rodata
; CHECK-ELF: ('r_sym', 0x00000005)
; CHECK-ELF-NEXT: ('r_type', 0x00000101)
; CHECK-ELF: Section ({{[0-9]+}}) .rodata {
; CHECK-ELF-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ABS64 .text
; CHECK-ELF: }
; CHECK-ELF: ]

View File

@ -1,36 +1,47 @@
; RUN: llc %s -mtriple=arm-linux-gnueabi -filetype=obj -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=BASIC %s
; RUN: llvm-readobj -s -sd | FileCheck -check-prefix=BASIC %s
; RUN: llc %s -mtriple=armv7-linux-gnueabi -march=arm -mcpu=cortex-a8 \
; RUN: -mattr=-neon,-vfp3,+vfp2 \
; RUN: -arm-reserve-r9 -filetype=obj -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=CORTEXA8 %s
; RUN: llvm-readobj -s -sd | FileCheck -check-prefix=CORTEXA8 %s
; This tests that the extpected ARM attributes are emitted.
;
; BASIC: .ARM.attributes
; BASIC-NEXT: 0x70000003
; BASIC-NEXT: 0x00000000
; BASIC-NEXT: 0x00000000
; BASIC-NEXT: 0x0000003c
; BASIC-NEXT: 0x00000022
; BASIC-NEXT: 0x00000000
; BASIC-NEXT: 0x00000000
; BASIC-NEXT: 0x00000001
; BASIC-NEXT: 0x00000000
; BASIC-NEXT: '41210000 00616561 62690001 17000000 060a0741 08010902 14011501 17031801 1901'
; BASIC: Section {
; BASIC: Name: .ARM.attributes
; BASIC-NEXT: Type: SHT_ARM_ATTRIBUTES
; BASIC-NEXT: Flags [ (0x0)
; BASIC-NEXT: ]
; BASIC-NEXT: Address: 0x0
; BASIC-NEXT: Offset: 0x3C
; BASIC-NEXT: Size: 34
; BASIC-NEXT: Link: 0
; BASIC-NEXT: Info: 0
; BASIC-NEXT: AddressAlignment: 1
; BASIC-NEXT: EntrySize: 0
; BASIC-NEXT: SectionData (
; BASIC-NEXT: 0000: 41210000 00616561 62690001 17000000
; BASIC-NEXT: 0010: 060A0741 08010902 14011501 17031801
; BASIC-NEXT: 0020: 1901
; BASIC-NEXT: )
; CORTEXA8: .ARM.attributes
; CORTEXA8-NEXT: 0x70000003
; CORTEXA8-NEXT: 0x00000000
; CORTEXA8-NEXT: 0x00000000
; CORTEXA8-NEXT: 0x0000003c
; CORTEXA8-NEXT: 0x0000002f
; CORTEXA8-NEXT: 0x00000000
; CORTEXA8-NEXT: 0x00000000
; CORTEXA8-NEXT: 0x00000001
; CORTEXA8-NEXT: 0x00000000
; CORTEXA8-NEXT: '412e0000 00616561 62690001 24000000 05434f52 5445582d 41380006 0a074108 0109020a 02140115 01170318 011901'
; CORTEXA8: Name: .ARM.attributes
; CORTEXA8-NEXT: Type: SHT_ARM_ATTRIBUTES
; CORTEXA8-NEXT: Flags [ (0x0)
; CORTEXA8-NEXT: ]
; CORTEXA8-NEXT: Address: 0x0
; CORTEXA8-NEXT: Offset: 0x3C
; CORTEXA8-NEXT: Size: 47
; CORTEXA8-NEXT: Link: 0
; CORTEXA8-NEXT: Info: 0
; CORTEXA8-NEXT: AddressAlignment: 1
; CORTEXA8-NEXT: EntrySize: 0
; CORTEXA8-NEXT: SectionData (
; CORTEXA8-NEXT: 0000: 412E0000 00616561 62690001 24000000
; CORTEXA8-NEXT: 0010: 05434F52 5445582D 41380006 0A074108
; CORTEXA8-NEXT: 0020: 0109020A 02140115 01170318 011901
; CORTEXA8-NEXT: )
define i32 @f(i64 %z) {
ret i32 0

View File

@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
; RUN: llvm-readobj -s -sr -sd | FileCheck -check-prefix=OBJ %s
target triple = "armv7-none-linux-gnueabi"
@ -9,32 +9,17 @@ define arm_aapcs_vfpcc i32 @barf() nounwind {
entry:
%0 = tail call arm_aapcs_vfpcc i32 @foo(i8* @a) nounwind
ret i32 %0
; OBJ: '.text'
; OBJ-NEXT: 'sh_type'
; OBJ-NEXT: 'sh_flags'
; OBJ-NEXT: 'sh_addr'
; OBJ-NEXT: 'sh_offset'
; OBJ-NEXT: 'sh_size'
; OBJ-NEXT: 'sh_link'
; OBJ-NEXT: 'sh_info'
; OBJ-NEXT: 'sh_addralign'
; OBJ-NEXT: 'sh_entsize'
; OBJ-NEXT: '_section_data', '00482de9 000000e3 000040e3 feffffeb 0088bde8'
; OBJ: Relocation 0
; OBJ-NEXT: 'r_offset', 0x00000004
; OBJ-NEXT: 'r_sym', 0x000009
; OBJ-NEXT: 'r_type', 0x2b
; OBJ: Relocation 1
; OBJ-NEXT: 'r_offset', 0x00000008
; OBJ-NEXT: 'r_sym'
; OBJ-NEXT: 'r_type', 0x2c
; OBJ: # Relocation 2
; OBJ-NEXT: 'r_offset', 0x0000000c
; OBJ-NEXT: 'r_sym', 0x00000a
; OBJ-NEXT: 'r_type', 0x1c
; OBJ: Section {
; OBJ: Name: .text
; OBJ: Relocations [
; OBJ-NEXT: 0x4 R_ARM_MOVW_ABS_NC a
; OBJ-NEXT: 0x8 R_ARM_MOVT_ABS
; OBJ-NEXT: 0xC R_ARM_CALL foo
; OBJ-NEXT: ]
; OBJ-NEXT: SectionData (
; OBJ-NEXT: 0000: 00482DE9 000000E3 000040E3 FEFFFFEB
; OBJ-NEXT: 0010: 0088BDE8
; OBJ-NEXT: )
}

View File

@ -1,9 +1,9 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \
; RUN: FileCheck -check-prefix=ELFASM %s
; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=ELFOBJ %s
; RUN: llvm-readobj -s -sd | FileCheck -check-prefix=ELFOBJ %s
;; Make sure that bl __aeabi_read_tp is materiazlied and fixed up correctly
;; Make sure that bl __aeabi_read_tp is materialized and fixed up correctly
;; in the obj case.
@i = external thread_local global i32
@ -24,19 +24,13 @@ bb: ; preds = %entry
; ELFASM: bl __aeabi_read_tp
; ELFOBJ: '.text'
; ELFOBJ-NEXT: 'sh_type'
; ELFOBJ-NEXT: 'sh_flags'
; ELFOBJ-NEXT: 'sh_addr'
; ELFOBJ-NEXT: 'sh_offset'
; ELFOBJ-NEXT: 'sh_size'
; ELFOBJ-NEXT: 'sh_link'
; ELFOBJ-NEXT: 'sh_info'
; ELFOBJ-NEXT: 'sh_addralign'
; ELFOBJ-NEXT: 'sh_entsize'
;;; BL __aeabi_read_tp is ---+
;;; V
; ELFOBJ-NEXT: 00482de9 3c009fe5 00109fe7 feffffeb
; ELFOBJ: Sections [
; ELFOBJ: Section {
; ELFOBJ: Name: .text
; ELFOBJ: SectionData (
;;; BL __aeabi_read_tp is ---------+
;;; V
; ELFOBJ-NEXT: 0000: 00482DE9 3C009FE5 00109FE7 FEFFFFEB
bb1: ; preds = %entry

View File

@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
; RUN: llvm-readobj -s -t | FileCheck -check-prefix=OBJ %s
; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \
; RUN: FileCheck -check-prefix=ASM %s
@ -15,17 +15,20 @@
; ASM-NEXT: .type _MergedGlobals,%object @ @_MergedGlobals
; OBJ: Sections [
; OBJ: Section {
; OBJ: Index: 4
; OBJ-NEXT: Name: .bss
; OBJ: Section 4
; OBJ-NEXT: '.bss'
; OBJ: 'array00'
; OBJ-NEXT: 'st_value', 0x00000000
; OBJ-NEXT: 'st_size', 0x00000050
; OBJ-NEXT: 'st_bind', 0x0
; OBJ-NEXT: 'st_type', 0x1
; OBJ-NEXT: 'st_other', 0x00
; OBJ-NEXT: 'st_shndx', 0x0004
; OBJ: Symbols [
; OBJ: Symbol {
; OBJ: Name: array00
; OBJ-NEXT: Value: 0x0
; OBJ-NEXT: Size: 80
; OBJ-NEXT: Binding: Local
; OBJ-NEXT: Type: Object
; OBJ-NEXT: Other: 0
; OBJ-NEXT: Section: .bss
define i32 @main(i32 %argc) nounwind {
%1 = load i32* @sum, align 4

View File

@ -8,7 +8,7 @@
; RUN: llc -mtriple arm-unknown-linux-gnueabi \
; RUN: -arm-enable-ehabi -arm-enable-ehabi-descriptors \
; RUN: -filetype=obj -o - %s \
; RUN: | elf-dump --dump-section-data \
; RUN: | llvm-readobj -s -sd \
; RUN: | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
@ -68,12 +68,21 @@ declare void @__cxa_end_catch()
declare void @_ZSt9terminatev()
; CHECK: # Section 1
; CHECK-NEXT: (('sh_name', 0x0000002f) # '.group'
; CHECK: ('_section_data', '01000000 0a000000 0c000000 0e000000')
; CHECK: # Section 10
; CHECK-NEXT: (('sh_name', 0x000000e1) # '.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_'
; CHECK: # Section 12
; CHECK-NEXT: (('sh_name', 0x000000d7) # '.ARM.extab.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_'
; CHECK: # Section 14
; CHECK-NEXT: (('sh_name', 0x00000065) # '.ARM.exidx.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_'
; CHECK: Section {
; CHECK: Index: 1
; CHECK-NEXT: Name: .group (47)
; CHECK: SectionData (
; CHECK-NEXT: 0000: 01000000 0A000000 0C000000 0E000000
; CHECK-NEXT: )
; CHECK: Section {
; CHECK: Index: 10
; CHECK-NEXT: Name: .text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_ (225)
; CHECK: Section {
; CHECK: Index: 12
; CHECK-NEXT: Name: .ARM.extab.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_ (215)
; CHECK: Section {
; CHECK: Index: 14
; CHECK-NEXT: Name: .ARM.exidx.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_ (101)

View File

@ -7,7 +7,7 @@
; RUN: llc -mtriple arm-unknown-linux-gnueabi \
; RUN: -arm-enable-ehabi -arm-enable-ehabi-descriptors \
; RUN: -filetype=obj -o - %s \
; RUN: | elf-dump --dump-section-data \
; RUN: | llvm-readobj -s \
; RUN: | FileCheck %s
define void @test1() nounwind {
@ -20,28 +20,39 @@ entry:
ret void
}
; CHECK: # Section 1
; CHECK-NEXT: (('sh_name', 0x00000010) # '.text'
; CHECK: Sections [
; CHECK: Section {
; CHECK: Index: 1
; CHECK-NEXT: Name: .text (16)
; CHECK: (('sh_name', 0x00000005) # '.ARM.exidx'
; CHECK-NEXT: ('sh_type', 0x70000001)
; CHECK-NEXT: ('sh_flags', 0x00000082)
; CHECK-NEXT: ('sh_addr', 0x00000000)
; CHECK-NEXT: ('sh_offset', 0x0000005c)
; CHECK-NEXT: ('sh_size', 0x00000008)
; CHECK-NEXT: ('sh_link', 0x00000001)
; CHECK-NEXT: ('sh_info', 0x00000000)
; CHECK-NEXT: ('sh_addralign', 0x00000004)
; CHECK: Section {
; CHECK: Name: .ARM.exidx (5)
; CHECK-NEXT: Type: SHT_ARM_EXIDX
; CHECK-NEXT: Flags [ (0x82)
; CHECK-NEXT: SHF_ALLOC
; CHECK-NEXT: SHF_LINK_ORDER
; CHECK-NEXT: ]
; CHECK-NEXT: Address: 0x0
; CHECK-NEXT: Offset: 0x5C
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Link: 1
; CHECK-NEXT: Info: 0
; CHECK-NEXT: AddressAlignment: 4
; CHECK: # Section 7
; CHECK-NEXT: (('sh_name', 0x00000039) # '.test_section'
; CHECK: Section {
; CHECK: Index: 7
; CHECK-NEXT: Name: .test_section (57)
; CHECK: (('sh_name', 0x0000002f) # '.ARM.exidx.test_section'
; CHECK-NEXT: ('sh_type', 0x70000001)
; CHECK-NEXT: ('sh_flags', 0x00000082)
; CHECK-NEXT: ('sh_addr', 0x00000000)
; CHECK-NEXT: ('sh_offset', 0x00000068)
; CHECK-NEXT: ('sh_size', 0x00000008)
; CHECK-NEXT: ('sh_link', 0x00000007)
; CHECK-NEXT: ('sh_info', 0x00000000)
; CHECK-NEXT: ('sh_addralign', 0x00000004)
; CHECK: Section {
; CHECK: Name: .ARM.exidx.test_section (47)
; CHECK-NEXT: Type: SHT_ARM_EXIDX
; CHECK-NEXT: Flags [ (0x82)
; CHECK-NEXT: SHF_ALLOC
; CHECK-NEXT: SHF_LINK_ORDER
; CHECK-NEXT: ]
; CHECK-NEXT: Address: 0x0
; CHECK-NEXT: Offset: 0x68
; CHECK-NEXT: Size: 8
; CHECK-NEXT: Link: 7
; CHECK-NEXT: Info: 0
; CHECK-NEXT: AddressAlignment: 4

View File

@ -1,5 +1,5 @@
; RUN: llc -O1 -mcpu=pwr7 -code-model=medium -filetype=obj %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s
; RUN: llvm-readobj -r | FileCheck %s
; FIXME: When asm-parse is available, could make this an assembly test.
@ -19,18 +19,11 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing function-scoped variable si.
;
; CHECK: Relocation 0
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM2:[0-9]+]]
; CHECK-NEXT: 'r_type', 0x00000032
; CHECK: Relocation 1
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM2]]
; CHECK-NEXT: 'r_type', 0x00000030
; CHECK: Relocation 2
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM2]]
; CHECK-NEXT: 'r_type', 0x00000030
; CHECK: Relocations [
; CHECK: Section (1) .text {
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM2:[^ ]+]]
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM2]]
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM2]]
@gi = global i32 5, align 4
@ -45,18 +38,9 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing file-scope variable gi.
;
; CHECK: Relocation 3
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM3:[0-9]+]]
; CHECK-NEXT: 'r_type', 0x00000032
; CHECK: Relocation 4
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM3]]
; CHECK-NEXT: 'r_type', 0x00000030
; CHECK: Relocation 5
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM3]]
; CHECK-NEXT: 'r_type', 0x00000030
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM3:[^ ]+]]
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM3]]
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM3]]
define double @test_double_const() nounwind {
entry:
@ -66,12 +50,5 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing a constant.
;
; CHECK: Relocation 6
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM4:[0-9]+]]
; CHECK-NEXT: 'r_type', 0x00000032
; CHECK: Relocation 7
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM4]]
; CHECK-NEXT: 'r_type', 0x00000030
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM4:[^ ]+]]
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM4]]

View File

@ -1,7 +1,7 @@
; RUN: llc -O0 -mcpu=pwr7 -code-model=medium -filetype=obj %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=MEDIUM %s
; RUN: llvm-readobj -r | FileCheck -check-prefix=MEDIUM %s
; RUN: llc -O0 -mcpu=pwr7 -code-model=large -filetype=obj %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=LARGE %s
; RUN: llvm-readobj -r | FileCheck -check-prefix=LARGE %s
; FIXME: When asm-parse is available, could make this an assembly test.
@ -21,25 +21,15 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing external variable ei.
;
; MEDIUM: '.rela.text'
; MEDIUM: Relocation 0
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM1:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 1
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM1]]
; MEDIUM-NEXT: 'r_type', 0x00000040
; MEDIUM: Relocations [
; MEDIUM: Section (1) .text {
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM1:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM1]]
;
; LARGE: '.rela.text'
; LARGE: Relocation 0
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM1:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 1
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM1]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE: Relocations [
; LARGE: Section (1) .text {
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM1:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM1]]
@test_fn_static.si = internal global i32 0, align 4
@ -54,26 +44,14 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing function-scoped variable si.
;
; MEDIUM: Relocation 2
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM2:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 3
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM2]]
; MEDIUM-NEXT: 'r_type', 0x00000030
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM2:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM2]]
;
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing function-scoped variable si.
;
; LARGE: Relocation 2
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM2:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 3
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM2]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM2:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM2]]
@gi = global i32 5, align 4
@ -88,26 +66,14 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing file-scope variable gi.
;
; MEDIUM: Relocation 4
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM3:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 5
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM3]]
; MEDIUM-NEXT: 'r_type', 0x00000030
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM3:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM3]]
;
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing file-scope variable gi.
;
; LARGE: Relocation 4
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM3:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 5
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM3]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM3:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM3]]
define double @test_double_const() nounwind {
entry:
@ -117,26 +83,14 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing a constant.
;
; MEDIUM: Relocation 6
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM4:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 7
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM4]]
; MEDIUM-NEXT: 'r_type', 0x00000030
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM4:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM4]]
;
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing a constant.
;
; LARGE: Relocation 6
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM4:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 7
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM4]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM4:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM4]]
define signext i32 @test_jump_table(i32 signext %i) nounwind {
entry:
@ -185,23 +139,11 @@ sw.epilog: ; preds = %sw.bb3, %sw.default
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing a jump table address.
;
; MEDIUM: Relocation 8
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM5:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 9
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM5]]
; MEDIUM-NEXT: 'r_type', 0x00000040
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM5:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM5]]
;
; LARGE: Relocation 8
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM5:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 9
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM5]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM5:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM5]]
@ti = common global i32 0, align 4
@ -216,23 +158,11 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing tentatively declared variable ti.
;
; MEDIUM: Relocation 10
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM6:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 11
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM6]]
; MEDIUM-NEXT: 'r_type', 0x00000040
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM6:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM6]]
;
; LARGE: Relocation 10
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM6:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 11
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM6]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM6:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM6]]
define i8* @test_fnaddr() nounwind {
entry:
@ -248,21 +178,8 @@ declare signext i32 @foo(i32 signext)
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing function address foo.
;
; MEDIUM: Relocation 12
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM7:[0-9]+]]
; MEDIUM-NEXT: 'r_type', 0x00000032
; MEDIUM: Relocation 13
; MEDIUM-NEXT: 'r_offset'
; MEDIUM-NEXT: 'r_sym', 0x[[SYM7]]
; MEDIUM-NEXT: 'r_type', 0x00000040
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM7:[^ ]+]]
; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM7]]
;
; LARGE: Relocation 12
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM7:[0-9]+]]
; LARGE-NEXT: 'r_type', 0x00000032
; LARGE: Relocation 13
; LARGE-NEXT: 'r_offset'
; LARGE-NEXT: 'r_sym', 0x[[SYM7]]
; LARGE-NEXT: 'r_type', 0x00000040
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM7:[^ ]+]]
; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM7]]

View File

@ -1,5 +1,5 @@
; RUN: llc -O0 -mcpu=pwr7 -filetype=obj %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s
; RUN: llvm-readobj -t | FileCheck %s
target datalayout = "E-p:64:64:64-S0-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
@ -14,7 +14,9 @@ entry:
; Verify that nextIdx has symbol type TLS.
;
; CHECK: '.symtab'
; CHECK: 'nextIdx'
; CHECK: 'st_type', 0x6
; CHECK: Symbol {
; CHECK: Name: nextIdx
; CHECK-NEXT: Value:
; CHECK-NEXT: Size:
; CHECK-NEXT: Binding:
; CHECK-NEXT: Type: TLS

View File

@ -1,5 +1,5 @@
; RUN: llc -mcpu=pwr7 -O0 -filetype=obj -relocation-model=pic %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s
; RUN: llvm-readobj -r | FileCheck %s
; Test correct relocation generation for thread-local storage using
; the general dynamic model and integrated assembly.
@ -21,21 +21,11 @@ entry:
; and R_PPC64_TLSGD for accessing external variable a, and R_PPC64_REL24
; for the call to __tls_get_addr.
;
; CHECK: '.rela.text'
; CHECK: Relocation 0
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1:[0-9a-f]+]]
; CHECK-NEXT: 'r_type', 0x00000052
; CHECK: Relocation 1
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x00000050
; CHECK: Relocation 2
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x0000006b
; CHECK: Relocation 3
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x{{[0-9a-f]+}}
; CHECK-NEXT: 'r_type', 0x0000000a
; CHECK: Relocations [
; CHECK: Section (1) .text {
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_HA a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_LO a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLSGD a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_REL24 __tls_get_addr
; CHECK: }
; CHECK: ]

View File

@ -1,5 +1,5 @@
; RUN: llc -mcpu=pwr7 -O0 -filetype=obj %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s
; RUN: llvm-readobj -r | FileCheck %s
; Test correct relocation generation for thread-local storage
; using the initial-exec model and integrated assembly.
@ -20,17 +20,10 @@ entry:
; Verify generation of R_PPC64_GOT_TPREL16_DS and R_PPC64_TLS for
; accessing external variable a.
;
; CHECK: '.rela.text'
; CHECK: Relocation 0
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1:[0-9a-f]+]]
; CHECK-NEXT: 'r_type', 0x0000005a
; CHECK: Relocation 1
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x00000058
; CHECK: Relocation 2
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x00000043
; CHECK: Relocations [
; CHECK: Section (1) .text {
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TPREL16_HA a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TPREL16_LO_DS a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLS a
; CHECK: }
; CHECK: ]

View File

@ -1,5 +1,5 @@
; RUN: llc -mcpu=pwr7 -O0 -filetype=obj -relocation-model=pic %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s
; RUN: llvm-readobj -r | FileCheck %s
; Test correct relocation generation for thread-local storage using
; the local dynamic model.
@ -22,29 +22,13 @@ entry:
; accessing external variable a, and R_PPC64_REL24 for the call to
; __tls_get_addr.
;
; CHECK: '.rela.text'
; CHECK: Relocation 0
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1:[0-9a-f]+]]
; CHECK-NEXT: 'r_type', 0x00000056
; CHECK: Relocation 1
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x00000054
; CHECK: Relocation 2
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x0000006c
; CHECK: Relocation 3
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x{{[0-9a-f]+}}
; CHECK-NEXT: 'r_type', 0x0000000a
; CHECK: Relocation 4
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x0000004d
; CHECK: Relocation 5
; CHECK-NEXT: 'r_offset'
; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
; CHECK-NEXT: 'r_type', 0x0000004b
; CHECK: Relocations [
; CHECK: Section (1) .text {
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSLD16_HA a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSLD16_LO a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLSLD a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_REL24 __tls_get_addr
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_DTPREL16_HA a
; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_DTPREL16_LO a
; CHECK: }
; CHECK: ]

View File

@ -1,10 +1,10 @@
;; RUN: llc -mtriple=aarch64-none-linux-gnu -filetype=obj %s -o - | \
;; RUN: elf-dump | FileCheck -check-prefix=OBJ %s
;; RUN: llvm-readobj -h -r | FileCheck -check-prefix=OBJ %s
; Also take it on a round-trip through llvm-mc to stretch assembly-parsing's legs:
;; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - | \
;; RUN: llvm-mc -arch=aarch64 -filetype=obj -o - | \
;; RUN: elf-dump | FileCheck -check-prefix=OBJ %s
;; RUN: llvm-readobj -h -r | FileCheck -check-prefix=OBJ %s
@var8 = global i8 0
@var16 = global i16 0
@ -35,77 +35,28 @@ define void @address() {
}
; Check we're using EM_AARCH64
; OBJ: 'e_machine', 0x00
; OBJ: ElfHeader {
; OBJ: Machine: EM_AARCH64
; OBJ: }
; OBJ: .rela.text
; var8
; R_AARCH64_ADR_PREL_PG_HI21 against var8
; OBJ: 'r_sym', 0x0000000f
; OBJ-NEXT: 'r_type', 0x00000113
; R_AARCH64_LDST8_ABS_LO12_NC against var8
; OBJ: 'r_sym', 0x0000000f
; OBJ-NEXT: 'r_type', 0x00000116
; var16
; R_AARCH64_ADR_PREL_PG_HI21 against var16
; OBJ: 'r_sym', 0x0000000c
; OBJ-NEXT: 'r_type', 0x00000113
; R_AARCH64_LDST16_ABS_LO12_NC against var16
; OBJ: 'r_sym', 0x0000000c
; OBJ-NEXT: 'r_type', 0x0000011c
; var32
; R_AARCH64_ADR_PREL_PG_HI21 against var32
; OBJ: 'r_sym', 0x0000000d
; OBJ-NEXT: 'r_type', 0x00000113
; R_AARCH64_LDST32_ABS_LO12_NC against var32
; OBJ: 'r_sym', 0x0000000d
; OBJ-NEXT: 'r_type', 0x0000011d
; var64
; R_AARCH64_ADR_PREL_PG_HI21 against var64
; OBJ: 'r_sym', 0x0000000e
; OBJ-NEXT: 'r_type', 0x00000113
; R_AARCH64_LDST64_ABS_LO12_NC against var64
; OBJ: 'r_sym', 0x0000000e
; OBJ-NEXT: 'r_type', 0x0000011e
; OBJ: Relocations [
; OBJ: Section (1) .text {
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var8
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST8_ABS_LO12_NC var8
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var16
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST16_ABS_LO12_NC var16
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var32
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST32_ABS_LO12_NC var32
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var64
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST64_ABS_LO12_NC var64
; This is on the store, so not really important, but it stops the next
; match working.
; R_AARCH64_LDST64_ABS_LO12_NC against var64
; OBJ: 'r_sym', 0x0000000e
; OBJ-NEXT: 'r_type', 0x0000011e
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST64_ABS_LO12_NC var64
; Pure address-calculation against var64
; R_AARCH64_ADR_PREL_PG_HI21 against var64
; OBJ: 'r_sym', 0x0000000e
; OBJ-NEXT: 'r_type', 0x00000113
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var64
; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC var64
; R_AARCH64_ADD_ABS_LO12_NC against var64
; OBJ: 'r_sym', 0x0000000e
; OBJ-NEXT: 'r_type', 0x00000115
; Make sure the symbols don't move around, otherwise relocation info
; will be wrong:
; OBJ: Symbol 12
; OBJ-NEXT: var16
; OBJ: Symbol 13
; OBJ-NEXT: var32
; OBJ: Symbol 14
; OBJ-NEXT: var64
; OBJ: Symbol 15
; OBJ-NEXT: var8
; OBJ: }
; OBJ: ]

View File

@ -1,13 +1,10 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
add x2, x3, #:lo12:some_label
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000115
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: some_label
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_ADD_ABS_LO12_NC some_label 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,13 +1,10 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
b.eq somewhere
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000118
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: somewhere
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_CONDBR19 somewhere 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,28 +1,16 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
ldr x0, some_label
ldr w3, some_label
ldrsw x9, some_label
prfm pldl3keep, some_label
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000111
// OBJ: 'r_offset', 0x0000000000000004
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000111
// OBJ: 'r_offset', 0x0000000000000008
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000111
// OBJ: 'r_offset', 0x000000000000000c
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000111
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: some_label
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_LD_PREL_LO19 some_label 0x0
// OBJ-NEXT: 0x4 R_AARCH64_LD_PREL_LO19 some_label 0x0
// OBJ-NEXT: 0x8 R_AARCH64_LD_PREL_LO19 some_label 0x0
// OBJ-NEXT: 0xC R_AARCH64_LD_PREL_LO19 some_label 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,5 +1,5 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
ldrb w0, [sp, #:lo12:some_label]
ldrh w0, [sp, #:lo12:some_label]
@ -7,28 +7,12 @@
ldr x0, [sp, #:lo12:some_label]
str q0, [sp, #:lo12:some_label]
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000116
// OBJ: 'r_offset', 0x0000000000000004
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000011c
// OBJ: 'r_offset', 0x0000000000000008
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000011d
// OBJ: 'r_offset', 0x000000000000000c
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000011e
// OBJ: 'r_offset', 0x0000000000000010
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000012b
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: some_label
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_LDST8_ABS_LO12_NC some_label 0x0
// OBJ-NEXT: 0x4 R_AARCH64_LDST16_ABS_LO12_NC some_label 0x0
// OBJ-NEXT: 0x8 R_AARCH64_LDST32_ABS_LO12_NC some_label 0x0
// OBJ-NEXT: 0xC R_AARCH64_LDST64_ABS_LO12_NC some_label 0x0
// OBJ-NEXT: 0x10 R_AARCH64_LDST128_ABS_LO12_NC some_label 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,5 +1,5 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
movz x0, #:abs_g0:some_label
movk x0, #:abs_g0_nc:some_label
@ -21,78 +21,22 @@
movz x19, #:abs_g2_s:some_label
movn x19, #:abs_g2_s:some_label
// OBJ: .rela.text
// :abs_g0: => R_AARCH64_MOVW_UABS_G0
// OBJ: 'r_offset', 0x0000000000000000
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000107
// :abs_g0_nc: => R_AARCH64_MOVW_UABS_G0_NC
// OBJ: 'r_offset', 0x0000000000000004
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000108
// :abs_g1: => R_AARCH64_MOVW_UABS_G1
// OBJ: 'r_offset', 0x0000000000000008
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000109
// :abs_g1_nc: => R_AARCH64_MOVW_UABS_G1_NC
// OBJ: 'r_offset', 0x000000000000000c
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010a
// :abs_g2: => R_AARCH64_MOVW_UABS_G2
// OBJ: 'r_offset', 0x0000000000000010
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010b
// :abs_g2_nc: => R_AARCH64_MOVW_UABS_G2_NC
// OBJ: 'r_offset', 0x0000000000000014
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010c
// :abs_g3: => R_AARCH64_MOVW_UABS_G3
// OBJ: 'r_offset', 0x0000000000000018
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010d
// :abs_g3: => R_AARCH64_MOVW_UABS_G3
// OBJ: 'r_offset', 0x000000000000001c
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010d
// :abs_g0_s: => R_AARCH64_MOVW_SABS_G0
// OBJ: 'r_offset', 0x0000000000000020
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010e
// :abs_g0_s: => R_AARCH64_MOVW_SABS_G0
// OBJ: 'r_offset', 0x0000000000000024
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010e
// :abs_g1_s: => R_AARCH64_MOVW_SABS_G1
// OBJ: 'r_offset', 0x0000000000000028
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010f
// :abs_g1_s: => R_AARCH64_MOVW_SABS_G1
// OBJ: 'r_offset', 0x000000000000002c
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000010f
// :abs_g2_s: => R_AARCH64_MOVW_SABS_G2
// OBJ: 'r_offset', 0x0000000000000030
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000110
// :abs_g2_s: => R_AARCH64_MOVW_SABS_G2
// OBJ: 'r_offset', 0x0000000000000034
// OBJ: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000110
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: some_label
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_MOVW_UABS_G0 some_label 0x0
// OBJ-NEXT: 0x4 R_AARCH64_MOVW_UABS_G0_NC some_label 0x0
// OBJ-NEXT: 0x8 R_AARCH64_MOVW_UABS_G1 some_label 0x0
// OBJ-NEXT: 0xC R_AARCH64_MOVW_UABS_G1_NC some_label 0x0
// OBJ-NEXT: 0x10 R_AARCH64_MOVW_UABS_G2 some_label 0x0
// OBJ-NEXT: 0x14 R_AARCH64_MOVW_UABS_G2_NC some_label 0x0
// OBJ-NEXT: 0x18 R_AARCH64_MOVW_UABS_G3 some_label 0x0
// OBJ-NEXT: 0x1C R_AARCH64_MOVW_UABS_G3 some_label 0x0
// OBJ-NEXT: 0x20 R_AARCH64_MOVW_SABS_G0 some_label 0x0
// OBJ-NEXT: 0x24 R_AARCH64_MOVW_SABS_G0 some_label 0x0
// OBJ-NEXT: 0x28 R_AARCH64_MOVW_SABS_G1 some_label 0x0
// OBJ-NEXT: 0x2C R_AARCH64_MOVW_SABS_G1 some_label 0x0
// OBJ-NEXT: 0x30 R_AARCH64_MOVW_SABS_G2 some_label 0x0
// OBJ-NEXT: 0x34 R_AARCH64_MOVW_SABS_G2 some_label 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,29 +1,17 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
adr x2, some_label
adrp x5, some_label
adrp x5, :got:some_label
ldr x0, [x5, #:got_lo12:some_label]
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000112
// OBJ: 'r_offset', 0x0000000000000004
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000113
// OBJ: 'r_offset', 0x0000000000000008
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000137
// OBJ: 'r_offset', 0x000000000000000c
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000138
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: some_label
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_ADR_PREL_LO21 some_label 0x0
// OBJ-NEXT: 0x4 R_AARCH64_ADR_PREL_PG_HI21 some_label 0x0
// OBJ-NEXT: 0x8 R_AARCH64_ADR_GOT_PAGE some_label 0x0
// OBJ-NEXT: 0xC R_AARCH64_LD64_GOT_LO12_NC some_label 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,18 +1,12 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
tbz x6, #45, somewhere
tbnz w3, #15, somewhere
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000117
// OBJ: 'r_offset', 0x0000000000000004
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x00000117
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: somewhere
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_TSTBR14 somewhere 0x0
// OBJ-NEXT: 0x4 R_AARCH64_TSTBR14 somewhere 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,18 +1,12 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
b somewhere
bl somewhere
// OBJ: .rela.text
// OBJ: 'r_offset', 0x0000000000000000
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000011a
// OBJ: 'r_offset', 0x0000000000000004
// OBJ-NEXT: 'r_sym', 0x00000005
// OBJ-NEXT: 'r_type', 0x0000011b
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: somewhere
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_AARCH64_JUMP26 somewhere 0x0
// OBJ-NEXT: 0x4 R_AARCH64_CALL26 somewhere 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,9 +1,6 @@
// RUN: llvm-mc -arch=aarch64 -show-encoding < %s | FileCheck %s
// RUN: llvm-mc -arch=aarch64 -filetype=obj < %s -o %t
// RUN: elf-dump %t | FileCheck --check-prefix=CHECK-ELF %s
// RUN: llvm-objdump -r %t | FileCheck --check-prefix=CHECK-ELF-NAMES %s
// CHECK-ELF: .rela.text
// RUN: llvm-mc -arch=aarch64 -filetype=obj < %s -o - | \
// RUN: llvm-readobj -r -t | FileCheck --check-prefix=CHECK-ELF %s
// TLS local-dynamic forms
movz x1, #:dtprel_g2:var
@ -19,27 +16,13 @@
// CHECK-NEXT: movn x4, #:dtprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g2:var, kind: fixup_a64_movw_dtprel_g2
// CHECK-ELF: # Relocation 0
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000000)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM:0x[0-9a-f]+]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
// CHECK-ELF: # Relocation 1
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000004)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
// CHECK-ELF: # Relocation 2
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000008)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
// CHECK-ELF: # Relocation 3
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000000c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
// CHECK-ELF: Relocations [
// CHECK-ELF-NEXT: Section (1) .text {
// CHECK-ELF-NEXT: 0x0 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM:[^ ]+]]
// CHECK-ELF-NEXT: 0x4 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]]
// CHECK-ELF-NEXT: 0x8 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]]
// CHECK-ELF-NEXT: 0xC R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]]
// CHECK-ELF-NAMES: 0 R_AARCH64_TLSLD_MOVW_DTPREL_G2
// CHECK-ELF-NAMES: 4 R_AARCH64_TLSLD_MOVW_DTPREL_G2
// CHECK-ELF-NAMES: 8 R_AARCH64_TLSLD_MOVW_DTPREL_G2
// CHECK-ELF-NAMES: 12 R_AARCH64_TLSLD_MOVW_DTPREL_G2
movz x5, #:dtprel_g1:var
movn x6, #:dtprel_g1:var
@ -54,27 +37,11 @@
// CHECK-NEXT: movn w8, #:dtprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1:var, kind: fixup_a64_movw_dtprel_g1
// CHECK-ELF: # Relocation 4
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000010)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
// CHECK-ELF: # Relocation 5
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000014)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
// CHECK-ELF: # Relocation 6
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000018)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
// CHECK-ELF: # Relocation 7
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000001c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
// CHECK-ELF-NEXT: 0x10 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0x14 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0x18 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0x1C R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
// CHECK-ELF-NAMES: 16 R_AARCH64_TLSLD_MOVW_DTPREL_G1
// CHECK-ELF-NAMES: 20 R_AARCH64_TLSLD_MOVW_DTPREL_G1
// CHECK-ELF-NAMES: 24 R_AARCH64_TLSLD_MOVW_DTPREL_G1
// CHECK-ELF-NAMES: 28 R_AARCH64_TLSLD_MOVW_DTPREL_G1
movk x9, #:dtprel_g1_nc:var
movk w10, #:dtprel_g1_nc:var
@ -83,17 +50,9 @@
// CHECK-NEXT: movk w10, #:dtprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1_nc:var, kind: fixup_a64_movw_dtprel_g1_nc
// CHECK-ELF: # Relocation 8
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020d)
// CHECK-ELF: # Relocation 9
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000024)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020d)
// CHECK-ELF-NEXT: 0x20 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x24 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC [[VARSYM]]
// CHECK-ELF-NAMES: 32 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
// CHECK-ELF-NAMES: 36 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
movz x11, #:dtprel_g0:var
movn x12, #:dtprel_g0:var
@ -107,28 +66,10 @@
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0:var, kind: fixup_a64_movw_dtprel_g0
// CHECK-NEXT: movn w14, #:dtprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A']
// CHECK-ELF: # Relocation 10
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000028)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
// CHECK-ELF: # Relocation 11
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000002c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
// CHECK-ELF: # Relocation 12
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000030)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
// CHECK-ELF: # Relocation 13
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000034)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
// CHECK-ELF-NAMES: 40 R_AARCH64_TLSLD_MOVW_DTPREL_G0
// CHECK-ELF-NAMES: 44 R_AARCH64_TLSLD_MOVW_DTPREL_G0
// CHECK-ELF-NAMES: 48 R_AARCH64_TLSLD_MOVW_DTPREL_G0
// CHECK-ELF-NAMES: 52 R_AARCH64_TLSLD_MOVW_DTPREL_G0
// CHECK-ELF-NEXT: 0x28 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
// CHECK-ELF-NEXT: 0x2C R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
// CHECK-ELF-NEXT: 0x30 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
// CHECK-ELF-NEXT: 0x34 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
movk x15, #:dtprel_g0_nc:var
@ -138,17 +79,9 @@
// CHECK-NEXT: movk w16, #:dtprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0_nc:var, kind: fixup_a64_movw_dtprel_g0_nc
// CHECK-ELF: # Relocation 14
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000038)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020f)
// CHECK-ELF: # Relocation 15
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000003c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000020f)
// CHECK-ELF-NEXT: 0x38 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x3C R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC [[VARSYM]]
// CHECK-ELF-NAMES: 56 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
// CHECK-ELF-NAMES: 60 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
add x17, x18, #:dtprel_hi12:var, lsl #12
add w19, w20, #:dtprel_hi12:var, lsl #12
@ -157,17 +90,8 @@
// CHECK-NEXT: add w19, w20, #:dtprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_hi12:var, kind: fixup_a64_add_dtprel_hi12
// CHECK-ELF: # Relocation 16
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000040)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000210)
// CHECK-ELF: # Relocation 17
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000044)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000210)
// CHECK-ELF-NAMES: 64 R_AARCH64_TLSLD_ADD_DTPREL_HI12
// CHECK-ELF-NAMES: 68 R_AARCH64_TLSLD_ADD_DTPREL_HI12
// CHECK-ELF-NEXT: 0x40 R_AARCH64_TLSLD_ADD_DTPREL_HI12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x44 R_AARCH64_TLSLD_ADD_DTPREL_HI12 [[VARSYM]]
add x21, x22, #:dtprel_lo12:var
@ -177,17 +101,9 @@
// CHECK-NEXT: add w23, w24, #:dtprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_add_dtprel_lo12
// CHECK-ELF: # Relocation 18
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000048)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000211)
// CHECK-ELF: # Relocation 19
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000004c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000211)
// CHECK-ELF-NEXT: 0x48 R_AARCH64_TLSLD_ADD_DTPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x4C R_AARCH64_TLSLD_ADD_DTPREL_LO12 [[VARSYM]]
// CHECK-ELF-NAMES: 72 R_AARCH64_TLSLD_ADD_DTPREL_LO12
// CHECK-ELF-NAMES: 76 R_AARCH64_TLSLD_ADD_DTPREL_LO12
add x25, x26, #:dtprel_lo12_nc:var
add w27, w28, #:dtprel_lo12_nc:var
@ -196,17 +112,9 @@
// CHECK-NEXT: add w27, w28, #:dtprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_add_dtprel_lo12_nc
// CHECK-ELF: # Relocation 20
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000050)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000212)
// CHECK-ELF: # Relocation 21
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000054)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000212)
// CHECK-ELF-NEXT: 0x50 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x54 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 80 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
// CHECK-ELF-NAMES: 84 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
ldrb w29, [x30, #:dtprel_lo12:var]
ldrsb x29, [x28, #:dtprel_lo12_nc:var]
@ -215,17 +123,9 @@
// CHECK-NEXT: ldrsb x29, [x28, #:dtprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst8_dtprel_lo12_nc
// CHECK-ELF: # Relocation 22
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000058)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000213)
// CHECK-ELF: # Relocation 23
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000005c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000214)
// CHECK-ELF-NEXT: 0x58 R_AARCH64_TLSLD_LDST8_DTPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x5C R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 88 R_AARCH64_TLSLD_LDST8_DTPREL_LO12
// CHECK-ELF-NAMES: 92 R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
strh w27, [x26, #:dtprel_lo12:var]
ldrsh x25, [x24, #:dtprel_lo12_nc:var]
@ -234,17 +134,9 @@
// CHECK-NEXT: ldrsh x25, [x24, #:dtprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst16_dtprel_lo12_n
// CHECK-ELF: # Relocation 24
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000060)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000215)
// CHECK-ELF: # Relocation 25
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000064)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000216)
// CHECK-ELF-NEXT: 0x60 R_AARCH64_TLSLD_LDST16_DTPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x64 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 96 R_AARCH64_TLSLD_LDST16_DTPREL_LO12
// CHECK-ELF-NAMES: 100 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
ldr w23, [x22, #:dtprel_lo12:var]
ldrsw x21, [x20, #:dtprel_lo12_nc:var]
@ -253,17 +145,9 @@
// CHECK-NEXT: ldrsw x21, [x20, #:dtprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst32_dtprel_lo12_n
// CHECK-ELF: # Relocation 26
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000068)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000217)
// CHECK-ELF: # Relocation 27
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000006c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000218)
// CHECK-ELF-NEXT: 0x68 R_AARCH64_TLSLD_LDST32_DTPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x6C R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 104 R_AARCH64_TLSLD_LDST32_DTPREL_LO12
// CHECK-ELF-NAMES: 108 R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
ldr x19, [x18, #:dtprel_lo12:var]
str x17, [x16, #:dtprel_lo12_nc:var]
@ -273,17 +157,9 @@
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst64_dtprel_lo12_nc
// CHECK-ELF: # Relocation 28
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000070)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000219)
// CHECK-ELF: # Relocation 29
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000074)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021a)
// CHECK-ELF-NEXT: 0x70 R_AARCH64_TLSLD_LDST64_DTPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x74 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 112 R_AARCH64_TLSLD_LDST64_DTPREL_LO12
// CHECK-ELF-NAMES: 116 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
// TLS initial-exec forms
movz x15, #:gottprel_g1:var
@ -293,17 +169,9 @@
// CHECK-NEXT: movz w14, #:gottprel_g1:var // encoding: [0x0e'A',A,0xa0'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g1:var, kind: fixup_a64_movw_gottprel_g1
// CHECK-ELF: # Relocation 30
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000078)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021b)
// CHECK-ELF: # Relocation 31
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000007c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021b)
// CHECK-ELF-NEXT: 0x78 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0x7C R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 [[VARSYM]]
// CHECK-ELF-NAMES: 120 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1
// CHECK-ELF-NAMES: 124 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1
movk x13, #:gottprel_g0_nc:var
movk w12, #:gottprel_g0_nc:var
@ -312,17 +180,9 @@
// CHECK-NEXT: movk w12, #:gottprel_g0_nc:var // encoding: [0x0c'A',A,0x80'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g0_nc:var, kind: fixup_a64_movw_gottprel_g0_nc
// CHECK-ELF: # Relocation 32
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000080)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021c)
// CHECK-ELF: # Relocation 33
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000084)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021c)
// CHECK-ELF-NEXT: 0x80 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x84 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC [[VARSYM]]
// CHECK-ELF-NAMES: 128 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
// CHECK-ELF-NAMES: 132 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
adrp x11, :gottprel:var
ldr x10, [x0, #:gottprel_lo12:var]
@ -334,22 +194,10 @@
// CHECK-NEXT: ldr x9, :gottprel:var // encoding: [0x09'A',A,A,0x58'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :gottprel:var, kind: fixup_a64_ld_gottprel_prel19
// CHECK-ELF: # Relocation 34
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000088)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021d)
// CHECK-ELF: # Relocation 35
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000008c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021e)
// CHECK-ELF: # Relocation 36
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000090)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000021f)
// CHECK-ELF-NEXT: 0x88 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 [[VARSYM]]
// CHECK-ELF-NEXT: 0x8C R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x90 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 [[VARSYM]]
// CHECK-ELF-NAMES: 136 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE
// CHECK-ELF-NAMES: 140 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
// CHECK-ELF-NAMES: 144 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19
// TLS local-exec forms
movz x3, #:tprel_g2:var
@ -359,17 +207,9 @@
// CHECK-NEXT: movn x4, #:tprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g2:var, kind: fixup_a64_movw_tprel_g2
// CHECK-ELF: # Relocation 37
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000094)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000220)
// CHECK-ELF: # Relocation 38
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000098)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000220)
// CHECK-ELF-NEXT: 0x94 R_AARCH64_TLSLE_MOVW_TPREL_G2 [[VARSYM]]
// CHECK-ELF-NEXT: 0x98 R_AARCH64_TLSLE_MOVW_TPREL_G2 [[VARSYM]]
// CHECK-ELF-NAMES: 148 R_AARCH64_TLSLE_MOVW_TPREL_G2
// CHECK-ELF-NAMES: 152 R_AARCH64_TLSLE_MOVW_TPREL_G2
movz x5, #:tprel_g1:var
movn x6, #:tprel_g1:var
@ -384,27 +224,11 @@
// CHECK-NEXT: movn w8, #:tprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1:var, kind: fixup_a64_movw_tprel_g1
// CHECK-ELF: # Relocation 39
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000009c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000221)
// CHECK-ELF: # Relocation 40
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a0)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000221)
// CHECK-ELF: # Relocation 41
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a4)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000221)
// CHECK-ELF: # Relocation 42
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a8)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000221)
// CHECK-ELF-NEXT: 0x9C R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0xA0 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0xA4 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
// CHECK-ELF-NEXT: 0xA8 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
// CHECK-ELF-NAMES: 156 R_AARCH64_TLSLE_MOVW_TPREL_G1
// CHECK-ELF-NAMES: 160 R_AARCH64_TLSLE_MOVW_TPREL_G1
// CHECK-ELF-NAMES: 164 R_AARCH64_TLSLE_MOVW_TPREL_G1
// CHECK-ELF-NAMES: 168 R_AARCH64_TLSLE_MOVW_TPREL_G1
movk x9, #:tprel_g1_nc:var
movk w10, #:tprel_g1_nc:var
@ -413,17 +237,9 @@
// CHECK-NEXT: movk w10, #:tprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1_nc:var, kind: fixup_a64_movw_tprel_g1_nc
// CHECK-ELF: # Relocation 43
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000ac)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000222)
// CHECK-ELF: # Relocation 44
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b0)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000222)
// CHECK-ELF-NEXT: 0xAC R_AARCH64_TLSLE_MOVW_TPREL_G1_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0xB0 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC [[VARSYM]]
// CHECK-ELF-NAMES: 172 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
// CHECK-ELF-NAMES: 176 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
movz x11, #:tprel_g0:var
movn x12, #:tprel_g0:var
@ -438,27 +254,11 @@
// CHECK-NEXT: movn w14, #:tprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0:var, kind: fixup_a64_movw_tprel_g0
// CHECK-ELF: # Relocation 45
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b4)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000223)
// CHECK-ELF: # Relocation 46
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b8)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000223)
// CHECK-ELF: # Relocation 47
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000bc)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000223)
// CHECK-ELF: # Relocation 48
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c0)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000223)
// CHECK-ELF-NEXT: 0xB4 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
// CHECK-ELF-NEXT: 0xB8 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
// CHECK-ELF-NEXT: 0xBC R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
// CHECK-ELF-NEXT: 0xC0 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
// CHECK-ELF-NAMES: 180 R_AARCH64_TLSLE_MOVW_TPREL_G0
// CHECK-ELF-NAMES: 184 R_AARCH64_TLSLE_MOVW_TPREL_G0
// CHECK-ELF-NAMES: 188 R_AARCH64_TLSLE_MOVW_TPREL_G0
// CHECK-ELF-NAMES: 192 R_AARCH64_TLSLE_MOVW_TPREL_G0
movk x15, #:tprel_g0_nc:var
movk w16, #:tprel_g0_nc:var
@ -467,17 +267,9 @@
// CHECK-NEXT: movk w16, #:tprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0_nc:var, kind: fixup_a64_movw_tprel_g0_nc
// CHECK-ELF: # Relocation 49
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c4)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000224)
// CHECK-ELF: # Relocation 50
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c8)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000224)
// CHECK-ELF-NEXT: 0xC4 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0xC8 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC [[VARSYM]]
// CHECK-ELF-NAMES: 196 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC
// CHECK-ELF-NAMES: 200 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC
add x17, x18, #:tprel_hi12:var, lsl #12
add w19, w20, #:tprel_hi12:var, lsl #12
@ -486,17 +278,9 @@
// CHECK-NEXT: add w19, w20, #:tprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_hi12:var, kind: fixup_a64_add_tprel_hi12
// CHECK-ELF: # Relocation 51
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000cc)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000225)
// CHECK-ELF: # Relocation 52
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d0)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000225)
// CHECK-ELF-NEXT: 0xCC R_AARCH64_TLSLE_ADD_TPREL_HI12 [[VARSYM]]
// CHECK-ELF-NEXT: 0xD0 R_AARCH64_TLSLE_ADD_TPREL_HI12 [[VARSYM]]
// CHECK-ELF-NAMES: 204 R_AARCH64_TLSLE_ADD_TPREL_HI12
// CHECK-ELF-NAMES: 208 R_AARCH64_TLSLE_ADD_TPREL_HI12
add x21, x22, #:tprel_lo12:var
add w23, w24, #:tprel_lo12:var
@ -505,17 +289,9 @@
// CHECK-NEXT: add w23, w24, #:tprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_add_tprel_lo12
// CHECK-ELF: # Relocation 53
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d4)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000226)
// CHECK-ELF: # Relocation 54
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d8)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000226)
// CHECK-ELF-NEXT: 0xD4 R_AARCH64_TLSLE_ADD_TPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0xD8 R_AARCH64_TLSLE_ADD_TPREL_LO12 [[VARSYM]]
// CHECK-ELF-NAMES: 212 R_AARCH64_TLSLE_ADD_TPREL_LO12
// CHECK-ELF-NAMES: 216 R_AARCH64_TLSLE_ADD_TPREL_LO12
add x25, x26, #:tprel_lo12_nc:var
add w27, w28, #:tprel_lo12_nc:var
@ -524,19 +300,10 @@
// CHECK-NEXT: add w27, w28, #:tprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_add_tprel_lo12_nc
// CHECK-ELF: # Relocation 55
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000dc)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000227)
// CHECK-ELF: # Relocation 56
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e0)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000227)
// CHECK-ELF-NEXT: 0xDC R_AARCH64_TLSLE_ADD_TPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0xE0 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 220 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC
// CHECK-ELF-NAMES: 224 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC
ldrb w29, [x30, #:tprel_lo12:var]
ldrsb x29, [x28, #:tprel_lo12_nc:var]
// CHECK: ldrb w29, [x30, #:tprel_lo12:var] // encoding: [0xdd'A',0x03'A',0x40'A',0x39'A']
@ -544,17 +311,9 @@
// CHECK-NEXT: ldrsb x29, [x28, #:tprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst8_tprel_lo12_nc
// CHECK-ELF: # Relocation 57
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e4)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000228)
// CHECK-ELF: # Relocation 58
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e8)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000229)
// CHECK-ELF-NEXT: 0xE4 R_AARCH64_TLSLE_LDST8_TPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0xE8 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 228 R_AARCH64_TLSLE_LDST8_TPREL_LO12
// CHECK-ELF-NAMES: 232 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC
strh w27, [x26, #:tprel_lo12:var]
ldrsh x25, [x24, #:tprel_lo12_nc:var]
@ -563,17 +322,9 @@
// CHECK-NEXT: ldrsh x25, [x24, #:tprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst16_tprel_lo12_n
// CHECK-ELF: # Relocation 59
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000ec)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000022a)
// CHECK-ELF: # Relocation 60
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f0)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000022b)
// CHECK-ELF-NEXT: 0xEC R_AARCH64_TLSLE_LDST16_TPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0xF0 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC [[VARSYM]]
// CHECK-ELF-NAMES: 236 R_AARCH64_TLSLE_LDST16_TPREL_LO12
// CHECK-ELF-NAMES: 240 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC
ldr w23, [x22, #:tprel_lo12:var]
ldrsw x21, [x20, #:tprel_lo12_nc:var]
@ -582,17 +333,8 @@
// CHECK-NEXT: ldrsw x21, [x20, #:tprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst32_tprel_lo12_n
// CHECK-ELF: # Relocation 61
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f4)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000022c)
// CHECK-ELF: # Relocation 62
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f8)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000022d)
// CHECK-ELF-NAMES: 244 R_AARCH64_TLSLE_LDST32_TPREL_LO12
// CHECK-ELF-NAMES: 248 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC
// CHECK-ELF-NEXT: 0xF4 R_AARCH64_TLSLE_LDST32_TPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0xF8 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC [[VARSYM]]
ldr x19, [x18, #:tprel_lo12:var]
str x17, [x16, #:tprel_lo12_nc:var]
@ -601,17 +343,8 @@
// CHECK-NEXT: str x17, [x16, #:tprel_lo12_nc:var] // encoding: [0x11'A',0x02'A',A,0xf9'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst64_tprel_lo12_nc
// CHECK-ELF: # Relocation 63
// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000fc)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000022e)
// CHECK-ELF: # Relocation 64
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000100)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x0000022f)
// CHECK-ELF-NAMES: 252 R_AARCH64_TLSLE_LDST64_TPREL_LO12
// CHECK-ELF-NAMES: 256 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC
// CHECK-ELF-NEXT: 0xFC R_AARCH64_TLSLE_LDST64_TPREL_LO12 [[VARSYM]]
// CHECK-ELF-NEXT: 0x100 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC [[VARSYM]]
// TLS descriptor forms
adrp x8, :tlsdesc:var
@ -631,32 +364,18 @@
// CHECK: blr x3 // encoding: [0x60,0x00,0x3f,0xd6]
// CHECK-ELF: # Relocation 65
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000104)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000232)
// CHECK-ELF: # Relocation 66
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000108)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000233)
// CHECK-ELF: # Relocation 67
// CHECK-ELF-NEXT: (('r_offset', 0x000000000000010c)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000234)
// CHECK-ELF: # Relocation 68
// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000110)
// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
// CHECK-ELF-NEXT: ('r_type', 0x00000239)
// CHECK-ELF-NAMES: 260 R_AARCH64_TLSDESC_ADR_PAGE
// CHECK-ELF-NAMES: 264 R_AARCH64_TLSDESC_LD64_LO12_NC
// CHECK-ELF-NAMES: 268 R_AARCH64_TLSDESC_ADD_LO12_NC
// CHECK-ELF-NAMES: 272 R_AARCH64_TLSDESC_CALL
// CHECK-ELF-NEXT: 0x104 R_AARCH64_TLSDESC_ADR_PAGE [[VARSYM]]
// CHECK-ELF-NEXT: 0x108 R_AARCH64_TLSDESC_LD64_LO12_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x10C R_AARCH64_TLSDESC_ADD_LO12_NC [[VARSYM]]
// CHECK-ELF-NEXT: 0x110 R_AARCH64_TLSDESC_CALL [[VARSYM]]
// Make sure symbol 5 has type STT_TLS:
// CHECK-ELF: # Symbol 5
// CHECK-ELF-NEXT: (('st_name', 0x00000006) # 'var'
// CHECK-ELF-NEXT: ('st_bind', 0x1)
// CHECK-ELF-NEXT: ('st_type', 0x6)
// CHECK-ELF: Symbols [
// CHECK-ELF: Symbol {
// CHECK-ELF: Name: var (6)
// CHECK-ELF-NEXT: Value:
// CHECK-ELF-NEXT: Size:
// CHECK-ELF-NEXT: Binding: Global
// CHECK-ELF-NEXT: Type: TLS

View File

@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -relocation-model=pic \
; RUN: -filetype=obj -o - | elf-dump --dump-section-data | FileCheck %s
; RUN: -filetype=obj -o - | llvm-readobj -r | FileCheck %s
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @f }]
@ -9,4 +9,5 @@ define void @f() {
}
; Check for a relocation of type R_ARM_TARGET1.
; CHECK: ('r_type', 0x26)
; CHECK: Relocations [
; CHECK: 0x{{[0-9,A-F]+}} R_ARM_TARGET1

View File

@ -1,8 +1,8 @@
;; RUN: llc -O0 -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \
;; RUN: elf-dump | FileCheck -check-prefix=ARM %s
;; RUN: llvm-readobj -t | FileCheck -check-prefix=ARM %s
;; RUN: llc -O0 -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \
;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=TMB %s
;; RUN: llvm-readobj -t | FileCheck -check-prefix=TMB %s
;; Ensure that if a jump table is generated that it has Mapping Symbols
;; marking the data-in-code region.
@ -108,68 +108,68 @@ exit:
ret void
}
;; ARM: # Symbol 2
;; ARM-NEXT: $a
;; ARM-NEXT: 'st_value', 0x00000000
;; ARM-NEXT: 'st_size', 0x00000000
;; ARM-NEXT: 'st_bind', 0x0
;; ARM-NEXT: 'st_type', 0x0
;; ARM-NEXT: 'st_other'
;; ARM-NEXT: 'st_shndx', [[MIXED_SECT:0x[0-9a-f]+]]
;; ARM: Symbol {
;; ARM: Name: $a
;; ARM-NEXT: Value: 0x0
;; ARM-NEXT: Size: 0
;; ARM-NEXT: Binding: Local
;; ARM-NEXT: Type: None
;; ARM-NEXT: Other:
;; ARM-NEXT: Section: [[MIXED_SECT:[^ ]+]]
;; ARM: # Symbol 3
;; ARM-NEXT: $a
;; ARM-NEXT: 'st_value', 0x000000ac
;; ARM-NEXT: 'st_size', 0x00000000
;; ARM-NEXT: 'st_bind', 0x0
;; ARM-NEXT: 'st_type', 0x0
;; ARM-NEXT: 'st_other'
;; ARM-NEXT: 'st_shndx', [[MIXED_SECT]]
;; ARM: Symbol {
;; ARM: Name: $a
;; ARM-NEXT: Value: 0xAC
;; ARM-NEXT: Size: 0
;; ARM-NEXT: Binding: Local
;; ARM-NEXT: Type: None
;; ARM-NEXT: Other:
;; ARM-NEXT: Section: [[MIXED_SECT]]
;; ARM: # Symbol 4
;; ARM-NEXT: $d
;; ARM-NEXT: 'st_value', 0x00000000
;; ARM-NEXT: 'st_size', 0x00000000
;; ARM-NEXT: 'st_bind', 0x0
;; ARM-NEXT: 'st_type', 0x0
;; ARM: Symbol {
;; ARM: Name: $d
;; ARM-NEXT: Value: 0
;; ARM-NEXT: Size: 0
;; ARM-NEXT: Binding: Local
;; ARM-NEXT: Type: None
;; ARM: # Symbol 5
;; ARM-NEXT: $d
;; ARM-NEXT: 'st_value', 0x00000030
;; ARM-NEXT: 'st_size', 0x00000000
;; ARM-NEXT: 'st_bind', 0x0
;; ARM-NEXT: 'st_type', 0x0
;; ARM-NEXT: 'st_other'
;; ARM-NEXT: 'st_shndx', [[MIXED_SECT]]
;; ARM: Symbol {
;; ARM: Name: $d
;; ARM-NEXT: Value: 0x30
;; ARM-NEXT: Size: 0
;; ARM-NEXT: Binding: Local
;; ARM-NEXT: Type: None
;; ARM-NEXT: Other:
;; ARM-NEXT: Section: [[MIXED_SECT]]
;; ARM-NOT: ${{[atd]}}
;; TMB: # Symbol 3
;; TMB-NEXT: $d
;; TMB-NEXT: 'st_value', 0x00000016
;; TMB-NEXT: 'st_size', 0x00000000
;; TMB-NEXT: 'st_bind', 0x0
;; TMB-NEXT: 'st_type', 0x0
;; TMB-NEXT: 'st_other'
;; TMB-NEXT: 'st_shndx', [[MIXED_SECT:0x[0-9a-f]+]]
;; TMB: Symbol {
;; TMB: Name: $d.2
;; TMB-NEXT: Value: 0x16
;; TMB-NEXT: Size: 0
;; TMB-NEXT: Binding: Local
;; TMB-NEXT: Type: None
;; TMB-NEXT: Other:
;; TMB-NEXT: Section: [[MIXED_SECT:[^ ]+]]
;; TMB: # Symbol 4
;; TMB-NEXT: $t
;; TMB-NEXT: 'st_value', 0x00000000
;; TMB-NEXT: 'st_size', 0x00000000
;; TMB-NEXT: 'st_bind', 0x0
;; TMB-NEXT: 'st_type', 0x0
;; TMB-NEXT: 'st_other'
;; TMB-NEXT: 'st_shndx', [[MIXED_SECT]]
;; TMB: Symbol {
;; TMB: Name: $t
;; TMB-NEXT: Value: 0x0
;; TMB-NEXT: Size: 0
;; TMB-NEXT: Binding: Local
;; TMB-NEXT: Type: None
;; TMB-NEXT: Other:
;; TMB-NEXT: Section: [[MIXED_SECT]]
;; TMB: # Symbol 5
;; TMB-NEXT: $t
;; TMB-NEXT: 'st_value', 0x00000036
;; TMB-NEXT: 'st_size', 0x00000000
;; TMB-NEXT: 'st_bind', 0x0
;; TMB-NEXT: 'st_type', 0x0
;; TMB-NEXT: 'st_other'
;; TMB-NEXT: 'st_shndx', [[MIXED_SECT]]
;; TMB: Symbol {
;; TMB: Name: $t
;; TMB-NEXT: Value: 0x36
;; TMB-NEXT: Size: 0
;; TMB-NEXT: Binding: Local
;; TMB-NEXT: Type: None
;; TMB-NEXT: Other:
;; TMB-NEXT: Section: [[MIXED_SECT]]
;; TMB-NOT: ${{[atd]}}

View File

@ -1,7 +1,7 @@
; Codegen version to check for ELF header flags.
;
; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \
; RUN: -filetype=obj -o - | llvm-readobj -h | \
; RUN: FileCheck %s
define void @bar() nounwind {
@ -10,4 +10,5 @@ entry:
}
; For now the only e_flag set is EF_ARM_EABI_VER5
;CHECK: 'e_flags', 0x05000000
; CHECK: ElfHeader {
; CHECK: Flags [ (0x5000000)

View File

@ -1,5 +1,5 @@
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
@ RUN: llvm-readobj -h | FileCheck -check-prefix=OBJ %s
.syntax unified
.text
.globl barf
@ -10,4 +10,5 @@ barf: @ @barf
b foo
@@@ make sure the EF_ARM_EABIMASK comes out OK
@OBJ: 'e_flags', 0x05000000
@OBJ: ElfHeader {
@OBJ: Flags [ (0x5000000)

View File

@ -1,6 +1,6 @@
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi | FileCheck -check-prefix=ASM %s
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
@ RUN: llvm-readobj -s -sd -sr | FileCheck -check-prefix=OBJ %s
.syntax unified
.text
.globl barf
@ -15,25 +15,24 @@ barf: @ @barf
@ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+8))
@@ make sure that the text section fixups are sane too
@ OBJ: '.text'
@ OBJ-NEXT: 'sh_type', 0x00000001
@ OBJ-NEXT: 'sh_flags', 0x00000006
@ OBJ-NEXT: 'sh_addr', 0x00000000
@ OBJ-NEXT: 'sh_offset', 0x00000034
@ OBJ-NEXT: 'sh_size', 0x00000008
@ OBJ-NEXT: 'sh_link', 0x00000000
@ OBJ-NEXT: 'sh_info', 0x00000000
@ OBJ-NEXT: 'sh_addralign', 0x00000004
@ OBJ-NEXT: 'sh_entsize', 0x00000000
@ OBJ-NEXT: '_section_data', 'f00f0fe3 f40f4fe3'
@ OBJ: Relocation 0
@ OBJ-NEXT: 'r_offset', 0x00000000
@ OBJ-NEXT: 'r_sym'
@ OBJ-NEXT: 'r_type', 0x2d
@ OBJ: Relocation 1
@ OBJ-NEXT: 'r_offset', 0x00000004
@ OBJ-NEXT: 'r_sym'
@ OBJ-NEXT: 'r_type', 0x2e
@ OBJ: Section {
@ OBJ: Name: .text
@ OBJ-NEXT: Type: SHT_PROGBITS
@ OBJ-NEXT: Flags [ (0x6)
@ OBJ-NEXT: SHF_ALLOC
@ OBJ-NEXT: SHF_EXECINSTR
@ OBJ-NEXT: ]
@ OBJ-NEXT: Address: 0x0
@ OBJ-NEXT: Offset: 0x34
@ OBJ-NEXT: Size: 8
@ OBJ-NEXT: Link: 0
@ OBJ-NEXT: Info: 0
@ OBJ-NEXT: AddressAlignment: 4
@ OBJ-NEXT: EntrySize: 0
@ OBJ-NEXT: Relocations [
@ OBJ-NEXT: 0x0 R_ARM_MOVW_PREL_NC
@ OBJ-NEXT: 0x4 R_ARM_MOVT_PREL
@ OBJ-NEXT: ]
@ OBJ-NEXT: SectionData (
@ OBJ-NEXT: 0000: F00F0FE3 F40F4FE3
@ OBJ-NEXT: )

View File

@ -1,7 +1,7 @@
;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \
;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \
;; RUN: -filetype=obj %s -o - | \
;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
;; FIXME: This file needs to be in .s form!
;; The args to llc are there to constrain the codegen only.
@ -60,11 +60,8 @@ bb3: ; preds = %bb, %entry
declare void @exit(i32) noreturn nounwind
;; OBJ: Relocation 1
;; OBJ-NEXT: 'r_offset',
;; OBJ-NEXT: 'r_sym', 0x000007
;; OBJ-NEXT: 'r_type', 0x2b
;; OBJ: Symbol 7
;; OBJ-NEXT: '_MergedGlobals'
;; OBJ-NEXT: 'st_value', 0x00000010
; OBJ: Relocations [
; OBJ: Section (1) .text {
; OBJ: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC _MergedGlobals
; OBJ: }
; OBJ: ]

View File

@ -1,7 +1,7 @@
;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \
;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \
;; RUN: -filetype=obj %s -o - | \
;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
;; FIXME: This file needs to be in .s form!
;; The args to llc are there to constrain the codegen only.
@ -41,10 +41,8 @@ declare i32 @write(...)
declare void @exit(i32) noreturn nounwind
;; OBJ: Relocation 0
;; OBJ-NEXT: 'r_offset',
;; OBJ-NEXT: 'r_sym', 0x000005
;; OBJ-NEXT: 'r_type', 0x2b
;; OBJ: Symbol 5
;; OBJ-NEXT: '.L.str'
;; OBJ: Relocations [
;; OBJ: Section (1) .text {
;; OBJ-NEXT: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC .L.str
;; OBJ: }
;; OBJ: ]

View File

@ -1,7 +1,7 @@
;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \
;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \
;; RUN: -filetype=obj %s -o - | \
;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
;; FIXME: This file needs to be in .s form!
;; The args to llc are there to constrain the codegen only.
@ -88,10 +88,8 @@ entry:
declare void @exit(i32) noreturn nounwind
;; OBJ: Relocation 1
;; OBJ-NEXT: 'r_offset',
;; OBJ-NEXT: 'r_sym', 0x000010
;; OBJ-NEXT: 'r_type', 0x2b
;; OBJ: Symbol 16
;; OBJ-NEXT: 'vtable'
;; OBJ: Relocations [
;; OBJ: Section (1) .text {
;; OBJ: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC vtable
;; OBJ: }
;; OBJ: ]

View File

@ -1,33 +1,18 @@
// RUN: llvm-mc -triple=armv7-linux-gnueabi -filetype=obj %s -o - | \
// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
bleq some_label
bl some_label
blx some_label
beq some_label
b some_label
// OBJ: .rel.text
// OBJ: 'r_offset', 0x00000000
// OBJ-NEXT: 'r_sym', 0x000005
// OBJ-NEXT: 'r_type', 0x1d
// OBJ: 'r_offset', 0x00000004
// OBJ-NEXT: 'r_sym', 0x000005
// OBJ-NEXT: 'r_type', 0x1c
// OBJ: 'r_offset', 0x00000008
// OBJ-NEXT: 'r_sym', 0x000005
// OBJ-NEXT: 'r_type', 0x1c
// OBJ: 'r_offset', 0x0000000c
// OBJ-NEXT: 'r_sym', 0x000005
// OBJ-NEXT: 'r_type', 0x1d
// OBJ: 'r_offset', 0x00000010
// OBJ-NEXT: 'r_sym', 0x000005
// OBJ-NEXT: 'r_type', 0x1d
// OBJ: .symtab
// OBJ: Symbol 5
// OBJ-NEXT: some_label
// OBJ: Relocations [
// OBJ-NEXT: Section (1) .text {
// OBJ-NEXT: 0x0 R_ARM_JUMP24 some_label 0x0
// OBJ-NEXT: 0x4 R_ARM_CALL some_label 0x0
// OBJ-NEXT: 0x8 R_ARM_CALL some_label 0x0
// OBJ-NEXT: 0xC R_ARM_JUMP24 some_label 0x0
// OBJ-NEXT: 0x10 R_ARM_JUMP24 some_label 0x0
// OBJ-NEXT: }
// OBJ-NEXT: ]

View File

@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \
; RUN: -filetype=obj -o - | llvm-readobj -s -sd -r -t | \
; RUN: FileCheck %s
; FIXME: This file needs to be in .s form!
@ -22,16 +22,20 @@ entry:
; make sure that bl 0 <foo> (fff7feff) is correctly encoded
; CHECK: '_section_data', '704700bf 2de90048 fff7feff bde80088'
; CHECK: Sections [
; CHECK: SectionData (
; CHECK: 0000: 704700BF 2DE90048 FFF7FEFF BDE80088
; CHECK: )
; CHECK: ]
; Offset Info Type Sym.Value Sym. Name
; 00000008 0000070a R_ARM_THM_CALL 00000001 foo
; CHECK: Relocation 0
; CHECK-NEXT: 'r_offset', 0x00000008
; CHECK-NEXT: 'r_sym', 0x000009
; CHECK-NEXT: 'r_type', 0x0a
; CHECK: Relocations [
; CHECK-NEXT: Section (1) .text {
; CHECK-NEXT: 0x8 R_ARM_THM_CALL foo 0x0
; CHECK-NEXT: }
; CHECK-NEXT: ]
; make sure foo is thumb function: bit 0 = 1
; CHECK: Symbol 9
; CHECK-NEXT: 'foo'
; CHECK-NEXT: 'st_value', 0x00000001
; CHECK: Symbols [
; CHECK: Symbol {
; CHECK: Name: foo
; CHECK-NEXT: Value: 0x1

View File

@ -1,6 +1,6 @@
@@ test st_value bit 0 of thumb function
@ RUN: llvm-mc %s -triple=arm-freebsd-eabi -filetype=obj -o - | \
@ RUN: elf-dump | FileCheck %s
@ RUN: llvm-readobj -r | FileCheck %s
.syntax unified
@ -17,7 +17,8 @@ f:
pop {r7, pc}
@@ make sure an R_ARM_THM_CALL relocation is generated for the call to g
@CHECK: ('_relocations', [
@CHECK: (('r_offset', 0x00000004)
@CHECK-NEXT: ('r_sym', 0x{{[0-9a-fA-F]+}})
@CHECK-NEXT: ('r_type', 0x0a)
@CHECK: Relocations [
@CHECK-NEXT: Section (1) .text {
@CHECK-NEXT: 0x4 R_ARM_THM_CALL g 0x0
@CHECK-NEXT: }
@CHECK-NEXT: ]

View File

@ -1,6 +1,6 @@
@@ test st_value bit 0 of thumb function
@ RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi -filetype=obj -o - | \
@ RUN: elf-dump | FileCheck %s
@ RUN: llvm-readobj -t | FileCheck %s
.syntax unified
.text
.globl foo
@ -12,9 +12,9 @@ foo:
bx lr
@@ make sure foo is thumb function: bit 0 = 1 (st_value)
@CHECK: Symbol 5
@CHECK-NEXT: 'st_name', 0x00000001
@CHECK-NEXT: 'st_value', 0x00000001
@CHECK-NEXT: 'st_size', 0x00000000
@CHECK-NEXT: 'st_bind', 0x1
@CHECK-NEXT: 'st_type', 0x2
@CHECK: Symbol {
@CHECK: Name: foo
@CHECK-NEXT: Value: 0x1
@CHECK-NEXT: Size: 0
@CHECK-NEXT: Binding: Global
@CHECK-NEXT: Type: Function

View File

@ -2,7 +2,7 @@
; RUN: FileCheck -check-prefix=ASM %s
; RUN: llc %s -mtriple=thumbv5-linux-gnueabi -filetype=obj \
; RUN: -mcpu=xscale -o - | elf-dump --dump-section-data | \
; RUN: -mcpu=xscale -o - | llvm-readobj -s -sd | \
; RUN: FileCheck -check-prefix=OBJ %s
; FIXME: The OBJ test should be a .s to .o test and the ASM test should
@ -17,15 +17,22 @@ entry:
; ASM-NEXT: .eabi_attribute 8, 1
; ASM-NEXT: .eabi_attribute 9, 1
; OBJ: Section 4
; OBJ-NEXT: 'sh_name', 0x0000000c
; OBJ-NEXT: 'sh_type', 0x70000003
; OBJ-NEXT: 'sh_flags', 0x00000000
; OBJ-NEXT: 'sh_addr', 0x00000000
; OBJ-NEXT: 'sh_offset', 0x00000038
; OBJ-NEXT: 'sh_size', 0x00000020
; OBJ-NEXT: 'sh_link', 0x00000000
; OBJ-NEXT: 'sh_info', 0x00000000
; OBJ-NEXT: 'sh_addralign', 0x00000001
; OBJ-NEXT: 'sh_entsize', 0x00000000
; OBJ-NEXT: '_section_data', '411f0000 00616561 62690001 15000000 06050801 09011401 15011703 18011901'
; OBJ: Sections [
; OBJ: Section {
; OBJ: Index: 4
; OBJ-NEXT: Name: .ARM.attributes (12)
; OBJ-NEXT: Type: SHT_ARM_ATTRIBUTES
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
; OBJ-NEXT: Address: 0x0
; OBJ-NEXT: Offset: 0x38
; OBJ-NEXT: Size: 32
; OBJ-NEXT: Link: 0
; OBJ-NEXT: Info: 0
; OBJ-NEXT: AddressAlignment: 1
; OBJ-NEXT: EntrySize: 0
; OBJ-NEXT: SectionData (
; OBJ-NEXT: 0000: 411F0000 00616561 62690001 15000000
; OBJ-NEXT: 0010: 06050801 09011401 15011703 18011901
; OBJ-NEXT: )
; OBJ-NEXT: }

View File

@ -1,5 +1,5 @@
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s
# RUN: elf-dump --dump-section-data < %t | FileCheck %s
# RUN: llvm-readobj -s -sd < %t | FileCheck %s
.section test1
.byte 1
.section test2
@ -45,63 +45,85 @@
.previous
.byte 1
.previous
# CHECK: (('sh_name', 0x00000044) # 'test1'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK-NEXT: ('sh_flags', 0x00000000)
# CHECK-NEXT: ('sh_addr', 0x00000000)
# CHECK-NEXT: ('sh_offset', 0x00000034)
# CHECK-NEXT: ('sh_size', 0x00000007)
# CHECK-NEXT: ('sh_link', 0x00000000)
# CHECK-NEXT: ('sh_info', 0x00000000)
# CHECK-NEXT: ('sh_addralign', 0x00000001)
# CHECK-NEXT: ('sh_entsize', 0x00000000)
# CHECK-NEXT: ('_section_data', '01010101 010101')
# CHECK-NEXT: ),
# CHECK: (('sh_name', 0x0000003e) # 'test2'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK-NEXT: ('sh_flags', 0x00000000)
# CHECK-NEXT: ('sh_addr', 0x00000000)
# CHECK-NEXT: ('sh_offset', 0x0000003b)
# CHECK-NEXT: ('sh_size', 0x00000006)
# CHECK-NEXT: ('sh_link', 0x00000000)
# CHECK-NEXT: ('sh_info', 0x00000000)
# CHECK-NEXT: ('sh_addralign', 0x00000001)
# CHECK-NEXT: ('sh_entsize', 0x00000000)
# CHECK-NEXT: ('_section_data', '02020202 0202')
# CHECK-NEXT: ),
# CHECK: (('sh_name', 0x00000038) # 'test3'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK-NEXT: ('sh_flags', 0x00000000)
# CHECK-NEXT: ('sh_addr', 0x00000000)
# CHECK-NEXT: ('sh_offset', 0x00000041)
# CHECK-NEXT: ('sh_size', 0x00000005)
# CHECK-NEXT: ('sh_link', 0x00000000)
# CHECK-NEXT: ('sh_info', 0x00000000)
# CHECK-NEXT: ('sh_addralign', 0x00000001)
# CHECK-NEXT: ('sh_entsize', 0x00000000)
# CHECK-NEXT: ('_section_data', '03030303 03')
# CHECK-NEXT: ),
# CHECK: (('sh_name', 0x00000032) # 'test4'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK-NEXT: ('sh_flags', 0x00000000)
# CHECK-NEXT: ('sh_addr', 0x00000000)
# CHECK-NEXT: ('sh_offset', 0x00000046)
# CHECK-NEXT: ('sh_size', 0x00000003)
# CHECK-NEXT: ('sh_link', 0x00000000)
# CHECK-NEXT: ('sh_info', 0x00000000)
# CHECK-NEXT: ('sh_addralign', 0x00000001)
# CHECK-NEXT: ('sh_entsize', 0x00000000)
# CHECK-NEXT: ('_section_data', '040404')
# CHECK-NEXT: ),
# CHECK: (('sh_name', 0x0000002c) # 'test5'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK-NEXT: ('sh_flags', 0x00000000)
# CHECK-NEXT: ('sh_addr', 0x00000000)
# CHECK-NEXT: ('sh_offset', 0x00000049)
# CHECK-NEXT: ('sh_size', 0x00000001)
# CHECK-NEXT: ('sh_link', 0x00000000)
# CHECK-NEXT: ('sh_info', 0x00000000)
# CHECK-NEXT: ('sh_addralign', 0x00000001)
# CHECK-NEXT: ('sh_entsize', 0x00000000)
# CHECK-NEXT: ('_section_data', '05')
# CHECK-NEXT: ),
# CHECK: Sections [
# CHECK: Section {
# CHECK: Name: test1 (68)
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
# CHECK-NEXT: Offset: 0x34
# CHECK-NEXT: Size: 7
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 01010101 010101
# CHECK-NEXT: )
# CHECK-NEXT: }
# CHECK: Section {
# CHECK: Name: test2 (62)
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
# CHECK-NEXT: Offset: 0x3B
# CHECK-NEXT: Size: 6
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 02020202 0202
# CHECK-NEXT: )
# CHECK-NEXT: }
# CHECK: Section {
# CHECK: Name: test3 (56)
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
# CHECK-NEXT: Offset: 0x41
# CHECK-NEXT: Size: 5
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 03030303 03
# CHECK-NEXT: )
# CHECK-NEXT: }
# CHECK: Section {
# CHECK: Name: test4 (50)
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
# CHECK-NEXT: Offset: 0x46
# CHECK-NEXT: Size: 3
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 040404
# CHECK-NEXT: )
# CHECK-NEXT: }
# CHECK: Section {
# CHECK: Name: test5 (44)
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x0
# CHECK-NEXT: Offset: 0x49
# CHECK-NEXT: Size: 1
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 05
# CHECK-NEXT: )
# CHECK-NEXT: }

View File

@ -1,5 +1,5 @@
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s
# RUN: elf-dump --dump-section-data < %t | FileCheck %s
# RUN: llvm-readobj -s < %t | FileCheck %s
.section .nobits
.byte 1
.section .nobits2
@ -30,33 +30,33 @@
.byte 1
.section .notefoo
.byte 1
# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits2'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.nobitsfoo'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array'
# CHECK-NEXT: ('sh_type', 0x0000000e)
# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array2'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.init_arrayfoo'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array'
# CHECK-NEXT: ('sh_type', 0x0000000f)
# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array2'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_arrayfoo'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array'
# CHECK-NEXT: ('sh_type', 0x00000010)
# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array2'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_arrayfoo'
# CHECK-NEXT: ('sh_type', 0x00000001)
# CHECK: (('sh_name', 0x00000{{...}}) # '.note'
# CHECK-NEXT: ('sh_type', 0x00000007)
# CHECK: (('sh_name', 0x00000{{...}}) # '.note2'
# CHECK-NEXT: ('sh_type', 0x00000007)
#CHECK: (('sh_name', 0x00000{{...}}) # '.notefoo'
# CHECK-NEXT: ('sh_type', 0x00000007)
# CHECK: Name: .nobits
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .nobits2
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .nobitsfoo
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .init_array
# CHECK-NEXT: Type: SHT_INIT_ARRAY
# CHECK: Name: .init_array2
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .init_arrayfoo
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .fini_array
# CHECK-NEXT: Type: SHT_FINI_ARRAY
# CHECK: Name: .fini_array2
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .fini_arrayfoo
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .preinit_array
# CHECK-NEXT: Type: SHT_PREINIT_ARRAY
# CHECK: Name: .preinit_array2
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .preinit_arrayfoo
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK: Name: .note
# CHECK-NEXT: Type: SHT_NOTE
# CHECK: Name: .note2
# CHECK-NEXT: Type: SHT_NOTE
# CHECK: Name: .notefoo
# CHECK-NEXT: Type: SHT_NOTE

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s
// Test that we get optimal nops in text
.text
@ -15,36 +15,40 @@ f0:
.long 0
.align 8
//CHECK: Name = .text
//CHECK-NEXT: VirtualSize
//CHECK-NEXT: VirtualAddress
//CHECK-NEXT: SizeOfRawData = 16
//CHECK-NEXT: PointerToRawData
//CHECK-NEXT: PointerToRelocations
//CHECK-NEXT: PointerToLineNumbers
//CHECK-NEXT: NumberOfRelocations
//CHECK-NEXT: NumberOfLineNumbers
//CHECK-NEXT: Charateristics = 0x60400020
//CHECK-NEXT: IMAGE_SCN_CNT_CODE
//CHECK: Name: .text
//CHECK-NEXT: VirtualSize
//CHECK-NEXT: VirtualAddress
//CHECK-NEXT: RawDataSize: 16
//CHECK-NEXT: PointerToRawData
//CHECK-NEXT: PointerToRelocations
//CHECK-NEXT: PointerToLineNumbers
//CHECK-NEXT: RelocationCount
//CHECK-NEXT: LineNumberCount
//CHECK-NEXT: Characteristics [ (0x60400020)
//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
//CHECK-NEXT: IMAGE_SCN_CNT_CODE
//CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE
//CHECK-NEXT: IMAGE_SCN_MEM_READ
//CHECK-NEXT: SectionData =
//CHECK-NEXT: 00 00 00 00 0F 1F 40 00 - 00 00 00 00 0F 1F 40 00
//CHECK-NEXT: ]
//CHECK-NEXT: SectionData (
//CHECK-NEXT: 0000: 00000000 0F1F4000 00000000 0F1F4000
//CHECK-NEXT: )
//CHECK: Name = .data
//CHECK-NEXT: VirtualSize
//CHECK-NEXT: VirtualAddress
//CHECK-NEXT: SizeOfRawData = 16
//CHECK-NEXT: PointerToRawData
//CHECK-NEXT: PointerToRelocations
//CHECK-NEXT: PointerToLineNumbers
//CHECK-NEXT: NumberOfRelocations
//CHECK-NEXT: NumberOfLineNumbers
//CHECK-NEXT: Charateristics = 0xC0400040
//CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
//CHECK-NEXT: IMAGE_SCN_MEM_READ
//CHECK-NEXT: IMAGE_SCN_MEM_WRITE
//CHECK-NEXT: SectionData =
//CHECK-NEXT: 00 00 00 00 90 90 90 90 - 00 00 00 00 00 00 00 00
//CHECK: Name: .data
//CHECK-NEXT: VirtualSize:
//CHECK-NEXT: VirtualAddress:
//CHECK-NEXT: RawDataSize: 16
//CHECK-NEXT: PointerToRawData:
//CHECK-NEXT: PointerToRelocations:
//CHECK-NEXT: PointerToLineNumbers:
//CHECK-NEXT: RelocationCount:
//CHECK-NEXT: LineNumberCount:
//CHECK-NEXT: Characteristics [ (0xC0400040)
//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
//CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
//CHECK-NEXT: IMAGE_SCN_MEM_READ
//CHECK-NEXT: IMAGE_SCN_MEM_WRITE
//CHECK-NEXT: ]
//CHECK-NEXT: SectionData (
//CHECK-NEXT: 0000: 00000000 90909090 00000000 00000000
//CHECK-NEXT: )

View File

@ -0,0 +1,137 @@
// This test checks that the COFF object emitter works for the most basic
// programs.
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
.def _main;
.scl 2;
.type 32;
.endef
.text
.globl _main
.align 16, 0x90
_main: # @main
# BB#0: # %entry
subl $4, %esp
movl $.L_.str, (%esp)
call _printf
xorl %eax, %eax
addl $4, %esp
ret
.data
.L_.str: # @.str
.asciz "Hello World"
// CHECK: ImageFileHeader {
// CHECK: Machine: IMAGE_FILE_MACHINE_AMD64
// CHECK: SectionCount: 2
// CHECK: TimeDateStamp: {{[0-9]+}}
// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
// CHECK: SymbolCount: 6
// CHECK: OptionalHeaderSize: 0
// CHECK: Characteristics [ (0x0)
// CHECK: ]
// CHECK: }
// CHECK: Sections [
// CHECK: Section {
// CHECK: Number: [[TextNum:[0-9]+]]
// CHECK: Name: .text
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: [[TextSize:[0-9]+]]
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 2
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0x60500020)
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_CNT_CODE
// CHECK: IMAGE_SCN_MEM_EXECUTE
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: ]
// CHECK: Relocations [
// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_AMD64_ADDR32 .data
// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_AMD64_REL32 _printf
// CHECK: ]
// CHECK: }
// CHECK: Section {
// CHECK: Number: [[DataNum:[0-9]+]]
// CHECK: Name: .data
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: [[DataSize:[0-9]+]]
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x0
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0xC0300040)
// CHECK: IMAGE_SCN_ALIGN_4BYTES
// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: IMAGE_SCN_MEM_WRITE
// CHECK: ]
// CHECK: Relocations [
// CHECK: ]
// CHECK: SectionData (
// CHECK: 0000: 48656C6C 6F20576F 726C6400 |Hello World.|
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: .text
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: [[TextSize]]
// CHECK: RelocationCount: 2
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: [[TextNum]]
// CHECK: Selection: 0x0
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: .data
// CHECK: Value: 0
// CHECK: Section: .data
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: [[DataSize]]
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: [[DataNum]]
// CHECK: Selection: 0x0
// CHECK: Unused: (00 00 00)
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _main
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Function
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _printf
// CHECK: Value: 0
// CHECK: Section: (0)
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: ]

View File

@ -1,8 +1,7 @@
// This test checks that the COFF object emitter works for the most basic
// programs.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
.def _main;
.scl 2;
@ -15,119 +14,124 @@ _main: # @main
# BB#0: # %entry
subl $4, %esp
movl $L_.str, (%esp)
calll _printf
call _printf
xorl %eax, %eax
addl $4, %esp
ret
.data
L_.str: # @.str
.asciz "Hello World"
.asciz "Hello World"
// CHECK: {
// CHECK: MachineType = IMAGE_FILE_MACHINE_I386 (0x14C)
// CHECK: NumberOfSections = 2
// CHECK: TimeDateStamp = {{[0-9]+}}
// CHECK: PointerToSymbolTable = 0x{{[0-9A-F]+}}
// CHECK: NumberOfSymbols = 6
// CHECK: SizeOfOptionalHeader = 0
// CHECK: Characteristics = 0x0
// CHECK: Sections = [
// CHECK: 1 = {
// CHECK: Name = .text
// CHECK: VirtualSize = 0
// CHECK: VirtualAddress = 0
// CHECK: SizeOfRawData = {{[0-9]+}}
// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations = 0x{{[0-9A-F]+}}
// CHECK: PointerToLineNumbers = 0x0
// CHECK: NumberOfRelocations = 2
// CHECK: NumberOfLineNumbers = 0
// CHECK: Charateristics = 0x60500020
// CHECK: IMAGE_SCN_CNT_CODE
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_MEM_EXECUTE
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: SectionData =
// CHECK: Relocations = [
// CHECK: 0 = {
// CHECK: VirtualAddress = 0x{{[0-9A-F]+}}
// CHECK: SymbolTableIndex = 2
// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
// CHECK: SymbolName = .data
// CHECK: }
// CHECK: 1 = {
// CHECK: VirtualAddress = 0x{{[0-9A-F]+}}
// CHECK: SymbolTableIndex = 5
// CHECK: Type = IMAGE_REL_I386_REL32 (20)
// CHECK: SymbolName = _printf
// CHECK: }
// CHECK: ]
// CHECK: }
// CHECK: 2 = {
// CHECK: Name = .data
// CHECK: VirtualSize = 0
// CHECK: VirtualAddress = 0
// CHECK: SizeOfRawData = {{[0-9]+}}
// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations = 0x0
// CHECK: PointerToLineNumbers = 0x0
// CHECK: NumberOfRelocations = 0
// CHECK: NumberOfLineNumbers = 0
// CHECK: Charateristics = 0xC0300040
// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK: IMAGE_SCN_ALIGN_4BYTES
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: IMAGE_SCN_MEM_WRITE
// CHECK: SectionData =
// CHECK: 48 65 6C 6C 6F 20 57 6F - 72 6C 64 00 |Hello World.|
// CHECK: Relocations = None
// CHECK: }
// CHECK: ]
// CHECK: Symbols = [
// CHECK: 0 = {
// CHECK: Name = .text
// CHECK: Value = 0
// CHECK: SectionNumber = 1
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
// CHECK: NumberOfAuxSymbols = 1
// CHECK: AuxillaryData =
// CHECK: 15 00 00 00 02 00 00 00 - 00 00 00 00 01 00 00 00 |................|
// CHECK: 00 00 |..|
// CHECK: }
// CHECK: 2 = {
// CHECK: Name = .data
// CHECK: Value = 0
// CHECK: SectionNumber = 2
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
// CHECK: NumberOfAuxSymbols = 1
// CHECK: AuxillaryData =
// CHECK: 0C 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |................|
// CHECK: 00 00 |..|
// CHECK: }
// CHECK: 4 = {
// CHECK: Name = _main
// CHECK: Value = 0
// CHECK: SectionNumber = 1
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_FUNCTION (2)
// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK: NumberOfAuxSymbols = 0
// CHECK: AuxillaryData =
// CHECK: }
// CHECK: 5 = {
// CHECK: Name = _printf
// CHECK: Value = 0
// CHECK: SectionNumber = 0
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK: NumberOfAuxSymbols = 0
// CHECK: AuxillaryData =
// CHECK: }
// CHECK: ImageFileHeader {
// CHECK: Machine: IMAGE_FILE_MACHINE_I386
// CHECK: SectionCount: 2
// CHECK: TimeDateStamp: {{[0-9]+}}
// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
// CHECK: SymbolCount: 6
// CHECK: OptionalHeaderSize: 0
// CHECK: Characteristics [ (0x0)
// CHECK: ]
// CHECK: }
// CHECK: Sections [
// CHECK: Section {
// CHECK: Number: [[TextNum:[0-9]+]]
// CHECK: Name: .text
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: {{[0-9]+}}
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 2
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0x60500020)
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_CNT_CODE
// CHECK: IMAGE_SCN_MEM_EXECUTE
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: ]
// CHECK: Relocations [
// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_I386_DIR32 .data
// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_I386_REL32 _printf
// CHECK: ]
// CHECK: }
// CHECK: Section {
// CHECK: Number: [[DataNum:[0-9]+]]
// CHECK: Name: .data
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: {{[0-9]+}}
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x0
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0xC0300040)
// CHECK: IMAGE_SCN_ALIGN_4BYTES
// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: IMAGE_SCN_MEM_WRITE
// CHECK: ]
// CHECK: Relocations [
// CHECK: ]
// CHECK: SectionData (
// CHECK: 0000: 48656C6C 6F20576F 726C6400 |Hello World.|
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: .text
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: 21
// CHECK: RelocationCount: 2
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: 1
// CHECK: Selection: 0x0
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: .data
// CHECK: Value: 0
// CHECK: Section: .data
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: 12
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: 2
// CHECK: Selection: 0x0
// CHECK: Unused: (00 00 00)
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _main
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Function
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _printf
// CHECK: Value: 0
// CHECK: Section: (0)
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: ]

View File

@ -1,7 +1,7 @@
// The purpose of this test is to verify that bss sections are emited correctly.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s
.bss
.globl _g0
@ -9,7 +9,7 @@
_g0:
.long 0
// CHECK: Name = .bss
// CHECK-NEXT: VirtualSize = 0
// CHECK-NEXT: VirtualAddress = 0
// CHECK-NEXT: SizeOfRawData = 4
// CHECK: Name: .bss
// CHECK-NEXT: VirtualSize: 0
// CHECK-NEXT: VirtualAddress: 0
// CHECK-NEXT: RawDataSize: 4

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | llvm-readobj -s -sr -sd | FileCheck %s
.def _foobar;
.scl 2;
@ -21,26 +21,12 @@ _rust_crate:
.long _foobar-_rust_crate
.long _foobar-_rust_crate
// CHECK: Name = .data
// CHECK: SectionData =
// CHECK-NEXT: 00 00 00 00 00 00 00 00 - 1C 00 00 00 20 00 00 00 |............ ...|
// CHECK: Relocations = [
// CHECK-NEXT: 0 = {
// CHECK-NEXT: VirtualAddress = 0x4
// CHECK-NEXT: SymbolTableIndex =
// CHECK-NEXT: Type = IMAGE_REL_I386_DIR32 (6)
// CHECK-NEXT: SymbolName = _foobar
// CHECK-NEXT: }
// CHECK-NEXT: 1 = {
// CHECK-NEXT: VirtualAddress = 0x8
// CHECK-NEXT: SymbolTableIndex = 0
// CHECK-NEXT: Type = IMAGE_REL_I386_REL32 (20)
// CHECK-NEXT: SymbolName = .text
// CHECK-NEXT: }
// CHECK-NEXT: 2 = {
// CHECK-NEXT: VirtualAddress = 0xC
// CHECK-NEXT: SymbolTableIndex = 0
// CHECK-NEXT: Type = IMAGE_REL_I386_REL32 (20)
// CHECK-NEXT: SymbolName = .text
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK: Name: .data
// CHECK: Relocations [
// CHECK-NEXT: 0x4 IMAGE_REL_I386_DIR32 _foobar
// CHECK-NEXT: 0x8 IMAGE_REL_I386_REL32 .text
// CHECK-NEXT: 0xC IMAGE_REL_I386_REL32 .text
// CHECK-NEXT: ]
// CHECK: SectionData (
// CHECK-NEXT: 0000: 00000000 00000000 1C000000 20000000
// CHECK-NEXT: )

View File

@ -1,26 +1,28 @@
; The purpose of this test is to verify that various module level assembly
; constructs work.
; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | coff-dump.py | FileCheck %s
; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s
; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s
module asm ".text"
module asm "_foo:"
module asm " ret"
; CHECK: Name = .text
; CHECK-NEXT: VirtualSize = 0
; CHECK-NEXT: VirtualAddress = 0
; CHECK-NEXT: SizeOfRawData = {{[0-9]+}}
; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}}
; CHECK-NEXT: PointerToRelocations = 0x{{[0-9A-F]+}}
; CHECK-NEXT: PointerToLineNumbers = 0x0
; CHECK-NEXT: NumberOfRelocations = 0
; CHECK-NEXT: NumberOfLineNumbers = 0
; CHECK-NEXT: Charateristics = 0x60300020
; CHECK-NEXT: IMAGE_SCN_CNT_CODE
; CHECK: Name: .text
; CHECK-NEXT: VirtualSize: 0
; CHECK-NEXT: VirtualAddress: 0
; CHECK-NEXT: RawDataSize: {{[0-9]+}}
; CHECK-NEXT: PointerToRawData: 0x{{[0-9A-F]+}}
; CHECK-NEXT: PointerToRelocations: 0x{{[0-9A-F]+}}
; CHECK-NEXT: PointerToLineNumbers: 0x0
; CHECK-NEXT: RelocationCount: 0
; CHECK-NEXT: LineNumberCount: 0
; CHECK-NEXT: Characteristics [ (0x60300020)
; CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
; CHECK-NEXT: IMAGE_SCN_CNT_CODE
; CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE
; CHECK-NEXT: IMAGE_SCN_MEM_READ
; CHECK-NEXT: SectionData =
; CHECK-NEXT: C3
; CHECK-NEXT: ]
; CHECK-NEXT: SectionData (
; CHECK-NEXT: 0000: C3
; CHECK-NEXT: )

View File

@ -1,14 +1,10 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s -sr | FileCheck %s
// check that we produce the correct relocation for .secrel32
Lfoo:
.secrel32 Lfoo
// CHECK: Relocations = [
// CHECK-NEXT: 0 = {
// CHECK-NEXT: VirtualAddress = 0x0
// CHECK-NEXT: SymbolTableIndex = 0
// CHECK-NEXT: Type = IMAGE_REL_I386_SECREL (11)
// CHECK-NEXT: SymbolName = .text
// CHECK-NEXT: }
// CHECK: Relocations [
// CHECK-NEXT: 0x0 IMAGE_REL_I386_SECREL .text
// CHECK-NEXT: ]

View File

@ -1,24 +1,26 @@
// This test ensures that, if the section containing a function has a suffix
// (e.g. .text$foo), its unwind info section also has a suffix (.xdata$foo).
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s
// XFAIL: *
// CHECK: Name = .xdata$foo
// CHECK: Name: .xdata$foo
// CHECK-NEXT: VirtualSize
// CHECK-NEXT: VirtualAddress
// CHECK-NEXT: SizeOfRawData = 8
// CHECK-NEXT: RawDataSize: 8
// CHECK-NEXT: PointerToRawData
// CHECK-NEXT: PointerToRelocations
// CHECK-NEXT: PointerToLineNumbers
// CHECK-NEXT: NumberOfRelocations = 0
// CHECK-NEXT: NumberOfLineNumbers = 0
// CHECK-NEXT: Charateristics
// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK-NEXT: RelocationCount: 0
// CHECK-NEXT: LineNumberCount: 0
// CHECK-NEXT: Characteristics [
// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK-NEXT: IMAGE_SCN_MEM_READ
// CHECK-NEXT: IMAGE_SCN_MEM_WRITE
// CHECK-NEXT: SectionData
// CHECK-NEXT: 01 05 02 00 05 50 04 02
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 01050200 05500402
// CHECK-NEXT: )
.section .text$foo,"x"
.globl foo

View File

@ -1,24 +1,105 @@
// This test checks that the SEH directives emit the correct unwind data.
// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | coff-dump.py | FileCheck %s
// CHECK: Name = .xdata
// CHECK-NEXT: VirtualSize
// CHECK-NEXT: VirtualAddress
// CHECK-NEXT: SizeOfRawData = 52
// CHECK-NEXT: PointerToRawData
// CHECK-NEXT: PointerToRelocations
// CHECK-NEXT: PointerToLineNumbers
// CHECK-NEXT: NumberOfRelocations = 4
// CHECK-NEXT: NumberOfLineNumbers = 0
// CHECK-NEXT: Charateristics
// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
// CHECK-NEXT: IMAGE_SCN_MEM_READ
// CHECK-NEXT: SectionData
// CHECK-NEXT: 09 12 08 03 00 03 0F 30 - 0E 88 00 00 09 64 02 00
// CHECK-NEXT: 04 22 00 1A 00 00 00 00 - 00 00 00 00 21 00 00 00
// CHECK-NEXT: 00 00 00 00 1B 00 00 00 - 00 00 00 00 01 00 00 00
// CHECK-NEXT: 00 00 00 00
// TODO: Expected fail because SET_FPREG has a wrong offset.
// XFAIL: *
// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -s -u | FileCheck %s
// CHECK: Sections [
// CHECK: Section {
// CHECK: Name: .text
// CHECK: RelocationCount: 0
// CHECK: Characteristics [
// CHECK-NEXT: ALIGN_4BYTES
// CHECK-NEXT: CNT_CODE
// CHECK-NEXT: MEM_EXECUTE
// CHECK-NEXT: MEM_READ
// CHECK-NEXT: ]
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .xdata
// CHECK: RawDataSize: 52
// CHECK: RelocationCount: 4
// CHECK: Characteristics [
// CHECK-NEXT: ALIGN_4BYTES
// CHECK-NEXT: CNT_INITIALIZED_DATA
// CHECK-NEXT: MEM_READ
// CHECK-NEXT: ]
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .pdata
// CHECK: RelocationCount: 9
// CHECK: Characteristics [
// CHECK-NEXT: ALIGN_4BYTES
// CHECK-NEXT: CNT_INITIALIZED_DATA
// CHECK-NEXT: MEM_READ
// CHECK-NEXT: ]
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK: UnwindInformation [
// CHECK-NEXT: RuntimeFunction {
// CHECK-NEXT: StartAddress: [[CodeSect1:[^ ]+]] [[BeginDisp1:(\+0x[A-F0-9]+)?]]
// CHECK-NEXT: EndAddress: [[CodeSect1]] [[EndDisp1:(\+0x[A-F0-9]+)?]]
// CHECK-NEXT: UnwindInfoAddress:
// CHECK-NEXT: UnwindInfo {
// CHECK-NEXT: Version: 1
// CHECK-NEXT: Flags [
// CHECK-NEXT: ExceptionHandler
// CHECK-NEXT: ]
// CHECK-NEXT: PrologSize: 18
// CHECK-NEXT: FrameRegister: RBX
// CHECK-NEXT: FrameOffset: 0x0
// CHECK-NEXT: UnwindCodeCount: 8
// CHECK-NEXT: UnwindCodes [
// CHECK-NEXT: 0x12: SET_FPREG reg=RBX, offset=0x0
// CHECK-NEXT: 0x0F: PUSH_NONVOL reg=RBX
// CHECK-NEXT: 0x0E: SAVE_XMM128 reg=XMM8, offset=0x0
// CHECK-NEXT: 0x09: SAVE_NONVOL reg=RSI, offset=0x10
// CHECK-NEXT: 0x04: ALLOC_SMALL size=24
// CHECK-NEXT: 0x00: PUSH_MACHFRAME errcode=yes
// CHECK-NEXT: ]
// CHECK-NEXT: Handler: __C_specific_handler
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: RuntimeFunction {
// CHECK-NEXT: StartAddress: [[CodeSect2:[^ ]+]] [[BeginDisp2:(\+0x[A-F0-9]+)?]]
// CHECK-NEXT: EndAddress: [[CodeSect2]] [[BeginDisp2:(\+0x[A-F0-9]+)?]]
// CHECK-NEXT: UnwindInfoAddress:
// CHECK-NEXT: UnwindInfo {
// CHECK-NEXT: Version: 1
// CHECK-NEXT: Flags [
// CHECK-NEXT: ChainInfo
// CHECK-NEXT: ]
// CHECK-NEXT: PrologSize: 0
// CHECK-NEXT: FrameRegister: -
// CHECK-NEXT: FrameOffset: -
// CHECK-NEXT: UnwindCodeCount: 0
// CHECK-NEXT: UnwindCodes [
// CHECK-NEXT: ]
// CHECK-NEXT: Chained {
// CHECK-NEXT: StartAddress: [[CodeSect1]] [[BeginDisp1]]
// CHECK-NEXT: EndAddress: [[CodeSect1]] [[EndDisp1]]
// CHECK-NEXT: UnwindInfoAddress:
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: RuntimeFunction {
// CHECK-NEXT: StartAddress: [[CodeSect3:[^ ]+]] [[BeginDisp3:(\+0x[A-F0-9]+)?]]
// CHECK-NEXT: EndAddress: [[CodeSect3]] [[BeginDisp3:(\+0x[A-F0-9]+)?]]
// CHECK-NEXT: UnwindInfoAddress:
// CHECK-NEXT: UnwindInfo {
// CHECK-NEXT: Version: 1
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: PrologSize: 0
// CHECK-NEXT: FrameRegister: -
// CHECK-NEXT: FrameOffset: -
// CHECK-NEXT: UnwindCodeCount: 0
// CHECK-NEXT: UnwindCodes [
// CHECK-NEXT: ]
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: ]
.text
.globl func

View File

@ -1,8 +1,8 @@
// The purpose of this test is to verify that we do not produce unneeded
// relocations when symbols are in the same section and we know their offset.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s
.def _foo;
.scl 2;
@ -41,10 +41,9 @@ _baz: # @baz
# BB#0: # %e
subl $4, %esp
Ltmp0:
calll _baz
call _baz
addl $4, %esp
ret
// CHECK: Sections = [
// CHECK-NOT: NumberOfRelocations = {{[^0]}}
// CHECK: Symbols = [
// CHECK: Sections [
// CHECK-NOT: RelocationCount: {{[^0]}}

View File

@ -1,9 +1,9 @@
// The purpose of this test is to verify that symbol aliases
// (@foo = alias <type> @bar) generate the correct entries in the symbol table.
// (@foo: alias <type> @bar) generate the correct entries in the symbol table.
// They should be identical except for the name.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s
.def _foo;
.scl 2;
@ -31,43 +31,43 @@ _bar_alias_alias = _bar_alias
.globl _bar_alias
_bar_alias = _bar
// CHECK: Name = {{_?}}foo
// CHECK-NEXT: Value = [[FOO_VALUE:.*$]]
// CHECK-NEXT: SectionNumber = [[FOO_SECTION_NUMBER:.*$]]
// CHECK-NEXT: SimpleType = [[FOO_SIMPLE_TYPE:.*$]]
// CHECK-NEXT: ComplexType = [[FOO_COMPLEX_TYPE:.*$]]
// CHECK-NEXT: StorageClass = [[FOO_STORAGE_CLASS:.*$]]
// CHECK-NEXT: NumberOfAuxSymbols = [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]]
// CHECK: Name: {{_?}}foo
// CHECK-NEXT: Value: [[FOO_VALUE:.*$]]
// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER:.*$]]
// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE:.*$]]
// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE:.*$]]
// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS:.*$]]
// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]]
// CHECK: Name = {{_?}}bar
// CHECK-NEXT: Value = [[BAR_VALUE:.*$]]
// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER:.*$]]
// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE:.*$]]
// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE:.*$]]
// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS:.*$]]
// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]]
// CHECK: Name: {{_?}}bar
// CHECK-NEXT: Value: [[BAR_VALUE:.*$]]
// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER:.*$]]
// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE:.*$]]
// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE:.*$]]
// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS:.*$]]
// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]]
// CHECK: Name = {{_?}}foo_alias
// CHECK-NEXT: Value = [[FOO_VALUE]]
// CHECK-NEXT: SectionNumber = [[FOO_SECTION_NUMBER]]
// CHECK-NEXT: SimpleType = [[FOO_SIMPLE_TYPE]]
// CHECK-NEXT: ComplexType = [[FOO_COMPLEX_TYPE]]
// CHECK-NEXT: StorageClass = [[FOO_STORAGE_CLASS]]
// CHECK-NEXT: NumberOfAuxSymbols = [[FOO_NUMBER_OF_AUX_SYMBOLS]]
// CHECK: Name: {{_?}}foo_alias
// CHECK-NEXT: Value: [[FOO_VALUE]]
// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER]]
// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE]]
// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE]]
// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS]]
// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS]]
// CHECK: Name = {{_?}}bar_alias_alias
// CHECK-NEXT: Value = [[BAR_VALUE]]
// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER]]
// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE]]
// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE]]
// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS]]
// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS]]
// CHECK: Name: {{_?}}bar_alias_alias
// CHECK-NEXT: Value: [[BAR_VALUE]]
// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]]
// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]]
// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]]
// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]]
// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]]
// CHECK: Name = {{_?}}bar_alias
// CHECK-NEXT: Value = [[BAR_VALUE]]
// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER]]
// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE]]
// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE]]
// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS]]
// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS]]
// CHECK: Name: {{_?}}bar_alias
// CHECK-NEXT: Value: [[BAR_VALUE]]
// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]]
// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]]
// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]]
// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]]
// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]]

View File

@ -0,0 +1,168 @@
// The purpose of this test is to see if the COFF object writer is emitting the
// proper relocations for multiple pieces of data in a single data fragment.
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
.def _main;
.scl 2;
.type 32;
.endef
.text
.globl _main
.align 16, 0x90
_main: # @main
# BB#0: # %entry
subl $4, %esp
movl $.L_.str0, (%esp)
callq _printf
movl $.L_.str1, (%esp)
callq _puts
movl $.L_.str2, (%esp)
callq _puts
xorl %eax, %eax
addl $4, %esp
ret
.data
.L_.str0: # @.str0
.asciz "Hello "
.L_.str1: # @.str1
.asciz "World!"
.align 16 # @.str2
.L_.str2:
.asciz "I'm The Last Line."
// CHECK: {
// CHECK: Machine: IMAGE_FILE_MACHINE_AMD64
// CHECK: SectionCount: 2
// CHECK: TimeDateStamp: {{[0-9]+}}
// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
// CHECK: SymbolCount: 7
// CHECK: OptionalHeaderSize: 0
// CHECK: Characteristics [ (0x0)
// CHECK: ]
// CHECK: }
// CHECK: Sections [
// CHECK: Section {
// CHECK: Number: 1
// CHECK: Name: .text
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: {{[0-9]+}}
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 6
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0x60500020)
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_CNT_CODE
// CHECK: IMAGE_SCN_MEM_EXECUTE
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: ]
// CHECK: Relocations [
// CHECK: 0x7 IMAGE_REL_AMD64_ADDR32 .data
// CHECK: 0xC IMAGE_REL_AMD64_REL32 _printf
// CHECK: 0x14 IMAGE_REL_AMD64_ADDR32 .data
// CHECK: 0x19 IMAGE_REL_AMD64_REL32 _puts
// CHECK: 0x21 IMAGE_REL_AMD64_ADDR32 .data
// CHECK: 0x26 IMAGE_REL_AMD64_REL32 _puts
// CHECK: ]
// CHECK: SectionData (
// CHECK: 0000: 83EC0467 C7042400 000000E8 00000000
// CHECK: 0010: 67C70424 07000000 E8000000 0067C704
// CHECK: 0020: 24100000 00E80000 000031C0 83C404C3
// CHECK: )
// CHECK: }
// CHECK: Section {
// CHECK: Number: 2
// CHECK: Name: .data
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: {{[0-9]+}}
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x0
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0xC0500040)
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: IMAGE_SCN_MEM_WRITE
// CHECK: Relocations [
// CHECK: ]
// CHECK: SectionData (
// CHECK: 0000: 48656C6C 6F200057 6F726C64 21000000 |Hello .World!...|
// CHECK: 0010: 49276D20 54686520 4C617374 204C696E |I'm The Last Lin|
// CHECK: 0020: 652E00 |e..|
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: .text
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: 48
// CHECK: RelocationCount: 6
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: 1
// CHECK: Selection: 0x0
// CHECK: Unused: (00 00 00)
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: .data
// CHECK: Value: 0
// CHECK: Section: .data
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: 35
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: 2
// CHECK: Selection: 0x0
// CHECK: Unused: (00 00 00)
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _main
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Function
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _printf
// CHECK: Value: 0
// CHECK: Section: (0)
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _puts
// CHECK: Value: 0
// CHECK: Section: (0)
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: ]

View File

@ -1,8 +1,7 @@
// The purpose of this test is to see if the COFF object writer is emitting the
// proper relocations for multiple pieces of data in a single data fragment.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
.def _main;
.scl 2;
@ -36,152 +35,134 @@ L_.str2:
.asciz "I'm The Last Line."
// CHECK: {
// CHECK: MachineType = IMAGE_FILE_MACHINE_I386 (0x14C)
// CHECK: NumberOfSections = 2
// CHECK: TimeDateStamp = {{[0-9]+}}
// CHECK: PointerToSymbolTable = 0x{{[0-9A-F]+}}
// CHECK: NumberOfSymbols = 7
// CHECK: SizeOfOptionalHeader = 0
// CHECK: Characteristics = 0x0
// CHECK: Sections = [
// CHECK: 1 = {
// CHECK: Name = .text
// CHECK: VirtualSize = 0
// CHECK: VirtualAddress = 0
// CHECK: SizeOfRawData = {{[0-9]+}}
// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations = 0x{{[0-9A-F]+}}
// CHECK: PointerToLineNumbers = 0x0
// CHECK: NumberOfRelocations = 6
// CHECK: NumberOfLineNumbers = 0
// CHECK: Charateristics = 0x60500020
// CHECK: IMAGE_SCN_CNT_CODE
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_MEM_EXECUTE
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: SectionData =
// CHECK: 83 EC 04 C7 04 24 00 00 - 00 00 E8 00 00 00 00 C7 |.....$..........|
// CHECK: 04 24 07 00 00 00 E8 00 - 00 00 00 C7 04 24 10 00 |.$...........$..|
// CHECK: 00 00 E8 00 00 00 00 31 - C0 83 C4 04 C3 |.......1.....|
// CHECK: Relocations = [
// CHECK: 0 = {
// CHECK: VirtualAddress = 0x6
// CHECK: SymbolTableIndex = 2
// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
// CHECK: SymbolName = .data
// CHECK: }
// CHECK: 1 = {
// CHECK: VirtualAddress = 0xB
// CHECK: SymbolTableIndex = 5
// CHECK: Type = IMAGE_REL_I386_REL32 (20)
// CHECK: SymbolName = _printf
// CHECK: }
// CHECK: 2 = {
// CHECK: VirtualAddress = 0x12
// CHECK: SymbolTableIndex = 2
// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
// CHECK: SymbolName = .data
// CHECK: }
// CHECK: 3 = {
// CHECK: VirtualAddress = 0x17
// CHECK: SymbolTableIndex = 6
// CHECK: Type = IMAGE_REL_I386_REL32 (20)
// CHECK: SymbolName = _puts
// CHECK: }
// CHECK: 4 = {
// CHECK: VirtualAddress = 0x1E
// CHECK: SymbolTableIndex = 2
// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
// CHECK: SymbolName = .data
// CHECK: }
// CHECK: 5 = {
// CHECK: VirtualAddress = 0x23
// CHECK: SymbolTableIndex = 6
// CHECK: Type = IMAGE_REL_I386_REL32 (20)
// CHECK: SymbolName = _puts
// CHECK: }
// CHECK: ]
// CHECK: }
// CHECK: 2 = {
// CHECK: Name = .data
// CHECK: VirtualSize = 0
// CHECK: VirtualAddress = 0
// CHECK: SizeOfRawData = {{[0-9]+}}
// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations = 0x0
// CHECK: PointerToLineNumbers = 0x0
// CHECK: NumberOfRelocations = 0
// CHECK: NumberOfLineNumbers = 0
// CHECK: Charateristics = 0xC0500040
// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: IMAGE_SCN_MEM_WRITE
// CHECK: SectionData =
// CHECK: 48 65 6C 6C 6F 20 00 57 - 6F 72 6C 64 21 00 00 00 |Hello .World!...|
// CHECK: 49 27 6D 20 54 68 65 20 - 4C 61 73 74 20 4C 69 6E |I'm The Last Lin|
// CHECK: 65 2E 00 |e..|
// CHECK: Relocations = None
// CHECK: }
// CHECK: ]
// CHECK: Symbols = [
// CHECK: 0 = {
// CHECK: Name = .text
// CHECK: Value = 0
// CHECK: SectionNumber = 1
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
// CHECK: NumberOfAuxSymbols = 1
// CHECK: AuxillaryData =
// CHECK: 2D 00 00 00 06 00 00 00 - 00 00 00 00 01 00 00 00 |-...............|
// CHECK: 00 00 |..|
// CHECK: }
// CHECK: 2 = {
// CHECK: Name = .data
// CHECK: Value = 0
// CHECK: SectionNumber = 2
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
// CHECK: NumberOfAuxSymbols = 1
// CHECK: AuxillaryData =
// CHECK: 23 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |#...............|
// CHECK: 00 00 |..|
// CHECK: }
// CHECK: 4 = {
// CHECK: Name = _main
// CHECK: Value = 0
// CHECK: SectionNumber = 1
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_FUNCTION (2)
// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK: NumberOfAuxSymbols = 0
// CHECK: AuxillaryData =
// CHECK: 5 = {
// CHECK: Name = _printf
// CHECK: Value = 0
// CHECK: SectionNumber = 0
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK: NumberOfAuxSymbols = 0
// CHECK: AuxillaryData =
// CHECK: }
// CHECK: 6 = {
// CHECK: Name = _puts
// CHECK: Value = 0
// CHECK: SectionNumber = 0
// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK: NumberOfAuxSymbols = 0
// CHECK: AuxillaryData =
// CHECK: }
// CHECK: Machine: IMAGE_FILE_MACHINE_I386 (0x14C)
// CHECK: SectionCount: 2
// CHECK: TimeDateStamp: {{[0-9]+}}
// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
// CHECK: SymbolCount: 7
// CHECK: OptionalHeaderSize: 0
// CHECK: Characteristics [ (0x0)
// CHECK: ]
// CHECK: }
// CHECK: Sections [
// CHECK: Section {
// CHECK: Number: 1
// CHECK: Name: .text
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: {{[0-9]+}}
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 6
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0x60500020)
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_CNT_CODE
// CHECK: IMAGE_SCN_MEM_EXECUTE
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: ]
// CHECK: Relocations [
// CHECK: 0x6 IMAGE_REL_I386_DIR32 .data
// CHECK: 0xB IMAGE_REL_I386_REL32 _printf
// CHECK: 0x12 IMAGE_REL_I386_DIR32 .data
// CHECK: 0x17 IMAGE_REL_I386_REL32 _puts
// CHECK: 0x1E IMAGE_REL_I386_DIR32 .data
// CHECK: 0x23 IMAGE_REL_I386_REL32 _puts
// CHECK: ]
// CHECK: SectionData (
// CHECK: 0000: 83EC04C7 04240000 0000E800 000000C7 |.....$..........|
// CHECK: 0010: 04240700 0000E800 000000C7 04241000 |.$...........$..|
// CHECK: 0020: 0000E800 00000031 C083C404 C3 |.......1.....|
// CHECK: )
// CHECK: }
// CHECK: Section {
// CHECK: Number: 2
// CHECK: Name: .data
// CHECK: VirtualSize: 0
// CHECK: VirtualAddress: 0
// CHECK: RawDataSize: {{[0-9]+}}
// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
// CHECK: PointerToRelocations: 0x0
// CHECK: PointerToLineNumbers: 0x0
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Characteristics [ (0xC0500040)
// CHECK: IMAGE_SCN_ALIGN_16BYTES
// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK: IMAGE_SCN_MEM_READ
// CHECK: IMAGE_SCN_MEM_WRITE
// CHECK: Relocations [
// CHECK: ]
// CHECK: SectionData (
// CHECK: 0000: 48656C6C 6F200057 6F726C64 21000000 |Hello .World!...|
// CHECK: 0010: 49276D20 54686520 4C617374 204C696E |I'm The Last Lin|
// CHECK: 0020: 652E00 |e..|
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: .text
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: 45
// CHECK: RelocationCount: 6
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: 1
// CHECK: Selection: 0x0
// CHECK: Unused: (00 00 00)
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: .data
// CHECK: Value: 0
// CHECK: Section: .data
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: Static
// CHECK: AuxSymbolCount: 1
// CHECK: AuxSectionDef {
// CHECK: Length: 35
// CHECK: RelocationCount: 0
// CHECK: LineNumberCount: 0
// CHECK: Checksum: 0x0
// CHECK: Number: 2
// CHECK: Selection: 0x0
// CHECK: Unused: (00 00 00)
// CHECK: }
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _main
// CHECK: Value: 0
// CHECK: Section: .text
// CHECK: BaseType: Null
// CHECK: ComplexType: Function
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _printf
// CHECK: Value: 0
// CHECK: Section: (0)
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _puts
// CHECK: Value: 0
// CHECK: Section: (0)
// CHECK: BaseType: Null
// CHECK: ComplexType: Null
// CHECK: StorageClass: External
// CHECK: AuxSymbolCount: 0
// CHECK: }
// CHECK: ]

View File

@ -1,23 +1,25 @@
; The purpose of this test is to verify that weak linkage type is not ignored by backend,
; if section was specialized.
; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s
@a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data"
; CHECK: Name = .data$a
; CHECK-NEXT: VirtualSize = 0
; CHECK-NEXT: VirtualAddress = 0
; CHECK-NEXT: SizeOfRawData = {{[0-9]+}}
; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}}
; CHECK-NEXT: PointerToRelocations = 0x0
; CHECK-NEXT: PointerToLineNumbers = 0x0
; CHECK-NEXT: NumberOfRelocations = 0
; CHECK-NEXT: NumberOfLineNumbers = 0
; CHECK-NEXT: Charateristics = 0x40401040
; CHECK: Name: .data$a
; CHECK-NEXT: VirtualSize: 0
; CHECK-NEXT: VirtualAddress: 0
; CHECK-NEXT: RawDataSize: {{[0-9]+}}
; CHECK-NEXT: PointerToRawData: 0x{{[0-9A-F]+}}
; CHECK-NEXT: PointerToRelocations: 0x0
; CHECK-NEXT: PointerToLineNumbers: 0x0
; CHECK-NEXT: RelocationCount: 0
; CHECK-NEXT: LineNumberCount: 0
; CHECK-NEXT: Characteristics [ (0x40401040)
; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
; CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
; CHECK-NEXT: IMAGE_SCN_LNK_COMDAT
; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
; CHECK-NEXT: IMAGE_SCN_MEM_READ
; CHECK-NEXT: SectionData =
; CHECK-NEXT: 00 00 00 00 00 00 00 00 - 00 00 00 00
; CHECK-NEXT: ]
; CHECK-NEXT: SectionData (
; CHECK-NEXT: 0000: 00000000 00000000 00000000
; CHECK-NEXT: )

View File

@ -1,7 +1,8 @@
// This tests that default-null weak symbols (a GNU extension) are created
// properly via the .weak directive.
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 < %s | coff-dump.py | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s
.def _main;
.scl 2;
@ -17,7 +18,7 @@ _main: # @main
testl %eax, %eax
je LBB0_2
# BB#1: # %if.then
calll _test_weak
call _test_weak
movl $1, %eax
addl $4, %esp
ret
@ -28,24 +29,29 @@ LBB0_2: # %return
.weak _test_weak
// CHECK: Symbols = [
// CHECK: Symbols [
// CHECK: Name = _test_weak
// CHECK-NEXT: Value = 0
// CHECK-NEXT: SectionNumber = 0
// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_WEAK_EXTERNAL (105)
// CHECK-NEXT: NumberOfAuxSymbols = 1
// CHECK-NEXT: AuxillaryData =
// CHECK-NEXT: 05 00 00 00 02 00 00 00 - 00 00 00 00 00 00 00 00 |................|
// CHECK-NEXT: 00 00 |..|
// CHECK: Symbol {
// CHECK: Name: _test_weak
// CHECK-NEXT: Value: 0
// CHECK-NEXT: Section: (0)
// CHECK-NEXT: BaseType: Null
// CHECK-NEXT: ComplexType: Null
// CHECK-NEXT: StorageClass: WeakExternal
// CHECK-NEXT: AuxSymbolCount: 1
// CHECK-NEXT: AuxWeakExternal {
// CHECK-NEXT: Linked: .weak._test_weak.default
// CHECK-NEXT: Search: Library
// CHECK-NEXT: Unused: (00 00 00 00 00 00 00 00 00 00)
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK: Name = .weak._test_weak.default
// CHECK-NEXT: Value = 0
// CHECK-NEXT: SectionNumber = 65535
// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0)
// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK-NEXT: NumberOfAuxSymbols = 0
// CHECK-NEXT: AuxillaryData =
// CHECK: Symbol {
// CHECK: Name: .weak._test_weak.default
// CHECK-NEXT: Value: 0
// CHECK-NEXT: Section: (-1)
// CHECK-NEXT: BaseType: Null
// CHECK-NEXT: ComplexType: Null
// CHECK-NEXT: StorageClass: External
// CHECK-NEXT: AuxSymbolCount: 0
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that zed will be an ABS symbol
@ -6,11 +6,12 @@
.Lbar:
zed = .Lfoo - .Lbar
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000001) # 'zed'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0xfff1)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK: Symbol {
// CHECK: Name: zed
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0xFFF1)
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
// Test that this produces a R_X86_64_PLT32 with bar.
@ -17,36 +17,30 @@ foo2:
.set bar2,foo2
.quad bar2
// CHECK: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000001)
// CHECK-NEXT: ('r_sym', 0x00000001)
// CHECK-NEXT: ('r_type', 0x00000004)
// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
// CHECK-NEXT: ),
// CHECK: Relocations [
// CHECK-NEXT: Section ({{[0-9]+}}) zed {
// CHECK-NEXT: 0x1 R_X86_64_PLT32 bar 0xFFFFFFFFFFFFFFFC
// CHECK-NEXT: 0x5 R_X86_64_64 bar2 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK: # Relocation 1
// CHECK-NEXT: (('r_offset', 0x0000000000000005)
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK-NEXT: Name: bar
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: # Symbol 6
// CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2'
// CHECK-NEXT: ('st_bind', 0x2)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0004)
// CHECK-NEXT: ('st_value', 0x0000000000000005)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Symbol {
// CHECK: Name: bar2
// CHECK-NEXT: Value: 0x5
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Weak
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: zed
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
foo:
bar = foo
@ -16,70 +16,78 @@ foo4:
bar4 = foo4
.long foo2
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 2
// CHECK-NEXT: (('st_name', 0x0000001d) # 'bar4'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x2)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 3
// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 4
// CHECK-NEXT: (('st_name', 0x0000000e) # 'foo3'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 5
// CHECK-NEXT: (('st_name', 0x00000018) # 'foo4'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x2)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 6
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK: # Symbol 7
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK: # Symbol 8
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK: # Symbol 9
// CHECK-NEXT: (('st_name', 0x00000013) # 'bar3'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK: # Symbol 10
// CHECK-NEXT: (('st_name', 0x00000009) # 'bar2'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0000)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK: Symbols [
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: bar
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: bar4
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Function
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: foo
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: foo3
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: foo4
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Function
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: .text (0)
// CHECK: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: .data (0)
// CHECK: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: .bss (0)
// CHECK: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: bar3
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: bar2
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0x0)
// CHECK-NEXT: }
// CHECK-NEXT: ]

View File

@ -1,17 +1,22 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the bss section is correctly aligned
.local foo
.comm foo,2048,16
// CHECK: ('sh_name', 0x00000007) # '.bss'
// CHECK-NEXT: ('sh_type', 0x00000008)
// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000800)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000010)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: Section {
// CHECK: Name: .bss
// CHECK-NEXT: Type: SHT_NOBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 2048
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 16
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// Test that we get optimal nops in text
.text
@ -15,26 +15,40 @@ f0:
.long 0
.align 8
// CHECK: (('sh_name', 0x00000001) # '.text'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000010)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '00000000 0f1f4000 00000000 0f1f4000')
// CHECK: Section {
// CHECK: Name: .text
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_EXECINSTR
// CHECK-NEXT: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 16
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 00000000 0F1F4000 00000000 0F1F4000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: (('sh_name', 0x00000026) # '.data'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000010)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '00000000 90909090 00000000 00000000')
// CHECK: Section {
// CHECK: Name: .data
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 16
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 00000000 90909090 00000000 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }

View File

@ -1,13 +1,18 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the alignment does contribute to the size of the section.
.zero 4
.align 8
// CHECK: (('sh_name', 0x00000001) # '.text'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000008)
// CHECK: Section {
// CHECK: Name: .text
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_EXECINSTR
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 8
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the .text directive doesn't cause alignment.
@ -6,14 +6,18 @@
.text
.zero 1
// CHECK: (('sh_name', 0x00000001) # '.text'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000002)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .text
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_EXECINSTR
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 2
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the alignment of rodata doesn't force a alignment of the
// previous section (.bss)
@ -7,26 +7,33 @@
.section .rodata,"a",@progbits
.align 8
// CHECK: # Section 3
// CHECK-NEXT: (('sh_name', 0x00000007) # '.bss'
// CHECK-NEXT: ('sh_type', 0x00000008)
// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
// CHECK-NEXT: ('sh_size', 0x0000000000000000)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000026) # '.rodata'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000000)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: Section {
// CHECK: Name: .bss
// CHECK-NEXT: Type: SHT_NOBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x44
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 4
// CHECK-NEXT: Name: .rodata
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -h -s -r -t | FileCheck %s
.text
.globl main
@ -30,49 +30,53 @@ main: # @main
.section .note.GNU-stack,"",@progbits
// CHECK: ('e_indent[EI_CLASS]', 0x01)
// CHECK: ('e_indent[EI_DATA]', 0x01)
// CHECK: ('e_indent[EI_VERSION]', 0x01)
// CHECK: ('_sections', [
// CHECK: # Section 0
// CHECK: (('sh_name', 0x00000000) # ''
// CHECK: ElfHeader {
// CHECK: Class: 32-bit
// CHECK: DataEncoding: LittleEndian
// CHECK: FileVersion: 1
// CHECK: }
// CHECK: Sections [
// CHECK: Section {
// CHECK: Index: 0
// CHECK: Name: (0)
// CHECK: # '.text'
// CHECK: Name: .text
// CHECK: # '.rel.text'
// CHECK: Name: .rel.text
// CHECK: ('_relocations', [
// CHECK: # Relocation 0
// CHECK: (('r_offset', 0x00000006)
// CHECK: ('r_type', 0x01)
// CHECK: ),
// CHECK: # Relocation 1
// CHECK: (('r_offset', 0x0000000b)
// CHECK: ('r_type', 0x02)
// CHECK: ),
// CHECK: # Relocation 2
// CHECK: (('r_offset', 0x00000012)
// CHECK: ('r_type', 0x01)
// CHECK: ),
// CHECK: # Relocation 3
// CHECK: (('r_offset', 0x00000017)
// CHECK: ('r_type', 0x02)
// CHECK: ),
// CHECK: ])
// CHECK: Relocations [
// CHECK: Section (1) .text {
// CHECK: 0x6 R_386_32 .rodata.str1.1
// CHECK: 0xB R_386_PC32 puts
// CHECK: 0x12 R_386_32 .rodata.str1.1
// CHECK: 0x17 R_386_PC32 puts
// CHECK: }
// CHECK: ]
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x3)
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Binding: Local
// CHECK: Type: Section
// CHECK: }
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x3)
// CHECK: Symbol {
// CHECK: Binding: Local
// CHECK: Type: Section
// CHECK: }
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x3)
// CHECK: Symbol {
// CHECK: Binding: Local
// CHECK: Type: Section
// CHECK: }
// CHECK: # 'main'
// CHECK: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x2)
// CHECK: Symbol {
// CHECK: Name: main
// CHECK: Binding: Global
// CHECK: Type: Function
// CHECK: }
// CHECK: # 'puts'
// CHECK: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK: Symbol {
// CHECK: Name: puts
// CHECK: Binding: Global
// CHECK: Type: None
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -h -s -r -t | FileCheck %s
.text
.globl main
@ -30,53 +30,51 @@ main: # @main
.section .note.GNU-stack,"",@progbits
// CHECK: ('e_indent[EI_CLASS]', 0x02)
// CHECK: ('e_indent[EI_DATA]', 0x01)
// CHECK: ('e_indent[EI_VERSION]', 0x01)
// CHECK: ('_sections', [
// CHECK: # Section 0
// CHECK: (('sh_name', 0x00000000) # ''
// CHECK: ElfHeader {
// CHECK: Class: 64-bit
// CHECK: DataEncoding: LittleEndian
// CHECK: FileVersion: 1
// CHECK: }
// CHECK: Sections [
// CHECK: Section {
// CHECK: Index: 0
// CHECK: Name: (0)
// CHECK: # '.text'
// CHECK: Name: .text
// CHECK: # '.rela.text'
// CHECK: Name: .rela.text
// CHECK: ('_relocations', [
// CHECK: # Relocation 0
// CHECK: (('r_offset', 0x0000000000000005)
// CHECK: ('r_type', 0x0000000a)
// CHECK: ('r_addend', 0x0000000000000000)
// CHECK: ),
// CHECK: # Relocation 1
// CHECK: (('r_offset', 0x000000000000000a)
// CHECK: ('r_type', 0x00000002)
// CHECK: ('r_addend', 0xfffffffffffffffc)
// CHECK: ),
// CHECK: # Relocation 2
// CHECK: (('r_offset', 0x000000000000000f)
// CHECK: ('r_type', 0x0000000a)
// CHECK: ('r_addend', 0x0000000000000006)
// CHECK: ),
// CHECK: # Relocation 3
// CHECK: (('r_offset', 0x0000000000000014)
// CHECK: ('r_type', 0x00000002)
// CHECK: ('r_addend', 0xfffffffffffffffc)
// CHECK: ),
// CHECK: ])
// CHECK: Relocations [
// CHECK: Section (1) .text {
// CHECK: 0x5 R_X86_64_32 .rodata.str1.1 0x0
// CHECK: 0xA R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC
// CHECK: 0xF R_X86_64_32 .rodata.str1.1 0x6
// CHECK: 0x14 R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC
// CHECK: }
// CHECK: ]
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x3)
// CHECK: Symbol {
// CHECK: Binding: Local
// CHECK: Type: Section
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x3)
// CHECK: Symbol {
// CHECK: Binding: Local
// CHECK: Type: Section
// CHECK: }
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x3)
// CHECK: Symbol {
// CHECK: Binding: Local
// CHECK: Type: Section
// CHECK: }
// CHECK: # 'main'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x2)
// CHECK: Symbol {
// CHECK: Name: main
// CHECK: Binding: Global
// CHECK: Type: Function
// CHECK: }
// CHECK: # 'puts'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK: Symbol {
// CHECK: Name: puts
// CHECK: Binding: Global
// CHECK: Type: None
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
.text
.globl f
@ -15,10 +15,8 @@ f: # @f
.section .note.GNU-stack,"",@progbits
// CHECK: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x00000004)
// CHECK-NEXT: ('r_sym', 0x000000)
// CHECK-NEXT: ('r_type', 0x02)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK: Relocations [
// CHECK: Section ({{[^ ]+}}) {{[^ ]+}} {
// CHECK-NEXT: 0x4 R_386_PC32 -
// CHECK-NEXT: }
// CHECK-NEXT: ]

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -11,36 +11,43 @@ f:
ret
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
// CHECK-NEXT: ('sh_size', 0x0000000000000038)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 0a000000 00440e10 410e1444 0e080000 00000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x00000000000003a0)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x50
// CHECK-NEXT: Size: 56
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 1C000000 1C000000
// CHECK-NEXT: 0020: 00000000 0A000000 00440E10 410E1444
// CHECK-NEXT: 0030: 0E080000 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x3A0
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
// test that this produces a correctly encoded cfi_advance_loc2
@ -10,36 +10,41 @@ f:
nop
.cfi_endproc
// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000148)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01010000 00030001 0e080000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x148
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 01010000 00030001 0E080000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000490)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x490
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -10,37 +10,43 @@ f:
ret
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 0a000000 00440e10 450e0800')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x50
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 0A000000 00440E10 450E0800
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000398)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x398
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,35 +7,41 @@ f:
nop
.cfi_endproc
// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410d06 00000000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00410D06 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,36 +7,41 @@ f:
nop
.cfi_endproc
// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410c07 08000000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00410C07 08000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00411507 7f000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00411507 7F000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,36 +7,41 @@ f:
nop
.cfi_endproc
// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00418602 00000000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00418602 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410906 00000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00410906 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -14,36 +14,43 @@ f:
.cfi_rel_offset 6,0
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000040)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 24000000 1c000000 00000000 05000000 00410e08 410d0641 11067f41 0e104186 02000000 00000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x00000000000003a0)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 64
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 24000000 1C000000
// CHECK-NEXT: 0020: 00000000 05000000 00410E08 410D0641
// CHECK-NEXT: 0030: 11067F41 0E104186 02000000 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x3A0
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -6,36 +6,42 @@ f:
.cfi_rel_offset 6,16
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01000000 00411106 7f000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 01000000 00411106 7F000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -9,37 +9,42 @@ f:
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 03000000 00410a41 0b000000')
// CHECK-NEXT: ),
// CHECK: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 03000000 00410A41 0B000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 0041c600 00000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 0041C600 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410806 00000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00410806 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,5 +1,5 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s
.cfi_sections .debug_frame
@ -13,26 +13,43 @@ f2:
nop
.cfi_endproc
// ELF_64: (('sh_name', 0x00000011) # '.debug_frame'
// ELF_64-NEXT: ('sh_type', 0x00000001)
// ELF_64-NEXT: ('sh_flags', 0x0000000000000000)
// ELF_64-NEXT: ('sh_addr', 0x0000000000000000)
// ELF_64-NEXT: ('sh_offset', 0x0000000000000048)
// ELF_64-NEXT: ('sh_size', 0x0000000000000048)
// ELF_64-NEXT: ('sh_link', 0x00000000)
// ELF_64-NEXT: ('sh_info', 0x00000000)
// ELF_64-NEXT: ('sh_addralign', 0x0000000000000008)
// ELF_64-NEXT: ('sh_entsize', 0x0000000000000000)
// ELF_64-NEXT: ('_section_data', '14000000 ffffffff 01000178 100c0708 90010000 00000000 14000000 00000000 00000000 00000000 01000000 00000000 14000000 00000000 00000000 00000000 01000000 00000000')
// ELF_64: Section {
// ELF_64: Name: .debug_frame
// ELF_64-NEXT: Type: SHT_PROGBITS
// ELF_64-NEXT: Flags [
// ELF_64-NEXT: ]
// ELF_64-NEXT: Address: 0x0
// ELF_64-NEXT: Offset: 0x48
// ELF_64-NEXT: Size: 72
// ELF_64-NEXT: Link: 0
// ELF_64-NEXT: Info: 0
// ELF_64-NEXT: AddressAlignment: 8
// ELF_64-NEXT: EntrySize: 0
// ELF_64-NEXT: SectionData (
// ELF_64-NEXT: 0000: 14000000 FFFFFFFF 01000178 100C0708
// ELF_64-NEXT: 0010: 90010000 00000000 14000000 00000000
// ELF_64-NEXT: 0020: 00000000 00000000 01000000 00000000
// ELF_64-NEXT: 0030: 14000000 00000000 00000000 00000000
// ELF_64-NEXT: 0040: 01000000 00000000
// ELF_64-NEXT: )
// ELF_64-NEXT: }
// ELF_32: (('sh_name', 0x00000010) # '.debug_frame'
// ELF_32-NEXT: ('sh_type', 0x00000001)
// ELF_32-NEXT: ('sh_flags', 0x00000000)
// ELF_32-NEXT: ('sh_addr', 0x00000000)
// ELF_32-NEXT: ('sh_offset', 0x00000038)
// ELF_32-NEXT: ('sh_size', 0x00000034)
// ELF_32-NEXT: ('sh_link', 0x00000000)
// ELF_32-NEXT: ('sh_info', 0x00000000)
// ELF_32-NEXT: ('sh_addralign', 0x00000004)
// ELF_32-NEXT: ('sh_entsize', 0x00000000)
// ELF_32-NEXT: ('_section_data', '10000000 ffffffff 0100017c 080c0404 88010000 0c000000 00000000 00000000 01000000 0c000000 00000000 01000000 01000000')
// ELF_32: Section {
// ELF_32: Name: .debug_frame
// ELF_32-NEXT: Type: SHT_PROGBITS
// ELF_32-NEXT: Flags [
// ELF_32-NEXT: ]
// ELF_32-NEXT: Address: 0x0
// ELF_32-NEXT: Offset: 0x38
// ELF_32-NEXT: Size: 52
// ELF_32-NEXT: Link: 0
// ELF_32-NEXT: Info: 0
// ELF_32-NEXT: AddressAlignment: 4
// ELF_32-NEXT: EntrySize: 0
// ELF_32-NEXT: SectionData (
// ELF_32-NEXT: 0000: 10000000 FFFFFFFF 0100017C 080C0404
// ELF_32-NEXT: 0010: 88010000 0C000000 00000000 00000000
// ELF_32-NEXT: 0020: 01000000 0C000000 00000000 01000000
// ELF_32-NEXT: 0030: 01000000
// ELF_32-NEXT: )
// ELF_32-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
f:
.cfi_startproc
@ -9,15 +9,25 @@ g:
.cfi_startproc
.cfi_endproc
// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000058)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5253 00017810 011b0c07 08900100 10000000 1c000000 00000000 00000000 00000000 14000000 00000000 017a5200 01781001 1b0c0708 90010000 10000000 1c000000 00000000 00000000 00000000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 88
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5253 00017810
// CHECK-NEXT: 0010: 011B0C07 08900100 10000000 1C000000
// CHECK-NEXT: 0020: 00000000 00000000 00000000 14000000
// CHECK-NEXT: 0030: 00000000 017A5200 01781001 1B0C0708
// CHECK-NEXT: 0040: 90010000 10000000 1C000000 00000000
// CHECK-NEXT: 0050: 00000000 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@ -6,36 +6,43 @@ f:
.cfi_undefined %rbp
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000030)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410706 00000000')
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 48
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 02000000 00410706 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x390
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
// Test that we don't produce a DW_CFA_advance_loc 0
@ -14,35 +14,41 @@ f:
nop
.cfi_endproc
// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
// CHECK-NEXT: ('sh_size', 0x0000000000000038)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 04000000 00410e10 410a0e08 410b0000 00000000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x48
// CHECK-NEXT: Size: 56
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
// CHECK-NEXT: 0010: 1B0C0708 90010000 1C000000 1C000000
// CHECK-NEXT: 0020: 00000000 04000000 00410E10 410A0E08
// CHECK-NEXT: 0030: 410B0000 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000398)
// CHECK-NEXT: ('sh_size', 0x0000000000000018)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000002)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x398
// CHECK-NEXT: Size: 24
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f1:
.cfi_startproc
@ -212,463 +212,220 @@ f36:
nop
.cfi_endproc
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000068)
// CHECK-NEXT: ('sh_size', 0x00000000000006c8)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a4c52 00017810 02031b0c 07089001 14000000 1c000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000003 1b0c0708 90010000 14000000 28000000 00000000 01000000 04000000 00000000 14000000 70000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000002 1b0c0708 90010000 10000000 28000000 00000000 01000000 02000000 18000000 00000000 017a5052 00017810 04020000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06030000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a040000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 040a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 060b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a0c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a080000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a100000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04120000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06130000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a140000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 041a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 061b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a1c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a180000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a800000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04820000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06830000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a840000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 048a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 068b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a8c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a880000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a900000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04920000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06930000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a940000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 049a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 069b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a9c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a980000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000')
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .eh_frame
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x68
// CHECK-NEXT: Size: 1736
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: Relocations [
// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
// CHECK-NEXT: 0x29 R_X86_64_32 bar 0x0
// CHECK-NEXT: 0x43 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x5C R_X86_64_PC32 .text 0x1
// CHECK-NEXT: 0x65 R_X86_64_32 bar 0x0
// CHECK-NEXT: 0x74 R_X86_64_PC32 .text 0x2
// CHECK-NEXT: 0x7D R_X86_64_32 bar 0x0
// CHECK-NEXT: 0x97 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0xB0 R_X86_64_PC32 .text 0x3
// CHECK-NEXT: 0xB9 R_X86_64_16 bar 0x0
// CHECK-NEXT: 0xCE R_X86_64_16 foo 0x0
// CHECK-NEXT: 0xE0 R_X86_64_PC32 .text 0x4
// CHECK-NEXT: 0xFE R_X86_64_32 foo 0x0
// CHECK-NEXT: 0x110 R_X86_64_PC32 .text 0x5
// CHECK-NEXT: 0x12E R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x144 R_X86_64_PC32 .text 0x6
// CHECK-NEXT: 0x162 R_X86_64_16 foo 0x0
// CHECK-NEXT: 0x174 R_X86_64_PC32 .text 0x7
// CHECK-NEXT: 0x192 R_X86_64_32 foo 0x0
// CHECK-NEXT: 0x1A4 R_X86_64_PC32 .text 0x8
// CHECK-NEXT: 0x1C2 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x1D8 R_X86_64_PC32 .text 0x9
// CHECK-NEXT: 0x1F6 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x20C R_X86_64_PC32 .text 0xA
// CHECK-NEXT: 0x22A R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x240 R_X86_64_PC32 .text 0xB
// CHECK-NEXT: 0x25E R_X86_64_PC16 foo 0x0
// CHECK-NEXT: 0x270 R_X86_64_PC32 .text 0xC
// CHECK-NEXT: 0x28E R_X86_64_PC32 foo 0x0
// CHECK-NEXT: 0x2A0 R_X86_64_PC32 .text 0xD
// CHECK-NEXT: 0x2BE R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x2D4 R_X86_64_PC32 .text 0xE
// CHECK-NEXT: 0x2F2 R_X86_64_PC16 foo 0x0
// CHECK-NEXT: 0x304 R_X86_64_PC32 .text 0xF
// CHECK-NEXT: 0x322 R_X86_64_PC32 foo 0x0
// CHECK-NEXT: 0x334 R_X86_64_PC32 .text 0x10
// CHECK-NEXT: 0x352 R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x368 R_X86_64_PC32 .text 0x11
// CHECK-NEXT: 0x386 R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x39C R_X86_64_PC32 .text 0x12
// CHECK-NEXT: 0x3BA R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x3D0 R_X86_64_PC32 .text 0x13
// CHECK-NEXT: 0x3EE R_X86_64_16 foo 0x0
// CHECK-NEXT: 0x400 R_X86_64_PC32 .text 0x14
// CHECK-NEXT: 0x41E R_X86_64_32 foo 0x0
// CHECK-NEXT: 0x430 R_X86_64_PC32 .text 0x15
// CHECK-NEXT: 0x44E R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x464 R_X86_64_PC32 .text 0x16
// CHECK-NEXT: 0x482 R_X86_64_16 foo 0x0
// CHECK-NEXT: 0x494 R_X86_64_PC32 .text 0x17
// CHECK-NEXT: 0x4B2 R_X86_64_32 foo 0x0
// CHECK-NEXT: 0x4C4 R_X86_64_PC32 .text 0x18
// CHECK-NEXT: 0x4E2 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x4F8 R_X86_64_PC32 .text 0x19
// CHECK-NEXT: 0x516 R_X86_64_64 foo 0x0
// CHECK-NEXT: 0x52C R_X86_64_PC32 .text 0x1A
// CHECK-NEXT: 0x54A R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x560 R_X86_64_PC32 .text 0x1B
// CHECK-NEXT: 0x57E R_X86_64_PC16 foo 0x0
// CHECK-NEXT: 0x590 R_X86_64_PC32 .text 0x1C
// CHECK-NEXT: 0x5AE R_X86_64_PC32 foo 0x0
// CHECK-NEXT: 0x5C0 R_X86_64_PC32 .text 0x1D
// CHECK-NEXT: 0x5DE R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x5F4 R_X86_64_PC32 .text 0x1E
// CHECK-NEXT: 0x612 R_X86_64_PC16 foo 0x0
// CHECK-NEXT: 0x624 R_X86_64_PC32 .text 0x1F
// CHECK-NEXT: 0x642 R_X86_64_PC32 foo 0x0
// CHECK-NEXT: 0x654 R_X86_64_PC32 .text 0x20
// CHECK-NEXT: 0x672 R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x688 R_X86_64_PC32 .text 0x21
// CHECK-NEXT: 0x6A6 R_X86_64_PC64 foo 0x0
// CHECK-NEXT: 0x6BC R_X86_64_PC32 .text 0x22
// CHECK-NEXT: ]
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 00000000 017A4C52 00017810
// CHECK-NEXT: 0010: 02031B0C 07089001 14000000 1C000000
// CHECK-NEXT: 0020: 00000000 01000000 04000000 00000000
// CHECK-NEXT: 0030: 20000000 00000000 017A504C 52000178
// CHECK-NEXT: 0040: 100B0000 00000000 00000003 1B0C0708
// CHECK-NEXT: 0050: 90010000 14000000 28000000 00000000
// CHECK-NEXT: 0060: 01000000 04000000 00000000 14000000
// CHECK-NEXT: 0070: 70000000 00000000 01000000 04000000
// CHECK-NEXT: 0080: 00000000 20000000 00000000 017A504C
// CHECK-NEXT: 0090: 52000178 100B0000 00000000 00000002
// CHECK-NEXT: 00A0: 1B0C0708 90010000 10000000 28000000
// CHECK-NEXT: 00B0: 00000000 01000000 02000000 18000000
// CHECK-NEXT: 00C0: 00000000 017A5052 00017810 04020000
// CHECK-NEXT: 00D0: 1B0C0708 90010000 10000000 20000000
// CHECK-NEXT: 00E0: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 00F0: 00000000 017A5052 00017810 06030000
// CHECK-NEXT: 0100: 00001B0C 07089001 10000000 20000000
// CHECK-NEXT: 0110: 00000000 01000000 00000000 1C000000
// CHECK-NEXT: 0120: 00000000 017A5052 00017810 0A040000
// CHECK-NEXT: 0130: 00000000 00001B0C 07089001 10000000
// CHECK-NEXT: 0140: 24000000 00000000 01000000 00000000
// CHECK-NEXT: 0150: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 0160: 040A0000 1B0C0708 90010000 10000000
// CHECK-NEXT: 0170: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 0180: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 0190: 060B0000 00001B0C 07089001 10000000
// CHECK-NEXT: 01A0: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 01B0: 1C000000 00000000 017A5052 00017810
// CHECK-NEXT: 01C0: 0A0C0000 00000000 00001B0C 07089001
// CHECK-NEXT: 01D0: 10000000 24000000 00000000 01000000
// CHECK-NEXT: 01E0: 00000000 1C000000 00000000 017A5052
// CHECK-NEXT: 01F0: 00017810 0A080000 00000000 00001B0C
// CHECK-NEXT: 0200: 07089001 10000000 24000000 00000000
// CHECK-NEXT: 0210: 01000000 00000000 1C000000 00000000
// CHECK-NEXT: 0220: 017A5052 00017810 0A100000 00000000
// CHECK-NEXT: 0230: 00001B0C 07089001 10000000 24000000
// CHECK-NEXT: 0240: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 0250: 00000000 017A5052 00017810 04120000
// CHECK-NEXT: 0260: 1B0C0708 90010000 10000000 20000000
// CHECK-NEXT: 0270: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 0280: 00000000 017A5052 00017810 06130000
// CHECK-NEXT: 0290: 00001B0C 07089001 10000000 20000000
// CHECK-NEXT: 02A0: 00000000 01000000 00000000 1C000000
// CHECK-NEXT: 02B0: 00000000 017A5052 00017810 0A140000
// CHECK-NEXT: 02C0: 00000000 00001B0C 07089001 10000000
// CHECK-NEXT: 02D0: 24000000 00000000 01000000 00000000
// CHECK-NEXT: 02E0: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 02F0: 041A0000 1B0C0708 90010000 10000000
// CHECK-NEXT: 0300: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 0310: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 0320: 061B0000 00001B0C 07089001 10000000
// CHECK-NEXT: 0330: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 0340: 1C000000 00000000 017A5052 00017810
// CHECK-NEXT: 0350: 0A1C0000 00000000 00001B0C 07089001
// CHECK-NEXT: 0360: 10000000 24000000 00000000 01000000
// CHECK-NEXT: 0370: 00000000 1C000000 00000000 017A5052
// CHECK-NEXT: 0380: 00017810 0A180000 00000000 00001B0C
// CHECK-NEXT: 0390: 07089001 10000000 24000000 00000000
// CHECK-NEXT: 03A0: 01000000 00000000 1C000000 00000000
// CHECK-NEXT: 03B0: 017A5052 00017810 0A800000 00000000
// CHECK-NEXT: 03C0: 00001B0C 07089001 10000000 24000000
// CHECK-NEXT: 03D0: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 03E0: 00000000 017A5052 00017810 04820000
// CHECK-NEXT: 03F0: 1B0C0708 90010000 10000000 20000000
// CHECK-NEXT: 0400: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 0410: 00000000 017A5052 00017810 06830000
// CHECK-NEXT: 0420: 00001B0C 07089001 10000000 20000000
// CHECK-NEXT: 0430: 00000000 01000000 00000000 1C000000
// CHECK-NEXT: 0440: 00000000 017A5052 00017810 0A840000
// CHECK-NEXT: 0450: 00000000 00001B0C 07089001 10000000
// CHECK-NEXT: 0460: 24000000 00000000 01000000 00000000
// CHECK-NEXT: 0470: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 0480: 048A0000 1B0C0708 90010000 10000000
// CHECK-NEXT: 0490: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 04A0: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 04B0: 068B0000 00001B0C 07089001 10000000
// CHECK-NEXT: 04C0: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 04D0: 1C000000 00000000 017A5052 00017810
// CHECK-NEXT: 04E0: 0A8C0000 00000000 00001B0C 07089001
// CHECK-NEXT: 04F0: 10000000 24000000 00000000 01000000
// CHECK-NEXT: 0500: 00000000 1C000000 00000000 017A5052
// CHECK-NEXT: 0510: 00017810 0A880000 00000000 00001B0C
// CHECK-NEXT: 0520: 07089001 10000000 24000000 00000000
// CHECK-NEXT: 0530: 01000000 00000000 1C000000 00000000
// CHECK-NEXT: 0540: 017A5052 00017810 0A900000 00000000
// CHECK-NEXT: 0550: 00001B0C 07089001 10000000 24000000
// CHECK-NEXT: 0560: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 0570: 00000000 017A5052 00017810 04920000
// CHECK-NEXT: 0580: 1B0C0708 90010000 10000000 20000000
// CHECK-NEXT: 0590: 00000000 01000000 00000000 18000000
// CHECK-NEXT: 05A0: 00000000 017A5052 00017810 06930000
// CHECK-NEXT: 05B0: 00001B0C 07089001 10000000 20000000
// CHECK-NEXT: 05C0: 00000000 01000000 00000000 1C000000
// CHECK-NEXT: 05D0: 00000000 017A5052 00017810 0A940000
// CHECK-NEXT: 05E0: 00000000 00001B0C 07089001 10000000
// CHECK-NEXT: 05F0: 24000000 00000000 01000000 00000000
// CHECK-NEXT: 0600: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 0610: 049A0000 1B0C0708 90010000 10000000
// CHECK-NEXT: 0620: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 0630: 18000000 00000000 017A5052 00017810
// CHECK-NEXT: 0640: 069B0000 00001B0C 07089001 10000000
// CHECK-NEXT: 0650: 20000000 00000000 01000000 00000000
// CHECK-NEXT: 0660: 1C000000 00000000 017A5052 00017810
// CHECK-NEXT: 0670: 0A9C0000 00000000 00001B0C 07089001
// CHECK-NEXT: 0680: 10000000 24000000 00000000 01000000
// CHECK-NEXT: 0690: 00000000 1C000000 00000000 017A5052
// CHECK-NEXT: 06A0: 00017810 0A980000 00000000 00001B0C
// CHECK-NEXT: 06B0: 07089001 10000000 24000000 00000000
// CHECK-NEXT: 06C0: 01000000 00000000
// CHECK-NEXT: )
// CHECK-NEXT: }
// CHECK: # Section 5
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000e30)
// CHECK-NEXT: ('sh_size', 0x00000000000006c0)
// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000020)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 1
// CHECK-NEXT: (('r_offset', 0x0000000000000029)
// CHECK-NEXT: ('r_sym', 0x00000028)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 2
// CHECK-NEXT: (('r_offset', 0x0000000000000043)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 3
// CHECK-NEXT: (('r_offset', 0x000000000000005c)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000001)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 4
// CHECK-NEXT: (('r_offset', 0x0000000000000065)
// CHECK-NEXT: ('r_sym', 0x00000028)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 5
// CHECK-NEXT: (('r_offset', 0x0000000000000074)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000002)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 6
// CHECK-NEXT: (('r_offset', 0x000000000000007d)
// CHECK-NEXT: ('r_sym', 0x00000028)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 7
// CHECK-NEXT: (('r_offset', 0x0000000000000097)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 8
// CHECK-NEXT: (('r_offset', 0x00000000000000b0)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000003)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 9
// CHECK-NEXT: (('r_offset', 0x00000000000000b9)
// CHECK-NEXT: ('r_sym', 0x00000028)
// CHECK-NEXT: ('r_type', 0x0000000c)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 10
// CHECK-NEXT: (('r_offset', 0x00000000000000ce)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000c)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 11
// CHECK-NEXT: (('r_offset', 0x00000000000000e0)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000004)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 12
// CHECK-NEXT: (('r_offset', 0x00000000000000fe)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 13
// CHECK-NEXT: (('r_offset', 0x0000000000000110)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000005)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 14
// CHECK-NEXT: (('r_offset', 0x000000000000012e)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 15
// CHECK-NEXT: (('r_offset', 0x0000000000000144)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000006)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 16
// CHECK-NEXT: (('r_offset', 0x0000000000000162)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000c)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 17
// CHECK-NEXT: (('r_offset', 0x0000000000000174)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000007)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 18
// CHECK-NEXT: (('r_offset', 0x0000000000000192)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 19
// CHECK-NEXT: (('r_offset', 0x00000000000001a4)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000008)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 20
// CHECK-NEXT: (('r_offset', 0x00000000000001c2)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 21
// CHECK-NEXT: (('r_offset', 0x00000000000001d8)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000009)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 22
// CHECK-NEXT: (('r_offset', 0x00000000000001f6)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 23
// CHECK-NEXT: (('r_offset', 0x000000000000020c)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000000a)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 24
// CHECK-NEXT: (('r_offset', 0x000000000000022a)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 25
// CHECK-NEXT: (('r_offset', 0x0000000000000240)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000000b)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 26
// CHECK-NEXT: (('r_offset', 0x000000000000025e)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000d)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 27
// CHECK-NEXT: (('r_offset', 0x0000000000000270)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000000c)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 28
// CHECK-NEXT: (('r_offset', 0x000000000000028e)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 29
// CHECK-NEXT: (('r_offset', 0x00000000000002a0)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000000d)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 30
// CHECK-NEXT: (('r_offset', 0x00000000000002be)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 31
// CHECK-NEXT: (('r_offset', 0x00000000000002d4)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000000e)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 32
// CHECK-NEXT: (('r_offset', 0x00000000000002f2)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000d)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 33
// CHECK-NEXT: (('r_offset', 0x0000000000000304)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000000f)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 34
// CHECK-NEXT: (('r_offset', 0x0000000000000322)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 35
// CHECK-NEXT: (('r_offset', 0x0000000000000334)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000010)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 36
// CHECK-NEXT: (('r_offset', 0x0000000000000352)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 37
// CHECK-NEXT: (('r_offset', 0x0000000000000368)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000011)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 38
// CHECK-NEXT: (('r_offset', 0x0000000000000386)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 39
// CHECK-NEXT: (('r_offset', 0x000000000000039c)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000012)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 40
// CHECK-NEXT: (('r_offset', 0x00000000000003ba)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 41
// CHECK-NEXT: (('r_offset', 0x00000000000003d0)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000013)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 42
// CHECK-NEXT: (('r_offset', 0x00000000000003ee)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000c)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 43
// CHECK-NEXT: (('r_offset', 0x0000000000000400)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000014)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 44
// CHECK-NEXT: (('r_offset', 0x000000000000041e)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 45
// CHECK-NEXT: (('r_offset', 0x0000000000000430)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000015)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 46
// CHECK-NEXT: (('r_offset', 0x000000000000044e)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 47
// CHECK-NEXT: (('r_offset', 0x0000000000000464)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000016)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 48
// CHECK-NEXT: (('r_offset', 0x0000000000000482)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000c)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 49
// CHECK-NEXT: (('r_offset', 0x0000000000000494)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000017)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 50
// CHECK-NEXT: (('r_offset', 0x00000000000004b2)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000a)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 51
// CHECK-NEXT: (('r_offset', 0x00000000000004c4)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000018)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 52
// CHECK-NEXT: (('r_offset', 0x00000000000004e2)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 53
// CHECK-NEXT: (('r_offset', 0x00000000000004f8)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000019)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 54
// CHECK-NEXT: (('r_offset', 0x0000000000000516)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 55
// CHECK-NEXT: (('r_offset', 0x000000000000052c)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000001a)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 56
// CHECK-NEXT: (('r_offset', 0x000000000000054a)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 57
// CHECK-NEXT: (('r_offset', 0x0000000000000560)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000001b)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 58
// CHECK-NEXT: (('r_offset', 0x000000000000057e)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000d)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 59
// CHECK-NEXT: (('r_offset', 0x0000000000000590)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000001c)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 60
// CHECK-NEXT: (('r_offset', 0x00000000000005ae)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 61
// CHECK-NEXT: (('r_offset', 0x00000000000005c0)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000001d)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 62
// CHECK-NEXT: (('r_offset', 0x00000000000005de)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 63
// CHECK-NEXT: (('r_offset', 0x00000000000005f4)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000001e)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 64
// CHECK-NEXT: (('r_offset', 0x0000000000000612)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x0000000d)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 65
// CHECK-NEXT: (('r_offset', 0x0000000000000624)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x000000000000001f)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 66
// CHECK-NEXT: (('r_offset', 0x0000000000000642)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 67
// CHECK-NEXT: (('r_offset', 0x0000000000000654)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000020)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 68
// CHECK-NEXT: (('r_offset', 0x0000000000000672)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 69
// CHECK-NEXT: (('r_offset', 0x0000000000000688)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000021)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 70
// CHECK-NEXT: (('r_offset', 0x00000000000006a6)
// CHECK-NEXT: ('r_sym', 0x00000029)
// CHECK-NEXT: ('r_type', 0x00000018)
// CHECK-NEXT: ('r_addend', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 71
// CHECK-NEXT: (('r_offset', 0x00000000000006bc)
// CHECK-NEXT: ('r_sym', 0x00000024)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000000000000022)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 5
// CHECK-NEXT: Name: .rela.eh_frame
// CHECK-NEXT: Type: SHT_RELA
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0xE30
// CHECK-NEXT: Size: 1728
// CHECK-NEXT: Link: 7
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: Relocations [
// CHECK-NEXT: ]
// CHECK: }

View File

@ -1,75 +1,81 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s
// Test that we produce the group sections and that they are a the beginning
// of the file.
// CHECK: # Section 1
// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group'
// CHECK-NEXT: ('sh_type', 0x00000011)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x000000000000000c)
// CHECK-NEXT: ('sh_link', 0x0000000d)
// CHECK-NEXT: ('sh_info', 0x00000001)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000004)
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 2
// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group'
// CHECK-NEXT: ('sh_type', 0x00000011)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x000000000000004c)
// CHECK-NEXT: ('sh_size', 0x0000000000000008)
// CHECK-NEXT: ('sh_link', 0x0000000d)
// CHECK-NEXT: ('sh_info', 0x00000002)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000004)
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 3
// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group'
// CHECK-NEXT: ('sh_type', 0x00000011)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000054)
// CHECK-NEXT: ('sh_size', 0x0000000000000008)
// CHECK-NEXT: ('sh_link', 0x0000000d)
// CHECK-NEXT: ('sh_info', 0x0000000d)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000004)
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 1
// CHECK-NEXT: Name: .group
// CHECK-NEXT: Type: SHT_GROUP
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 12
// CHECK-NEXT: Link: 13
// CHECK-NEXT: Info: 1
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 4
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 2
// CHECK-NEXT: Name: .group
// CHECK-NEXT: Type: SHT_GROUP
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x4C
// CHECK-NEXT: Size: 8
// CHECK-NEXT: Link: 13
// CHECK-NEXT: Info: 2
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 4
// CHECK-NEXT: }
// CHECK-NEXT: Section {
// CHECK-NEXT: Index: 3
// CHECK-NEXT: Name: .group
// CHECK-NEXT: Type: SHT_GROUP
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x54
// CHECK-NEXT: Size: 8
// CHECK-NEXT: Link: 13
// CHECK-NEXT: Info: 13
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 4
// CHECK-NEXT: }
// Test that g1 and g2 are local, but g3 is an undefined global.
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000001) # 'g1'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0007)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 2
// CHECK-NEXT: (('st_name', 0x00000004) # 'g2'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0002)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Symbol {
// CHECK: Name: g1 (1)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .foo (0x7)
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: g2 (4)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .group (0x2)
// CHECK-NEXT: }
// CHECK: # Symbol 13
// CHECK-NEXT: (('st_name', 0x00000007) # 'g3'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0000)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Symbol {
// CHECK: Name: g3 (7)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0x0)
// CHECK-NEXT: }
.section .foo,"axG",@progbits,g1,comdat

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
.text
@ -8,13 +8,15 @@
.local common1
.comm common1,1,1
// CHECK: ('st_name', 0x00000001) # 'common1'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx',
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000001)
// CHECK: Symbol {
// CHECK: Name: common1 (1)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 1
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section:
// CHECK-NEXT: }
// Same as common1, but with directives in a different order.
@ -22,38 +24,44 @@
.type common2,@object
.comm common2,1,1
// CHECK: ('st_name', 0x00000009) # 'common2'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx',
// CHECK-NEXT: ('st_value', 0x0000000000000001)
// CHECK-NEXT: ('st_size', 0x0000000000000001)
// CHECK: Symbol {
// CHECK: Name: common2 (9)
// CHECK-NEXT: Value: 0x1
// CHECK-NEXT: Size: 1
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section:
// CHECK-NEXT: }
.local common6
.comm common6,8,16
// CHECK: # Symbol 3
// CHECK-NEXT: (('st_name', 0x00000011) # 'common6'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0004)
// CHECK-NEXT: ('st_value', 0x0000000000000010)
// CHECK-NEXT: ('st_size', 0x0000000000000008)
// CHECK-NEXT: ),
// CHECK: Symbol {
// CHECK: Name: common6 (17)
// CHECK-NEXT: Value: 0x10
// CHECK-NEXT: Size: 8
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .bss (0x4)
// CHECK-NEXT: }
// Test that without an explicit .local we produce a global.
.type common3,@object
.comm common3,4,4
// CHECK: ('st_name', 0x00000019) # 'common3'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0xfff2)
// CHECK-NEXT: ('st_value', 0x0000000000000004)
// CHECK-NEXT: ('st_size', 0x0000000000000004)
// CHECK: Symbol {
// CHECK: Name: common3 (25)
// CHECK-NEXT: Value: 0x4
// CHECK-NEXT: Size: 4
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0xFFF2)
// CHECK-NEXT: }
// Test that without an explicit .local we produce a global, even if the first
@ -67,22 +75,25 @@ foo:
.type common4,@object
.comm common4,40,16
// CHECK: ('st_name', 0x00000025) # 'common4'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0xfff2)
// CHECK-NEXT: ('st_value', 0x0000000000000010)
// CHECK-NEXT: ('st_size', 0x0000000000000028)
// CHECK: Symbol {
// CHECK: Name: common4 (37)
// CHECK-NEXT: Value: 0x10
// CHECK-NEXT: Size: 40
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0xFFF2)
// CHECK-NEXT: }
.comm common5,4,4
// CHECK: # Symbol 9
// CHECK-NEXT: (('st_name', 0x0000002d) # 'common5'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x1)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0xfff2)
// CHECK-NEXT: ('st_value', 0x0000000000000004)
// CHECK-NEXT: ('st_size', 0x0000000000000004)
// CHECK-NEXT: ),
// CHECK: Symbol {
// CHECK: Name: common5 (45)
// CHECK-NEXT: Value: 0x4
// CHECK-NEXT: Size: 4
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0xFFF2)
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the common symbols are placed at the end of .bss. In this example
// it causes .bss to have size 9 instead of 8.
@ -9,13 +9,16 @@
.zero 1
.align 8
// CHECK: (('sh_name', 0x00000007) # '.bss'
// CHECK-NEXT: ('sh_type',
// CHECK-NEXT: ('sh_flags'
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000009)
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign',
// CHECK-NEXT: ('sh_entsize',
// CHECK: Section {
// CHECK: Name: .bss (7)
// CHECK-NEXT: Type:
// CHECK-NEXT: Flags [
// CHECK: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 9
// CHECK-NEXT: Link:
// CHECK-NEXT: Info:
// CHECK-NEXT: AddressAlignment:
// CHECK-NEXT: EntrySize:
// CHECK-NEXT: }

View File

@ -1,18 +1,26 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// Test that .debug_line is populated.
// CHECK: (('sh_name', 0x00000011) # '.debug_line'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
// CHECK-NEXT: ('sh_size', 0x0000000000000037)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ('_section_data', '33000000 02001c00 00000101 fb0e0d00 01010101 00000001 00000100 666f6f2e 63000000 00000009 02000000 00000000 00150204 000101')
// CHECK: Section {
// CHECK: Name: .debug_line
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x44
// CHECK-NEXT: Size: 55
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 33000000 02001C00 00000101 FB0E0D00
// CHECK-NEXT: 0010: 01010101 00000001 00000100 666F6F2E
// CHECK-NEXT: 0020: 63000000 00000009 02000000 00000000
// CHECK-NEXT: 0030: 00150204 000101
// CHECK-NEXT: )
// CHECK-NEXT: }
.section .debug_line,"",@progbits
.text

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that we don't regress on the size of the line info section. We used
// to handle negative line diffs incorrectly which manifested as very
@ -7,18 +7,20 @@
// FIXME: This size is the same as gnu as, but we can probably do a bit better.
// FIXME2: We need a debug_line dumper so that we can test the actual contents.
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x00000011) # '.debug_line'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
// CHECK-NEXT: ('sh_size', 0x000000000000003d)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .debug_line
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x44
// CHECK-NEXT: Size: 61
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
.section .debug_line,"",@progbits
.text

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
.global zed
foo:
@ -8,8 +8,4 @@ bar:
zed:
mov zed+(bar-foo), %eax
// CHECK: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x0000000000000005)
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x0000000b)
// CHECK-NEXT: ('r_addend', 0x0000000000000001)
// CHECK: 0x5 R_X86_64_32S zed 0x1

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the dwarf debug_line section contains no line directives.
@ -7,15 +7,17 @@
c:
.asciz "hi\n"
// CHECK: # Section 4
// CHECK-NEXT: (('sh_name', 0x0000000c) # '.debug_line'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
// CHECK-NEXT: ('sh_size', 0x0000000000000027)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .debug_line
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x44
// CHECK-NEXT: Size: 39
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }

View File

@ -1,70 +1,89 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that like gnu as we create text, data and bss by default. Also test
// that shstrtab, symtab and strtab are listed in that order.
// CHECK: ('sh_name', 0x00000001) # '.text'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000000)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: ('sh_name', 0x00000026) # '.data'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000000)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: ('sh_name', 0x00000007) # '.bss'
// CHECK-NEXT: ('sh_type', 0x00000008)
// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x0000000000000000)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: ('sh_name', 0x0000000c) # '.shstrtab'
// CHECK-NEXT: ('sh_type', 0x00000003)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x000000000000002c)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: ('sh_name', 0x0000001e) # '.symtab'
// CHECK-NEXT: ('sh_type', 0x00000002)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000060)
// CHECK-NEXT: ('sh_link', 0x00000006)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
// CHECK: ('sh_name', 0x00000016) # '.strtab'
// CHECK-NEXT: ('sh_type', 0x00000003)
// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000001)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
// CHECK: Section {
// CHECK: Name: .text
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_EXECINSTR
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .data
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .bss
// CHECK-NEXT: Type: SHT_NOBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 4
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .shstrtab
// CHECK-NEXT: Type: SHT_STRTAB
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 44
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .symtab
// CHECK-NEXT: Type: SHT_SYMTAB
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 96
// CHECK-NEXT: Link: 6
// CHECK-NEXT: Info: 4
// CHECK-NEXT: AddressAlignment: 8
// CHECK-NEXT: EntrySize: 24
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Name: .strtab
// CHECK-NEXT: Type: SHT_STRTAB
// CHECK-NEXT: Flags [
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 1
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
; RUN: llc -filetype=obj -mtriple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck -check-prefix=64 %s
; RUN: llc -filetype=obj -mtriple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck -check-prefix=64 %s
; Test that constant mergeable strings have sh_entsize set.
@ -20,25 +20,35 @@ declare void @foo(i64* nocapture) nounwind
;;;;;
; 64: (('sh_name', 0x0000004e) # '.rodata.str1.1'
; 64-NEXT: ('sh_type', 0x00000001)
; 64-NEXT: ('sh_flags', 0x0000000000000032)
; 64-NEXT: ('sh_addr',
; 64-NEXT: ('sh_offset',
; 64-NEXT: ('sh_size', 0x000000000000000d)
; 64-NEXT: ('sh_link',
; 64-NEXT: ('sh_info',
; 64-NEXT: ('sh_addralign', 0x0000000000000001)
; 64-NEXT: ('sh_entsize', 0x0000000000000001)
; 64: (('sh_name', 0x00000041) # '.rodata.cst8'
; 64-NEXT: ('sh_type', 0x00000001)
; 64-NEXT: ('sh_flags', 0x0000000000000012)
; 64-NEXT: ('sh_addr',
; 64-NEXT: ('sh_offset',
; 64-NEXT: ('sh_size', 0x0000000000000010)
; 64-NEXT: ('sh_link',
; 64-NEXT: ('sh_info',
; 64-NEXT: ('sh_addralign', 0x0000000000000008)
; 64-NEXT: ('sh_entsize', 0x0000000000000008)
; 64: Section {
; 64: Name: .rodata.str1.1
; 64-NEXT: Type: SHT_PROGBITS
; 64-NEXT: Flags [
; 64-NEXT: SHF_ALLOC
; 64-NEXT: SHF_MERGE
; 64-NEXT: SHF_STRINGS
; 64-NEXT: ]
; 64-NEXT: Address:
; 64-NEXT: Offset:
; 64-NEXT: Size: 13
; 64-NEXT: Link:
; 64-NEXT: Info:
; 64-NEXT: AddressAlignment: 1
; 64-NEXT: EntrySize: 1
; 64-NEXT: }
; 64: Section {
; 64: Name: .rodata.cst8
; 64-NEXT: Type: SHT_PROGBITS
; 64-NEXT: Flags [
; 64-NEXT: SHF_ALLOC
; 64-NEXT: SHF_MERGE
; 64-NEXT: ]
; 64-NEXT: Address:
; 64-NEXT: Offset:
; 64-NEXT: Size: 16
; 64-NEXT: Link:
; 64-NEXT: Info:
; 64-NEXT: AddressAlignment: 8
; 64-NEXT: EntrySize: 8
; 64-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that mergeable constants have sh_entsize set.
@ -32,38 +32,53 @@
.quad 42
.quad 42
// CHECK: # Section 4
// CHECK-NEXT: ('sh_name', 0x00000048) # '.rodata.str1.1'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000032)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x000000000000000d)
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000001)
// CHECK: # Section 5
// CHECK-NEXT: ('sh_name', 0x00000039) # '.rodata.str2.1'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000032)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000010)
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000002)
// CHECK: # Section 6
// CHECK-NEXT: ('sh_name', 0x0000002c) # '.rodata.cst8
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000012)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size', 0x0000000000000010)
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000008)
// CHECK: Section {
// CHECK: Index: 4
// CHECK-NEXT: Name: .rodata.str1.1
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_MERGE
// CHECK-NEXT: SHF_STRINGS
// CHECK-NEXT: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 13
// CHECK-NEXT: Link:
// CHECK-NEXT: Info:
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 1
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Index: 5
// CHECK-NEXT: Name: .rodata.str2.1
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_MERGE
// CHECK-NEXT: SHF_STRINGS
// CHECK-NEXT: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 16
// CHECK-NEXT: Link:
// CHECK-NEXT: Info:
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 2
// CHECK-NEXT: }
// CHECK: Section {
// CHECK: Index: 6
// CHECK-NEXT: Name: .rodata.cst8
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_MERGE
// CHECK-NEXT: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size: 16
// CHECK-NEXT: Link:
// CHECK-NEXT: Info:
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 8
// CHECK-NEXT: }

View File

@ -1,23 +1,25 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that the STT_FILE symbol precedes the other local symbols.
.file "foo"
foa:
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x4)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0xfff1)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 2
// CHECK-NEXT: (('st_name', 0x00000005) # 'foa'
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x0)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK: Symbol {
// CHECK: Name: foo (1)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: File
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: (0xFFF1)
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: foa (5)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: None
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text (0x1)
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
// Test that on ELF:
@ -14,97 +14,13 @@ foo:
ret
.size foo, .-foo
// Section 4 is .debug_line
// CHECK: # Section 4
// CHECK-NEXT: # '.debug_line'
// The two relocations, one to symbol 6 and one to 4
// CHECK: # '.rel.debug_info'
// CHECK-NEXT: ('sh_type',
// CHECK-NEXT: ('sh_flags'
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size',
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign',
// CHECK-NEXT: ('sh_entsize',
// CHECK-NEXT: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x00000006)
// CHECK-NEXT: ('r_sym', 0x000006)
// CHECK-NEXT: ('r_type', 0x01)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 1
// CHECK-NEXT: (('r_offset', 0x0000000c)
// CHECK-NEXT: ('r_sym', 0x000004)
// CHECK-NEXT: ('r_type', 0x01)
// CHECK-NEXT: ),
// Section 8 is .debug_abbrev
// CHECK: # Section 8
// CHECK-NEXT: (('sh_name', 0x00000001) # '.debug_abbrev'
// Section 9 is .debug_aranges
// CHECK: # Section 9
// CHECK-NEXT: (('sh_name', 0x0000001e) # '.debug_aranges'
// Two relocations in .debug_aranges, one to text and one to debug_info.
// CHECK: # '.rel.debug_aranges'
// CHECK: # Relocation 0
// CHECK-NEXT: (('r_offset', 0x00000006)
// CHECK-NEXT: ('r_sym', 0x000005)
// CHECK-NEXT: ('r_type', 0x01)
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 1
// CHECK-NEXT: (('r_offset', 0x00000010)
// CHECK-NEXT: ('r_sym', 0x000001)
// CHECK-NEXT: ('r_type', 0x01)
// CHECK-NEXT: ),
// Symbol 1 is section 1 (.text)
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_value', 0x00000000)
// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x3)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0001)
// CHECK-NEXT: ),
// Symbol 4 is section 4 (.debug_line)
// CHECK: # Symbol 4
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_value', 0x00000000)
// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x3)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0004)
// CHECK-NEXT: ),
// Symbol 5 is section 6 (.debug_info)
// CHECK: # Symbol 5
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_value', 0x00000000)
// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x3)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0006)
// CHECK-NEXT: ),
// Symbol 6 is section 8 (.debug_abbrev)
// CHECK: # Symbol 6
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_value', 0x00000000)
// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x3)
// CHECK-NEXT: ('st_other', 0x00)
// CHECK-NEXT: ('st_shndx', 0x0008)
// CHECK-NEXT: ),
// CHECK: Relocations [
// CHECK: Section ({{[^ ]+}}) .debug_info {
// CHECK-NEXT: 0x6 R_386_32 .debug_abbrev 0x0
// CHECK-NEXT: 0xC R_386_32 .debug_line 0x0
// CHECK: }
// CHECK-NEXT: Section ({{[^ ]+}}) .debug_aranges {
// CHECK-NEXT: 0x6 R_386_32 .debug_info 0x0
// CHECK-NEXT: 0x10 R_386_32 .text 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the
// start of the addl/leal.
@ -10,14 +10,20 @@
foo:
addl _GLOBAL_OFFSET_TABLE_-foo,%ebx
// CHECK: ('sh_name', 0x00000005) # '.text'
// CHECK-NEXT: ('sh_type',
// CHECK-NEXT: ('sh_flags',
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size',
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign',
// CHECK-NEXT: ('sh_entsize',
// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000 031d0200 0000')
// CHECK: Section {
// CHECK: Name: .text
// CHECK-NEXT: Type:
// CHECK-NEXT: Flags [
// CHECK: ]
// CHECK-NEXT: Address:
// CHECK-NEXT: Offset:
// CHECK-NEXT: Size:
// CHECK-NEXT: Link:
// CHECK-NEXT: Info:
// CHECK-NEXT: AddressAlignment:
// CHECK-NEXT: EntrySize:
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 81C30200 00008D9B 02000000 031D0200
// CHECK-NEXT: 0010: 0000
// CHECK-NEXT: )
// CHECK-NEXT: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
// Test that this produces a R_X86_64_GOT32 and that we have an undefined
// reference to _GLOBAL_OFFSET_TABLE_.
@ -6,20 +6,15 @@
movl foo@GOT, %eax
movl foo@GOTPCREL(%rip), %eax
// CHECK: ('_relocations', [
// CHECK-NEXT: # Relocation 0
// CHECK-NEXT: (('r_offset',
// CHECK-NEXT: ('r_sym',
// CHECK-NEXT: ('r_type', 0x00000003)
// CHECK-NEXT: ('r_addend',
// CHECK-NEXT: ),
// CHECK-NEXT: # Relocation 1
// CHECK-NEXT: (('r_offset',
// CHECK-NEXT: ('r_sym',
// CHECK-NEXT: ('r_type', 0x00000009)
// CHECK-NEXT: ('r_addend',
// CHECK-NEXT: ),
// CHECK-NEXT: ])
// CHECK: Relocations [
// CHECK: Section ({{[^ ]+}}) .text {
// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOT32 foo 0x{{[^ ]+}}
// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOTPCREL foo 0x{{[^ ]+}}
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_'
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK: Symbol {
// CHECK: Name: _GLOBAL_OFFSET_TABLE_
// CHECK-NEXT: Value:
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Global

View File

@ -1,16 +1,23 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// CHECK: (('sh_name', 0x00000007) # '.comment'
// CHECK-NEXT: ('sh_type', 0x00000001)
// CHECK-NEXT: ('sh_flags', 0x0000000000000030)
// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
// CHECK-NEXT: ('sh_size', 0x000000000000000d)
// CHECK-NEXT: ('sh_link', 0x00000000)
// CHECK-NEXT: ('sh_info', 0x00000000)
// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
// CHECK-NEXT: ('sh_entsize', 0x0000000000000001)
// CHECK-NEXT: ('_section_data', '00666f6f 00626172 007a6564 00')
// CHECK: Section {
// CHECK: Name: .comment
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
// CHECK-NEXT: SHF_MERGE
// CHECK-NEXT: SHF_STRINGS
// CHECK-NEXT: ]
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Offset: 0x40
// CHECK-NEXT: Size: 13
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
// CHECK-NEXT: EntrySize: 1
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 00666F6F 00626172 007A6564 00
// CHECK-NEXT: )
// CHECK-NEXT: }
.ident "foo"
.ident "bar"

View File

@ -1,21 +1,23 @@
// RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s
// RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
.lcomm A, 5
.lcomm B, 32 << 20
// CHECK: (('st_name', 0x00000001) # 'A'
// CHECK: ('st_value', 0x00000000)
// CHECK: ('st_size', 0x00000005)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x1)
// CHECK: ('st_other', 0x00)
// CHECK: ('st_shndx', 0x0003)
// CHECK: ),
// CHECK: (('st_name', 0x00000003) # 'B'
// CHECK: ('st_value', 0x00000005)
// CHECK: ('st_size', 0x02000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x1)
// CHECK: ('st_other', 0x00)
// CHECK: ('st_shndx', 0x0003)
// CHECK: ),
// CHECK: Symbol {
// CHECK: Name: A (1)
// CHECK-NEXT: Value: 0x0
// CHECK-NEXT: Size: 5
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .bss (0x3)
// CHECK-NEXT: }
// CHECK: Symbol {
// CHECK: Name: B (3)
// CHECK-NEXT: Value: 0x5
// CHECK-NEXT: Size: 33554432
// CHECK-NEXT: Binding: Local
// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .bss (0x3)
// CHECK-NEXT: }

Some files were not shown because too many files have changed in this diff Show More