Ian Lance Taylor <[EMAIL PROTECTED]> writes: > "Marcin 'Qrczak' Kowalczyk" <[EMAIL PROTECTED]> writes: > >> gcc-4.1.0-0.20051206r108118 emits wrong .size directives for >> statically initialized objects with a flexible array member, >> e.g.: >> >> struct {int x; int y[];} obj = {1, {2, 3}}; >> >> .globl obj >> .data >> .align 4 >> .type obj, @object >> .size obj, 4 >> obj: >> .long 1 >> .long 2 >> .long 3 >> >> Can this have serious effects (like overlapped or split objects), >> or is .size used only for e.g. debugging? > > In general .size is only used for debugging purposes.
It is also used in connection with copy relocations. That's the only case were accurate size information is important, AFAIK. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."