root/trunk/ddl/DefaultRegistry.d

Revision 292, 2.6 kB (checked in by h3r3tic, 8 months ago)

new linking algorithm

Line 
1 /+
2     Copyright (c) 2005-2006 Eric Anderton
3         
4     Permission is hereby granted, free of charge, to any person
5     obtaining a copy of this software and associated documentation
6     files (the "Software"), to deal in the Software without
7     restriction, including without limitation the rights to use,
8     copy, modify, merge, publish, distribute, sublicense, and/or
9     sell copies of the Software, and to permit persons to whom the
10     Software is furnished to do so, subject to the following
11     conditions:
12
13     The above copyright notice and this permission notice shall be
14     included in all copies or substantial portions of the Software.
15
16     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23     OTHER DEALINGS IN THE SOFTWARE.
24 +/
25 /**
26     Default loader registry implemenation, suitable for quick prototyping or
27     kitchen-sink style support for DDL loading.
28     
29     Authors: Eric Anderton
30     License: BSD Derivative (see source for details)
31     Copyright: 2005-2006 Eric Anderton
32 */
33 module ddl.DefaultRegistry;
34
35 private import ddl.LoaderRegistry;
36 private import ddl.ar.ArchiveLoader;
37 private import ddl.omf.OMFLoader;
38 private import ddl.ddl.DDLLoader;
39 //private import ddl.elf.ELFObjLoader;
40 private import ddl.insitu.InSituLoader;
41 //private import ddl.coff.COFFLoader;
42
43 /**
44     Default Loader Registry implementation.
45     
46     Pulls in support for all standard loader types.  The order of loader registration
47     is different for each platform, to help make things more efficent for typical cases.
48     
49     See ddl.LoaderRegistry for more details.
50 */
51 class DefaultRegistry : LoaderRegistry{
52     /**
53         Default constructor.
54     */
55     public this(){
56         version(Windows){ // order optimized per OS
57             register(new OMFLibLoader());
58             register(new OMFObjLoader());
59             register(new DDLLoader());
60     //      register(new InSituLibLoader());
61             register(new InSituMapLoader());
62             register(new ArchiveLoader());         
63     //      register(new COFFObjLoader());         
64             //register(new ELFObjLoader());         
65         }
66         else{
67             register(new ArchiveLoader());
68             //register(new ELFObjLoader());
69             register(new DDLLoader());
70     //      register(new InSituLibLoader());           
71             register(new OMFLibLoader());
72             register(new OMFObjLoader());
73             register(new InSituMapLoader());           
74     //      register(new COFFObjLoader());         
75         }
76     }
77 }
Note: See TracBrowser for help on using the browser.