Index: Driver.cpp =================================================================== --- Driver.cpp +++ Driver.cpp @@ -1550,6 +1550,9 @@ Out::ElfHeader = make("", 0, SHF_ALLOC); Out::ElfHeader->Size = sizeof(typename ELFT::Ehdr); + // Create wrapped symbols for -wrap option. + std::vector Wrapped = addWrappedSymbols(Args); + // We need to create some reserved symbols such as _end. Create them. if (!Config->Relocatable) addReservedSymbols(); @@ -1562,9 +1565,6 @@ if (!Config->Relocatable) Symtab->scanVersionScript(); - // Create wrapped symbols for -wrap option. - std::vector Wrapped = addWrappedSymbols(Args); - // Do link-time optimization if given files are LLVM bitcode files. // This compiles bitcode files into real object files. //