summaryrefslogtreecommitdiff
path: root/linkers/rtems-syms.cpp
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-11-26 12:14:06 +1100
committerChris Johns <chrisj@rtems.org>2012-11-26 12:14:06 +1100
commit8190102ee77746684af26db5813b1c6ba3eb383c (patch)
tree8879fb0b260b339d4d819b497dde2290484403f9 /linkers/rtems-syms.cpp
parentae353d3bb0924ffd9b033e1c2267720032670009 (diff)
Update to the latest framwork requirements.
Diffstat (limited to 'linkers/rtems-syms.cpp')
-rw-r--r--linkers/rtems-syms.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/linkers/rtems-syms.cpp b/linkers/rtems-syms.cpp
index 926d1f3..44743cc 100644
--- a/linkers/rtems-syms.cpp
+++ b/linkers/rtems-syms.cpp
@@ -277,11 +277,31 @@ main (int argc, char* argv[])
cache.add_libraries (libraries);
/*
- * Load the symbol table.
+ * Begin the archive session. This opens the archives and leaves them open
+ * while we the symbol table is being used. The symbols reference object
+ * files and the object files may reference archives and it is assumed they
+ * are open and available. It is also assumed the number of library
+ * archives being managed is less than the maximum file handles this
+ * process can have open at any one time. If this is not the case this
+ * approach would need to be reconsidered and the overhead of opening and
+ * closing archives added.
*/
- cache.load_symbols (symbols);
+ try
+ {
+ /*
+ * Load the symbol table.
+ */
+ cache.load_symbols (symbols);
+
+ rld::map (cache, symbols);
+ }
+ catch (...)
+ {
+ cache.archives_end ();
+ throw;
+ }
- rld::map (cache, symbols);
+ cache.archives_end ();
}
catch (rld::error re)
{