<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add ability to print segment size information"
href="https://bugs.llvm.org/show_bug.cgi?id=43162">43162</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Add ability to print segment size information
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>llvm-size
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jh7370.2008@my.bristol.ac.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>bigcheesegs@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>