blob: 034a552aba631a54ada858bee931e5412a1ff295 [file] [log] [blame]
Chris Lattnera58d2be2003-09-30 03:24:28 +00001//===- Linker.cpp - Link together LLVM objects and libraries --------------===//
John Criswell71478b72003-09-19 20:24:23 +00002//
Chris Lattnera58d2be2003-09-30 03:24:28 +00003// This file contains routines to handle linking together LLVM bytecode files,
4// and to handle annoying things like static libraries.
John Criswell71478b72003-09-19 20:24:23 +00005//
6//===----------------------------------------------------------------------===//
7
Misha Brukman17dc4ce2003-09-29 22:16:43 +00008#include "gccld.h"
John Criswell71478b72003-09-19 20:24:23 +00009#include "llvm/Module.h"
10#include "llvm/PassManager.h"
11#include "llvm/Bytecode/Reader.h"
12#include "llvm/Bytecode/WriteBytecodePass.h"
13#include "llvm/Target/TargetData.h"
14#include "llvm/Transforms/IPO.h"
15#include "llvm/Transforms/Scalar.h"
Misha Brukman17dc4ce2003-09-29 22:16:43 +000016#include "llvm/Transforms/Utils/Linker.h"
John Criswell71478b72003-09-19 20:24:23 +000017#include "Support/CommandLine.h"
Misha Brukman17dc4ce2003-09-29 22:16:43 +000018#include "Support/FileUtilities.h"
John Criswell71478b72003-09-19 20:24:23 +000019#include "Support/Signals.h"
Misha Brukman17dc4ce2003-09-29 22:16:43 +000020#include "Support/SystemUtils.h"
John Criswell71478b72003-09-19 20:24:23 +000021#include "Config/stdlib.h"
Misha Brukman17dc4ce2003-09-29 22:16:43 +000022#include <algorithm>
John Criswell71478b72003-09-19 20:24:23 +000023#include <fstream>
24#include <memory>
25#include <set>
John Criswell71478b72003-09-19 20:24:23 +000026
Misha Brukman5208ba12003-09-30 18:09:32 +000027/// FileExists - determines if the specified filename exists and is readable.
28///
29/// Inputs:
30/// FN - The name of the file.
31///
32/// Outputs:
33/// None.
34///
35/// Return Value:
36/// TRUE - The file exists and is readable.
37/// FALSE - The file does not exist or is unreadable.
38///
Misha Brukman17dc4ce2003-09-29 22:16:43 +000039static inline bool FileExists(const std::string &FN) {
John Criswell71478b72003-09-19 20:24:23 +000040 return access(FN.c_str(), R_OK | F_OK) != -1;
41}
42
Misha Brukman5208ba12003-09-30 18:09:32 +000043/// IsArchive - determines if the specified file is an ar archive
44/// by checking the magic string at the beginning of the file.
45///
46/// Inputs:
47/// filename - A C++ string containing the name of the file.
48///
49/// Outputs:
50/// None.
51///
52/// Return value:
53/// TRUE - The file is an archive.
54/// FALSE - The file is not an archive.
55///
Misha Brukman61087cc2003-09-30 17:51:20 +000056static inline bool IsArchive(const std::string &filename) {
John Criswell71478b72003-09-19 20:24:23 +000057 std::string ArchiveMagic("!<arch>\012");
58 char buf[1 + ArchiveMagic.size()];
John Criswell71478b72003-09-19 20:24:23 +000059 std::ifstream f(filename.c_str());
60 f.read(buf, ArchiveMagic.size());
61 buf[ArchiveMagic.size()] = '\0';
62 return ArchiveMagic == buf;
63}
64
Misha Brukman5208ba12003-09-30 18:09:32 +000065/// FindLib - locates a particular library. It will prepend and append
66/// various directories, prefixes, and suffixes until it can find the library.
67///
68/// Inputs:
69/// Filename - Name of the file to find.
70/// Paths - List of directories to search.
71///
72/// Outputs:
73/// None.
74///
75/// Return value:
76/// The name of the file is returned.
77/// If the file is not found, an empty string is returned.
78///
John Criswell71478b72003-09-19 20:24:23 +000079static std::string
Misha Brukman61087cc2003-09-30 17:51:20 +000080FindLib(const std::string &Filename, const std::vector<std::string> &Paths) {
John Criswell71478b72003-09-19 20:24:23 +000081 // Determine if the pathname can be found as it stands.
Misha Brukmane6763132003-09-29 22:26:24 +000082 if (FileExists(Filename))
John Criswell71478b72003-09-19 20:24:23 +000083 return Filename;
John Criswell71478b72003-09-19 20:24:23 +000084
John Criswell71478b72003-09-19 20:24:23 +000085 // If that doesn't work, convert the name into a library name.
John Criswell71478b72003-09-19 20:24:23 +000086 std::string LibName = "lib" + Filename;
87
John Criswell71478b72003-09-19 20:24:23 +000088 // Iterate over the directories in Paths to see if we can find the library
89 // there.
Misha Brukman17dc4ce2003-09-29 22:16:43 +000090 for (unsigned Index = 0; Index != Paths.size(); ++Index) {
John Criswell71478b72003-09-19 20:24:23 +000091 std::string Directory = Paths[Index] + "/";
92
Misha Brukmane6763132003-09-29 22:26:24 +000093 if (FileExists(Directory + LibName + ".bc"))
John Criswell71478b72003-09-19 20:24:23 +000094 return Directory + LibName + ".bc";
John Criswell71478b72003-09-19 20:24:23 +000095
Misha Brukmane6763132003-09-29 22:26:24 +000096 if (FileExists(Directory + LibName + ".so"))
John Criswell71478b72003-09-19 20:24:23 +000097 return Directory + LibName + ".so";
John Criswell71478b72003-09-19 20:24:23 +000098
Misha Brukmane6763132003-09-29 22:26:24 +000099 if (FileExists(Directory + LibName + ".a"))
John Criswell71478b72003-09-19 20:24:23 +0000100 return Directory + LibName + ".a";
John Criswell71478b72003-09-19 20:24:23 +0000101 }
102
John Criswell71478b72003-09-19 20:24:23 +0000103 // One last hope: Check LLVM_LIB_SEARCH_PATH.
John Criswell71478b72003-09-19 20:24:23 +0000104 char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH");
105 if (SearchPath == NULL)
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000106 return std::string();
John Criswell71478b72003-09-19 20:24:23 +0000107
108 LibName = std::string(SearchPath) + "/" + LibName;
Misha Brukmane6763132003-09-29 22:26:24 +0000109 if (FileExists(LibName))
John Criswell71478b72003-09-19 20:24:23 +0000110 return LibName;
John Criswell71478b72003-09-19 20:24:23 +0000111
112 return std::string();
113}
114
Misha Brukman5208ba12003-09-30 18:09:32 +0000115/// GetAllDefinedSymbols - finds all of the defined symbols in the specified
116/// module.
117///
118/// Inputs:
119/// M - The module in which to find defined symbols.
120///
121/// Outputs:
122/// DefinedSymbols - A set of C++ strings that will contain the name of all
123/// defined symbols.
124///
125/// Return value:
126/// None.
127///
Misha Brukman61087cc2003-09-30 17:51:20 +0000128void GetAllDefinedSymbols(Module *M, std::set<std::string> &DefinedSymbols) {
John Criswell71478b72003-09-19 20:24:23 +0000129 for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
130 if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage())
131 DefinedSymbols.insert(I->getName());
132 for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I)
133 if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage())
134 DefinedSymbols.insert(I->getName());
135}
136
Misha Brukman5208ba12003-09-30 18:09:32 +0000137/// GetAllUndefinedSymbols - calculates the set of undefined symbols that still
138/// exist in an LLVM module. This is a bit tricky because there may be two
139/// symbols with the same name but different LLVM types that will be resolved to
140/// each other but aren't currently (thus we need to treat it as resolved).
141///
142/// Inputs:
143/// M - The module in which to find undefined symbols.
144///
145/// Outputs:
146/// UndefinedSymbols - A set of C++ strings containing the name of all
147/// undefined symbols.
148///
149/// Return value:
150/// None.
151///
John Criswell71478b72003-09-19 20:24:23 +0000152void
Misha Brukman61087cc2003-09-30 17:51:20 +0000153GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
John Criswell71478b72003-09-19 20:24:23 +0000154 std::set<std::string> DefinedSymbols;
155 UndefinedSymbols.clear(); // Start out empty
156
157 for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
158 if (I->hasName()) {
159 if (I->isExternal())
160 UndefinedSymbols.insert(I->getName());
161 else if (!I->hasInternalLinkage())
162 DefinedSymbols.insert(I->getName());
163 }
164 for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I)
165 if (I->hasName()) {
166 if (I->isExternal())
167 UndefinedSymbols.insert(I->getName());
168 else if (!I->hasInternalLinkage())
169 DefinedSymbols.insert(I->getName());
170 }
171
172 // Prune out any defined symbols from the undefined symbols set...
173 for (std::set<std::string>::iterator I = UndefinedSymbols.begin();
174 I != UndefinedSymbols.end(); )
175 if (DefinedSymbols.count(*I))
176 UndefinedSymbols.erase(I++); // This symbol really is defined!
177 else
178 ++I; // Keep this symbol in the undefined symbols list
179}
180
181
Misha Brukman5208ba12003-09-30 18:09:32 +0000182/// LoadObject - reads the specified bytecode object file.
183///
184/// Inputs:
185/// FN - The name of the file to load.
186///
187/// Outputs:
188/// OutErrorMessage - The error message to give back to the caller.
189///
190/// Return Value:
191/// A pointer to a module represening the bytecode file is returned.
192/// If an error occurs, the pointer is 0.
193///
John Criswell71478b72003-09-19 20:24:23 +0000194std::auto_ptr<Module>
Misha Brukmane6763132003-09-29 22:26:24 +0000195LoadObject(const std::string & FN, std::string &OutErrorMessage) {
John Criswell71478b72003-09-19 20:24:23 +0000196 std::string ErrorMessage;
197 Module *Result = ParseBytecodeFile(FN, &ErrorMessage);
198 if (Result) return std::auto_ptr<Module>(Result);
John Criswell71478b72003-09-19 20:24:23 +0000199 OutErrorMessage = "Bytecode file '" + FN + "' corrupt!";
200 if (ErrorMessage.size()) OutErrorMessage += ": " + ErrorMessage;
201 return std::auto_ptr<Module>();
202}
203
Misha Brukman5208ba12003-09-30 18:09:32 +0000204/// LinkInArchive - opens an archive library and link in all objects which
205/// provide symbols that are currently undefined.
206///
207/// Inputs:
208/// M - The module in which to link the archives.
209/// Filename - The pathname of the archive.
210/// Verbose - Flags whether verbose messages should be printed.
211///
212/// Outputs:
213/// ErrorMessage - A C++ string detailing what error occurred, if any.
214///
215/// Return Value:
216/// TRUE - An error occurred.
217/// FALSE - No errors.
218///
Misha Brukmane6763132003-09-29 22:26:24 +0000219static bool LinkInArchive(Module *M,
220 const std::string &Filename,
221 std::string &ErrorMessage,
222 bool Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000223{
John Criswell71478b72003-09-19 20:24:23 +0000224 // Find all of the symbols currently undefined in the bytecode program.
225 // If all the symbols are defined, the program is complete, and there is
226 // no reason to link in any archive files.
John Criswell71478b72003-09-19 20:24:23 +0000227 std::set<std::string> UndefinedSymbols;
Misha Brukmane6763132003-09-29 22:26:24 +0000228 GetAllUndefinedSymbols(M, UndefinedSymbols);
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000229 if (UndefinedSymbols.empty()) {
John Criswell71478b72003-09-19 20:24:23 +0000230 if (Verbose) std::cerr << " No symbols undefined, don't link library!\n";
231 return false; // No need to link anything in!
232 }
233
John Criswell71478b72003-09-19 20:24:23 +0000234 // Load in the archive objects.
John Criswell71478b72003-09-19 20:24:23 +0000235 if (Verbose) std::cerr << " Loading '" << Filename << "'\n";
236 std::vector<Module*> Objects;
Misha Brukmane6763132003-09-29 22:26:24 +0000237 if (ReadArchiveFile(Filename, Objects, &ErrorMessage))
John Criswell71478b72003-09-19 20:24:23 +0000238 return true;
John Criswell71478b72003-09-19 20:24:23 +0000239
John Criswell71478b72003-09-19 20:24:23 +0000240 // Figure out which symbols are defined by all of the modules in the archive.
John Criswell71478b72003-09-19 20:24:23 +0000241 std::vector<std::set<std::string> > DefinedSymbols;
Misha Brukmane6763132003-09-29 22:26:24 +0000242 DefinedSymbols.resize(Objects.size());
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000243 for (unsigned i = 0; i != Objects.size(); ++i) {
John Criswell71478b72003-09-19 20:24:23 +0000244 GetAllDefinedSymbols(Objects[i], DefinedSymbols[i]);
245 }
246
247 // While we are linking in object files, loop.
248 bool Linked = true;
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000249 while (Linked) {
John Criswell71478b72003-09-19 20:24:23 +0000250 Linked = false;
251
252 for (unsigned i = 0; i != Objects.size(); ++i) {
253 // Consider whether we need to link in this module... we only need to
254 // link it in if it defines some symbol which is so far undefined.
255 //
256 const std::set<std::string> &DefSymbols = DefinedSymbols[i];
257
258 bool ObjectRequired = false;
259 for (std::set<std::string>::iterator I = UndefinedSymbols.begin(),
260 E = UndefinedSymbols.end(); I != E; ++I)
261 if (DefSymbols.count(*I)) {
262 if (Verbose)
263 std::cerr << " Found object providing symbol '" << *I << "'...\n";
264 ObjectRequired = true;
265 break;
266 }
267
268 // We DO need to link this object into the program...
269 if (ObjectRequired) {
270 if (LinkModules(M, Objects[i], &ErrorMessage))
271 return true; // Couldn't link in the right object file...
272
273 // Since we have linked in this object, delete it from the list of
274 // objects to consider in this archive file.
275 std::swap(Objects[i], Objects.back());
276 std::swap(DefinedSymbols[i], DefinedSymbols.back());
277 Objects.pop_back();
278 DefinedSymbols.pop_back();
279 --i; // Do not skip an entry
280
281 // The undefined symbols set should have shrunk.
282 GetAllUndefinedSymbols(M, UndefinedSymbols);
283 Linked = true; // We have linked something in!
284 }
285 }
286 }
287
288 return false;
289}
290
Misha Brukman5208ba12003-09-30 18:09:32 +0000291/// LinkInFile - opens an archive library and link in all objects which
292/// provide symbols that are currently undefined.
293///
294/// Inputs:
295/// HeadModule - The module in which to link the archives.
296/// Filename - The pathname of the archive.
297/// Verbose - Flags whether verbose messages should be printed.
298///
299/// Outputs:
300/// ErrorMessage - A C++ string detailing what error occurred, if any.
301///
302/// Return Value:
303/// TRUE - An error occurred.
304/// FALSE - No errors.
305///
Misha Brukmane6763132003-09-29 22:26:24 +0000306static bool LinkInFile(Module *HeadModule,
307 const std::string &Filename,
308 std::string &ErrorMessage,
309 bool Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000310{
311 std::auto_ptr<Module> M(LoadObject(Filename, ErrorMessage));
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000312 if (M.get() == 0) return true;
John Criswell71478b72003-09-19 20:24:23 +0000313 if (Verbose) std::cerr << "Linking in '" << Filename << "'\n";
Misha Brukmane6763132003-09-29 22:26:24 +0000314 return LinkModules(HeadModule, M.get(), &ErrorMessage);
John Criswell71478b72003-09-19 20:24:23 +0000315}
316
Misha Brukman5208ba12003-09-30 18:09:32 +0000317/// LinkFiles - takes a module and a list of files and links them all together.
318/// It locates the file either in the current directory, as its absolute
319/// or relative pathname, or as a file somewhere in LLVM_LIB_SEARCH_PATH.
320///
321/// Inputs:
322/// progname - The name of the program (infamous argv[0]).
323/// HeadModule - The module under which all files will be linked.
324/// Files - A vector of C++ strings indicating the LLVM bytecode filenames
325/// to be linked. The names can refer to a mixture of pure LLVM
326/// bytecode files and archive (ar) formatted files.
327/// Verbose - Flags whether verbose output should be printed while linking.
328///
329/// Outputs:
330/// HeadModule - The module will have the specified LLVM bytecode files linked
331/// in.
332///
333/// Return value:
334/// FALSE - No errors.
335/// TRUE - Some error occurred.
336///
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000337bool LinkFiles(const char *progname,
338 Module *HeadModule,
339 const std::vector<std::string> &Files,
340 bool Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000341{
342 // String in which to receive error messages.
343 std::string ErrorMessage;
344
345 // Full pathname of the file
346 std::string Pathname;
347
348 // Get the library search path from the environment
349 char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH");
350
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000351 for (unsigned i = 1; i < Files.size(); ++i) {
John Criswell71478b72003-09-19 20:24:23 +0000352 // Determine where this file lives.
Misha Brukmane6763132003-09-29 22:26:24 +0000353 if (FileExists(Files[i])) {
John Criswell71478b72003-09-19 20:24:23 +0000354 Pathname = Files[i];
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000355 } else {
356 if (SearchPath == NULL) {
Brian Gaekee98ddfc2003-09-30 14:03:48 +0000357 std::cerr << "Cannot find linker input file '" << Files[i] << "'";
John Criswell71478b72003-09-19 20:24:23 +0000358 return true;
359 }
360
361 Pathname = std::string(SearchPath)+"/"+Files[i];
Misha Brukmane6763132003-09-29 22:26:24 +0000362 if (!FileExists(Pathname)) {
Brian Gaekee98ddfc2003-09-30 14:03:48 +0000363 std::cerr << "Cannot find linker input file '" << Files[i] << "'";
John Criswell71478b72003-09-19 20:24:23 +0000364 return true;
365 }
366 }
367
John Criswell71478b72003-09-19 20:24:23 +0000368 // A user may specify an ar archive without -l, perhaps because it
369 // is not installed as a library. Detect that and link the library.
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000370 if (IsArchive(Pathname)) {
John Criswell71478b72003-09-19 20:24:23 +0000371 if (Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000372 std::cerr << "Linking archive '" << Files[i] << "'\n";
John Criswell71478b72003-09-19 20:24:23 +0000373
Misha Brukmane6763132003-09-29 22:26:24 +0000374 if (LinkInArchive(HeadModule, Pathname, ErrorMessage, Verbose)) {
John Criswell71478b72003-09-19 20:24:23 +0000375 PrintAndReturn(progname, ErrorMessage,
Misha Brukmane6763132003-09-29 22:26:24 +0000376 ": Error linking in '" + Files[i] + "'");
John Criswell71478b72003-09-19 20:24:23 +0000377 return true;
378 }
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000379 } else {
John Criswell71478b72003-09-19 20:24:23 +0000380 if (Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000381 std::cerr << "Linking file '" << Files[i] << "'\n";
John Criswell71478b72003-09-19 20:24:23 +0000382
Misha Brukmane6763132003-09-29 22:26:24 +0000383 if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) {
John Criswell71478b72003-09-19 20:24:23 +0000384 PrintAndReturn(progname, ErrorMessage,
Misha Brukmane6763132003-09-29 22:26:24 +0000385 ": error linking in '" + Files[i] + "'");
John Criswell71478b72003-09-19 20:24:23 +0000386 return true;
387 }
388 }
389 }
390
391 return false;
392}
393
Misha Brukman5208ba12003-09-30 18:09:32 +0000394/// LinkLibraries - takes the specified library files and links them into the
395/// main bytecode object file.
396///
397/// Inputs:
398/// progname - The name of the program (infamous argv[0]).
399/// HeadModule - The module into which all necessary libraries will be linked.
400/// Libraries - The list of libraries to link into the module.
401/// LibPaths - The list of library paths in which to find libraries.
402/// Verbose - Flags whether verbose messages should be printed.
403/// Native - Flags whether native code is being generated.
404///
405/// Outputs:
406/// HeadModule - The module will have all necessary libraries linked in.
407///
408/// Return value:
409/// FALSE - No error.
410/// TRUE - Error.
411///
Misha Brukmane6763132003-09-29 22:26:24 +0000412bool LinkLibraries(const char *progname,
413 Module *HeadModule,
414 const std::vector<std::string> &Libraries,
415 const std::vector<std::string> &LibPaths,
416 bool Verbose,
417 bool Native)
John Criswell71478b72003-09-19 20:24:23 +0000418{
419 // String in which to receive error messages.
420 std::string ErrorMessage;
421
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000422 for (unsigned i = 1; i < Libraries.size(); ++i) {
John Criswell71478b72003-09-19 20:24:23 +0000423 // Determine where this library lives.
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000424 std::string Pathname = FindLib(Libraries[i], LibPaths);
425 if (Pathname.empty()) {
John Criswell71478b72003-09-19 20:24:23 +0000426 // If the pathname does not exist, then continue to the next one if
427 // we're doing a native link and give an error if we're doing a bytecode
428 // link.
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000429 if (!Native) {
430 PrintAndReturn(progname, "Cannot find " + Libraries[i]);
John Criswell71478b72003-09-19 20:24:23 +0000431 return true;
432 }
433 }
434
John Criswell71478b72003-09-19 20:24:23 +0000435 // A user may specify an ar archive without -l, perhaps because it
436 // is not installed as a library. Detect that and link the library.
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000437 if (IsArchive(Pathname)) {
John Criswell71478b72003-09-19 20:24:23 +0000438 if (Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000439 std::cerr << "Linking archive '" << Libraries[i] << "'\n";
John Criswell71478b72003-09-19 20:24:23 +0000440
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000441 if (LinkInArchive(HeadModule, Pathname, ErrorMessage, Verbose)) {
John Criswell71478b72003-09-19 20:24:23 +0000442 PrintAndReturn(progname, ErrorMessage,
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000443 ": Error linking in '" + Libraries[i] + "'");
John Criswell71478b72003-09-19 20:24:23 +0000444 return true;
445 }
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000446 } else {
John Criswell71478b72003-09-19 20:24:23 +0000447 if (Verbose)
John Criswell71478b72003-09-19 20:24:23 +0000448 std::cerr << "Linking file '" << Libraries[i] << "'\n";
John Criswell71478b72003-09-19 20:24:23 +0000449
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000450 if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) {
John Criswell71478b72003-09-19 20:24:23 +0000451 PrintAndReturn(progname, ErrorMessage,
Misha Brukman17dc4ce2003-09-29 22:16:43 +0000452 ": error linking in '" + Libraries[i] + "'");
John Criswell71478b72003-09-19 20:24:23 +0000453 return true;
454 }
455 }
456 }
457
458 return false;
459}