4 ms·
It's a useful knowledge to have in the sense that it implies these variables are stored in the BSS section. Unless there are highly specific reasons why one wou
by alxlaz 9y ago
It's a useful knowledge to have in the sense that it implies these variables are stored in the BSS section. Unless there are highly specific reasons why one would do this, though, I certainly agree that relying on this property is not a good idea.
It can be useful, though. Many years ago, we used it to trim the twenty bytes or so that prevented an updated version of our firmware from fitting into the tiny flash space of a device that had been on the market for quite some time.
It is at the very least useful to know it when debugging code written by programmers who thought this feature was nice and relied on it throughout the code (either because they thought it was a good optimization to make, or because it further obfuscated their code and thus contributed to the security of their jobs).