public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Kai Tietz <Kai.Tietz@onevision.com>
To: "H. J. Lu" <hjl@lucon.org>
Cc: binutils@sources.redhat.com
Subject: Re: PATCH: w64 native support
Date: Wed, 11 Apr 2007 14:57:00 -0000	[thread overview]
Message-ID: <OF3D4AD100.6F85D2AC-ONC12572BA.004D84ED-C12572BA.004E861F@onevision.de> (raw)
In-Reply-To: <20070411135837.GA3214@lucon.org>

"H. J. Lu" <hjl@lucon.org> wrote on 11.04.2007 15:58:37:

> 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.

Ok, I take a look for big-endian hosts and the 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.

The "long long" would work, if there would not be the -Werror parameter 
for gcc. The gcc bubbles a warning also for the case, that the integer 
casted to/from a pointer is bigger :(. This would break an cross from 
32-bit to 64-bit.
The helper macro BFD_HOSTPTR_T_PTR_X is for sure not coercively, but 
simplivies the readability AFAICS. 

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger



  parent reply	other threads:[~2007-04-11 14:18 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 13:43 Kai Tietz
2007-04-11 13:58 ` H. J. Lu
2007-04-11 14:07   ` H. J. Lu
2007-04-11 18:22     ` PATCH: windres Kai Tietz
2007-04-12 15:55       ` H. J. Lu
2007-04-12 16:51         ` Kai Tietz
2007-04-12 18:03           ` H. J. Lu
2007-04-13 14:41             ` Kai Tietz
2007-04-13 14:49               ` H. J. Lu
2007-04-16 10:05                 ` Kai Tietz
2007-04-16 21:59                   ` Christopher Faylor
2007-04-16 22:20                     ` H. J. Lu
2007-04-17 10:59                       ` Kai Tietz
2007-04-18  4:34                         ` Christopher Faylor
2007-04-18  9:49                           ` H. J. Lu
2007-04-20 13:34                             ` Kai Tietz
2007-04-20 13:35                               ` H. J. Lu
2007-04-20 13:54                                 ` Kai Tietz
2007-04-20 14:03                                   ` H. J. Lu
2007-04-20 13:40                               ` Dave Korn
2007-04-20 13:51                                 ` Kai Tietz
2007-04-20 13:58                                   ` Dave Korn
2007-04-23 12:26                                     ` Kai Tietz
2007-04-23 12:44                                       ` Christopher Faylor
2007-04-23 13:51                                         ` Kai Tietz
2007-04-23 14:23                                           ` Christopher Faylor
2007-04-23 14:36                                             ` Dave Korn
2007-04-23 14:46                                               ` Kai Tietz
2007-04-23 14:50                                                 ` Christopher Faylor
2007-04-18 11:59     ` PATCH: w64 native support Kai Tietz
2007-06-29  5:37       ` NightStrike
2007-07-12  7:30       ` Nick Clifton
2007-07-24  8:00         ` NightStrike
2007-04-11 14:57   ` Kai Tietz [this message]
2007-04-11 15:17     ` Daniel Jacobowitz
2007-04-11 15:24       ` Kai Tietz
2007-04-11 15:43         ` Daniel Jacobowitz
2007-04-11 15:49           ` Kai Tietz
2007-04-11 17:34             ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2007-04-10 16:06 Kai Tietz
2007-04-10 16:13 ` H. J. Lu
2007-04-10 16:23   ` Kai Tietz
2007-04-10 17:01   ` Kai Tietz
2007-04-10 17:18     ` H. J. Lu
2007-04-10 17:52       ` Kai Tietz
2007-04-10 19:35         ` H. J. Lu
2007-04-11  3:40           ` H. J. Lu
2007-04-10 20:55       ` Paul Koning

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF3D4AD100.6F85D2AC-ONC12572BA.004D84ED-C12572BA.004E861F@onevision.de \
    --to=kai.tietz@onevision.com \
    --cc=binutils@sources.redhat.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).