i386-netware-ld target for Netware NLM files with C++ support

Bernd Herd herdsoft@t-online.de
Sat Apr 19 17:33:00 GMT 2003


I've developed a patch to the i386-netware target to allow creation of 
NLMs from C++ sources. The work consists of two parts concerning binutils:
- Extension of the linker scripts for netware
- A shell script to integrate nlmconv into the link process.

The whole project is downloadable and documented at 

NLMs were conventionally created with binutils by combining ld and 
nlmconv. ld is used for a -Ur partial link to an ELF target and nlmconv 
converts the ELF to the NLM format speciying a lot of options in a 
linker definition file.

Since handling this is very uncomfortable, I've integrated nlmconv into 
the link process by creating a BASH script "ld" that parses the 
parameters passed from gcc, creates temporary control files and runs the 
GNU linker "gld" and "nlmconv". That way compilation to the netware 
target works exactly as to a unix target:

i386-netware-g++ -o hello.nlm hello.cpp


i386-netware-gcc -s -shared -o dll.nlm dll.c
i386-netware-gcc -s -o app.nlm app.c dll.nlm

The appraoch also allows to run configure scripts for the netware target 
as long as the configure scripts are prepared for cross-compilation.

Any suggestion on how to integrate the "ld" script approach into the 
binutils distribution?


	Bernd Herd


Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

More information about the crossgcc mailing list