ObjFW  Check-in [f073f79c09]

Overview
Comment:Obfuscate tagged pointers on MIPS64/ELF
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tagged-pointers
Files: files | file ages | folders
SHA3-256: f073f79c09cf6335515cb3cf033cd0a75d97fd7d250233a1a453874d7ba2cdb1
User & Date: js on 2020-07-14 23:43:18
Other Links: branch diff | manifest | tags
Context
2020-07-18
12:54
Obfuscate tagged pointers on ARM64/ELF check-in: 01d06c0f5d user: js tags: tagged-pointers
2020-07-14
23:43
Obfuscate tagged pointers on MIPS64/ELF check-in: f073f79c09 user: js tags: tagged-pointers
2020-07-12
19:33
Obfuscate tagged pointers on SPARC64/ELF check-in: 64b88276cf user: js tags: tagged-pointers
Changes

Modified src/runtime/lookup-asm/lookup-asm-mips64-n64-elf.S from [eccb0ae4e7] to [3b31980e08].

68
69
70
71
72
73
74
75
76

77
78
79
80
81
82
83

84
85
86
87
88

89
90
91



92
93

94
95
96
97
98
99
100
101
102
...
111
112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
	beqz	$t0, 1f

	move	$v0, $t0
	jr	$ra

0:
	lui	$v0, %hi(%neg(%gp_rel(\name)))
	daddu	$v0, $v0, $t9
	daddiu	$v0, $v0, %lo(%neg(%gp_rel(\name)))

	ld	$v0, %got_disp(nil_method)($v0)
	jr	$ra

1:
	lui	$t0, %hi(%neg(%gp_rel(\name)))
	daddu	$t0, $t0, $t9
	daddiu	$t0, $t0, %lo(%neg(%gp_rel(\name)))

	ld	$t9, %got_disp(\not_found)($t0)
	jr	$t9

.Ltagged_pointer_\name:
	and	$t0, $a0, 0xE

	dsll	$t0, $t0, 2

	lui	$t1, %hi(%neg(%gp_rel(\name)))



	daddu	$t1, $t1, $t9
	daddiu	$t1, $t1, %lo(%neg(%gp_rel(\name)))

	ld	$t1, %got_disp(objc_tagged_pointer_classes)($t1)
	daddu	$t0, $t1, $t0
	ld	$t0, ($t0)
	ld	$t0, 64($t0)

	b	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm
................................................................................
	ld	$t0, 64($t0)

	daddiu	$t9, $t9, \lookup-\name
	b	.Lmain_\lookup

0:
	lui	$v0, %hi(%neg(%gp_rel(\name)))
	daddu	$v0, $v0, $t9
	daddiu	$v0, $v0, %lo(%neg(%gp_rel(\name)))

	ld	$v0, %got_disp(nil_method)($v0)
	jr	$ra
.type \name, %function
.size \name, .-\name
.endm

generate_lookup objc_msg_lookup objc_method_not_found







<

>





<

>




|
>
|

<
>
>
>
|
|
>
|
|







 







<

>







68
69
70
71
72
73
74

75
76
77
78
79
80
81

82
83
84
85
86
87
88
89
90
91

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
	beqz	$t0, 1f

	move	$v0, $t0
	jr	$ra

0:
	lui	$v0, %hi(%neg(%gp_rel(\name)))

	daddiu	$v0, $v0, %lo(%neg(%gp_rel(\name)))
	daddu	$v0, $v0, $t9
	ld	$v0, %got_disp(nil_method)($v0)
	jr	$ra

1:
	lui	$t0, %hi(%neg(%gp_rel(\name)))

	daddiu	$t0, $t0, %lo(%neg(%gp_rel(\name)))
	daddu	$t0, $t0, $t9
	ld	$t9, %got_disp(\not_found)($t0)
	jr	$t9

.Ltagged_pointer_\name:
	lui	$t0, %hi(%neg(%gp_rel(\name)))
	daddiu	$t0, $t0, %lo(%neg(%gp_rel(\name)))
	daddu	$t0, $t0, $t9


	ld	$t1, %got_disp(objc_tagged_pointer_secret)($t0)
	ld	$t1, 0($t1)
	xor	$t1, $a0, $t1
	and	$t1, $t1, 0xE
	dsll	$t1, $t1, 2

	ld	$t0, %got_disp(objc_tagged_pointer_classes)($t0)
	daddu	$t0, $t0, $t1
	ld	$t0, ($t0)
	ld	$t0, 64($t0)

	b	.Lmain_\name
.type \name, %function
.size \name, .-\name
.endm
................................................................................
	ld	$t0, 64($t0)

	daddiu	$t9, $t9, \lookup-\name
	b	.Lmain_\lookup

0:
	lui	$v0, %hi(%neg(%gp_rel(\name)))

	daddiu	$v0, $v0, %lo(%neg(%gp_rel(\name)))
	daddu	$v0, $v0, $t9
	ld	$v0, %got_disp(nil_method)($v0)
	jr	$ra
.type \name, %function
.size \name, .-\name
.endm

generate_lookup objc_msg_lookup objc_method_not_found