• David Howells's avatar
    [PATCH] GP-REL data support · 1fa5e012
    David Howells authored
    The attached patch makes it possible to support gp-rel addressing for small
    variables.  Since the FR-V cpu's have fixed-length instructions and plenty of
    general-purpose registers, one register is nominated as a base for the small
    data area.  This makes it possible to use single-insn accesses to access
    global and static variables instead of having to use multiple instructions.
    
    This, however, causes problems with small variables used to pinpoint the
    beginning and end of sections.  The compiler assumes it can use gp-rel
    addressing for these, but the linker then complains because the displacement
    is out of range.
    
    By declaring certain variables as arrays or by forcing them into named
    sections, the compiler is persuaded to access them as if they can be outside
    the displacement range.  Declaring the variables as "const void" type also
    works.
    Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1fa5e012
tty_io.c 73.6 KB