# Check that search paths explicitly provided by the -L option
-# are used in search before default paths.
+# are used in search before default paths.
RUN: not lld -flavor gnu -target x86_64 -t -ltest \
RUN: --sysroot=%p/Inputs -L%p/Inputs 2> %t
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: not lld -flavor gnu -target arm64 -o %t-exe %t-obj
-# CHECK: Relocation out of range in file {{.*}}: reference from _start+0 to data1+1048577 of type 274 (R_AARCH64_ADR_PREL_LO21)
+# CHECK: Relocation out of range in file {{.*}}: reference from _start+0 to data1+1048577 of type 274 (R_AARCH64_ADR_PREL_LO21)
!ELF
FileHeader: !FileHeader
# Check handling of group relocations (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G1_NC,
# R_ARM_LDR_PC_G2).
-#
+#
# RUN: yaml2obj -format=elf %s > %t-o.o
# RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \
# RUN: -e plt_func %t-o.o -o %t
# CHECK: 00401000 g .data 00000004 got_func
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_ARM
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
Info: .text
AddressAlign: 0x4
- Relocations:
+ Relocations:
- Offset: 0
Symbol: got_func
Type: R_ARM_ALU_PC_G0_NC
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x4
Content: 74004000
-Symbols:
- Local:
- Global:
+Symbols:
+ Local:
+ Global:
- Name: plt_func
Type: STT_FUNC
Section: .text
# The following instruction creates a RM_ARM_V4BX relocation that
# allows the linker to replace the bx instruction to a ARMv4
# compatible one. Currently lld does not change it.
-# CHECK: 400114: 1e ff 2f 01 bxeq lr
+# CHECK: 400114: 1e ff 2f 01 bxeq lr
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_ARM
Flags: [ EF_ARM_EABI_VER5 ]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000004
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000000
Symbol: ''
Type: R_ARM_V4BX
Type: SHT_ARM_ATTRIBUTES
AddressAlign: 0x0000000000000001
Content: 4115000000616561626900010B000000060208010901
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .ARM.attributes
Type: STT_SECTION
Section: .ARM.attributes
- Global:
+ Global:
- Name: main
Type: STT_FUNC
Section: .text
# jump11.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_ARM
Flags: [ EF_ARM_EABI_VER5 ]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000004
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x000000000000012A
Symbol: __gnu_h2f_internal
Type: R_ARM_THM_JUMP11
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000001
Content: ''
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
Section: .text
Value: 0x0000000000000001
Size: 0x00000000000000C2
- Global:
+ Global:
- Name: __gnu_f2h_ieee
Type: STT_FUNC
Section: .text
- Name: __gnu_h2f_internal
# thm-call.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_ARM
Flags: [ EF_ARM_EABI_VER5 ]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000004
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000014
Symbol: my_fn
Type: R_ARM_THM_CALL
- Offset: 0x0000000000000018
Symbol: weak_fn
Type: R_ARM_THM_CALL
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: '$t'
Section: .text
- Global:
+ Global:
- Name: my_fn
Type: STT_FUNC
Section: .text
Section: .text
Value: 0x0000000000000011
Size: 0x0000000000000012
- Weak:
+ Weak:
- Name: weak_fn
# arm-call.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_ARM
Flags: [ EF_ARM_EABI_VER5 ]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000004
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000024
Symbol: my_fn
Type: R_ARM_CALL
- Offset: 0x0000000000000028
Symbol: weak_fn
Type: R_ARM_CALL
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: '$a'
Section: .text
- Global:
+ Global:
- Name: my_fn
Type: STT_FUNC
Section: .text
Section: .text
Value: 0x000000000000001C
Size: 0x000000000000001C
- Weak:
+ Weak:
- Name: weak_fn
...
---
-FileHeader:
+FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_X86_64
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000005
Symbol: my_weak_func
Type: R_X86_64_PC32
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000004
Content: ''
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .bss
Type: STT_SECTION
Section: .bss
- Global:
+ Global:
- Name: my_func
Type: STT_FUNC
Section: .text
Size: 0x000000000000000B
- Weak:
+ Weak:
- Name: my_weak_func
Type: STT_FUNC
Section: .text
---
-FileHeader:
+FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_X86_64
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x000000000000001D
Symbol: my_func
Type: R_X86_64_PC32
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000004
Content: ''
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .bss
Type: STT_SECTION
Section: .bss
- Global:
+ Global:
- Name: main
Type: STT_FUNC
Section: .text
# so.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_PIC,
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [SHF_ALLOC, SHF_EXECINSTR]
AddressAlign: 16
Size: 4
-Symbols:
- Global:
+Symbols:
+ Global:
- Name: E1
Type: STT_FUNC
Section: .text
# t1.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_PIC,
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [SHF_ALLOC, SHF_EXECINSTR]
AddressAlign: 16
Size: 4
-Symbols:
- Global:
+Symbols:
+ Global:
- Name: T1
Type: STT_FUNC
Section: .text
# t2.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_PIC,
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [SHF_ALLOC, SHF_EXECINSTR]
Link: .symtab
AddressAlign: 4
Info: .gnu_extab
- Relocations:
+ Relocations:
- Offset: 1
Symbol: T1
Type: R_MIPS_EH
Link: .symtab
AddressAlign: 4
Info: .eh_frame_entry
- Relocations:
+ Relocations:
- Offset: 0
Symbol: .text
Type: R_MIPS_PC32
Symbol: .gnu_extab
Type: R_MIPS_PC32
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
Value: 0
Size: 4
- Global:
+ Global:
- Name: T0
Type: STT_FUNC
Section: .text
# t1.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_PIC,
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [SHF_ALLOC, SHF_EXECINSTR]
AddressAlign: 16
Size: 4
-Symbols:
- Global:
+Symbols:
+ Global:
- Name: T1
Type: STT_FUNC
Section: .text
# t2.o
---
-FileHeader:
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_PIC,
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [SHF_ALLOC, SHF_EXECINSTR]
Link: .symtab
AddressAlign: 4
Info: .gnu_extab
- Relocations:
+ Relocations:
- Offset: 1
Symbol: T1
Type: R_MIPS_EH
Link: .symtab
AddressAlign: 4
Info: .eh_frame_entry
- Relocations:
+ Relocations:
- Offset: 0
Symbol: .text
Type: R_MIPS_PC32
Symbol: .gnu_extab
Type: R_MIPS_PC32
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
Value: 0
Size: 4
- Global:
+ Global:
- Name: T0
Type: STT_FUNC
Section: .text
---
-FileHeader:
+FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_X86_64
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000007
Symbol: prog2
Type: R_X86_64_PC32
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .eh_frame
- Relocations:
+ Relocations:
- Offset: 0x0000000000000020
Symbol: .text
Type: R_X86_64_PC32
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .eh_frame
Type: STT_SECTION
Section: .eh_frame
- Global:
+ Global:
- Name: main
Type: STT_FUNC
Section: .text
---
-FileHeader:
+FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_X86_64
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000006
Symbol: .rodata.str1.1
Type: R_X86_64_64
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .eh_frame
- Relocations:
+ Relocations:
- Offset: 0x0000000000000020
Symbol: .text
Type: R_X86_64_PC32
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .eh_frame
Type: STT_SECTION
Section: .eh_frame
- Global:
+ Global:
- Name: prog2
Type: STT_FUNC
Section: .text
---
-FileHeader:
+FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_X86_64
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x0000000000000009
Symbol: main
Type: R_X86_64_PC32
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000004
Content: ''
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .bss
Type: STT_SECTION
Section: .bss
- Global:
+ Global:
- Name: _start
Section: .text
Value: 0x0000000000000008
---
-FileHeader:
+FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_X86_64
-Sections:
+Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Link: .symtab
AddressAlign: 0x0000000000000008
Info: .text
- Relocations:
+ Relocations:
- Offset: 0x000000000000000F
Symbol: .data
Type: R_X86_64_32S
Flags: [ SHF_WRITE, SHF_ALLOC ]
AddressAlign: 0x0000000000000004
Content: ''
-Symbols:
- Local:
+Symbols:
+ Local:
- Name: main
Section: .text
- Name: msg
- Name: .bss
Type: STT_SECTION
Section: .bss
- Global:
+ Global:
- Name: _start
Section: .text
Value: 0x000000000000001D
arch: armv7
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0xFE, 0xFF, 0xFF, 0xEB, 0x02, 0x00, 0x00, 0xFA,
- 0xFC, 0xFF, 0xFF, 0xEB, 0xFB, 0xFF, 0xFF, 0xFA,
+ content: [ 0xFE, 0xFF, 0xFF, 0xEB, 0x02, 0x00, 0x00, 0xFA,
+ 0xFC, 0xFF, 0xFF, 0xEB, 0xFB, 0xFF, 0xFF, 0xFA,
0x1E, 0xFF, 0x2F, 0xE1, 0x1E, 0xFF, 0x2F, 0xE1 ]
- relocations:
+ relocations:
- offset: 0x0000000C
type: ARM_RELOC_BR24
length: 2
attributes: [ ]
address: 0x0000000000000018
content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x00000004
type: ARM_RELOC_VANILLA
length: 2
pc-rel: false
extern: true
symbol: 3
-local-symbols:
+local-symbols:
- name: _d2
type: N_SECT
sect: 2
value: 0x0000000000000018
-global-symbols:
+global-symbols:
- name: _a1
type: N_SECT
scope: [ N_EXT ]
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000014
-undefined-symbols:
+undefined-symbols:
- name: _t1
type: N_UNDF
scope: [ N_EXT ]
arch: x86_64
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x8B, 0x0D, 0x00,
- 0x00, 0x00, 0x00, 0x48, 0x8B, 0x05, 0x00, 0x00,
- 0x00, 0x00, 0x8B, 0x00, 0x03, 0x01, 0x48, 0x8B,
- 0x0D, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x5D,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x8B, 0x0D, 0x00,
+ 0x00, 0x00, 0x00, 0x48, 0x8B, 0x05, 0x00, 0x00,
+ 0x00, 0x00, 0x8B, 0x00, 0x03, 0x01, 0x48, 0x8B,
+ 0x0D, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x5D,
0xC3 ]
- relocations:
+ relocations:
- offset: 0x00000019
type: X86_64_RELOC_GOT_LOAD
length: 2
pc-rel: true
extern: true
symbol: 3
-global-symbols:
+global-symbols:
- name: _main
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000000
-undefined-symbols:
+undefined-symbols:
- name: _bar
type: N_UNDF
scope: [ N_EXT ]
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0x40, 0xF2, 0x25, 0x00, 0xC0, 0xF2, 0x00, 0x00,
- 0x40, 0xF2, 0x01, 0x01, 0xC0, 0xF2, 0x00, 0x01,
- 0x40, 0xF2, 0x4E, 0x02, 0xC0, 0xF2, 0x00, 0x02,
- 0x40, 0xF2, 0x2A, 0x03, 0xC0, 0xF2, 0x00, 0x03,
- 0x78, 0x44, 0x70, 0x47, 0x70, 0x47, 0x25, 0x00,
- 0x00, 0xE3, 0x00, 0x00, 0x40, 0xE3, 0xD7, 0x1F,
- 0x0F, 0xE3, 0xFF, 0x1F, 0x4F, 0xE3, 0x4E, 0x20,
- 0x00, 0xE3, 0x00, 0x20, 0x40, 0xE3, 0x00, 0x30,
- 0x00, 0xE3, 0x00, 0x30, 0x40, 0xE3, 0x0F, 0x00,
- 0x80, 0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x1E, 0xFF,
+ content: [ 0x40, 0xF2, 0x25, 0x00, 0xC0, 0xF2, 0x00, 0x00,
+ 0x40, 0xF2, 0x01, 0x01, 0xC0, 0xF2, 0x00, 0x01,
+ 0x40, 0xF2, 0x4E, 0x02, 0xC0, 0xF2, 0x00, 0x02,
+ 0x40, 0xF2, 0x2A, 0x03, 0xC0, 0xF2, 0x00, 0x03,
+ 0x78, 0x44, 0x70, 0x47, 0x70, 0x47, 0x25, 0x00,
+ 0x00, 0xE3, 0x00, 0x00, 0x40, 0xE3, 0xD7, 0x1F,
+ 0x0F, 0xE3, 0xFF, 0x1F, 0x4F, 0xE3, 0x4E, 0x20,
+ 0x00, 0xE3, 0x00, 0x20, 0x40, 0xE3, 0x00, 0x30,
+ 0x00, 0xE3, 0x00, 0x30, 0x40, 0xE3, 0x0F, 0x00,
+ 0x80, 0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x1E, 0xFF,
0x2F, 0xE1 ]
relocations:
- offset: 0x00000042
# RUN: %p/Inputs/arm-interworking.yaml -o %t | FileCheck %s \
# RUN: && lld -flavor darwin -arch armv7 -dylib -print_atoms \
# RUN: %p/Inputs/libSystem.yaml %t -o %t2 | FileCheck %s \
-# RUN: && macho-dump --dump-section-data %t2 | FileCheck -check-prefix=CODE %s
+# RUN: && macho-dump --dump-section-data %t2 | FileCheck -check-prefix=CODE %s
#
# Test thumb and arm branches round trip through -r.
# Test bl/blx instructions are fixed up properly.
arch: armv7
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0xFF, 0xF7, 0xFE, 0xFF, 0xC0, 0x46, 0xFF, 0xF7,
- 0xFC, 0xEF, 0xC0, 0x46, 0xFF, 0xF7, 0xF8, 0xEF,
- 0xFF, 0xF7, 0xF6, 0xFF, 0xC0, 0x46, 0xFF, 0xF7,
- 0xF3, 0xFF, 0xC0, 0x46, 0x00, 0xF0, 0x06, 0xE8,
- 0xC0, 0x46, 0x00, 0xF0, 0x03, 0xF8, 0x00, 0xF0,
+ content: [ 0xFF, 0xF7, 0xFE, 0xFF, 0xC0, 0x46, 0xFF, 0xF7,
+ 0xFC, 0xEF, 0xC0, 0x46, 0xFF, 0xF7, 0xF8, 0xEF,
+ 0xFF, 0xF7, 0xF6, 0xFF, 0xC0, 0x46, 0xFF, 0xF7,
+ 0xF3, 0xFF, 0xC0, 0x46, 0x00, 0xF0, 0x06, 0xE8,
+ 0xC0, 0x46, 0x00, 0xF0, 0x03, 0xF8, 0x00, 0xF0,
0x02, 0xF8, 0x70, 0x47, 0x70, 0x47, 0x70, 0x47 ]
- relocations:
+ relocations:
- offset: 0x00000026
type: ARM_THUMB_RELOC_BR22
length: 2
attributes: [ ]
address: 0x0000000000000030
content: [ 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x00000004
type: ARM_RELOC_VANILLA
length: 2
pc-rel: false
extern: false
symbol: 1
-local-symbols:
+local-symbols:
- name: _t3
type: N_SECT
sect: 1
type: N_SECT
sect: 2
value: 0x0000000000000030
-global-symbols:
+global-symbols:
- name: _t1
type: N_SECT
scope: [ N_EXT ]
sect: 1
desc: [ N_ARM_THUMB_DEF ]
value: 0x000000000000002C
-undefined-symbols:
+undefined-symbols:
- name: _a1
type: N_UNDF
scope: [ N_EXT ]
...
-# CHECK: defined-atoms:
+# CHECK: defined-atoms:
# CHECK: - name: _d1
# CHECK: type: data
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer32
# CHECK: offset: 0
# CHECK: target: _t2
# CHECK: target: _a1
# CHECK: - name: _d2
# CHECK: type: data
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer32
# CHECK: offset: 0
# CHECK: target: _t1
# CHECK: target: _a1
# CHECK: - name: _t1
# CHECK: scope: global
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: modeThumbCode
# CHECK: offset: 0
# CHECK: target: _t1
# CHECK: - name: _t2
# CHECK: scope: global
# CHECK: content: [ 70, 47 ]
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: modeThumbCode
# CHECK: offset: 0
# CHECK: target: _t2
# CHECK: - name: _t3
# CHECK: content: [ 70, 47 ]
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: modeThumbCode
# CHECK: offset: 0
# CHECK: target: _t3
# CHECK: - name: _a1
# CHECK: scope: global
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: arm_bl24
# CHECK: offset: 0
# CHECK: target: _a1
# nop
# blx _t2
# bx lr
-#
+#
# .globl _t2
# .thumb_func _t2
#_t2:
# bx lr
-#
+#
# .data
#_d1: .long _t2
# .long _a1
-
-
+
+
# Input file two:
#
# .align 2
# bl _t1
# blx _t2
# bx lr
-#
+#
# .globl _a2
#_a2:
# bx lr
-#
+#
# .data
#_d2: .long _t1
# .long _a1
-
\ No newline at end of file
+
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0x04, 0x10, 0x9F, 0xE5, 0x04, 0x20, 0x9F, 0xE5,
- 0x1E, 0xFF, 0x2F, 0xE1, 0x78, 0x56, 0x34, 0x12,
+ content: [ 0x04, 0x10, 0x9F, 0xE5, 0x04, 0x20, 0x9F, 0xE5,
+ 0x1E, 0xFF, 0x2F, 0xE1, 0x78, 0x56, 0x34, 0x12,
0x21, 0x43, 0x65, 0x87 ]
local-symbols:
- name: constants1
alignment: 2
address: 0x0000000000000000
content: [ 0x00, 0x00, 0x00, 0x00 ]
-global-symbols:
+global-symbols:
- name: _myData
type: N_SECT
scope: [ N_EXT ]
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00,
+ content: [ 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00,
0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00 ]
relocations:
- offset: 0x0000000B
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
0x89, 0xE5, 0x5D, 0xC3 ]
- segment: __DATA
section: __data
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
0x89, 0xE5, 0x5D, 0xC3 ]
- segment: __DATA
section: __data
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
0x89, 0xE5, 0x5D, 0xC3 ]
- segment: __DATA
section: __data
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 4
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10,
- 0xC7, 0x45, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xB0,
- 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10,
+ 0xC7, 0x45, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xB0,
+ 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0,
0x48, 0x83, 0xC4, 0x10, 0x5D, 0xC3 ]
- relocations:
+ relocations:
- offset: 0x00000012
type: X86_64_RELOC_BRANCH
length: 2
# RUN: lld -flavor darwin -arch x86_64 -dylib %p/Inputs/bar.yaml \
# RUN: -install_name /usr/lib/libbar.dylib %p/Inputs/libSystem.yaml -o %t1.dylib
# RUN: lld -flavor darwin -arch x86_64 -dylib %s -all_load %t1.dylib \
-# RUN: -install_name /usr/lib/libfoo.dylib %p/Inputs/libSystem.yaml -o %t
+# RUN: -install_name /usr/lib/libfoo.dylib %p/Inputs/libSystem.yaml -o %t
# RUN: llvm-nm -m %t | FileCheck %s
#
#
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x31, 0xC0, 0x5D, 0xE9,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x31, 0xC0, 0x5D, 0xE9,
0x00, 0x00, 0x00, 0x00 ]
relocations:
- offset: 0x00000008
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
content: [ 0xC3 ]
-global-symbols:
+global-symbols:
- name: _main
type: N_SECT
scope: [ N_EXT ]
#
-# Test framework and SDK search paths.
+# Test framework and SDK search paths.
# myFrameworks is not an absolute path, so it should not by found in SDK
# /Custom/Frameworks should be found in SDK
# /opt/Frameworks should not be found in SDK
arch: x86_64
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x8B, 0x0D, 0x00,
- 0x00, 0x00, 0x00, 0x48, 0x8B, 0x05, 0x00, 0x00,
- 0x00, 0x00, 0x8B, 0x00, 0x03, 0x01, 0x48, 0x8B,
- 0x0D, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x5D,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x8B, 0x0D, 0x00,
+ 0x00, 0x00, 0x00, 0x48, 0x8B, 0x05, 0x00, 0x00,
+ 0x00, 0x00, 0x8B, 0x00, 0x03, 0x01, 0x48, 0x8B,
+ 0x0D, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x5D,
0xC3 ]
- relocations:
+ relocations:
- offset: 0x00000019
type: X86_64_RELOC_GOT_LOAD
length: 2
pc-rel: true
extern: true
symbol: 3
-global-symbols:
+global-symbols:
- name: _func
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000000
-undefined-symbols:
+undefined-symbols:
- name: _aaa
type: N_UNDF
scope: [ N_EXT ]
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0x80, 0xB5, 0x40, 0xF2, 0x06, 0x00, 0x6F, 0x46,
- 0xC0, 0xF2, 0x00, 0x00, 0x78, 0x44, 0xFF, 0xF7,
+ content: [ 0x80, 0xB5, 0x40, 0xF2, 0x06, 0x00, 0x6F, 0x46,
+ 0xC0, 0xF2, 0x00, 0x00, 0x78, 0x44, 0xFF, 0xF7,
0xF8, 0xEF, 0x00, 0x20, 0x80, 0xBD ]
- relocations:
+ relocations:
- offset: 0x0000000E
type: ARM_THUMB_RELOC_BR22
length: 2
attributes: [ ]
address: 0x0000000000000016
content: [ 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x0A, 0x00 ]
-global-symbols:
+global-symbols:
- name: _main
type: N_SECT
scope: [ N_EXT ]
sect: 1
desc: [ N_ARM_THUMB_DEF ]
value: 0x0000000000000000
-undefined-symbols:
+undefined-symbols:
- name: _printf
type: N_UNDF
scope: [ N_EXT ]
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x89, 0xE5, 0x83, 0xEC, 0x08, 0xE8, 0x00,
- 0x00, 0x00, 0x00, 0x58, 0x8D, 0x80, 0x16, 0x00,
- 0x00, 0x00, 0x89, 0x04, 0x24, 0xE8, 0xE6, 0xFF,
- 0xFF, 0xFF, 0x31, 0xC0, 0x83, 0xC4, 0x08, 0x5D,
+ content: [ 0x55, 0x89, 0xE5, 0x83, 0xEC, 0x08, 0xE8, 0x00,
+ 0x00, 0x00, 0x00, 0x58, 0x8D, 0x80, 0x16, 0x00,
+ 0x00, 0x00, 0x89, 0x04, 0x24, 0xE8, 0xE6, 0xFF,
+ 0xFF, 0xFF, 0x31, 0xC0, 0x83, 0xC4, 0x08, 0x5D,
0xC3 ]
relocations:
- offset: 0x00000016
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x8B, 0x05, 0x00,
- 0x00, 0x00, 0x00, 0x48, 0x8B, 0x38, 0x48, 0x8D,
- 0x35, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0, 0xE8,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x8B, 0x05, 0x00,
+ 0x00, 0x00, 0x00, 0x48, 0x8B, 0x38, 0x48, 0x8D,
+ 0x35, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0, 0xE8,
0x00, 0x00, 0x00, 0x00, 0x31, 0xC0, 0x5D, 0xC3 ]
- relocations:
+ relocations:
- offset: 0x00000018
type: X86_64_RELOC_BRANCH
length: 2
attributes: [ ]
alignment: 3
address: 0x0000000000000028
- content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x00000000
type: X86_64_RELOC_UNSIGNED
length: 3
attributes: [ ]
alignment: 3
address: 0x0000000000000048
- content: [ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x7A, 0x52, 0x00, 0x01, 0x78, 0x10, 0x01,
- 0x10, 0x0C, 0x07, 0x08, 0x90, 0x01, 0x00, 0x00,
- 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
- 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x41, 0x0E, 0x10, 0x86, 0x02, 0x43, 0x0D,
+ content: [ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x7A, 0x52, 0x00, 0x01, 0x78, 0x10, 0x01,
+ 0x10, 0x0C, 0x07, 0x08, 0x90, 0x01, 0x00, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
+ 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x0E, 0x10, 0x86, 0x02, 0x43, 0x0D,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
-local-symbols:
+local-symbols:
- name: L1
type: N_SECT
sect: 2
type: N_SECT
sect: 4
value: 0x0000000000000048
-global-symbols:
+global-symbols:
- name: _main
type: N_SECT
scope: [ N_EXT ]
scope: [ N_EXT ]
sect: 4
value: 0x0000000000000060
-undefined-symbols:
+undefined-symbols:
- name: ___stdoutp
type: N_UNDF
scope: [ N_EXT ]
...
-# CHECK: defined-atoms:
+# CHECK: defined-atoms:
# CHECK: - name: _foo
arch: x86_64
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x31, 0xC0, 0x5D, 0xE9,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x31, 0xC0, 0x5D, 0xE9,
0x00, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x00000008
type: X86_64_RELOC_BRANCH
length: 2
attributes: [ ]
alignment: 3
address: 0x0000000000000010
- content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x00000008
type: X86_64_RELOC_UNSIGNED
length: 3
pc-rel: false
extern: true
symbol: 0
-local-symbols:
+local-symbols:
- name: _my_open
type: N_SECT
sect: 1
sect: 2
desc: [ N_NO_DEAD_STRIP ]
value: 0x0000000000000010
-undefined-symbols:
+undefined-symbols:
- name: _open
type: N_UNDF
scope: [ N_EXT ]
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x5D, 0xC3, 0x55, 0x48,
0x89, 0xE5, 0x5D, 0xC3 ]
- segment: __DATA
section: __data
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 4
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10,
- 0xC7, 0x45, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xB0,
- 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10,
+ 0xC7, 0x45, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xB0,
+ 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0,
0x48, 0x83, 0xC4, 0x10, 0x5D, 0xC3 ]
relocations:
- offset: 0x00000012
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 4
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10,
- 0xC7, 0x45, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xB0,
- 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x48, 0x83, 0xEC, 0x10,
+ 0xC7, 0x45, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xB0,
+ 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xC0,
0x48, 0x83, 0xC4, 0x10, 0x5D, 0xC3 ]
relocations:
- offset: 0x00000012
attributes: [ ]
alignment: 3
address: 0x0000000000000000
- content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
relocations:
- offset: 0x00000030
value: 0x0000000000000001
...
-# CHECK: defined-atoms:
+# CHECK: defined-atoms:
# CHECK: - name: _pad
# CHECK: scope: global
# CHECK: content: [ CC ]
type: S_REGULAR
attributes: [ ]
address: 0x00000000000000A0
- content: [ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0xA4, 0xFF, 0xFF, 0xFF,
- 0xA4, 0xFF, 0xFF, 0xFF, 0x45, 0xFF, 0xFF, 0xFF,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xA4, 0xFF, 0xFF, 0xFF,
+ 0xA4, 0xFF, 0xFF, 0xFF, 0x45, 0xFF, 0xFF, 0xFF,
0x45, 0xFF, 0xFF, 0xFF ]
relocations:
- offset: 0x00000020
# CHECK: offset: 68
# CHECK: target: _undef
# CHECK: addend: 8
-# CHECK: undefined-atoms:
+# CHECK: undefined-atoms:
# CHECK: - name: _undef
#
#
# .code 32
-# .align 2
+# .align 2
#_foo_arm:
# bl _x
# bl _x+4
# movt r5, :upper16:_undef
# movw r6, :lower16:_undef+8
# movt r6, :upper16:_undef+8
-#
+#
#
# .data
#_x: .long 0
value: 0x0000000000000000
...
-# CHECK:defined-atoms:
+# CHECK:defined-atoms:
# CHECK: - ref-name: L000
# CHECK: scope: hidden
# CHECK: type: c-string
# CHECK: - scope: hidden
# CHECK: type: cfstring
# CHECK: merge: by-content
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer64
# CHECK: offset: 0
# CHECK: target: ___CFConstantStringClassReference
# CHECK: - scope: hidden
# CHECK: type: cfstring
# CHECK: merge: by-content
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer64
# CHECK: offset: 0
# CHECK: target: ___CFConstantStringClassReference
# CHECK: - kind: pointer64
# CHECK: offset: 16
# CHECK: target: L001
-# CHECK:undefined-atoms:
+# CHECK:undefined-atoms:
# CHECK: - name: ___CFConstantStringClassReference
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0x00, 0xBF, 0x00, 0xBF, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x00, 0xBF,
- 0x00, 0xF0, 0x20, 0xE3, 0x0A, 0x00, 0x00, 0x00,
- 0x0B, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
+ content: [ 0x00, 0xBF, 0x00, 0xBF, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x00, 0xBF,
+ 0x00, 0xF0, 0x20, 0xE3, 0x0A, 0x00, 0x00, 0x00,
+ 0x0B, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0xE3 ]
local-symbols:
- name: _foo_thumb
#
#
# .code 32
-# .align 2
+# .align 2
#_foo_arm:
# nop
#
#
#_bar:
# ret
-#
+#
# .section __DATA,__custom
#L1:
# .quad 0
-#
+#
# .data
#_d:
# .quad _foo
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ ]
alignment: 3
address: 0x0000000000000008
- content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xD2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xC8, 0xFF, 0xFF, 0xFF, 0xC8, 0xFF, 0xFF, 0xFF,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xD2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xC8, 0xFF, 0xFF, 0xFF, 0xC8, 0xFF, 0xFF, 0xFF,
0xC2, 0xFF, 0xFF, 0xFF ]
- relocations:
+ relocations:
- offset: 0x00000040
type: X86_64_RELOC_SUBTRACTOR
length: 2
pc-rel: false
extern: true
symbol: 0
-local-symbols:
+local-symbols:
- name: _foo
type: N_SECT
sect: 1
# CHECK: defined-atoms:
# CHECK: - name: _d
# CHECK: type: data
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer64
# CHECK: offset: 0
# CHECK: target: _foo
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x89, 0xE5, 0x56, 0x83, 0xEC, 0x14, 0xE8,
- 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC7, 0x04, 0x24,
- 0x04, 0x00, 0x00, 0x00, 0xE8, 0xE7, 0xFF, 0xFF,
- 0xFF, 0xC7, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x8B,
- 0x8E, 0x38, 0x00, 0x00, 0x00, 0x89, 0x4C, 0x24,
- 0x04, 0x89, 0x04, 0x24, 0xC7, 0x44, 0x24, 0x08,
- 0x00, 0x00, 0x00, 0x00, 0xE8, 0xC7, 0xFF, 0xFF,
- 0xFF, 0x55, 0x89, 0xE5, 0x83, 0xEC, 0x08, 0xE8,
+ content: [ 0x55, 0x89, 0xE5, 0x56, 0x83, 0xEC, 0x14, 0xE8,
+ 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC7, 0x04, 0x24,
+ 0x04, 0x00, 0x00, 0x00, 0xE8, 0xE7, 0xFF, 0xFF,
+ 0xFF, 0xC7, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x8B,
+ 0x8E, 0x38, 0x00, 0x00, 0x00, 0x89, 0x4C, 0x24,
+ 0x04, 0x89, 0x04, 0x24, 0xC7, 0x44, 0x24, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0xE8, 0xC7, 0xFF, 0xFF,
+ 0xFF, 0x55, 0x89, 0xE5, 0x83, 0xEC, 0x08, 0xE8,
0xBC, 0xFF, 0xFF, 0xFF ]
- relocations:
+ relocations:
- offset: 0x00000040
type: GENERIC_RELOC_VANILLA
length: 2
attributes: [ ]
alignment: 2
address: 0x0000000000000048
- content: [ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x7A, 0x52, 0x00, 0x01, 0x7C, 0x08, 0x01,
- 0x10, 0x0C, 0x05, 0x04, 0x88, 0x01, 0x00, 0x00,
- 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
- 0x98, 0xFF, 0xFF, 0xFF, 0x39, 0x00, 0x00, 0x00,
- 0x00, 0x41, 0x0E, 0x08, 0x84, 0x02, 0x42, 0x0D,
- 0x04, 0x44, 0x86, 0x03, 0x18, 0x00, 0x00, 0x00,
- 0x38, 0x00, 0x00, 0x00, 0xB5, 0xFF, 0xFF, 0xFF,
- 0x0B, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0E, 0x08,
+ content: [ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x7A, 0x52, 0x00, 0x01, 0x7C, 0x08, 0x01,
+ 0x10, 0x0C, 0x05, 0x04, 0x88, 0x01, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
+ 0x98, 0xFF, 0xFF, 0xFF, 0x39, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x0E, 0x08, 0x84, 0x02, 0x42, 0x0D,
+ 0x04, 0x44, 0x86, 0x03, 0x18, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0xB5, 0xFF, 0xFF, 0xFF,
+ 0x0B, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0E, 0x08,
0x84, 0x02, 0x42, 0x0D, 0x04, 0x00, 0x00, 0x00 ]
-global-symbols:
+global-symbols:
- name: __Z3barv
type: N_SECT
scope: [ N_EXT ]
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000000
-undefined-symbols:
+undefined-symbols:
- name: __ZTIi
type: N_UNDF
scope: [ N_EXT ]
value: 0x0000000000000000
...
-# CHECK: defined-atoms:
+# CHECK: defined-atoms:
# CHECK: - ref-name: [[CIE:L[L0-9]+]]
# CHECK: type: unwind-cfi
-# CHECK: content:
+# CHECK: content:
# CHECK: - type: unwind-cfi
-# CHECK: content:
+# CHECK: content:
# CHECK: references:
# CHECK: - kind: negDelta32
# CHECK: offset: 4
# CHECK: offset: 8
# CHECK: target: __Z3foov
# CHECK: - type: unwind-cfi
-# CHECK: content:
+# CHECK: content:
# CHECK: references:
# CHECK: - kind: negDelta32
# CHECK: offset: 4
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x89, 0xE5, 0x56, 0x83, 0xEC, 0x14, 0xE8,
- 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC7, 0x04, 0x24,
- 0x04, 0x00, 0x00, 0x00, 0xE8, 0xE7, 0xFF, 0xFF,
- 0xFF, 0xC7, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x8B,
- 0x8E, 0x38, 0x00, 0x00, 0x00, 0x89, 0x4C, 0x24,
- 0x04, 0x89, 0x04, 0x24, 0xC7, 0x44, 0x24, 0x08,
- 0x00, 0x00, 0x00, 0x00, 0xE8, 0xC7, 0xFF, 0xFF,
- 0xFF, 0x55, 0x89, 0xE5, 0x83, 0xEC, 0x08, 0xE8,
+ content: [ 0x55, 0x89, 0xE5, 0x56, 0x83, 0xEC, 0x14, 0xE8,
+ 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC7, 0x04, 0x24,
+ 0x04, 0x00, 0x00, 0x00, 0xE8, 0xE7, 0xFF, 0xFF,
+ 0xFF, 0xC7, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x8B,
+ 0x8E, 0x38, 0x00, 0x00, 0x00, 0x89, 0x4C, 0x24,
+ 0x04, 0x89, 0x04, 0x24, 0xC7, 0x44, 0x24, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0xE8, 0xC7, 0xFF, 0xFF,
+ 0xFF, 0x55, 0x89, 0xE5, 0x83, 0xEC, 0x08, 0xE8,
0xBC, 0xFF, 0xFF, 0xFF ]
- relocations:
+ relocations:
- offset: 0x00000040
type: GENERIC_RELOC_VANILLA
length: 2
attributes: [ ]
alignment: 2
address: 0x0000000000000048
- content: [ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x7A, 0x52, 0x00, 0x01, 0x7C, 0x08, 0x01,
- 0x10, 0x0C, 0x05, 0x04, 0x88, 0x01, 0x00, 0x00,
- 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
- 0x98, 0xFF, 0xFF, 0xFF, 0x39, 0x00, 0x00, 0x00,
- 0x00, 0x41, 0x0E, 0x08, 0x84, 0x02, 0x42, 0x0D,
- 0x04, 0x44, 0x86, 0x03, 0x18, 0x00, 0x00, 0x00,
- 0x38, 0x00, 0x00, 0x00, 0xB5, 0xFF, 0xFF, 0xFF,
- 0x0B, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0E, 0x08,
+ content: [ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x7A, 0x52, 0x00, 0x01, 0x7C, 0x08, 0x01,
+ 0x10, 0x0C, 0x05, 0x04, 0x88, 0x01, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
+ 0x98, 0xFF, 0xFF, 0xFF, 0x39, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x0E, 0x08, 0x84, 0x02, 0x42, 0x0D,
+ 0x04, 0x44, 0x86, 0x03, 0x18, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0xB5, 0xFF, 0xFF, 0xFF,
+ 0x0B, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0E, 0x08,
0x84, 0x02, 0x42, 0x0D, 0x04, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x0000001C
scattered: true
type: GENERIC_RELOC_LOCAL_SECTDIFF
length: 2
pc-rel: false
value: 0x00000084
-local-symbols:
+local-symbols:
- name: EH_frame0
type: N_SECT
sect: 3
value: 0x0000000000000048
-global-symbols:
+global-symbols:
- name: __Z3barv
type: N_SECT
scope: [ N_EXT ]
scope: [ N_EXT ]
sect: 3
value: 0x0000000000000060
-undefined-symbols:
+undefined-symbols:
- name: __ZTIi
type: N_UNDF
scope: [ N_EXT ]
value: 0x0000000000000000
...
-# CHECK: defined-atoms:
+# CHECK: defined-atoms:
# CHECK: - ref-name: [[CIE:L[L0-9]+]]
# CHECK: type: unwind-cfi
-# CHECK: content:
+# CHECK: content:
# CHECK: - type: unwind-cfi
-# CHECK: content:
-# CHECK: references:
+# CHECK: content:
+# CHECK: references:
# CHECK: - kind: negDelta32
# CHECK: offset: 4
# CHECK: target: [[CIE]]
# CHECK: offset: 8
# CHECK: target: __Z3foov
# CHECK: - type: unwind-cfi
-# CHECK: content:
-# CHECK: references:
+# CHECK: content:
+# CHECK: references:
# CHECK: - kind: negDelta32
# CHECK: offset: 4
# CHECK: target: [[CIE]]
-# RUN: lld -flavor darwin -arch x86_64 -r %s -o %t
+# RUN: lld -flavor darwin -arch x86_64 -r %s -o %t
# RUN: lld -flavor darwin -arch x86_64 -r %t -print_atoms -o %t2 | FileCheck %s
#
# Test parsing of mach-o functions.
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 4
address: 0x0000000000000000
- content: [ 0xCC, 0xC3, 0x90, 0xC3, 0x90, 0x90, 0xC3, 0x90,
+ content: [ 0xCC, 0xC3, 0x90, 0xC3, 0x90, 0x90, 0xC3, 0x90,
0x90, 0x90, 0xC3, 0x90, 0x90, 0x90, 0x90, 0xC3,
0xCC, 0x31, 0xC0, 0xC3 ]
local-symbols:
value: 0x0000000000000011
...
-# CHECK-NOT: name:
+# CHECK-NOT: name:
# CHECK: content: [ CC ]
# CHECK: name: _myGlobal
# CHECK: - type: initializer-pointer
# CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
# CHECK: dead-strip: never
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer64
# CHECK: offset: 0
# CHECK: target: _init
# CHECK: - type: initializer-pointer
# CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
# CHECK: dead-strip: never
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer64
# CHECK: offset: 0
# CHECK: target: _init2
# CHECK: - type: terminator-pointer
# CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
# CHECK: dead-strip: never
-# CHECK: references:
+# CHECK: references:
# CHECK: - kind: pointer64
# CHECK: offset: 0
# CHECK: target: _term
0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D ]
...
-# CHECK: error:
+# CHECK: error:
attributes: [ ]
alignment: 1
address: 0x0000000000000100
- content: [ 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x00, 0x74, 0x68,
- 0x65, 0x72, 0x65, 0x00, 0x77, 0x6F, 0x72, 0x6C,
+ content: [ 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x00, 0x74, 0x68,
+ 0x65, 0x72, 0x65, 0x00, 0x77, 0x6F, 0x72, 0x6C,
0x00 ]
- segment: __TEXT
section: __literal4
attributes: [ ]
alignment: 1
address: 0x0000000000000100
- content: [ 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00,
- 0x6F, 0x00, 0x00, 0x00, 0x74, 0x00, 0x68, 0x00,
+ content: [ 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00,
+ 0x6F, 0x00, 0x00, 0x00, 0x74, 0x00, 0x68, 0x00,
0x65, 0x00, 0x72, 0x00, 0x00, 0x00 ]
...
-# CHECK:defined-atoms:
+# CHECK:defined-atoms:
# CHECK: - scope: hidden
# CHECK: type: c-string
# CHECK: content: [ 68, 65, 6C, 6C, 6F, 00 ]
# CHECK: content: [ 28, 29, 2A, 2B, 2C, 2D, 2E, 2F ]
# CHECK: - scope: hidden
# CHECK: type: const-16-byte
-# CHECK: content: [ 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C,
+# CHECK: content: [ 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C,
# CHECK: 0D, 0E, 0F, 00 ]
# ret
#
# .data
-#_x:
+#_x:
# .long _undef
# .long _undef+7
# .long _foo
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
OS: unknown
-sections:
+sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0xE8, 0xFB, 0xFF, 0xFF, 0xFF, 0xE8, 0xF8, 0xFF,
- 0xFF, 0xFF, 0xE8, 0x2C, 0x00, 0x00, 0x00, 0xE8,
- 0x29, 0x00, 0x00, 0x00, 0x66, 0xE8, 0xE8, 0xFF,
- 0x66, 0xE8, 0x1F, 0x00, 0x66, 0xE8, 0x1D, 0x00,
- 0xA1, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x3C, 0x00,
- 0x00, 0x00, 0xA1, 0x40, 0x00, 0x00, 0x00, 0x8B,
- 0x80, 0x1C, 0x00, 0x00, 0x00, 0x8B, 0x80, 0x20,
+ content: [ 0xE8, 0xFB, 0xFF, 0xFF, 0xFF, 0xE8, 0xF8, 0xFF,
+ 0xFF, 0xFF, 0xE8, 0x2C, 0x00, 0x00, 0x00, 0xE8,
+ 0x29, 0x00, 0x00, 0x00, 0x66, 0xE8, 0xE8, 0xFF,
+ 0x66, 0xE8, 0x1F, 0x00, 0x66, 0xE8, 0x1D, 0x00,
+ 0xA1, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x3C, 0x00,
+ 0x00, 0x00, 0xA1, 0x40, 0x00, 0x00, 0x00, 0x8B,
+ 0x80, 0x1C, 0x00, 0x00, 0x00, 0x8B, 0x80, 0x20,
0x00, 0x00, 0x00, 0xC3 ]
- relocations:
+ relocations:
- offset: 0x00000037
scattered: true
type: GENERIC_RELOC_LOCAL_SECTDIFF
type: S_REGULAR
attributes: [ ]
address: 0x000000000000003C
- content: [ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
- 0x3B, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x3B, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
0xB4, 0xFF, 0xFF, 0xFF, 0xB3, 0xFF, 0xFF, 0xFF ]
- relocations:
+ relocations:
- offset: 0x00000014
scattered: true
type: GENERIC_RELOC_LOCAL_SECTDIFF
pc-rel: false
extern: true
symbol: 3
-local-symbols:
+local-symbols:
- name: _test
type: N_SECT
sect: 1
type: N_SECT
sect: 2
value: 0x000000000000003C
-undefined-symbols:
+undefined-symbols:
- name: _undef
type: N_UNDF
scope: [ N_EXT ]
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x8B, 0x05, 0x00, 0x00,
- 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x8B, 0x05, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00,
0x5D, 0xC3 ]
relocations:
- offset: 0x0000000C
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
- content: [ 0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91,
- 0xE0, 0x03, 0x1E, 0x32, 0x00, 0x00, 0x00, 0x94,
- 0x48, 0x01, 0x80, 0x52, 0x08, 0x00, 0x00, 0xB9,
- 0x02, 0x00, 0x80, 0xD2, 0x01, 0x00, 0x00, 0x90,
- 0x21, 0x00, 0x40, 0xF9, 0x00, 0x00, 0x00, 0x94,
- 0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91,
- 0xE0, 0x03, 0x1E, 0x32, 0x00, 0x00, 0x00, 0x94,
- 0x48, 0x01, 0x80, 0x52, 0x08, 0x00, 0x00, 0xB9,
- 0x02, 0x00, 0x80, 0xD2, 0x01, 0x00, 0x00, 0x90,
- 0x21, 0x00, 0x40, 0xF9, 0x00, 0x00, 0x00, 0x94,
- 0x3F, 0x04, 0x00, 0x71, 0x81, 0x00, 0x00, 0x54,
- 0x00, 0x00, 0x00, 0x94, 0xFD, 0x7B, 0xC1, 0xA8,
- 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x94,
- 0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91,
+ content: [ 0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91,
+ 0xE0, 0x03, 0x1E, 0x32, 0x00, 0x00, 0x00, 0x94,
+ 0x48, 0x01, 0x80, 0x52, 0x08, 0x00, 0x00, 0xB9,
+ 0x02, 0x00, 0x80, 0xD2, 0x01, 0x00, 0x00, 0x90,
+ 0x21, 0x00, 0x40, 0xF9, 0x00, 0x00, 0x00, 0x94,
+ 0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91,
+ 0xE0, 0x03, 0x1E, 0x32, 0x00, 0x00, 0x00, 0x94,
+ 0x48, 0x01, 0x80, 0x52, 0x08, 0x00, 0x00, 0xB9,
+ 0x02, 0x00, 0x80, 0xD2, 0x01, 0x00, 0x00, 0x90,
+ 0x21, 0x00, 0x40, 0xF9, 0x00, 0x00, 0x00, 0x94,
+ 0x3F, 0x04, 0x00, 0x71, 0x81, 0x00, 0x00, 0x54,
+ 0x00, 0x00, 0x00, 0x94, 0xFD, 0x7B, 0xC1, 0xA8,
+ 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x94,
+ 0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91,
0x00, 0x00, 0x00, 0x94 ]
relocations:
- offset: 0x00000070
attributes: [ ]
alignment: 2
address: 0x0000000000000074
- content: [ 0xFF, 0x9B, 0xAF, 0x80, 0x00, 0x03, 0x27, 0x00,
- 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
- 0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x01, 0x28, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ content: [ 0xFF, 0x9B, 0xAF, 0x80, 0x00, 0x03, 0x27, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
+ 0x01, 0x28, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0xD0, 0xFF, 0xFF, 0xFF ]
- relocations:
+ relocations:
- offset: 0x00000030
type: ARM64_RELOC_POINTER_TO_GOT
length: 2
attributes: [ ]
alignment: 3
address: 0x00000000000000A8
- content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
- relocations:
+ relocations:
- offset: 0x00000040
type: ARM64_RELOC_UNSIGNED
length: 3
type: N_SECT
sect: 3
value: 0x00000000000000A8
-global-symbols:
+global-symbols:
- name: __Z3barv
type: N_SECT
scope: [ N_EXT ]
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000068
-undefined-symbols:
+undefined-symbols:
- name: __Unwind_Resume
type: N_UNDF
scope: [ N_EXT ]
# Generic x86_64 CIE:
- type: unwind-cfi
- content: [ 14, 00, 00, 00, 00, 00, 00, 00, 01, 7A, 52, 00,
+ content: [ 14, 00, 00, 00, 00, 00, 00, 00, 01, 7A, 52, 00,
01, 78, 10, 01, 10, 0C, 07, 08, 90, 01, 00, 00 ]
- type: unwind-cfi
# RUN: lld -flavor darwin -arch x86_64 -dylib %p/Inputs/bar.yaml \
# RUN: -install_name /usr/lib/libbar.dylib %p/Inputs/libSystem.yaml -o %t1.dylib
# RUN: lld -flavor darwin -arch x86_64 -dylib %s -upward_library %t1.dylib \
-# RUN: -install_name /usr/lib/libfoo.dylib %p/Inputs/libSystem.yaml -o %t
+# RUN: -install_name /usr/lib/libfoo.dylib %p/Inputs/libSystem.yaml -o %t
# RUN: llvm-objdump -private-headers %t | FileCheck %s
#
#
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
- content: [ 0x55, 0x48, 0x89, 0xE5, 0x31, 0xC0, 0x5D, 0xE9,
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0x31, 0xC0, 0x5D, 0xE9,
0x00, 0x00, 0x00, 0x00 ]
relocations:
- offset: 0x00000008
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 10
NumberOfRelocations: 1
NumberOfLinenumbers: 0