Author: marius
Date: Tue Jul 26 13:22:12 2011
New Revision: 224432
URL: http://svn.freebsd.org/changeset/base/224432

Log:
  MFC: r218745
  
  Remove reading of symbols from a.out loaded files.  Since we are tight
  on space for clang and a.out support is only needed for /boot/loader,
  they are excess bytes that serve no useful purpose other than to
  support really old kernels (FreeBSD < 3.2 or so).  Prefer clang
  support over support for these old kernels and remove this code.  We
  gain about 100 bytes of space this way.
  
  Reviewed by:  rdivacky@

Modified:
  stable/8/sys/boot/i386/boot2/boot2.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/geom/label/   (props changed)

Modified: stable/8/sys/boot/i386/boot2/boot2.c
==============================================================================
--- stable/8/sys/boot/i386/boot2/boot2.c        Tue Jul 26 13:19:57 2011        
(r224431)
+++ stable/8/sys/boot/i386/boot2/boot2.c        Tue Jul 26 13:22:12 2011        
(r224432)
@@ -347,23 +347,6 @@ load(void)
        p += roundup2(hdr.ex.a_text, PAGE_SIZE);
        if (xfsread(ino, p, hdr.ex.a_data))
            return;
-       p += hdr.ex.a_data + roundup2(hdr.ex.a_bss, PAGE_SIZE);
-       bootinfo.bi_symtab = VTOP(p);
-       *(uint32_t*)p = hdr.ex.a_syms;
-       p += sizeof(hdr.ex.a_syms);
-       if (hdr.ex.a_syms) {
-           if (xfsread(ino, p, hdr.ex.a_syms))
-               return;
-           p += hdr.ex.a_syms;
-           if (xfsread(ino, p, sizeof(int)))
-               return;
-           x = *(uint32_t *)p;
-           p += sizeof(int);
-           x -= sizeof(int);
-           if (xfsread(ino, p, x))
-               return;
-           p += x;
-       }
     } else {
        fs_off = hdr.eh.e_phoff;
        for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) {
@@ -395,8 +378,8 @@ load(void)
            }
        }
        addr = hdr.eh.e_entry & 0xffffff;
+       bootinfo.bi_esymtab = VTOP(p);
     }
-    bootinfo.bi_esymtab = VTOP(p);
     bootinfo.bi_kernelname = VTOP(kname);
     bootinfo.bi_bios_dev = dsk.drive;
     __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK),
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to