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]

Re: R_ARC_B22_PCREL relocs busted?


Hi Andre,

> I have come up with a patch for this but I'm certain that I'm just
> addressing the symptom, not the root of the problem.  Perhaps a coordinated
> change between the assembler and linker would be better.  Also, I'm not
> certain if I've caught all the appropriate conditions under which the addend
> fudge needs to be applied.  If those in the know (Nick?) could have a look
> and determine the correct solution, it would be appreciated.

I do not think that this is an assembler/linker mismatch problem, it
is just a bug in the linker.

Actually there is a much simpler solution - Change pcrel_offset for
for the R_ARC_B22_PCREL relocation to true.  This has the same affect
as your patch, but it keeps things simpler.  It also appears to work
with the previous ARC test case that was failing (and which I happened
to keep around).  So if you would like to try this patch out and let
me know if it causes you any problems, then - assuming that you say
that it is OK - I will apply it.

Cheers
        Nick

2001-09-24  Nick Clifton  <nickc@cambridge.redhat.com>

	* elf32-arc.c (R_ARC_B22_PCREL): Set pcrel_offset to true.


Index: elf32-arc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arc.c,v
retrieving revision 1.8
diff -p -r1.8 elf32-arc.c
*** elf32-arc.c	2001/09/18 09:57:23	1.8
--- elf32-arc.c	2001/09/24 13:18:35
*************** static reloc_howto_type elf_arc_howto_ta
*** 98,104 ****
  	 true,			/* partial_inplace  */
  	 0x07ffff80,		/* src_mask  */
  	 0x07ffff80,		/* dst_mask  */
! 	 false),		/* pcrel_offset  */
  
  };
  
--- 98,104 ----
  	 true,			/* partial_inplace  */
  	 0x07ffff80,		/* src_mask  */
  	 0x07ffff80,		/* dst_mask  */
! 	 true),			/* pcrel_offset  */
  
  };
  


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