[rtems-tools commit] Refactor code into the RTEMS Toolkit.

Chris Johns chrisj at rtems.org
Sat Sep 13 02:01:19 UTC 2014


Module:    rtems-tools
Branch:    master
Commit:    87e0e76be5b17d1dd27274d58ac9b58cdf71c0ca
Changeset: http://git.rtems.org/rtems-tools/commit/?id=87e0e76be5b17d1dd27274d58ac9b58cdf71c0ca

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sat Sep 13 12:09:16 2014 +1000

Refactor code into the RTEMS Toolkit.

---

 linkers/README                                     |   18 +-
 linkers/wscript                                    |  345 ++------------------
 {linkers => rtemstoolkit}/ConvertUTF.c             |    0
 {linkers => rtemstoolkit}/ConvertUTF.h             |    0
 {linkers => rtemstoolkit}/SimpleIni.h              |    0
 .../elftoolchain/common/Makefile                   |    0
 .../elftoolchain/common/_elftc.h                   |    0
 .../elftoolchain/common/elfdefinitions.h           |    0
 .../elftoolchain/common/native-elf-format          |    0
 .../elftoolchain/common/os.Linux.mk                |    0
 .../elftoolchain/common/uthash.h                   |    0
 .../elftoolchain/libelf/Makefile                   |    0
 .../elftoolchain/libelf/Version.map                |    0
 .../elftoolchain/libelf/_libelf.h                  |    0
 .../elftoolchain/libelf/_libelf_ar.h               |    0
 .../elftoolchain/libelf/_libelf_config.h           |    0
 .../elftoolchain/libelf/elf.3                      |    0
 .../elftoolchain/libelf/elf.c                      |    0
 .../elftoolchain/libelf/elf_begin.3                |    0
 .../elftoolchain/libelf/elf_begin.c                |    0
 .../elftoolchain/libelf/elf_cntl.3                 |    0
 .../elftoolchain/libelf/elf_cntl.c                 |    0
 .../elftoolchain/libelf/elf_data.c                 |    0
 .../elftoolchain/libelf/elf_end.3                  |    0
 .../elftoolchain/libelf/elf_end.c                  |    0
 .../elftoolchain/libelf/elf_errmsg.3               |    0
 .../elftoolchain/libelf/elf_errmsg.c               |    0
 .../elftoolchain/libelf/elf_errno.c                |    0
 .../elftoolchain/libelf/elf_fill.3                 |    0
 .../elftoolchain/libelf/elf_fill.c                 |    0
 .../elftoolchain/libelf/elf_flag.c                 |    0
 .../elftoolchain/libelf/elf_flagdata.3             |    0
 .../elftoolchain/libelf/elf_getarhdr.3             |    0
 .../elftoolchain/libelf/elf_getarhdr.c             |    0
 .../elftoolchain/libelf/elf_getarsym.3             |    0
 .../elftoolchain/libelf/elf_getarsym.c             |    0
 .../elftoolchain/libelf/elf_getbase.3              |    0
 .../elftoolchain/libelf/elf_getbase.c              |    0
 .../elftoolchain/libelf/elf_getdata.3              |    0
 .../elftoolchain/libelf/elf_getident.3             |    0
 .../elftoolchain/libelf/elf_getident.c             |    0
 .../elftoolchain/libelf/elf_getphdrnum.3           |    0
 .../elftoolchain/libelf/elf_getphnum.3             |    0
 .../elftoolchain/libelf/elf_getscn.3               |    0
 .../elftoolchain/libelf/elf_getshdrnum.3           |    0
 .../elftoolchain/libelf/elf_getshdrstrndx.3        |    0
 .../elftoolchain/libelf/elf_getshnum.3             |    0
 .../elftoolchain/libelf/elf_getshstrndx.3          |    0
 .../elftoolchain/libelf/elf_hash.3                 |    0
 .../elftoolchain/libelf/elf_hash.c                 |    0
 .../elftoolchain/libelf/elf_kind.3                 |    0
 .../elftoolchain/libelf/elf_kind.c                 |    0
 .../elftoolchain/libelf/elf_memory.3               |    0
 .../elftoolchain/libelf/elf_memory.c               |    0
 .../elftoolchain/libelf/elf_next.3                 |    0
 .../elftoolchain/libelf/elf_next.c                 |    0
 .../elftoolchain/libelf/elf_phnum.c                |    0
 .../elftoolchain/libelf/elf_rand.3                 |    0
 .../elftoolchain/libelf/elf_rand.c                 |    0
 .../elftoolchain/libelf/elf_rawfile.3              |    0
 .../elftoolchain/libelf/elf_rawfile.c              |    0
 .../elftoolchain/libelf/elf_scn.c                  |    0
 .../elftoolchain/libelf/elf_shnum.c                |    0
 .../elftoolchain/libelf/elf_shstrndx.c             |    0
 .../elftoolchain/libelf/elf_strptr.3               |    0
 .../elftoolchain/libelf/elf_strptr.c               |    0
 .../elftoolchain/libelf/elf_types.m4               |    0
 .../elftoolchain/libelf/elf_update.3               |    0
 .../elftoolchain/libelf/elf_update.c               |    0
 .../elftoolchain/libelf/elf_version.3              |    0
 .../elftoolchain/libelf/elf_version.c              |    0
 .../elftoolchain/libelf/gelf.3                     |    0
 .../elftoolchain/libelf/gelf.h                     |    0
 .../elftoolchain/libelf/gelf_cap.c                 |    0
 .../elftoolchain/libelf/gelf_checksum.3            |    0
 .../elftoolchain/libelf/gelf_checksum.c            |    0
 .../elftoolchain/libelf/gelf_dyn.c                 |    0
 .../elftoolchain/libelf/gelf_ehdr.c                |    0
 .../elftoolchain/libelf/gelf_fsize.3               |    0
 .../elftoolchain/libelf/gelf_fsize.c               |    0
 .../elftoolchain/libelf/gelf_getcap.3              |    0
 .../elftoolchain/libelf/gelf_getclass.3            |    0
 .../elftoolchain/libelf/gelf_getclass.c            |    0
 .../elftoolchain/libelf/gelf_getdyn.3              |    0
 .../elftoolchain/libelf/gelf_getehdr.3             |    0
 .../elftoolchain/libelf/gelf_getmove.3             |    0
 .../elftoolchain/libelf/gelf_getphdr.3             |    0
 .../elftoolchain/libelf/gelf_getrel.3              |    0
 .../elftoolchain/libelf/gelf_getrela.3             |    0
 .../elftoolchain/libelf/gelf_getshdr.3             |    0
 .../elftoolchain/libelf/gelf_getsym.3              |    0
 .../elftoolchain/libelf/gelf_getsyminfo.3          |    0
 .../elftoolchain/libelf/gelf_getsymshndx.3         |    0
 .../elftoolchain/libelf/gelf_move.c                |    0
 .../elftoolchain/libelf/gelf_newehdr.3             |    0
 .../elftoolchain/libelf/gelf_newphdr.3             |    0
 .../elftoolchain/libelf/gelf_phdr.c                |    0
 .../elftoolchain/libelf/gelf_rel.c                 |    0
 .../elftoolchain/libelf/gelf_rela.c                |    0
 .../elftoolchain/libelf/gelf_shdr.c                |    0
 .../elftoolchain/libelf/gelf_sym.c                 |    0
 .../elftoolchain/libelf/gelf_syminfo.c             |    0
 .../elftoolchain/libelf/gelf_symshndx.c            |    0
 .../elftoolchain/libelf/gelf_update_ehdr.3         |    0
 .../elftoolchain/libelf/gelf_xlate.c               |    0
 .../elftoolchain/libelf/gelf_xlatetof.3            |    0
 .../elftoolchain/libelf/libelf.h                   |    0
 .../elftoolchain/libelf/libelf_align.c             |    0
 .../elftoolchain/libelf/libelf_allocate.c          |    0
 .../elftoolchain/libelf/libelf_ar.c                |    0
 .../elftoolchain/libelf/libelf_ar_util.c           |    0
 .../elftoolchain/libelf/libelf_checksum.c          |    0
 .../elftoolchain/libelf/libelf_convert.m4          |    0
 .../elftoolchain/libelf/libelf_data.c              |    0
 .../elftoolchain/libelf/libelf_ehdr.c              |    0
 .../elftoolchain/libelf/libelf_extended.c          |    0
 .../elftoolchain/libelf/libelf_fsize.m4            |    0
 .../elftoolchain/libelf/libelf_msize.m4            |    0
 .../elftoolchain/libelf/libelf_phdr.c              |    0
 .../elftoolchain/libelf/libelf_shdr.c              |    0
 .../elftoolchain/libelf/libelf_xlate.c             |    0
 .../elftoolchain/libelf/mmap_win32.c               |    0
 .../elftoolchain/libelf/os.FreeBSD.mk              |    0
 .../elftoolchain/libelf/os.NetBSD.mk               |    0
 {linkers => rtemstoolkit}/fastlz.c                 |    0
 {linkers => rtemstoolkit}/fastlz.h                 |    0
 {linkers => rtemstoolkit}/libiberty/ansidecl.h     |    0
 {linkers => rtemstoolkit}/libiberty/concat.c       |    0
 {linkers => rtemstoolkit}/libiberty/cp-demangle.c  |    0
 {linkers => rtemstoolkit}/libiberty/cp-demangle.h  |    0
 {linkers => rtemstoolkit}/libiberty/cplus-dem.c    |    0
 {linkers => rtemstoolkit}/libiberty/demangle.h     |    0
 {linkers => rtemstoolkit}/libiberty/libiberty.h    |    0
 .../libiberty/make-temp-file.c                     |    0
 {linkers => rtemstoolkit}/libiberty/mkstemps.c     |    0
 {linkers => rtemstoolkit}/libiberty/pex-common.c   |    0
 {linkers => rtemstoolkit}/libiberty/pex-common.h   |    0
 {linkers => rtemstoolkit}/libiberty/pex-djgpp.c    |    0
 {linkers => rtemstoolkit}/libiberty/pex-msdos.c    |    0
 {linkers => rtemstoolkit}/libiberty/pex-one.c      |    0
 {linkers => rtemstoolkit}/libiberty/pex-unix.c     |    0
 {linkers => rtemstoolkit}/libiberty/pex-win32.c    |    0
 {linkers => rtemstoolkit}/libiberty/safe-ctype.c   |    0
 {linkers => rtemstoolkit}/libiberty/safe-ctype.h   |    0
 {linkers => rtemstoolkit}/libiberty/stpcpy.c       |    0
 {linkers => rtemstoolkit}/pkgconfig.cpp            |    0
 {linkers => rtemstoolkit}/pkgconfig.h              |    0
 {linkers => rtemstoolkit}/rld-cc.cpp               |    0
 {linkers => rtemstoolkit}/rld-cc.h                 |    0
 {linkers => rtemstoolkit}/rld-compression.cpp      |    0
 {linkers => rtemstoolkit}/rld-compression.h        |    0
 {linkers => rtemstoolkit}/rld-config.cpp           |    0
 {linkers => rtemstoolkit}/rld-config.h             |    0
 {linkers => rtemstoolkit}/rld-elf-types.h          |    0
 {linkers => rtemstoolkit}/rld-elf.cpp              |    0
 {linkers => rtemstoolkit}/rld-elf.h                |    0
 {linkers => rtemstoolkit}/rld-files.cpp            |    0
 {linkers => rtemstoolkit}/rld-files.h              |    0
 {linkers => rtemstoolkit}/rld-outputter.cpp        |    0
 {linkers => rtemstoolkit}/rld-outputter.h          |    0
 {linkers => rtemstoolkit}/rld-path.cpp             |    0
 {linkers => rtemstoolkit}/rld-path.h               |    0
 {linkers => rtemstoolkit}/rld-process.cpp          |    0
 {linkers => rtemstoolkit}/rld-process.h            |    0
 {linkers => rtemstoolkit}/rld-rap.cpp              |    0
 {linkers => rtemstoolkit}/rld-rap.h                |    0
 {linkers => rtemstoolkit}/rld-resolver.cpp         |    0
 {linkers => rtemstoolkit}/rld-resolver.h           |    0
 {linkers => rtemstoolkit}/rld-rtems.cpp            |    0
 {linkers => rtemstoolkit}/rld-rtems.h              |    0
 {linkers => rtemstoolkit}/rld-symbols.cpp          |    0
 {linkers => rtemstoolkit}/rld-symbols.h            |    0
 {linkers => rtemstoolkit}/rld.cpp                  |    0
 {linkers => rtemstoolkit}/rld.h                    |    0
 {linkers => rtemstoolkit}/rtems-utils.cpp          |    0
 {linkers => rtemstoolkit}/rtems-utils.h            |    0
 rtemstoolkit/wscript                               |  261 +++++++++++++++
 wscript                                            |   29 ++-
 178 files changed, 327 insertions(+), 326 deletions(-)

