From 002898399e0ee6ad78cefa75c27b1dcae9308b2b Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Mon, 3 Jul 1995 21:20:26 +0000 Subject: [PATCH] Mon Jul 3 14:16:47 1995 Steve Chamberlain * configure.in (i386-*-win32): New configuration. * dlltool.c (killat, xlate, usage, long_options, main): Understand and cope with -k option. --- binutils/ChangeLog | 6 ++++++ binutils/dlltool.c | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index f43d1fb9783..65eda129c79 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +Mon Jul 3 14:16:47 1995 Steve Chamberlain + + * configure.in (i386-*-win32): New configuration. + * dlltool.c (killat, xlate, usage, long_options, main): + Understand and cope with -k option. + Sat Jul 1 12:25:15 1995 Fred Fish * ar.c: (extract_file): Change "#if POSIX_UTIME" to diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 3e2c765058d..117943955c6 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -182,6 +182,7 @@ char *strdup (); static int machine; int suckunderscore; +int killat; static int verbose; FILE *base_file; #ifdef DLLTOOL_ARM @@ -800,15 +801,18 @@ gen_exp_file () static char * xlate (char *name) { - char *p; + if (!suckunderscore) return name; if (name[0] == '_') name++; - p = strchr (name, '@'); - if (p) - *p = 0; + if (killat) { + char *p; + p = strchr (name, '@'); + if (p) + *p = 0; + } return name; } @@ -1125,7 +1129,8 @@ usage (file, status) fprintf (file, "\t --base-file Read linker generated base file\n"); fprintf (file, "\t -b \n"); fprintf (file, "\t -v Verbose\n"); - + fprintf (file, "\t -u Remove leading underscore from .lib\n"); + fprintf (file, "\t -k Kill @ from exported names\n"); exit (status); } @@ -1133,6 +1138,7 @@ static struct option long_options[] = { {"def", required_argument, NULL, 'd'}, {"underscore", no_argument, NULL, 'u'}, + {"killat", no_argument, NULL, 'k'}, {"help", no_argument, NULL, 'h'}, {"machine", required_argument, NULL, 'm'}, {"base-file", required_argument, NULL, 'b'}, @@ -1149,7 +1155,7 @@ main (ac, av) program_name = av[0]; oav = av; - while ((c = getopt_long (ac, av, "vbuh?m:o:Dd:", long_options, 0)) != EOF) + while ((c = getopt_long (ac, av, "kvbuh?m:o:Dd:", long_options, 0)) != EOF) { switch (c) { @@ -1172,6 +1178,9 @@ main (ac, av) case 'u': suckunderscore = 1; break; + case 'k': + killat = 1; + break; case 'd': def_file = optarg; break; -- 2.30.2