diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-01-10 07:42:49 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@gcc.gnu.org> | 2005-01-10 07:42:49 +0000 |
commit | 826eb7eda5726246f689f035ca699ca053cd59e8 (patch) | |
tree | fced80c2a496c4ea07beb0cbf7ca0354ff3a2d06 | |
parent | bc29943ee9bc2a7b709f73a1d2a86ce078052db2 (diff) | |
download | gcc-826eb7eda5726246f689f035ca699ca053cd59e8.zip gcc-826eb7eda5726246f689f035ca699ca053cd59e8.tar.gz gcc-826eb7eda5726246f689f035ca699ca053cd59e8.tar.bz2 |
ia64.c (ia64_in_small_data_p): Also handle the section names resulting from...
gcc/
2005-01-10 Jan Beulich <jbeulich@novell.com>
* config/ia64/ia64.c (ia64_in_small_data_p): Also handle the section
names resulting from -ffunction-sections/-fdata-sections and linkonce
ones.
* varasm.c (default_section_type_flags_1): Also set SECTION_SMALL
based on the section name. Rearrange the section name comparison logic
slightly so that each section name is compared against at most once.
From-SVN: r93134
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 7 | ||||
-rw-r--r-- | gcc/varasm.c | 29 |
3 files changed, 35 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e707993..b263b69 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-01-10 Jan Beulich <jbeulich@novell.com> + + * config/ia64/ia64.c (ia64_in_small_data_p): Also handle the section + names resulting from -ffunction-sections/-fdata-sections and linkonce + ones. + * varasm.c (default_section_type_flags_1): Also set SECTION_SMALL + based on the section name. Rearrange the section name comparison logic + slightly so that each section name is compared against at most once. + 2005-01-10 Ben Elliston <bje@au.ibm.com> * doc/invoke.texi (Code Gen Options): Add PowerPC to the list of diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index ce5d8aa..98ce550 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -7682,8 +7682,13 @@ ia64_in_small_data_p (tree exp) if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) { const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); + if (strcmp (section, ".sdata") == 0 - || strcmp (section, ".sbss") == 0) + || strncmp (section, ".sdata.", 7) == 0 + || strncmp (section, ".gnu.linkonce.s.", 16) == 0 + || strcmp (section, ".sbss") == 0 + || strncmp (section, ".sbss.", 6) == 0 + || strncmp (section, ".gnu.linkonce.sb.", 17) == 0) return true; } else diff --git a/gcc/varasm.c b/gcc/varasm.c index 7c58b98..086e9cc 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4606,20 +4606,31 @@ default_section_type_flags_1 (tree decl, const char *name, int reloc, if (strcmp (name, ".bss") == 0 || strncmp (name, ".bss.", 5) == 0 - || strncmp (name, ".gnu.linkonce.b.", 16) == 0 - || strcmp (name, ".sbss") == 0 - || strncmp (name, ".sbss.", 6) == 0 - || strncmp (name, ".gnu.linkonce.sb.", 17) == 0 - || strcmp (name, ".tbss") == 0 - || strncmp (name, ".gnu.linkonce.tb.", 17) == 0) + || strncmp (name, ".gnu.linkonce.b.", 16) == 0) flags |= SECTION_BSS; + if (strcmp (name, ".sdata") == 0 + || strncmp (name, ".sdata.", 7) == 0 + || strncmp (name, ".gnu.linkonce.s.", 16) == 0 + || strncmp (name, ".sdata2.", 8) == 0 + || strncmp (name, ".gnu.linkonce.s2.", 17) == 0) + flags |= SECTION_SMALL; + + if (strcmp (name, ".sbss") == 0 + || strncmp (name, ".sbss.", 6) == 0 + || strncmp (name, ".gnu.linkonce.sb.", 17) == 0) + flags |= SECTION_SMALL | SECTION_BSS; + if (strcmp (name, ".tdata") == 0 - || strcmp (name, ".tbss") == 0 - || strncmp (name, ".gnu.linkonce.td.", 17) == 0 - || strncmp (name, ".gnu.linkonce.tb.", 17) == 0) + || strncmp (name, ".tdata.", 7) == 0 + || strncmp (name, ".gnu.linkonce.td.", 17) == 0) flags |= SECTION_TLS; + if (strcmp (name, ".tbss") == 0 + || strncmp (name, ".tbss.", 6) == 0 + || strncmp (name, ".gnu.linkonce.tb.", 17) == 0) + flags |= SECTION_TLS | SECTION_BSS; + /* These three sections have special ELF types. They are neither SHT_PROGBITS nor SHT_NOBITS, so when changing sections we don't want to print a section type (@progbits or @nobits). If someone |