Esthetics (or worse?) of Secure Pointers
John Gilmore
gnu@toad.com
Tue Apr 17 19:40:00 GMT 2001
> For a backup plan, I think it's sufficient to mandate no mixing of BP
> and non-BP compilation units, distinguished by a special symbol,
> enforced by ld. Anyone violently disagree?
Yes, I disagree.
ELF and many other formats have a field in the file header for what
architecture the object file contains. Pick a new architecture
specifier when compiling for an architecture with larger pointers.
Just as big-endian and little-endian code compiled for the same chip
gets different architecture types, big-pointer and little-pointer code
for the same chip should be distinguished in this way.
I'm pretty sure the linker already checks that you aren't mixing
architecture types in your object files.
Use the abstractions we already have for what they are designed for,
rather than making up new kludges for every special case...
John
More information about the Gcc
mailing list