[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 `emulparams' scripts

Each target selects a particular file in the `emulparams' directory by setting the shell variable targ_emul in `configure.tgt'. This shell variable is used by the `configure' script to control building an emulation source file.

Certain conventions are enforced. Suppose the targ_emul variable is set to emul in `configure.tgt'. The name of the emulation shell script will be `emulparams/emul.sh'. The `Makefile' must have a target named `eemul.c'; this target must depend upon `emulparams/emul.sh', as well as the appropriate scripts in the `scripttempl' and `emultempl' directories. The `Makefile' target must invoke GENSCRIPTS with two arguments: emul, and the value of the make variable tdir_emul. The value of the latter variable will be set by the `configure' script, and is used to set the default target directory to search.

By convention, the `emulparams/emul.sh' shell script should only set shell variables. It may set shell variables which are to be interpreted by the `scripttempl' and the `emultempl' scripts. Certain shell variables are interpreted directly by the `genscripts.sh' script.

Here is a list of shell variables interpreted by `genscripts.sh', as well as some conventional shell variables interpreted by the `scripttempl' and `emultempl' scripts.

SCRIPT_NAME
This is the name of the `scripttempl' script to use. If SCRIPT_NAME is set to script, `genscripts.sh' will use the script `scriptteml/script.sc'.

TEMPLATE_NAME
This is the name of the `emultemlp' script to use. If TEMPLATE_NAME is set to template, `genscripts.sh' will use the script `emultempl/template.em'. If this variable is not set, the default value is `generic'.

GENERATE_SHLIB_SCRIPT
If this is set to a nonempty string, `genscripts.sh' will invoke the `scripttempl' script an extra time to create a shared library script. 2.2 `scripttempl' scripts.

OUTPUT_FORMAT
This is normally set to indicate the BFD output format use (e.g., `"a.out-sunos-big"'. The `scripttempl' script will normally use it in an OUTPUT_FORMAT expression in the linker script.

ARCH
This is normally set to indicate the architecture to use (e.g., `sparc'). The `scripttempl' script will normally use it in an OUTPUT_ARCH expression in the linker script.

ENTRY
Some `scripttempl' scripts use this to set the entry address, in an ENTRY expression in the linker script.

TEXT_START_ADDR
Some `scripttempl' scripts use this to set the start address of the `.text' section.

NONPAGED_TEXT_START_ADDR
If this is defined, the `genscripts.sh' script sets TEXT_START_ADDR to its value before running the `scripttempl' script for the -n and -N options (see section 2.2 `scripttempl' scripts).

SEGMENT_SIZE
The `genscripts.sh' script uses this to set the default value of DATA_ALIGNMENT when running the `scripttempl' script.

TARGET_PAGE_SIZE
If SEGMENT_SIZE is not defined, the `genscripts.sh' script uses this to define it.

ALIGNMENT
Some `scripttempl' scripts set this to a number to pass to ALIGN to set the required alignment for the end symbol.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by system on December, 2 2004 using texi2html