macho_relocatable_file.h [plain text]
#ifndef __MACHO_RELOCATABLE_FILE_H__
#define __MACHO_RELOCATABLE_FILE_H__
#include "ld.hpp"
#include "Options.h"
namespace mach_o {
namespace relocatable {
struct ParserOptions {
uint32_t architecture;
bool objSubtypeMustMatch;
bool logAllFiles;
bool warnUnwindConversionProblems;
bool keepDwarfUnwind;
bool forceDwarfConversion;
bool neverConvertDwarf;
bool verboseOptimizationHints;
bool armUsesZeroCostExceptions;
bool simulator;
bool ignoreMismatchPlatform;
#if SUPPORT_ARCH_arm64e
bool supportsAuthenticatedPointers;
#endif
uint32_t subType;
ld::VersionSet platforms;
ld::relocatable::File::SourceKind srcKind;
bool treateBitcodeAsData;
bool usingBitcode;
uint8_t maxDefaultCommonAlignment;
};
extern ld::relocatable::File* parse(const uint8_t* fileContent, uint64_t fileLength,
const char* path, time_t modTime, ld::File::Ordinal ordinal,
const ParserOptions& opts);
extern bool isObjectFile(const uint8_t* fileContent, uint64_t fileLength, const ParserOptions& opts);
extern bool isObjectFile(const uint8_t* fileContent, cpu_type_t* result, cpu_subtype_t* subResult, ld::Platform* platform, uint32_t* minOsVers);
extern bool hasObjC2Categories(const uint8_t* fileContent);
extern bool hasObjC1Categories(const uint8_t* fileContent);
extern const char* archName(const uint8_t* fileContent);
bool getNonLocalSymbols(const uint8_t* fileContent, std::vector<const char*> &syms);
} }
#endif // __MACHO_RELOCATABLE_FILE_H__