public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
@ 2003-05-19 15:41 Stuart F. Downing
  2003-05-20 19:27 ` Stuart F. Downing
  2003-05-20 19:32 ` [BFD PATCH] " Stuart F. Downing
  0 siblings, 2 replies; 11+ messages in thread
From: Stuart F. Downing @ 2003-05-19 15:41 UTC (permalink / raw)
  To: binutils

invocation:
objcopy --keep-global-symbols=list_of_globals foo.o

I debugged this in gdb and see that the problem is the foo.o contains a
R_SHORT_PCREL_MODE relocation.  som.c has code that is conditionally
included ...
#ifndef NO_PCREL_MODES

which is defined in som.c ...

#ifndef R_SHORT_PCREL_MODE

which is defined in /usr/include/reloc.h ...

#ifdef PA_2_0

I don't think that PA_2_0 was defined when som.c was compiled (it's
not in config.h)...

<BUILDLOG>
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/opt/src/binutils-2.1
3.1/bfd -I. -D_GNU_SOURCE -DHOST_HPPAHPUX -DHPUX_CORE   -I. -I/opt/src/binutils-
2.13.1/bfd -I/opt/src/binutils-2.13.1/bfd/../include  -I/opt/src/binutils-2.13.1
/bfd/../intl -I../intl   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O
2 -c /opt/src/binutils-2.13.1/bfd/som.c
gcc -DHAVE_CONFIG_H -I. -I/opt/src/binutils-2.13.1/bfd -I. -D_GNU_SOURCE -DHOST_
HPPAHPUX -DHPUX_CORE -I. -I/opt/src/binutils-2.13.1/bfd -I/opt/src/binutils-2.13
.1/bfd/../include -I/opt/src/binutils-2.13.1/bfd/../intl -I../intl -W -Wall -Wst
rict-prototypes -Wmissing-prototypes -g -O2 -c /opt/src/binutils-2.13.1/bfd/som.
c -o som.o
/opt/src/binutils-2.13.1/bfd/som.c: In function `hppa_som_gen_reloc_type':
/opt/src/binutils-2.13.1/bfd/som.c:1567: warning: enumeration value `e_ltpsel' n
ot handled in switch
/opt/src/binutils-2.13.1/bfd/som.c:1567: warning: enumeration value `e_rtpsel' n
ot handled in switch
/opt/src/binutils-2.13.1/bfd/som.c: In function `som_object_setup':
/opt/src/binutils-2.13.1/bfd/som.c:1801: warning: comparison between signed and
unsigned
/opt/src/binutils-2.13.1/bfd/som.c:1801: warning: comparison between signed and
unsigned
/opt/src/binutils-2.13.1/bfd/som.c: In function `setup_sections':
/opt/src/binutils-2.13.1/bfd/som.c:1946: warning: comparison between signed and
unsigned
/opt/src/binutils-2.13.1/bfd/som.c: In function `bfd_section_from_som_symbol':
/opt/src/binutils-2.13.1/bfd/som.c:4279: warning: comparison between signed and
unsigned
</BUILDLOG>

The file trunction error occurs here...

              switch (bfd_reloc->howto->type)
                {
...
#ifndef NO_PCREL_MODES
                case R_SHORT_PCREL_MODE:
                case R_LONG_PCREL_MODE:
#endif
                  reloc_offset = bfd_reloc->address;
                  break;

                default:
                  reloc_offset = bfd_reloc->address + 4;
                  break;
                }

because NO_PCREL_MODES is defined, so the default path is taken, then
in the next loop iteration, when it calculates skip

              skip = bfd_reloc->address - reloc_offset;

This is an unsigned computation where bfd_reloc->address <
reloc_offset which results in a very large number.


I think the solution is for PA_2_0 to be defined when som.c is
compiled, but I'm not sure what is the "right" way to accomplish this.

Should configure detect this situation and define PA_2_0 in config.h?

-- 
Stuart Downing

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-19 15:41 File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1 Stuart F. Downing
@ 2003-05-20 19:27 ` Stuart F. Downing
  2003-05-20 19:32 ` [BFD PATCH] " Stuart F. Downing
  1 sibling, 0 replies; 11+ messages in thread
From: Stuart F. Downing @ 2003-05-20 19:27 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 3315 bytes --]

sdowning@fame.com (Stuart F. Downing) writes:

