summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1999-01-25 10:34:35 +0000
committerrnordier <rnordier@FreeBSD.org>1999-01-25 10:34:35 +0000
commite3cbd0c0a226f7b2e567b85a09b273b5bf6fe945 (patch)
tree0ba448e92b0c9c0178168d42e55cadb99f3160aa
parent5d6ddef65c057f4e64302e6ebe6e580223beed24 (diff)
downloadFreeBSD-src-e3cbd0c0a226f7b2e567b85a09b273b5bf6fe945.zip
FreeBSD-src-e3cbd0c0a226f7b2e567b85a09b273b5bf6fe945.tar.gz
Correctly record the end of the a.out symbol table. In practice, a
bootinfo structure where bi_esymtab < bi_symtab was being passed to the kernel. In the case of older 2.x kernels, this was causing garbage to be printed to the video console, followed by an exception. This should resolve a problem reported on -current by Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>.
-rw-r--r--sys/boot/common/load_aout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/boot/common/load_aout.c b/sys/boot/common/load_aout.c
index 44f4276..3e6aece 100644
--- a/sys/boot/common/load_aout.c
+++ b/sys/boot/common/load_aout.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: load_aout.c,v 1.12 1999/01/22 21:33:52 rnordier Exp $
+ * $Id: load_aout.c,v 1.13 1999/01/22 23:50:14 msmith Exp $
*/
#include <sys/param.h>
@@ -221,7 +221,7 @@ aout_loadimage(struct loaded_module *mp, int fd, vm_offset_t loadaddr, struct ex
addr += ehdr->a_bss;
/* symbol table size */
- ssym = addr;
+ ssym = esym = addr;
if(ehdr->a_syms!=NULL) {
archsw.arch_copyin(&ehdr->a_syms, addr, sizeof(ehdr->a_syms));
addr += sizeof(ehdr->a_syms);
@@ -241,6 +241,7 @@ aout_loadimage(struct loaded_module *mp, int fd, vm_offset_t loadaddr, struct ex
if (archsw.arch_readin(fd, addr, ss) != ss)
return(0);
addr += ss;
+ esym = addr;
mod_addmetadata(mp, MODINFOMD_SSYM, sizeof(ssym), &ssym);
mod_addmetadata(mp, MODINFOMD_ESYM, sizeof(esym), &esym);
@@ -248,7 +249,6 @@ aout_loadimage(struct loaded_module *mp, int fd, vm_offset_t loadaddr, struct ex
printf("symbols=[none]");
}
printf("\n");
- esym = addr;
return(addr - loadaddr);
}
OpenPOWER on IntegriCloud