RE: [arm-gnu] gnu-arm-ld deadstripping?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [arm-gnu] gnu-arm-ld deadstripping?
- To: "Paul Brook" <paul@xxxxxxxxxxxxxxxx>, <arm-gnu@xxxxxxxxxxxxxxxx>
- Subject: RE: [arm-gnu] gnu-arm-ld deadstripping?
- From: "Jeff Mathews" <jmathews@xxxxxxxxxxxxxxx>
- Date: Thu, 20 Jan 2005 10:01:03 -0700
Unfortunately when I use these flags the stripping is a little
aggressive. :)
My .cof shrinks from 330k to 238k, but the .bin is now zero. The .bin is
created by calling arm-none-eabi-objcopy -O binary $@.cof $@.bin
Regards,
Jeff Mathews
-----Original Message-----
From: Paul Brook [mailto:paul@xxxxxxxxxxxxxxxx]
Sent: Wednesday, January 19, 2005 12:32 PM
To: arm-gnu@xxxxxxxxxxxxxxxx
Cc: Jeff Mathews
Subject: Re: [arm-gnu] gnu-arm-ld deadstripping?
On Wednesday 19 January 2005 19:09, Jeff Mathews wrote:
> does the linker dead strip unused code (uncalled functions) from the
> libraries and sources?
Not really. When linking a library (.a) the linker will only include the
objects from that library which are actually required. It does not
attempt to
determine if user specified objects are unused, or to discard unused
functions. In general this is not possible without additional
information.
The --gc-sections switch will tell the linker to discard unused
sections. This
may achieve what you want if the objects were compiled with
-ffunction-sections.
Paul