avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Forced Linking


From: E. Weddington
Subject: Re: [avr-gcc-list] Forced Linking
Date: Thu, 06 Mar 2003 15:54:15 -0700

On 6 Mar 2003 at 13:47, Keith Gudger wrote:

> I have some AVR interrupt routines in an archive file.  When I run the
> linker, they get left out, as nothing in my source files refers to
> them. Obviously, the linked code doesn't work.
> 
> I've searched the linker manual and found no option to make it include
> functions.  I've searched the ar and ranlib manuals to see if there's
> a way to "flag" functions or included files as "must include".  I
> couldn't find a way.
> 
> Any ideas?  Thanks.
> 

Looking through the ld manual, I see the --whole-archive option, but 
that's going to slurp in the whole thing.

If you know beforehand that when a user links in x that y should 
always go with it, you can include both x and y in the same object 
file before you create the archive.

Also from personal email with you, take a look at the -( option in 
ld. This would solve your circular reference issue with your 2 libs.

Anyway, why do you need to link a function when it isn't being 
referenced in the code?

Eric Weddington


reply via email to

[Prev in Thread] Current Thread [Next in Thread]