From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Meissner To: John Gilmore Cc: Greg McGary , Zack Weinberg , Chris Lattner , gcc@gcc.gnu.org, bernecky@acm.org Subject: Re: Esthetics (or worse?) of Secure Pointers Date: Tue, 17 Apr 2001 19:59:00 -0000 Message-id: <20010417225914.N7627@cse.cygnus.com> References: <200104180240.TAA01342@toad.com> X-SW-Source: 2001-04/msg00850.html 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