(do_assignments_default): New function.
* ldemul.h (ldemul_do_assignments): Declare.
(do_assignments_default): Declare.
(struct ld_emulation_xfer_struct): Add do_assignments.
* ldlang.c (lang_do_assignments) Call ldemul_do_assignments.
* emultempl/aix.em (ld_*_emulation): Init do_assignments field.
* emultempl/armcoff.em: Likewise.
* emultempl/beos.em: Likewise.
* emultempl/generic.em: Likewise.
* emultempl/gld960.em: Likewise.
* emultempl/gld960c.em: Likewise.
* emultempl/linux.em: Likewise.
* emultempl/lnk960.em: Likewise.
* emultempl/m68kcoff.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/sunos.em: Likewise.
* emultempl/ticoff.em: Likewise.
* emultempl/vanilla.em: Likewise.
* emultempl/elf32.em: Likewise, to call gld*_provide_init_fini_syms.
(gld*_find_exp_assignment): Adjust bfd_elf_record_link_assignment call.
+2005-07-15 Alan Modra <amodra@bigpond.net.au>
+
+ * ldemul.c (ldemul_do_assignments): New function.
+ (do_assignments_default): New function.
+ * ldemul.h (ldemul_do_assignments): Declare.
+ (do_assignments_default): Declare.
+ (struct ld_emulation_xfer_struct): Add do_assignments.
+ * ldlang.c (lang_do_assignments) Call ldemul_do_assignments.
+ * emultempl/aix.em (ld_*_emulation): Init do_assignments field.
+ * emultempl/armcoff.em: Likewise.
+ * emultempl/beos.em: Likewise.
+ * emultempl/generic.em: Likewise.
+ * emultempl/gld960.em: Likewise.
+ * emultempl/gld960c.em: Likewise.
+ * emultempl/linux.em: Likewise.
+ * emultempl/lnk960.em: Likewise.
+ * emultempl/m68kcoff.em: Likewise.
+ * emultempl/pe.em: Likewise.
+ * emultempl/sunos.em: Likewise.
+ * emultempl/ticoff.em: Likewise.
+ * emultempl/vanilla.em: Likewise.
+ * emultempl/elf32.em: Likewise, to call gld*_provide_init_fini_syms.
+ (gld*_find_exp_assignment): Adjust bfd_elf_record_link_assignment call.
+
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C and M16C.
gld${EMULATION_NAME}_set_output_arch,
gld${EMULATION_NAME}_choose_target,
gld${EMULATION_NAME}_before_allocation,
+ do_assignments_default,
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
set_output_arch_default,
ldemul_default_target,
gld${EMULATION_NAME}_before_allocation,
+ do_assignments_default,
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
set_output_arch_default,
ldemul_default_target,
gld_${EMULATION_NAME}_before_allocation,
+ do_assignments_default,
gld_${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
will do no harm. */
if (strcmp (exp->assign.dst, ".") != 0)
{
- if (!bfd_elf_record_link_assignment (output_bfd, &link_info,
- exp->assign.dst, provide))
+ if (!bfd_elf_record_link_assignment (&link_info, exp->assign.dst,
+ provide))
einfo ("%P%F: failed to record assignment to %s: %E\n",
exp->assign.dst);
}
${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
${LDEMUL_BEFORE_ALLOCATION-gld${EMULATION_NAME}_before_allocation},
+ ${LDEMUL_DO_ASSIGNMENTS-gld${EMULATION_NAME}_provide_init_fini_syms},
${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
${LDEMUL_BEFORE_ALLOCATION-before_allocation_default},
+ ${LDEMUL_DO_ASSIGNMENTS-do_assignments_default},
${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
gld960_set_output_arch,
gld960_choose_target,
before_allocation_default,
+ do_assignments_default,
gld960_get_script,
"960",
"",
gld960_set_output_arch,
gld960_choose_target,
before_allocation_default,
+ do_assignments_default,
gld960_get_script,
"960coff",
"",
set_output_arch_default,
ldemul_default_target,
gld${EMULATION_NAME}_before_allocation,
+ do_assignments_default,
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
lnk960_set_output_arch,
lnk960_choose_target,
before_allocation_default,
+ do_assignments_default,
lnk960_get_script,
"lnk960",
"",
set_output_arch_default,
ldemul_default_target,
before_allocation_default,
+ do_assignments_default,
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
set_output_arch_default,
ldemul_default_target,
gld_${EMULATION_NAME}_before_allocation,
+ do_assignments_default,
gld_${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
set_output_arch_default,
ldemul_default_target,
gld${EMULATION_NAME}_before_allocation,
+ do_assignments_default,
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
set_output_arch_default,
ldemul_default_target,
before_allocation_default,
+ do_assignments_default,
gld_${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
vanilla_set_output_arch,
ldemul_default_target,
before_allocation_default,
+ do_assignments_default,
vanilla_get_script,
"vanilla",
"a.out-sunos-big",
ld_emulation->before_allocation ();
}
+void
+ldemul_do_assignments (void)
+{
+ ld_emulation->do_assignments ();
+}
+
void
ldemul_set_output_arch (void)
{
strip_excluded_output_sections ();
}
+void
+do_assignments_default (void)
+{
+}
+
void
set_output_arch_default (void)
{
/* ld-emul.h - Linker emulation header file
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003, 2004
+ 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
(void);
extern void ldemul_before_allocation
(void);
+extern void ldemul_do_assignments
+ (void);
extern void ldemul_set_output_arch
(void);
extern char *ldemul_choose_target
(void);
extern void before_allocation_default
(void);
+extern void do_assignments_default
+ (void);
extern void set_output_arch_default
(void);
extern void syslib_default
/* Run before allocating output sections. */
void (*before_allocation) (void);
+ /* Run to set special symbols at the same time as link script syms. */
+ void (*do_assignments) (void);
+
/* Return the appropriate linker script. */
char * (*get_script) (int *isfile);
{
lang_statement_iteration++;
lang_do_assignments_1 (statement_list.head, abs_output_section, NULL, 0);
+ ldemul_do_assignments ();
}
/* Fix any .startof. or .sizeof. symbols. When the assemblers see the