15 Mar, 2013

1 commit

  • We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
    "_". But Al Viro broke this in "consolidate cond_syscall and
    SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
    do so.

    Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
    prefix it so something. So various places define helpers which are
    defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:

    1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
    2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
    3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
    4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
    5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
    6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
    7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
    CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
    for pasting.

    (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).

    Let's solve this properly:
    1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
    2) Make linux/export.h usable from asm.
    3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
    4) Make everyone use them.

    Signed-off-by: Rusty Russell
    Reviewed-by: James Hogan
    Tested-by: James Hogan (metag)

    Rusty Russell
     

25 Feb, 2013

1 commit

  • The shell '.' command is not required to search the current directory as
    a fallback and in fact newer versions of bash in sh-mode do not do this.
    Force reading the file from the current directory if $KCONFIG_CONFIG
    contains no '/'.

    Reported-by: Stephen Rothwell
    Signed-off-by: Michal Marek

    Michal Marek
     

22 Feb, 2013

1 commit


12 Sep, 2012

1 commit


11 Sep, 2012

1 commit

  • Commit 1f2bfbd00e466ff3489b2ca5cc75b1cccd14c123 ("kbuild: link of
    vmlinux moved to a script") introduced in v3.5-rc1 broke kallsyms on
    architectures which have symbol prefixes.

    The --symbol-prefix argument used to be added to the KALLSYMS command
    line from the architecture Makefile, however this isn't picked up by the
    new scripts/link-vmlinux.sh. This resulted in symbols like
    kallsyms_addresses being added which weren't correctly overriding the
    weak symbols such as _kallsyms_addresses. These could then trigger
    BUG_ONs in kallsyms code.

    This is fixed by removing the KALLSYMS addition from the architecture
    Makefile, and using CONFIG_SYMBOL_PREFIX in the link-vmlinux.sh script
    to determine whether to add the --symbol-prefix argument.

    Signed-off-by: James Hogan
    Signed-off-by: Bob Liu

    James Hogan
     

10 Aug, 2012

1 commit


08 Jul, 2012

1 commit

  • ... at least in the top-level Makefile and scripts/link-vmlinux.sh.
    There are some more instances of the 'echo ; exit 1' pattern in
    some arch Makefiles and kconfig.

    Reported-by: Linus Torvalds
    Signed-off-by: Michal Marek

    Michal Marek
     

29 May, 2012

1 commit

  • Pull kbuild updates from Michal Marek.

    Fixed up nontrivial merge conflict in Makefile as per Stephen Rothwell
    and linux-next (and trivial arch/sparc/Makefile changes due to removed
    sparc32 logic).

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    mips: Fix KBUILD_CPPFLAGS definition
    kbuild: fix ia64 link
    kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux
    kbuild: link of vmlinux moved to a script
    kbuild: refactor final link of sparc32
    kbuild: drop unused KBUILD_VMLINUX_OBJS from top-level Makefile
    kbuild: Makefile: remove unnecessary check for m68knommu ARCH

    Linus Torvalds
     

10 May, 2012

1 commit

  • ia64 build failed like this:

    CC init/version.o
    LD init/built-in.o
    KSYM .tmp_kallsyms1.o
    ld: .tmp_kallsyms1.o: linking constant-gp files with non-constant-gp files
    ld: failed to merge target specific data of file .tmp_kallsyms1.o
    make: *** [vmlinux] Error 1

    This was introduced when link of vmlinux was migrated to a script.
    Add missing option to as to fix this.

    Reported-by: Tony Luck
    Tested-by: Tony Luck
    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

06 May, 2012

1 commit

  • Move the final link of vmlinux to a script to improve
    readability and maintainability of the code.

    The Makefile fragments used to link vmlinux has over the
    years seen far too many changes and the logic had become
    hard to follow.

    As the process by nature is serialized there was
    nothing gained including this in the Makefile.

    "um" has special link requirments - and the
    only way to handle this was to hard-code the linking
    of "um" in the script.
    This was better than trying to modularize it only for the
    benefit of "um" anyway.

    The shell script has been improved after input from:
    Arnaud Lacombe
    Nick Bowler

    Signed-off-by: Sam Ravnborg
    Cc: Arnaud Lacombe
    Cc: Nick Bowler
    Cc: Richard Weinberger
    Signed-off-by: Michal Marek

    Sam Ravnborg