This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Esthetics (or worse?) of Secure Pointers
- To: John Gilmore <gnu at toad dot com>
- Subject: Re: Esthetics (or worse?) of Secure Pointers
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Tue, 17 Apr 2001 22:59:14 -0400
- Cc: Greg McGary <greg at mcgary dot org>, Zack Weinberg <zackw at stanford dot edu>, Chris Lattner <sabre at nondot dot org>, gcc at gcc dot gnu dot org, bernecky at acm dot org
- References: <msk84jhx1n.fsf@mcgary.org> <200104180240.TAA01342@toad.com>
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