From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23613 invoked by alias); 21 May 2003 20:00:27 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 23585 invoked from network); 21 May 2003 20:00:26 -0000 Received: from unknown (HELO aamail.fame.com) (192.88.67.254) by sources.redhat.com with SMTP; 21 May 2003 20:00:26 -0000 Received: from wssfd.fame.com (wssfd.fame.com [192.168.47.8]) by aamail.fame.com (8.11.3/8.11.3) with ESMTP id h4LK0Ox29184 for ; Wed, 21 May 2003 16:00:25 -0400 To: binutils@sources.redhat.com Subject: [BFD PATCH] Re: File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1 References: <200305211805.h4LI5go2016930@hiauly1.hia.nrc.ca> From: sdowning@fame.com (Stuart F. Downing) Date: Wed, 21 May 2003 20:00:00 -0000 In-Reply-To: <200305211805.h4LI5go2016930@hiauly1.hia.nrc.ca> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-05/txt/msg00659.txt.bz2 --=-=-= Content-length: 1161 "John David Anglin" writes: > > /* And these first appeared in hpux10. */ > > #ifndef R_SHORT_PCREL_MODE > > #define NO_PCREL_MODES > > #define R_SHORT_PCREL_MODE 0x3e > > #endif > > > > #ifndef R_LONG_PCREL_MODE > > #define R_LONG_PCREL_MODE 0x3f > > #endif > > Ooops, we don't need to define these twice. Just define define > PA_2_0 in som.h before the a.out.h include, and see if that fixes your > problem. Well, putting -DPA_2_0 in configure.host "fixed" my problem. Now the question is what is right for bfd. > The NO_PCREL_MODES define is a hack. Yowsa. > The generation of these two relocs should depend on code level. At > the moment, it's not entirely clear whether HP ld on a PA 1.X > machine will link PA 2.0 code. However, it's possible that it was > built with PA_2_0 defined and will support the relocs. So if I leave the hack in, but define PA_2_0 before a.out.h, then when built on a 1.X host, if reloc.h doesn't contain the PA_2_0 conditional code, then we won't generate these relocs. I think that makes sense. Patch enclosed. Built and tested successfully on my problem case. -- Stuart Downing --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=binutils-2.13.1-hppa2x-PA_2_0.patch Content-length: 942 Index: src/bfd/ChangeLog =================================================================== RCS file: /cvs/src/src/bfd/ChangeLog,v retrieving revision 1.1598.2.41 diff -u -r1.1598.2.41 ChangeLog --- src/bfd/ChangeLog 7 Nov 2002 22:30:54 -0000 1.1598.2.41 +++ src/bfd/ChangeLog 21 May 2003 19:48:23 -0000 @@ -1,3 +1,7 @@ +2003-05-21 Stuart F. Downing + + * som.h: Define PA_2_0 before including a.out.h + 2002-11-07 Daniel Jacobowitz * configure.in: Bump version and set is_release. Index: src/bfd/som.h =================================================================== RCS file: /cvs/src/src/bfd/som.h,v retrieving revision 1.5 diff -u -r1.5 som.h --- src/bfd/som.h 10 Oct 2001 12:08:29 -0000 1.5 +++ src/bfd/som.h 21 May 2003 19:48:23 -0000 @@ -27,6 +27,9 @@ #include "libhppa.h" +/* Enable PA2.0 if available */ +#define PA_2_0 + #include #include #include --=-=-=--