This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch, tentative] Show output section size contribution from each input file in map file
- From: Alan Modra <amodra at gmail dot com>
- To: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- Cc: binutils at sourceware dot org, nickc at redhat dot com
- Date: Wed, 27 May 2015 10:42:22 +0930
- Subject: Re: [Patch, tentative] Show output section size contribution from each input file in map file
- Authentication-results: sourceware.org; auth=none
- References: <20150520124445 dot GB1763 at atmel dot com>
On Wed, May 20, 2015 at 06:14:46PM +0530, Senthil Kumar Selvaraj wrote:
> This very rough patch adds extra information to the map file to show
> how much each input file contributed to output sections in the output
> file. While this information can already by computed by
> grepping/summing existing map file output, this patch makes that
> unnecessary - it groups by input bfd.
>
> The primary motivation is to help embedded developers (or anyone who is
> paranoid about code size) quickly figure out where most of the code/data
> is coming from.
Sorry, I don't see this as useful at all. For people who don't want
the collected information, it is just clutter. Teach your users about
grep instead..
$ gcc -o hello hello.o -Wl,-Map,hello.map
$ grep hello.o hello.map
0x0000000000000000 0x0 hello.o
LOAD hello.o
.text 0x00000000004004d6 0x46 hello.o
.rodata 0x00000000004005a4 0x6 hello.o
.eh_frame 0x0000000000400658 0x40 hello.o
.data 0x0000000000600928 0x0 hello.o
.bss 0x0000000000600929 0x0 hello.o
.comment 0x000000000000001a 0x1b hello.o
--
Alan Modra
Australia Development Lab, IBM