[PATCH] D43819: [ELF] - Restrict section offsets that exceeds file size.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 05:24:25 PST 2018


jhenderson added inline comments.


================
Comment at: ELF/Writer.cpp:1832
+    return "<empty range at 0x" + utohexstr(Addr) + ">";
+  return "[0x" + utohexstr(Addr) + " -> 0x" + utohexstr(Addr + Len - 1) + "]";
+}
----------------
grimar wrote:
> grimar wrote:
> > jhenderson wrote:
> > > ruiu wrote:
> > > > `[start -> end]` (e.g. `[0xFFFFFFFF20000000 -> 0xFFFFFFFE40000000]`) is a weird notion to represent a range. I think `[start:end]` is more common.
> > > FWIW - this function is just a move of an existing function.
> > > 
> > > In places like llvm-dwarfdump dumping of debug ranges etc, the common practice is "[start, end)". Maybe that's what we should follow as well.
> > Yes. Since it is a move, I would not change the format of the output in this patch.
> LLD currently use `[X, Y]` for ranges in the messages:
> `relocation R_386_16 out of range: 65536 is not in [0, 65535]`
> 
> Should we be consistent here?
Being consistent with what LLD does works for me.


https://reviews.llvm.org/D43819





More information about the llvm-commits mailing list