Implemented alignCode() for m68k.

This commit is contained in:
Markus F.X.J. Oberhumer 2006-08-28 09:09:29 +02:00
parent 6c519c237e
commit f54513586d
2 changed files with 9 additions and 0 deletions

View File

@ -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,
unsigned value, const char *type)
{

View File

@ -171,6 +171,7 @@ class ElfLinkerM68k : public ElfLinker
{
typedef ElfLinker super;
protected:
virtual void alignCode(unsigned len);
virtual void relocate1(const Relocation *, upx_byte *location,
unsigned value, const char *type);
};