aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-07-08 15:06:29 +0000
committerIan Lance Taylor <ian@airs.com>1994-07-08 15:06:29 +0000
commitdb770dfa72e101b6c22fb9c2da4f0d25628dc22f (patch)
treec041c989a333f8906a0d125d0850cdbd11f967e7 /ld
parent13d9fd33a40823f3fbc84f7e739eb0f567fcb714 (diff)
downloadgdb-db770dfa72e101b6c22fb9c2da4f0d25628dc22f.zip
gdb-db770dfa72e101b6c22fb9c2da4f0d25628dc22f.tar.gz
gdb-db770dfa72e101b6c22fb9c2da4f0d25628dc22f.tar.bz2
* lexsup.c (parse_args): Changed "retain-symbols-file" from
no_argument to required_argument. From djm.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog14
-rw-r--r--ld/lexsup.c46
2 files changed, 54 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9f338c8..1fee7b1 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,17 @@
+Fri Jul 8 10:57:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Use
+ bfd_abs_section_ptr, not &bfd_abs_section.
+
+ * lexsup.c (parse_args): Changed "retain-symbols-file" from
+ no_argument to required_argument. From djm.
+
+Thu Jul 7 12:29:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * scripttempl/elf.sc: Explicitly mention .stab and .stabstr
+ sections to force a VMA of 0; needed for ELF backends which have
+ not been converted to the new linker style.
+
Mon Jul 4 19:35:45 1994 Jeff Law (law@snake.cs.utah.edu)
* scripttempl/hppaelf.sc (__stack_zero): Don't define this name,
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 4a0aad4..128f0b6 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -46,12 +46,15 @@ parse_args (argc, argv)
int argc;
char **argv;
{
+ int ingroup = 0;
+
/* Starting the short option string with '-' is for programs that
expect options and other ARGV-elements in any order and that care about
the ordering of the two. We describe each non-option ARGV-element
as if it were the argument of an option with character code 1. */
- const char *shortopts = "-A:B::b:cde:F::G:giL:l:Mm:NnO:o:R:rSsT:tu:VvXxY:y:";
+ const char *shortopts =
+ "-A:B::b:cde:F::G:giL:l:Mm:NnO:o:R:rSsT:tu:VvXxY:y:()";
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
@@ -69,7 +72,8 @@ parse_args (argc, argv)
#define OPTION_OFORMAT (OPTION_NON_SHARED + 1)
#define OPTION_RELAX (OPTION_OFORMAT + 1)
#define OPTION_RETAIN_SYMBOLS_FILE (OPTION_RELAX + 1)
-#define OPTION_SORT_COMMON (OPTION_RETAIN_SYMBOLS_FILE + 1)
+#define OPTION_SHARED (OPTION_RETAIN_SYMBOLS_FILE + 1)
+#define OPTION_SORT_COMMON (OPTION_SHARED + 1)
#define OPTION_STATS (OPTION_SORT_COMMON + 1)
#define OPTION_TBSS (OPTION_STATS + 1)
#define OPTION_TDATA (OPTION_TBSS + 1)
@@ -80,6 +84,8 @@ parse_args (argc, argv)
#define OPTION_WARN_COMMON (OPTION_VERSION + 1)
static struct option longopts[] = {
+ {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED},
+ {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
{"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
{"dc", no_argument, NULL, 'd'},
{"defsym", required_argument, NULL, OPTION_DEFSYM},
@@ -89,6 +95,7 @@ parse_args (argc, argv)
{"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
{"EB", no_argument, NULL, OPTION_EB},
{"EL", no_argument, NULL, OPTION_EL},
+ {"end-group", no_argument, NULL, ')'},
{"format", required_argument, NULL, 'b'},
{"help", no_argument, NULL, OPTION_HELP},
{"Map", required_argument, NULL, OPTION_MAP},
@@ -100,9 +107,11 @@ parse_args (argc, argv)
{"Qy", no_argument, NULL, OPTION_IGNORE},
{"qmagic", no_argument, NULL, OPTION_IGNORE}, /* Linux compatibility. */
{"relax", no_argument, NULL, OPTION_RELAX},
- {"retain-symbols-file", no_argument, NULL, OPTION_RETAIN_SYMBOLS_FILE},
+ {"retain-symbols-file", required_argument, NULL, OPTION_RETAIN_SYMBOLS_FILE},
+ {"shared", no_argument, NULL, OPTION_SHARED},
{"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
{"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
+ {"start-group", no_argument, NULL, '('},
{"stats", no_argument, NULL, OPTION_STATS},
{"static", no_argument, NULL, OPTION_NON_SHARED},
{"Tbss", required_argument, NULL, OPTION_TBSS},
@@ -139,9 +148,6 @@ parse_args (argc, argv)
case 'A':
ldfile_add_arch (optarg);
break;
- case 'B':
- /* Ignore. */
- break;
case 'b':
lang_add_target (optarg);
break;
@@ -266,6 +272,9 @@ parse_args (argc, argv)
case 's':
link_info.strip = strip_all;
break;
+ case OPTION_SHARED:
+ link_info.shared = true;
+ break;
case OPTION_SORT_COMMON:
config.sort_common = true;
break;
@@ -330,8 +339,33 @@ parse_args (argc, argv)
case 'y':
add_ysym (optarg);
break;
+ case '(':
+ if (ingroup)
+ {
+ fprintf (stderr,
+ "%s: may not nest groups (--help for usage)\n",
+ program_name);
+ xexit (1);
+ }
+ lang_enter_group ();
+ ingroup = 1;
+ break;
+ case ')':
+ if (! ingroup)
+ {
+ fprintf (stderr,
+ "%s: group ended before it began (--help for usage)\n",
+ program_name);
+ xexit (1);
+ }
+ lang_leave_group ();
+ ingroup = 0;
+ break;
}
}
+
+ if (ingroup)
+ lang_leave_group ();
}
/* Add the (colon-separated) elements of DIRLIST_PTR to the