annotate gen/linker.h @ 306:0baca2feb554 trunk

[svn r327] Fixed some more MinGW32 issues. It's now very close to working. Fixed problems with inline asm like: mov EAX, FS:4 , which incidentally is used in the runtime to get the stack bottom, on Windows.
author lindquist
date Fri, 27 Jun 2008 23:58:22 +0200
parents 70c370e97944
children eef8ac26c66c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
1 #ifndef LLVMDC_GEN_LINKER_H
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
2 #define LLVMDC_GEN_LINKER_H
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
3
284
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
4 #include <vector>
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
5
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
6 namespace llvm
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
7 {
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
8 class Module;
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
9 }
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
10
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
11 /**
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
12 * Links the modules given in MV in to dst.
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
13 * @param dst Destination module.
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
14 * @param MV Vector of modules to link in to destination.
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
15 */
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
16 void linkModules(llvm::Module* dst, const std::vector<llvm::Module*>& MV);
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
17
276
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
18 /**
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
19 * Link an executable.
306
0baca2feb554 [svn r327] Fixed some more MinGW32 issues. It's now very close to working.
lindquist
parents: 284
diff changeset
20 * @param argv0 the argv[0] value as passed to main
276
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
21 * @return 0 on success.
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
22 */
306
0baca2feb554 [svn r327] Fixed some more MinGW32 issues. It's now very close to working.
lindquist
parents: 284
diff changeset
23 int linkExecutable(const char* argv0);
276
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
24
277
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
25 /**
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
26 * Delete the executable that was previously linked with linkExecutable.
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
27 */
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
28 void deleteExecutable();
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
29
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
30 /**
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
31 * Runs the executable that was previously linked with linkExecutable.
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
32 * @return the return status of the executable.
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
33 */
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
34 int runExectuable();
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
35
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
36 #endif // LLVMDC_GEN_LINKER_H