1 # ====================================================================
5 # Object loader configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2005 eCosCentric Ltd.
12 ## Copyright (C) 2005 Andrew Lunn
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
37 ## -------------------------------------------
38 #####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
42 # Author(s): atonizzo (atonizzo@lycos.com)
43 # Contributors: Andrew Lunn
46 #####DESCRIPTIONEND####
48 # ====================================================================
50 cdl_package CYGPKG_OBJLOADER {
51 display "Object file loader"
52 description "This package provides support for loading and relocating
53 object files within eCos."
54 include_dir cyg/objloader
55 include_files elf.h objelf.h loader_fs.h relocate_ppc.h relocate_i386.h
56 compile objloader.c objelf.c loader_fs.c
57 requires CYGPKG_MEMALLOC
58 requires CYGPKG_IO_FILEIO
59 # ====================================================================
61 cdl_component CYGPKG_SERVICES_OBJLOADER_ARCHITECTURE {
62 display "Architecture dependent settings"
65 requires CYGINT_SERVICES_OBJLOADER_RELOCATOR == 1
67 description "Each of the options here enables the correct
68 relocation support for the architectures supported."
70 cdl_interface CYGINT_SERVICES_OBJLOADER_RELOCATOR {
71 display "Suitable function to perform a symbol relocation"
73 For each architecture we need a function which relocate
74 a symbol. If we don't have a relocator the loader
78 cdl_option CYGBLD_OBJLOADER_ARCHITECTURE_POWERPC {
79 display "Support loading on PowerPC processors"
80 calculated CYGPKG_HAL_POWERPC
81 implements CYGINT_SERVICES_OBJLOADER_RELOCATOR
83 puts $::cdl_header "#include <cyg/objloader/relocate_ppc.h>"
85 compile relocate_ppc.c
88 cdl_option CYGBLD_OBJLOADER_ARCHITECTURE_I386 {
89 display "Support loading on I386 processors"
90 calculated CYGPKG_HAL_I386 || CYGPKG_HAL_SYNTH_I386
91 implements CYGINT_SERVICES_OBJLOADER_RELOCATOR
93 puts $::cdl_header "#include <cyg/objloader/relocate_i386.h>"
95 compile relocate_i386.c
98 # cdl_option CYGBLD_OBJLOADER_ARCHITECTURE_ARM {
99 # display "Support loading on ARM processors"
100 # calculated CYGPKG_HAL_ARM
102 # puts $::cdl_header "#include <cyg/objloader/relocate_arm.h>"
104 # compile relocate_arm.c
109 cdl_option CYGPKG_SERVICES_OBJLOADER_DEBUG_LEVEL {
110 display "Verbosity of debug output"
114 description "This option allows controls over the verbosity of
115 the debug output. 1 is moderate, 2 is very
116 verbose, including the symbol name of each relocation
117 performed. Any value other than 0 will prevent the
118 unloading of unused library data, thus increasing the
119 heap memory requirements of the package."
122 cdl_component CYGPKG_SERVICES_OBJLOADER_OPTIONS {
123 display "Object loader build options"
126 Package specific build options including control over
127 compiler flags used only in building this package,
128 and details of which tests are built."
131 cdl_option CYGPKG_SERVICES_OBJLOADER_CFLAGS_ADD {
132 display "Additional compiler flags"
137 This option modifies the set of compiler flags for
138 building the serial device drivers. These flags are
139 used in addition to the set of global flags."
142 cdl_option CYGPKG_SERVICES_OBJLOADER_CFLAGS_REMOVE {
143 display "Suppressed compiler flags"
148 This option modifies the set of compiler flags for
149 building the serial device drivers. These flags are
150 removed from the set of global flags if present."
154 cdl_component CYGTST_SERVICES_OBJLOADER_BUILD_TESTS {
155 display "Build test library"
157 active_if CYGPKG_FS_ROM
158 active_if CYGINT_SERVICES_OBJLOADER_RELOCATOR
159 requires CYGBLD_FS_ROMFS_MK_ROMFS
162 This option enables the building of a library and an
163 application for testing the loader."
166 tests/testromfs/hello.o : <PACKAGE>/tests/library/hello.c
167 @sh -c "mkdir -p tests tests/testromfs"
168 $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o $@ $<
172 <PREFIX>/include/cyg/objloader/testromfs_be.h : tests/testromfs/hello.o
173 $(PREFIX)/bin/mk_romfs -b tests/testromfs testromfs_be.bin
174 @mkdir -p "$(dir $@)"
175 @sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
176 @cp testromfs_be.h $@
180 <PREFIX>/include/cyg/objloader/testromfs_le.h : tests/testromfs/hello.o
181 $(PREFIX)/bin/mk_romfs tests/testromfs testromfs_le.bin
182 @mkdir -p "$(dir $@)"
183 @sh $(PREFIX)/bin/file2c.tcl testromfs_le.bin testromfs_le.h
184 @cp testromfs_le.h $@
187 cdl_option CYGPKG_OBJLOADER_TESTS {
188 display "Objloader tests"
191 calculated { "tests/test_mods" }
193 This option specifies the set of tests for the object
199 # ====================================================================