mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
6d249ac22a
Clang-compiled object files currently don't include the symbol sizes and types. Some tools however need that information. For example, ctfconvert uses that information to generate FreeBSD's CTF representation from ELF files. With this patch, symbol sizes and types are included in object files. Signed-off-by: Paul Chaignon <paul.chaignon@orange.com> Reported-by: Yutaro Hayakawa <yhayakawa3720@gmail.com> llvm-svn: 342556
55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
//===-- BPFMCAsmInfo.h - BPF asm properties -------------------*- C++ -*--====//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the declaration of the BPFMCAsmInfo class.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
|
|
#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
|
|
|
|
#include "llvm/ADT/Triple.h"
|
|
#include "llvm/MC/MCAsmInfo.h"
|
|
|
|
namespace llvm {
|
|
class Target;
|
|
|
|
class BPFMCAsmInfo : public MCAsmInfo {
|
|
public:
|
|
explicit BPFMCAsmInfo(const Triple &TT) {
|
|
if (TT.getArch() == Triple::bpfeb)
|
|
IsLittleEndian = false;
|
|
|
|
PrivateGlobalPrefix = ".L";
|
|
WeakRefDirective = "\t.weak\t";
|
|
|
|
UsesELFSectionDirectiveForBSS = true;
|
|
HasSingleParameterDotFile = true;
|
|
HasDotTypeDotSizeDirective = true;
|
|
|
|
SupportsDebugInformation = true;
|
|
ExceptionsType = ExceptionHandling::DwarfCFI;
|
|
MinInstAlignment = 8;
|
|
|
|
// the default is 4 and it only affects dwarf elf output
|
|
// so if not set correctly, the dwarf data will be
|
|
// messed up in random places by 4 bytes. .debug_line
|
|
// section will be parsable, but with odd offsets and
|
|
// line numbers, etc.
|
|
CodePointerSize = 8;
|
|
}
|
|
|
|
void setDwarfUsesRelocationsAcrossSections(bool enable) {
|
|
DwarfUsesRelocationsAcrossSections = enable;
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|