From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31928 invoked by alias); 11 Apr 2007 14:07:56 -0000 Received: (qmail 31896 invoked by uid 22791); 11 Apr 2007 14:07:51 -0000 X-Spam-Check-By: sourceware.org Received: from smtp104.sbc.mail.mud.yahoo.com (HELO smtp104.sbc.mail.mud.yahoo.com) (68.142.198.203) by sourceware.org (qpsmtpd/0.31) with SMTP; Wed, 11 Apr 2007 15:07:43 +0100 Received: (qmail 4229 invoked from network); 11 Apr 2007 14:07:42 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@75.61.85.239 with login) by smtp104.sbc.mail.mud.yahoo.com with SMTP; 11 Apr 2007 14:07:41 -0000 X-YMail-OSG: 1Sz3aSIVM1kWxT_qRpZ9rZk1.8..Wbg4Fl._JGMJdZywHX6oSA_G2dpSTXhe07GKNIqpVeV0Og-- Received: by lucon.org (Postfix, from userid 500) id 8A66846EEEB; Wed, 11 Apr 2007 07:07:40 -0700 (PDT) Date: Wed, 11 Apr 2007 14:07:00 -0000 From: "H. J. Lu" To: Kai Tietz Cc: binutils@sources.redhat.com Subject: Re: PATCH: w64 native support Message-ID: <20070411140740.GB3214@lucon.org> References: <20070411135837.GA3214@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070411135837.GA3214@lucon.org> User-Agent: Mutt/1.4.2.2i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00122.txt.bz2 On Wed, Apr 11, 2007 at 06:58:37AM -0700, H. J. Lu wrote: > On Wed, Apr 11, 2007 at 03:42:31PM +0200, Kai Tietz wrote: > > Hello, > > > > I did the windres.h patch changing the long to int types, so that problem > > #2737 seems to be solved. > > No, it doesn't work on big endian host. You should array of char > in external data structures. > > > Additionally I introduced in bfd-in.h the type "bfd_hostptr_t" and its > > hexadeicmal printf representation in macro "BFD_HOSTPTR_T_PRT_X". For now, > > AFAIS, only WIN64 has a long type lesser than a pointer, therefore I made > > the define dependent on the definiton of _WIN64. The modification in > > I don't believe we need BFD_HOSTPTR_T_PRT_X. As I said before, the > PE problem is there is no clear line between external and internal > data structues. You should be able to use long long, even in big > endian, internally to hold any PE data type. You just need to convert > it to the proper size in proper endian when you write it out. You > shouldn't have any problem when it is done peoperly. We do need a new type when casting from pointer to integer. But it should be determined in autoconf. You can use AC_CHECK_SIZEOF. H.J.