From 4255aa9bc28042141d56526567ae596c5e15a302 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 29 Oct 1995 07:47:58 -0500 Subject: (xcoff_declare_function): Deal with names created via the __asm__ construct that start with a leading '*'. From-SVN: r10542 --- gcc/xcoffout.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'gcc/xcoffout.c') diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index bf8775b..14ebce8 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -462,16 +462,19 @@ xcoffout_declare_function (file, decl, name) char *n = name; int i; - for (i = 0; name[i]; ++i) - { - if (name[i] == '[') - { - n = (char *) alloca (i + 1); - strncpy (n, name, i); - n[i] = '\0'; - break; - } - } + if (*n == '*') + n++; + else + for (i = 0; name[i]; ++i) + { + if (name[i] == '[') + { + n = (char *) alloca (i + 1); + strncpy (n, name, i); + n[i] = '\0'; + break; + } + } /* Any pending .bi or .ei must occur before the .function pseudo op. Otherwise debuggers will think that the function is in the previous -- cgit v1.1