public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Harshad R Joglekar <harshad.joglekar@wipro.com>
To: Alan Modra <amodra@bigpond.net.au>
Cc: binutils@sources.redhat.com
Subject: Re: [asm] Difference of symbols in another section
Date: Sat, 08 Sep 2001 08:02:00 -0000	[thread overview]
Message-ID: <3B9A33F4.C7644BD7@wipro.com> (raw)
In-Reply-To: <200109081344.f88Diif16713@harshad.wipro.com>

"Alan Modra" wrote:
> 
> With the current assembler, you get a branch to start+2.  Seems OK to me.
> 

The assembler gives an error only when listings are enabled:
Error:operation combines symbols in different segments

After some debugging though, I can see why you reverted that patch. I am
looking for an alternate solution.

The problem is expr () converts the expression (foo - bar) to a
O_constant when they are in the same frag. When listings are enabled, a
dummy frag is created for each input line, so the expression will be in
the data section.

How about removing the check itself from expr.c (patch below)? This
check is probably being done later when resolving symbols ??

regards
-- 
Harshad

Index: expr.c
===================================================================
RCS file: src/binutils/gas/expr.c,v
retrieving revision 1.1.1.1
diff -u -B -p -r1.1.1.1 expr.c
--- expr.c      24 Jul 2001 15:59:46 -0000      1.1.1.1
+++ expr.c      8 Sep 2001 20:03:33 -0000
@@ -1701,13 +1701,6 @@ expr (rankarg, resultP)
        }
       else if (! SEG_NORMAL (retval))
        retval = rightseg;
-      else if (SEG_NORMAL (rightseg)
-              && retval != rightseg
-#ifdef DIFF_EXPR_OK
-              && op_left != O_subtract
-#endif
-              )
-       as_bad (_("operation combines symbols in different segments"));
 
       op_right = operator (&op_chars);

       reply	other threads:[~2001-09-08  8:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200109081344.f88Diif16713@harshad.wipro.com>
2001-09-08  8:02 ` Harshad R Joglekar [this message]
2001-09-09  6:56   ` Alan Modra
2001-09-08  3:49 Harshad R Joglekar
2001-09-08  6:30 ` 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=3B9A33F4.C7644BD7@wipro.com \
    --to=harshad.joglekar@wipro.com \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.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).