projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee50f56
)
Ignore empty archives.
author
Ian Lance Taylor
<iant@google.com>
Fri, 16 Nov 2007 18:44:20 +0000
(18:44 +0000)
committer
Ian Lance Taylor
<iant@google.com>
Fri, 16 Nov 2007 18:44:20 +0000
(18:44 +0000)
gold/archive.cc
patch
|
blob
|
history
diff --git
a/gold/archive.cc
b/gold/archive.cc
index 5862f34a6f631cc213c91ddbb6082775eb01f1d0..1442731f045ef867507b3acc203df318802ae24e 100644
(file)
--- a/
gold/archive.cc
+++ b/
gold/archive.cc
@@
-75,6
+75,13
@@
const char Archive::arfmag[2] = { '`', '\n' };
void
Archive::setup()
{
+ // We need to ignore empty archives.
+ if (this->input_file_->file().filesize() == sarmag)
+ {
+ this->input_file_->file().unlock();
+ return;
+ }
+
// The first member of the archive should be the symbol table.
std::string armap_name;
off_t armap_size = this->read_header(sarmag, &armap_name);