From 89fee5b835c97e39a62de680779cb276375f68dc Mon Sep 17 00:00:00 2001 From: John Reiser Date: Sat, 19 Feb 2005 22:05:56 +0000 Subject: [PATCH] allow more sections; print failing section on overflow committer: jreiser 1108850756 +0000 --- src/linker.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/linker.cpp b/src/linker.cpp index f42bc385..8187131c 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -48,7 +48,7 @@ struct Linker::jump Linker::Linker(const void *pdata, int plen, int pinfo) { - iloader = new char[(ilen = plen) + 4096]; + iloader = new char[(ilen = plen) + 8192]; memcpy(iloader,pdata,plen); oloader = new char[plen]; olen = 0; @@ -57,7 +57,7 @@ Linker::Linker(const void *pdata, int plen, int pinfo) info = pinfo; njumps = nsections = frozen = 0; jumps = new jump[200]; -#define NSECTIONS 350 +#define NSECTIONS 550 sections = new section[NSECTIONS]; char *p = iloader + info; @@ -139,7 +139,9 @@ int Linker::addSection(const char *sect) olen += sections[ic].len; break; } - //printf("%8.8s",sect); + if (ic==nsections) { + printf("%8.8s",sect); + } assert(ic!=nsections); } sect += 8;