aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-10-14 13:08:19 +0000
committerAlan Modra <amodra@gmail.com>2002-10-14 13:08:19 +0000
commit7c519c12a36a82acb25b7fa17a25f8804c8e2b90 (patch)
tree6f7bab07b2d0e0f6329c554f9863daf64e221628 /ld/ldlang.c
parentc6db2f054576376039dd07c04cc97921e852053c (diff)
downloadgdb-7c519c12a36a82acb25b7fa17a25f8804c8e2b90.zip
gdb-7c519c12a36a82acb25b7fa17a25f8804c8e2b90.tar.gz
gdb-7c519c12a36a82acb25b7fa17a25f8804c8e2b90.tar.bz2
* ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
just_syms_flag. (lang_reasonable_defaults): Don't compare against false. (size_input_section): Likewise. (lang_size_sections_1): Likewise. (lang_do_assignments): Likewise. (lang_add_output): Likewise.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 8ebd1bd..f2bb9b2 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1590,7 +1590,9 @@ load_symbols (entry, place)
break;
}
- if (bfd_link_add_symbols (entry->the_bfd, &link_info))
+ if (entry->just_syms_flag)
+ entry->loaded = true;
+ else if (bfd_link_add_symbols (entry->the_bfd, &link_info))
entry->loaded = true;
else
einfo (_("%F%B: could not read symbols: %E\n"), entry->the_bfd);
@@ -2022,7 +2024,7 @@ lang_reasonable_defaults ()
default_common_section = lang_output_section_statement_lookup (".bss");
- if (placed_commons == false)
+ if (!placed_commons)
{
lang_wild_statement_type *new =
new_stat (lang_wild_statement,
@@ -2778,7 +2780,7 @@ size_input_section (this_ptr, output_section_statement, fill, dot)
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
- if (is->ifile->just_syms_flag == false)
+ if (!is->ifile->just_syms_flag)
{
unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
ldfile_output_machine);
@@ -3033,11 +3035,10 @@ lang_size_sections_1 (s, output_section_statement, prev, fill, dot, relax)
abs_output_section,
lang_allocating_phase_enum,
dot, &dot);
- if (r.valid_p == false)
- {
- einfo (_("%F%S: non constant address expression for section %s\n"),
- os->name);
- }
+ if (!r.valid_p)
+ einfo (_("%F%S: non constant address expression for section %s\n"),
+ os->name);
+
dot = r.value + r.section->bfd_section->vma;
}
@@ -3404,7 +3405,7 @@ lang_do_assignments (s, output_section_statement, fill, dot)
abs_output_section,
lang_final_phase_enum, dot, &dot);
s->data_statement.value = value.value;
- if (value.valid_p == false)
+ if (!value.valid_p)
einfo (_("%F%P: invalid data statement\n"));
}
{
@@ -3441,7 +3442,7 @@ lang_do_assignments (s, output_section_statement, fill, dot)
abs_output_section,
lang_final_phase_enum, dot, &dot);
s->reloc_statement.addend_value = value.value;
- if (value.valid_p == false)
+ if (!value.valid_p)
einfo (_("%F%P: invalid reloc statement\n"));
}
dot += bfd_get_reloc_size (s->reloc_statement.howto) / opb;
@@ -4024,7 +4025,7 @@ lang_add_output (name, from_script)
int from_script;
{
/* Make -o on command line override OUTPUT in script. */
- if (had_output_filename == false || !from_script)
+ if (!had_output_filename || !from_script)
{
output_filename = name;
had_output_filename = true;