[PATCH] D44894: [ELF] - Reveal more information in -Map file about assignments.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 28 05:12:30 PDT 2018


grimar added inline comments.


================
Comment at: ELF/LinkerScript.h:202-207
+
+  // This is just an offset of this assignment command in the output section.
   unsigned Offset;
+
+  // Size of this data command.
   unsigned Size;
----------------
ruiu wrote:
> Why do you need to add these field to two different places? We generally should avoid doing this.
I am not adding `Size` in this patch, just adjusting the comments.

Now we have `SymbolAssignment`, `ByteCommand` and `OutputSection` users of field `Size`.
I thought about the possibility to move this field to `BaseCommand` but my concern is
that for each of these commands, `Size` has the different meaning. Size of the output section is obvious,
as well as the size of the data command, but the size of the assignment is very different. 
We do not have `Size` in `AssertCommand` (and it probably makes no sense to have it).
Currently, all of the instances has its own comments and it looks good to me.



https://reviews.llvm.org/D44894





More information about the llvm-commits mailing list