Commit Graph

104 Commits

Author SHA1 Message Date
Chris Lattner
364d1203e7 Make sure to print a stack trace whenever an error signal is delivered to
the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:32:39 +00:00
John Criswell
6f5592ae2c Fixed PR#197. The libcrtend library is removed from the library linking list
when creating native executables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10979 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-26 23:51:10 +00:00
John Criswell
7f7d16b62f Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
every file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-26 20:59:41 +00:00
Chris Lattner
0cccb18c98 Make sure to verify the result before writing out the bytecode file. Not doing
so can cause obscure errors downstream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 03:39:46 +00:00
John Criswell
368751f2b7 Modified the logic so that library objects with main() are only linked in
if the program currently has main undefined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 20:27:14 +00:00
John Criswell
1715ce00e4 Modified the linker so that it always links in an object from an archive
that defines the symbol "main."  This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.

There is probably a more correct way to do this, but this works for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 17:37:06 +00:00
John Criswell
aa2a47d813 Added the -h option for compatibility with other linkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10335 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-09 15:39:11 +00:00
Chris Lattner
9e6f686559 Fix compatibility with gcc 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:45:47 +00:00
Chris Lattner
548e813fa7 The function resolving pass must be run, even if -disable-opt is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 09:44:03 +00:00
Chris Lattner
6cc8ca9229 * The return value of LinkLibraries is ignored, so remove it.
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
  CONTINUE ANYWAY!  Instead, just output the warning, and keep going. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 07:44:09 +00:00
Misha Brukman
0d2459a49f I'm gonna be picky and say we don't really need that trailing slash "lib/"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10196 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:31:57 +00:00
Misha Brukman
3e15c7a976 Make sure we ONLY add a `-load' switch to the JIT command line if the file is
verified as having an ELF header. This fixes PR151.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10195 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:29:42 +00:00
Misha Brukman
3e25f2e1be When writing out the runner script, add -load=<lib> lines to pull in all the
shared objects automagically, so it doesn't have to be done by hand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10114 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:42 +00:00
Misha Brukman
84fbc653ce Add ability to search only for native shared object, and expose the
functionality to the rest of gccld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10113 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:06 +00:00
Misha Brukman
438e364692 For consistency, removed space between function name and left paren in function
call, i.e. [ addPass (...) ]  =>  [ addPass(...) ]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10105 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:26:15 +00:00
Misha Brukman
9839969110 * Doxygenified comments, simplifying them and shortening in the process
* Eliminated extra space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10104 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:21:54 +00:00
Brian Gaeke
1ab90d4e38 Add a -verify option to verify the results of gccld passes.
Add a -disable-opt option to turn off gccld optimization passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10040 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:28 +00:00
Brian Gaeke
2282ae1ebd When we find a module we want, in an archive, in verbose mode,
print out the module's identifier (which should now contain the name
 of both the archive and the module.)
Wrap some lines at 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10039 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:13 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
0d723acf15 Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9902 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:54:01 +00:00
Brian Gaeke
ee8adb1955 This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:37 +00:00
Chris Lattner
cc650b615d Give gccld more guts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:55:09 +00:00
Brian Gaeke
aee4de9957 Give this header file an Emacs mode-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:10 +00:00
Brian Gaeke
00cc86a8fc Do not assume the first file is a bytecode file. Instead, construct a dummy
Module and link things into that.

Also, fix a typo in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:00 +00:00
Brian Gaeke
3b3640a373 Shorten and correct some function-header comments.
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.

Make LinkFiles not skip the first file in Files.

Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:12:52 +00:00
Chris Lattner
fe32bf5d0d Make -r work, fixing PR 91
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:05:21 +00:00
Chris Lattner
fd35c6417d If linking a library, do not link other libraries, like libc, into it!
This fixes lots of annoying warnings and error messages


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 17:27:17 +00:00
Brian Gaeke
7c7a3a2d7f lli -q is history. Rebuild your gccld shell scripts, folks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9494 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 20:00:06 +00:00
Chris Lattner
246ce3c2d5 Turn on the inliner by default at link-time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9477 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 18:09:23 +00:00
Chris Lattner
eaa35bb794 Turn on the IPCP pass by default. It has passed all of the tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9435 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:25:57 +00:00
Brian Gaeke
f1fce0881f Fix off-by-one error in processing of libraries named on command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 21:07:12 +00:00
John Criswell
e2fab734ad Added LLVM copyright to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:29:16 +00:00
Chris Lattner
1dd27b157b fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9294 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:58:43 +00:00
John Criswell
7c0e022c5c Added copyright header to all C++ source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:47:21 +00:00
Brian Gaeke
82a036fd19 Don't include "Config/stdlib.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9037 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 19:12:22 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Brian Gaeke
608e75c604 Make more error messages have gccld's name in them.
Add a newline after "Cannot find <library>".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8968 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-08 19:09:30 +00:00
Misha Brukman
5208ba1292 Doxygen-ified comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:09:32 +00:00
Misha Brukman
e97fbed83a * Ordered includes according to LLVM style
* Put function signatures on one line if possible
* Deleted empty comment lines (^//$)
* Deleted braces around single statements
* Deleted space between function call and argument list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:59:25 +00:00
Misha Brukman
61087cc023 Made code more terse:
* Deleted empty comment lines
* No single begin-braces '{' on a line by themselves


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8773 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:51:20 +00:00
Misha Brukman
1c53405b68 Doxygen-ified function comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8771 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:42:57 +00:00
Misha Brukman
b6b28431d1 Removed extra space in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8770 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:40:12 +00:00
Chris Lattner
238cf3c875 Remove initials from source file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:36:51 +00:00
Misha Brukman
bb5a4d0ec0 Make code more terse:
* Remove extra blank lines
* Delete space between function call and arg list
* Delete non-content comment lines ("//")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:33:12 +00:00
Brian Gaeke
e98ddfce7e 1. Use better error messages in LinkFiles().
2. I think the caller of LinkFiles() should not ignore a true return value.
   (If you have a good reason why it ought to, feel free to revert
   this. It's just something that's been bugging me for a while.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8760 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 14:03:48 +00:00
Chris Lattner
a58d2be76f Update file headers for renamed files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 03:24:28 +00:00
Misha Brukman
e676313966 Tersified code:
* Removed space between function name and its argument list
* Removed space between '&' and variable name
* Removed empty comment lines: `//'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8750 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:26:24 +00:00
Misha Brukman
17dc4ce5a7 * Ordered includes according to LLVM programmers' guide
* Made code layout more verbose: no more '{' on a line by itself
* Pruned extra whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:16:43 +00:00
Chris Lattner
6e271236a5 Minor cleanups:
* Local header file goes at top
 * Remove unneeded #includes
 * Wrap code at 80 columns
 * Declare variables where they are used
 * 'register' is not needed
 * Use 'unsigned' instead of 'int' variables where possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8657 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 20:21:34 +00:00
John Criswell
f430434e8d New header file for gccld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 20:24:40 +00:00