Re: [PATCH v2 3/4] vxworks: enable use of .init_array/.fini_array for cdtors

2018-08-13 Thread Olivier Hainque
Hi Rasmus, > On 13 Aug 2018, at 10:24, Rasmus Villemoes wrote: > >> Ok, modulo ChangeLog reformatting: > > Thanks for spotting that. I have a script that fixes the whitespace > issue automatically, but it doesn't catch missing leading * in entries. > > Do you want me to send an updated and

Re: [PATCH v2 3/4] vxworks: enable use of .init_array/.fini_array for cdtors

2018-08-13 Thread Rasmus Villemoes
On 2018-08-10 17:59, Olivier Hainque wrote: > Hello Rasmus, > >> On 28 Jun 2018, at 10:43, Rasmus Villemoes wrote: >> >> Assume that if the user passed --enable-initfini-array when building >> gcc, the rest of the toolchain (including the link spec and linker >> script) is set up appropriately.

Re: [PATCH v2 3/4] vxworks: enable use of .init_array/.fini_array for cdtors

2018-08-10 Thread Olivier Hainque
Hello Rasmus, > On 28 Jun 2018, at 10:43, Rasmus Villemoes wrote: > > Assume that if the user passed --enable-initfini-array when building > gcc, the rest of the toolchain (including the link spec and linker > script) is set up appropriately. > > Note that configuring with

[PATCH v2 3/4] vxworks: enable use of .init_array/.fini_array for cdtors

2018-06-28 Thread Rasmus Villemoes
The target OS actually runs all function pointers found in the _ctors array when the module is loaded. So it is not that hard to make use of the "modern" .init_array/.fini_array mechanism - it mostly just requires a linker script adding the _ctors and _dtors symbols and terminating LONG(0)