aboutsummaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.c
AgeCommit message (Collapse)AuthorFilesLines
2008-01-28kbuild: fix a buffer overflow in modpostAndi Kleen1-1/+2
When passing an file name > 1k the stack could be overflowed. Not really a security issue, but still better plugged. Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2008-01-28kbuild: fix format string warnings in modpostAndi Kleen1-3/+4
Fix wrong format strings in modpost exposed by the previous patch. Including one missing argument -- some random data was printed instead. Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2008-01-28kbuild: declare the modpost error functions as printf likeAndi Kleen1-3/+5
This way gcc can warn for wrong format strings Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-10-18kbuild: modpost problem when symbols move from one module to anotherTrent Piepho1-0/+3
When part of build an external module tree, modpost first reads in the kernel's and then the external tree's Module.symvers files. From these files it establishes a symbol => module mapping. When it later reads in each module built and processes the symbols it finds, it discovers the symbol=>module mapping from Module.symvers and leaves it as it is. The problem comes with a module has been re-named or a symbol has moved from one module to another, since the Module.symvers file was generated. modpost does not update the symbol=>module mapping when it finds the new location of the symbol when scanning the newly built modules. This results in the module containing incorrect dependency information and the new Module.symvers file written by modpost will also contain the incorrect mappings, perpetuating the problem to the next build, and so on. When building the out of kernel development tree for kernel subsystem, like v4l-dvb or ALSA, deleting the external Module.symvers file before building (which the kernel build system doesn't do and shouldn't be necessary anyway), won't fix the problem. modpost still reads the kernel's Module.symvers, and since we a building a kernel subsystem, it will define the same symbols as the external modules. Signed-off-by: Trent Piepho <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-10-12kbuild: fix segfault in modpostPetr Stetiar1-0/+6
Fix modpost segfault. Before: ------- ynezz@ntbk:~/linux-2.6.git$ scripts/mod/modpost vmlinux ath_pci.o Segmentation fault After: ------ ynezz@ntbk:~/linux-2.6.git$ scripts/mod/modpost vmlinux ath_pci.o FATAL: section header offset=815726848 in file 'ath_pci.o' is bigger then filesize=153968 Sam: This seems to warn for a binutils issue. Anyway modpost should not segfault. Signed-off-by: Petr Stetiar <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-10-10[NETNS]: Move some code into __init section when CONFIG_NET_NS=nPavel Emelyanov1-0/+1
With the net namespaces many code leaved the __init section, thus making the kernel occupy more memory than it did before. Since we have a config option that prohibits the namespace creation, the functions that initialize/finalize some netns stuff are simply not needed and can be freed after the boot. Currently, this is almost not noticeable, since few calls are no longer in __init, but when the namespaces will be merged it will be possible to free more code. I propose to use the __net_init, __net_exit and __net_initdata "attributes" for functions/variables that are not used if the CONFIG_NET_NS is not set to save more space in memory. The exiting functions cannot just reside in the __exit section, as noticed by David, since the init section will have references on it and the compilation will fail due to modpost checks. These references can exist, since the init namespace never dies and the exit callbacks are never called. So I introduce the __exit_refok attribute just like it is already done with the __init_refok. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2007-07-31kbuild: whitelist references from __dbe_table to .initRalf Baechle1-0/+1
This is needed on MIPS where the same mechanism as get_user() is used to intercept bus error exceptions for some hardware probes. Without this patch modpost will throw spurious warnings: LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map MODPOST vmlinux WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text: Signed-off-by: Ralf Baechle <[email protected]> Cc: Sam Ravnborg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-25kbuild: fix modpost warnings for xtensaSam Ravnborg1-6/+24
The Xtensa architecture places literal pools in sections separate from the instructions. The corresponsing text sections, therefore, reference the .literal section, and we have to suppress those warnings. The naming convention defines the name for a literal section as .SECTION.literal, unless .SECTION is .text. In that case the name is only .literal. Using strncmp() instead of strcmp() to compare the from-section with .SECTION.init.refok in pattern 0 should not cause any regressions for other architectures. We also need to suppress warnings for two informational sections (.xt.lit and .xt.prop) used by the Xtensa architecture. Signed-off-by: Chris Zankel <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-25kbuild: be more foregiving on init section namingSam Ravnborg1-26/+10
In the whitelist function of modpost now use the same check to identify init_section as in other places of modpost. This has the effect that we now recognize sections named .init.text.19 as init sections and we no longer warn when we see these. At the same time make surrounding code readable by dropping use of temporary flags. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-25kbuild: rearrange a few function in modpostSam Ravnborg1-32/+48
This is a preparational patch that just move two functions and add one (for now unused) function. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-25kbuild: do not do section mismatch checks on vmlinux in 2nd passSam Ravnborg1-3/+10
We already check and warn about section mismatches from vmlinux (build as vmlinux.o) during first pass so skip the checks during the 2nd pass where we process modules. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-20m68k: teach modpost about .m68_fixupAl Viro1-0/+1
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-17Whitelist references from __dbe_table to .initRalf Baechle1-0/+1
This is needed on MIPS where the same mechanism as get_user() is used to intercept bus error exceptions for some hardware probes. Without this patch modpost will throw spurious warnings: LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map MODPOST vmlinux WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text: Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-17modpost white list pattern adjustmentJan Beulich1-2/+4
gcc puts data into .data.rel or .data.rel.* on some architectures (e.g. ia64) or under certain conditions, so whatever is legal relative to .data should also be legal for those other sections. Fixes a few modpost warnings on ia64. Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-17kbuild: do section mismatch check on full vmlinuxSam Ravnborg1-1/+2
Previously we did do the check on the .o files used to link vmlinux but that failed to find questionable references across the .o files. Create a dedicated vmlinux.o file used only for section mismatch checks that uses the defualt linker script so section does not get renamed. The vmlinux.o may later be used as part of the the final link of vmlinux but for now it is used fo section mismatch only. For a defconfig build this is instant but for an allyesconfig this add two minutes to a full build (that anyways takes ~2 hours). Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: whitelist references from variables named _timer to .init.textSam Ravnborg1-1/+2
arm uses a lot of ops structures named *_timer that has legitimite references to .init.text. So let's add this variable to the list of variables that may reference .init.text without causing any warning. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: remove hardcoded _logo names from modpostSam Ravnborg1-14/+0
Replaced this with a __init_refok marker in front of fb_find_logo(). I think that the __initdata marker for the logo's are wrong but I have not justified this so I did not remove it. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: remove hardcoded apic_es7000 from modpostSam Ravnborg1-1/+0
Replace the hardcoded variable name apic_es7000 in modpost with a __initdata_refok marker. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: warn about references from .init.text to .exit.textSam Ravnborg1-1/+0
The .exit.text section may be discarded either at build or at runtime. So let modpost warn if this situation is detected. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: consolidate section checksSam Ravnborg1-25/+7
Move more checks from whitelist to the section check functions. Remove the redundent pci_fixup check. Renumber the patterns. No functional changes. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: refactor code in modpost to improve maintainabilitySam Ravnborg1-79/+75
There were a great deal of overlap between the two functions that check which sections may reference .init.text and .exit.text. Factor out common check to a separate function and sort entries in the original functions. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: ignore section mismatch warnings originating from .note sectionSam Ravnborg1-0/+2
.note* sections are ELF notes, which are typically used by external tools to examine the kernel image. Since this is removed from any runtime consideration, it's OK to reference any section from a .note* section. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle itJeremy Fitzhardinge1-11/+0
The .paravirtprobe section is obsolete, so modpost doesn't need to handle it. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Rusty Russell <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: suppress modpost warnings for references from the .toc section as ↵Stephen Rothwell1-1/+4
used by powerpc We should do better here by effetively "dereferencing" references to the .toc (or the .got2) section, but that is much harder. Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: make better section mismatch reports on armSam Ravnborg1-0/+24
With this change we can find more symbols hereby improving the readability of the warnings. Signed-off-by: Sam Ravnborg <[email protected]>
2007-07-16kbuild: make better section mismatch reports on i386 and mipsAtsushi Nemoto1-0/+73
On i386 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. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-06-11kbuild: fix sh64 section mismatch problemsSam Ravnborg1-0/+2
There's a special .cranges section that is almost always generated, with data being moved to the appropriate section by the linker at a later stage. To give a bit of background, sh64 has both a native SHmedia instruction set (32-bit instructions) and SHcompact (which is compatability with normal SH -- 16-bit, a massively reduced register set, etc.). code ranges are emitted when we're using the 32-bit ABI, but not the 64-bit one. It is a special staging section used solely by binutils where code with different flags get placed (more specifically differing flags for input and output sections), before being lazily merged by the linker. The closest I've been able to find to documentation is: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/emultempl/sh64elf.em?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=src It's an array of 8-byte Elf32_CRange structure given in http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-sh64.h?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=src that describes for which ISA a range is used. Silence the warnings by allowing references from .init.text to .cranges. The following warnings are fixed: WARNING: init/built-in.o(.cranges+0x0): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0xa): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x14): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x1e): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x28): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x32): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x50): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x5a): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x64): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0xfa): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x104): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x10e): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x154): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x15e): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0x6e): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0x78): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0x82): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0xaa): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x136): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x140): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x168): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x1f4): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x1fe): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x302): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x30c): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x316): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x3a2): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x3ac): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x4ce): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x4d8): Section mismatch: reference to .init.text: Signed-off-by: Paul Mundt <[email protected]> Cc: Kaz Kojima <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-21Revert "kbuild: make better section mismatch reports on i386, arm and mips"Linus Torvalds1-79/+0
This reverts commit f892b7d480eec809a5dfbd6e65742b3f3155e50e, which totally broke the build on x86 with CONFIG_RELOCATABLE (which, as far as I can tell, is the only case where it should even matter!) due to a SIGSEGV in modpost. Cc: Sam Ravnborg <[email protected]> Cc: Atsushi Nemoto <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-19mm: fix section mismatch warningsSam Ravnborg1-19/+0
modpost had two cases hardcoded for mm/ Shift over to __init_refok and kill the hardcoded function names in modpost. This has the drawback that the functions will always be kept no matter configuration. With previous code the function were placed in init section if configuration allowed it. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-19init/main: use __init_refok to fix section mismatchSam Ravnborg1-14/+0
Kill a special case in modpost by introducing the __init_refok marker. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-19kbuild: introduce __init_refok/__initdata_refok to supress section mismatch ↵Sam Ravnborg1-0/+11
warnings Throughout the kernel there are a few legitimite references to init or exit sections. Most of these are covered by the patterns included in modpost but a few nees special attention. To avoid hardcoding a lot of function names in modpost introduce a marker so relevant function/data can be marked. When modpost see a reference to a init/exit function from a function/data marked no warning will be issued. Idea from: Andrew Morton <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Cc: Andrew Morton <[email protected]>
2007-05-19kbuild: add "Section mismatch" warning whitelist for powerpcLi Yang1-4/+11
This patch fixes the following class of "Section mismatch" warnings when building powerpc platforms. WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from prom_entry (offset 0x0) WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init.text:mpc8313_rdb_probe from .machine.desc after 'mach_mpc8313_rdb' (at offset 0x4) .... Signed-off-by: Li Yang <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-19kbuild: make better section mismatch reports on i386, arm and mipsAtsushi Nemoto1-0/+79
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 <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-19kbuild: make modpost section warnings clearerRussell King1-17/+16
Change modpost section mismatch warnings to be less confusing; model them on the binutils linker warnings which we all know how to interpret. Also, fix the wrong ordering of arguments for the final case - fromsec and refsymname were reversed. Signed-off-by: Russell King <[email protected]> Acked-by: Acked-by: David S. Miller <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-09Allow arch to initialize arch field of the module structureRoman Zippel1-0/+1
This will later allow an arch to add module specific information via linker generated tables instead of poking directly in the module object structure. Signed-off-by: Roman Zippel <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-08Add white list into modpost.c for memory hotplug code and ia64's machvec sectionYasunori Goto1-0/+27
This patch is add white list into modpost.c for some functions and ia64's section to fix section mismatchs. sparse_index_alloc() and zone_wait_table_init() calls bootmem allocator at boot time, and kmalloc/vmalloc at hotplug time. If config memory hotplug is on, there are references of bootmem allocater(init text) from them (normal text). This is cause of section mismatch. Bootmem is called by many functions and it must be used only at boot time. I think __init of them should keep for section mismatch check. So, I would like to register sparse_index_alloc() and zone_wait_table_init() into white list. In addition, ia64's .machvec section is function table of some platform dependent code. It is mixture of .init.text and normal text. These reference of __init functions are valid too. Signed-off-by: Yasunori Goto <[email protected]> Cc: Sam Ravnborg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds1-33/+108
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits) kconfig: fix mconf segmentation fault kbuild: enable use of code from a different dir kconfig: error out if recursive dependencies are found kbuild: scripts/basic/fixdep segfault on pathological string-o-death kconfig: correct minor typo in Kconfig warning message. kconfig: fix path to modules.txt in Kconfig help usr/Kconfig: fix typo kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs' kbuild: be more explicit on missing .config file kbuild: clarify the creation of the LOCALVERSION_AUTO string. kbuild: propagate errors from find in scripts/gen_initramfs_list.sh kconfig: refer to qt3 if we cannot find qt libraries kbuild: handle compressed cpio initramfs-es kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text kbuild: remove stale comment in modpost.c kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE kbuild: fix make mrproper for Documentation/DocBook/man kbuild: remove kconfig binaries during make mrproper kconfig/menuconfig: do not hardcode '.config' kbuild: override build timestamp & version ...
2007-05-02kbuild: ignore section mismatch warning for references from .paravirtprobe ↵Sam Ravnborg1-0/+13
to .init.text Added on request from: Rusty Russell <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Cc: Rusty Russell <[email protected]>
2007-05-02kbuild: remove stale comment in modpost.cSam Ravnborg1-1/+0
Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02kbuild: distinguish between errors and warnings in modpostMatthew Wilcox1-3/+19
Some of modpost's warnings are fatal, and some are not. Adopt the compiler distinction between errors and warnings by calling merror() for fatal diagnostics and warn() for non-fatal ones. merror() was used as replacemtn for error() to avoid clash with glibc Signed-off-by: Matthew Wilcox <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02kbuild: whitelist logo references from .text to .init.dataSam Ravnborg1-0/+15
drivers/video/logo has references from .text to .init.data but function is only used during early init. So reference is OK and we do not want to warn about them => whitelist the reference. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02kbuild: fix segmentation fault in modpostSam Ravnborg1-2/+6
If modpost was called manually with filenames without '/' then modpost would segfault. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02kbuild: fix warnings from .pci_fixup sectionSam Ravnborg1-19/+25
Now where we do not pass vmlinux to modpost we started to see section mismatch warnings from .pci_fixup. Refactored code a little to include these in the whitelist again. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02kbuild: whitelist section mismatch in init/main.cSam Ravnborg1-1/+14
In init/main.c we have a reference from rest_init() to .init.text which is intentional. Rename the function 'init' to 'kernel_init' to make it a kernel wide unique symbol and whitelist the reference. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02kbuild: fix section mismatch check for vmlinuxSam Ravnborg1-12/+21
vmlinux does not contain relocation entries which is used by the section mismatch checks. Reported by: Atsushi Nemoto <[email protected]> Use the individual objects as inputs to overcome this limitation. In modpost check the .o files and skip non-ELF files. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-02[PATCH] i386: modpost apic related warning fixesVivek Goyal1-0/+1
o Modpost generates warnings for i386 if compiled with CONFIG_RELOCATABLE=y WARNING: vmlinux - Section mismatch: reference to .init.text:find_unisys_acpi_oem_table from .text between 'acpi_madt_oem_check' (at offset 0xc0101eda) and 'enable_apic_mode' WARNING: vmlinux - Section mismatch: reference to .init.text:acpi_get_table_header_early from .text between 'acpi_madt_oem_check' (at offset 0xc0101ef0) and 'enable_apic_mode' WARNING: vmlinux - Section mismatch: reference to .init.text:parse_unisys_oem from .text between 'acpi_madt_oem_check' (at offset 0xc0101f2e) and 'enable_apic_mode' WARNING: vmlinux - Section mismatch: reference to .init.text:setup_unisys from .text between 'acpi_madt_oem_check' (at offset 0xc0101f37) and 'enable_apic_mode'WARNING: vmlinux - Section mismatch: reference to .init.text:parse_unisys_oem from .text between 'mps_oem_check' (at offset 0xc0101ec7) and 'acpi_madt_oem_check' WARNING: vmlinux - Section mismatch: reference to .init.text:es7000_sw_apic from .text between 'enable_apic_mode' (at offset 0xc0101f48) and 'check_apicid_present' o Some functions which are inline (acpi_madt_oem_check) are not inlined by compiler as these functions are accessed using function pointer. These functions are put in .text section and they in-turn access __init type functions hence modpost generates warnings. o Do not iniline acpi_madt_oem_check, instead make it __init. Signed-off-by: Vivek Goyal <[email protected]> Signed-off-by: Andi Kleen <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Len Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2007-02-26Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6Linus Torvalds1-1/+2
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits) [PARISC] Use symbolic last syscall in __NR_Linux_syscalls [PARISC] Add missing statfs64 and fstatfs64 syscalls Revert "[PARISC] Optimize TLB flush on SMP systems" [PARISC] Compat signal fixes for 64-bit parisc [PARISC] Reorder syscalls to match unistd.h Revert "[PATCH] make kernel/signal.c:kill_proc_info() static" [PARISC] fix sys_rt_sigqueueinfo [PARISC] fix section mismatch warnings in harmony sound driver [PARISC] do not export get_register/set_register [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code [PARISC] convert to use CONFIG_64BIT instead of __LP64__ [PARISC] use CONFIG_64BIT instead of __LP64__ [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro [PARISC] more ENTRY(), ENDPROC(), END() conversions [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc [PARISC] Fixes /proc/cpuinfo cache output on B160L [PARISC] implement standard ENTRY(), END() and ENDPROC() [PARISC] kill ENTRY_SYS_CPUS [PARISC] clean up debugging printks in smp.c [PARISC] factor syscall_restart code out of do_signal ... Fix conflict in include/linux/sched.h due to kill_proc_info() being made publicly available to PARISC again.
2007-02-20[PATCH] remove modpost false warnings on ARMDavid Brownell1-8/+28
This patch stops "modpost" from issuing erroneous modpost warnings on ARM builds, which it's been doing since since maybe last summer. A canonical example would be driver method table entries: WARNING: <path> - Section mismatch: reference to .exit.text:<name>_remove from .data after '$d' (at offset 0x4) That "$d" symbol is generated by tools conformant with ARM ABI specs; in this case it's a symbol **in the middle of** a "<name>_driver" struct. The erroneous warnings appear to be issued because "modpost" whitelists references from "<name>_driver" data into init and exit sections ... but doesn't know should also include those "$d" mapping symbols, which are not otherwise associated with "<name>_driver" symbols. This patch prevents the modpost symbol lookup code from ever returning those mapping symbols, so it will return a whitelisted symbol instead. Then things work as expected. Now to revert various code-bloating "fixes" that got merged because of this modpost bug.... Signed-off-by: David Brownell <[email protected]> Acked-by: Rusty Russell <[email protected]> Cc: Roman Zippel <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-17Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.gitKyle McMartin1-1/+2
Conflicts: arch/parisc/hpux/sys_hpux.c arch/parisc/mm/ioremap.c
2007-02-13[PATCH] i386: move startup_32() in text.head sectionVivek Goyal1-1/+9
o Entry startup_32 was in .text section but it was accessing some init data too and it prompts MODPOST to generate compilation warnings. WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from .text between '_text' (at offset 0xc0100029) and 'startup_32_smp' WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from .text between '_text' (at offset 0xc0100037) and 'startup_32_smp' WARNING: vmlinux - Section mismatch: reference to .init.data:init_pg_tables_end from .text between '_text' (at offset 0xc0100099) and 'startup_32_smp' o Can't move startup_32 to .init.text as this entry point has to be at the start of bzImage. Hence moved startup_32 to a new section .text.head and instructed MODPOST to not to generate warnings if init data is being accessed from .text.head section. This code has been audited. o SMP boot up code (startup_32_smp) can go into .init.text if CPU hotplug is not supported. Otherwise it generates more warnings WARNING: vmlinux - Section mismatch: reference to .init.data:new_cpu_data from .text between 'checkCPUtype' (at offset 0xc0100126) and 'is486' WARNING: vmlinux - Section mismatch: reference to .init.data:new_cpu_data from .text between 'checkCPUtype' (at offset 0xc0100130) and 'is486' Signed-off-by: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Andi Kleen <[email protected]>