*BSD News Article 49144


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!newsroom.utas.edu.au!munnari.oz.au!spool.mu.edu!agate!nickkral
From: nickkral@sextans.EECS.Berkeley.EDU (Nick Kralevich)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: porting Linux apps to BSD !
Date: 23 Aug 1995 20:52:08 GMT
Organization: Electrical Engineering Computer Science Department, University of California at Berkeley
Lines: 43
Message-ID: <41g4do$3cq@agate.berkeley.edu>
References: <aak2.808728796@Ra.MsState.Edu> <41dkk4$fbn@news.rwth-aachen.de> <41epcd$bn4@agate.berkeley.edu> <41fkii$8mo@news.rwth-aachen.de>
NNTP-Posting-Host: sextans.eecs.berkeley.edu

In article <41fkii$8mo@news.rwth-aachen.de>,
Guido Muesch <odiug@gom.informatik.rwth-aachen.de> wrote:
>Under Linux it does nothing.
>(Kernel 1.2.8, a.out binaries, libc 4.5.21 I think).

It could be the library version (which seems sorta old).  I've heard 
a report that one of the early versions of ELF had a problem with not 
unmapping the zero page.  But that problem has either been fixed, or is 
in the process of being fixed. 

Here's the specific test that you ran:

----- Begin -----
caa32:~/tmp> cat foo.c
#include <stdio.h>
#include <string.h>

main() {
        char * foo = NULL;
        char * bar = NULL;
        strcmp (foo, bar);
}
caa32:~/tmp> gcc foo.c -o foo
caa32:~/tmp> uname -a
Linux caa32 1.2.13 #3 Wed Aug 9 11:53:18 PDT 1995 i586
caa32:~/tmp> uptime
  1:53pm  up 13 days, 20:41,  2 users,  load average: 0.00, 0.00, 0.00
caa32:~/tmp> gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/2.6.3/specs
gcc version 2.6.3
caa32:~/tmp> ldd ./foo
        libc.so.4 (DLL Jump 4.6pl27) => /lib/libc.so.4.6.27
caa32:~/tmp> file ./foo
./foo: Linux/i386 demand-paged executable (QMAGIC) not stripped
caa32:~/tmp> ./foo
Segmentation fault
----- End -----

Take care,
-- Nick Kralevich
   nickkral@cory.eecs.berkeley.edu