bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/13129] avr-gas lacks documentation of gs() modifier


From: bjoern.m.haase at web dot de
Subject: [Bug gas/13129] avr-gas lacks documentation of gs() modifier
Date: Sun, 28 Aug 2011 14:28:14 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13129

--- Comment #1 from Bjoern Haase <bjoern.m.haase at web dot de> 2011-08-28 
14:28:14 UTC ---

gs() has been used as modifier in order to refer to "generate stubs". For
tartgets with more than 128k of flash, jump stubs are placed in the lower 128k
memory page. It's use is similar to the pm( ) identifier.

pm() and gs() are to be used for accessing addresses in program memory, e.g.
for function pointers by ldi() instructions.

references will be issued to the elf relocations

BFD_RELOC_AVR_LO8_LDI_PM
BFD_RELOC_AVR_HI8_LDI_PM

and

BFD_RELOC_AVR_LO8_LDI_GS
BFD_RELOC_AVR_HI8_LDI_GS

respectively. The GS elf relocations will return the linker stub address
instead of the true address within program memory in case that linker stubs are
needed, i.e. in case that the function code is placed beyond the memory range
that maybe accessed by 16 bit pointers.


Excerpts from src/bfd/elf32-avr.c

/* A low 8 bit absolute relocation of 24 bit program memory address.
     For LDI command.  Will not be changed when linker stubs are needed. */
  HOWTO (R_AVR_LO8_LDI_PM,      /* type */

/* A low 8 bit absolute relocation of 24 bit program memory address.
     For LDI command.  Will not be changed when linker stubs are needed. */
  HOWTO (R_AVR_HI8_LDI_PM,      /* type */

/* A low 8 bit absolute relocation of 24 bit program memory address.
     For LDI command.  Will be changed when linker stubs are needed.  */
  HOWTO (R_AVR_LO8_LDI_GS,      /* type */

-- 
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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]