How to disable GCC optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




We are recently facing one issue with the build.

Intro:

our system consists of one executable .sct and one shared object .so
we are compiling one file **.c in executable which has definitions for 2
functions  which we are referring only from shared object. No other function
or global variables from file referred any where in the executable.

Issue:

Once compilation and linking is done. when we checked for definitions of 
function in executable using "nm" they are missing. actually all the
definition from the file are missing in executable. we checked for
definitions in object file they are present.

We tried -o0 but no use.
we tried whole-archive which is working for us but we are getting lot of
errors "undefined". Our system don't compile all the files it compiles only
specific once and we can't compile everything as our system does not need
them.


GCC is stripping the object file when nothing from the file is being used
anywhere in the executable.
We have to disable this feature of linker g++

could any one please help us to resolve this issue??


thanks in advance,
Pramod.






 









--
View this message in context: http://gcc.1065356.n5.nabble.com/How-to-disable-GCC-optimization-tp967456.html
Sent from the gcc - Help mailing list archive at Nabble.com.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux