For the completeness sake, the size of an array can also be computed via linker symbols, see for example: <a href="http://stackoverflow.com/questions/29901788/finding-the-last-variable-in-attribute-section" rel="nofollow">http://stackoverflow.com/questions/29901788/finding-the-last...</a>.<p>Same constraints apply (pointer arith).<p>I am not sure why this method, applied to ordinary arrays, would be preferred to sizeof (), but since we're shedding light here...<p>EDIT: pointer arith constraints only apply if we compute the difference (end - beg) in the C code. We could also do that in the linker script itself, and I don't recall whether or not C semantics of ptrdiff_t would be preserved in that case. Such preservation doesn't seem very probable to me, so potentially this method might allow to avoid overflows (or to move them much higher) -- to be checked in the 'ld' doc!