record-btrace: add record goto target methods
[deliverable/binutils-gdb.git] / gold / gold.cc
index 0f9a228043140a9e6a3e9e18ed2f407d4153621f..4de9289b4d6a57f9eb2aec067ca15467650f96c6 100644 (file)
@@ -502,9 +502,15 @@ queue_middle_tasks(const General_options& options,
   if (parameters->options().gc_sections())
     {
       // Find the start symbol if any.
-      Symbol* start_sym = symtab->lookup(parameters->entry());
-      if (start_sym != NULL)
-       symtab->gc_mark_symbol(start_sym);
+      Symbol* sym = symtab->lookup(parameters->entry());
+      if (sym != NULL)
+       symtab->gc_mark_symbol(sym);
+      sym = symtab->lookup(parameters->options().init());
+      if (sym != NULL && sym->is_defined() && !sym->is_from_dynobj())
+       symtab->gc_mark_symbol(sym);
+      sym = symtab->lookup(parameters->options().fini());
+      if (sym != NULL && sym->is_defined() && !sym->is_from_dynobj())
+       symtab->gc_mark_symbol(sym);
       // Symbols named with -u should not be considered garbage.
       symtab->gc_mark_undef_symbols(layout);
       gold_assert(symtab->gc() != NULL);
@@ -647,10 +653,6 @@ queue_middle_tasks(const General_options& options,
   // dynamic objects that it depends upon.
   input_objects->check_dynamic_dependencies();
 
-  // See if any of the input definitions violate the One Definition Rule.
-  // TODO: if this is too slow, do this as a task, rather than inline.
-  symtab->detect_odr_violations(task, options.output_file_name());
-
   // Do the --no-undefined-version check.
   if (!parameters->options().undefined_version())
     {
@@ -872,6 +874,9 @@ queue_final_tasks(const General_options& options,
       final_blocker = new_final_blocker;
     }
 
+  // Create tasks for tree-style build ID computation, if necessary.
+  final_blocker = layout->queue_build_id_tasks(workqueue, final_blocker, of);
+
   // Queue a task to close the output file.  This will be blocked by
   // FINAL_BLOCKER.
   workqueue->queue(new Task_function(new Close_task_runner(&options, layout,
This page took 0.023783 seconds and 4 git commands to generate.