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: [arm] Implement R_ARM_TARGET1


On Mon, Sep 13, 2004 at 02:36:52PM +0100, Richard Earnshaw wrote:
> On Mon, 2004-09-13 at 14:29, Paul Brook wrote:
> > +#ifndef OLD_ARM_ABI
> 
> It's about time that the 'old' abi was deleted -- it's now the old-old
> abi!

I'm all for it.  But, please ensure patches at least compile with
--enable-targets=all.

bfd/
	* elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
	around uses of R_ARM_TARGET1.
	(elf32_arm_check_relocs): Likewise.
ld/
	* emultempl/armelf_oabi.em (before_allocation): Add extra zero param
	to bfd_elf32_arm_process_before_allocation call.

Applying, because I want to make some wholesale changes to bfd..

Index: bfd/elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.140
diff -u -p -r1.140 elf32-arm.h
--- bfd/elf32-arm.h	13 Sep 2004 14:14:23 -0000	1.140
+++ bfd/elf32-arm.h	16 Sep 2004 12:11:09 -0000
@@ -2759,7 +2759,9 @@ elf32_arm_gc_sweep_hook (bfd *          
 
       case R_ARM_ABS32:
       case R_ARM_REL32:
+#ifndef OLD_ARM_ABI
       case R_ARM_TARGET1:
+#endif
       case R_ARM_PC24:
       case R_ARM_PLT32:
 	r_symndx = ELF32_R_SYM (rel->r_info);
@@ -2775,8 +2777,10 @@ elf32_arm_gc_sweep_hook (bfd *          
 	      h->plt.refcount -= 1;
 
 	    if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
-		|| ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
-		|| ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1)
+#ifndef OLD_ARM_ABI
+		|| ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1
+#endif
+		|| ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
 	      {
 		eh = (struct elf32_arm_link_hash_entry *) h;
 
@@ -2887,7 +2891,9 @@ elf32_arm_check_relocs (bfd *abfd, struc
 
 	  case R_ARM_ABS32:
 	  case R_ARM_REL32:
+#ifndef OLD_ARM_ABI
 	  case R_ARM_TARGET1:
+#endif
 	  case R_ARM_PC24:
 	  case R_ARM_PLT32:
 	    if (h != NULL)
@@ -2930,8 +2936,10 @@ elf32_arm_check_relocs (bfd *abfd, struc
 		&& (sec->flags & SEC_ALLOC) != 0
 		&& ((ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
 		     && ELF32_R_TYPE (rel->r_info) != R_ARM_PLT32
-		     && ELF32_R_TYPE (rel->r_info) != R_ARM_REL32
-		     && ELF32_R_TYPE (rel->r_info) != R_ARM_TARGET1)
+#ifndef OLD_ARM_ABI
+		     && ELF32_R_TYPE (rel->r_info) != R_ARM_TARGET1
+#endif
+		     && ELF32_R_TYPE (rel->r_info) != R_ARM_REL32)
 		    || (h != NULL
 			&& (! info->symbolic
 			    || (h->elf_link_hash_flags
@@ -3016,8 +3024,10 @@ elf32_arm_check_relocs (bfd *abfd, struc
 		  }
 
 		if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
-		    || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
-		    || ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1)
+#ifndef OLD_ARM_ABI
+		    || ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1
+#endif
+		    || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
 		  p->count += 1;
 	      }
 	    break;
Index: ld/emultempl/armelf_oabi.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/armelf_oabi.em,v
retrieving revision 1.15
diff -u -p -r1.15 armelf_oabi.em
--- ld/emultempl/armelf_oabi.em	1 Apr 2004 11:20:04 -0000	1.15
+++ ld/emultempl/armelf_oabi.em	16 Sep 2004 12:12:48 -0000
@@ -68,7 +68,8 @@ gld${EMULATION_NAME}_before_allocation (
   {
     LANG_FOR_EACH_INPUT_STATEMENT (is)
       {
-	if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0, 0))
+	if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info,
+						      0, 0, 0))
 	  {
 	    /* xgettext:c-format */
 	    einfo (_("Errors encountered processing file %s"), is->filename);


-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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