//===- lib/MC/ELFObjectWriter.cpp - ELF File Writer -------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file implements ELF object file writer information.////===----------------------------------------------------------------------===//#include"llvm/MC/ELFObjectWriter.h"#include"llvm/ADT/SmallPtrSet.h"#include"llvm/ADT/STLExtras.h"#include"llvm/ADT/StringMap.h"#include"llvm/ADT/Twine.h"#include"llvm/MC/MCAssembler.h"#include"llvm/MC/MCAsmLayout.h"#include"llvm/MC/MCContext.h"#include"llvm/MC/MCELFSymbolFlags.h"#include"llvm/MC/MCExpr.h"#include"llvm/MC/MCObjectWriter.h"#include"llvm/MC/MCSectionELF.h"#include"llvm/MC/MCSymbol.h"#include"llvm/MC/MCValue.h"#include"llvm/Support/Debug.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Support/ELF.h"#include"llvm/Target/TargetAsmBackend.h"#include"../Target/X86/X86FixupKinds.h"#include<vector>usingnamespacellvm;staticunsignedGetType(constMCSymbolData&SD){uint32_tType=(SD.getFlags()&(0xf<<ELF_STT_Shift))>>ELF_STT_Shift;assert(Type==ELF::STT_NOTYPE||Type==ELF::STT_OBJECT||Type==ELF::STT_FUNC||Type==ELF::STT_SECTION||Type==ELF::STT_FILE||Type==ELF::STT_COMMON||Type==ELF::STT_TLS);returnType;}staticunsignedGetBinding(constMCSymbolData&SD){