#include "ldgram.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldemul.h"
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"
#include "ldfile.h"
+#include "ldemul.h"
#include "fnmatch.h"
#include "demangle.h"
static boolean map_option_f;
static bfd_vma print_dot;
static lang_input_statement_type *first_file;
-static lang_statement_list_type lang_output_section_statement;
static CONST char *current_target;
static CONST char *output_target;
static lang_statement_list_type statement_list;
/* EXPORTS */
lang_output_section_statement_type *abs_output_section;
+lang_statement_list_type lang_output_section_statement;
lang_statement_list_type *stat_ptr = &statement_list;
lang_statement_list_type file_chain = { NULL, NULL };
const char *entry_symbol = NULL;
/* If supplied an aligment, then force it. */
if (output->section_alignment != -1)
output->bfd_section->alignment_power = output->section_alignment;
+
+ if (section->flags & SEC_BLOCK)
+ {
+ section->output_section->flags |= SEC_BLOCK;
+ /* FIXME: This value should really be obtained from the bfd... */
+ output->block_value = 128;
+ }
}
}
/* If we are being called from within a group, and this
is an archive which has already been searched, then
- force it to be researched. */
+ force it to be researched unless the whole archive
+ has been loaded already. */
if (force
+ && !s->input_statement.whole_archive
&& s->input_statement.loaded
&& bfd_check_format (s->input_statement.the_bfd,
bfd_archive))
return 0;
}
-void
+lang_output_section_statement_type *
lang_enter_output_section_statement (output_section_statement_name,
address_exp, sectype, block_value,
align, subalign, ebase)
"section alignment", 0));
os->load_base = ebase;
+ return os;
}