Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zipr_unpin_plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Open Source Software
zipr_unpin_plugin
Commits
bfc6ba73
Commit
bfc6ba73
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
fixed bug when trampolining for patches to adr, where the trampoline crosses a page boundary
parent
00fc8c0b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unpin_aarch64.cpp
+3
-1
3 additions, 1 deletion
unpin_aarch64.cpp
with
3 additions
and
1 deletion
unpin_aarch64.cpp
+
3
−
1
View file @
bfc6ba73
...
...
@@ -180,7 +180,7 @@ void UnpinAarch64_t::HandlePcrelReloc(Instruction_t* from_insn, Relocation_t* re
const
auto
L2
=
tramp_start
+
8
;
const
auto
branch_bytes
=
string
(
"
\x00\x00\x00\x14
"
,
4
);
// const auto updated_orig_insn_pageno = orig_insn_addr>>12; // orig_insn_pageno was shifted by 0 for adr
const
auto
relocd_insn_pageno
=
L
1
>>
12
;
const
auto
relocd_insn_pageno
=
L
0
>>
12
;
const
auto
address_to_generate_pageno
=
address_to_generate
>>
12
;
const
auto
address_to_generate_page_offset
=
address_to_generate
&
mask12
;
const
auto
relocd_imm21_ext
=
(
int64_t
)
address_to_generate_pageno
-
(
int64_t
)
relocd_insn_pageno
;
...
...
@@ -200,6 +200,8 @@ void UnpinAarch64_t::HandlePcrelReloc(Instruction_t* from_insn, Relocation_t* re
auto
adrp_word
=*
(
int
*
)
adrp_bytes
.
c_str
();
adrp_word
|=
destreg
<<
0
;
adrp_word
|=
((
relocd_immlo2
&
mask2
)
<<
29
)
|
((
relocd_immhi19
&
mask19
)
<<
5
);
cout
<<
"Tramp for "
<<
L0
<<
", relocd_immlo2="
<<
relocd_immlo2
<<
", relocd_immhi19="
<<
relocd_immhi19
<<
endl
;
ms
.
PlopBytes
(
L0
,(
char
*
)
&
adrp_word
,
4
);
// add64 imm12 = 1001 0001 00 imm12 Rn Rd
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment