[llvm-bugs] [Bug 43162] New: Add ability to print segment size information
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 29 03:16:06 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43162
Bug ID: 43162
Summary: Add ability to print segment size information
Product: tools
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: llvm-size
Assignee: unassignedbugs at nondot.org
Reporter: jh7370.2008 at my.bristol.ac.uk
CC: bigcheesegs at gmail.com, llvm-bugs at lists.llvm.org
llvm-size, like GNU size, uses the section headers to determine the sizes it
will print. However, this doesn't really reflect what the memory usage of a
program might be, because, for example, it doesn't take account of
between-section padding, stripped sections (e.g. via llvm-objcopy
--strip-sections) and so on. It might be nice if we added a new switch
(possibly a new --format option) to print the sizes as a loader might see,
namely the size of all loadable segments, probably broken down by segment. It
may or may not make sense to print the sizes of other (non-loadable) segments.
I'm open to ideas for formatting etc. It probably makes sense to look similar
to sysv output, listing each segment, in order, with type, flags, file size,
and memory size listed. Possibly a Total line would only include the real size
(i.e. nested segment sizes wouldn't be included).
Example:
Index Type Flags FileSize MemSize
1 LOAD RX 10 10
2 LOAD RW 8 20
3 TLS RW 4 10
4 GNU_RELRO RW 4 4
4 NOTE R 20 0
Total 38 3c
(I've assumed special-handling of PT_TLS in the above example, since it looks
to be nested, but takes up additional memory not included in the parent
segment).
--
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/20190829/a9a4bef4/attachment.html>
More information about the llvm-bugs
mailing list