> invocation:
> objcopy --keep-global-symbols=list_of_globals foo.o
> 
> I debugged this in gdb and see that the problem is the foo.o contains a
> R_SHORT_PCREL_MODE relocation.  som.c has code that is conditionally
> included ...
> #ifndef NO_PCREL_MODES
> 
> which is defined in som.c ...
> 
> #ifndef R_SHORT_PCREL_MODE
> 
> which is defined in /usr/include/reloc.h ...
> 
> #ifdef PA_2_0
> 
> I don't think that PA_2_0 was defined when som.c was compiled (it's
> not in config.h)...
> 
> <BUILDLOG>
> /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/opt/src/binutils-2.1
> 3.1/bfd -I. -D_GNU_SOURCE -DHOST_HPPAHPUX -DHPUX_CORE   -I. -I/opt/src/binutils-
> 2.13.1/bfd -I/opt/src/binutils-2.13.1/bfd/../include  -I/opt/src/binutils-2.13.1
> /bfd/../intl -I../intl   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O
> 2 -c /opt/src/binutils-2.13.1/bfd/som.c
> gcc -DHAVE_CONFIG_H -I. -I/opt/src/binutils-2.13.1/bfd -I. -D_GNU_SOURCE -DHOST_
> HPPAHPUX -DHPUX_CORE -I. -I/opt/src/binutils-2.13.1/bfd -I/opt/src/binutils-2.13
> .1/bfd/../include -I/opt/src/binutils-2.13.1/bfd/../intl -I../intl -W -Wall -Wst
> rict-prototypes -Wmissing-prototypes -g -O2 -c /opt/src/binutils-2.13.1/bfd/som.
> c -o som.o
> /opt/src/binutils-2.13.1/bfd/som.c: In function `hppa_som_gen_reloc_type':
> /opt/src/binutils-2.13.1/bfd/som.c:1567: warning: enumeration value `e_ltpsel' n
> ot handled in switch
> /opt/src/binutils-2.13.1/bfd/som.c:1567: warning: enumeration value `e_rtpsel' n
> ot handled in switch
> /opt/src/binutils-2.13.1/bfd/som.c: In function `som_object_setup':
> /opt/src/binutils-2.13.1/bfd/som.c:1801: warning: comparison between signed and
> unsigned
> /opt/src/binutils-2.13.1/bfd/som.c:1801: warning: comparison between signed and
> unsigned
> /opt/src/binutils-2.13.1/bfd/som.c: In function `setup_sections':
> /opt/src/binutils-2.13.1/bfd/som.c:1946: warning: comparison between signed and
> unsigned
> /opt/src/binutils-2.13.1/bfd/som.c: In function `bfd_section_from_som_symbol':
> /opt/src/binutils-2.13.1/bfd/som.c:4279: warning: comparison between signed and
> unsigned
> </BUILDLOG>
> 
> The file trunction error occurs here...
> 
>               switch (bfd_reloc->howto->type)
>                 {
> ...
> #ifndef NO_PCREL_MODES
>                 case R_SHORT_PCREL_MODE:
>                 case R_LONG_PCREL_MODE:
> #endif
>                   reloc_offset = bfd_reloc->address;
>                   break;
> 
>                 default:
>                   reloc_offset = bfd_reloc->address + 4;
>                   break;
>                 }
> 
> because NO_PCREL_MODES is defined, so the default path is taken, then
> in the next loop iteration, when it calculates skip
> 
>               skip = bfd_reloc->address - reloc_offset;
> 
> This is an unsigned computation where bfd_reloc->address <
> reloc_offset which results in a very large number.
> 
> 
> I think the solution is for PA_2_0 to be defined when som.c is
> compiled, but I'm not sure what is the "right" way to accomplish this.
> 
> Should configure detect this situation and define PA_2_0 in config.h?
> 
> -- 
> Stuart Downing

I solved this with the attached patch.  Not sure if configure.host is
the right place for this, but it worked for me...
-- 
Stuart Downing


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: binutils-2.13.1-hppa2x-PA_2_0.patch --]
[-- Type: text/x-patch, Size: 1150 bytes --]

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	20 May 2003 19:24:17 -0000
@@ -1,3 +1,7 @@
+2003-05-20  Stuart F. Downing  <sdowning@fame.com>
+
+	* configure.host: Add hppa2*-*-hpux* with -DPA_2_0
+
 2002-11-07  Daniel Jacobowitz  <drow@mvista.com>
 
 	* configure.in: Bump version and set is_release.
