Menu

#2250 init data for initialized static global data occurs twice in generated files

closed-duplicate
None
Z80
5
2014-02-03
2014-02-03
Kio
No

SDCC : z80 3.3.2 #8938 (Feb 2 2014) (Mac OS X x86_64)

when compiling attached program

char foo1[] = "12345678";

int main(void)
{
    return 0;
}

the character array is deposited twice in the asm outputfile: once in _CODE segment, once in _INITIALIZER. I think it should only be in the latter one.

:03000000C3000139
:02000800ED4DBC
:02001000ED4DB4
:02001800ED4DAC
:02002000ED4DA4
:02002800ED4D9C
:02003000ED4D94
:02003800ED4D8C
:0C010000310000CD2202CD0A02C304022F
:0A0200003E02CFC93E00CF7618FD84
:10022200010A0078B12808110080211802EDB0C936
:18020A00210000C9313233342235363738003132333422353637380066
:00000001FF

1 Attachments

Discussion

  • Philipp Klaus Krause

    • status: open --> closed-duplicate
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    This looks like a duplicate of bug #2089 to me.

    Philipp

     

Log in to post a comment.