From cd50ea2f0a314da358d0f9a0afec3bb463dd769d Mon Sep 17 00:00:00 2001 From: Gunther Nikl Date: Tue, 23 Dec 2008 16:48:47 +0000 Subject: [PATCH] (MY_bfd_link_add_symbols): Define to override generic a.out function. (link_add_symbols): New wrapper function to handle symbols the same way as the amiga backend by using a generic linker function when doing a final link. This makes --wrap option of ld work. --- bfd/aout-amiga.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bfd/aout-amiga.c b/bfd/aout-amiga.c index ee67397..d06d8d9 100644 --- a/bfd/aout-amiga.c +++ b/bfd/aout-amiga.c @@ -52,6 +52,8 @@ get_relocated_section_contents PARAMS ((bfd *, struct bfd_link_info *, static unsigned long MY(get_mach) PARAMS ((enum machine_type)); static bfd_boolean MY(write_object_contents) PARAMS ((bfd *)); static bfd_boolean MY(set_sizes) PARAMS ((bfd *)); +static bfd_boolean MY(link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); +#define MY_bfd_link_add_symbols MY(link_add_symbols) static unsigned long MY(get_mach) (machtype) @@ -129,6 +131,16 @@ MY(set_sizes) (abfd) /* Include the usual a.out support. */ #include "aout-target.h" +static bfd_boolean +MY(link_add_symbols) (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + if (info->hash->creator->flavour == bfd_target_amiga_flavour) + return _bfd_generic_link_add_symbols (abfd, info); + return NAME(aout,link_add_symbols) (abfd, info); +} + /* Public final_link routine. */ bfd_boolean MY(final_link) (abfd, info)