1. 03 10月, 2014 1 次提交
    • K
      aarch64: filter $x from kallsyms · 6c34f1f5
      Kyle McMartin 提交于
      Similar to ARM, AArch64 is generating $x and $d syms... which isn't
      terribly helpful when looking at %pF output and the like. Filter those
      out in kallsyms, modpost and when looking at module symbols.
      
      Seems simplest since none of these check EM_ARM anyway, to just add it
      to the strchr used, rather than trying to make things overly
      complicated.
      
      initcall_debug improves:
      dmesg_before.txt: initcall $x+0x0/0x154 [sg] returned 0 after 26331 usecs
      dmesg_after.txt: initcall init_sg+0x0/0x154 [sg] returned 0 after 15461 usecs
      Signed-off-by: NKyle McMartin <kyle@redhat.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      6c34f1f5
  2. 27 7月, 2014 2 次提交
  3. 10 6月, 2014 1 次提交
  4. 05 5月, 2014 1 次提交
  5. 28 4月, 2014 1 次提交
  6. 19 2月, 2014 1 次提交
  7. 14 2月, 2014 3 次提交
  8. 15 1月, 2014 1 次提交
  9. 13 11月, 2013 1 次提交
  10. 07 11月, 2013 1 次提交
  11. 29 10月, 2013 1 次提交
  12. 23 9月, 2013 1 次提交
    • G
      modpost: Optionally ignore secondary errors seen if a single module build fails · eed380f3
      Guenter Roeck 提交于
      Commit ea4054a2 (modpost: handle huge numbers of modules) added
      support for building a large number of modules.
      
      Unfortunately, the commit changed the semantics of the makefile: Instead of
      passing only existing object files to modpost, make now passes all expected
      object files. If make was started with option -i, this results in a modpost
      error if a single file failed to build.
      
      Example with the current btrfs build falure on m68k:
      
      fs/btrfs/btrfs.o: No such file or directory
      make[1]: [__modpost] Error 1 (ignored)
      
      This error is followed by lots of errors such as:
      
      m68k-linux-gcc: error: arch/m68k/emu/nfcon.mod.c: No such file or directory
      m68k-linux-gcc: fatal error: no input files
      compilation terminated.
      make[1]: [arch/m68k/emu/nfcon.mod.o] Error 1 (ignored)
      
      This doesn't matter much for normal builds, but it is annoying for builds
      started with "make -i" due to the large number of secondary errors.
      Those errors unnececessarily clog any error log and make it difficult
      to find the real errors in the build.
      
      Fix the problem by adding a new parameter '-n' to modpost. If this parameter
      is specified, modpost reports but ignores missing object files.
      
      With this patch, error output from above problem is (with make -i):
      
      m68k-linux-ld: cannot find fs/btrfs/ioctl.o: No such file or directory
      make[2]: [fs/btrfs/btrfs.o] Error 1 (ignored)
      ...
      fs/btrfs/btrfs.o: No such file or directory (ignored)
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Michael Marek <mmarek@suse.cz>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      eed380f3
  13. 20 8月, 2013 1 次提交
  14. 27 6月, 2013 1 次提交
  15. 20 5月, 2013 1 次提交
    • T
      modpost.c: Add .text.unlikely to TEXT_SECTIONS · 06df44ee
      Tom Rini 提交于
      gcc's places cold functions into the .text.unlikely section and we
      need to check this section as well for section mismatches otherwise we
      may have false negatives for this test.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-kbuild@vger.kernel.org
      Signed-off-by: NTom Rini <trini@ti.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (wording update)
      06df44ee
  16. 29 4月, 2013 1 次提交
  17. 05 4月, 2013 2 次提交
  18. 20 3月, 2013 1 次提交
    • J
      module: fix symbol versioning with symbol prefixes · a4b6a77b
      James Hogan 提交于
      Fix symbol versioning on architectures with symbol prefixes. Although
      the build was free from warnings the actual modules still wouldn't load
      as the ____versions table contained unprefixed symbol names, which were
      being compared against the prefixed symbol names when checking the
      symbol versions.
      
      This is fixed by modifying modpost to add the symbol prefix to the
      ____versions table it outputs (Modules.symvers still contains unprefixed
      symbol names). The check_modstruct_version() function is also fixed as
      it checks the version of the unprefixed "module_layout" symbol which
      would no longer work.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jonathan Kliegman <kliegs@chromium.org>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (use VMLINUX_SYMBOL_STR)
      a4b6a77b
  19. 15 3月, 2013 1 次提交
    • R
      CONFIG_SYMBOL_PREFIX: cleanup. · b92021b0
      Rusty Russell 提交于
      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: NRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
      Tested-by: James Hogan <james.hogan@imgtec.com> (metag)
      b92021b0
  20. 25 1月, 2013 1 次提交
  21. 21 1月, 2013 1 次提交
    • V
      modpost: Ignore ARC specific non-alloc sections · f2e207f3
      Vineet Gupta 提交于
      ARC relocatable object files contain one/more .gnu.linkonce.arcextmap.*
      sections (collated by kernel/vmlinux.lds into .arcextmap in final link).
      This section is used by debuggers to display the extension instructions
      and need-not be loaded by target (hence !SHF_ALLOC)
      
      The final kernel binary only needs .arcextmap entry in modpost's ignore
      list (section_white_list[]). However when building modules, modpost scans
      each object file individually, hence tripping on non-aggregated
      .gnu.linkonce.arcextmap.* entries as well.
      
      Thus need for the 2 entires !
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      f2e207f3
  22. 01 12月, 2012 1 次提交
  23. 12 10月, 2012 1 次提交
  24. 04 10月, 2012 1 次提交
  25. 17 6月, 2012 1 次提交
  26. 23 5月, 2012 2 次提交
  27. 10 4月, 2012 1 次提交
    • F
      modpost: Fix modpost license checking of vmlinux.o · 258f7426
      Frank Rowand 提交于
      Commit f02e8a65 ("module: Sort exported symbols") sorts symbols
      placing each of them in its own elf section.  This sorting and merging
      into the canonical sections are done by the linker.
      
      Unfortunately modpost to generate Module.symvers file parses vmlinux.o
      (which is not linked yet) and all modules object files (which aren't
      linked yet).  These aren't sanitized by the linker yet.  That breaks
      modpost that can't detect license properly for modules.
      
      This patch makes modpost aware of the new exported symbols structure.
      
      [ This above is a slightly corrected version of the explanation of the
        problem, copied from commit 62a26356 ("modpost: Fix modpost's
        license checking V3").  That commit fixed the problem for module
        object files, but not for vmlinux.o.  This patch fixes modpost for
        vmlinux.o. ]
      Signed-off-by: NFrank Rowand <frank.rowand@am.sony.com>
      Signed-off-by: NAlessio Igor Bogani <abogani@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      258f7426
  28. 27 3月, 2012 1 次提交
  29. 15 2月, 2012 1 次提交
  30. 07 11月, 2011 1 次提交
  31. 24 7月, 2011 1 次提交
    • A
      modpost: Fix modpost's license checking V3 · 62a26356
      Alessio Igor Bogani 提交于
      The commit f02e8a65 sorts symbols placing each of them in its own elf section.
      The sorting and merging into the canonical sections are done by the linker.
      Unfortunately modpost to generate Module.symvers file parses vmlinux
      (already linked) and all modules object files (which aren't linked yet).
      These aren't sanitized by the linker yet. That breaks modpost that can't
      detect license properly for modules. This patch makes modpost aware of
      the new exported symbols structure.
      
      Thanks to Arnaud Lacombe <lacombar@gmail.com> and Anders Kaseorg
      <andersk@ksplice.com> for providing useful suggestions about code.
      
      This work was supported by a hardware donation from the CE Linux Forum.
      Reported-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAlessio Igor Bogani <abogani@kernel.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      62a26356
  32. 19 5月, 2011 1 次提交
  33. 17 3月, 2011 1 次提交
    • R
      modpost: fix trailing comma · 00759c0e
      Randy Dunlap 提交于
      Consolidate locations that print a section whitelist into
      calls to print_section_list().
      
      Fix print_section_list() so that it does not print a trailing
      comma & space:
      
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      becomes:
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      00759c0e
  34. 28 12月, 2010 1 次提交
    • O
      modpost: Fix address calculation in reloc_location() · 731ece41
      Olof Johansson 提交于
      This patch fixes a segfault in modpost that is observed when the gold
      linker is used to link the input objects.
      
      The problem is that reloc_location (modpost.c) is computing the
      address of the relocation target incorrectly. Here, elf->hdr points
      to the beginning of the ELF file in memory, sechdr points to the
      relocation section header, section is the index of the section
      being relocated, and sechdrs[section].sh_offset would be the offset
      of that section, relative to the beginning of the ELF file. Adding
      elf->hdr + sechdrs[section].sh_offset gives you the address of the
      beginning of the section, and adding r->r_offset to that gives you the
      address of the location to be relocated. You do not need to subtract
      sechdrs[section].sh_addr from that -- the result of this is an address
      outside the file, and causes the segfault when addend_386_rel tries to
      dereference it.
      
      This bug is not observed when GNU ld is used to link the inputs. The
      object file ubuntu/omnibook/omnibook.o is the result of an ld -r of
      several other files.  When GNU ld does an ld -r, it sets the vaddr
      field for each section to 0, but gold lays out the section addresses
      sequentially instead:
      
      Section Headers:
       [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
       [ 0]                   NULL            00000000 000000 000000 00      0   0  0
       [ 1] .text             PROGBITS        00000000 000034 004794 00  AX  0   0  4
       [ 2] .data             PROGBITS        0000b9d0 0047c8 0009c0 00  WA  0   0  4
       [ 3] .bss              NOBITS          000162f8 005188 00013c 00  WA  0   0  4
       [ 4] .rodata.str1.1    PROGBITS        00004f2d 0052c4 001b1a 01 AMS  0   0  1
       [ 5] .init.text        PROGBITS        00004794 006dde 0005fa 00  AX  0   0  1
       [ 6] .exit.text        PROGBITS        00004d8e 0073d8 00018a 00  AX  0   0  1
        ...
      
      So the bug in the tool remained undiscovered because the section's vaddr
      always happened to be 0.
      Signed-off-by: NRaymes Khoury <raymes@google.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      731ece41
  35. 17 12月, 2010 1 次提交