Issue 76352
Summary XCode15 Otool bug
Labels new issue
Assignees
Reporter helele90
    Using the `Xcode 14 Command Line Tools`, execute the command `otool -x -V` to disassemble Objective-C and Swift symbols such as `_OBJC_CLASS_$_`, `OBJC_IVAR`, or various method names using `adrp` and `bl` instructions.:
```
+[TestJumpProtocolHandler load]:
0000000000000000	sub	sp, sp, #0x40
0000000000000004	stp	x22, x21, [sp, #0x10]
0000000000000008	stp	x20, x19, [sp, #0x20]
000000000000000c	stp	x29, x30, [sp, #0x30]
0000000000000010	add	x29, sp, #0x30
0000000000000014	mov	x19, x0
0000000000000018	adrp	x8, _OBJC_CLASSLIST_REFERENCES_$_@PAGE
000000000000001c	ldr	x0, [x8, _OBJC_CLASSLIST_REFERENCES_$_@PAGEOFF]
0000000000000020	adrp	x8, l__unnamed_cfstring_@PAGE
0000000000000024	add	x8, x8, l__unnamed_cfstring_@PAGEOFF
0000000000000028	str	x8, [sp]
000000000000002c	adrp	x2, l__unnamed_cfstring_.2@PAGE
0000000000000030	add	x2, x2, l__unnamed_cfstring_.2@PAGEOFF
0000000000000034	bl	"_objc_msgSend$stringWithFormat:"
0000000000000038	mov	x29, x29
000000000000003c	bl	_objc_retainAutoreleasedReturnValue
0000000000000040	mov	x20, x0
0000000000000044	adrp	x8, _OBJC_CLASSLIST_REFERENCES_$_.3@PAGE
0000000000000048	ldr	x21, [x8, _OBJC_CLASSLIST_REFERENCES_$_.3@PAGEOFF]
000000000000004c	mov	x0, x19
0000000000000050	bl	_objc_msgSend$class
0000000000000054	bl	_NSStringFromClass
0000000000000058	mov	x29, x29
000000000000005c	bl	_objc_retainAutoreleasedReturnValue
0000000000000060	mov	x19, x0
0000000000000064	mov	x0, x21
0000000000000068	mov	x2, x19
000000000000006c	mov	x3, x20
0000000000000070	bl	"_objc_msgSend$registerProtocolHandlerClassName:withProtocolKey:"
0000000000000074	mov	x0, x19
0000000000000078	bl	_objc_release
000000000000007c	mov	x0, x20
0000000000000080	ldp	x29, x30, [sp, #0x30]
0000000000000084	ldp	x20, x19, [sp, #0x20]
0000000000000088	ldp	x22, x21, [sp, #0x10]
000000000000008c	add	sp, sp, #0x40
0000000000000090	b	_objc_release
```

but I using `XCode15 Command Line Tool`,`adrp` and `bl` can not disassemb the Objective-C method and Swift symbol:
```
+[COCheckoutJumpProtocolHandler load]:
0000000000000000	sub	sp, sp, #0x40
0000000000000004	stp	x22, x21, [sp, #0x10]
0000000000000008	stp	x20, x19, [sp, #0x20]
000000000000000c	stp	x29, x30, [sp, #0x30]
0000000000000010	add	x29, sp, #0x30
0000000000000014	mov	x19, x0
0000000000000018	adrp	x8, 0 ; 0x0
000000000000001c	ldr	x0, [x8]
0000000000000020	adrp	x8, 0 ; 0x0
0000000000000024	add	x8, x8, #0x0
0000000000000028	str	x8, [sp]
000000000000002c	adrp	x2, 0 ; 0x0
0000000000000030	add	x2, x2, #0x0
0000000000000034	bl	0x34
0000000000000038	mov	x29, x29
000000000000003c	bl	0x3c
0000000000000040	mov	x20, x0
0000000000000044	adrp	x8, 0 ; 0x0
0000000000000048	ldr	x21, [x8]
000000000000004c	mov	x0, x19
0000000000000050	bl	0x50
0000000000000054	bl	0x54
0000000000000058	mov	x29, x29
000000000000005c	bl	0x5c
0000000000000060	mov	x19, x0
0000000000000064	mov	x0, x21
0000000000000068	mov	x2, x19
000000000000006c	mov	x3, x20
0000000000000070	bl	0x70
0000000000000074	mov	x0, x19
0000000000000078	bl	0x78
000000000000007c	mov	x0, x20
0000000000000080	ldp	x29, x30, [sp, #0x30]
0000000000000084	ldp	x20, x19, [sp, #0x20]
0000000000000088	ldp	x22, x21, [sp, #0x10]
000000000000008c	add	sp, sp, #0x40
0000000000000090	b	0x90
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to