* archive.cc (Library_base::should_include_member): Pull in object

from archive if it defines the entry symbol.
	* parameters.cc (Parameters::entry): New function.
	* parameters.h (class Parameters): Declare entry.
	* output.h (class Output_file_header): Remove entry_ field.
	* output.cc (Output_file_header::Output_file_header): Remove entry
	parameter.  Change all callers.
	(Output_file_header::entry): Use parameters->entry.
	* gold.cc (queue_middle_tasks): Likewise.
	* plugin.cc (Plugin_hook::run): Likewise.
This commit is contained in:
Ian Lance Taylor
2011-05-25 00:17:47 +00:00
parent 012ca7c8a8
commit a10ae76082
9 changed files with 46 additions and 29 deletions

View File

@@ -113,6 +113,11 @@ Library_base::should_include_member(Symbol_table* symtab, Layout* layout,
*why = buf;
delete[] buf;
}
else if (strcmp(sym_name, parameters->entry()) == 0)
{
*why = "entry symbol ";
*why += sym_name;
}
else
return Library_base::SHOULD_INCLUDE_UNKNOWN;
}