[PATCH] D40128: [ELF] - Reveal layout of synthetic mergeable sections when producing -Map

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 00:25:53 PST 2017


grimar added a comment.

In https://reviews.llvm.org/D40128#928250, @ruiu wrote:

> How is this useful?


Isn't one of intentions of map file to show where are sections coming from ? Currently we don't print
file names for SHF_MERGE sections, that looks inconsistent with how we dump regular sections.

Also I think it can be useful to show difference between input and output size. That can be applied for mergeable
sections and also for compressed input/output ones.

> Also, this change creates a malformed output that breaks the assumption that the 6th column contains symbol names.

Oops, I missed header says its should be symbol, sorry.

Will it make sence to omit synthetic part (which is there only because of our internal representation and not useful) 
and print something like following then ?

  Address                    Size                             Align     Out        In                                                       Symbol
  0000000000000000 0000000000000008     2          .strings
  0000000000000000 0000000000000004     1                        {{.*}}{{/|\\}}map-file.s.tmp1.o:(.strings)
  0000000000000000 0000000000000008     2                        {{.*}}{{/|\\}}map-file.s.tmp2.o:(.strings)


https://reviews.llvm.org/D40128





More information about the llvm-commits mailing list