------- Additional Comments From amodra at gmail dot com 2010-09-09 02:06 ------- Nick, I think you're just papering over the real problem here. Our handling of assignments inside ONLY_IF... sections is quite broken. To see more problems, try the link with a map file. :-(
The trouble is that we create symbols in before_allocation, and finish setting them up properly in lang_size_sections, but lang_size_sections doesn't look inside an output section statement that has no output bfd section. I'm not sure what the best fix is. Hacking elf32.em like the following stops the symbol being created in the first place. static void gld${EMULATION_NAME}_find_statement_assignment (lang_statement_union_type *s) { static lang_output_section_statement_type *curr_os; if (s->header.type == lang_output_section_statement_enum) curr_os = &s->output_section_statement; else if (curr_os != NULL && curr_os->header.next == s) curr_os = NULL; if (s->header.type == lang_assignment_statement_enum && (curr_os == NULL || curr_os->constraint != -1)) gld${EMULATION_NAME}_find_exp_assignment (s->assignment_statement.exp); } -- http://sourceware.org/bugzilla/show_bug.cgi?id=11931 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils