20 Dec, 2008

1 commit

  • Building upon parts of the module stripping patch, this patch
    introduces similar stripping for vmlinux when CONFIG_KALLSYMS_ALL=y.
    Using CONFIG_KALLSYMS_STRIP_GENERATED reduces the overhead of
    CONFIG_KALLSYMS_ALL from 245k/310k to 65k/80k for the (i386/x86-64)
    kernels I tested with.

    The patch also does away with the need to special case the kallsyms-
    internal symbols by making them available even in the first linking
    stage.

    While it is a generated file, the patch includes the changes to
    scripts/genksyms/keywords.c_shipped, as I'm unsure what the procedure
    here is.

    Signed-off-by: Jan Beulich
    Signed-off-by: Sam Ravnborg

    Jan Beulich
     

20 May, 2008

1 commit

  • Andi Kleen
    reported that he saw a lot of symbols like this:

    0000000000000b24 N DW.aio.h.903a6d92.2
    0000000000000bce N DW.task_io_accounting.h.8d8de327.0
    0000000000000bec N DW.hrtimer.h.c23659c6.0

    in his System.map / kallsyms output.

    Simple solution is to skip all debugging
    symbols (they are marked 'N').

    Signed-off-by: Sam Ravnborg
    Cc: Paulo Marques

    Sam Ravnborg
     

30 Apr, 2008

1 commit

  • Pointed out by Paulo:
    "When I wrote this initially, it was a mistake to add a Changelog in
    the first place, but I didn't know better at the time.

    If you're going to make changes to this file, please remove all the
    Changelog, instead of adding more entries to it. The 'Changelog'
    should be kept by the version control system, and not the source code
    itself."

    Cc: Paulo Marques
    Signed-off-by: Bryan Wu
    Acked-by: Paulo Marques
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bryan Wu
     

07 Feb, 2008

2 commits

  • When resolving symbol names from addresses with aliased symbol names,
    kallsyms_lookup always returns the first symbol, even if it is a weak
    symbol.

    This patch changes this by sorting the symbols with the weak symbols last
    before feeding them to the kernel. This way the kernel runtime isn't
    changed at all, only the kallsyms build system is changed.

    Another side effect is that the symbols get sorted by address, too. So,
    even if future binutils version have some bug in "nm" that makes it fail to
    correctly sort symbols by address, the kernel won't be affected by this.

    Mathieu says:

    I created a module in LTTng that uses kallsyms to get the symbol
    corresponding to a specific system call address. Unfortunately, all the
    unimplemented syscalls were all referring to the (same) weak symbol
    identifying an unrelated system call rather that sys_ni (or whatever
    non-weak symbol would be expected). Kallsyms was dumbly returning the first
    symbol that matched.

    This patch makes sure kallsyms returns the non-weak symbol when there is
    one, which seems to be the expected result.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Mathieu Desnoyers
    Looks-great-to: Rusty Russell
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paulo Marques
     
  • When passing a zero address to kallsyms_lookup(), the kernel thought it was
    a valid kernel address, even if it is not. This is because is_ksym_addr()
    called is_kernel_extratext() and checked against labels that don't exist on
    many archs (which default as zero). Since PPC was the only kernel which
    defines _extra_text, (in 2005), and no longer needs it, this patch removes
    _extra_text support.

    For some history (provided by Jon):
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robin Getz
    Cc: David Woodhouse
    Cc: Jon Loeliger
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Getz
     

20 Jul, 2007

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits)
    xtensa: use DATA_DATA in xtensa
    powerpc: add missing DATA_DATA to powerpc
    cris: use DATA_DATA in cris
    kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c
    kbuild: use -fno-optimize-sibling-calls unconditionally
    kconfig: reset generated values only if Kconfig and .config agree.
    kbuild: fix the warning when running make tags
    kconfig: strip 'CONFIG_' automatically in kernel configuration search
    kbuild: use POSIX BRE in headers install target
    Whitelist references from __dbe_table to .init
    modpost white list pattern adjustment
    kbuild: do section mismatch check on full vmlinux
    kbuild: whitelist references from variables named _timer to .init.text
    kbuild: remove hardcoded _logo names from modpost
    kbuild: remove hardcoded apic_es7000 from modpost
    kbuild: warn about references from .init.text to .exit.text
    kbuild: consolidate section checks
    kbuild: refactor code in modpost to improve maintainability
    kbuild: ignore section mismatch warnings originating from .note section
    kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it
    ...

    Linus Torvalds
     

18 Jul, 2007

1 commit

  • KSYM_NAME_LEN is peculiar in that it does not include the space for the
    trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
    buffer. This is nonsense and error-prone. Moreover, when the caller
    forgets that it's very likely to subtly bite back by corrupting the stack
    because the last position of the buffer is always cleared to zero.

    This patch increments KSYM_NAME_LEN by one and updates code accordingly.

    * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
    is fixed.

    * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
    MODULE_NAME_LEN was treated as if it didn't include space for the
    trailing '\0'. Fix it.

    Signed-off-by: Tejun Heo
    Acked-by: Paulo Marques
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

17 Jul, 2007

1 commit


09 Dec, 2006

1 commit


07 Dec, 2006

2 commits

  • o On some platforms like avr32, section init comes before .text and
    not necessarily a symbol's relative position w.r.t _text is positive.
    In such cases assembler detects the overflow and emits warning. This
    patch fixes it.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen
    Cc: Andi Kleen
    Cc: Haavard Skinnemoen
    Signed-off-by: Andrew Morton

    Vivek Goyal
     
  • Print the addresses of non-absolute symbols relative to _text
    so that ld will generate relocations. Allowing a relocatable
    kernel to relocate them. We can't actually use the symbol names
    because kallsyms includes static symbols that are not exported
    from their object files.

    Add the _text symbol definitions to the architectures which don't
    define it otherwise linker will fail.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Eric W. Biederman
     

26 Mar, 2006

1 commit


08 Sep, 2005

2 commits

  • Local symbols generated by gcc start with a `$'; no point in including them
    in the kernel.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • This patch changes the way the compression algorithm works. The base
    algorithm is similiar to the previous but we force the compressed token
    size to 2.

    Having a fixed size compressed token allows for a lot of optimizations, and
    that in turn allows this code to run over *all* the symbols faster than it
    did before over just a subset.

    Having it work over all the symbols will make it behave better when symbols
    change positions between passes, and the "inconsistent kallsyms" messages
    should become less frequent.

    In my tests the compression ratio was degraded by about 0.5%, but the
    results will depend greatly on the number of symbols to compress.

    Signed-off-by: Paulo Marques
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paulo Marques
     

28 Jul, 2005

1 commit


06 May, 2005

1 commit

  • The PPC32 kernel puts platform-specific functions into separate sections so
    that unneeded parts of it can be freed when we've booted and actually
    worked out what we're running on today.

    This makes kallsyms ignore those functions, because they're not between
    _[se]text or _[se]inittext. Rather than teaching kallsyms about the
    various pmac/chrp/etc sections, this patch adds '_[se]extratext' markers
    for kallsyms.

    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

01 May, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds