A check in getLoaderSection() was too strict.
committer: mfx <mfx> 976602702 +0000
This commit is contained in:
+5
-2
@@ -918,9 +918,12 @@ void Packer::addSection(const char *sname, const char *sdata, unsigned len)
|
|||||||
|
|
||||||
int Packer::getLoaderSection(const char *name, int *slen)
|
int Packer::getLoaderSection(const char *name, int *slen)
|
||||||
{
|
{
|
||||||
int ostart = linker->getSection(name, slen);
|
int size = -1;
|
||||||
if (ostart <= 0)
|
int ostart = linker->getSection(name, &size);
|
||||||
|
if (ostart < 0 || size <= 0)
|
||||||
throwBadLoader();
|
throwBadLoader();
|
||||||
|
if (slen)
|
||||||
|
*slen = size;
|
||||||
return ostart;
|
return ostart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user