diff options
author | DJ Delorie <dj@redhat.com> | 2006-05-15 23:49:57 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2006-05-15 23:49:57 -0400 |
commit | a0cfeb0fcd3953ba10886a4a5d2b33b9d4bd1d7d (patch) | |
tree | cfd3b76308f46b91f774d8dfb0c75c7af4068478 | |
parent | 2102802062c79ec73a99143d9daab7174b4b12fe (diff) | |
download | gcc-a0cfeb0fcd3953ba10886a4a5d2b33b9d4bd1d7d.zip gcc-a0cfeb0fcd3953ba10886a4a5d2b33b9d4bd1d7d.tar.gz gcc-a0cfeb0fcd3953ba10886a4a5d2b33b9d4bd1d7d.tar.bz2 |
crtstuff.c (__dso_handle): Set section from TARGET_LBIGCC_SDATA_SECTION if defined.
* crtstuff.c (__dso_handle): Set section from
TARGET_LBIGCC_SDATA_SECTION if defined.
* doc/tm.text (TARGET_LIBGCC_SDATA_SECTION): Document.
* config/mips/mips.h (TARGET_LIBGCC_SDATA_SECTION): Define.
From-SVN: r113817
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 2 | ||||
-rw-r--r-- | gcc/crtstuff.c | 3 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 12 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc93eff..f01eebd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-05-16 DJ Delorie <dj@redhat.com> + + * crtstuff.c (__dso_handle): Set section from + TARGET_LBIGCC_SDATA_SECTION if defined. + * doc/tm.text (TARGET_LIBGCC_SDATA_SECTION): Document. + * config/mips/mips.h (TARGET_LIBGCC_SDATA_SECTION): Define. + 2006-05-16 Danny Smith <dannysmith@users.sourceforge.net> PR target/27599 diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 60e1aca..f0fe411 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -466,6 +466,8 @@ extern const struct mips_rtx_cost_data *mips_cost; #endif #endif /* IN_LIBGCC2 */ +#define TARGET_LIBGCC_SDATA_SECTION ".sdata" + #ifndef MULTILIB_ENDIAN_DEFAULT #if TARGET_ENDIAN_DEFAULT == 0 #define MULTILIB_ENDIAN_DEFAULT "EL" diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index cde7557..8fdc021 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -225,6 +225,9 @@ STATIC void *__JCR_LIST__[] in one DSO or the main program is not used in another object. The dynamic linker takes care of this. */ +#ifdef TARGET_LIBGCC_SDATA_SECTION +extern void *__dso_handle __attribute__ ((__section__ (TARGET_LIBGCC_SDATA_SECTION))); +#endif #ifdef HAVE_GAS_HIDDEN extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); #endif diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index aceebf6..af1b21c 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -6217,6 +6217,18 @@ registers initialized in the function prologue or to ensure that constant pools don't end up too far way in the text section. @end defmac +@defmac TARGET_LIBGCC_SDATA_SECTION +If defined, a string which names the section into which small +variables defined in crtstuff and libgcc should go. This is useful +when the target has options for optimizing access to small data, and +you want the crtstuff and libgcc routines to be conservative in what +they expect of your application yet liberal in what your application +expects. For example, for targets with a @code{.sdata} section (like +MIPS), you could compile crtstuff with @code{-G 0} so that it doesn't +require small data support from your application, but use this macro +to put small data into @code{.sdata} so that your application can +access these variables whether it uses small data or not. + @defmac FORCE_CODE_SECTION_ALIGN If defined, an ASM statement that aligns a code section to some arbitrary boundary. This is used to force all fragments of the |