Re: Movement of confdefs instance into a static library
On 3/17/2022 08:35, Sebastian Huber wrote: On 17/03/2022 14:22, Kinsey Moore wrote: 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 I think the problem is that you don't use -qrtems and your start file has no dependency on a configuration symbol (for example _ISR_Stack_area_begin). You have to make sure that somehow the configuration in libtestimfs.a is pulled in. Ok, thanks. -qrtems is still present in that line just after the static link options, but I'll see if I can add a dependency in the start file. Kinsey ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Movement of confdefs instance into a static library
On 17/03/2022 14:22, Kinsey Moore wrote: 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 I think the problem is that you don't use -qrtems and your start file has no dependency on a configuration symbol (for example _ISR_Stack_area_begin). You have to make sure that somehow the configuration in libtestimfs.a is pulled in. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Movement of confdefs instance into a static library
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 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Movement of confdefs instance into a static library
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. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Movement of confdefs instance into a static library
Hi, I'm working on porting Deos integration from RTEMS 5 to RTEMS 6. This requires linking with their shared objects and I've run into a few linking issues with the testsuite. I've narrowed the problems down to the way that some of the tests are built: any test that has its confdefs instance in a static library throws linker errors (missing/duplicate symbols) with the extra linking that occurs. This includes most of the tests under testsuites/fstests as well as quite a few in libtests (and possibly more). If I reintegrate the source files from the new static libraries directly into the executable generation step (i.e. imfsfserror.yml instead of libimfs.yml) as is done in RTEMS 5, the linker errors go away. Is moving the confdefs instance into a shared library supported and expected to work? I was also able to resolve the linker errors by specifying some of the link flags multiple times or creating a linker group. Thanks, Kinsey ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel