public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* removing unused functions during final link
@ 2014-08-27 21:02 Melvin Blades
  2014-08-27 21:22 ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Melvin Blades @ 2014-08-27 21:02 UTC (permalink / raw)
  To: gcc-help

I've inherited a pile of code and need to cross compile it for an
embedded MIPs processor
I'm creating a single app that will be run under Linux.
My  app  code links to another larger pile of  third-party software (utilities)
My app uses only  a  part of the these utilities, but the final
executable is very large and includes  utilities functions that are
never called.
My app also will dynamically link with uclibc

My compilation/linking results in an app so large that I can't load it
on my eval board.

What command line options can I use to get the linker to strip unused
functions from the final executable?

I've googled and came up with some proposed solutions

This one
        https://gcc.gnu.org/ml/gcc-help/2003-08/msg00128.html
results in an error message .. -f may not be used without -shared

Other places say that the dead-strip  option is architecture dependent.
http://embeddedfreak.wordpress.com/2009/02/10/removing-unused-functionsdead-codes-with-gccgnu-ld/
Where can I find out if the MIPS compiler supports this?
Or whether I just haven't used the correct command line options for
compiling and linking

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-05 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-27 21:02 removing unused functions during final link Melvin Blades
2014-08-27 21:22 ` Ian Lance Taylor
2014-09-03  3:20   ` Melvin Blades
2014-09-03 10:21     ` Andrew Haley
2014-09-03 15:09       ` Melvin Blades
2014-09-03 15:13         ` Andrew Haley
2014-09-05 15:24           ` Melvin Blades

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).