Esthetics (or worse?) of Secure Pointers
Michael Meissner
meissner@cygnus.com
Tue Apr 17 19:59:00 GMT 2001
On Tue, Apr 17, 2001 at 07:40:48PM -0700, John Gilmore wrote:
> > 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.
Actually I would recomend using the data encoding field (byte #5), which
currently has 2 possible values (ELFDATA2LSB and ELFDATA2MSB for little endian
and big endian respectively), rather than try to duplicate N number of
different architectures.
> 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
--
Michael Meissner, Red Hat, Inc. (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482
More information about the Gcc
mailing list