The following code is compiled and linked for a DSP target processor:
Test.c:
static q32 a[15] = {
Q31(0.1f),Q31(0.2f),Q31(0.3f),Q31(0.4f),Q31(0.5f),
Q31(0.1f),Q31(0.2f),Q31(0.3f),Q31(0.4f),Q31(0.5f),
Q31(0.1f),Q31(0.2f),Q31(0.3f),Q31(0.4f),Q31(0.5f)
};
static int b[3] = { 1, 1, 0 };
int main()
{
// ...
return 0;
}
q32
is a fixed point type, 4 bytes.
After I link the code, the .map
file tells me the following:
Test.o: .bss 60, .data 12
.
Why does a
(60 bytes) end up in .bss
section, and b
(12 bytes) in .data
section? I would expect both to go into .data
.