Index: src/bfd/configure.host
===================================================================
RCS file: /cvs/src/src/bfd/configure.host,v
retrieving revision 1.9
diff -u -r1.9 configure.host
--- src/bfd/configure.host	22 Jan 2002 00:47:21 -0000	1.9
+++ src/bfd/configure.host	20 May 2003 19:24:17 -0000
@@ -23,6 +23,7 @@
 
 hppa*64*-*-hpux*)	HDEFINES=-DHOST_HPPAHPUX;
 			host64=true; HOST_64BIT_TYPE=long ;;
+hppa2*-*-hpux*)		HDEFINES="-DHOST_HPPAHPUX -DPA_2_0" ;;
 hppa*-*-hpux*)		HDEFINES=-DHOST_HPPAHPUX ;;
 hppa*-*-hiux*)		HDEFINES=-DHOST_HPPAHPUX ;;
 hppa*64*-*-linux*)	host64=true; HOST_64BIT_TYPE=long ;;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-19 15:41 File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1 Stuart F. Downing
  2003-05-20 19:27 ` Stuart F. Downing
@ 2003-05-20 19:32 ` Stuart F. Downing
  1 sibling, 0 replies; 11+ messages in thread
From: Stuart F. Downing @ 2003-05-20 19:32 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

Thought PATCH in the subject was appropriate, sorry for the spam.
-- 
Stuart Downing


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: binutils-2.13.1-hppa2x-PA_2_0.patch --]
[-- Type: text/x-patch, Size: 1150 bytes --]

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	20 May 2003 19:24:17 -0000
@@ -1,3 +1,7 @@
+2003-05-20  Stuart F. Downing  <sdowning@fame.com>
+
+	* configure.host: Add hppa2*-*-hpux* with -DPA_2_0
+
 2002-11-07  Daniel Jacobowitz  <drow@mvista.com>
 
 	* configure.in: Bump version and set is_release.
Index: src/bfd/configure.host
===================================================================
RCS file: /cvs/src/src/bfd/configure.host,v
retrieving revision 1.9
diff -u -r1.9 configure.host
--- src/bfd/configure.host	22 Jan 2002 00:47:21 -0000	1.9
+++ src/bfd/configure.host	20 May 2003 19:24:17 -0000
@@ -23,6 +23,7 @@
 
 hppa*64*-*-hpux*)	HDEFINES=-DHOST_HPPAHPUX;
 			host64=true; HOST_64BIT_TYPE=long ;;
+hppa2*-*-hpux*)		HDEFINES="-DHOST_HPPAHPUX -DPA_2_0" ;;
 hppa*-*-hpux*)		HDEFINES=-DHOST_HPPAHPUX ;;
 hppa*-*-hiux*)		HDEFINES=-DHOST_HPPAHPUX ;;
 hppa*64*-*-linux*)	host64=true; HOST_64BIT_TYPE=long ;;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-22 15:59       ` John David Anglin
@ 2003-05-23 15:06         ` Daniel Jacobowitz
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2003-05-23 15:06 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils, sdowning

On Thu, May 22, 2003 at 11:57:40AM -0400, John David Anglin wrote:
> > On Wed, May 21, 2003 at 11:40:40PM -0400, John David Anglin wrote:
> > > 2003-05-21  Stuart F. Downing  <sdowning@fame.com>
> > > 
> > > 	* som.h: Define PA_2_0 before including a.out.h
> > > 
> > > Installed on binutils trunk.  I tested the patch on a PA 1.1 system
> > > running hpux 10.20.  Seems to work fine with latest headers and linker.
> > 
> > Is this patch appropriate for the branch?
> 
> It's a bug fix, but I wouldn't rate it high priority.  Does that
> meet the branch rules?

In som.h, I think it does.  You can do it or I'll get it in another
merge next week after the summit.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-22 15:46     ` Daniel Jacobowitz
@ 2003-05-22 15:59       ` John David Anglin
  2003-05-23 15:06         ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: John David Anglin @ 2003-05-22 15:59 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils, sdowning

