[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 01:07:03 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) + "]";
+}
----------------
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.


https://reviews.llvm.org/D43819





More information about the llvm-commits mailing list