Movement of confdefs instance into a static library
Kinsey Moore
kinsey.moore at oarcorp.com
Thu Mar 17 13:22:02 UTC 2022
On 3/17/2022 00:39, Sebastian Huber wrote:
> Hello Kinsey,
>
> On 16/03/2022 22:57, Kinsey Moore wrote:
>> Is moving the confdefs instance into a shared library supported and
>> expected to work?
>
> yes, but the order in which the linker resolves the dependencies is
> very important. You have to make sure that the custom configuration is
> resolved before the default configuration.
>
>>
>> I was also able to resolve the linker errors by specifying some of
>> the link flags multiple times or creating a linker group.
>
> These are ways to address the ordering. It would help if you can show
> the linker command lines and the error messages.
>
The link command is:
arm-rtems6-gcc testsuites/fstests/fserror/test.c.113.o
-o/home/kinsey/rtems-development/rtems-ddci/build/arm/deos/testsuites/fstests/imfs_fserror.exe
-Wl,-Bstatic -L. -ltestimfs -lrtemstest -lrtemscpu -lrtemsbsp
-Wl,-Bdynamic -qrtems -march=armv7-a -mfpu=neon -mfloat-abi=hard -mthumb
-gdwarf-2 -fPIC -Wl,--gc-sections
-L/home/kinsey/rtems-development/rtems-ddci/bsps/arm/shared/start
-L/home/kinsey/rtems-development/rtems-ddci/bsps/arm/deos/start
-Wl,-call_shared -Wl,-no-undefined /desk/arm/lib/libkernel.so
/desk/arm/lib/libdeos653pal.so -L/desk/arm/appbin -ltime-prl -lface653
-lgcc-so -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar
The newly introduced linking flags toward the end are:
-Wl,-call_shared -Wl,-no-undefined /desk/arm/lib/libkernel.so
/desk/arm/lib/libdeos653pal.so -L/desk/arm/appbin -ltime-prl -lface653
-lgcc-so
The first error is:
/home/kinsey/rtems-development/tools/lib/gcc/arm-rtems6/10.3.1/../../../../arm-rtems6/bin/ld:
./librtemscpu.a(threadsetstate.c.59.o): in function
`_Thread_Scheduler_get_home':
/home/kinsey/rtems-development/rtems-ddci/build/arm/deos/../../../cpukit/include/rtems/score/threadimpl.h:1533:
undefined reference to `_Scheduler_Table'
The remainder can be found here:
https://pbot.rmdir.de/DVjoVpxIMVsciAh69jzNuQ
Thanks,
Kinsey
More information about the devel
mailing list