aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.c
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2008-08-08 18:21:26 +0000
committerBob Wilson <bob.wilson@acm.org>2008-08-08 18:21:26 +0000
commit532f93bd8e3c0f2e072037e6cdbad4a8f83ee411 (patch)
tree87856bc034a8ec1b3b552cd71e4a3489fe603d3e /gas/config/tc-xtensa.c
parent2b26d9faa92b53c1be645707f9c3b802afde8bb9 (diff)
downloadgdb-532f93bd8e3c0f2e072037e6cdbad4a8f83ee411.zip
gdb-532f93bd8e3c0f2e072037e6cdbad4a8f83ee411.tar.gz
gdb-532f93bd8e3c0f2e072037e6cdbad4a8f83ee411.tar.bz2
2008-08-08 Sterling Augustine <sterling@tensilica.com>
* config/tc-xtensa.c (exclude_section_from_property_tables): New. (xtensa_create_property_segments): Use it. (xtensa_create_xproperty_segments): Likewise.
Diffstat (limited to 'gas/config/tc-xtensa.c')
-rw-r--r--gas/config/tc-xtensa.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index ace81a8..d2753bb 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -10320,6 +10320,7 @@ static void xtensa_create_property_segments
(frag_predicate, frag_predicate, const char *, xt_section_type);
static void xtensa_create_xproperty_segments
(frag_flags_fn, const char *, xt_section_type);
+static bfd_boolean exclude_section_from_property_tables (segT);
static bfd_boolean section_has_property (segT, frag_predicate);
static bfd_boolean section_has_xproperty (segT, frag_flags_fn);
static void add_xt_block_frags
@@ -10383,12 +10384,8 @@ xtensa_create_property_segments (frag_predicate property_function,
seclist = &(*seclist)->next)
{
segT sec = *seclist;
- flagword flags;
- flags = bfd_get_section_flags (stdoutput, sec);
- if (flags & SEC_DEBUGGING)
- continue;
- if (!(flags & SEC_ALLOC))
+ if (exclude_section_from_property_tables (sec))
continue;
if (section_has_property (sec, property_function))
@@ -10485,12 +10482,8 @@ xtensa_create_xproperty_segments (frag_flags_fn flag_fn,
seclist = &(*seclist)->next)
{
segT sec = *seclist;
- flagword flags;
- flags = bfd_get_section_flags (stdoutput, sec);
- if ((flags & SEC_DEBUGGING)
- || !(flags & SEC_ALLOC)
- || (flags & SEC_MERGE))
+ if (exclude_section_from_property_tables (sec))
continue;
if (section_has_xproperty (sec, flag_fn))
@@ -10574,6 +10567,27 @@ xtensa_create_xproperty_segments (frag_flags_fn flag_fn,
static bfd_boolean
+exclude_section_from_property_tables (segT sec)
+{
+ flagword flags = bfd_get_section_flags (stdoutput, sec);
+
+ /* Sections that don't contribute to the memory footprint are excluded. */
+ if ((flags & SEC_DEBUGGING)
+ || !(flags & SEC_ALLOC)
+ || (flags & SEC_MERGE))
+ return TRUE;
+
+ /* Linker cie and fde optimizations mess up property entries for
+ eh_frame sections, but there is nothing inside them relevant to
+ property tables anyway. */
+ if (strcmp (sec->name, ".eh_frame") == 0)
+ return TRUE;
+
+ return FALSE;
+}
+
+
+static bfd_boolean
section_has_property (segT sec, frag_predicate property_function)
{
segment_info_type *seginfo = seg_info (sec);