Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
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
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
db24dec1
Commit
db24dec1
authored
5 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
adding arm32 for rida, though it still doesnt making xforming arm32 binaries work without ida.
parent
e15c08d2
Branches
Branches containing commit
Tags
cfar-phase3-final
Tags containing commit
No related merge requests found
Pipeline
#3859
passed
5 years ago
Stage: clean
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
irdb-libs/rida/rida.cpp
+21
-5
21 additions, 5 deletions
irdb-libs/rida/rida.cpp
with
21 additions
and
5 deletions
irdb-libs/rida/rida.cpp
+
21
−
5
View file @
db24dec1
...
@@ -74,9 +74,10 @@ class CreateFunctions_t
...
@@ -74,9 +74,10 @@ class CreateFunctions_t
}
}
const
auto
cs_mode
=
const
auto
cs_mode
=
machine_type
==
mtAarch64
?
CS_MODE_LITTLE_ENDIAN
:
machine_type
==
mtArm32
?
CS_MODE_LITTLE_ENDIAN
:
file_class
==
ELF64
?
CS_MODE_64
:
machine_type
==
mtAarch64
?
CS_MODE_LITTLE_ENDIAN
:
file_class
==
ELF32
?
CS_MODE_32
:
file_class
==
ELF64
?
CS_MODE_64
:
file_class
==
ELF32
?
CS_MODE_32
:
throw
std
::
runtime_error
(
"Cannot handle ELF class"
);
throw
std
::
runtime_error
(
"Cannot handle ELF class"
);
const
auto
my_cs_arch
=
const
auto
my_cs_arch
=
...
@@ -394,7 +395,7 @@ class CreateFunctions_t
...
@@ -394,7 +395,7 @@ class CreateFunctions_t
addName
(
i
,
dynsymEntryIndex
++
);
addName
(
i
,
dynsymEntryIndex
++
);
}
}
};
};
const
auto
handle_arm_plt
=
[
&
]()
const
auto
handle_arm
64
_plt
=
[
&
]()
{
{
const
auto
plt_entry_size
=
16
;
const
auto
plt_entry_size
=
16
;
const
auto
plt_header_size
=
8
*
4
;
const
auto
plt_header_size
=
8
*
4
;
...
@@ -406,6 +407,18 @@ class CreateFunctions_t
...
@@ -406,6 +407,18 @@ class CreateFunctions_t
addName
(
i
,
dynsymEntryIndex
++
);
addName
(
i
,
dynsymEntryIndex
++
);
}
}
};
};
const
auto
handle_arm32_plt
=
[
&
]()
{
const
auto
plt_entry_size
=
3
*
4
;
// 3 instructions
const
auto
plt_header_size
=
5
*
4
;
// 5 instructions
addRange
(
startAddr
,
plt_header_size
);
for
(
auto
i
=
startAddr
+
plt_header_size
;
i
<
endAddr
;
i
+=
plt_entry_size
)
{
addRange
(
i
,
plt_entry_size
);
addName
(
i
,
dynsymEntryIndex
++
);
}
};
switch
(
machine_type
)
switch
(
machine_type
)
{
{
...
@@ -414,7 +427,10 @@ class CreateFunctions_t
...
@@ -414,7 +427,10 @@ class CreateFunctions_t
handle_x86_plt
();
handle_x86_plt
();
break
;
break
;
case
mtAarch64
:
case
mtAarch64
:
handle_arm_plt
();
handle_arm64_plt
();
break
;
case
mtArm32
:
handle_arm32_plt
();
break
;
break
;
default:
default:
assert
(
0
);
assert
(
0
);
...
...
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