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]

Allow .word _GLOBAL_TABLE_OFFSET_ to generate GOT reloc for ARM


Hi Guys,

  I am applying the following patch to allow the ARM port of GAS to
  generate an ARM_GOTPC reloc when it encounters a ".word
  _GLOBAL_TABLE_OFFSET_" directive in the input source.  Although not
  terribly useful in this particular case, it is in line with how
  other ports also handle this directive.

Cheers
        Nick

2002-10-23  Nick Clifton  <nickc@redhat.com>

	* config/tc-arm.c (tc_gen_reloc): Allow an absolute reference to
	_GLOBAL_TABLE_OFFSET_ to be converted into a GOT reloc.


Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.129
diff -c -3 -p -w -r1.129 tc-arm.c
*** gas/config/tc-arm.c	17 Sep 2002 19:23:00 -0000	1.129
--- gas/config/tc-arm.c	21 Oct 2002 09:30:14 -0000
*************** tc_gen_reloc (section, fixp)
*** 10339,10345 ****
      }
  
  #ifdef OBJ_ELF
!   if (code == BFD_RELOC_32_PCREL
        && GOT_symbol
        && fixp->fx_addsy == GOT_symbol)
      {
--- 10339,10345 ----
      }
  
  #ifdef OBJ_ELF
!   if ((code == BFD_RELOC_32_PCREL || code == BFD_RELOC_32)
        && GOT_symbol
        && fixp->fx_addsy == GOT_symbol)
      {


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