-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Not Prioritized
-
Code Generation Tools
-
CODEGEN-14327
-
-
default
The attached C++ file has these lines ...
struct tag_name
{
int field;
int array[100];
};
__attribute__((section("section_name")))
struct tag_name instance;
The customer expects section_name to be uninitialized. Build it and inspect the resulting assembly code ...
% tiarmclang -S cppfile.cpp
% findstr section_name cppfile.s
.section section_name,"aw",%progbits
Because of %progbits, and not %nobits, section_name is initialized.
Because it is initialized, when the executable file is converted to TI-TXT format, a large number of 0's is emitted for the memory where this section is allocated.