This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] Further improved native as support on Solaris/x86


The following patch is the next installment of support for the native
/usr/ccs/bin/as assembler on Solaris/x86.  The issue is that SUN's as
complains about taking the difference of labels that appear in different
sections.  Unfortunately, because gas (incorrectly?) allows this
functionality, many parts of GCC (such as the dwarf writers) now make
use of this functionality.

The good news is that the fix below, is sufficient to allow
i386-pc-solaris2.10, configured with just --enable-languages="c",
to complete a top-level bootstrap.  By placing jump tables in the text
section, we avoid trying to create pc relative offsets in a .rodata
section.  Trying to do this currently breaks such a bootstrap on mainline.

Ok for mainline?



2006-07-21  Roger Sayle  <roger@eyesopen.com>

	* config/i386/sol2-10.h (JUMP_TABLES_IN_TEXT_SECTION): Define if
	using the native solaris assembler.


Index: config/i386/sol2-10.h
===================================================================
*** config/i386/sol2-10.h	(revision 115638)
--- config/i386/sol2-10.h	(working copy)
***************
*** 1,5 ****
  /* Solaris 10 configuration.
!    Copyright (C) 2004 Free Software Foundation, Inc.
     Contributed by CodeSourcery, LLC.

  This file is part of GCC.
--- 1,5 ----
  /* Solaris 10 configuration.
!    Copyright (C) 2004, 2006 Free Software Foundation, Inc.
     Contributed by CodeSourcery, LLC.

  This file is part of GCC.
*************** Boston, MA 02110-1301, USA.  */
*** 34,39 ****
--- 34,47 ----
  		 "-s %(asm_cpu)"
  #endif

+ /* The native Solaris assembler can't calculate the difference between
+    symbols in different sections, which causes problems for -fPIC jump
+    tables in .rodata.  */
+ #ifndef USE_GAS
+ #undef JUMP_TABLES_IN_TEXT_SECTION
+ #define JUMP_TABLES_IN_TEXT_SECTION 1
+ #endif
+
  #undef NO_PROFILE_COUNTERS

  #undef MCOUNT_NAME


Roger
--


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