I am using OMAP4430 C64T with TI_CGT_C6000_7.3.2 pure ELF EABI.
I have a linker template (xdt) that allocates non-cached zero-fill far data into a named section (zfill_uncached). My code uses #pragma DATA_SECTION to be allocated to this uncached memory section.
From my map file:
Segment Alloc Map
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
8e400000 8e400000 00107058 00107058 rw- zfill_uncached
Section Alloc Map:
zfill_uncached
* 0 8e400000 00107058
8e400000 00100000 libxxx.a : ffff.o (zfill_uncached) [fill = 0]
8e500000 00005b08 libzzzzz.a : aaaa.o (zfill_uncached) [fill = 0]
8e505b08 00000d0c libqqqqq.a : tttt.o (zfill_uncached) [fill = 0]
8e506814 00000004 --HOLE-- [fill = 0]
8e506818 00000840 libeeee.a : xxxx.o (zfill_uncached) [fill = 0]
None of the DATA_SECTION variables have any initializers. The linker obviously knows they are zero-fill. The "init length" should be zero for zero-fill (.far, .bss, etc.) But obvious in my map above the zfill_uncached segment init length is > 1MB.
If I remove the #pragma, my variable gets placed into .far which remains init length=0 (alloc=N) in the elf.
The switch for linker --zero_init=off does not fix the DATA_SECTION section from being initialized to zero in the elf. (The above linker map is --zero_init=off.)
I need to have a large zero-fill uncached data structure and I do not want to have the initializer ride in my ELF.
Thanks in advance.