diff options
| author | David Howells <dhowells@redhat.com> | 2005-01-04 05:15:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:15:00 -0800 |
| commit | 1fa5e01246a4f0ec32f9bdfc910d57e30bfc0260 (patch) | |
| tree | 7e44a66f9c2a8cc6e6449c04af9fc10afabf7cf0 /include/asm-generic | |
| parent | fc1d4be6b015e2c34847df3994d80f3eec44cc42 (diff) | |
[PATCH] GP-REL data support
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: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/sections.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 40b935fa003f..976ac29598b7 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -8,5 +8,6 @@ extern char _data[], _sdata[], _edata[]; extern char __bss_start[], __bss_stop[]; extern char __init_begin[], __init_end[]; extern char _sinittext[], _einittext[]; +extern char _end[]; #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
