Path: utzoo!attcan!uunet!super!rminnich From: rminnich@super.ORG (Ronald G Minnich) Newsgroups: comp.arch Subject: Re: Putting libc.a into a segment Message-ID: <27624@super.ORG> Date: 15 Jun 90 16:28:43 GMT References: <383@garth.UUCP> <1990Jun2.134157.14516@oracle.com> <27411@metropolis.super.ORG> <3466@auspex.auspex.com> Sender: news@super.ORG Reply-To: rminnich@super.UUCP (Ronald G Minnich) Organization: Supercomputing Research Center, Bowie, Md. Lines: 44 In article <3466@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: > 1) if you jump into the middle of a function in "libc", it's > either because a) the linker is malfunctioning, b) you > overwrote code (unlikely given that it's generally > write-protected) or smashed a function pointer, or c) because > you were *trying* to. In all those cases, the same thing can > happen with static linking, so it's not unique to dynamic linking.... Yeah, but look, the "dynamic linking" to the kernel text segment always works because there is "hardware support" for it. "" are there because it isn't really that great, but it does work. That is not the case for SunOS style software supported dynamic linking. If for some reason ld.so should get hashed by something then I can no longer run anything. Period. So the "dynamic linking" to the kernel is more robust (I think) because of hardware support, such as it is. Do we not care about having the same degree of robustness for libraries? Of course it is not unique to dynamic linking; it is just that nowadays on sunos i run ld everytime I run a program, and am thus significantly more exposed to problems should there be a problem with ld.so. Oh, heck, I will say it: like a virus in ld.so. With the way things work now on SunOS you can instantly infect every program on the system by changing one little file. > 2) They're not *completely* undetectable; jumping into the > middle of a function means you don't run the function prolog, > don't copy the right stuff into registers, etc. so there's > what I suspect is a good chance that the misbehaving program > won't misbehave silently.... Honest, I have seen this sort of thing happen. "This could never have worked"- except it did, for years. We really saw this when we made the big move from -11 to VAX in 1980. I can easily find linker screwups in a statically linked object with adb. Not so with dynamic linking. Not that this has ever happened (well, actually, it did to me once long ago), but there is a distinct difference in how easy it is to detect. My original question stands. This list generally discusses getting lotsa flops, but I don't see much discussion of whether there should be a second look at such things as architectural support for such things as dynamic linking. Does that mean there should not be? ron -- Grad student, ca 1976: Gosh, the v6 kernel is < 64K! Compare it to that OS/MVS hog at 400K! Grad student, ca 1986: Look at all the good stuff in Gnu Emacs for only 600K!