aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-10-06 20:40:16 +0000
committerIan Lance Taylor <iant@google.com>2006-10-06 20:40:16 +0000
commit12e14209f0834b6d3d9884a586b558c32eb2607c (patch)
tree04db4beba9abf0d2bb6f91c383a4ac4d76cf7541 /gold/gold.cc
parent33423b7ffed87b140d924bc06ff35d353bfc4871 (diff)
downloadfsf-binutils-gdb-12e14209f0834b6d3d9884a586b558c32eb2607c.zip
fsf-binutils-gdb-12e14209f0834b6d3d9884a586b558c32eb2607c.tar.gz
fsf-binutils-gdb-12e14209f0834b6d3d9884a586b558c32eb2607c.tar.bz2
Lay out object file sections when we add the symbols to the symbol
table.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index f403910..6874e1b 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -70,7 +70,7 @@ queue_initial_tasks(const General_options& options,
const Dirsearch& search_path,
const Command_line::Input_argument_list& inputs,
Workqueue* workqueue, Input_objects* input_objects,
- Symbol_table* symtab)
+ Symbol_table* symtab, Layout* layout)
{
if (inputs.empty())
gold_fatal(_("no input files"), false);
@@ -86,13 +86,13 @@ queue_initial_tasks(const General_options& options,
{
Task_token* next_blocker = new Task_token();
next_blocker->add_blocker();
- workqueue->queue(new Read_symbols(options, input_objects, symtab,
+ workqueue->queue(new Read_symbols(options, input_objects, symtab, layout,
search_path, *p, this_blocker,
next_blocker));
this_blocker = next_blocker;
}
- workqueue->queue(new Layout_task(options, input_objects, symtab,
+ workqueue->queue(new Layout_task(options, input_objects, symtab, layout,
this_blocker));
}
@@ -170,6 +170,9 @@ main(int argc, char** argv)
// The symbol table.
Symbol_table symtab;
+ // The layout object.
+ Layout layout(command_line.options());
+
// Get the search path from the -L options.
Dirsearch search_path;
search_path.add(&workqueue, command_line.options().search_path());
@@ -177,7 +180,7 @@ main(int argc, char** argv)
// Queue up the first set of tasks.
queue_initial_tasks(command_line.options(), search_path,
command_line.inputs(), &workqueue, &input_objects,
- &symtab);
+ &symtab, &layout);
// Run the main task processing loop.
workqueue.process();