Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!panews.awdpa.ibm.com!qe2.awdpa.ibm.com!steve From: steve@panews.awdpa.ibm.com (Steve DeJarnett) Newsgroups: comp.unix.aix Subject: Re: Compiling Device Drivers for AIX 3.1 Keywords: device driver Message-ID: <1991Mar26.180437.25868@ibmpa.awdpa.ibm.com> Date: 26 Mar 91 18:04:37 GMT References: <39757@netnews.upenn.edu> Sender: news@ibmpa.awdpa.ibm.com (news id) Reply-To: steve@qe2.awdpa.ibm.com (Steve DeJarnett) Organization: IBM Personal Systems Programming, Palo Alto Lines: 22 In article <39757@netnews.upenn.edu> massa@eniac.seas.upenn.edu (Michael Massa ) writes: >Does anyone know the correct "ld" options for linking a device driver? cc -o yourdd yourdd.o -eyour_entrypoint -bimport:/lib/kernex.exp -bimport:/lib/syscalls.exp -lsys -lcsys Note that this should all be on the same line. >Anytime I access autoinitialized global variables or use a string constant >in my code, I generate an instruction storage interrupt. I suspect I'm >linking wrong. Thanks. You were probably getting a libc routine instead of the corresponding kernel-mode routine. This sounds very familiar. Everyone I know has had this happen at least once during driver development. Hope that helps, Steve DeJarnett Internet: steve@ibmpa.awdpa.ibm.com IBM PSP Palo Alto UUCP: uunet!ibmpa.awdpa.ibm.com!steve (415) 855-3510 IBM VNET: dejarnet at ausvmq These opinions are my own. I doubt IBM wants them.......