You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
912 B
31 lines
912 B
//===- GNUInfo.cpp --------------------------------------------------------===//
|
|
//
|
|
// The MCLinker Project
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#include "mcld/Target/GNUInfo.h"
|
|
|
|
namespace mcld {
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// GNUInfo
|
|
//===----------------------------------------------------------------------===//
|
|
GNUInfo::GNUInfo(const llvm::Triple& pTriple) : m_Triple(pTriple) {
|
|
}
|
|
|
|
uint8_t GNUInfo::OSABI() const {
|
|
switch (m_Triple.getOS()) {
|
|
case llvm::Triple::FreeBSD:
|
|
return llvm::ELF::ELFOSABI_FREEBSD;
|
|
case llvm::Triple::Linux:
|
|
return llvm::ELF::ELFOSABI_LINUX;
|
|
default:
|
|
return llvm::ELF::ELFOSABI_NONE;
|
|
}
|
|
}
|
|
|
|
} // namespace mcld
|