public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Andrew Cagney <cagney@redhat.com>
Cc: frysk@sourceware.org
Subject: Re: which elf symbol?
Date: Tue, 07 Aug 2007 07:52:00 -0000	[thread overview]
Message-ID: <20070807075248.471754D04C4@magilla.localdomain> (raw)
In-Reply-To: Andrew Cagney's message of  Thursday, 26 July 2007 18:30:55 -0400 <46A9209F.30103@redhat.com>

> What about a case like:
> 
> symbol:
> nop
> unsized_symbol:
> nop
> .size symbol, .-symbol
> 1: <should not have a symbol?>
> 
> the closest symbol is unsized_symbol, but that is probably not the intent.

Agreed.  I think the correct answer for 1: here is no symbol.
Below, this is case t4.

> Yes, agreed.  The sized symbol should trump the unsized one.

Based on what you've said I'm now looking at the following test cases.
For me, the current code gets all of these right except t4.  I had the
impression you had other cases where the current code yields the wrong
answer.  Please send me an assembly fragment in this style (e.g. t5, t6)
on which you've verified addrsym yields the wrong answer, or let me know
if cases like t4 are in fact the only specific known bug.  I'd like to
get these test cases firmly established ASAP, and before considering
additional facilities with different behavior as for disassembly.


Thanks,
Roland



	.globl t1_global_outer

t1_local_st_size_0:

t1_global_outer:
	nop
t1_local_in_global:
	nop
.size t1_local_in_global, .-t1_local_in_global
1:	nop	# the right answer is t1_global_outer
.size t1_global_outer, .-t1_global_outer

.space 0x100
.balign 8

	.globl t2_global_symbol

t2_local_st_size_0:

t2_global_symbol:
	nop
	nop
2: # the right answer is t2_global_symbol
	nop
.size t2_global_symbol, .-t2_global_symbol

.space 0x100
.balign 8

	.globl t3_global_after_0

t3_global_after_0:
	nop
t3_local_0_in_global:
3: # the right answer is t3_global_after_0
      nop
.size t3_global_after_0, .-t3_global_after_0

.space 0x100
.balign 8

	.globl t4_global

t4_global:
	nop
t4_local_0_in_global:
	nop
.size t4_global, .-t4_global
4: 	nop	# the right answer is no answer
	nop

.data
t1_pc_of_interest: .long 1b
t2_pc_of_interest: .long 2b
t3_pc_of_interest: .long 3b
t4_pc_of_interest: .long 4b

      reply	other threads:[~2007-08-07  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 16:57 Andrew Cagney
2007-07-26  2:27 ` Roland McGrath
2007-07-26 22:30   ` Andrew Cagney
2007-08-07  7:52     ` Roland McGrath [this message]

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=20070807075248.471754D04C4@magilla.localdomain \
    --to=roland@redhat.com \
    --cc=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    /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).