[LLVMdev] MCELFStreamer subclassing

Carter, Jack jcarter at mips.com
Tue Nov 15 12:20:39 PST 2011


So what I am hearing is that I should add the following to MC/MCFixup.h:

  FK_GPRel_1,    ///< A one-byte pc relative fixup.
  FK_GPRel_2,    ///< A two-byte pc relative fixup.
  FK_GPRel_4,    ///< A four-byte pc relative fixup.
  FK_GPRel_8,    ///< A eight-byte pc relative fixup.

In MC/MCStreamer.cpp MCStreamer::EmitGpRel32Value()

  Figure out how to mark it with the imprint of FK_GPRel_4

In MC/ELFObjectWriter.cpp MipsELFObjectWriter::GetRelocType()

  Add a switch case for FK_GPRel_4 to put out the correct target specific relocation.

Is that correct? Did I miss anything?

Thanks,

Jack




More information about the llvm-dev mailing list