This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: which elf symbol?


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]