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.
This commit is contained in:
drochner 2006-07-10 17:42:16 +00:00
parent 55e8bbeb6e
commit fbb15488c4

View File

@ -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 ();
}