um: Use char[] for linker script address declarations
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Sun, 12 Oct 2014 11:02:12 +0000 (13:02 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 31 May 2015 11:14:06 +0000 (13:14 +0200)
The linker script defines some variables which are declared either with
type char[] in include/asm-generic/sections.h or with a meaningless
integer type in arch/um/include/asm/sections.h.

Fix this inconsistency by declaring every variable char[].

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/sections.h
arch/um/kernel/physmem.c
arch/um/kernel/skas/mmu.c
arch/um/kernel/um_arch.c

index 3a6ebcc655193392931bce61b882e44ce5a0fbfb..cafcf684d94772903998e0c22c39677da7842657 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <asm-generic/sections.h>
 
-extern char __binary_start;
-extern int __syscall_stub_start, __syscall_stub_end;
+extern char __binary_start[];
+extern char __syscall_stub_start[], __syscall_stub_end[];
 
 #endif
index 249c9feb5485f80cb7b8abffb525138a0db1f301..4c9861b421fd91f2e04674e80cd6cff912f26e42 100644 (file)
@@ -109,8 +109,8 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
         * Special kludge - This page will be mapped in to userspace processes
         * from physmem_fd, so it needs to be written out there.
         */
-       os_seek_file(physmem_fd, __pa(&__syscall_stub_start));
-       os_write_file(physmem_fd, &__syscall_stub_start, PAGE_SIZE);
+       os_seek_file(physmem_fd, __pa(__syscall_stub_start));
+       os_write_file(physmem_fd, __syscall_stub_start, PAGE_SIZE);
        os_fsync_file(physmem_fd);
 
        bootmap_size = init_bootmem(pfn, pfn + delta);
index 2216eddc6893c3f1c8f362763436d4c35216453b..fda1deba17571b4effca3dd8dfed5f2003fbf612 100644 (file)
@@ -92,7 +92,7 @@ void uml_setup_stubs(struct mm_struct *mm)
        int err, ret;
 
        ret = init_stub_pte(mm, STUB_CODE,
-                           (unsigned long) &__syscall_stub_start);
+                           (unsigned long) __syscall_stub_start);
        if (ret)
                goto out;
 
@@ -100,7 +100,7 @@ void uml_setup_stubs(struct mm_struct *mm)
        if (ret)
                goto out;
 
-       mm->context.stub_pages[0] = virt_to_page(&__syscall_stub_start);
+       mm->context.stub_pages[0] = virt_to_page(__syscall_stub_start);
        mm->context.stub_pages[1] = virt_to_page(mm->context.id.stack);
 
        /* dup_mmap already holds mmap_sem */
index ffa185d92d2d6ef4fc03777f1e99e569531266cc..16630e75f056de31a9b511995636c838d644775e 100644 (file)
@@ -292,7 +292,7 @@ int __init linux_main(int argc, char **argv)
                physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
        }
 
-       uml_physmem = (unsigned long) &__binary_start & PAGE_MASK;
+       uml_physmem = (unsigned long) __binary_start & PAGE_MASK;
 
        /* Reserve up to 4M after the current brk */
        uml_reserved = ROUND_4M(brk_start) + (1 << 22);