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 /security | |
| 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 'security')
| -rw-r--r-- | security/security.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/security.c b/security/security.c index e8e79c3cf3f6..ed5fb80769c3 100644 --- a/security/security.c +++ b/security/security.c @@ -38,8 +38,8 @@ static inline int verify(struct security_operations *ops) static void __init do_security_initcalls(void) { initcall_t *call; - call = &__security_initcall_start; - while (call < &__security_initcall_end) { + call = __security_initcall_start; + while (call < __security_initcall_end) { (*call) (); call++; } |
