[llvm-bugs] [Bug 35248] New: LLD .map files: Request more info for "<internal>:(.rodata)"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 8 08:42:53 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35248
Bug ID: 35248
Summary: LLD .map files: Request more info for
"<internal>:(.rodata)"
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: huangs at google.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19387
--> https://bugs.llvm.org/attachment.cgi?id=19387&action=edit
Sample .map outputs and script + sources to generate them.
LLD's generated .map file provides no semantic information on merged data in
.rodata section. In particular, merged strings are not distinguished from
other data; everything is labelled as "<internal>:(.rodata)".
The missing information is useful for tools that parse .map file to annotate
executable bytes to source. An example is Chrome's Supersize too (that I'm
working on):
https://github.com/webrtc-uwp/chromium-tools/blob/master/binary_size/README.md
Comparison with other linkers:
LD .map files annotates .rodata section names from the original .o files,
.rodata.cst4 0x0000000000400ad0 0x4
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o
0x0000000000400ad0 _IO_stdin_used
*fill* 0x0000000000400ad4 0x4
.rodata.cst8 0x0000000000400ad8 0x8 a.o
.rodata.str1.1
0x0000000000400ae0 0x3e a.o
0x44 (size before relaxing)
GOLD .map files provides less info, but identifies the type ("** merge
constants" vs. "** mege strings"), e.g.:
.rodata 0x0000000000400af0 0x60
** merge constants
0x0000000000400af0 0x4
** merge constants
0x0000000000400af8 0x8
** merge strings
0x0000000000400b00 0x44
Meanwhile, LLD .map files only has "<internal>:(.rodata)", e.g.:
00000000002002e8 0000000000000060 8 .rodata
00000000002002e8 0000000000000004 4 <internal>:(.rodata)
00000000002002f0 0000000000000008 8 <internal>:(.rodata)
00000000002002f8 0000000000000044 1 <internal>:(.rodata)
0000000000200340 0000000000000008 8 b.o:(.rodata)
0000000000200340 0000000000000008 0 b
The attached .zip file contains examples to generate the above ('genall'
generates the .map files, and need to be tweaked to get proper paths).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171108/d20fc2fd/attachment-0001.html>
More information about the llvm-bugs
mailing list