This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is it possible to overload symbols in static libraries?


On Wednesday, August 03, 2011 04:20:16 Rohit Arul Raj wrote:
> I have created a static library in libgloss.a, which by default dumps
> the input/output to console I/O.
> I also have an UART library. Now to dump the output to UART, i thought
> of overloading the console I/O functions (having them as weak
> symbols). But it seems that it doesn't work with archives.

it's a bit more subtle than that

> The solution that i can think of for now is:
> 1. Have separate libraries for console I/O and UART.
> 2. Link them with libgloss.a
> 
> Is there any better alternative?

you could use --whole-archive when linking and ignore the subtle issues
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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