Importing C extern errno into HP-UX assembler



I have tried many various .IMPORT statements and intsructions
to import the C extern errno variable into a PA-RISC assembler
procedure in order to modify errno from the assembler program.
So far, everything I've tried either has no effect or causes
the program to crash. This is for a PA-RISC 1.1 architecture.
I have a main.c where errno is defined with errno.h, and the
assembler subroutine which needs to be able to modify errno.
I assemble the procedure into a .o file, then use cc to compile
main.c and link it to the .o file. Does anyone have a fully
detailed example of what I need to do to accomplish this?
.