Index: gold/arm.cc =================================================================== RCS file: /cvs/src/src/gold/arm.cc,v retrieving revision 1.99 diff -u -u -p -r1.99 arm.cc --- gold/arm.cc 13 Apr 2010 20:37:55 -0000 1.99 +++ gold/arm.cc 14 Apr 2010 20:36:45 -0000 @@ -5696,8 +5696,10 @@ Arm_output_section::fix_exid unsigned int text_shndx = exidx_input_section->link(); gold_assert(symtab->is_section_folded(p->relobj(), text_shndx)); - // Remove this from link. + // Remove this from link. We also need to recount the + // local symbols. p->relobj()->set_output_section(p->shndx(), NULL); + arm_relobj->set_output_local_symbol_count_needs_update(); } } Index: gold/gold.cc =================================================================== RCS file: /cvs/src/src/gold/gold.cc,v retrieving revision 1.81 diff -u -u -p -r1.81 gold.cc --- gold/gold.cc 7 Apr 2010 21:42:22 -0000 1.81 +++ gold/gold.cc 14 Apr 2010 20:36:45 -0000 @@ -276,6 +276,16 @@ queue_middle_gc_tasks(const General_opti next_blocker)); this_blocker = next_blocker; } + + // If we are given only archives in input, we have no regular + // objects and THIS_BLOCKER is NULL here. Create a dummy + // blocker here so that we can run the middle tasks immediately. + if (this_blocker == NULL) + { + gold_assert(input_objects->number_of_relobjs() == 0); + this_blocker = new Task_token(true); + } + workqueue->queue(new Task_function(new Middle_runner(options, input_objects, symtab,