summaryrefslogtreecommitdiff
path: root/rld-outputter.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-10-22 17:58:34 -0700
committerChris Johns <chrisj@rtems.org>2012-10-22 17:58:34 -0700
commit575084057061ee97c8a08cc0331393cf79a69cad (patch)
treed7e86dedfa71b33bbe15d269d1799d9a05773c50 /rld-outputter.h
parentf97a935a3adb683a6ebc66e72f56644cf51d52f1 (diff)
Fix repeats in output when cmd line objects depend on each other.
If an object on the command line depends on another object the output code wrote the object files and then the dependent files and a command line object file that is dependent ended up in the object and dependent lists. A simple merge and unique fixed it. Also moved the script generation code into a separate function that can be used in a application container.
Diffstat (limited to 'rld-outputter.h')
-rw-r--r--rld-outputter.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/rld-outputter.h b/rld-outputter.h
index 3c3bac0..a5e03c8 100644
--- a/rld-outputter.h
+++ b/rld-outputter.h
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2011, Chris Johns <chrisj@rtems.org>
+ * Copyright (c) 2011, Chris Johns <chrisj@rtems.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@@ -32,6 +32,16 @@ namespace rld
namespace outputter
{
/**
+ * Output the object file list as a string.
+ *
+ * @param dependents The list of dependent object files
+ * @param cache The file cache for the link. Includes the object list
+ * the user requested.
+ * @return std::string The list as a text string.
+ */
+ std::string script_text (rld::files::object_list& dependents,
+ rld::files::cache& cache);
+ /**
* Output the object file list as a script.
*
* @param name The name of the archive.
@@ -40,7 +50,7 @@ namespace rld
* the user requested.
*/
void archive (const std::string& name,
- rld::files::object_list& dependents,
+ rld::files::object_list& dependents,
rld::files::cache& cache);
/**
@@ -52,7 +62,7 @@ namespace rld
* the user requested.
*/
void script (const std::string& name,
- rld::files::object_list& dependents,
+ rld::files::object_list& dependents,
rld::files::cache& cache);
}
}