summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-05-24 17:10:01 +0000
committerPaul Brook <paul@codesourcery.com>2006-05-24 17:10:01 +0000
commit83f9d20be3b85b1e10258fe16fb89ad1fbbd9dcd (patch)
treed5ab74d7351011e8c4ea252bae25031f2bee44be /bfd/elflink.c
parentf049df84b595c984eb2c67c6f627d420dff43426 (diff)
downloadgdb-83f9d20be3b85b1e10258fe16fb89ad1fbbd9dcd.tar.gz
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 ff401f2c7d0..df2b7e9fb7a 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