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

XMLWordPrintable

    • 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: