[PATCH] D53990: [MC] Support labels as offsets in .reloc directive
Vladimir Stefanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 12:39:02 PDT 2018
vstefanovic created this revision.
vstefanovic added reviewers: atanasyan, majnemer.
Herald added subscribers: llvm-commits, jrtc27, arichardson, sdardis.
Currently, expressions like
.reloc 1f, R_MIPS_JALR, foo
1: nop
are not allowed, ie. an offset in .reloc can only be absolute value.
This patch adds support for labels as offsets.
If offset is a forward declared label, MCObjectStreamer keeps the fixup locally
and adds it to the fixups vector after the label (and its offset) is defined.
For now, up to one pending fixup is allowed, and label+number is not supported
yet.
Repository:
rL LLVM
https://reviews.llvm.org/D53990
Files:
include/llvm/MC/MCObjectStreamer.h
lib/MC/MCObjectStreamer.cpp
lib/MC/MCParser/AsmParser.cpp
test/MC/Mips/reloc-directive-bad-obj.s
test/MC/Mips/reloc-directive-bad.s
test/MC/Mips/reloc-directive-label-offset.s
test/MC/Mips/reloc-directive-negative.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53990.172202.patch
Type: text/x-patch
Size: 11150 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/51fc5a56/attachment.bin>
More information about the llvm-commits
mailing list