diff --git a/linkers/README b/linkers/README
index 95ed6a2..9327a15 100644
--- a/linkers/README
+++ b/linkers/README
@@ -1,18 +1,10 @@
-RTEMS Dynamic Loader Project
-============================
-Chris Johns <chrisj at rtems.org>
-
-RTEMS Linker
-------------
-
-This package contains the RTEMS linker used to create dynamically loadable
-applications.
+RTEMS Linkers.
+==============
 
-To build download and install waf (http://code.google.com/p/waf/). Then:
-
- $ waf configure build
+Chris Johns <chrisj at rtems.org>
 
-You will have a linker.
+This directory contains the RTEMS linkers and various tools to help managed
+them.
 
 License
 -------
diff --git a/linkers/wscript b/linkers/wscript
index 9ab4685..5dd151c 100644
--- a/linkers/wscript
+++ b/linkers/wscript
@@ -7,52 +7,17 @@ version_major = 1
 version_minor = 0
 version_revision = 0
 
-#
-# Waf system setup. Allow more than one build in the same tree.
-#
-top = '.'
-out = 'build-' + sys.platform
-
 def options(opt):
     opt.load("g++")
     opt.load("gcc")
-    opt.add_option('--rtems-version',
-                   default = '4.11',
-                   dest='rtems_version',
-                   help = 'Set the RTEMS version')
-    opt.add_option('--c-opts',
-                   default = '-O2',
-                   dest='c_opts',
-                   help = 'Set build options, default: -O2.')
-    opt.add_option('--show-commands',
-                   action = 'store_true',
-                   default = False,
-                   dest = 'show_commands',
-                   help = 'Print the commands as strings.')
 
 def configure(conf):
-    try:
-        conf.load("doxygen", tooldir = 'waf-tools')
-    except:
-        pass
     conf.load("g++")
     conf.load("gcc")
-    conf_libiberty(conf)
-    conf_libelf(conf)
-
-    conf.check(header_name='sys/wait.h',  features = 'c', mandatory = False)
-    conf.check_cc(function_name='kill', header_name="signal.h",
-                  features = 'c', mandatory = False)
-    conf.write_config_header('config.h')
 
     conf.env.C_OPTS = conf.options.c_opts.split(',')
     conf.env.RTEMS_VERSION = conf.options.rtems_version
-
-    if conf.options.show_commands:
-        show_commands = 'yes'
-    else:
-        show_commands = 'no'
-    conf.env.SHOW_COMMANDS = show_commands
+    conf.write_config_header('config.h')
 
 def build(bld):
     #
@@ -63,67 +28,24 @@ def build(bld):
             doxyfile = 'rtl-host.conf')
         return
 
-    if bld.env.SHOW_COMMANDS == 'yes':
-        output_command_line()
-
     #
-    # The include paths.
+    # The local configuration.
     #
-    bld.includes = ['elftoolchain/libelf', 'elftoolchain/common', 'libiberty']
-    if sys.platform == 'win32':
-        bld.includes += ['win32']
+    conf = {}
 
     #
     # Build flags.
     #
-    bld.warningflags = ['-Wall', '-Wextra', '-pedantic']
-    bld.optflags = bld.env.C_OPTS
-    bld.cflags = ['-pipe', '-g'] + bld.optflags
-    bld.cxxflags = ['-pipe', '-g'] + bld.optflags
-    bld.linkflags = ['-g']
-
-    #
-    # Create each of the modules as object files each with their own
-    # configurations.
-    #
-    bld_fastlz(bld)
-    bld_libelf(bld)
-    bld_libiberty(bld)
-
-    #
-    # RLD source.
-    #
-    rld_source = ['ConvertUTF.c',
-                  'pkgconfig.cpp',
-                  'rld-config.cpp',
-                  'rld-elf.cpp',
-                  'rld-files.cpp',
-                  'rld-cc.cpp',
-                  'rld-compression.cpp',
-                  'rld-outputter.cpp',
-                  'rld-path.cpp',
-                  'rld-process.cpp',
-                  'rld-resolver.cpp',
-                  'rld-rtems.cpp',
-                  'rld-symbols.cpp',
-                  'rld-rap.cpp',
-                  'rld.cpp']
-
-    #
-    # RTEMS Utilities.
-    #
-    rtems_utils = ['rtems-utils.cpp']
-
-    #
-    # RTL static library
-    #
-    bld.stlib(target = 'rld',
-              source = rld_source + rtems_utils,
-              defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
-              includes = ['.'] + bld.includes,
-              cflags = bld.cflags + bld.warningflags,
-              cxxflags = bld.cxxflags + bld.warningflags,
-              linkflags = bld.linkflags)
+    rtemstoolkit = '../rtemstoolkit'
+    conf['includes'] = [rtemstoolkit,
+                        rtemstoolkit + '/elftoolchain/libelf',
+                        rtemstoolkit + '/elftoolchain/common',
+                        rtemstoolkit + '/libiberty']
+    conf['warningflags'] = ['-Wall', '-Wextra', '-pedantic']
+    conf['optflags'] = bld.env.C_OPTS
+    conf['cflags'] = ['-pipe', '-g'] + conf['optflags']
+    conf['cxxflags'] = ['-pipe', '-g'] + conf['optflags']
+    conf['linkflags'] = ['-g']
 
     #
     # The list of modules.
@@ -136,10 +58,10 @@ def build(bld):
     bld.program(target = 'rtems-ld',
                 source = ['rtems-ld.cpp'],
                 defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
-                includes = ['.'] + bld.includes,
-                cflags = bld.cflags + bld.warningflags,
-                cxxflags = bld.cxxflags + bld.warningflags,
-                linkflags = bld.linkflags,
+                includes = ['.'] + conf['includes'],
+                cflags = conf['cflags'] + conf['warningflags'],
+                cxxflags = conf['cxxflags'] + conf['warningflags'],
+                linkflags = conf['linkflags'],
                 use = modules)
 
     #
@@ -148,10 +70,10 @@ def build(bld):
     bld.program(target = 'rtems-ra',
                 source = ['rtems-ra.cpp'],
                 defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
-                includes = ['.'] + bld.includes,
-                cflags = bld.cflags + bld.warningflags,
-                cxxflags = bld.cxxflags + bld.warningflags,
-                linkflags = bld.linkflags,
+                includes = ['.'] + conf['includes'],
+                cflags = conf['cflags'] + conf['warningflags'],
+                cxxflags = conf['cxxflags'] + conf['warningflags'],
+                linkflags = conf['linkflags'],
                 use = modules)
 
     #
@@ -160,10 +82,10 @@ def build(bld):
     bld.program(target = 'rtems-tld',
                 source = ['rtems-tld.cpp'],
                 defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
-                includes = ['.'] + bld.includes,
-                cflags = bld.cflags + bld.warningflags,
-                cxxflags = bld.cxxflags + bld.warningflags,
-                linkflags = bld.linkflags,
+                includes = ['.'] + conf['includes'],
+                cflags = conf['cflags'] + conf['warningflags'],
+                cxxflags = conf['cxxflags'] + conf['warningflags'],
+                linkflags = conf['linkflags'],
                 use = modules)
     bld.install_files('${PREFIX}/share/rtems/trace-linker',
                       ['rtems.ini', 'rtld-base.ini'])
@@ -174,10 +96,10 @@ def build(bld):
     bld.program(target = 'rtems-syms',
                 source = ['rtems-syms.cpp'],
                 defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
-                includes = ['.'] + bld.includes,
-                cflags = bld.cflags + bld.warningflags,
-                cxxflags = bld.cxxflags + bld.warningflags,
-                linkflags = bld.linkflags,
+                includes = ['.'] + conf['includes'],
+                cflags = conf['cflags'] + conf['warningflags'],
+                cxxflags = conf['cxxflags'] + conf['warningflags'],
+                linkflags = conf['linkflags'],
                 use = modules)
 
     #
@@ -186,212 +108,11 @@ def build(bld):
     bld.program(target = 'rtems-rap',
                 source = ['rtems-rapper.cpp'],
                 defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
-                includes = ['.'] + bld.includes,
-                cflags = bld.cflags + bld.warningflags,
-                cxxflags = bld.cxxflags + bld.warningflags,
-                linkflags = bld.linkflags,
+                includes = ['.'] + conf['includes'],
+                cflags = conf['cflags'] + conf['warningflags'],
+                cxxflags = conf['cxxflags'] + conf['warningflags'],
+                linkflags = conf['linkflags'],
                 use = modules)
 
-def rebuild(ctx):
-    import waflib.Options
-    waflib.Options.commands.extend(['clean', 'build'])
-
 def tags(ctx):
     ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)
