Skip to content

Commit

Permalink
Report size of object when out of memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Aug 13, 2024
1 parent 0373b85 commit 44c19c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Linker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Assembler.h"
#include "Exception.h"
#include "FileReader.h"
#include "ObjectExpression.h"
#include "Unresolved.h"
#include "ValueExpression.h"

Expand Down Expand Up @@ -134,7 +133,7 @@ void Linker::link() {
}
}
if (!object->address) {
FileReader::global.error({}, "no space left for %s in section %s", object->name.as_string().c_str(), object->section->name.c_str());
FileReader::global.error({}, "no space left for %s ($%llx bytes) in section %s", object->name.as_string().c_str(), *object->size_range().size(), object->section->name.c_str());
continue;
}
}
Expand Down

0 comments on commit 44c19c5

Please sign in to comment.