http://sourceware.org/bugzilla/show_bug.cgi?id=13899
--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-04-28 12:33:28 UTC --- (In reply to comment #2) > > Disassembly of section .text: > > 00000000 <menuitem_uhr>: > 0: 0a 00 [...] > > 0000000e <onPixel_uhr>: > > The first entry of menuitem_uhr is 0x000a. The correct value > is 0x0007 = 0xe / 2, i.e. the word address of menuitem_uhr. _______________________________________________^^^^^^^^^^^^^^^ The word address of onPixel_uhr, of course. Note: The testcase can be simplified even more to: .text call onPixel_uhr onPixel_uhr: nop .section .progmem.data,"a",@progbits .type menuitem_uhr, @object menuitem_uhr: .word gs(onPixel_uhr) And then assembled/linked/dumped $ avr-as -mmcu=atmega168 uhr.s -o uhr.o $ avr-ld -o bug13899.elf -m avr5 --relax uhr.o $ avr-objdump -d bug13899.elf Disassembly of section .text: 00000000 <menuitem_uhr>: 0: 03 00 .. 00000002 <__ctors_end>: 2: 00 d0 rcall .+0 ; 0x4 <onPixel_uhr> 00000004 <onPixel_uhr>: ... The word address of onPixel_uhr is 0x0002, but menuitem_uhr recorded 0x0003. The error also occurs if menuitem_uhr is located in .data instead of in section .progmem.data -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils