LLVM 23.0.0git
MipsELFObjectWriter.cpp File Reference
#include "MCTargetDesc/MipsFixupKinds.h"
#include "MCTargetDesc/MipsMCAsmInfo.h"
#include "MCTargetDesc/MipsMCTargetDesc.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCELFObjectWriter.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <iterator>
#include <list>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mips-elf-object-writer"

Functions

static unsigned getMatchingLoType (const ELFRelocationEntry &Reloc)
 Determine the low relocation that matches the given relocation.
static bool isMatchingReloc (unsigned MatchingType, const ELFRelocationEntry &R, const ELFRelocationEntry &X)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mips-elf-object-writer"

Definition at line 31 of file MipsELFObjectWriter.cpp.

Function Documentation

◆ getMatchingLoType()

unsigned getMatchingLoType ( const ELFRelocationEntry & Reloc)
static

Determine the low relocation that matches the given relocation.

If the relocation does not need a low relocation then the return value is ELF::R_MIPS_NONE.

The relocations that need a matching low part are R_(MIPS|MICROMIPS|MIPS16)_HI16 for all symbols and R_(MIPS|MICROMIPS|MIPS16)_GOT16 for local symbols only.

Definition at line 66 of file MipsELFObjectWriter.cpp.

References llvm::ELF::STB_LOCAL.

◆ isMatchingReloc()

bool isMatchingReloc ( unsigned MatchingType,
const ELFRelocationEntry & R,
const ELFRelocationEntry & X )
static

Definition at line 90 of file MipsELFObjectWriter.cpp.

References X.