19 May, 2011

1 commit

  • Binutils 2.18.50 made a backwards-incompatible change in the way it
    writes ELF objects with over 65280 sections, to improve conformance
    with the ELF specification and interoperability with other ELF tools.
    Specifically, it no longer adds 256 to section indices SHN_LORESERVE
    and higher to skip over the reserved range SHN_LORESERVE through
    SHN_HIRESERVE; those values are only considered special in the
    st_shndx field, and not in other places where section indices are
    stored. See:

    http://sourceware.org/bugzilla/show_bug.cgi?id=5900
    http://groups.google.com/group/generic-abi/browse_thread/thread/e8bb63714b072e67/6c63738f12cc8a17

    Signed-off-by: Anders Kaseorg
    Signed-off-by: Rusty Russell

    Anders Kaseorg
     

03 Aug, 2010

1 commit

  • This patch makes modpost able to process object files with more than
    64k sections. Needed for huge kernel builds (allyesconfig, for example)
    with -ffunction-sections. 64k sections handling is covered, for example,
    by this document:

    "IA-64 gABI Proposal 74: Section Indexes"
    http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html

    Signed-off-by: Denys Vlasenko
    Signed-off-by: Anders Kaseorg
    Acked-by: Sam Ravnborg
    Cc: Rusty Russell
    Cc: Andi Kleen
    Signed-off-by: Michal Marek

    Denys Vlasenko
     

15 Dec, 2009

1 commit


24 Mar, 2008

1 commit

  • The module alias support in the kernel have a consistency
    check where it is checked that the size of a structure
    in the kernel and on the build host are the same.
    For cross builds this check does not make sense so detect
    when we do cross builds and silently skip the check in these
    situations.
    This fixes a build bug for a wireless driver when cross building
    for arm.

    Acked-by: Michael Buesch
    Tested-by: Gordon Farquharson
    Signed-off-by: Sam Ravnborg
    Cc: stable@kernel.org

    Sam Ravnborg
     

14 Feb, 2008

1 commit

  • This adds some new magic in the MODPOST phase for CONFIG_MARKERS. Analogous
    to the Module.symvers file, the build will now write a Module.markers file
    when CONFIG_MARKERS=y is set. This file lists the name, defining module, and
    format string of each marker, separated by \t characters. This simple text
    file can be used by offline build procedures for instrumentation code,
    analogous to how System.map and Module.symvers can be useful to have for
    kernels other than the one you are running right now.

    The strings are made easy to extract by having the __trace_mark macro define
    the name and format together in a single array called __mstrtab_* in the
    __markers_strings section. This is straightforward and reliable as long as
    the marker structs are always defined by this macro. It is an unreasonable
    amount of hairy work to extract the string pointers from the __markers section
    structs, which entails handling a relocation type for every machine under the
    sun.

    Mathieu :
    - Ran through checkpatch.pl

    Signed-off-by: Roland McGrath
    Signed-off-by: Mathieu Desnoyers
    Cc: David Smith
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     

29 Jan, 2008

1 commit

  • The relocation record sometimes contained an address
    which was not an exactly match for a symbol.

    Implment some simple logic such that if there
    is a symbol within 20 bytes of the address contained
    in the relocation record then print the name of this
    symbol.

    With this change modpost could find symbol names
    for the remaining .init.text symbols in my
    allyesconfig build for x86_64.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

13 Oct, 2007

1 commit


17 Jul, 2007

1 commit


22 May, 2007

1 commit


19 May, 2007

1 commit

  • On i386, ARM and MIPS, warn_sec_mismatch() sometimes fails to show
    usefull symbol name. This is because empty 'refsym' due to 0 r_addend
    value. This patch is to adjust r_addend value, consulting with
    apply_relocate() routine in kernel code.

    Without this patch:
    MODPOST vmlinux
    WARNING: init/built-in.o - Section mismatch: reference to .init.text: from .text between 'rest_init' (at offset 0xf4) and 'try_name'
    WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
    WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

    With this patch:
    MODPOST vmlinux
    WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
    WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

    Now modpost can detect "kernel_init" name (and whitelist it) and show
    "set_up_list3s" name.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: Sam Ravnborg

    Atsushi Nemoto
     

03 May, 2007

1 commit


01 Jul, 2006

1 commit


10 Jun, 2006

2 commits

  • Modules that uses GPL symbols can no longer be build with kbuild,
    the build will fail during the modpost step.
    When a GPL-incompatible module uses a EXPORT_SYMBOL_GPL_FUTURE symbol
    then warn during modpost so author are actually notified.

    The actual license compatibility check is shared with the kernel
    to make sure it is in sync.

    Patch originally from: Andreas Gruenbacher and
    Ram Pai

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • This patch provides the ability to identify the export-type of each
    exported symbols in Module.symvers.

    NOTE: It updates the Module.symvers file with the additional
    information as shown below.

    0x0f8b92af platform_device_add_resources vmlinux EXPORT_SYMBOL_GPL
    0xcf7efb2a ethtool_op_set_tx_csum vmlinux EXPORT_SYMBOL

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Ram Pai
    Signed-off-by: Avantika Mathur
    Signed-off-by: Valdis Kletnieks
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Ram Pai
     

22 May, 2006

2 commits

  • Here is an updated r_info layout fix. Please apply "check SHT_REL
    sections" patch before this.

    64bit mips has different r_info layout. This patch fixes modpost
    segfault for 64bit little endian mips kernel.

    Signed-off-by: Atsushi Nemoto
    Cc: Sam Ravnborg
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • I found that modpost can not detect section mismatch on mips and i386. On
    mips64, the modpost (with r_info layout fix) can detect it. The current
    modpst only checks SHT_RELA section but I suppose SHT_REL section should be
    checked also. This patch does not contain r_info layout fix. I'll post an
    updated r_info layout fix on next mail.

    Check SHT_REL sections as like as SHT_RELA sections to detect section
    mismatch.

    Signed-off-by: Atsushi Nemoto
    Cc: Sam Ravnborg
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     

09 May, 2006

1 commit


01 May, 2006

1 commit


03 Mar, 2006

1 commit


19 Feb, 2006

2 commits

  • Section mismatch is identified as references to .init*
    sections from non .init sections. And likewise references
    to .exit.* sections outside .exit sections.

    .init.* sections are discarded after a module is initialized
    and references to .init.* sections are oops candidates.
    .exit.* sections are discarded when a module is built-in and
    thus references to .exit are also oops candidates.

    The checks were possible to do using 'make buildcheck' which
    called the two perl scripts: reference_discarded.pl and
    reference_init.pl. This patch just moves the same functionality
    inside modpost and the scripts are then obsoleted.
    They will though be kept for a while so users can do double
    checks - but note that some .o files are skipped by the perl scripts
    so result is not 1:1.
    All credit for the concept goes to Keith Owens who implemented
    the original perl scrips - this patch just moves it to modpost.

    Compared to the perl script the implmentation in modpost will be run
    for each kernel build - thus catching the error much sooner, but
    the downside is that the individual .o file are not always identified.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • modpost.c provides warn() and fatal() - so use them all over the place.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

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