All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10888

Document '#pragma clang section bss' to be used for uninitialized variables

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium

      The attached source file has these lines ...

      #pragma clang section data="one_data"
      static volatile uint32_t var1 = (uint32_t)(0U);
      #pragma clang section data=""
      
      #pragma clang section data="two_data"
      static struct sss_tag sss_instance;
      #pragma clang section data=""
      

      Build it ...

      % tiarmclang -S file.c
      

      Inspect the resulting file.s. Both variables get created. The first one is created in the user-named section. The second one is created in the default section .bss, and not the user-named section.

          Loading...

          All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

          Uploaded image for project: 'Embedded Software & Tools'
          1. Embedded Software & Tools
          2. EXT_EP-10888

          Document '#pragma clang section bss' to be used for uninitialized variables

            • Icon: Bug Bug
            • Resolution: Fixed
            • Icon: Medium Medium

              The attached source file has these lines ...

              #pragma clang section data="one_data"
              static volatile uint32_t var1 = (uint32_t)(0U);
              #pragma clang section data=""
              
              #pragma clang section data="two_data"
              static struct sss_tag sss_instance;
              #pragma clang section data=""
              

              Build it ...

              % tiarmclang -S file.c
              

              Inspect the resulting file.s. Both variables get created. The first one is created in the user-named section. The second one is created in the default section .bss, and not the user-named section.

                    syncuser TI User
                    syncuser TI User
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    3 Start watching this issue

                      Created:
                      Updated:
                      Resolved:

                        syncuser TI User
                        syncuser TI User
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        3 Start watching this issue

                          Created:
                          Updated:
                          Resolved: