This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Optimizations of functions (-O1 & -O2)




If you are positive that the program does not use the Unresolved sysbols
you can have the linker ignore unresolved symbols by passing
-ignore_unresolved to the linker. (usually a -Wl, option)  Then set
_RLD_ARGS=-ignore_unresolved in the environment so that the runtime linker
will behave the sameway.  Now try running or debugging your program.

Of course if you are wrong and the program does use the objects, but they
have been inlined, then the program will core when you hit the unresolved
symbols.  Either way you will have made some progress in debugging your
program.

james

On Thu, 13 Jul 2000, Rob Emanuele wrote:

> I compiling C++ code on an SGI using GCC and I'm trying to
> make a debug build with no optimizations.  The code base is
> quite large so I'm trying to use as few source files as
> possible.
> 
> If I specify the -O2 optimize option things compile OK but
> are hard to debug.  If I do use not optimizations or
> use -O1, I have linking problems that result in messages
> like these:
> 
> ld32: ERROR 33: Unresolved text symbol
> "hsQuat::Read(hsStream *)" -- 1st referenced by
> hsKeys.dbg.o.
> 	Use linker option -v to see when and which objects,
> archives and dsos are loaded.
> ld32: ERROR 33: Unresolved text symbol
> "hsQuat::Write(hsStream *)" -- 1st referenced by
> hsKeys.dbg.o.
> 	Use linker option -v to see when and which objects,
> archives and dsos are loaded.
> ld32: ERROR 33: Unresolved text symbol "decomp_affine(float
> const (*)[3], gemAffineParts *)" -- 1st referenced by
> hsKeys.dbg.o.
> 	Use linker option -v to see when and which objects,
> archives and dsos are loaded.
> ld32: ERROR 33: Unresolved text symbol
> "hsAffineParts::Read(hsStream *)" -- 1st referenced by
> hsKeys.dbg.o.
> 	Use linker option -v to see when and which objects,
> archives and dsos are loaded.
> ld32: ERROR 33: Unresolved text symbol
> "hsAffineParts::Write(hsStream *)" -- 1st referenced by
> hsKeys.dbg.o.
> 	Use linker option -v to see when and which objects,
> archives and dsos are loaded.
> 
> Does anyone know what single optimization I can turn on to
> optimize these out?  I'm pretty sure that none of these
> functions are actually used.  Does anyone know what
> specifically the optimizations are that -O1 & -O2 turn on or
> where that info lives?
> 
> Thanks,
> 
> Rob
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]