aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-12-18 20:42:43 +0000
committerRoland McGrath <roland@gnu.org>2012-12-18 20:42:43 +0000
commit9d5777a34cbf1c1497e1c76f455381a643dfd2b1 (patch)
tree5afc8b030a3c49c0abad86312ca5a052870a35bc /ld/lexsup.c
parentd8a4f9280adc96f46d63bbdbfd089fc9c7c30b3e (diff)
downloadgdb-9d5777a34cbf1c1497e1c76f455381a643dfd2b1.zip
gdb-9d5777a34cbf1c1497e1c76f455381a643dfd2b1.tar.gz
gdb-9d5777a34cbf1c1497e1c76f455381a643dfd2b1.tar.bz2
ld/
* ld.texinfo (Options): Describe -Trodata-segment. * ldlex.h (enum option_values): Add OPTION_TRODATA_SEGMENT. * lexsup.c (ld_options, parse_args): Handle -Trodata-segment. * scripttempl/elf.sc (RODATA_ADDR, SHLIB_RODATA_ADDR): Wrap SEGMENT_START("rodata-segment", ...) + SIZEOF_HEADERS around the value.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index be8a897..35041b1 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -405,13 +405,13 @@ static const struct ld_option ld_options[] =
{ {"pic-executable", no_argument, NULL, OPTION_PIE},
'\0', NULL, NULL, TWO_DASHES },
{ {"sort-common", optional_argument, NULL, OPTION_SORT_COMMON},
- '\0', N_("[=ascending|descending]"),
- N_("Sort common symbols by alignment [in specified order]"),
+ '\0', N_("[=ascending|descending]"),
+ N_("Sort common symbols by alignment [in specified order]"),
TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
'\0', NULL, NULL, NO_HELP },
{ {"sort-section", required_argument, NULL, OPTION_SORT_SECTION},
- '\0', N_("name|alignment"),
+ '\0', N_("name|alignment"),
N_("Sort sections by name or maximum alignment"), TWO_DASHES },
{ {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
'\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"),
@@ -441,6 +441,8 @@ static const struct ld_option ld_options[] =
'\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
{ {"Ttext-segment", required_argument, NULL, OPTION_TTEXT_SEGMENT},
'\0', N_("ADDRESS"), N_("Set address of text segment"), ONE_DASH },
+ { {"Trodata-segment", required_argument, NULL, OPTION_TRODATA_SEGMENT},
+ '\0', N_("ADDRESS"), N_("Set address of rodata segment"), ONE_DASH },
{ {"unresolved-symbols=<method>", required_argument, NULL,
OPTION_UNRESOLVED_SYMBOLS},
'\0', NULL, N_("How to handle unresolved symbols. <method> is:\n"
@@ -1191,6 +1193,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_TTEXT_SEGMENT:
set_segment_start (".text-segment", optarg);
break;
+ case OPTION_TRODATA_SEGMENT:
+ set_segment_start (".rodata-segment", optarg);
+ break;
case OPTION_TRADITIONAL_FORMAT:
link_info.traditional_format = TRUE;
break;