elf.h (TARGET_SECTION_TYPE_FLAGS): Define to xtensa_multibss_section_type_flags.

* config/xtensa/elf.h (TARGET_SECTION_TYPE_FLAGS): Define to
        xtensa_multibss_section_type_flags.
        * config/xtensa/xtensa.c (xtensa_multibss_section_type_flags): Define.

From-SVN: r56797
This commit is contained in:
Bob Wilson 2002-09-04 16:22:51 +00:00 committed by Bob Wilson
parent cd42d3df16
commit 01abf342f8
3 changed files with 40 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2002-09-04 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/elf.h (TARGET_SECTION_TYPE_FLAGS): Define to
xtensa_multibss_section_type_flags.
* config/xtensa/xtensa.c (xtensa_multibss_section_type_flags): Define.
2002-09-04 Richard Henderson <rth@redhat.com>
* doc/install-old.texi: Don't mention enquire.

View File

@ -24,6 +24,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
builtin_define ("__ELF__"); \
} while (0)
#define TARGET_SECTION_TYPE_FLAGS xtensa_multibss_section_type_flags
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C

View File

@ -197,8 +197,10 @@ static rtx fixup_subreg_mem PARAMS ((rtx x));
static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned));
static struct machine_function * xtensa_init_machine_status PARAMS ((void));
static void printx PARAMS ((FILE *, signed int));
static void xtensa_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
static unsigned int xtensa_multibss_section_type_flags
PARAMS ((tree, const char *, int));
static void xtensa_select_rtx_section
PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT));
static void xtensa_encode_section_info PARAMS ((tree, int));
static rtx frame_size_const;
@ -2746,6 +2748,34 @@ a7_overlap_mentioned_p (x)
return 0;
}
/* Some Xtensa targets support multiple bss sections. If the section
name ends with ".bss", add SECTION_BSS to the flags. */
static unsigned int
xtensa_multibss_section_type_flags (decl, name, reloc)
tree decl;
const char *name;
int reloc;
{
unsigned int flags = default_section_type_flags (decl, name, reloc);
const char *suffix;
suffix = strrchr (name, '.');
if (suffix && strcmp (suffix, ".bss") == 0)
{
if (!decl || (TREE_CODE (decl) == VAR_DECL
&& DECL_INITIAL (decl) == NULL_TREE))
flags |= SECTION_BSS; /* @nobits */
else
warning ("only uninitialized variables can be placed in a "
".bss section");
}
return flags;
}
/* The literal pool stays with the function. */
static void