I somehow managed to overlook the x86/x86_64 ELF ABI requirement that the first entry in the .got.plt section hold the unrelocated address of the .dynamic section. I got away with it because the only program which cares is the dynamic linker itself. This patch fixes the problem. Committed to mainline. Ian 2011-07-15 Ian Lance Taylor * i386.cc (class Output_data_plt_i386): Add layout_ field. (Output_data_plt_i386::Output_data_plt_i386): Initialize layout_. (Output_data_plt_i386::do_write): Write address of .dynamic section to first entry in .got.plt section. * x86_64.cc (class Output_data_plt_x86_64): Add layout_ field. (Output_data_plt_x86_64::Output_data_plt_x86_64) [both versions]: Initialize layout_. (Output_data_plt_x86_64::do_write): Write address of .dynamic section to first entry in .got.plt section. * layout.h (Layout::dynamic_section): New function.