[ECOS] Redboot issue with Weak symbols

John Newlin jnewlin@rawbw.com
Fri Oct 24 00:35:00 GMT 2003


I am working on bringing up Redboot on a new platform and architecture.

The issue I am running into is as follows:

The function cyg_start is declared as weak in startup.cxx.
The function cyg_start is strong in main.c (under redboot)

However, both of these object files are added to libtarget.a
in the above order.

When the linker starts searching for cyg_start it finds the first copy of
cyg_start (which is the weak version) and stops looking after that point.

If I were building an application I could simply provide the object file
that contained cyg_start on the link line, and all would be happy.  The
problem seems to appear because the linker stops searching the .a file
after it finds the first occurrence of cyg_start.

Surely someone has already figured out how to make this work on other
architectures (I know the MIPS code compiles just fine).

If someone could let me in on the secret, that would be great!


-John Newlin

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list