2009-09-17 13:06:04 +00:00
|
|
|
#include "rpathcommand.h"
|
|
|
|
#include "machofile.h"
|
|
|
|
#include "machoheader.h"
|
|
|
|
|
2011-04-24 19:31:31 +00:00
|
|
|
RpathCommand::RpathCommand(MachOHeader* header) :
|
2009-09-17 13:06:04 +00:00
|
|
|
LoadCommand(header)
|
|
|
|
{
|
|
|
|
file.readBytes((char*)&command, sizeof(command));
|
|
|
|
}
|
|
|
|
|
2011-04-24 19:31:31 +00:00
|
|
|
RpathCommand::~RpathCommand() {
|
2009-09-17 13:06:04 +00:00
|
|
|
}
|
|
|
|
|
2011-04-24 19:31:31 +00:00
|
|
|
unsigned int RpathCommand::getSize() const {
|
2009-09-17 13:06:04 +00:00
|
|
|
return file.getUint32(command.cmdsize);
|
|
|
|
}
|
|
|
|
|
2011-04-24 19:31:31 +00:00
|
|
|
const char* RpathCommand::getPath() const {
|
2009-09-17 13:06:04 +00:00
|
|
|
return getLcDataString(command.path.offset);
|
|
|
|
}
|