This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] New option --print-gc-sections
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at gcc dot gnu dot org, Arnaud Charlet <charlet at adacore dot com>
- Date: Mon, 3 Apr 2006 08:39:40 +0200
- Subject: Re: [PATCH] New option --print-gc-sections
- References: <200603281131.41402.ebotcazou@adacore.com> <20060329124950.GD22754@bubble.grove.modra.org>
> Actually, you can already glean this from a link map. GC'd sections
> will be those that are shown with zero size.
That doesn't seem to work. Even if I remove the "if (size != 0)" at the
beginning of print_input_section, the interesting sections are not present in
the link map.
On my example, a grep "unused" should have returned .text.u__unused,
.text.u__unused2 and .gcc_except_table.u__unused, whereas I only see
.rel.text.u__unused
0x0000000008049088 0x0 /usr/lib/crt1.o
.rel.text.u__unused_2
0x0000000008049088 0x0 /usr/lib/crt1.o
.rel.gcc_except_table.u__unused
0x00000000080490f8 0x0 /usr/lib/crt1.o
--
Eric Botcazou