Preliminary Notes on Porting GNU ld ----------------------------------- Before porting ld itself, you will need to port the BFD library; see ../bfd/PORTING. The 'host' is the system a tool runs *on*. The 'target' is the system a tool runs *for*, i.e. a tool can read/write the binaries of the target. Most often, host==target, but ld supports cross-linking (and to some extent the same ld binary can be used a linker for multiple target rachitectures). Porting to a new host --------------------- Pick a name for your host. Call that . You need to create the file config/mh-. Porting to a new target ----------------------- Pick a name for your target. Call that . You need to create at least config/mt-. It should contain EMUL= An controls the "personality" of ld, such as the default linker script. Usually, the will have teh same name as the , and you will need to create a new (see below). You will also need to edit Makefile.in and possible configure.in. To see how to do that, search for existing examples (e.g. sun3, sun4, hp300bsd). Porting to a new emulation target --------------------------------- Pick a name for your target. Call that . Usually, and are the same. You need to create at least .sh. You will also need to edit Makefile.in, To see how to do that, search for existing examples. The file .sh defines a set of parameter that are used to generate the emulation. Its syntax is that of a (Bourne) shell script, and it is "sourced" by genscripts.sh. Writing ---------------------- Usually, .sh contains: EMULATION_NAME= SCRIPT_NAME=