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]

Finish implemented BFD_RELOC_ARM_IMMEDIATE fixups.


Hi Guys,

  Whilst checking the GCC patch to stop the generation of
  unpredictable LDM instructions, I notices that fixups of the
  BFD_RELOC_ARM_IMMEDIATE reloc were being implemented, but then GAS
  was going on to try to generate a reloc anyway.  The patch below
  fixes this and tidies up a few associated error messages.

Cheers
        Nick

2002-09-17  Nick Clifton  <nickc@redhat.com>

	* config/tc-arm.c (md_apply_fix3): Note that an implemented
	BFD_RELOC_ARM_IMMEDIATE has been done.
        (tc_gen_reloc): Do not issue reloc number of unimplemented
	BFD_RELOC_ARM_IMMEDIATE and BFD_RELOC_ARM_OFFSET_IMM relocs -
	their name is already in the error message - plus remove them
	from the default case.

Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.128
diff -c -3 -p -w -r1.128 tc-arm.c
*** gas/config/tc-arm.c	5 Sep 2002 00:01:16 -0000	1.128
--- gas/config/tc-arm.c	17 Sep 2002 18:53:38 -0000
*************** md_apply_fix3 (fixP, valP, seg)
*** 9652,9663 ****
--- 9678,9691 ----
  
        newimm |= (temp & 0xfffff000);
        md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
+       fixP->fx_done = 1;
        break;
  
      case BFD_RELOC_ARM_ADRL_IMMEDIATE:
        {
  	unsigned int highpart = 0;
  	unsigned int newinsn  = 0xe1a00000; /* nop.  */
+ 
  	newimm = validate_immediate (value);
  	temp = md_chars_to_number (buf, INSN_SIZE);
  
*************** tc_gen_reloc (section, fixp)
*** 10274,10281 ****
  
      case BFD_RELOC_ARM_IMMEDIATE:
        as_bad_where (fixp->fx_file, fixp->fx_line,
! 		    _("internal relocation (type %d) not fixed up (IMMEDIATE)"),
! 		    fixp->fx_r_type);
        return NULL;
  
      case BFD_RELOC_ARM_ADRL_IMMEDIATE:
--- 10302,10308 ----
  
      case BFD_RELOC_ARM_IMMEDIATE:
        as_bad_where (fixp->fx_file, fixp->fx_line,
! 		    _("internal relocation (type: IMMEDIATE) not fixed up"));
        return NULL;
  
      case BFD_RELOC_ARM_ADRL_IMMEDIATE:
*************** tc_gen_reloc (section, fixp)
*** 10285,10292 ****
  
      case BFD_RELOC_ARM_OFFSET_IMM:
        as_bad_where (fixp->fx_file, fixp->fx_line,
! 		    _("internal_relocation (type %d) not fixed up (OFFSET_IMM)"),
! 		    fixp->fx_r_type);
        return NULL;
  
      default:
--- 10312,10318 ----
  
      case BFD_RELOC_ARM_OFFSET_IMM:
        as_bad_where (fixp->fx_file, fixp->fx_line,
! 		    _("internal_relocation (type: OFFSET_IMM) not fixed up"));
        return NULL;
  
      default:
*************** tc_gen_reloc (section, fixp)
*** 10295,10302 ****
  
  	switch (fixp->fx_r_type)
  	  {
- 	  case BFD_RELOC_ARM_IMMEDIATE:    type = "IMMEDIATE";    break;
- 	  case BFD_RELOC_ARM_OFFSET_IMM:   type = "OFFSET_IMM";   break;
  	  case BFD_RELOC_ARM_OFFSET_IMM8:  type = "OFFSET_IMM8";  break;
  	  case BFD_RELOC_ARM_SHIFT_IMM:    type = "SHIFT_IMM";    break;
  	  case BFD_RELOC_ARM_SWI:          type = "SWI";          break;
--- 10321,10326 ----


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