(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.
This commit is contained in:
Gunther Nikl
2008-12-23 16:48:47 +00:00
parent 31f7d6e4ba
commit cd50ea2f0a
+12
View File
@@ -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)