-
-#
-# Libelf module.
-#
-def conf_libelf(conf):
-    pass
-
-def bld_fastlz(bld):
-    bld(target = 'fastlz',
-        features = 'c',
-        source = 'fastlz.c',
-        cflags = bld.cflags,
-        defines = ['FASTLZ_LEVEL=1'])
-
-def bld_libelf(bld):
-    libelf = 'elftoolchain/libelf/'
-
-    #
-    # Work around the ${SRC} having Windows slashes which the MSYS m4 does not
-    # understand.
-    #
-    if sys.platform == 'win32':
-        m4_rule = 'type ${SRC} | m4 -D SRCDIR=../linkers/' + libelf[:-1] + '> ${TGT}"'
-        includes = ['win32']
-    else:
-        m4_rule = 'm4 -D SRCDIR=../linkers/' + libelf[:-1] + ' ${SRC} > ${TGT}'
-        includes = []
-
-    bld(target = 'libelf_convert.c', source = libelf + 'libelf_convert.m4', rule = m4_rule)
-    bld(target = 'libelf_fsize.c',   source = libelf + 'libelf_fsize.m4',   rule = m4_rule)
-    bld(target = 'libelf_msize.c',   source = libelf + 'libelf_msize.m4',   rule = m4_rule)
-
-    host_source = []
-
-    if sys.platform == 'linux2':
-        common = 'elftoolchain/common/'
-        bld(target = common + 'native-elf-format.h',
-            source = common + 'native-elf-format',
-            name = 'native-elf-format',
-            rule   = './${SRC} > ${TGT}')
-        bld.add_group ()
-    elif sys.platform == 'win32':
-        host_source += [libelf + 'mmap_win32.c']
-
-    bld.stlib(target = 'elf',
-              features = 'c',
-              uses = ['native-elf-format'],
-              includes = [bld.bldnode.abspath(), 'elftoolchain/libelf', 'elftoolchain/common'] + includes,
-              cflags = bld.cflags,
-              source =[libelf + 'elf.c',
-                       libelf + 'elf_begin.c',
-                       libelf + 'elf_cntl.c',
-                       libelf + 'elf_end.c',
-                       libelf + 'elf_errmsg.c',
-                       libelf + 'elf_errno.c',
-                       libelf + 'elf_data.c',
-                       libelf + 'elf_fill.c',
-                       libelf + 'elf_flag.c',
-                       libelf + 'elf_getarhdr.c',
-                       libelf + 'elf_getarsym.c',
-                       libelf + 'elf_getbase.c',
-                       libelf + 'elf_getident.c',
-                       libelf + 'elf_hash.c',
-                       libelf + 'elf_kind.c',
-                       libelf + 'elf_memory.c',
-                       libelf + 'elf_next.c',
-                       libelf + 'elf_rand.c',
-                       libelf + 'elf_rawfile.c',
-                       libelf + 'elf_phnum.c',
-                       libelf + 'elf_shnum.c',
-                       libelf + 'elf_shstrndx.c',
-                       libelf + 'elf_scn.c',
-                       libelf + 'elf_strptr.c',
-                       libelf + 'elf_update.c',
-                       libelf + 'elf_version.c',
-                       libelf + 'gelf_cap.c',
-                       libelf + 'gelf_checksum.c',
-                       libelf + 'gelf_dyn.c',
-                       libelf + 'gelf_ehdr.c',
-                       libelf + 'gelf_getclass.c',
-                       libelf + 'gelf_fsize.c',
-                       libelf + 'gelf_move.c',
-                       libelf + 'gelf_phdr.c',
-                       libelf + 'gelf_rel.c',
-                       libelf + 'gelf_rela.c',
-                       libelf + 'gelf_shdr.c',
-                       libelf + 'gelf_sym.c',
-                       libelf + 'gelf_syminfo.c',
-                       libelf + 'gelf_symshndx.c',
-                       libelf + 'gelf_xlate.c',
-                       libelf + 'libelf_align.c',
-                       libelf + 'libelf_allocate.c',
-                       libelf + 'libelf_ar.c',
-                       libelf + 'libelf_ar_util.c',
-                       libelf + 'libelf_checksum.c',
-                       libelf + 'libelf_data.c',
-                       libelf + 'libelf_ehdr.c',
-                       libelf + 'libelf_extended.c',
-                       libelf + 'libelf_phdr.c',
-                       libelf + 'libelf_shdr.c',
-                       libelf + 'libelf_xlate.c',
-                       'libelf_convert.c',
-                       'libelf_fsize.c',
-                       'libelf_msize.c'] + host_source)
-
-#
-# Libiberty module.
-#
-def conf_libiberty(conf):
-    conf.check(header_name='alloca.h',    features = 'c', mandatory = False)
-    conf.check(header_name='fcntl.h',     features = 'c', mandatory = False)
-    conf.check(header_name='process.h',   features = 'c', mandatory = False)
-    conf.check(header_name='stdlib.h',    features = 'c')
-    conf.check(header_name='string.h',    features = 'c')
-    conf.check(header_name='strings.h',   features = 'c', mandatory = False)
-    conf.check(header_name='sys/file.h',  features = 'c', mandatory = False)
-    conf.check(header_name='sys/stat.h',  features = 'c', mandatory = False)
-    conf.check(header_name='sys/time.h',  features = 'c', mandatory = False)
-    conf.check(header_name='sys/types.h', features = 'c', mandatory = False)
-    conf.check(header_name='sys/wait.h',  features = 'c', mandatory = False)
-    conf.check(header_name='unistd.h',    features = 'c', mandatory = False)
-    conf.check(header_name='vfork.h',     features = 'c', mandatory = False)
-
-    conf.check_cc(function_name='getrusage',
-                  header_name="sys/time.h sys/resource.h",
-                  features = 'c', mandatory = False)
-
-    conf.write_config_header('libiberty/config.h')
-
-def bld_libiberty(bld):
-    if sys.platform == 'win32':
-        pex_host = 'libiberty/pex-win32.c'
-    else:
-        pex_host = 'libiberty/pex-unix.c'
-    bld.stlib(target = 'iberty',
-              features = 'c',
-              includes = ['libiberty'],
-              cflags = bld.cflags,
-              defines = ['HAVE_CONFIG_H=1'],
-              source =['libiberty/concat.c',
-                       'libiberty/cplus-dem.c',
-                       'libiberty/cp-demangle.c',
-                       'libiberty/make-temp-file.c',
-                       'libiberty/mkstemps.c',
-                       'libiberty/safe-ctype.c',
-                       'libiberty/stpcpy.c',
-                       'libiberty/pex-common.c',
-                       'libiberty/pex-one.c',
-                       pex_host])
-
-#
-# From the demos. Use this to get the command to cut+paste to play.
-#
-def output_command_line():
-    # first, display strings, people like them
-    from waflib import Utils, Logs
-    from waflib.Context import Context
-    def exec_command(self, cmd, **kw):
-        subprocess = Utils.subprocess
-        kw['shell'] = isinstance(cmd, str)
-        if isinstance(cmd, str):
-            Logs.info('%s' % cmd)
-        else:
-            Logs.info('%s' % ' '.join(cmd)) # here is the change
-        Logs.debug('runner_env: kw=%s' % kw)
-        try:
-            if self.logger:
-                self.logger.info(cmd)
-                kw['stdout'] = kw['stderr'] = subprocess.PIPE
-                p = subprocess.Popen(cmd, **kw)
-                (out, err) = p.communicate()
-                if out:
-                    self.logger.debug('out: %s' % out.decode(sys.stdout.encoding or 'iso8859-1'))
-                if err:
-                    self.logger.error('err: %s' % err.decode(sys.stdout.encoding or 'iso8859-1'))
-                return p.returncode
-            else:
-                p = subprocess.Popen(cmd, **kw)
-                return p.wait()
-        except OSError:
-            return -1
-    Context.exec_command = exec_command
-
-    # Change the outputs for tasks too
-    from waflib.Task import Task
-    def display(self):
-        return '' # no output on empty strings
-
-    Task.__str__ = display
-
-#
-# The doxy command.
-#
-from waflib import Build
-class doxy(Build.BuildContext):
-    fun = 'build'
-    cmd = 'doxy'
diff --git a/linkers/ConvertUTF.c b/rtemstoolkit/ConvertUTF.c
similarity index 100%
rename from linkers/ConvertUTF.c
rename to rtemstoolkit/ConvertUTF.c
diff --git a/linkers/ConvertUTF.h b/rtemstoolkit/ConvertUTF.h
similarity index 100%
rename from linkers/ConvertUTF.h
rename to rtemstoolkit/ConvertUTF.h
diff --git a/linkers/SimpleIni.h b/rtemstoolkit/SimpleIni.h
similarity index 100%
rename from linkers/SimpleIni.h
rename to rtemstoolkit/SimpleIni.h
diff --git a/linkers/elftoolchain/common/Makefile b/rtemstoolkit/elftoolchain/common/Makefile
similarity index 100%
rename from linkers/elftoolchain/common/Makefile
rename to rtemstoolkit/elftoolchain/common/Makefile
diff --git a/linkers/elftoolchain/common/_elftc.h b/rtemstoolkit/elftoolchain/common/_elftc.h
similarity index 100%
rename from linkers/elftoolchain/common/_elftc.h
rename to rtemstoolkit/elftoolchain/common/_elftc.h
diff --git a/linkers/elftoolchain/common/elfdefinitions.h b/rtemstoolkit/elftoolchain/common/elfdefinitions.h
similarity index 100%
rename from linkers/elftoolchain/common/elfdefinitions.h
rename to rtemstoolkit/elftoolchain/common/elfdefinitions.h
diff --git a/linkers/elftoolchain/common/native-elf-format b/rtemstoolkit/elftoolchain/common/native-elf-format
similarity index 100%
rename from linkers/elftoolchain/common/native-elf-format
rename to rtemstoolkit/elftoolchain/common/native-elf-format
diff --git a/linkers/elftoolchain/common/os.Linux.mk b/rtemstoolkit/elftoolchain/common/os.Linux.mk
similarity index 100%
rename from linkers/elftoolchain/common/os.Linux.mk
rename to rtemstoolkit/elftoolchain/common/os.Linux.mk
diff --git a/linkers/elftoolchain/common/uthash.h b/rtemstoolkit/elftoolchain/common/uthash.h
similarity index 100%
rename from linkers/elftoolchain/common/uthash.h
rename to rtemstoolkit/elftoolchain/common/uthash.h
diff --git a/linkers/elftoolchain/libelf/Makefile b/rtemstoolkit/elftoolchain/libelf/Makefile
similarity index 100%
rename from linkers/elftoolchain/libelf/Makefile
rename to rtemstoolkit/elftoolchain/libelf/Makefile
diff --git a/linkers/elftoolchain/libelf/Version.map b/rtemstoolkit/elftoolchain/libelf/Version.map
similarity index 100%
rename from linkers/elftoolchain/libelf/Version.map
rename to rtemstoolkit/elftoolchain/libelf/Version.map
diff --git a/linkers/elftoolchain/libelf/_libelf.h b/rtemstoolkit/elftoolchain/libelf/_libelf.h
similarity index 100%
rename from linkers/elftoolchain/libelf/_libelf.h
rename to rtemstoolkit/elftoolchain/libelf/_libelf.h
diff --git a/linkers/elftoolchain/libelf/_libelf_ar.h b/rtemstoolkit/elftoolchain/libelf/_libelf_ar.h
similarity index 100%
rename from linkers/elftoolchain/libelf/_libelf_ar.h
rename to rtemstoolkit/elftoolchain/libelf/_libelf_ar.h
diff --git a/linkers/elftoolchain/libelf/_libelf_config.h b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
similarity index 100%
rename from linkers/elftoolchain/libelf/_libelf_config.h
rename to rtemstoolkit/elftoolchain/libelf/_libelf_config.h
diff --git a/linkers/elftoolchain/libelf/elf.3 b/rtemstoolkit/elftoolchain/libelf/elf.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf.3
rename to rtemstoolkit/elftoolchain/libelf/elf.3
diff --git a/linkers/elftoolchain/libelf/elf.c b/rtemstoolkit/elftoolchain/libelf/elf.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf.c
rename to rtemstoolkit/elftoolchain/libelf/elf.c
diff --git a/linkers/elftoolchain/libelf/elf_begin.3 b/rtemstoolkit/elftoolchain/libelf/elf_begin.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_begin.3
rename to rtemstoolkit/elftoolchain/libelf/elf_begin.3
diff --git a/linkers/elftoolchain/libelf/elf_begin.c b/rtemstoolkit/elftoolchain/libelf/elf_begin.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_begin.c
rename to rtemstoolkit/elftoolchain/libelf/elf_begin.c
diff --git a/linkers/elftoolchain/libelf/elf_cntl.3 b/rtemstoolkit/elftoolchain/libelf/elf_cntl.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_cntl.3
rename to rtemstoolkit/elftoolchain/libelf/elf_cntl.3
diff --git a/linkers/elftoolchain/libelf/elf_cntl.c b/rtemstoolkit/elftoolchain/libelf/elf_cntl.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_cntl.c
rename to rtemstoolkit/elftoolchain/libelf/elf_cntl.c
diff --git a/linkers/elftoolchain/libelf/elf_data.c b/rtemstoolkit/elftoolchain/libelf/elf_data.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_data.c
rename to rtemstoolkit/elftoolchain/libelf/elf_data.c
diff --git a/linkers/elftoolchain/libelf/elf_end.3 b/rtemstoolkit/elftoolchain/libelf/elf_end.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_end.3
rename to rtemstoolkit/elftoolchain/libelf/elf_end.3
diff --git a/linkers/elftoolchain/libelf/elf_end.c b/rtemstoolkit/elftoolchain/libelf/elf_end.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_end.c
rename to rtemstoolkit/elftoolchain/libelf/elf_end.c
diff --git a/linkers/elftoolchain/libelf/elf_errmsg.3 b/rtemstoolkit/elftoolchain/libelf/elf_errmsg.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_errmsg.3
rename to rtemstoolkit/elftoolchain/libelf/elf_errmsg.3
diff --git a/linkers/elftoolchain/libelf/elf_errmsg.c b/rtemstoolkit/elftoolchain/libelf/elf_errmsg.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_errmsg.c
rename to rtemstoolkit/elftoolchain/libelf/elf_errmsg.c
diff --git a/linkers/elftoolchain/libelf/elf_errno.c b/rtemstoolkit/elftoolchain/libelf/elf_errno.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_errno.c
rename to rtemstoolkit/elftoolchain/libelf/elf_errno.c
diff --git a/linkers/elftoolchain/libelf/elf_fill.3 b/rtemstoolkit/elftoolchain/libelf/elf_fill.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_fill.3
rename to rtemstoolkit/elftoolchain/libelf/elf_fill.3
diff --git a/linkers/elftoolchain/libelf/elf_fill.c b/rtemstoolkit/elftoolchain/libelf/elf_fill.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_fill.c
rename to rtemstoolkit/elftoolchain/libelf/elf_fill.c
diff --git a/linkers/elftoolchain/libelf/elf_flag.c b/rtemstoolkit/elftoolchain/libelf/elf_flag.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_flag.c
rename to rtemstoolkit/elftoolchain/libelf/elf_flag.c
diff --git a/linkers/elftoolchain/libelf/elf_flagdata.3 b/rtemstoolkit/elftoolchain/libelf/elf_flagdata.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_flagdata.3
rename to rtemstoolkit/elftoolchain/libelf/elf_flagdata.3
diff --git a/linkers/elftoolchain/libelf/elf_getarhdr.3 b/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getarhdr.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3
diff --git a/linkers/elftoolchain/libelf/elf_getarhdr.c b/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getarhdr.c
rename to rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c
diff --git a/linkers/elftoolchain/libelf/elf_getarsym.3 b/rtemstoolkit/elftoolchain/libelf/elf_getarsym.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getarsym.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getarsym.3
diff --git a/linkers/elftoolchain/libelf/elf_getarsym.c b/rtemstoolkit/elftoolchain/libelf/elf_getarsym.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getarsym.c
rename to rtemstoolkit/elftoolchain/libelf/elf_getarsym.c
diff --git a/linkers/elftoolchain/libelf/elf_getbase.3 b/rtemstoolkit/elftoolchain/libelf/elf_getbase.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getbase.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getbase.3
diff --git a/linkers/elftoolchain/libelf/elf_getbase.c b/rtemstoolkit/elftoolchain/libelf/elf_getbase.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getbase.c
rename to rtemstoolkit/elftoolchain/libelf/elf_getbase.c
diff --git a/linkers/elftoolchain/libelf/elf_getdata.3 b/rtemstoolkit/elftoolchain/libelf/elf_getdata.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getdata.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getdata.3
diff --git a/linkers/elftoolchain/libelf/elf_getident.3 b/rtemstoolkit/elftoolchain/libelf/elf_getident.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getident.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getident.3
diff --git a/linkers/elftoolchain/libelf/elf_getident.c b/rtemstoolkit/elftoolchain/libelf/elf_getident.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getident.c
rename to rtemstoolkit/elftoolchain/libelf/elf_getident.c
diff --git a/linkers/elftoolchain/libelf/elf_getphdrnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getphdrnum.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3
diff --git a/linkers/elftoolchain/libelf/elf_getphnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getphnum.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getphnum.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getphnum.3
diff --git a/linkers/elftoolchain/libelf/elf_getscn.3 b/rtemstoolkit/elftoolchain/libelf/elf_getscn.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getscn.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getscn.3
diff --git a/linkers/elftoolchain/libelf/elf_getshdrnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getshdrnum.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3
diff --git a/linkers/elftoolchain/libelf/elf_getshdrstrndx.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshdrstrndx.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getshdrstrndx.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getshdrstrndx.3
diff --git a/linkers/elftoolchain/libelf/elf_getshnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshnum.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getshnum.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getshnum.3
diff --git a/linkers/elftoolchain/libelf/elf_getshstrndx.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_getshstrndx.3
rename to rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3
diff --git a/linkers/elftoolchain/libelf/elf_hash.3 b/rtemstoolkit/elftoolchain/libelf/elf_hash.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_hash.3
rename to rtemstoolkit/elftoolchain/libelf/elf_hash.3
diff --git a/linkers/elftoolchain/libelf/elf_hash.c b/rtemstoolkit/elftoolchain/libelf/elf_hash.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_hash.c
rename to rtemstoolkit/elftoolchain/libelf/elf_hash.c
diff --git a/linkers/elftoolchain/libelf/elf_kind.3 b/rtemstoolkit/elftoolchain/libelf/elf_kind.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_kind.3
rename to rtemstoolkit/elftoolchain/libelf/elf_kind.3
diff --git a/linkers/elftoolchain/libelf/elf_kind.c b/rtemstoolkit/elftoolchain/libelf/elf_kind.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_kind.c
rename to rtemstoolkit/elftoolchain/libelf/elf_kind.c
diff --git a/linkers/elftoolchain/libelf/elf_memory.3 b/rtemstoolkit/elftoolchain/libelf/elf_memory.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_memory.3
rename to rtemstoolkit/elftoolchain/libelf/elf_memory.3
diff --git a/linkers/elftoolchain/libelf/elf_memory.c b/rtemstoolkit/elftoolchain/libelf/elf_memory.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_memory.c
rename to rtemstoolkit/elftoolchain/libelf/elf_memory.c
diff --git a/linkers/elftoolchain/libelf/elf_next.3 b/rtemstoolkit/elftoolchain/libelf/elf_next.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_next.3
rename to rtemstoolkit/elftoolchain/libelf/elf_next.3
diff --git a/linkers/elftoolchain/libelf/elf_next.c b/rtemstoolkit/elftoolchain/libelf/elf_next.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_next.c
rename to rtemstoolkit/elftoolchain/libelf/elf_next.c
diff --git a/linkers/elftoolchain/libelf/elf_phnum.c b/rtemstoolkit/elftoolchain/libelf/elf_phnum.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_phnum.c
rename to rtemstoolkit/elftoolchain/libelf/elf_phnum.c
diff --git a/linkers/elftoolchain/libelf/elf_rand.3 b/rtemstoolkit/elftoolchain/libelf/elf_rand.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_rand.3
rename to rtemstoolkit/elftoolchain/libelf/elf_rand.3
diff --git a/linkers/elftoolchain/libelf/elf_rand.c b/rtemstoolkit/elftoolchain/libelf/elf_rand.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_rand.c
rename to rtemstoolkit/elftoolchain/libelf/elf_rand.c
diff --git a/linkers/elftoolchain/libelf/elf_rawfile.3 b/rtemstoolkit/elftoolchain/libelf/elf_rawfile.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_rawfile.3
rename to rtemstoolkit/elftoolchain/libelf/elf_rawfile.3
diff --git a/linkers/elftoolchain/libelf/elf_rawfile.c b/rtemstoolkit/elftoolchain/libelf/elf_rawfile.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_rawfile.c
rename to rtemstoolkit/elftoolchain/libelf/elf_rawfile.c
diff --git a/linkers/elftoolchain/libelf/elf_scn.c b/rtemstoolkit/elftoolchain/libelf/elf_scn.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_scn.c
rename to rtemstoolkit/elftoolchain/libelf/elf_scn.c
diff --git a/linkers/elftoolchain/libelf/elf_shnum.c b/rtemstoolkit/elftoolchain/libelf/elf_shnum.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_shnum.c
rename to rtemstoolkit/elftoolchain/libelf/elf_shnum.c
diff --git a/linkers/elftoolchain/libelf/elf_shstrndx.c b/rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_shstrndx.c
rename to rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c
diff --git a/linkers/elftoolchain/libelf/elf_strptr.3 b/rtemstoolkit/elftoolchain/libelf/elf_strptr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_strptr.3
rename to rtemstoolkit/elftoolchain/libelf/elf_strptr.3
diff --git a/linkers/elftoolchain/libelf/elf_strptr.c b/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_strptr.c
rename to rtemstoolkit/elftoolchain/libelf/elf_strptr.c
diff --git a/linkers/elftoolchain/libelf/elf_types.m4 b/rtemstoolkit/elftoolchain/libelf/elf_types.m4
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_types.m4
rename to rtemstoolkit/elftoolchain/libelf/elf_types.m4
diff --git a/linkers/elftoolchain/libelf/elf_update.3 b/rtemstoolkit/elftoolchain/libelf/elf_update.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_update.3
rename to rtemstoolkit/elftoolchain/libelf/elf_update.3
diff --git a/linkers/elftoolchain/libelf/elf_update.c b/rtemstoolkit/elftoolchain/libelf/elf_update.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_update.c
rename to rtemstoolkit/elftoolchain/libelf/elf_update.c
diff --git a/linkers/elftoolchain/libelf/elf_version.3 b/rtemstoolkit/elftoolchain/libelf/elf_version.3
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_version.3
rename to rtemstoolkit/elftoolchain/libelf/elf_version.3
diff --git a/linkers/elftoolchain/libelf/elf_version.c b/rtemstoolkit/elftoolchain/libelf/elf_version.c
similarity index 100%
rename from linkers/elftoolchain/libelf/elf_version.c
rename to rtemstoolkit/elftoolchain/libelf/elf_version.c
diff --git a/linkers/elftoolchain/libelf/gelf.3 b/rtemstoolkit/elftoolchain/libelf/gelf.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf.3
rename to rtemstoolkit/elftoolchain/libelf/gelf.3
diff --git a/linkers/elftoolchain/libelf/gelf.h b/rtemstoolkit/elftoolchain/libelf/gelf.h
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf.h
rename to rtemstoolkit/elftoolchain/libelf/gelf.h
diff --git a/linkers/elftoolchain/libelf/gelf_cap.c b/rtemstoolkit/elftoolchain/libelf/gelf_cap.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_cap.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_cap.c
diff --git a/linkers/elftoolchain/libelf/gelf_checksum.3 b/rtemstoolkit/elftoolchain/libelf/gelf_checksum.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_checksum.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_checksum.3
diff --git a/linkers/elftoolchain/libelf/gelf_checksum.c b/rtemstoolkit/elftoolchain/libelf/gelf_checksum.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_checksum.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_checksum.c
diff --git a/linkers/elftoolchain/libelf/gelf_dyn.c b/rtemstoolkit/elftoolchain/libelf/gelf_dyn.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_dyn.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_dyn.c
diff --git a/linkers/elftoolchain/libelf/gelf_ehdr.c b/rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_ehdr.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c
diff --git a/linkers/elftoolchain/libelf/gelf_fsize.3 b/rtemstoolkit/elftoolchain/libelf/gelf_fsize.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_fsize.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_fsize.3
diff --git a/linkers/elftoolchain/libelf/gelf_fsize.c b/rtemstoolkit/elftoolchain/libelf/gelf_fsize.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_fsize.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_fsize.c
diff --git a/linkers/elftoolchain/libelf/gelf_getcap.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getcap.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getcap.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getcap.3
diff --git a/linkers/elftoolchain/libelf/gelf_getclass.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getclass.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getclass.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getclass.3
diff --git a/linkers/elftoolchain/libelf/gelf_getclass.c b/rtemstoolkit/elftoolchain/libelf/gelf_getclass.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getclass.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_getclass.c
diff --git a/linkers/elftoolchain/libelf/gelf_getdyn.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getdyn.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3
diff --git a/linkers/elftoolchain/libelf/gelf_getehdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getehdr.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3
diff --git a/linkers/elftoolchain/libelf/gelf_getmove.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getmove.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getmove.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getmove.3
diff --git a/linkers/elftoolchain/libelf/gelf_getphdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getphdr.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3
diff --git a/linkers/elftoolchain/libelf/gelf_getrel.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getrel.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getrel.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getrel.3
diff --git a/linkers/elftoolchain/libelf/gelf_getrela.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getrela.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getrela.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getrela.3
diff --git a/linkers/elftoolchain/libelf/gelf_getshdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getshdr.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3
diff --git a/linkers/elftoolchain/libelf/gelf_getsym.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getsym.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getsym.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getsym.3
diff --git a/linkers/elftoolchain/libelf/gelf_getsyminfo.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getsyminfo.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3
diff --git a/linkers/elftoolchain/libelf/gelf_getsymshndx.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getsymshndx.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_getsymshndx.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_getsymshndx.3
diff --git a/linkers/elftoolchain/libelf/gelf_move.c b/rtemstoolkit/elftoolchain/libelf/gelf_move.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_move.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_move.c
diff --git a/linkers/elftoolchain/libelf/gelf_newehdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_newehdr.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3
diff --git a/linkers/elftoolchain/libelf/gelf_newphdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_newphdr.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3
diff --git a/linkers/elftoolchain/libelf/gelf_phdr.c b/rtemstoolkit/elftoolchain/libelf/gelf_phdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_phdr.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_phdr.c
diff --git a/linkers/elftoolchain/libelf/gelf_rel.c b/rtemstoolkit/elftoolchain/libelf/gelf_rel.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_rel.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_rel.c
diff --git a/linkers/elftoolchain/libelf/gelf_rela.c b/rtemstoolkit/elftoolchain/libelf/gelf_rela.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_rela.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_rela.c
diff --git a/linkers/elftoolchain/libelf/gelf_shdr.c b/rtemstoolkit/elftoolchain/libelf/gelf_shdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_shdr.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_shdr.c
diff --git a/linkers/elftoolchain/libelf/gelf_sym.c b/rtemstoolkit/elftoolchain/libelf/gelf_sym.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_sym.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_sym.c
diff --git a/linkers/elftoolchain/libelf/gelf_syminfo.c b/rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_syminfo.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c
diff --git a/linkers/elftoolchain/libelf/gelf_symshndx.c b/rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_symshndx.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c
diff --git a/linkers/elftoolchain/libelf/gelf_update_ehdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_update_ehdr.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_update_ehdr.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_update_ehdr.3
diff --git a/linkers/elftoolchain/libelf/gelf_xlate.c b/rtemstoolkit/elftoolchain/libelf/gelf_xlate.c
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_xlate.c
rename to rtemstoolkit/elftoolchain/libelf/gelf_xlate.c
diff --git a/linkers/elftoolchain/libelf/gelf_xlatetof.3 b/rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3
similarity index 100%
rename from linkers/elftoolchain/libelf/gelf_xlatetof.3
rename to rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3
diff --git a/linkers/elftoolchain/libelf/libelf.h b/rtemstoolkit/elftoolchain/libelf/libelf.h
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf.h
rename to rtemstoolkit/elftoolchain/libelf/libelf.h
diff --git a/linkers/elftoolchain/libelf/libelf_align.c b/rtemstoolkit/elftoolchain/libelf/libelf_align.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_align.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_align.c
diff --git a/linkers/elftoolchain/libelf/libelf_allocate.c b/rtemstoolkit/elftoolchain/libelf/libelf_allocate.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_allocate.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_allocate.c
diff --git a/linkers/elftoolchain/libelf/libelf_ar.c b/rtemstoolkit/elftoolchain/libelf/libelf_ar.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_ar.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_ar.c
diff --git a/linkers/elftoolchain/libelf/libelf_ar_util.c b/rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_ar_util.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c
diff --git a/linkers/elftoolchain/libelf/libelf_checksum.c b/rtemstoolkit/elftoolchain/libelf/libelf_checksum.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_checksum.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_checksum.c
diff --git a/linkers/elftoolchain/libelf/libelf_convert.m4 b/rtemstoolkit/elftoolchain/libelf/libelf_convert.m4
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_convert.m4
rename to rtemstoolkit/elftoolchain/libelf/libelf_convert.m4
diff --git a/linkers/elftoolchain/libelf/libelf_data.c b/rtemstoolkit/elftoolchain/libelf/libelf_data.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_data.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_data.c
diff --git a/linkers/elftoolchain/libelf/libelf_ehdr.c b/rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_ehdr.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c
diff --git a/linkers/elftoolchain/libelf/libelf_extended.c b/rtemstoolkit/elftoolchain/libelf/libelf_extended.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_extended.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_extended.c
diff --git a/linkers/elftoolchain/libelf/libelf_fsize.m4 b/rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_fsize.m4
rename to rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4
diff --git a/linkers/elftoolchain/libelf/libelf_msize.m4 b/rtemstoolkit/elftoolchain/libelf/libelf_msize.m4
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_msize.m4
rename to rtemstoolkit/elftoolchain/libelf/libelf_msize.m4
diff --git a/linkers/elftoolchain/libelf/libelf_phdr.c b/rtemstoolkit/elftoolchain/libelf/libelf_phdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_phdr.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_phdr.c
diff --git a/linkers/elftoolchain/libelf/libelf_shdr.c b/rtemstoolkit/elftoolchain/libelf/libelf_shdr.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_shdr.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_shdr.c
diff --git a/linkers/elftoolchain/libelf/libelf_xlate.c b/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c
similarity index 100%
rename from linkers/elftoolchain/libelf/libelf_xlate.c
rename to rtemstoolkit/elftoolchain/libelf/libelf_xlate.c
diff --git a/linkers/elftoolchain/libelf/mmap_win32.c b/rtemstoolkit/elftoolchain/libelf/mmap_win32.c
similarity index 100%
rename from linkers/elftoolchain/libelf/mmap_win32.c
rename to rtemstoolkit/elftoolchain/libelf/mmap_win32.c
diff --git a/linkers/elftoolchain/libelf/os.FreeBSD.mk b/rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk
similarity index 100%
rename from linkers/elftoolchain/libelf/os.FreeBSD.mk
rename to rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk
diff --git a/linkers/elftoolchain/libelf/os.NetBSD.mk b/rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk
similarity index 100%
rename from linkers/elftoolchain/libelf/os.NetBSD.mk
rename to rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk
diff --git a/linkers/fastlz.c b/rtemstoolkit/fastlz.c
similarity index 100%
rename from linkers/fastlz.c
rename to rtemstoolkit/fastlz.c
diff --git a/linkers/fastlz.h b/rtemstoolkit/fastlz.h
similarity index 100%
rename from linkers/fastlz.h
rename to rtemstoolkit/fastlz.h
diff --git a/linkers/libiberty/ansidecl.h b/rtemstoolkit/libiberty/ansidecl.h
similarity index 100%
rename from linkers/libiberty/ansidecl.h
rename to rtemstoolkit/libiberty/ansidecl.h
diff --git a/linkers/libiberty/concat.c b/rtemstoolkit/libiberty/concat.c
similarity index 100%
rename from linkers/libiberty/concat.c
rename to rtemstoolkit/libiberty/concat.c
diff --git a/linkers/libiberty/cp-demangle.c b/rtemstoolkit/libiberty/cp-demangle.c
similarity index 100%
rename from linkers/libiberty/cp-demangle.c
rename to rtemstoolkit/libiberty/cp-demangle.c
diff --git a/linkers/libiberty/cp-demangle.h b/rtemstoolkit/libiberty/cp-demangle.h
similarity index 100%
rename from linkers/libiberty/cp-demangle.h
rename to rtemstoolkit/libiberty/cp-demangle.h
diff --git a/linkers/libiberty/cplus-dem.c b/rtemstoolkit/libiberty/cplus-dem.c
similarity index 100%
rename from linkers/libiberty/cplus-dem.c
rename to rtemstoolkit/libiberty/cplus-dem.c
diff --git a/linkers/libiberty/demangle.h b/rtemstoolkit/libiberty/demangle.h
similarity index 100%
rename from linkers/libiberty/demangle.h
rename to rtemstoolkit/libiberty/demangle.h
diff --git a/linkers/libiberty/libiberty.h b/rtemstoolkit/libiberty/libiberty.h
similarity index 100%
rename from linkers/libiberty/libiberty.h
rename to rtemstoolkit/libiberty/libiberty.h
diff --git a/linkers/libiberty/make-temp-file.c b/rtemstoolkit/libiberty/make-temp-file.c
similarity index 100%
rename from linkers/libiberty/make-temp-file.c
rename to rtemstoolkit/libiberty/make-temp-file.c
diff --git a/linkers/libiberty/mkstemps.c b/rtemstoolkit/libiberty/mkstemps.c
similarity index 100%
rename from linkers/libiberty/mkstemps.c
rename to rtemstoolkit/libiberty/mkstemps.c
diff --git a/linkers/libiberty/pex-common.c b/rtemstoolkit/libiberty/pex-common.c
similarity index 100%
rename from linkers/libiberty/pex-common.c
rename to rtemstoolkit/libiberty/pex-common.c
diff --git a/linkers/libiberty/pex-common.h b/rtemstoolkit/libiberty/pex-common.h
similarity index 100%
rename from linkers/libiberty/pex-common.h
rename to rtemstoolkit/libiberty/pex-common.h
diff --git a/linkers/libiberty/pex-djgpp.c b/rtemstoolkit/libiberty/pex-djgpp.c
similarity index 100%
rename from linkers/libiberty/pex-djgpp.c
rename to rtemstoolkit/libiberty/pex-djgpp.c
diff --git a/linkers/libiberty/pex-msdos.c b/rtemstoolkit/libiberty/pex-msdos.c
similarity index 100%
rename from linkers/libiberty/pex-msdos.c
rename to rtemstoolkit/libiberty/pex-msdos.c
diff --git a/linkers/libiberty/pex-one.c b/rtemstoolkit/libiberty/pex-one.c
similarity index 100%
rename from linkers/libiberty/pex-one.c
rename to rtemstoolkit/libiberty/pex-one.c
diff --git a/linkers/libiberty/pex-unix.c b/rtemstoolkit/libiberty/pex-unix.c
similarity index 100%
rename from linkers/libiberty/pex-unix.c
rename to rtemstoolkit/libiberty/pex-unix.c
diff --git a/linkers/libiberty/pex-win32.c b/rtemstoolkit/libiberty/pex-win32.c
similarity index 100%
rename from linkers/libiberty/pex-win32.c
rename to rtemstoolkit/libiberty/pex-win32.c
diff --git a/linkers/libiberty/safe-ctype.c b/rtemstoolkit/libiberty/safe-ctype.c
similarity index 100%
rename from linkers/libiberty/safe-ctype.c
rename to rtemstoolkit/libiberty/safe-ctype.c
diff --git a/linkers/libiberty/safe-ctype.h b/rtemstoolkit/libiberty/safe-ctype.h
similarity index 100%
rename from linkers/libiberty/safe-ctype.h
rename to rtemstoolkit/libiberty/safe-ctype.h
diff --git a/linkers/libiberty/stpcpy.c b/rtemstoolkit/libiberty/stpcpy.c
similarity index 100%
rename from linkers/libiberty/stpcpy.c
rename to rtemstoolkit/libiberty/stpcpy.c
diff --git a/linkers/pkgconfig.cpp b/rtemstoolkit/pkgconfig.cpp
similarity index 100%
rename from linkers/pkgconfig.cpp
rename to rtemstoolkit/pkgconfig.cpp
diff --git a/linkers/pkgconfig.h b/rtemstoolkit/pkgconfig.h
similarity index 100%
rename from linkers/pkgconfig.h
rename to rtemstoolkit/pkgconfig.h
diff --git a/linkers/rld-cc.cpp b/rtemstoolkit/rld-cc.cpp
similarity index 100%
rename from linkers/rld-cc.cpp
rename to rtemstoolkit/rld-cc.cpp
diff --git a/linkers/rld-cc.h b/rtemstoolkit/rld-cc.h
similarity index 100%
rename from linkers/rld-cc.h
rename to rtemstoolkit/rld-cc.h
diff --git a/linkers/rld-compression.cpp b/rtemstoolkit/rld-compression.cpp
similarity index 100%
rename from linkers/rld-compression.cpp
rename to rtemstoolkit/rld-compression.cpp
diff --git a/linkers/rld-compression.h b/rtemstoolkit/rld-compression.h
similarity index 100%
rename from linkers/rld-compression.h
rename to rtemstoolkit/rld-compression.h
diff --git a/linkers/rld-config.cpp b/rtemstoolkit/rld-config.cpp
similarity index 100%
rename from linkers/rld-config.cpp
rename to rtemstoolkit/rld-config.cpp
diff --git a/linkers/rld-config.h b/rtemstoolkit/rld-config.h
similarity index 100%
rename from linkers/rld-config.h
rename to rtemstoolkit/rld-config.h
diff --git a/linkers/rld-elf-types.h b/rtemstoolkit/rld-elf-types.h
similarity index 100%
rename from linkers/rld-elf-types.h
rename to rtemstoolkit/rld-elf-types.h
diff --git a/linkers/rld-elf.cpp b/rtemstoolkit/rld-elf.cpp
similarity index 100%
rename from linkers/rld-elf.cpp
rename to rtemstoolkit/rld-elf.cpp
diff --git a/linkers/rld-elf.h b/rtemstoolkit/rld-elf.h
similarity index 100%
rename from linkers/rld-elf.h
rename to rtemstoolkit/rld-elf.h
diff --git a/linkers/rld-files.cpp b/rtemstoolkit/rld-files.cpp
similarity index 100%
rename from linkers/rld-files.cpp
rename to rtemstoolkit/rld-files.cpp
diff --git a/linkers/rld-files.h b/rtemstoolkit/rld-files.h
similarity index 100%
rename from linkers/rld-files.h
rename to rtemstoolkit/rld-files.h
diff --git a/linkers/rld-outputter.cpp b/rtemstoolkit/rld-outputter.cpp
similarity index 100%
rename from linkers/rld-outputter.cpp
rename to rtemstoolkit/rld-outputter.cpp
diff --git a/linkers/rld-outputter.h b/rtemstoolkit/rld-outputter.h
similarity index 100%
rename from linkers/rld-outputter.h
rename to rtemstoolkit/rld-outputter.h
diff --git a/linkers/rld-path.cpp b/rtemstoolkit/rld-path.cpp
similarity index 100%
rename from linkers/rld-path.cpp
rename to rtemstoolkit/rld-path.cpp
diff --git a/linkers/rld-path.h b/rtemstoolkit/rld-path.h
similarity index 100%
rename from linkers/rld-path.h
rename to rtemstoolkit/rld-path.h
diff --git a/linkers/rld-process.cpp b/rtemstoolkit/rld-process.cpp
similarity index 100%
rename from linkers/rld-process.cpp
rename to rtemstoolkit/rld-process.cpp
diff --git a/linkers/rld-process.h b/rtemstoolkit/rld-process.h
similarity index 100%
rename from linkers/rld-process.h
rename to rtemstoolkit/rld-process.h
diff --git a/linkers/rld-rap.cpp b/rtemstoolkit/rld-rap.cpp
similarity index 100%
rename from linkers/rld-rap.cpp
rename to rtemstoolkit/rld-rap.cpp
diff --git a/linkers/rld-rap.h b/rtemstoolkit/rld-rap.h
similarity index 100%
rename from linkers/rld-rap.h
rename to rtemstoolkit/rld-rap.h
diff --git a/linkers/rld-resolver.cpp b/rtemstoolkit/rld-resolver.cpp
similarity index 100%
rename from linkers/rld-resolver.cpp
rename to rtemstoolkit/rld-resolver.cpp
diff --git a/linkers/rld-resolver.h b/rtemstoolkit/rld-resolver.h
similarity index 100%
rename from linkers/rld-resolver.h
rename to rtemstoolkit/rld-resolver.h
diff --git a/linkers/rld-rtems.cpp b/rtemstoolkit/rld-rtems.cpp
similarity index 100%
rename from linkers/rld-rtems.cpp
rename to rtemstoolkit/rld-rtems.cpp
diff --git a/linkers/rld-rtems.h b/rtemstoolkit/rld-rtems.h
similarity index 100%
rename from linkers/rld-rtems.h
rename to rtemstoolkit/rld-rtems.h
diff --git a/linkers/rld-symbols.cpp b/rtemstoolkit/rld-symbols.cpp
similarity index 100%
rename from linkers/rld-symbols.cpp
rename to rtemstoolkit/rld-symbols.cpp
diff --git a/linkers/rld-symbols.h b/rtemstoolkit/rld-symbols.h
similarity index 100%
rename from linkers/rld-symbols.h
rename to rtemstoolkit/rld-symbols.h
diff --git a/linkers/rld.cpp b/rtemstoolkit/rld.cpp
similarity index 100%
rename from linkers/rld.cpp
rename to rtemstoolkit/rld.cpp
diff --git a/linkers/rld.h b/rtemstoolkit/rld.h
similarity index 100%
rename from linkers/rld.h
rename to rtemstoolkit/rld.h
diff --git a/linkers/rtems-utils.cpp b/rtemstoolkit/rtems-utils.cpp
similarity index 100%
rename from linkers/rtems-utils.cpp
rename to rtemstoolkit/rtems-utils.cpp
diff --git a/linkers/rtems-utils.h b/rtemstoolkit/rtems-utils.h
similarity index 100%
rename from linkers/rtems-utils.h
rename to rtemstoolkit/rtems-utils.h
diff --git a/rtemstoolkit/wscript b/rtemstoolkit/wscript
new file mode 100644
index 0000000..80d80ec
--- /dev/null
+++ b/rtemstoolkit/wscript
@@ -0,0 +1,261 @@
+#
+# RTEMS Toolkit build script.
+#
+import sys
+
+version_major = 1
+version_minor = 0
+version_revision = 0
+
+#
+# Waf system setup. Allow more than one build in the same tree.
+#
+top = '.'
+out = 'build-' + sys.platform
+
+def options(opt):
+    opt.load("g++")
+    opt.load("gcc")
+
+def configure(conf):
+    conf.load("g++")
+    conf.load("gcc")
+    conf_libiberty(conf)
+    conf_libelf(conf)
+
+    conf.check(header_name='sys/wait.h',  features = 'c', mandatory = False)
+    conf.check_cc(function_name='kill', header_name="signal.h",
+                  features = 'c', mandatory = False)
+    conf.write_config_header('config.h')
+
+def build(bld):
+    #
+    # The local configuration.
+    #
+    conf = {}
+
+    #
+    # The include paths.
+    #
+    conf['includes'] = ['elftoolchain/libelf', 'elftoolchain/common', 'libiberty']
+    if sys.platform == 'win32':
+        conf['includes'] += ['win32']
+
+    #
+    # Build flags.
+    #
+    conf['warningflags'] = ['-Wall', '-Wextra', '-pedantic']
+    conf['optflags'] = bld.env.C_OPTS
+    conf['cflags'] = ['-pipe', '-g'] + conf['optflags']
+    conf['cxxflags'] = ['-pipe', '-g'] + conf['optflags']
+    conf['linkflags'] = ['-g']
+
+    #
+    # Create each of the modules as object files each with their own
+    # configurations.
+    #
+    bld_fastlz(bld, conf)
+    bld_libelf(bld, conf)
+    bld_libiberty(bld, conf)
+
+    #
+    # RLD source.
+    #
+    rld_source = ['ConvertUTF.c',
+                  'pkgconfig.cpp',
+                  'rld-config.cpp',
+                  'rld-elf.cpp',
+                  'rld-files.cpp',
+                  'rld-cc.cpp',
+                  'rld-compression.cpp',
+                  'rld-outputter.cpp',
+                  'rld-path.cpp',
+                  'rld-process.cpp',
+                  'rld-resolver.cpp',
+                  'rld-rtems.cpp',
+                  'rld-symbols.cpp',
+                  'rld-rap.cpp',
+                  'rld.cpp']
+
+    #
+    # RTEMS Utilities.
+    #
+    rtems_utils = ['rtems-utils.cpp']
+
+    #
+    # RTL static library
+    #
+    bld.stlib(target = 'rld',
+              install_path = None,
+              source = rld_source + rtems_utils,
+              defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION],
+              includes = ['.'] + conf['includes'],
+              cflags = conf['cflags'] + conf['warningflags'],
+              cxxflags = conf['cxxflags'] + conf['warningflags'],
+              linkflags = conf['linkflags'])
+
+def rebuild(ctx):
+    import waflib.Options
+    waflib.Options.commands.extend(['clean', 'build'])
+
+def tags(ctx):
+    ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)
+
+#
+# Libelf module.
+#
+def conf_libelf(conf):
+    pass
+
+def bld_fastlz(bld, conf):
+    bld(target = 'fastlz',
+        features = 'c',
+        source = 'fastlz.c',
+        cflags = conf['cflags'],
+        defines = ['FASTLZ_LEVEL=1'])
+
+def bld_libelf(bld, conf):
+    libelf = 'elftoolchain/libelf/'
+
+    #
+    # Work around the ${SRC} having Windows slashes which the MSYS m4 does not
+    # understand.
+    #
+    if sys.platform == 'win32':
+        m4_rule = 'type ${SRC} | m4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + '> ${TGT}"'
+        includes = ['win32']
+    else:
+        m4_rule = 'm4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + ' ${SRC} > ${TGT}'
+        includes = []
+
+    bld(target = 'libelf_convert.c', source = libelf + 'libelf_convert.m4', rule = m4_rule)
+    bld(target = 'libelf_fsize.c',   source = libelf + 'libelf_fsize.m4',   rule = m4_rule)
+    bld(target = 'libelf_msize.c',   source = libelf + 'libelf_msize.m4',   rule = m4_rule)
+
+    host_source = []
+
+    if sys.platform == 'linux2':
+        common = 'elftoolchain/common/'
+        bld(target = common + 'native-elf-format.h',
+            source = common + 'native-elf-format',
+            name = 'native-elf-format',
+            rule   = './${SRC} > ${TGT}')
+        bld.add_group ()
+    elif sys.platform == 'win32':
+        host_source += [libelf + 'mmap_win32.c']
+
+    bld.stlib(target = 'elf',
+              features = 'c',
+              install_path = None,
+              uses = ['native-elf-format'],
+              includes = [bld.bldnode.abspath(), 'elftoolchain/libelf', 'elftoolchain/common'] + includes,
+              cflags = conf['cflags'],
+              source =[libelf + 'elf.c',
+                       libelf + 'elf_begin.c',
+                       libelf + 'elf_cntl.c',
+                       libelf + 'elf_end.c',
+                       libelf + 'elf_errmsg.c',
+                       libelf + 'elf_errno.c',
+                       libelf + 'elf_data.c',
+                       libelf + 'elf_fill.c',
+                       libelf + 'elf_flag.c',
+                       libelf + 'elf_getarhdr.c',
+                       libelf + 'elf_getarsym.c',
+                       libelf + 'elf_getbase.c',
+                       libelf + 'elf_getident.c',
+                       libelf + 'elf_hash.c',
+                       libelf + 'elf_kind.c',
+                       libelf + 'elf_memory.c',
+                       libelf + 'elf_next.c',
+                       libelf + 'elf_rand.c',
+                       libelf + 'elf_rawfile.c',
+                       libelf + 'elf_phnum.c',
+                       libelf + 'elf_shnum.c',
+                       libelf + 'elf_shstrndx.c',
+                       libelf + 'elf_scn.c',
+                       libelf + 'elf_strptr.c',
+                       libelf + 'elf_update.c',
+                       libelf + 'elf_version.c',
+                       libelf + 'gelf_cap.c',
+                       libelf + 'gelf_checksum.c',
+                       libelf + 'gelf_dyn.c',
+                       libelf + 'gelf_ehdr.c',
+                       libelf + 'gelf_getclass.c',
+                       libelf + 'gelf_fsize.c',
+                       libelf + 'gelf_move.c',
+                       libelf + 'gelf_phdr.c',
+                       libelf + 'gelf_rel.c',
+                       libelf + 'gelf_rela.c',
+                       libelf + 'gelf_shdr.c',
+                       libelf + 'gelf_sym.c',
+                       libelf + 'gelf_syminfo.c',
+                       libelf + 'gelf_symshndx.c',
+                       libelf + 'gelf_xlate.c',
+                       libelf + 'libelf_align.c',
+                       libelf + 'libelf_allocate.c',
+                       libelf + 'libelf_ar.c',
+                       libelf + 'libelf_ar_util.c',
+                       libelf + 'libelf_checksum.c',
+                       libelf + 'libelf_data.c',
+                       libelf + 'libelf_ehdr.c',
+                       libelf + 'libelf_extended.c',
+                       libelf + 'libelf_phdr.c',
+                       libelf + 'libelf_shdr.c',
+                       libelf + 'libelf_xlate.c',
+                       'libelf_convert.c',
+                       'libelf_fsize.c',
+                       'libelf_msize.c'] + host_source)
+
+#
+# Libiberty module.
+#
+def conf_libiberty(conf):
+    conf.check(header_name='alloca.h',    features = 'c', mandatory = False)
+    conf.check(header_name='fcntl.h',     features = 'c', mandatory = False)
+    conf.check(header_name='process.h',   features = 'c', mandatory = False)
+    conf.check(header_name='stdlib.h',    features = 'c')
+    conf.check(header_name='string.h',    features = 'c')
+    conf.check(header_name='strings.h',   features = 'c', mandatory = False)
+    conf.check(header_name='sys/file.h',  features = 'c', mandatory = False)
+    conf.check(header_name='sys/stat.h',  features = 'c', mandatory = False)
+    conf.check(header_name='sys/time.h',  features = 'c', mandatory = False)
+    conf.check(header_name='sys/types.h', features = 'c', mandatory = False)
+    conf.check(header_name='sys/wait.h',  features = 'c', mandatory = False)
+    conf.check(header_name='unistd.h',    features = 'c', mandatory = False)
+    conf.check(header_name='vfork.h',     features = 'c', mandatory = False)
+
+    conf.check_cc(function_name='getrusage',
+                  header_name="sys/time.h sys/resource.h",
+                  features = 'c', mandatory = False)
+
+    conf.write_config_header('libiberty/config.h')
+
+def bld_libiberty(bld, conf):
+    if sys.platform == 'win32':
+        pex_host = 'libiberty/pex-win32.c'
+    else:
+        pex_host = 'libiberty/pex-unix.c'
+    bld.stlib(target = 'iberty',
+              features = 'c',
+              install_path = None,
+              includes = ['libiberty'],
+              cflags = conf['cflags'],
+              defines = ['HAVE_CONFIG_H=1'],
+              source =['libiberty/concat.c',
+                       'libiberty/cplus-dem.c',
+                       'libiberty/cp-demangle.c',
+                       'libiberty/make-temp-file.c',
+                       'libiberty/mkstemps.c',
+                       'libiberty/safe-ctype.c',
+                       'libiberty/stpcpy.c',
+                       'libiberty/pex-common.c',
+                       'libiberty/pex-one.c',
+                       pex_host])
+
+#
+# The doxy command.
+#
+from waflib import Build
+class doxy(Build.BuildContext):
+    fun = 'build'
+    cmd = 'doxy'
diff --git a/wscript b/wscript
index 8cefb93..edfa91f 100644
--- a/wscript
+++ b/wscript
@@ -28,7 +28,8 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-subdirs = ['linkers',
+subdirs = ['rtemstoolkit',
+           'linkers',
            'tester',
            'tools/gdb/python']
 
@@ -37,9 +38,23 @@ def recurse(ctx):
         ctx.recurse(sd)
 
 def options(ctx):
+    ctx.add_option('--rtems-version',
+                   default = '4.11',
+                   dest='rtems_version',
+                   help = 'Set the RTEMS version')
+    ctx.add_option('--c-opts',
+                   default = '-O2',
+                   dest='c_opts',
+                   help = 'Set build options, default: -O2.')
     recurse(ctx)
 
 def configure(ctx):
+    try:
+        ctx.load("doxygen", tooldir = 'waf-tools')
+    except:
+        pass
+    ctx.env.C_OPTS = ctx.options.c_opts.split(',')
+    ctx.env.RTEMS_VERSION = ctx.options.rtems_version
     recurse(ctx)
 
 def build(ctx):
@@ -50,3 +65,15 @@ def install(ctx):
 
 def clean(ctx):
     recurse(ctx)
+
+def rebuild(ctx):
+    import waflib.Options
+    waflib.Options.commands.extend(['clean', 'build'])
+
+#
+# The doxy command.
+#
+from waflib import Build
+class doxy(Build.BuildContext):
+    fun = 'build'
+    cmd = 'doxy'



More information about the vc mailing list