From fbb15488c4f395e9c0ad3d7007a22ee5fa9d4a7a Mon Sep 17 00:00:00 2001 From: drochner Date: Mon, 10 Jul 2006 17:42:16 +0000 Subject: [PATCH] Call ldemul_finish() before lang_check_section_addresses(), as done in binutils-current, rev.1.224. ldemul_finish() might change section addresses/lengths, so this change makes sure it is really the final output which is checked. This fixes problems loading LKMs on alpha and amd64, reported by Dave Huang per PR bin/33909. I could reproduce it myself on alpha. --- gnu/dist/binutils/ld/ldlang.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/dist/binutils/ld/ldlang.c b/gnu/dist/binutils/ld/ldlang.c index c38423ea4c60..92263aea4eb6 100644 --- a/gnu/dist/binutils/ld/ldlang.c +++ b/gnu/dist/binutils/ld/ldlang.c @@ -4876,14 +4876,13 @@ lang_process (void) lang_do_assignments (statement_list.head, abs_output_section, NULL, 0); + ldemul_finish (); + /* Make sure that the section addresses make sense. */ if (! link_info.relocatable && command_line.check_section_addresses) lang_check_section_addresses (); - /* Final stuffs. */ - - ldemul_finish (); lang_finish (); }