Line 235... |
Line 235... |
callback_t callback,
|
callback_t callback,
|
void *data)
|
void *data)
|
{
|
{
|
struct name_list *list_tmp;
|
struct name_list *list_tmp;
|
|
|
|
/* Propagate the section_flag_info from the wild statement to the section. */
|
|
s->section_flag_info = ptr->section_flag_list;
|
|
|
/* Don't process sections from files which were excluded. */
|
/* Don't process sections from files which were excluded. */
|
for (list_tmp = sec->spec.exclude_name_list;
|
for (list_tmp = sec->spec.exclude_name_list;
|
list_tmp;
|
list_tmp;
|
list_tmp = list_tmp->next)
|
list_tmp = list_tmp->next)
|
{
|
{
|
Line 2254... |
Line 2257... |
lang_add_section (lang_statement_list_type *ptr,
|
lang_add_section (lang_statement_list_type *ptr,
|
asection *section,
|
asection *section,
|
lang_output_section_statement_type *output)
|
lang_output_section_statement_type *output)
|
{
|
{
|
flagword flags = section->flags;
|
flagword flags = section->flags;
|
|
struct flag_info *sflag_info = section->section_flag_info;
|
|
|
bfd_boolean discard;
|
bfd_boolean discard;
|
lang_input_section_type *new_section;
|
lang_input_section_type *new_section;
|
|
bfd *abfd = link_info.output_bfd;
|
|
|
/* Discard sections marked with SEC_EXCLUDE. */
|
/* Discard sections marked with SEC_EXCLUDE. */
|
discard = (flags & SEC_EXCLUDE) != 0;
|
discard = (flags & SEC_EXCLUDE) != 0;
|
|
|
/* Discard input sections which are assigned to a section named
|
/* Discard input sections which are assigned to a section named
|
Line 2281... |
Line 2287... |
section->output_section = bfd_abs_section_ptr;
|
section->output_section = bfd_abs_section_ptr;
|
}
|
}
|
return;
|
return;
|
}
|
}
|
|
|
|
if (sflag_info)
|
|
{
|
|
if (sflag_info->flags_initialized == FALSE)
|
|
bfd_lookup_section_flags (&link_info, sflag_info);
|
|
|
|
if (sflag_info->only_with_flags != 0
|
|
&& sflag_info->not_with_flags != 0
|
|
&& ((sflag_info->not_with_flags & flags) != 0
|
|
|| (sflag_info->only_with_flags & flags)
|
|
!= sflag_info->only_with_flags))
|
|
return;
|
|
|
|
if (sflag_info->only_with_flags != 0
|
|
&& (sflag_info->only_with_flags & flags)
|
|
!= sflag_info->only_with_flags)
|
|
return;
|
|
|
|
if (sflag_info->not_with_flags != 0
|
|
&& (sflag_info->not_with_flags & flags) != 0)
|
|
return;
|
|
}
|
|
|
if (section->output_section != NULL)
|
if (section->output_section != NULL)
|
return;
|
return;
|
|
|
/* We don't copy the SEC_NEVER_LOAD flag from an input section
|
/* We don't copy the SEC_NEVER_LOAD flag from an input section
|
to an output section, because we want to be able to include a
|
to an output section, because we want to be able to include a
|
Line 3017... |
Line 3045... |
if (output_target != NULL)
|
if (output_target != NULL)
|
return output_target;
|
return output_target;
|
|
|
/* No - has the current target been set to something other than
|
/* No - has the current target been set to something other than
|
the default? */
|
the default? */
|
if (current_target != default_target)
|
if (current_target != default_target && current_target != NULL)
|
return current_target;
|
return current_target;
|
|
|
/* No - can we determine the format of the first input file? */
|
/* No - can we determine the format of the first input file? */
|
target = get_first_input_target ();
|
target = get_first_input_target ();
|
if (target != NULL)
|
if (target != NULL)
|
Line 6542... |
Line 6570... |
inputfiles = input_file_chain;
|
inputfiles = input_file_chain;
|
if (plugin_call_all_symbols_read ())
|
if (plugin_call_all_symbols_read ())
|
einfo (_("%P%F: %s: plugin reported error after all symbols read\n"),
|
einfo (_("%P%F: %s: plugin reported error after all symbols read\n"),
|
plugin_error_plugin ());
|
plugin_error_plugin ());
|
/* Open any newly added files, updating the file chains. */
|
/* Open any newly added files, updating the file chains. */
|
|
link_info.loading_lto_outputs = TRUE;
|
open_input_bfds (added.head, OPEN_BFD_NORMAL);
|
open_input_bfds (added.head, OPEN_BFD_NORMAL);
|
/* Restore the global list pointer now they have all been added. */
|
/* Restore the global list pointer now they have all been added. */
|
lang_list_remove_tail (stat_ptr, &added);
|
lang_list_remove_tail (stat_ptr, &added);
|
/* And detach the fresh ends of the file lists. */
|
/* And detach the fresh ends of the file lists. */
|
lang_list_remove_tail (&file_chain, &files);
|
lang_list_remove_tail (&file_chain, &files);
|
Line 6711... |
Line 6740... |
}
|
}
|
|
|
new_stmt = new_stat (lang_wild_statement, stat_ptr);
|
new_stmt = new_stat (lang_wild_statement, stat_ptr);
|
new_stmt->filename = NULL;
|
new_stmt->filename = NULL;
|
new_stmt->filenames_sorted = FALSE;
|
new_stmt->filenames_sorted = FALSE;
|
|
new_stmt->section_flag_list = NULL;
|
if (filespec != NULL)
|
if (filespec != NULL)
|
{
|
{
|
new_stmt->filename = filespec->name;
|
new_stmt->filename = filespec->name;
|
new_stmt->filenames_sorted = filespec->sorted == by_name;
|
new_stmt->filenames_sorted = filespec->sorted == by_name;
|
|
new_stmt->section_flag_list = filespec->section_flag_list;
|
}
|
}
|
new_stmt->section_list = section_list;
|
new_stmt->section_list = section_list;
|
new_stmt->keep_sections = keep_sections;
|
new_stmt->keep_sections = keep_sections;
|
lang_list_init (&new_stmt->children);
|
lang_list_init (&new_stmt->children);
|
analyze_walk_wild_section_handler (new_stmt);
|
analyze_walk_wild_section_handler (new_stmt);
|