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
89dfbb93
Commit
89dfbb93
authored
5 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
mips?!
parent
3922b589
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
SConscript
+1
-0
1 addition, 0 deletions
SConscript
unpin.cpp
+1
-0
1 addition, 0 deletions
unpin.cpp
unpin.h
+19
-0
19 additions, 0 deletions
unpin.h
unpin_mips32.cpp
+76
-0
76 additions, 0 deletions
unpin_mips32.cpp
with
97 additions
and
0 deletions
SConscript
+
1
−
0
View file @
89dfbb93
...
...
@@ -25,6 +25,7 @@ files= '''
unpin.cpp
unpin_aarch64.cpp
unpin_arm32.cpp
unpin_mips32.cpp
unpin_x86.cpp
'''
...
...
This diff is collapsed.
Click to expand it.
unpin.cpp
+
1
−
0
View file @
89dfbb93
...
...
@@ -320,5 +320,6 @@ Zipr_SDK::ZiprPluginInterface_t* GetPluginInterface(
mt
==
admtI386
?
(
Unpin_t
*
)
new
UnpinX86_t
(
zipr_object
)
:
mt
==
admtAarch64
?
(
Unpin_t
*
)
new
UnpinAarch64_t
(
zipr_object
)
:
mt
==
admtArm32
?
(
Unpin_t
*
)
new
UnpinArm32_t
(
zipr_object
)
:
mt
==
admtMips32
?
(
Unpin_t
*
)
new
UnpinMips32_t
(
zipr_object
)
:
throw
invalid_argument
(
"Cannot determine machine type"
);
}
This diff is collapsed.
Click to expand it.
unpin.h
+
19
−
0
View file @
89dfbb93
...
...
@@ -168,5 +168,24 @@ class UnpinArm32_t : public Unpin_t
void
HandleCallbackReloc
(
IRDB_SDK
::
Instruction_t
*
from_insn
,
IRDB_SDK
::
Relocation_t
*
reloc
)
override
;
};
class
UnpinMips32_t
:
public
Unpin_t
{
public:
UnpinMips32_t
(
Zipr_SDK
::
Zipr_t
*
zipr_object
)
:
Unpin_t
(
zipr_object
)
{
}
protected
:
// designed for arch-specific override.
void
HandleRetAddrReloc
(
IRDB_SDK
::
Instruction_t
*
from_insn
,
IRDB_SDK
::
Relocation_t
*
reloc
)
override
;
void
HandlePcrelReloc
(
IRDB_SDK
::
Instruction_t
*
from_insn
,
IRDB_SDK
::
Relocation_t
*
reloc
)
override
;
void
HandleAbsptrReloc
(
IRDB_SDK
::
Instruction_t
*
from_insn
,
IRDB_SDK
::
Relocation_t
*
reloc
)
override
;
void
HandleImmedptrReloc
(
IRDB_SDK
::
Instruction_t
*
from_insn
,
IRDB_SDK
::
Relocation_t
*
reloc
)
override
;
void
HandleCallbackReloc
(
IRDB_SDK
::
Instruction_t
*
from_insn
,
IRDB_SDK
::
Relocation_t
*
reloc
)
override
;
};
#endif
This diff is collapsed.
Click to expand it.
unpin_mips32.cpp
0 → 100644
+
76
−
0
View file @
89dfbb93
/***************************************************************************
* Copyright (c) 2014 Zephyr Software LLC. All rights reserved.
*
* This software is furnished under a license and/or other restrictive
* terms and may be used and copied only in accordance with such terms
* and the inclusion of the above copyright notice. This software or
* any other copies thereof may not be provided or otherwise made
* available to any other person without the express written consent
* of an authorized representative of Zephyr Software LCC. Title to,
* ownership of, and all rights in the software is retained by
* Zephyr Software LCC.
*
* Zephyr Software LLC. Proprietary Information
*
* Unless otherwise specified, the information contained in this
* directory, following this legend, and/or referenced herein is
* Zephyr Software LLC. (Zephyr) Proprietary Information.
*
* CONTACT
*
* For technical assistance, contact Zephyr Software LCC. at:
*
*
* Zephyr Software, LLC
* 2040 Tremont Rd
* Charlottesville, VA 22911
*
* E-mail: jwd@zephyr-software.com
**************************************************************************/
#include
<string>
#include
<algorithm>
#include
"unpin.h"
#include
<memory>
#include
<inttypes.h>
#include
<stdint.h>
#include
<limits.h>
#include
<irdb-util>
using
namespace
IRDB_SDK
;
using
namespace
std
;
using
namespace
Zipr_SDK
;
static
inline
uint32_t
rotr32
(
uint32_t
n
,
unsigned
int
c
)
{
const
unsigned
int
mask
=
(
CHAR_BIT
*
sizeof
(
n
)
-
1
);
// assert ( (c<=mask) &&"rotate by type width or more");
c
&=
mask
;
return
(
n
>>
c
)
|
(
n
<<
(
(
-
c
)
&
mask
));
}
#define ALLOF(a) begin(a),end(a)
// per machine stuff
void
UnpinMips32_t
::
HandleRetAddrReloc
(
Instruction_t
*
from_insn
,
Relocation_t
*
reloc
)
{
assert
(
0
);
}
void
UnpinMips32_t
::
HandlePcrelReloc
(
Instruction_t
*
from_insn
,
Relocation_t
*
reloc
)
{
assert
(
0
);
}
void
UnpinMips32_t
::
HandleAbsptrReloc
(
Instruction_t
*
from_insn
,
Relocation_t
*
reloc
)
{
assert
(
0
);
}
void
UnpinMips32_t
::
HandleImmedptrReloc
(
Instruction_t
*
from_insn
,
Relocation_t
*
reloc
)
{
assert
(
0
);
}
void
UnpinMips32_t
::
HandleCallbackReloc
(
Instruction_t
*
from_insn
,
Relocation_t
*
reloc
)
{
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