Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!labrea!decwrl!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.unix.wizards,comp.protocols.tcp-ip Subject: Re: Serial Line IP and ULTRIX-32 2.0 Message-ID: <834@mcgill-vision.UUCP> Date: Sun, 5-Jul-87 00:19:23 EDT Article-I.D.: mcgill-v.834 Posted: Sun Jul 5 00:19:23 1987 Date-Received: Sat, 11-Jul-87 00:49:33 EDT References: <662@moogvax.UUCP> <1358@decuac.DEC.COM> Organization: McGill University, Montreal Lines: 62 Xref: mnetor comp.unix.wizards:3158 comp.protocols.tcp-ip:517 In article <1358@decuac.DEC.COM>, avolio@decuac.dec.com (Fred Avolio) writes: > In article <662@moogvax.UUCP>, dave@moogvax.UUCP (Dave Szczepanski) writes: >> [I]s it possible to install [SLIP] if you are binary site. > I see no easy way to install it with a binary kit since you need to > modify init_main, Fortunately it *is* possible. It is not especially easy, and it is a dreadful hack, but until we manage to stamp out binary distributions this trick may come in handy to someone. What we do is to patch the "_loattach" symbol in the init_main.o symbol table to something like "_F_Avolio" (Hi Fred!) and then configure in a file containing something like the following (or add it to an existing file we have source to): F_Avolio() { do_whatever_we_want(); loattach(); } (Why F_Avolio? No particular reason. You can use derMouse if you'd rather - Fred might even prefer you did :-). Anything the same length as "loattach" will do perfectly well, provided it doesn't conflict with anything already present in the kernel.) How do we patch the symbol table? Assuming a normal Ultrix system, # strings - -o init_main.o | egrep _loattach 1234 _loattach # adb -w init_main.o init_main.o 0t1234/S 4d2: _loattach .+1/W 'vA_F' 4d3: 74616f6c = 76415f46 0t1234/S 4d2: _F_Avtach .+5/W 'oilo' 4d7: 68636174 = 6f696c6f 0t1234/S 4d2: _F_Avolio $q # We give adb the file name twice so we can use the offset strings gave us: since the file is an a.out, adb does address mapping for a.outs, which is good in general, but doesn't help here, so we get around by giving the filename twice and using the / forms of the examine and deposit commands. You can also do this by using $m and a little arithmetic, but it's much simpler to just do the above. It works because the .o file is not a valid core image, so adb doesn't do its address mapping for the / command forms. (F_Av and olio are spelled backwards because adb is too dumb to fix the order of the characters in 'xxxx' constants.) If you do try this, I MOST STRONGLY urge you to keep backup copies of EVERYTHING you touch! der Mouse (mouse@mcgill-vision.uucp)