aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2015-03-21 17:47:49 -0700
committerCary Coutant <ccoutant@gmail.com>2015-03-21 17:49:21 -0700
commitbd9e0d4628f1265c42516f90c4f162cefa787294 (patch)
treeaf18a161c887c88b7ecc8cf55f528dcf51a2c82c /gold/gold.cc
parent71883406817425ea853f6a0dd7847f3e0a17dfc9 (diff)
downloadgdb-bd9e0d4628f1265c42516f90c4f162cefa787294.zip
gdb-bd9e0d4628f1265c42516f90c4f162cefa787294.tar.gz
gdb-bd9e0d4628f1265c42516f90c4f162cefa787294.tar.bz2
Fix internal error in do_relocate_sections when using plugins.
In a previous patch for PR 14675, to fix a problem with the .eh_frame section when static linking, I added a step to finalize the .eh_frame section at the end of the first link pass. This patch caused PR 18152, where a plugin-claimed object caused a non-claimed object's layout to be deferred until replacement files were read. The call to finalize_eh_frame_section() is happening before the layout of the deferred objects, leading to the internal error in do_relocate_sections. This patch moves the finalization of the .eh_frame section to after deferred objects have been processed. gold/ PR gold/14675 PR gold/18152 * gold.cc (queue_middle_tasks): Finalize .eh_frame after laying out deferred objects.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index e345887..39843c2 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -492,9 +492,6 @@ queue_middle_tasks(const General_options& options,
if (timer != NULL)
timer->stamp(0);
- // Finalize the .eh_frame section.
- layout->finalize_eh_frame_section();
-
// Add any symbols named with -u options to the symbol table.
symtab->add_undefined_symbols_from_command_line(layout);
@@ -555,6 +552,9 @@ queue_middle_tasks(const General_options& options,
plugins->layout_deferred_objects();
}
+ // Finalize the .eh_frame section.
+ layout->finalize_eh_frame_section();
+
/* If plugins have specified a section order, re-arrange input sections
according to a specified section order. If --section-ordering-file is
also specified, do not do anything here. */