[Prev][Next][Index][Thread]
Re: Overriding stuff from OSKit libs, some random remarks, and patches
Michael Hohmuth wrote:
> > One area where I did have trouble was convincing the linker that it
> > should actually use stuff from my library and not from the OSKit's
> > libraries. For example, the linker liked to use osenv_irq_enable()
> > from liboskit_dev and not from my lib even though my lib was first on
> > the command line because this symbol was first used from within
> > liboskit_dev.
>
> [snip]
>
> So I'm back at sucking in my library's objects via kludges in header
> files...
For the sake of my sanity, I seem to have erased all details of this
kludge from my mind.
Could you use gcc's -u flag instead?
gcc ... -u osenv_irq_enable libmichael.a liboskit_dev.a ...
or, alternatively, don't use .a files:
gcc ... -u osenv_irq_enable michael1.o michael2.o ... liboskit_dev.a ...
--
Alastair Reid reid@cs.utah.edu http://www2.cs.utah.edu/~reid/
ps I'm working on a better way of specifying exactly what should be linked
to what (a sort of "fancy linker") which should completely eliminate
this kind of problem.
References: