- /* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
- --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
- --dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
- for shared libraries. -Bsymbolic overrides all others and vice
- versa. */
- switch (command_line.symbolic)
- {
- case symbolic_unset:
- break;
- case symbolic:
- /* -Bsymbolic is for shared library only. */
- if (bfd_link_dll (&link_info))
- {
- link_info.symbolic = TRUE;
- /* Should we free the unused memory? */
- link_info.dynamic_list = NULL;
- command_line.dynamic_list = dynamic_list_unset;
- }
- break;
- case symbolic_functions:
- /* -Bsymbolic-functions is for shared library only. */
- if (bfd_link_dll (&link_info))
- command_line.dynamic_list = dynamic_list_data;
- break;
- }
+ /* -Bsymbolic and -Bsymbols-functions are for shared library output. */
+ if (bfd_link_dll (&link_info))
+ switch (opt_symbolic)
+ {
+ case symbolic_unset:
+ break;
+ case symbolic:
+ link_info.symbolic = TRUE;
+ if (link_info.dynamic_list)
+ {
+ struct bfd_elf_version_expr *ent, *next;
+ for (ent = link_info.dynamic_list->head.list; ent; ent = next)
+ {
+ next = ent->next;
+ free (ent);
+ }
+ free (link_info.dynamic_list);
+ link_info.dynamic_list = NULL;
+ }
+ opt_dynamic_list = dynamic_list_unset;
+ break;
+ case symbolic_functions:
+ opt_dynamic_list = dynamic_list_data;
+ break;
+ }