This patch changes gold to obey the linker script when sorting sections if the linker script specifies how the sections should be sorted. It's better to obey the script, even if the script is not laying out sections as gold would prefer. This avoids an error which can occur with an empty .tbss section when the linker script sorts it differently. Committed to mainline and 2.21 branch. Ian 2011-03-14 Ian Lance Taylor * script-sections.cc (Sort_output_sections::script_compare): Rename from is_before, change return type. (Sort_output_sections::operator()): Adjust accordingly.