Commit Graph

183 Commits

Author SHA1 Message Date
Reid Spencer c4e3153455 Make LinkModules a static member function
llvm-svn: 18859
2004-12-13 03:00:16 +00:00
Reid Spencer 9a5613962f This file contains only the Linker's library linking support
llvm-svn: 18858
2004-12-13 03:00:04 +00:00
Reid Spencer ebd3d9f8fc For PR351: \
* Remove redundant static function LinkOneLibrary. \
* Remove unneded #includes \
* Convert FileSupport usage to sys::Path instead

llvm-svn: 18857
2004-12-13 02:59:52 +00:00
Reid Spencer 9ce11c3929 This file contains only the Linker's file linking support
llvm-svn: 18856
2004-12-13 02:59:41 +00:00
Reid Spencer fe73bfcfdb For PR351: \
* Convert functions to Linker:: methods. \
* Remove unneeded #includes \
* Utilize sys::Path utilities not FileSupport utilities \
* Move File & Library linking functions to other source files

llvm-svn: 18855
2004-12-13 02:59:29 +00:00
Chris Lattner b7f5916e01 Make sure to link the target-triple as well, so it ends up in the .llvm.bc file
llvm-svn: 18774
2004-12-10 20:26:15 +00:00
Chris Lattner 630729c97e Turn this error back into a warning, fixing the povray regression
llvm-svn: 18655
2004-12-08 20:01:10 +00:00
Chris Lattner db38fe94ae Revert this disgusting hack, John has a much nicer solution
llvm-svn: 18611
2004-12-08 03:31:14 +00:00
Chris Lattner 79a993ea0d Add a disgusting hack to work around a libstdc++ issue. This code should
be removed when PR400 is resolved.

llvm-svn: 18610
2004-12-08 03:28:51 +00:00
Reid Spencer 1014afc7ea Fix PR139: \
Implement LinkItems and BuildLinkItems interfaces.

llvm-svn: 18547
2004-12-05 19:14:55 +00:00
Chris Lattner a57c105687 Fix linkage of mismatched weak globals. This unbreaks 300.twolf
llvm-svn: 18494
2004-12-04 18:54:48 +00:00
Chris Lattner fc61de3902 Significantly rework linker support for global variables, allowing it to
correctly link globals whose LLVM types do not match.

This fixes several of the F2C SPEC FP benchmarks, which were failing this
due to the implementation of common blocks used by f2c.

llvm-svn: 18465
2004-12-03 22:18:41 +00:00
Reid Spencer f78508b25e PR466:
* Make the linker find lib*.bca files now instead of lib*.bc since those
  are what the makefiles now generate for bytecode archives.
* Make sure the linker only links archives when LinkLibraries is called.
  Previously if it found a lib*.bc file and that file was a bytecode file,
  it would link in the entire bytecode. This could make -lc -lc fail with
  duplicate symbols error but it shouldn't as searching multiple libraries,
  even the same one more than once, is permitted.
* Now that the above problems are corrected, implement the dependent libs
  feature. After the module is linked with all specified libraries, the
  LinkLibraries function will obtain the set of dependent libraries from
  the linked modules and attemp to find and link against those libraries.

llvm-svn: 18428
2004-12-02 09:52:10 +00:00
Reid Spencer 3f2352e23e Revert version 1.39. It breaks the ordering of the library processing.
llvm-svn: 18399
2004-11-30 22:54:48 +00:00
Reid Spencer d1697bf2f7 Shared library extension is now in LTDL_SHLIB_EXT
llvm-svn: 18353
2004-11-29 12:40:21 +00:00
Reid Spencer 8bb258d1ea Implement dependent library linking. It is no longer required that -lstdc++
-lstdsup++ no -lc be passed on the command line to llvm linkers if the
progam being linked was compiled with the C/C++ Front End or Stacker.

llvm-svn: 18243
2004-11-25 09:32:08 +00:00
Reid Spencer 2c4f9a484c Remove blank comment lines for uniformity.
Make sure lines don't exceed 80 cols.

llvm-svn: 18242
2004-11-25 09:29:44 +00:00
Reid Spencer 3356325996 Eliminate unsightly ;;
llvm-svn: 17979
2004-11-19 03:27:05 +00:00
Reid Spencer c2455ca7b7 Reduce the amount of work in LinkInArchive by not searching the archive for
symbols it has already identified as not defining.

llvm-svn: 17975
2004-11-19 03:13:25 +00:00
Chris Lattner f27514df9d Don't increment a dead iterator
llvm-svn: 17904
2004-11-16 19:04:40 +00:00
Chris Lattner 7391dde138 Simplify the remapper by only needing one map, since the body of the functions
being linked do not need to be remapped any longer.

llvm-svn: 17900
2004-11-16 17:12:38 +00:00
Chris Lattner 2f0557d0e4 Take advantage of the fact that we are allowed to clobber the input module
by splicing function bodies from the src module to the destination module.

This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s
when forming the .rbc file, with a profile build.  One of the really strange
but cool effects of this patch is that it speeds up the optimizers as well,
from 12s -> 10.7s, presumably because of better locality???

In any case, this is just a first step.  We can trivially get rid of the
LocalMap now and do other simplifications.

llvm-svn: 17893
2004-11-16 07:31:51 +00:00
Reid Spencer 5208a11440 Per code review:\
* Adjust indentation\
* Ensure memory do not leak if exceptions happen (std::auto_ptr use)

llvm-svn: 17885
2004-11-16 06:47:41 +00:00
Chris Lattner f2e808449d The second arg may be clobbered by this function
llvm-svn: 17880
2004-11-16 06:41:36 +00:00
Chris Lattner 2981914302 use an autoptr
llvm-svn: 17875
2004-11-16 06:40:54 +00:00
Reid Spencer a67b6e1874 Remove a forgotten debug output line.
llvm-svn: 17810
2004-11-14 23:49:55 +00:00
Reid Spencer 9b0ddbbe2c Linker.h moved to include/llvm from include/llvm/Support.
llvm-svn: 17807
2004-11-14 23:27:04 +00:00
Reid Spencer 16c3bb3198 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer c470261d27 Don't bother with a re-linked library, ensure archive library is built.
llvm-svn: 17773
2004-11-14 22:03:14 +00:00
Reid Spencer 9db61d9e3a *Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.
llvm-svn: 17772
2004-11-14 22:02:27 +00:00
Reid Spencer a81f8197eb Makefile for lib/Linker
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer 361e513db0 This file originated in lib/VMCore/Linker.cpp but now lives in
lib/Linker/LinkModules.cpp

llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer 1cfa8d60f8 This file originated in tools/gccld/Linker.cpp but now lives in
lib/Linker/LinkArchives.cpp

llvm-svn: 17693
2004-11-12 20:34:32 +00:00