This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [AVR][PATCH] Add linker relaxation support / Fix 64 bit bug in gas rev. 5
- From: Björn Haase <bjoern dot m dot haase at web dot de>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org,Bernd Trog <berndtrog at yahoo dot com>
- Date: Wed, 9 Nov 2005 00:12:45 +0100
- Subject: Re: [AVR][PATCH] Add linker relaxation support / Fix 64 bit bug in gas rev. 5
- References: <200510151652.33552.bjoern.m.haase@web.de> <200511072310.09790.bjoern.m.haase@web.de> <43709729.6090909@redhat.com>
Nick Clifton wrote on Dienstag, 8. November 2005 13:16 :
>
> Which in turn is probably related to the fact that the reloc is being
> made against a local symbol ("here") rather than a global symbol.
the problem seems to be deeper. I'm a bit lost. I most certainly would have to
learn how strange objects defined by .set directives are represented in gas.
Symbols themselves? It seems that the .set directive is sometimes completely
ignored as soon as linkrelax is set to 1. The simple test case
.data
here:
.set sym, here
.long sym
Output of objdump:
/tmp/test.o: file format elf32-avr
RELOCATION RECORDS FOR [.data]:
OFFSET TYPE VALUE
00000000 R_AVR_32 sym
Contents of section .data:
0000 00000000 ....
shows that a reloc for an external symbol "sym" is generated. Is it possible
that in tc_gen_reloc after
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
one would need some kind of recursion for the case where the value of the
symbol sym itself is taken from another symbol?
Bjoern.