Possibly, I just had that thought also.  I also sent a note to
the linker folks, as I remember long past discussions about the
linker collapsing duplicate readonly section data ...

Roland Mainz wrote:
Douglas Walls wrote:
Garrett D'Amore wrote:
One potential concern.  I know of certain bits of code where strings
like "$Id: some text$" are "edited" in place to form version numbers
from $Id$ and similar strings.

The places I can think of actually occur in kernel code!

I suspect that making this the default _might_ break a number of
things.  It would be very, very helpful if we had compiler help to
_detect_ incorrect attempts to write to constant strings.  I'm not sure
-xstrconst will give us the warnings to catch them before they become
bugs in the field.
Sorry, no -xstrconst won't give you any such warnings.  If we could
figure out how to give that warning, we'd give it w/o using -xstrconst :-)

Could XIPO somehow help in this case ? AFAIK it has a more or less
"global" view of the whole application when the optimizer runs and could
do such checks, right (it wouldn't work beyond some boundaries (like
shared libraries) but could catch most of the problems (in theory) ...)
?

----

Bye,
Roland

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to