> On Wed, May 21, 2003 at 11:40:40PM -0400, John David Anglin wrote:
> > 2003-05-21  Stuart F. Downing  <sdowning@fame.com>
> > 
> > 	* som.h: Define PA_2_0 before including a.out.h
> > 
> > Installed on binutils trunk.  I tested the patch on a PA 1.1 system
> > running hpux 10.20.  Seems to work fine with latest headers and linker.
> 
> Is this patch appropriate for the branch?

It's a bug fix, but I wouldn't rate it high priority.  Does that
meet the branch rules?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-22  3:41   ` John David Anglin
@ 2003-05-22 15:46     ` Daniel Jacobowitz
  2003-05-22 15:59       ` John David Anglin
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2003-05-22 15:46 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils, sdowning

On Wed, May 21, 2003 at 11:40:40PM -0400, John David Anglin wrote:
> 2003-05-21  Stuart F. Downing  <sdowning@fame.com>
> 
> 	* som.h: Define PA_2_0 before including a.out.h
> 
> Installed on binutils trunk.  I tested the patch on a PA 1.1 system
> running hpux 10.20.  Seems to work fine with latest headers and linker.

Is this patch appropriate for the branch?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-21 18:07 ` John David Anglin
@ 2003-05-22  3:41   ` John David Anglin
  2003-05-22 15:46     ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: John David Anglin @ 2003-05-22  3:41 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils, sdowning

2003-05-21  Stuart F. Downing  <sdowning@fame.com>

	* som.h: Define PA_2_0 before including a.out.h

Installed on binutils trunk.  I tested the patch on a PA 1.1 system
running hpux 10.20.  Seems to work fine with latest headers and linker.

Thanks,
Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
       [not found] <no.id>
@ 2003-05-21 18:07 ` John David Anglin
  2003-05-22  3:41   ` John David Anglin
  0 siblings, 1 reply; 11+ messages in thread
From: John David Anglin @ 2003-05-21 18:07 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils, sdowning

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

The NO_PCREL_MODES define is a hack.  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.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-21 14:50 ` Stuart F. Downing
@ 2003-05-21 15:23   ` Stuart F. Downing
  0 siblings, 0 replies; 11+ messages in thread
From: Stuart F. Downing @ 2003-05-21 15:23 UTC (permalink / raw)
  To: binutils

sdowning@fame.com (Stuart F. Downing) writes:

> "John David Anglin" <dave@hiauly1.hia.nrc.ca> writes:
> 
> > > --- src/bfd/configure.host      22 Jan 2002 00:47:21 -0000      1.9
> > > +++ src/bfd/configure.host      20 May 2003 19:24:17 -0000
> > > @@ -23,6 +23,7 @@
> > >  
> > > hppa*64*-*-hpux*)	HDEFINES=-DHOST_HPPAHPUX;
> > > 			host64=true; HOST_64BIT_TYPE=long ;;
> > > +hppa2*-*-hpux*)	HDEFINES="-DHOST_HPPAHPUX -DPA_2_0" ;;
> > 
> > I'm thinking that we should add the following to bfd/som.h before
> > including a.out.h:
> > 
> > #define PA_2_0
> > 
> > After including a.out.h:
> > 
> > #ifndef R_SHORT_PCREL_MODE
> > #define R_SHORT_PCREL_MODE 0x3e
> > #endif
> > 
> > #ifndef R_LONG_PCREL_MODE
> > #define R_LONG_PCREL_MODE 0x3f
> > #endif
> > 
> > I don't think support for these relocs and the other PA_2_0 defines
> > in reloc.h should be host dependent.  You should be able to operate
> > on a PA 2.0 file on a PA 1.X host.
> 
> I agree.
> 
> And perhaps the code conditional upon NO_PCREL_MODES (and the annoying
> double-negative #ifndef NO_PCREL_MODES) can be changed to
> be unconditionally included.
> 
> I will make these changes and submit another patch.
> -- 
> Stuart Downing

On second thought, it's not that straightforward and I'm not sure how
to change this without breaking PA1.X.  

The problem is the code in som.c already contains this...

/* 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

to define these relocations.  The NO_PCREL_MODES prevents the module
from emitting these relocations in hppa_som_gen_reloc_type here...
  switch (base_type)
    {
...
    case R_HPPA_PCREL_CALL:
      {
#ifndef NO_PCREL_MODES
	/* If we have short and long pcrel modes, then generate the proper
	   mode selector, then the pcrel relocation.  Redundant selectors
	   will be eliminted as the relocs are sized and emitted.  */
...


If we just define R_SHORT_PCREL_MODE and R_LONG_PCREL_MODE as
proposed, the code as it stands will incorrectly emit unsupported
relocations on PA1.X systems.

Someone with more knowledge than me needs to take a stab.
-- 
Stuart Downing

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
  2003-05-20 23:30 John David Anglin
@ 2003-05-21 14:50 ` Stuart F. Downing
  2003-05-21 15:23   ` Stuart F. Downing
  0 siblings, 1 reply; 11+ messages in thread
From: Stuart F. Downing @ 2003-05-21 14:50 UTC (permalink / raw)
  To: binutils

"John David Anglin" <dave@hiauly1.hia.nrc.ca> writes:

> > --- src/bfd/configure.host      22 Jan 2002 00:47:21 -0000      1.9
> > +++ src/bfd/configure.host      20 May 2003 19:24:17 -0000
> > @@ -23,6 +23,7 @@
> >  
> > hppa*64*-*-hpux*)	HDEFINES=-DHOST_HPPAHPUX;
> > 			host64=true; HOST_64BIT_TYPE=long ;;
> > +hppa2*-*-hpux*)	HDEFINES="-DHOST_HPPAHPUX -DPA_2_0" ;;
> 
> I'm thinking that we should add the following to bfd/som.h before
> including a.out.h:
> 
> #define PA_2_0
> 
> After including a.out.h:
> 
> #ifndef R_SHORT_PCREL_MODE
> #define R_SHORT_PCREL_MODE 0x3e
> #endif
> 
> #ifndef R_LONG_PCREL_MODE
> #define R_LONG_PCREL_MODE 0x3f
> #endif
> 
> I don't think support for these relocs and the other PA_2_0 defines
> in reloc.h should be host dependent.  You should be able to operate
> on a PA 2.0 file on a PA 1.X host.

I agree.

And perhaps the code conditional upon NO_PCREL_MODES (and the annoying
double-negative #ifndef NO_PCREL_MODES) can be changed to
be unconditionally included.

I will make these changes and submit another patch.
-- 
Stuart Downing

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BFD PATCH] File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1
@ 2003-05-20 23:30 John David Anglin
  2003-05-21 14:50 ` Stuart F. Downing
  0 siblings, 1 reply; 11+ messages in thread
