aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-16 22:38:36 +0000
committerIan Lance Taylor <iant@google.com>2007-10-16 22:38:36 +0000
commit0c5e9c22aa5e70354471a6314c9c624c22719266 (patch)
treeb94bce685c6afa90a8a7fe7edd88fe8e558c1219 /gold/options.cc
parent928a4139f6eedb83ca83a58d42c2ba54ab8dd536 (diff)
downloadgdb-0c5e9c22aa5e70354471a6314c9c624c22719266.zip
gdb-0c5e9c22aa5e70354471a6314c9c624c22719266.tar.gz
gdb-0c5e9c22aa5e70354471a6314c9c624c22719266.tar.bz2
From Craig Silverstein: implement -Ttext.
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc50
1 files changed, 27 insertions, 23 deletions
diff --git a/gold/options.cc b/gold/options.cc
index ef7e411..c01d947 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -306,44 +306,46 @@ namespace gold
const options::One_option
options::Command_line_options::options[] =
{
- SPECIAL('l', "library", N_("Search for library LIBNAME"),
- N_("-lLIBNAME, --library LIBNAME"), TWO_DASHES,
- &library),
- SPECIAL('(', "start-group", N_("Start a library search group"), NULL,
- TWO_DASHES, &start_group),
- SPECIAL(')', "end-group", N_("End a library search group"), NULL,
- TWO_DASHES, &end_group),
+ POSDEP_NOARG('\0', "as-needed",
+ N_("Only set DT_NEEDED for dynamic libs if used"),
+ NULL, TWO_DASHES, &Position_dependent_options::set_as_needed),
+ POSDEP_NOARG('\0', "no-as-needed",
+ N_("Always DT_NEEDED for dynamic libs (default)"),
+ NULL, TWO_DASHES, &Position_dependent_options::clear_as_needed),
GENERAL_NOARG('E', "export-dynamic", N_("Export all dynamic symbols"),
NULL, TWO_DASHES, &General_options::set_export_dynamic),
+ GENERAL_NOARG('\0', "eh-frame-hdr", N_("Create exception frame header"),
+ NULL, TWO_DASHES, &General_options::set_create_eh_frame_hdr),
GENERAL_ARG('I', "dynamic-linker", N_("Set dynamic linker path"),
N_("-I PROGRAM, --dynamic-linker PROGRAM"), TWO_DASHES,
&General_options::set_dynamic_linker),
+ SPECIAL('l', "library", N_("Search for library LIBNAME"),
+ N_("-lLIBNAME, --library LIBNAME"), TWO_DASHES,
+ &library),
GENERAL_ARG('L', "library-path", N_("Add directory to search path"),
N_("-L DIR, --library-path DIR"), TWO_DASHES,
&General_options::add_to_search_path),
GENERAL_ARG('m', NULL, N_("Ignored for compatibility"), NULL, ONE_DASH,
&General_options::ignore),
- GENERAL_ARG('O', NULL, N_("Optimize output file size"),
- N_("-O level"), ONE_DASH,
- &General_options::set_optimization_level),
GENERAL_ARG('o', "output", N_("Set output file name"),
N_("-o FILE, --output FILE"), TWO_DASHES,
&General_options::set_output_file_name),
+ GENERAL_ARG('O', NULL, N_("Optimize output file size"),
+ N_("-O level"), ONE_DASH,
+ &General_options::set_optimization_level),
GENERAL_NOARG('r', NULL, N_("Generate relocatable output"), NULL,
ONE_DASH, &General_options::set_relocatable),
GENERAL_ARG('R', "rpath", N_("Add DIR to runtime search path"),
N_("-R DIR, -rpath DIR"), ONE_DASH,
&General_options::add_to_rpath),
- GENERAL_NOARG('s', "strip-all", N_("Strip all symbols"), NULL,
- TWO_DASHES, &General_options::set_strip_all),
- GENERAL_NOARG('S', "strip-debug", N_("Strip debugging information"), NULL,
- TWO_DASHES, &General_options::set_strip_debug),
- GENERAL_NOARG('\0', "eh-frame-hdr", N_("Create exception frame header"),
- NULL, TWO_DASHES, &General_options::set_create_eh_frame_hdr),
GENERAL_ARG('\0', "rpath-link",
N_("Add DIR to link time shared library search path"),
N_("--rpath-link DIR"), TWO_DASHES,
&General_options::add_to_rpath_link),
+ GENERAL_NOARG('s', "strip-all", N_("Strip all symbols"), NULL,
+ TWO_DASHES, &General_options::set_strip_all),
+ GENERAL_NOARG('S', "strip-debug", N_("Strip debugging information"), NULL,
+ TWO_DASHES, &General_options::set_strip_debug),
GENERAL_NOARG('\0', "shared", N_("Generate shared library"),
NULL, ONE_DASH, &General_options::set_shared),
GENERAL_NOARG('\0', "static", N_("Do not link against shared libraries"),
@@ -352,12 +354,9 @@ options::Command_line_options::options[] =
NULL, TWO_DASHES, &General_options::set_stats),
GENERAL_ARG('\0', "sysroot", N_("Set target system root directory"),
N_("--sysroot DIR"), TWO_DASHES, &General_options::set_sysroot),
- POSDEP_NOARG('\0', "as-needed",
- N_("Only set DT_NEEDED for dynamic libs if used"),
- NULL, TWO_DASHES, &Position_dependent_options::set_as_needed),
- POSDEP_NOARG('\0', "no-as-needed",
- N_("Always DT_NEEDED for dynamic libs (default)"),
- NULL, TWO_DASHES, &Position_dependent_options::clear_as_needed),
+ GENERAL_ARG('\0', "Ttext", N_("Set the address of the .text section"),
+ N_("-Ttext ADDRESS"), ONE_DASH,
+ &General_options::set_text_segment_address),
POSDEP_NOARG('\0', "whole-archive",
N_("Include all archive contents"),
NULL, TWO_DASHES,
@@ -366,6 +365,10 @@ options::Command_line_options::options[] =
N_("Include only needed archive contents"),
NULL, TWO_DASHES,
&Position_dependent_options::clear_whole_archive),
+ SPECIAL('(', "start-group", N_("Start a library search group"), NULL,
+ TWO_DASHES, &start_group),
+ SPECIAL(')', "end-group", N_("End a library search group"), NULL,
+ TWO_DASHES, &end_group),
SPECIAL('\0', "help", N_("Report usage information"), NULL,
TWO_DASHES, &help),
SPECIAL('v', "version", N_("Report version information"), NULL,
@@ -391,7 +394,8 @@ General_options::General_options()
is_shared_(false),
is_static_(false),
print_stats_(false),
- sysroot_()
+ sysroot_(),
+ text_segment_address_(-1U) // -1 indicates value not set by user
{
}