provide more space for relocs in the secondary bootblock.
Guarantee that relocs and 16 bit pc-relative addressing works.
This commit is contained in:
parent
0fb6c8c68b
commit
2cee6da4a1
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: elf2bb.c,v 1.11 2005/12/11 12:16:36 christos Exp $ */
|
||||
/* $NetBSD: elf2bb.c,v 1.12 2006/01/24 20:04:05 is Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
* Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
|
@ -206,7 +206,14 @@ main(int argc, char *argv[])
|
|||
dprintf(("%d relocs\n", trsz/12));
|
||||
|
||||
if (sumsize == 0) {
|
||||
bbsize = (tsz + dsz + bsz + 511) & ~511;
|
||||
/*
|
||||
* XXX overly cautious, but this guarantees that 16bit
|
||||
* pc offsets and our relocs always work.
|
||||
*/
|
||||
bbsize = 32768;
|
||||
if (bbsize < (tsz + dsz + bsz)) {
|
||||
err(1, "%s: too big.", argv[0]);
|
||||
}
|
||||
sumsize = bbsize / 512;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue