From: hjl@lucon.org (H.J. Lu)
To: ian@cygnus.com (Ian Lance Taylor)
Cc: gas2@cygnus.com
Subject: Re: A PREFIX_SEPARATOR bug in binutils 2.9
Date: Tue, 21 Apr 1998 12:32:00 -0000 [thread overview]
Message-ID: <m0yRiJZ-00058vC@ocean.lucon.org> (raw)
In-Reply-To: <199804211854.OAA04970@subrogation.cygnus.com>
>
> From: hjl@lucon.org (H.J. Lu)
> Date: Tue, 21 Apr 1998 11:41:32 -0700 (PDT)
>
> In binutils, PREFIX_SEPARATOR is defined as '/' for x86. But there
> is
>
> #if defined (TE_I386AIX) || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
> const char comment_chars[] = "#/";
> #else
> const char comment_chars[] = "#";
> #endif
>
> in config/tc-i386.c. It makes '/' to start a comment. It won't work.
>
> Why do you say ``it won't work?'' What do you mean? That code has
PREFIX_SEPARATOR indicates a prefix, like
data16PREFIX_SEPARATORmov foo,%eax
But '/' is also used to start a comment. So
data16/mov foo,%eax
becomes
data16
after preprocessing.
> been there since May 1993, so clearly it can work.
>
Apparently, noone tried to use it or reported it.
> We can define PREFIX_SEPARATOR as
>
> #if defined (TE_I386AIX) || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
> #define PREFIX_SEPARATOR '\\'
> #else
> #define PREFIX_SEPARATOR '/'
> #endif
>
> But I don't like it. Any suggestion how to fix it?
>
> What is the actual problem you are trying to solve?
>
Can you try the code below on x86/elf?
# gcc -v x.s -c
# objdump -d x.o
# gcc -v x.s -c -Wa,-f
# objdump -d x.o
H.J.
----x.s--
/xmxmmmmmmmx
data16/mov foo,%ax
next prev parent reply other threads:[~1998-04-21 12:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-21 11:41 H.J. Lu
1998-04-21 11:54 ` Ian Lance Taylor
1998-04-21 12:32 ` H.J. Lu [this message]
1998-04-21 12:39 ` Ian Lance Taylor
1998-04-21 12:39 ` H.J. Lu
1998-04-21 12:39 ` Ian Lance Taylor
1998-04-21 12:32 ` Martynas Kunigelis
1998-04-21 12:34 ` Ian Lance Taylor
1998-04-21 12:34 ` H.J. Lu
1998-04-21 12:39 ` Ian Lance Taylor
1998-04-21 17:45 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m0yRiJZ-00058vC@ocean.lucon.org \
--to=hjl@lucon.org \
--cc=gas2@cygnus.com \
--cc=ian@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).