Re: [PATCH] Use linker set for system initialization
On 12/11/15 21:59, Sebastian Huber wrote: All the constructors are used via function pointers, so without link-time optimization and a very smart compiler, they must exist as a single function. I think there may be a binutils bug in the mapping option. You can use objcopy --globalize-symbol if you really need a global symbol, e.g. for tracing. Nice and thanks. I did not know this existed. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] Use linker set for system initialization
On 11/12/2015 5:32 PM, Sebastian Huber wrote: > On 11/12/15 06:17, Chris Johns wrote: >> On 12/10/15 19:14, Sebastian Huber wrote: >>> Make rtems_initialize_data_structures(), >>> rtems_initialize_before_drivers() and rtems_initialize_device_drivers() >>> static. >> >> Is this needed or is this something you can now do so why not? > > They are not longer part of the API and it can be done now. > Ok, and a good thing. >> >> The only reason I ask is the trace linker needs external symbols to >> work and they are interesting symbols. Static symbols cannot be >> remapped by gld. > > I think tracing is not really interesting in the system startup > sequence. It is single threaded with interrupts disabled. So, in case > there is a problem, a classic debugger should be sufficient. It can provide a useful way to measure timing. I suppose someone interested can change the code. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] Use linker set for system initialization
On 12/10/15 19:14, Sebastian Huber wrote: Make rtems_initialize_data_structures(), rtems_initialize_before_drivers() and rtems_initialize_device_drivers() static. Is this needed or is this something you can now do so why not? The only reason I ask is the trace linker needs external symbols to work and they are interesting symbols. Static symbols cannot be remapped by gld. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] Use linker set for system initialization
On 11/12/15 06:17, Chris Johns wrote: On 12/10/15 19:14, Sebastian Huber wrote: Make rtems_initialize_data_structures(), rtems_initialize_before_drivers() and rtems_initialize_device_drivers() static. Is this needed or is this something you can now do so why not? They are not longer part of the API and it can be done now. The only reason I ask is the trace linker needs external symbols to work and they are interesting symbols. Static symbols cannot be remapped by gld. I think tracing is not really interesting in the system startup sequence. It is single threaded with interrupts disabled. So, in case there is a problem, a classic debugger should be sufficient. The general pattern for the system initialization via the linker set is: static void constructor(void) { ... } RTEMS_SYSINIT_ITEM( constructor, RTEMS_SYSINIT_XYZ, RTEMS_SYSINIT_ORDER_MIDDLE ); void some_public_api_func(void) { ... } -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel