aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-11-15 12:44:03 +0000
committerAlan Modra <amodra@gmail.com>2001-11-15 12:44:03 +0000
commitc56feb2b8c5a2d4a3dc92317d7f547e2c89feb8a (patch)
tree8e431d3328f359303ec6a86c820b3f4274742e0a /ld/emultempl/elf32.em
parentc86380b5864fac8325a2b3abbc684df5d42696ca (diff)
downloadgdb-c56feb2b8c5a2d4a3dc92317d7f547e2c89feb8a.zip
gdb-c56feb2b8c5a2d4a3dc92317d7f547e2c89feb8a.tar.gz
gdb-c56feb2b8c5a2d4a3dc92317d7f547e2c89feb8a.tar.bz2
* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
function when LDEMUL_FINISH isn't set to the same name. Don't call ${LDEMUL_FINISH}. (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined. * emultempl/armelf.em (arm_elf_finish): Call gld${EMULATION_NAME}_finish. * emultempl/hppaelf.em (hppaelf_finish): Rename to gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and hppaelf_layout_sections_again if necessary. (need_laying_out): New var. (hppaelf_layaout_sections_again): Rename to hppaelf_layout_sections_again. Clear need_laying_out. (PARSE_AND_LIST_OPTIONS): Format text.
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r--ld/emultempl/elf32.em9
1 files changed, 6 insertions, 3 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 27c2954..3acc8fa 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1320,12 +1320,15 @@ gld${EMULATION_NAME}_place_orphan (file, s)
return true;
}
+EOF
+fi
+
+if test x"$LDEMUL_FINISH" != xgld"$EMULATION_NAME"_finish; then
+cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_finish ()
{
- ${LDEMUL_FINISH+${LDEMUL_FINISH} ();}
-
if (bfd_elf${ELFSIZE}_discard_info (&link_info))
{
/* Resize the sections. */
@@ -1639,7 +1642,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- gld${EMULATION_NAME}_finish,
+ ${LDEMUL_FINISH-gld${EMULATION_NAME}_finish},
${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
${LDEMUL_OPEN_DYNAMIC_ARCHIVE-gld${EMULATION_NAME}_open_dynamic_archive},
${LDEMUL_PLACE_ORPHAN-gld${EMULATION_NAME}_place_orphan},