massa@eniac.seas.upenn.edu (Michael Massa ) (03/26/91)
Does anyone know the correct "ld" options for linking a device driver? 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. Mike Massa Distributed Systems Laboratory University of Pennsylvania -- Mike Massa University of Pennsylvania Distributed Systems Laboratory
steve@panews.awdpa.ibm.com (Steve DeJarnett) (03/27/91)
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.......