diff options
author | kan <kan@FreeBSD.org> | 2003-12-22 04:27:17 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-12-22 04:27:17 +0000 |
commit | 61ac7e364632210f7f274ec454d546846190c38e (patch) | |
tree | 477b0b522e45bc3af5462b5703e0209a7605b83d /contrib | |
parent | e3bcae65496c99e5836ccd7f360662963f4c64a1 (diff) | |
download | FreeBSD-src-61ac7e364632210f7f274ec454d546846190c38e.zip FreeBSD-src-61ac7e364632210f7f274ec454d546846190c38e.tar.gz |
Fix ASM_OUTPUT_LABELREF to deal with TSL model prefixes GCC
started to use internally. They need to be stripped before
the name of the label or symbol is printed.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/config/i386/freebsd.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/contrib/gcc/config/i386/freebsd.h b/contrib/gcc/config/i386/freebsd.h index be9729c..3cdfdb2 100644 --- a/contrib/gcc/config/i386/freebsd.h +++ b/contrib/gcc/config/i386/freebsd.h @@ -153,18 +153,26 @@ Boston, MA 02111-1307, USA. */ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(FILE, NAME) \ do { \ - char *_name = (NAME); \ + const char *xname = (NAME); \ /* Hack to avoid writing lots of rtl in \ FUNCTION_PROFILER_EPILOGUE (). */ \ - if (*_name == '.' && strcmp(_name + 1, "mexitcount") == 0) \ + if (*xname == '.' && strcmp(xname + 1, "mexitcount") == 0) \ { \ if (flag_pic) \ - fprintf ((FILE), "*%s@GOT(%%ebx)", _name); \ + fprintf ((FILE), "*%s@GOT(%%ebx)", xname); \ else \ - fprintf ((FILE), "%s", _name); \ + fprintf ((FILE), "%s", xname); \ + } \ + else \ + { \ + if (xname[0] == '%') \ + xname += 2; \ + if (xname[0] == '*') \ + xname += 1; \ + else \ + fputs (user_label_prefix, FILE); \ + fputs (xname, FILE); \ } \ - else \ - fprintf (FILE, "%s", _name); \ } while (0) /* This is how to hack on the symbol code of certain relcalcitrant |