This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed] Add support for PCREL32 and PCREL64 relocations on PA


Oops, missed part of the patch.  This is needed for hppa-linux.

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

2004-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
	(final_link_relocate): Likewise.

Index: elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.111
diff -u -3 -p -r1.111 elf32-hppa.c
--- elf32-hppa.c	1 Dec 2003 06:28:23 -0000	1.111
+++ elf32-hppa.c	20 Mar 2004 00:26:55 -0000
@@ -1147,12 +1147,13 @@ elf32_hppa_check_relocs (bfd *abfd,
 	    }
 	  break;
 
-	case R_PARISC_SEGBASE: /* Used to set segment base.  */
+	case R_PARISC_SEGBASE:  /* Used to set segment base.  */
 	case R_PARISC_SEGREL32: /* Relative reloc, used for unwind.  */
 	case R_PARISC_PCREL14F: /* PC relative load/store.  */
 	case R_PARISC_PCREL14R:
 	case R_PARISC_PCREL17R: /* External branches.  */
 	case R_PARISC_PCREL21L: /* As above, and for load/store too.  */
+	case R_PARISC_PCREL32:
 	  /* We don't need to propagate the relocation if linking a
 	     shared object since these are section relative.  */
 	  continue;
@@ -3145,6 +3146,7 @@ final_link_relocate (asection *input_sec
     case R_PARISC_PCREL17R:
     case R_PARISC_PCREL14R:
     case R_PARISC_PCREL14F:
+    case R_PARISC_PCREL32:
       /* Make it a pc relative offset.  */
       value -= location;
       addend -= 8;
@@ -3238,6 +3240,7 @@ final_link_relocate (asection *input_sec
     case R_PARISC_DIR17F:
     case R_PARISC_PCREL17C:
     case R_PARISC_PCREL14F:
+    case R_PARISC_PCREL32:
     case R_PARISC_DPREL14F:
     case R_PARISC_PLABEL32:
     case R_PARISC_DLTIND14F:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]