You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Petro Karashchenko <pe...@gmail.com> on 2023/03/26 09:24:15 UTC

CONSTRUCTORS in .data section

Hi,

Recently during the review I have found that most of the linker script
files in the code tree have CONSTRUCTORS placed in the .data section. On
the other hand the linker script files that use .ctors and .dtors sections
place those in the .text or .rodata segment.

Does anybody know anything about why CONSTRUCTORS are placed in .data or
that is just a bug that needs to be fixed?

Best regards,
Petro

Re: CONSTRUCTORS in .data section

Posted by Tomek CEDRO <to...@cedro.info>.
On Sun, Mar 26, 2023 at 11:24 AM Petro Karashchenko wrote:
> Recently during the review I have found that most of the linker script
> files in the code tree have CONSTRUCTORS placed in the .data section. On
> the other hand the linker script files that use .ctors and .dtors sections
> place those in the .text or .rodata segment.
>
> Does anybody know anything about why CONSTRUCTORS are placed in .data or
> that is just a bug that needs to be fixed?

No clue, sorry.

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info