aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-09-20 03:00:53 +0000
committerAlan Modra <amodra@gmail.com>2005-09-20 03:00:53 +0000
commitf68d3f78b18b3f2d705394a68da509ba164d6489 (patch)
treee7ecc460025ad471aef3d0f7d4ce5ffb84cbd85e
parent3592b9717cc25f29508d5ddf83bb9b2ba1b9e6b6 (diff)
downloadgdb-f68d3f78b18b3f2d705394a68da509ba164d6489.zip
gdb-f68d3f78b18b3f2d705394a68da509ba164d6489.tar.gz
gdb-f68d3f78b18b3f2d705394a68da509ba164d6489.tar.bz2
* ldlang.h (lang_output_section_statement_struct): Change type of
"processed" to bfd_boolean. * ldexp.c (fold_name): Update references to os->processed. * ldlang.c (lang_output_section_statement_lookup_1): Likewise. (lang_size_sections_1): Likewise. (lang_reset_memory_regions): Likewise.
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/ldexp.c6
-rw-r--r--ld/ldlang.c9
-rw-r--r--ld/ldlang.h2
4 files changed, 15 insertions, 9 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c888d68..0aedf6b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2005-09-20 Alan Modra <amodra@bigpond.net.au>
+ * ldlang.h (lang_output_section_statement_struct): Change type of
+ "processed" to bfd_boolean.
+ * ldexp.c (fold_name): Update references to os->processed.
+ * ldlang.c (lang_output_section_statement_lookup_1): Likewise.
+ (lang_size_sections_1): Likewise.
+ (lang_reset_memory_regions): Likewise.
+
PR ld/1353
* ldlang.c (lang_size_sections_1): Process addr_tree earlier,
so that unused output section statements affect dot.
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 8ae7446..cee1da5 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -562,7 +562,7 @@ fold_name (etree_type *tree)
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os != NULL && os->processed > 0)
+ if (os != NULL && os->processed)
new_rel (0, NULL, os->bfd_section);
}
break;
@@ -573,7 +573,7 @@ fold_name (etree_type *tree)
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os != NULL && os->processed > 0)
+ if (os != NULL && os->processed)
{
if (os->load_base == NULL)
new_rel (0, NULL, os->bfd_section);
@@ -592,7 +592,7 @@ fold_name (etree_type *tree)
os = lang_output_section_find (tree->name.name);
if (os == NULL)
new_abs (0);
- else if (os->processed > 0)
+ else if (os->processed)
new_abs (os->bfd_section->size / opb);
}
break;
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 09e5f56..dc5f4ee 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1024,7 +1024,7 @@ lang_output_section_statement_lookup_1 (const char *const name, int constraint)
lookup->next = NULL;
lookup->bfd_section = NULL;
- lookup->processed = 0;
+ lookup->processed = FALSE;
lookup->constraint = constraint;
lookup->ignored = FALSE;
lookup->sectype = normal_section;
@@ -3976,9 +3976,8 @@ lang_size_sections_1
os = &s->output_section_statement;
if (os->addr_tree != NULL)
{
- os->processed = -1;
+ os->processed = FALSE;
exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot);
- os->processed = 0;
if (!expld.result.valid_p
&& expld.phase != lang_mark_phase_enum)
@@ -4105,7 +4104,7 @@ lang_size_sections_1
lang_size_sections_1 (os->children.head, os, &os->children.head,
os->fill, newdot, relax, check_regions);
- os->processed = 1;
+ os->processed = TRUE;
if (bfd_is_abs_section (os->bfd_section) || os->ignored)
{
@@ -5163,7 +5162,7 @@ lang_reset_memory_regions (void)
for (os = &lang_output_section_statement.head->output_section_statement;
os != NULL;
os = os->next)
- os->processed = 0;
+ os->processed = FALSE;
for (o = output_bfd->sections; o != NULL; o = o->next)
{
diff --git a/ld/ldlang.h b/ld/ldlang.h
index a23a04d..26b7d68 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -134,7 +134,7 @@ typedef struct lang_output_section_statement_struct
struct lang_output_section_statement_struct *next;
const char *name;
- int processed;
+ bfd_boolean processed;
asection *bfd_section;
flagword flags; /* Or together of all input sections. */