* RE: Optimization, remove unused code from Image
@ 2005-01-11 11:08 Madani, Srikanth, VF-DE
0 siblings, 0 replies; 4+ messages in thread
From: Madani, Srikanth, VF-DE @ 2005-01-11 11:08 UTC (permalink / raw)
To: Labermeier Norbert, gcc-help
>With unused code I talk about functions which are not called but part
of
>a source file.
Not possible, at least not with a compiler/linker switch. Or that was
what I discovered when I tried to do the same thing. :-)
Cheers,
Srikanth Madani
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Optimization, remove unused code from Image
2005-01-11 11:17 ` Sriharsha
@ 2005-01-11 11:29 ` Graham Stott
0 siblings, 0 replies; 4+ messages in thread
From: Graham Stott @ 2005-01-11 11:29 UTC (permalink / raw)
To: Sriharsha, gcc-help
All,
It is possible to eliminated unused functions on many but not all targets
supported by GCC.
Use -ffunction-sections when compling and and --gc-sections when linking.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Optimization, remove unused code from Image
2005-01-11 10:56 Labermeier Norbert
@ 2005-01-11 11:17 ` Sriharsha
2005-01-11 11:29 ` Graham Stott
0 siblings, 1 reply; 4+ messages in thread
From: Sriharsha @ 2005-01-11 11:17 UTC (permalink / raw)
To: gcc-help
I guess you only have the option of re-compiling your source code with
the option:
-Wunused-function
You cannot directly modify a binary file for what you intend to do.
Sriharsha.
Labermeier Norbert wrote:
>Hi all,
>
>I'd like to remove unused code from my embedded binary image, but I
>didn't succeed find the right compiler/linker switch.
>With unused code I talk about functions which are not called but part of
>a source file.
>
>Main target for me is to reduce code size.
>
>I'm currently working with a PPC and GCC-2.96 from VxWorks.
>
>I've already tested with -Os to reduce size but I didn't succeed to
>remove the unused functions.
>
>Can anybody give me some hints.
>
>Kind regards,
>
>Norbert
>
>
>
>
>
>
>
--
*****************************
* Sriharsha Vedurmudi
* Software Engineer
*
* Redpine Signals Inc.
* Gate #395, Plot 87,88
* Sagar Society, Road #2,
* Banjara Hills,
* Hyderabad - 500 034
* www.redpinesignals.com
*
* +91-40-23559911 (Office)
* +91-98491-33133 (Mobile)
*****************************
^ permalink raw reply [flat|nested] 4+ messages in thread
* Optimization, remove unused code from Image
@ 2005-01-11 10:56 Labermeier Norbert
2005-01-11 11:17 ` Sriharsha
0 siblings, 1 reply; 4+ messages in thread
From: Labermeier Norbert @ 2005-01-11 10:56 UTC (permalink / raw)
To: gcc-help
Hi all,
I'd like to remove unused code from my embedded binary image, but I
didn't succeed find the right compiler/linker switch.
With unused code I talk about functions which are not called but part of
a source file.
Main target for me is to reduce code size.
I'm currently working with a PPC and GCC-2.96 from VxWorks.
I've already tested with -Os to reduce size but I didn't succeed to
remove the unused functions.
Can anybody give me some hints.
Kind regards,
Norbert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-11 11:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11 11:08 Optimization, remove unused code from Image Madani, Srikanth, VF-DE
-- strict thread matches above, loose matches on Subject: below --
2005-01-11 10:56 Labermeier Norbert
2005-01-11 11:17 ` Sriharsha
2005-01-11 11:29 ` Graham Stott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).