aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-01-19 15:13:29 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-01-19 15:13:29 +0000
commitd8cf8b513333c644cc5305eff9d5c0dfcac69de5 (patch)
tree56edbe9735dd0cdbcd4825f6d4321552670f4b63 /ld/lexsup.c
parentb81428656759ee87a5619f8495c04123ec71d582 (diff)
downloadgdb-d8cf8b513333c644cc5305eff9d5c0dfcac69de5.zip
gdb-d8cf8b513333c644cc5305eff9d5c0dfcac69de5.tar.gz
gdb-d8cf8b513333c644cc5305eff9d5c0dfcac69de5.tar.bz2
ld/
2007-01-19 H.J. Lu <hongjiu.lu@intel.com> * ld.h (args_type): Add new symbolic and dynamic_list fields. * ld.texinfo: Update -Bsymbolic-functions. * ldmain.c (main): Initialize command_line.symbolic to symbolic_unset and command_line.dynamic_list to dynamic_list_unset. Check -Bsymbolic, -Bsymbolic-functions and --dynamic-list* before setting link_info.symbolic, link_info.dynamic and link_info.dynamic_data. * lexsup.c (option_values): Add OPTION_SYMBOLIC_FUNCTIONS. (ld_options): Use OPTION_SYMBOLIC_FUNCTIONS with -Bsymbolic-functions. (parse_args): Handle -Bsymbolic-functions. Don't set link_info.dynamic, link_info.dynamic_data and link_info.symbolic here. Set command_line.symbolic for -Bsymbolic. Set command_line.dynamic_list and command_line.symbolic for --dynamic-list-data, --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and --dynamic-list. ld/testsuite/ 2007-01-19 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/dl6.c: New file. * ld-elf/dl6a.out: Likewise. * ld-elf/dl6amain.c: Likewise. * ld-elf/dl6b.out: Likewise. * ld-elf/dl6bmain.c: Likewise. * ld-elf/dl6cmain.c: Likewise. * ld-elf/dl6dmain.c: Likewise. * ld-elf/shared.exp: Add new tests for -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data and --dynamic-list-cpp-new.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 125a987..a95b117 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -97,6 +97,7 @@ enum option_values
OPTION_SORT_SECTION,
OPTION_STATS,
OPTION_SYMBOLIC,
+ OPTION_SYMBOLIC_FUNCTIONS,
OPTION_TASK_LINK,
OPTION_TBSS,
OPTION_TDATA,
@@ -353,7 +354,7 @@ static const struct ld_option ld_options[] =
'\0', NULL, NULL, ONE_DASH },
{ {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
'\0', NULL, N_("Bind global references locally"), ONE_DASH },
- { {"Bsymbolic-functions", no_argument, NULL, OPTION_DYNAMIC_LIST_DATA},
+ { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
'\0', NULL, N_("Bind global function references locally"), ONE_DASH },
{ {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
'\0', NULL, N_("Check section addresses for overlaps (default)"),
@@ -1144,7 +1145,10 @@ parse_args (unsigned argc, char **argv)
config.stats = TRUE;
break;
case OPTION_SYMBOLIC:
- link_info.symbolic = TRUE;
+ command_line.symbolic = symbolic;
+ break;
+ case OPTION_SYMBOLIC_FUNCTIONS:
+ command_line.symbolic = symbolic_functions;
break;
case 't':
trace_files = TRUE;
@@ -1261,16 +1265,23 @@ parse_args (unsigned argc, char **argv)
command_line.version_exports_section = optarg;
break;
case OPTION_DYNAMIC_LIST_DATA:
- link_info.dynamic_data = TRUE;
- link_info.dynamic = TRUE;
+ command_line.dynamic_list = dynamic_list_data;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
break;
case OPTION_DYNAMIC_LIST_CPP_TYPEINFO:
lang_append_dynamic_list_cpp_typeinfo ();
- link_info.dynamic = TRUE;
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
break;
case OPTION_DYNAMIC_LIST_CPP_NEW:
lang_append_dynamic_list_cpp_new ();
- link_info.dynamic = TRUE;
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
break;
case OPTION_DYNAMIC_LIST:
/* This option indicates a small script that only specifies
@@ -1285,7 +1296,10 @@ parse_args (unsigned argc, char **argv)
parser_input = input_dynamic_list;
yyparse ();
}
- link_info.dynamic = TRUE;
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
break;
case OPTION_WARN_COMMON:
config.warn_common = TRUE;