summaryrefslogtreecommitdiff
path: root/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
commit3888d9d1ad825649dd44c628039a88a1c21b3702 (patch)
treeebc801afc4f6bffa64914ff4a99b26ee1b709f69 /rtems-syms.cpp
parenta7a321bc0521f14f33faf343bc36fd8e35bccf6c (diff)
Update to the latest framwork requirements.
Diffstat (limited to 'rtems-syms.cpp')
-rw-r--r--rtems-syms.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/rtems-syms.cpp b/rtems-syms.cpp
index 926d1f3..44743cc 100644
--- a/rtems-syms.cpp
+++ b/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)
{