From: John David Anglin @ 2003-05-20 23:30 UTC (permalink / raw)
  To: binutils, sdowning

> --- src/bfd/configure.host      22 Jan 2002 00:47:21 -0000      1.9
> +++ src/bfd/configure.host      20 May 2003 19:24:17 -0000
> @@ -23,6 +23,7 @@
>  
> hppa*64*-*-hpux*)	HDEFINES=-DHOST_HPPAHPUX;
> 			host64=true; HOST_64BIT_TYPE=long ;;
> +hppa2*-*-hpux*)	HDEFINES="-DHOST_HPPAHPUX -DPA_2_0" ;;

I'm thinking that we should add the following to bfd/som.h before
including a.out.h:

#define PA_2_0

After including a.out.h:

#ifndef R_SHORT_PCREL_MODE
#define R_SHORT_PCREL_MODE 0x3e
#endif

#ifndef R_LONG_PCREL_MODE
#define R_LONG_PCREL_MODE 0x3f
#endif

I don't think support for these relocs and the other PA_2_0 defines
in reloc.h should be host dependent.  You should be able to operate
on a PA 2.0 file on a PA 1.X host.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-05-23 15:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-19 15:41 File truncation in objcopy for hppa2.0w-hp-hpux11.11 in binutils-2.13.1 Stuart F. Downing
2003-05-20 19:27 ` Stuart F. Downing
2003-05-20 19:32 ` [BFD PATCH] " Stuart F. Downing
2003-05-20 23:30 John David Anglin
2003-05-21 14:50 ` Stuart F. Downing
2003-05-21 15:23   ` Stuart F. Downing
     [not found] <no.id>
2003-05-21 18:07 ` John David Anglin
2003-05-22  3:41   ` John David Anglin
2003-05-22 15:46     ` Daniel Jacobowitz
2003-05-22 15:59       ` John David Anglin
2003-05-23 15:06         ` Daniel Jacobowitz

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