Index: linkers/rld-cc.cpp
===================================================================
--- linkers/rld-cc.cpp	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld-cc.cpp	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -31,5 +31,10 @@
     static bool        cc_set;          //< True when the CC has been set.
     static std::string cc_name = "gcc"; //< The CC name, ie gcc, clang.
-    static std::string exec_prefix;     //< The CC executable prefix.
+
+    static std::string ld;              //< The LD executable as absolute path.
+    static bool        ld_set;          //< True when the LD has been set.
+    static std::string ld_name = "gcc"; //< The LD name, ie gcc, clang.
+
+    static std::string exec_prefix;     //< The CC/LD executable prefix.
 
     static std::string cppflags;        //< The CPP flags.
@@ -251,4 +256,23 @@
 
     void
+    set_ld (const std::string& ld_)
+    {
+      ld = ld_;
+      ld_set = true;
+    }
+
+    const std::string
+    get_ld ()
+    {
+      return ld;
+    }
+
+    bool
+    is_ld_set ()
+    {
+      return ld_set;
+    }
+
+    void
     set_exec_prefix (const std::string& exec_prefix_)
     {
@@ -419,9 +443,30 @@
        * Use the absolute path to CC if provided.
        */
-      if (!cc.empty ())
+      if (is_cc_set ())
+      {
         args.push_back (cc);
+      }
       else
       {
         std::string cmd = cc_name;
+        if (!exec_prefix.empty ())
+          cmd = exec_prefix + "-rtems" + rld::rtems::version () + '-' + cmd;
+        args.push_back (cmd);
+      }
+    }
+
+    void
+    make_ld_command (rld::process::arg_container& args)
+    {
+      /*
+       * Use the absolute path to LD if provided.
+       */
+      if (is_ld_set ())
+      {
+        args.push_back (get_ld ());
+      }
+      else
+      {
+        std::string cmd = ld_name;
         if (!exec_prefix.empty ())
           cmd = exec_prefix + "-rtems" + rld::rtems::version () + '-' + cmd;
Index: linkers/rld-cc.h
===================================================================
--- linkers/rld-cc.h	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld-cc.h	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -122,4 +122,19 @@
 
     /**
+     * Set LD. The exec-prefix is ignored if this is set.
+     */
+    void set_ld (const std::string& ld);
+
+    /**
+     * Get the LD.
+     */
+    const std::string get_ld ();
+
+    /**
+     * Is the LD set ?
+     */
+    bool is_ld_set ();
+
+    /**
      * Set the exec-prefix. If CC is set the exec-prefix is ignored.
      */
@@ -179,4 +194,9 @@
 
     /**
+     * Make a LD command from the set arguments.
+     */
+    void make_ld_command (rld::process::arg_container& args);
+
+    /**
      * Get the standard libraries paths from the compiler.
      */
Index: linkers/rld-config.cpp
===================================================================
--- linkers/rld-config.cpp	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld-config.cpp	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -57,5 +57,5 @@
     }
 
-    std::string
+    const std::string
     section::get_record_item (const std::string& rec_name) const
     {
@@ -79,6 +79,7 @@
     }
 
-    config::config()
-    {
+    config::config(const std::string& search_path)
+    {
+      set_search_path (search_path);
     }
 
@@ -88,4 +89,11 @@
 
     void
+    config::set_search_path (const std::string& search_path)
+    {
+      if (!search_path.empty ())
+        rld::path::path_split (search_path, search);
+    }
+
+    void
     config::clear ()
     {
@@ -98,8 +106,32 @@
       CSimpleIniCaseA ini (false, true, true);
 
-      if (ini.LoadFile (path.c_str ()) != SI_OK)
+      std::string checked_path;
+
+      if (rld::path::check_file (path))
+      {
+        checked_path = path;
+      }
+      else
+      {
+        bool found = false;
+        for (rld::path::paths::const_iterator spi = search.begin ();
+             spi != search.end ();
+             ++spi)
+        {
+          rld::path::path_join (*spi, path, checked_path);
+          if (rld::path::check_file (checked_path))
+          {
+            found = true;
+            break;
+          }
+        }
+        if (!found)
+          throw rld::error ("Not found.", "load config: " + path);
+      }
+
+      if (ini.LoadFile (checked_path.c_str ()) != SI_OK)
         throw rld::error (::strerror (errno), "load config: " + path);
 
-      paths_.push_back (path);
+      paths_.push_back (checked_path);
 
       /*
@@ -163,10 +195,5 @@
 
         /*
-         * Include records are a path which we can just load.
-         *
-         * @todo Add a search path. See 'rld::files' for details. We can default
-         *       the search path to the install $prefix of this tool and we can
-         *       then provide a default set of function signatures for RTEMS
-         *       APIs.
+         * Include records are a paths which we can load.
          */
 
Index: linkers/rld-config.h
===================================================================
--- linkers/rld-config.h	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld-config.h	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -96,5 +96,5 @@
        * error is thrown.
        */
-      std::string get_record_item (const std::string& name) const;
+      const std::string get_record_item (const std::string& name) const;
 
       /**
@@ -123,6 +123,15 @@
        * Construct an empty configuration.
        */
-      config();
+      config(const std::string& search_path = "");
+
+      /**
+       * Desctruct the configuration object.
+       */
       virtual ~config();
+
+      /**
+       * Set the search path.
+       */
+      void set_search_path (const std::string& search_path);
 
       /**
@@ -155,6 +164,7 @@
     private:
 
-      paths    paths_; /**< The path's of the loaded files. */
-      sections secs;   /**< The sections loaded from configuration files */
+      paths    search; //< The paths to search for config files in.
+      paths    paths_; //< The path's of the loaded files.
+      sections secs;   //< The sections loaded from configuration files
     };
 
Index: linkers/rld-path.cpp
===================================================================
--- linkers/rld-path.cpp	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld-path.cpp	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -28,5 +28,5 @@
   namespace path
   {
-    std::string
+    const std::string
     basename (const std::string& name)
     {
@@ -37,14 +37,14 @@
     }
 
-    std::string
+    const std::string
     dirname (const std::string& name)
     {
       size_t b = name.find_last_of (RLD_PATH_SEPARATOR);
       if (b != std::string::npos)
-        return name.substr (0, b - 1);
+        return name.substr (0, b);
       return name;
     }
 
-    std::string
+    const std::string
     extension (const std::string& name)
     {
@@ -97,4 +97,58 @@
     }
 
+    const std::string
+    path_abs (const std::string& path)
+    {
+      std::string apath;
+
+      if (path[0] == RLD_PATH_SEPARATOR)
+      {
+        apath = path;
+      }
+      else
+      {
+        char* buf = 0;
+        try
+        {
+          buf = new char[32 * 1024];
+          if (!::getcwd (buf, 132 * 1024))
+            throw rld::error (::strerror (errno), "get current working directory");
+          path_join (buf, path, apath);
+        }
+        catch (...)
+        {
+          delete [] buf;
+          throw;
+        }
+      }
+
+      strings ps;
+      strings aps;
+
+      rld::split (ps, apath, RLD_PATH_SEPARATOR);
+
+      for (strings::iterator psi = ps.begin ();
+           psi != ps.end ();
+           ++psi)
+      {
+        const std::string& dir = *psi;
+
+        if (dir.empty () || dir == ".")
+        {
+          /* do nothing */
+        }
+        else if (dir == "..")
+        {
+          aps.pop_back ();
+        }
+        else
+        {
+          aps.push_back (dir);
+        }
+      }
+
+      return RLD_PATH_SEPARATOR + rld::join (aps, RLD_PATH_SEPARATOR_STR);
+    }
+
     bool
     check_file (const std::string& path)
Index: linkers/rld-path.h
===================================================================
--- linkers/rld-path.h	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld-path.h	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -46,7 +46,7 @@
      *
      * @param name The full file name.
-     * @return std::string The basename of the file.
+     * @return const std::string The basename of the file.
      */
-    std::string basename (const std::string& name);
+    const std::string basename (const std::string& name);
 
     /**
@@ -54,7 +54,7 @@
      *
      * @param name The full file name.
-     * @return std::string The dirname of the file.
+     * @return const std::string The dirname of the file.
      */
-    std::string dirname (const std::string& name);
+    const std::string dirname (const std::string& name);
 
     /**
@@ -62,11 +62,11 @@
      *
      * @param name The full file name.
-     * @return std::string The extension of the file.
+     * @return const std::string The extension of the file.
      */
-    std::string extension (const std::string& name);
+    const std::string extension (const std::string& name);
 
     /**
-     * Split a path from a string with a delimiter to the path container. Add
-     * only the paths that exist and ignore those that do not.
+     * Split a path from a string with the path seperator to the path
+     * container. Add only the paths that exist and ignore those that do not.
      *
      * @param path The paths as a single string delimited by the path
@@ -99,4 +99,13 @@
                     const paths&       parts,
                     std::string&       joined);
+
+    /**
+     * Return the absolute path given a path and using the current working
+     * directory. The path is flattened removing any '..' sequences.
+     *
+     * @param path The path to be return as absolute.
+     * @return const std::string The absolute path.
+     */
+    const std::string path_abs (const std::string& path);
 
     /**
Index: linkers/rld.cpp
===================================================================
--- linkers/rld.cpp	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld.cpp	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -40,4 +40,5 @@
 {
   static int verbose_level = 0;
+  static std::string progname;
 
   /**
@@ -64,5 +65,117 @@
    * The output passed on the command line.
    */
-  static std::string output;
+  //static std::string output;
+
+  bool
+  starts_with(const std::string& s1, const std::string& s2)
+  {
+    return s2.size () <= s1.size () && s1.compare (0, s2.size (), s2) == 0;
+  }
+
+  const std::string
+  ltrim (const std::string& s)
+  {
+    std::string t = s;
+    t.erase (t.begin (),
+             std::find_if (t.begin (), t.end (),
+                         std::not1 (std::ptr_fun < int, int > (std::isspace))));
+    return t;
+  }
+
+  const std::string
+  rtrim (const std::string& s)
+  {
+    std::string t = s;
+    t.erase (std::find_if (t.rbegin (), t.rend (),
+                           std::not1 (std::ptr_fun < int, int > (std::isspace))).base(),
+             t.end());
+    return t;
+  }
+
+  const std::string
+  trim (const std::string& s)
+  {
+    return ltrim (rtrim (s));
+  }
+
+  const std::string
+  dequote (const std::string& s)
+  {
+    if (!s.empty ())
+    {
+      char front = s[0];
+      char back = s[s.length () - 1];
+      if ((front == '"') || (front == '\''))
+      {
+        if (front != back)
+          throw rld::error ("invalid quoting", "string: " + s);
+        return s.substr (1, s.length () - (1 + 1));
+      }
+    }
+    return s;
+  }
+
+  const std::string
+  find_replace(const std::string& sin,
+               const std::string& out,
+               const std::string& in)
+  {
+    std::string s = sin;
+    size_t      pos = 0;
+    while ((pos = s.find (out, pos)) != std::string::npos)
+    {
+      s.replace (pos, out.length (), in);
+      pos += in.length ();
+    }
+    return s;
+  }
+
+  const strings
+  split (strings&           se,
+         const std::string& s,
+         char               delimiter,
+         bool               strip_quotes,
+         bool               strip_whitespace,
+         bool               empty)
+  {
+    std::stringstream ss(s);
+    std::string       e;
+    se.clear ();
+    while (std::getline (ss, e, delimiter))
+    {
+      if (strip_whitespace)
+        e = trim (e);
+      if (strip_quotes)
+        e = dequote (e);
+      if (empty || !e.empty ())
+      {
+        se.push_back (e);
+      }
+    }
+    return se;
+  }
+
+  const std::string
+  join (const strings& ss, const std::string& separator)
+  {
+    std::string s;
+    for (strings::const_iterator ssi = ss.begin ();
+         ssi != ss.end ();
+         ++ssi)
+    {
+      s += *ssi;
+      if ((ssi + 1) != ss.end ())
+        s += separator;
+    }
+    return s;
+  }
+
+  const std::string
+  tolower (const std::string& sin)
+  {
+    std::string s = sin;
+    std::transform (s.begin (), s.end (), s.begin (), ::tolower);
+    return s;
+  }
 
   void
@@ -91,4 +204,38 @@
   {
     return rld::to_string (RTEMS_VERSION);
+  }
+
+  void
+  set_progname (const std::string& progname_)
+  {
+    progname = rld::path::path_abs (progname_);
+  }
+
+  const std::string
+  get_progname ()
+  {
+    return progname;
+  }
+
+  const std::string
+  get_program_name ()
+  {
+    return rld::path::basename (progname);
+  }
+
+  const std::string
+  get_program_path ()
+  {
+    return rld::path::dirname (progname);
+  }
+
+  const std::string
+  get_prefix ()
+  {
+    std::string pp = get_program_path ();
+    std::cout << "PP=" << pp << std::endl;
+    if (rld::path::basename (pp) == "bin")
+      pp = rld::path::dirname (pp);
+    return pp;
   }
 
Index: linkers/rld.h
===================================================================
--- linkers/rld.h	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rld.h	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -127,74 +127,32 @@
    * Does a string start with another string ?
    */
-  inline bool starts_with(const std::string& s1, const std::string& s2)
-  {
-    return s2.size () <= s1.size () && s1.compare (0, s2.size (), s2) == 0;
-  }
+  bool starts_with(const std::string& s1, const std::string& s2);
 
   /**
    * Trim from start.
    */
-  inline std::string& ltrim (std::string &s)
-  {
-    s.erase (s.begin (),
-            std::find_if (s.begin (), s.end (),
-                         std::not1 (std::ptr_fun < int, int > (std::isspace))));
-    return s;
-  }
+  const std::string ltrim (const std::string& s);
 
   /**
    * Trim from end.
    */
-  inline std::string& rtrim (std::string &s)
-  {
-    s.erase (std::find_if (s.rbegin (), s.rend (),
-                           std::not1 (std::ptr_fun < int, int > (std::isspace))).base(),
-             s.end());
-    return s;
-  }
+  const std::string rtrim (const std::string& s);
 
   /**
    * Trim from both ends.
    */
-  inline std::string& trim (std::string &s)
-  {
-    return ltrim (rtrim (s));
-  }
+  const std::string trim (const std::string& s);
 
   /**
    * Dequote a string.
    */
-  inline std::string dequote (const std::string& s)
-  {
-    if (!s.empty ())
-    {
-      char front = s[0];
-      char back = s[s.length () - 1];
-      if ((front == '"') || (front == '\''))
-      {
-        if (front != back)
-          throw rld::error ("invalid quoting", "string: " + s);
-        return s.substr (1, s.length () - (1 + 1));
-      }
-    }
-    return s;
-  }
+  const std::string dequote (const std::string& s);
 
   /**
    * Find and replace.
    */
-  inline std::string find_replace(const std::string& sin,
-                                  const std::string& out,
-                                  const std::string& in)
-  {
-    std::string s = sin;
-    size_t      pos = 0;
-    while ((pos = s.find (out, pos)) != std::string::npos)
-    {
-      s.replace (pos, out.length (), in);
-      pos += in.length ();
-    }
-    return s;
-  }
+  const std::string find_replace(const std::string& sin,
+                                 const std::string& out,
+                                 const std::string& in);
 
   /**
@@ -204,55 +162,20 @@
    * @todo The split should optionally honour string quoting.
    */
-  inline strings split (strings&           se,
-                        const std::string& s,
-                        char               delimiter = ' ',
-                        bool               strip_quotes = true,
-                        bool               strip_whitespace = true,
-                        bool               empty = false)
-  {
-    std::stringstream ss(s);
-    std::string       e;
-    se.clear ();
-    while (std::getline (ss, e, delimiter))
-    {
-      if (strip_whitespace)
-        trim (e);
-      if (strip_quotes)
-        e = dequote (e);
-      if (empty || !e.empty ())
-      {
-        se.push_back (e);
-      }
-    }
-    return se;
-  }
+  const strings split (strings&           se,
+                       const std::string& s,
+                       char               delimiter = ' ',
+                       bool               strip_quotes = true,
+                       bool               strip_whitespace = true,
+                       bool               empty = false);
 
   /**
    * Join the strings together with the separator.
    */
-  inline std::string join (const strings&     ss,
-                           const std::string& separator)
-  {
-    std::string s;
-    for (strings::const_iterator ssi = ss.begin ();
-         ssi != ss.end ();
-         ++ssi)
-    {
-      s += *ssi;
-      if ((ssi != ss.begin ()) && (ssi != ss.end ()))
-        s += separator;
-    }
-    return s;
-  }
+  const std::string join (const strings& ss, const std::string& separator);
 
   /**
    * Convert a string to lower case.
    */
-  inline std::string tolower (const std::string& sin)
-  {
-    std::string s = sin;
-    std::transform (s.begin (), s.end (), s.begin (), ::tolower);
-    return s;
-  }
+  const std::string tolower (const std::string& sin);
 
   /**
@@ -278,4 +201,32 @@
 
   /**
+   * Set the progname.
+   */
+  void set_progname (const std::string& progname);
+
+  /**
+   * Get the progname. This is an absolute path.
+   */
+  const std::string get_progname ();
+
+  /**
+   * Get the program name.
+   */
+  const std::string get_program_name ();
+
+  /**
+   * Get the program path.
+   */
+  const std::string get_program_path ();
+
+  /**
+   * Get the current install prefix. If the path to the executable has 'bin' as
+   * the executable's parent directory it is assumed the executable has been
+   * installed under a standard PREFIX. If "bin" is not found return the
+   * executable's absolute path.
+   */
+  const std::string get_prefix ();
+
+  /**
    * Map of the symbol table.
    */
@@ -283,5 +234,5 @@
 
   /**
-   * Warn is externals in referenced object files are not used.
+   * Warn if externals in referenced object files are not used.
    */
   void warn_unused_externals (rld::files::object_list& objects);
Index: linkers/rtems-ld.cpp
===================================================================
--- linkers/rtems-ld.cpp	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rtems-ld.cpp	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -357,5 +357,5 @@
     {
       if (rtems_path.empty ())
-        throw rld::error ("arch/bsp provide and no RTEMS path", "options");
+        throw rld::error ("No RTEMS path provide with arch/bsp", "options");
       rld::rtems::set_path (rtems_path);
       rld::rtems::set_arch_bsp (rtems_arch_bsp);
Index: linkers/rtems-tld.cpp
===================================================================
--- linkers/rtems-tld.cpp	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/rtems-tld.cpp	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -91,5 +91,5 @@
        * Return the function's declaration.
        */
-      const std::string decl () const;
+      const std::string decl (const std::string& prefix = "") const;
     };
 
@@ -195,4 +195,9 @@
 
       /**
+       * Get the traces.
+       */
+      const rld::strings& get_traces () const;
+
+      /**
        * Dump the wrapper.
        */
@@ -322,7 +327,7 @@
 
     const std::string
-    signature::decl () const
-    {
-      std::string ds = ret + ' ' + name + '(';
+    signature::decl (const std::string& prefix) const
+    {
+      std::string ds = ret + ' ' + prefix + name + '(';
       int         arg = 0;
       for (function_args::const_iterator ai = args.begin ();
@@ -486,5 +491,4 @@
        *
        *  # name      The name of trace being linked.
-       *  # bsp       The architecture/bsp name of the BSP.
        *  # options   A list of options as per the long command line args.
        *  # traces    The list of sections containing function lists to trace.
@@ -504,5 +508,4 @@
 
       name = section.get_record_item ("name");
-      bsp  = section.get_record_item ("bsp");
 
       load_functions (config, section);
@@ -641,5 +644,5 @@
 
             c.write_line("");
-            c.write_line(sig.decl ());
+            c.write_line(sig.decl ("__wrap_"));
             c.write_line("{");
 
@@ -656,5 +659,5 @@
             }
 
-            l += " " + generator_.map_sym_prefix + sig.name + '(';
+            l += " __real_" + sig.name + '(';
             for (size_t a = 0; a < sig.args.size (); ++a)
             {
@@ -680,4 +683,10 @@
     }
 
+    const rld::strings&
+    tracer::get_traces () const
+    {
+      return traces;
+    }
+
     void
     tracer::dump (std::ostream& out) const
@@ -711,4 +720,14 @@
                          const std::string& trace)
     {
+      std::string sp = get_prefix ();
+
+      rld::path::path_join (sp, "share", sp);
+      rld::path::path_join (sp, "rtems", sp);
+      rld::path::path_join (sp, "trace-linker", sp);
+
+      if (rld::verbose () || true)
+        std::cout << "search path: " << sp << std::endl;
+
+      config.set_search_path (sp);
       config.clear ();
       config.load (path);
@@ -760,7 +779,36 @@
     void
     linker::link (rld::process::tempfile& o,
-                  const std::string&      ld_cmds)
-    {
-
+                  const std::string&      ld_cmd)
+    {
+     rld::process::arg_container args;
+
+      if (rld::verbose ())
+        std::cout << "linking: " << o.name () << std::endl;
+
+      std::string wrap = " -Wl,--wrap -Wl,";
+
+      rld::cc::make_ld_command (args);
+
+      args.push_back (o.name ());
+
+      rld::process::args_append (args, ld_cmd);
+      rld::process::args_append (args,
+                                 wrap + rld::join (tracer_.get_traces (), wrap));
+
+      rld::process::tempfile out;
+      rld::process::tempfile err;
+      rld::process::status   status;
+
+      status = rld::process::execute (rld::cc::get_ld (),
+                                      args,
+                                      out.name (),
+                                      err.name ());
+
+      if ((status.type != rld::process::status::normal) ||
+          (status.code != 0))
+      {
+        err.output (rld::cc::get_cc (), std::cout);
+        throw rld::error ("Linker error", "linking");
+      }
     }
 
@@ -793,7 +841,8 @@
   { "warn",        no_argument,            NULL,           'w' },
   { "keep",        no_argument,            NULL,           'k' },
+  { "compiler",    required_argument,      NULL,           'c' },
   { "linker",      required_argument,      NULL,           'l' },
   { "exec-prefix", required_argument,      NULL,           'E' },
-  { "cflags",      required_argument,      NULL,           'c' },
+  { "cflags",      required_argument,      NULL,           'f' },
   { "rtems",       required_argument,      NULL,           'r' },
   { "rtems-bsp",   required_argument,      NULL,           'B' },
@@ -808,17 +857,18 @@
   std::cout << "rtems-trace-ld [options] objects" << std::endl
             << "Options and arguments:" << std::endl
-            << " -h         : help (also --help)" << std::endl
-            << " -V         : print linker version number and exit (also --version)" << std::endl
-            << " -v         : verbose (trace import parts), can supply multiple times" << std::endl
-            << "              to increase verbosity (also --verbose)" << std::endl
-            << " -w         : generate warnings (also --warn)" << std::endl
-            << " -k         : keep temporary files (also --keep)" << std::endl
-            << " -l linker  : target linker is not standard (also --linker)" << std::endl
-            << " -E prefix  : the RTEMS tool prefix (also --exec-prefix)" << std::endl
-            << " -c cflags  : C compiler flags (also --cflags)" << std::endl
-            << " -r path    : RTEMS path (also --rtems)" << std::endl
-            << " -B bsp     : RTEMS arch/bsp (also --rtems-bsp)" << std::endl
-            << " -W wrapper : wrapper file name without ext (also --wrapper)" << std::endl
-            << " -C ini     : user configuration INI file (also --config)" << std::endl;
+            << " -h          : help (also --help)" << std::endl
+            << " -V          : print linker version number and exit (also --version)" << std::endl
+            << " -v          : verbose (trace import parts), can supply multiple times" << std::endl
+            << "               to increase verbosity (also --verbose)" << std::endl
+            << " -w          : generate warnings (also --warn)" << std::endl
+            << " -k          : keep temporary files (also --keep)" << std::endl
+            << " -c compiler : target compiler is not standard (also --compiler)" << std::endl
+            << " -l linker   : target linker is not standard (also --linker)" << std::endl
+            << " -E prefix   : the RTEMS tool prefix (also --exec-prefix)" << std::endl
+            << " -f cflags   : C compiler flags (also --cflags)" << std::endl
+            << " -r path     : RTEMS path (also --rtems)" << std::endl
+            << " -B bsp      : RTEMS arch/bsp (also --rtems-bsp)" << std::endl
+            << " -W wrappe r : wrapper file name without ext (also --wrapper)" << std::endl
+            << " -C ini      : user configuration INI file (also --config)" << std::endl;
   ::exit (exit_code);
 }
@@ -868,4 +918,5 @@
   {
     rld::trace::linker linker;
+    std::string        cc;
     std::string        ld;
     std::string        ld_cmd;
@@ -878,5 +929,5 @@
     while (true)
     {
-      int opt = ::getopt_long (argc, argv, "hvwkVl:E:c:C:r:B:W:", rld_opts, NULL);
+      int opt = ::getopt_long (argc, argv, "hvwkVc:l:E:f:C:r:B:W:", rld_opts, NULL);
       if (opt < 0)
         break;
@@ -904,4 +955,8 @@
           break;
 
+        case 'c':
+          cc = optarg;
+          break;
+
         case 'l':
           ld = optarg;
@@ -912,5 +967,5 @@
           break;
 
-        case 'c':
+        case 'f':
           rld::cc::append_flags (optarg, rld::cc::ft_cflags);
           break;
@@ -942,4 +997,9 @@
     }
 
+    /*
+     * Set the program name.
+     */
+    rld::set_progname (argv[0]);
+
     argc -= optind;
     argv += optind;
@@ -954,14 +1014,28 @@
     {
       if (rtems_path.empty ())
-        throw rld::error ("arch/bsp provide and no RTEMS path", "options");
+        throw rld::error ("No RTEMS path provide with arch/bsp", "options");
       rld::rtems::set_path (rtems_path);
       rld::rtems::set_arch_bsp (rtems_arch_bsp);
     }
 
+    /**
+     * Set the compiler and/or linker if provided.
+     */
+    if (!cc.empty ())
+      rld::cc::set_cc (cc);
+    if (!ld.empty ())
+      rld::cc::set_ld (ld);
+
     /*
      * Load the remaining command line arguments into the linker command line.
      */
     while (argc--)
-      ld_cmd += ' ' + *argv++;
+    {
+      /*
+       * Create this value because 'ld_cmd += ' ' + *argv++' fails on clang.
+       */
+      std::string av = *argv++;
+      ld_cmd += ' ' + av;
+    }
     ld_cmd = rld::trim (ld_cmd);
 
Index: linkers/wscript
===================================================================
--- linkers/wscript	(revision b28e8b311550ba5296c814dfdfa1136517ce00a1)
+++ linkers/wscript	(revision 6506aa14aad5db5f4f3fab80bec12964148f13ad)
@@ -166,4 +166,6 @@
                 linkflags = bld.linkflags,
                 use = modules)
+    bld.install_files('${PREFIX}/share/rtems/trace-linker',
+                      ['rtems.ini', 'rtld-base.ini'])
 
     #
