Gert Doering wrote:
Hmmm. Indeed. Things like (in C)
static char text[10000] = "hello, world\n";
might indeed be very wastive on executable size.
I assume pascal strings work similar - a maximum size is allocated, and only the relevant part is initialized.
Yes.
What I do not understand about this: it's not only the AIX linker that breaks here. On the AIX 5.1 system, I have installed GNU ld, and it displayed the same problems with unresolved symbols.
... so why does the same approach with the same gcc backend (3.3.3) and the same GNU ld work on Linux, and not on AIX?!
I'm not sure -- I'd have to learn more about linker internals which I hope to avoid. ;-) However, linkers are quite system specific, so there can be significant differences, even between GNU ld on both targets. (And so are assemblers and parts of the compiler backend, so I'm not even sure which one it is.)
Frank