This is the mail archive of the binutils@sourceware.org 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]

Don't complain about VxWorks GOT setup relocs on MIPS


mips_check_relocs now has code to check for inappropriate HI, LO
and jump relocations in shared libraries.  This code was also
triggering for the standard VxWorks __GOTT_BASE__ and __GOTT_INDEX__
GP setup sequence, causing many failures in the existing testsuite.
This patch treats these symbols in the same way as _gp_disp.

Tested on mips-wrs-vxworks and applied.

Richard


bfd/
	* elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks,
	exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning
	about HI/LO relocations in shared objects.

Index: bfd/elfxx-mips.c
===================================================================
--- bfd/elfxx-mips.c	2010-09-04 10:16:11.000000000 +0100
+++ bfd/elfxx-mips.c	2010-09-04 10:16:46.000000000 +0100
@@ -7930,6 +7930,10 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
 		  && strcmp (h->root.root.string, "_gp_disp") == 0)
 		break;
 
+	      /* Likewise __GOTT_BASE__ and __GOTT_INDEX__ on VxWorks.  */
+	      if (is_gott_symbol (info, h))
+		break;
+
 	      /* FALLTHROUGH */
 
 	    case R_MIPS16_26:


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