本文整理汇总了C++中LinkerConfig::attribute方法的典型用法代码示例。如果您正苦于以下问题:C++ LinkerConfig::attribute方法的具体用法?C++ LinkerConfig::attribute怎么用?C++ LinkerConfig::attribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinkerConfig
的用法示例。
在下文中一共展示了LinkerConfig::attribute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MCLDEmulateARMELF
static bool MCLDEmulateARMELF(LinkerConfig& pConfig)
{
if (!MCLDEmulateELF(pConfig))
return false;
// set up bitclass and endian
pConfig.targets().setEndian(TargetOptions::Little);
pConfig.targets().setBitClass(32);
// set up target-dependent constraints of attributes
pConfig.attribute().constraint().enableWholeArchive();
pConfig.attribute().constraint().enableAsNeeded();
pConfig.attribute().constraint().setSharedSystem();
// set up the predefined attributes
pConfig.attribute().predefined().unsetWholeArchive();
pConfig.attribute().predefined().unsetAsNeeded();
pConfig.attribute().predefined().setDynamic();
// set up section map
if (pConfig.codeGenType() != LinkerConfig::Object) {
bool exist = false;
pConfig.scripts().sectionMap().append(".ARM.exidx", ".ARM.exidx", exist);
pConfig.scripts().sectionMap().append(".ARM.extab", ".ARM.extab", exist);
pConfig.scripts().sectionMap().append(".ARM.attributes", ".ARM.attributes", exist);
}
return true;
}
示例2: assert
static bool MCLDEmulateX86ELF(LinkerScript& pScript, LinkerConfig& pConfig)
{
if (!MCLDEmulateELF(pScript, pConfig))
return false;
// set up bitclass and endian
pConfig.targets().setEndian(TargetOptions::Little);
unsigned int bitclass;
Triple::ArchType arch = pConfig.targets().triple().getArch();
assert (arch == Triple::x86 || arch == Triple::x86_64);
if (arch == Triple::x86 ||
pConfig.targets().triple().getEnvironment() == Triple::GNUX32) {
bitclass = 32;
}
else {
bitclass = 64;
}
pConfig.targets().setBitClass(bitclass);
// set up target-dependent constraints of attributes
pConfig.attribute().constraint().enableWholeArchive();
pConfig.attribute().constraint().enableAsNeeded();
pConfig.attribute().constraint().setSharedSystem();
// set up the predefined attributes
pConfig.attribute().predefined().unsetWholeArchive();
pConfig.attribute().predefined().unsetAsNeeded();
pConfig.attribute().predefined().setDynamic();
return true;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_frameworks_compile_mclinker,代码行数:30,代码来源:X86Emulation.cpp
示例3: MCLDEmulateHexagonELF
static bool MCLDEmulateHexagonELF(LinkerConfig& pConfig)
{
if (!MCLDEmulateELF(pConfig))
return false;
// set up bitclass and endian
pConfig.targets().setEndian(TargetOptions::Little);
pConfig.targets().setBitClass(32);
// set up target-dependent constraints of attributes
pConfig.attribute().constraint().enableWholeArchive();
pConfig.attribute().constraint().enableAsNeeded();
pConfig.attribute().constraint().setSharedSystem();
// set up the predefined attributes
pConfig.attribute().predefined().unsetWholeArchive();
pConfig.attribute().predefined().unsetAsNeeded();
pConfig.attribute().predefined().setDynamic();
return true;
}