[PATCH] New option --print-gc-sections

Eric Botcazou ebotcazou@adacore.com
Mon Apr 3 06:36:00 GMT 2006


> 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



More information about the Binutils mailing list