Support for R_MIPS_NONE allows us to parse MIPS16's usage of .reloc.
R_MIPS_32 was included to be able to better test the directive.
Targets can add their relocations by overriding MCAsmBackend::getFixupKind().
Differential D13659
Implement .reloc (constant offset only) with support for R_MIPS_NONE and R_MIPS_32. dsanders on Oct 12 2015, 8:49 AM. Authored by
Details Support for R_MIPS_NONE allows us to parse MIPS16's usage of .reloc. Targets can add their relocations by overriding MCAsmBackend::getFixupKind().
Diff Detail
Event Timeline
Comment Actions Thanks
Comment Actions Fix all review comments except for the addend hook which I'm still thinking
Comment Actions What happens when you do: .text .long .text+2 .reloc 0, R_MIPS_32, .text+3
Comment Actions I get: Disassembly of section .text: 00000000 <.text>: 0: 00000005 lsa zero,zero,zero,0x1 0: R_MIPS_32 .text 0: R_MIPS_32 .text ... The two addends are summed and stored in the section while two R_MIPS_32 relocs for .text are emitted.
Comment Actions Moved .reloc related things near to .value related things. Comment Actions I committed this in r252888 since I have an LGTM from David and there have been no further comments in the last two weeks.
|