diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2001-08-13 07:24:58 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2001-08-13 07:24:58 +0000 |
commit | 55ab6103c5aa25c2eb95b94bbab33c3134b48b95 (patch) | |
tree | e9261674606ec2911d9a0b924ca8d4b7bc7d813a /ld | |
parent | a9022147a2a0acc50711501271a727e6aaa7acc8 (diff) | |
download | gdb-55ab6103c5aa25c2eb95b94bbab33c3134b48b95.zip gdb-55ab6103c5aa25c2eb95b94bbab33c3134b48b95.tar.gz gdb-55ab6103c5aa25c2eb95b94bbab33c3134b48b95.tar.bz2 |
* emultempl/generic.em: Support EXTRA_EM_FILE.
(ld_${EMULATION_NAME}_emulation): Support emulation parameters
LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
LDEMUL_FIND_POTENTIAL_LIBRARIES.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 14 | ||||
-rw-r--r-- | ld/emultempl/generic.em | 59 |
2 files changed, 52 insertions, 21 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index ccf462f..3b0724f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,17 @@ +2001-08-13 Hans-Peter Nilsson <hp@bitrange.com> + + * emultempl/generic.em: Support EXTRA_EM_FILE. + (ld_${EMULATION_NAME}_emulation): Support emulation parameters + LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL, + LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION, + LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET, + LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH, + LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS, + LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN, + LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE, + LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE, + LDEMUL_FIND_POTENTIAL_LIBRARIES. + 2001-08-12 Richard Henderson <rth@redhat.com> * scripttempl/elf.sc, scripttempl/elfd30v.sc, diff --git a/ld/emultempl/generic.em b/ld/emultempl/generic.em index cb5c30c..ca1f444 100644 --- a/ld/emultempl/generic.em +++ b/ld/emultempl/generic.em @@ -42,6 +42,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); +EOF + +# Import any needed special functions and/or overrides. +# +if test -n "$EXTRA_EM_FILE" ; then +. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em +fi + +if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then +cat >>e${EMULATION_NAME}.c <<EOF + static void gld${EMULATION_NAME}_before_parse() { @@ -50,6 +61,12 @@ gld${EMULATION_NAME}_before_parse() #endif /* not TARGET_ */ } +EOF +fi + +if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then +cat >>e${EMULATION_NAME}.c <<EOF + static char * gld${EMULATION_NAME}_get_script(isfile) int *isfile; @@ -99,34 +116,34 @@ cat >>e${EMULATION_NAME}.c <<EOF return "ldscripts/${EMULATION_NAME}.x"; } EOF - +fi fi cat >>e${EMULATION_NAME}.c <<EOF struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { - gld${EMULATION_NAME}_before_parse, - syslib_default, - hll_default, - after_parse_default, - after_open_default, - after_allocation_default, - set_output_arch_default, - ldemul_default_target, - before_allocation_default, - gld${EMULATION_NAME}_get_script, + ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse}, + ${LDEMUL_SYSLIB-syslib_default}, + ${LDEMUL_HLL-hll_default}, + ${LDEMUL_AFTER_PARSE-after_parse_default}, + ${LDEMUL_AFTER_OPEN-after_open_default}, + ${LDEMUL_AFTER_ALLOCATION-after_allocation_default}, + ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default}, + ${LDEMUL_CHOOSE_TARGET-ldemul_default_target}, + ${LDEMUL_BEFORE_ALLOCATION-before_allocation_default}, + ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script}, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - NULL, /* finish */ - NULL, /* create output section statements */ - NULL, /* open dynamic archive */ - NULL, /* place orphan */ - NULL, /* set symbols */ - NULL, /* parse args */ - NULL, /* unrecognized file */ - NULL, /* list options */ - NULL, /* recognized file */ - NULL /* find_potential_libraries */ + ${LDEMUL_FINISH-NULL}, + ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL}, + ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-NULL}, + ${LDEMUL_PLACE_ORPHAN-NULL}, + ${LDEMUL_SET_SYMBOLS-NULL}, + ${LDEMUL_PARSE_ARGS-NULL}, + ${LDEMUL_UNRECOGNIZED_FILE-NULL}, + ${LDEMUL_LIST_OPTIONS-NULL}, + ${LDEMUL_RECOGNIZED_FILE-NULL}, + ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL} }; EOF |