[patch] flag .persistent.bss sections as bss

Olivier Hainque hainque@adacore.com
Tue Sep 16 16:54:00 GMT 2014


Some target loaders (on VxWorks 653 for example) handle the ".persistent.bss"
section as an area to reset during the initial startup of applications but not
during warm restarts.

We need these to be treated as bss sections by the compiler, in particular
to prevent the use of executable file space for them.

The attached patchlet does that by just augmenting the list of sections
recognized by name to be marked as SECTION_BSS by default_section_type_flags.

We have been using this for a while now, for Ada and its Persistent_BSS pragma

Bootstrapped and regression tested on x86_64-linux.

OK to commit ?

Thanks in advance for your feedback,

With Kind Regards,


2014-09-16  Olivier Hainque  <hainque@adacore.com>

        * varasm.c (default_section_type_flags): Flag .persistent.bss
        sections as SECTION_BSS.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: persistent-bss.diff
Type: application/octet-stream
Size: 439 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140916/fb20f698/attachment.obj>

More information about the Gcc-patches mailing list