From c4c8d06b1abd8ea46788e4990690c696bf6edf7f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 16 Jan 2007 14:56:31 +0000 Subject: [PATCH] bfd/ 2007-01-16 H.J. Lu PR ld/3831 * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an argument, Elf_Internal_Sym *. * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data symbol dynamic if info->dynamic_data is TRUE. (bfd_elf_record_link_assignment): Updated call to bfd_elf_record_link_assignment. (_bfd_elf_merge_symbol): Likewise. Always call bfd_elf_link_mark_dynamic_symbol. include/ 2007-01-16 H.J. Lu PR ld/3831 * bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list. Add dynamic and dynamic_data. ld/ 2007-01-16 H.J. Lu PR ld/3831 * NEWS: Mention -Bsymbolic-functions, --dynamic-list-data and --dynamic-list-cpp-new. * ld.texinfo: Document -Bsymbolic-functions, --dynamic-list-data and --dynamic-list-cpp-new. * ldlang.c (lang_append_dynamic_list_cpp_new): New. (lang_process): Change link_info.dynamic to link_info.dynamic_list. (lang_append_dynamic_list): Likewise. * ldmain.c (main): Likewise. Initialize link_info.dynamic and link_info.dynamic_data to FALSE. * ldlang.h (lang_append_dynamic_list_cpp_new): New. * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST_DATA and OPTION_DYNAMIC_LIST_CPP_NEW. (ld_options): Add entries for -Bsymbolic-functions, --dynamic-list-data and --dynamic-list-cpp-new. Make -Bsymbolic-functions an alias of --dynamic-list-data. (parse_args): Change link_info.dynamic to link_info.dynamic_list. Set link_info.dynamic to TRUE for --dynamic-list and --dynamic-list-cpp-typeinfo. Handle --dynamic-list-data and --dynamic-list-cpp-new. ld/testsuite/ 2007-01-16 H.J. Lu PR ld/3831 * ld-elf/del.cc: New. * ld-elf/dl5.cc: Likewise. * ld-elf/dl5.out: Likewise. * ld-elf/new.cc: Likewise. * ld-elf/shared.exp: Add tests for --dynamic-list-data and --dynamic-list-cpp-new. --- include/ChangeLog | 8 +++++++- include/bfdlink.h | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/ChangeLog b/include/ChangeLog index 7f3966ca1..8a3fbb131 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,10 +1,16 @@ +2007-01-16 H.J. Lu + + PR ld/3831 + * bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list. + Add dynamic and dynamic_data. + 2006-12-05 Michael Tautschnig Nick Clifton * ansidecl.h (ATTRIBUTE_PACKED): Define. 2006-11-30 Andrew Stubbs - J"orn Rennecke + J"orn Rennecke PR driver/29931 * libiberty.h (make_relative_prefix_ignore_links): Declare. diff --git a/include/bfdlink.h b/include/bfdlink.h index 228cab8fd..6842243d0 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -340,6 +340,13 @@ struct bfd_link_info caching ELF symbol buffer. */ unsigned int reduce_memory_overheads: 1; + /* TRUE if all data symbols should be dynamic. */ + unsigned int dynamic_data: 1; + + /* TRUE if some symbols have to be dynamic, controlled by + --dynamic-list command line options. */ + unsigned int dynamic: 1; + /* What to do with unresolved symbols in an object file. When producing executables the default is GENERATE_ERROR. When producing shared libraries the default is IGNORE. The @@ -440,7 +447,7 @@ struct bfd_link_info bfd_vma relro_start, relro_end; /* List of symbols should be dynamic. */ - struct bfd_elf_dynamic_list *dynamic; + struct bfd_elf_dynamic_list *dynamic_list; }; /* This structures holds a set of callback functions. These are