While building the WinCE 5.0 OAL I need to implement a device specific
version of a function, that is defined in the x86\COMMON source tree. I
added a new file to the platform specific OAL and implemented the function.
But the linker does not use my implementation. Instead is uses the version
from oal_other_x86.lib.

When I defined another dummy function in my implementation source file, my
function is linked. So I can state, that the function fulfills the linker
requirements. I assume that my function is not linked, because the linker
has found the implementation in oal_other_x86, because of the the search
order.

In the SOURCES file I can find the oal.lib (with my implementation) before
the oal_other_x86.lib. I excpected that the order in the TARGETLIBS macro
define the order.

What's wrong? How dow I overload the default implementation?

/Helge

Re: Library search order by K

K
Sun Apr 24 21:13:30 CDT 2005

You'll need to modify the sources file as follow

change
$(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_other_x86.lib
to
$(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_other_x86.lib

"Helge Kruse" <Helge.Kruse-nospam@gmx.net> ¼¶¼g©ó¶l¥ó·s»D:e%23jetn2RFHA.3716@TK2MSFTNGP14.phx.gbl...
> While building the WinCE 5.0 OAL I need to implement a device specific
> version of a function, that is defined in the x86\COMMON source tree. I
> added a new file to the platform specific OAL and implemented the
> function. But the linker does not use my implementation. Instead is uses
> the version from oal_other_x86.lib.
>
> When I defined another dummy function in my implementation source file, my
> function is linked. So I can state, that the function fulfills the linker
> requirements. I assume that my function is not linked, because the linker
> has found the implementation in oal_other_x86, because of the the search
> order.
>
> In the SOURCES file I can find the oal.lib (with my implementation) before
> the oal_other_x86.lib. I excpected that the order in the TARGETLIBS macro
> define the order.
>
> What's wrong? How dow I overload the default implementation?
>
> /Helge
>
>



Re: Library search order by Dean

Dean
Mon Apr 25 08:57:29 CDT 2005

It depends on the function you're replacing, who is calling it, and where
the caller is located. You may have to clone the entire oal_other_x86 lib,
and remove it's reference from your sources file.

--
Dean Ramsier - eMVP
Vibren Technologies
http://www.vibren.com/Products/schema_bsp.htm


"Helge Kruse" <Helge.Kruse-nospam@gmx.net> wrote in message
news:e%23jetn2RFHA.3716@TK2MSFTNGP14.phx.gbl...
> While building the WinCE 5.0 OAL I need to implement a device specific
> version of a function, that is defined in the x86\COMMON source tree. I
> added a new file to the platform specific OAL and implemented the
function.
> But the linker does not use my implementation. Instead is uses the version
> from oal_other_x86.lib.
>
> When I defined another dummy function in my implementation source file, my
> function is linked. So I can state, that the function fulfills the linker
> requirements. I assume that my function is not linked, because the linker
> has found the implementation in oal_other_x86, because of the the search
> order.
>
> In the SOURCES file I can find the oal.lib (with my implementation) before
> the oal_other_x86.lib. I excpected that the order in the TARGETLIBS macro
> define the order.
>
> What's wrong? How dow I overload the default implementation?
>
> /Helge
>
>



Re: Library search order by Helge

Helge
Wed Apr 27 01:47:01 CDT 2005

The function is currently BSPInitDfltBootInfo. Cloning the complete library
is possible, but looks a bit unhandy. How does it depends on the caller
location?

/Helge



Re: Library search order by Helge

Helge
Thu Apr 28 00:44:41 CDT 2005

The OAL directory has a SOURCES file, that defines the generation of
oal.lib. How can you generate the oal_other_x86.lib in the platform specific
library path?

Regards, Helge

"K. S. Huang" <ksh_AT_bsquare_DOT_com> wrote in message
news:OAx5SxTSFHA.2932@TK2MSFTNGP09.phx.gbl...
> You'll need to modify the sources file as follow
>
> change
> $(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_other_x86.lib
> to
> $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_other_x86.lib
>


Re: Library search order by Dean

Dean
Thu Apr 28 08:07:15 CDT 2005

Copy all the code into the platform, and build it there...

--
Dean Ramsier - eMVP
Vibren Technologies
http://www.vibren.com/Products/schema_bsp.htm


"Helge Kruse" <Helge.Kruse-nospam@gmx.net> wrote in message
news:eJTbhV7SFHA.1896@TK2MSFTNGP14.phx.gbl...
> The OAL directory has a SOURCES file, that defines the generation of
> oal.lib. How can you generate the oal_other_x86.lib in the platform
specific
> library path?
>
> Regards, Helge
>
> "K. S. Huang" <ksh_AT_bsquare_DOT_com> wrote in message
> news:OAx5SxTSFHA.2932@TK2MSFTNGP09.phx.gbl...
> > You'll need to modify the sources file as follow
> >
> > change
> > $(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_other_x86.lib
> > to
> > $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_other_x86.lib
> >
>



Re: Library search order by K

K
Thu Apr 28 20:25:25 CDT 2005

Or you may only copy the files you want to modify and let the partial cloned
version also lnk the original library by assigned proper setting for the
SOURCELIBS macro.
For example, if you try to modify the file bspboot.c, you could only clone
and modify that file into your BSP and let the sources file as follow

TARGETNAME=oal_other_x86
TARGETTYPE=LIBRARY
SYNCHRONIZE_DRAIN=1
RELEASETYPE=PLATFORM

INCLUDES=..\..\inc;$(_WINCEROOT)\public\common\oak\CSP\x86\inc;$(INCLUDES)
SOURCES=bspboot.c

SOURCELIBS=\
$(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_other_x86.lib \

then the final oal_other_x86 will still contain all of the code in
$(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_other_x86.lib except those you
provided. (bspboot.c in this example).

"Dean Ramsier" <ramsiernospam@nospam.com> ¼¶¼g©ó¶l¥ó·s»D:O9Yf0M$SFHA.2996@TK2MSFTNGP15.phx.gbl...
> Copy all the code into the platform, and build it there...
>
> --
> Dean Ramsier - eMVP
> Vibren Technologies
> http://www.vibren.com/Products/schema_bsp.htm
>
>
> "Helge Kruse" <Helge.Kruse-nospam@gmx.net> wrote in message
> news:eJTbhV7SFHA.1896@TK2MSFTNGP14.phx.gbl...
>> The OAL directory has a SOURCES file, that defines the generation of
>> oal.lib. How can you generate the oal_other_x86.lib in the platform
> specific
>> library path?
>>
>> Regards, Helge
>>
>> "K. S. Huang" <ksh_AT_bsquare_DOT_com> wrote in message
>> news:OAx5SxTSFHA.2932@TK2MSFTNGP09.phx.gbl...
>> > You'll need to modify the sources file as follow
>> >
>> > change
>> > $(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_other_x86.lib
>> > to
>> > $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_other_x86.lib
>> >
>>
>
>