This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

hex470 skipping .data

I have the following hex470 command file:

x.out
-b
--outfile x.bin

SECTIONS
{
   .text, .data, .const, .cinit:
}

My problem is that hex470 is dropping the non-empty .data section from the output:

C:\Projects\x\Debug>hex470 x.cmd
Translating to Binary format...
   "x.out"   ==> .text
   "x.out"   ==> .const
   "x.out"   ==> .cinit

The linker map clearly shows there's stuff there:

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
401ffff8    401ffff8    0000aef0   0000aef0    r-x
  401ffff8    401ffff8    0000aef0   0000aef0    r-x .text
4020aee8    4020aee8    00000055   00000055    rw-
  4020aee8    4020aee8    00000055   00000055    rw- .data
4020af40    4020af40    0000049c   0000049c    r--
  4020af40    4020af40    00000439   00000439    r-- .const
  4020b380    4020b380    0000005c   0000005c    r-- .cinit
4020b3e0    4020b3e0    00000870   00000000    rw-
  4020b3e0    4020b3e0    00000870   00000000    rw- .bss
4020bc50    4020bc50    00000800   00000800    rw-
  4020bc50    4020bc50    00000800   00000800    rw- .stack

Why would it do this?

Also, when I run dis470 on the file, the .data section is missing as well.

Finally, here's the linker command file:

MEMORY
{
   shared_ram:      ORIGIN = 0x401FFFF8  LENGTH = 0x00010008
}

SECTIONS
{
    GROUP
       {
        .text:
           {
               mmcload.obj(.text)
               *(.text)
           }
           .data:  align=4 {}
           .const: align=4 {}
    } > shared_ram
      
       GROUP
       {
           .cinit: {}
          .bss: align=4
           {
               mlolen = . - 0x40200000;
               _bss_start = .;
                  *(.bss)
                  . = ALIGN(16);
                  _bss_end = .;
      
           }
           .stack: {}
    }  > shared_ram
}

Thanks in advance.