This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Uninitialized variables is getting assigned to DATA section instead of BSS section in ARM Compiler 6.6

Uninitialized variables is getting assigned to DATA section instead of BSS section in ARM Compiler 6.6.

How to resolve this other than placing the variable in .bss.<section_name>?

Is there any other linker/Compiler options available for this?

Parents
  • Hello Christof,

    Thank you for the info.

    Please find the detailed info about my query.

    Case 1:

    unsigned char __attribute__((section(".myregion"))) myData[0x2000];

     

    Map file:

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

     

    0x20000000   0x00002000   Data   RW         6699    .myregion           myFile.a(myFile1.obj)

     

     

    Case 2:

    unsigned char __attribute__((section(".bss.myregion"))) myData[0x2000];

     

    Map file:

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

     

    0x20000000   0x00002000   Zero   RW         6699    .myregion           myFile.a(myFile1.obj)

     

    In Case 1, why is the section Type set to "Data"?

    Can I have any other way of setting a particular section Type to "Zero" other than using .bss.<section_name>

Reply
  • Hello Christof,

    Thank you for the info.

    Please find the detailed info about my query.

    Case 1:

    unsigned char __attribute__((section(".myregion"))) myData[0x2000];

     

    Map file:

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

     

    0x20000000   0x00002000   Data   RW         6699    .myregion           myFile.a(myFile1.obj)

     

     

    Case 2:

    unsigned char __attribute__((section(".bss.myregion"))) myData[0x2000];

     

    Map file:

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

     

    0x20000000   0x00002000   Zero   RW         6699    .myregion           myFile.a(myFile1.obj)

     

    In Case 1, why is the section Type set to "Data"?

    Can I have any other way of setting a particular section Type to "Zero" other than using .bss.<section_name>

Children