49 lines · c
1//===- XCOFFObject.h --------------------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_OBJCOPY_XCOFF_XCOFFOBJECT_H10#define LLVM_LIB_OBJCOPY_XCOFF_XCOFFOBJECT_H11 12#include "llvm/ADT/ArrayRef.h"13#include "llvm/ADT/StringRef.h"14#include "llvm/Object/XCOFFObjectFile.h"15#include <vector>16 17namespace llvm {18namespace objcopy {19namespace xcoff {20 21using namespace object;22 23struct Section {24 XCOFFSectionHeader32 SectionHeader;25 ArrayRef<uint8_t> Contents;26 std::vector<XCOFFRelocation32> Relocations;27};28 29struct Symbol {30 XCOFFSymbolEntry32 Sym;31 // For now, each auxiliary symbol is only an opaque binary blob with no32 // distinction.33 StringRef AuxSymbolEntries;34};35 36struct Object {37 XCOFFFileHeader32 FileHeader;38 XCOFFAuxiliaryHeader32 OptionalFileHeader;39 std::vector<Section> Sections;40 std::vector<Symbol> Symbols;41 StringRef StringTable;42};43 44} // end namespace xcoff45} // end namespace objcopy46} // end namespace llvm47 48#endif // LLVM_LIB_OBJCOPY_XCOFF_XCOFFOBJECT_H49