aboutsummaryrefslogtreecommitdiff
path: root/gold/readsyms.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-09-29 19:58:17 +0000
committerIan Lance Taylor <iant@google.com>2006-09-29 19:58:17 +0000
commit61ba1cf93601b0a0877a8ade94ba3c674a09f77e (patch)
treeffa744ec1dffd7f2dae13150b1dd7784728ed0a4 /gold/readsyms.cc
parent4dba4b2419ccdbf48fd016edb7e0e10016897827 (diff)
downloadgdb-61ba1cf93601b0a0877a8ade94ba3c674a09f77e.zip
gdb-61ba1cf93601b0a0877a8ade94ba3c674a09f77e.tar.gz
gdb-61ba1cf93601b0a0877a8ade94ba3c674a09f77e.tar.bz2
Snapshot. Now able to produce a minimal executable which actually
runs.
Diffstat (limited to 'gold/readsyms.cc')
-rw-r--r--gold/readsyms.cc23
1 files changed, 21 insertions, 2 deletions
diff --git a/gold/readsyms.cc b/gold/readsyms.cc
index 99fa1b1..ee0e063 100644
--- a/gold/readsyms.cc
+++ b/gold/readsyms.cc
@@ -7,8 +7,9 @@
#include "elfcpp.h"
#include "options.h"
#include "dirsearch.h"
-#include "readsyms.h"
#include "object.h"
+#include "archive.h"
+#include "readsyms.h"
namespace gold
{
@@ -85,9 +86,27 @@ Read_symbols::run(Workqueue* workqueue)
}
}
+ if (bytes >= Archive::sarmag)
+ {
+ if (memcmp(p, Archive::armag, Archive::sarmag) == 0)
+ {
+ // This is an archive.
+ Archive* arch = new Archive(this->input_.name(), input_file);
+ arch->setup();
+ workqueue->queue(new Add_archive_symbols(this->symtab_,
+ this->input_objects_,
+ arch,
+ this->this_blocker_,
+ this->next_blocker_));
+ return;
+ }
+ }
+
// Here we have to handle archives and any other input file
// types we need.
- gold_fatal("only objects are currently supported", false);
+ fprintf(stderr, _("%s: %s: not an object or archive\n"),
+ program_name, input_file->file().filename().c_str());
+ gold_exit(false);
}
// Class Add_symbols.