Compiling Device Drivers for AIX 3.1

Steve DeJarnett steve at panews.awdpa.ibm.com
Wed Mar 27 04:04:37 AEST 1991


In article <39757 at netnews.upenn.edu> massa at 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 at 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.......



More information about the Comp.unix.aix mailing list