Implemented alignCode() for m68k.
This commit is contained in:
@@ -561,6 +561,14 @@ void ElfLinkerArmLE::relocate1(const Relocation *rel, upx_byte *location,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ElfLinkerM68k::alignCode(unsigned len)
|
||||||
|
{
|
||||||
|
assert((len & 1) == 0);
|
||||||
|
assert((outputlen & 1) == 0);
|
||||||
|
for (unsigned i = 0; i < len; i += 2)
|
||||||
|
set_be16(output + outputlen + i, 0x4e71); // "nop"
|
||||||
|
}
|
||||||
|
|
||||||
void ElfLinkerM68k::relocate1(const Relocation *rel, upx_byte *location,
|
void ElfLinkerM68k::relocate1(const Relocation *rel, upx_byte *location,
|
||||||
unsigned value, const char *type)
|
unsigned value, const char *type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ class ElfLinkerM68k : public ElfLinker
|
|||||||
{
|
{
|
||||||
typedef ElfLinker super;
|
typedef ElfLinker super;
|
||||||
protected:
|
protected:
|
||||||
|
virtual void alignCode(unsigned len);
|
||||||
virtual void relocate1(const Relocation *, upx_byte *location,
|
virtual void relocate1(const Relocation *, upx_byte *location,
|
||||||
unsigned value, const char *type);
|
unsigned value, const char *type);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user