🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1396

Problem with .stabn in gas

#1396
From: John Myers
Date: Mon, 31 Oct 1988 20:06
34 lines
1442 bytes
In gas "version 1.25 (I guess.)" the routine stab in read.c has the
following code:

		case 'n':
			symbolP->sy_frag = frag_now;
			break;

		case 's':
			symbolP->sy_frag = & zero_address_frag;
			break;

Why the code is distinguishing between ".stabn" and ".stabs" I don't
know, but it breaks ".stabn" directives that refer to text labels
defined later in the file, such as:

	.stabn 0xc4,4,12,L2
	moveq #3,d0
	jra L1
L2:

(You don't want to know what we're using "0xc4" type stabs for.)

The n_value for the stab entry ends up being way out in right field.
I worked around this by generating a '.stabs "",' instead of a
'.stabd', but I was under the impression that these two were supposed
to be equivalent.

Shouldn't "symbolP->sy_frag" be initialized to "& zero_address_frag"
for ".stabn"'s?

-- 
_.John G. Myers		Internet: John.Myers@cs.cmu.edu
			LoseNet:  ...!seismo!inhp4!wiscvm.wisc.edu!give!up
"The world is full of bozos.  Some of them even have PhD's in Computer Science"
Technical Details
Message-ID: <3458@pt.cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!mailrus!bbn!rochester!pt.cs.cmu.edu!k.gp.cs.cmu.edu!jgm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!mailrus!bbn!rochester!pt.cs.cmu.edu!k.gp.cs.cmu.edu!jgm
From: jgm@k.gp.cs.cmu.edu (John Myers)
Newsgroups: gnu.utils.bug
Subject: Problem with .stabn in gas
Message-ID: <3458@pt.cs.cmu.edu>
Date: 31 Oct 88 20:06:01 GMT
Sender: netnews@pt.cs.cmu.edu
Reply-To: jgm@k.gp.cs.cmu.edu (John Myers)
Organization: Carnegie-Mellon University, CS/RI
Lines: 34