Index: ELF/Writer.cpp =================================================================== --- ELF/Writer.cpp (revision 262736) +++ ELF/Writer.cpp (working copy) @@ -1021,6 +1021,12 @@ if (isOutputDynamic()) Symtab.addSynthetic("_DYNAMIC", *Out::Dynamic, 0, STV_HIDDEN); + // If the ouput contains a GotPlt section, add + // _GLOBAL_OFFSET_TABLE_ to the symbol table. + if (Out::GotPlt && !Out::GotPlt->empty()) + Symtab.addSynthetic("_GLOBAL_OFFSET_TABLE_", *Out::GotPlt, + Out::GotPlt->getSize(), STV_HIDDEN); + // Define __rel[a]_iplt_{start,end} symbols if needed. addRelIpltSymbols();