aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-05-24 17:10:02 +0000
committerPaul Brook <paul@codesourcery.com>2006-05-24 17:10:02 +0000
commit4e617b1e975a43077d430dc131658b782bbc50d7 (patch)
tree96cda2ab935523f705e67954826709c7744e98b5 /bfd/elflink.c
parent52ab56c201e0e1ca13578ad061c3b7ffbeb6438c (diff)
downloadgdb-4e617b1e975a43077d430dc131658b782bbc50d7.zip
gdb-4e617b1e975a43077d430dc131658b782bbc50d7.tar.gz
gdb-4e617b1e975a43077d430dc131658b782bbc50d7.tar.bz2
2006-05-24 Paul Brook <paul@codesourcery.com>
bfd/ * elf-bfd.h (elf_backend_data): Add elf_backend_output_arch_local_syms * elf32-arm.c (output_arch_syminfo): Define. (elf32_arm_ouput_plt_map_sym, elf32_arm_output_plt_map, elf32_arm_output_arch_local_syms): New functions. (elf_backend_output_arch_local_syms): Define. * elflink.c (bfd_elf_final_link): Call elf_backend_output_arch_local_syms. * elfxx-target.h (elf_backend_output_arch_local_syms): Provide default definition. (elfNN_bed): Add elf_backend_output_arch_local_syms. ld/testsuite/ * ld-arm/arm-app-abs32.d: Update expected output. * ld-arm/arm-app.d: Ditto. * ld-arm/arm-lib-plt32.d: Ditto. * ld-arm/arm-lib.d: Ditto. * ld-arm/mixed-app-v5.d: Ditto. * ld-arm/mixed-app.d: Ditto. * ld-arm/mixed-lib.d: Ditto.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ff401f2..df2b7e9 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8296,6 +8296,19 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (eoinfo.failed)
return FALSE;
+ /* If backend needs to output some local symbols not present in the hash
+ table, do it now. */
+ if (bed->elf_backend_output_arch_local_syms)
+ {
+ typedef bfd_boolean (*out_sym_func)
+ (void *, const char *, Elf_Internal_Sym *, asection *,
+ struct elf_link_hash_entry *);
+
+ if (! ((*bed->elf_backend_output_arch_local_syms)
+ (abfd, info, &finfo, (out_sym_func) elf_link_output_sym)))
+ return FALSE;
+ }
+
/* That wrote out all the local symbols. Finish up the symbol table
with the global symbols. Even if we want to strip everything we
can, we still need to deal with those global symbols that got