mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek: - EXPORT_SYMBOL for asm source by Al Viro. This does bring a regression, because genksyms no longer generates checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is working on a patch to fix this. Plus, we are talking about functions like strcpy(), which rarely change prototypes. - Fixes for PPC fallout of the above by Stephen Rothwell and Nick Piggin - fixdep speedup by Alexey Dobriyan. - preparatory work by Nick Piggin to allow architectures to build with -ffunction-sections, -fdata-sections and --gc-sections - CONFIG_THIN_ARCHIVES support by Stephen Rothwell - fix for filenames with colons in the initramfs source by me. * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (22 commits) initramfs: Escape colons in depfile ppc: there is no clear_pages to export powerpc/64: whitelist unresolved modversions CRCs kbuild: -ffunction-sections fix for archs with conflicting sections kbuild: add arch specific post-link Makefile kbuild: allow archs to select link dead code/data elimination kbuild: allow architectures to use thin archives instead of ld -r kbuild: Regenerate genksyms lexer kbuild: genksyms fix for typeof handling fixdep: faster CONFIG_ search ia64: move exports to definitions sparc32: debride memcpy.S a bit [sparc] unify 32bit and 64bit string.h sparc: move exports to definitions ppc: move exports to definitions arm: move exports to definitions s390: move exports to definitions m68k: move exports to definitions alpha: move exports to actual definitions x86: move exports to actual definitions ...
This commit is contained in:
commit
84d69848c9
262 changed files with 1094 additions and 1403 deletions
|
@ -139,24 +139,8 @@ extern bool initcall_debug;
|
|||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#ifdef CONFIG_LTO
|
||||
/* Work around a LTO gcc problem: when there is no reference to a variable
|
||||
* in a module it will be moved to the end of the program. This causes
|
||||
* reordering of initcalls which the kernel does not like.
|
||||
* Add a dummy reference function to avoid this. The function is
|
||||
* deleted by the linker.
|
||||
*/
|
||||
#define LTO_REFERENCE_INITCALL(x) \
|
||||
; /* yes this is needed */ \
|
||||
static __used __exit void *reference_##x(void) \
|
||||
{ \
|
||||
return &x; \
|
||||
}
|
||||
#else
|
||||
#define LTO_REFERENCE_INITCALL(x)
|
||||
#endif
|
||||
|
||||
/* initcalls are now grouped by functionality into separate
|
||||
/*
|
||||
* initcalls are now grouped by functionality into separate
|
||||
* subsections. Ordering inside the subsections is determined
|
||||
* by link order.
|
||||
* For backwards compatibility, initcall() puts the call in
|
||||
|
@ -164,12 +148,16 @@ extern bool initcall_debug;
|
|||
*
|
||||
* The `id' arg to __define_initcall() is needed so that multiple initcalls
|
||||
* can point at the same handler without causing duplicate-symbol build errors.
|
||||
*
|
||||
* Initcalls are run by placing pointers in initcall sections that the
|
||||
* kernel iterates at runtime. The linker can do dead code / data elimination
|
||||
* and remove that completely, so the initcall sections have to be marked
|
||||
* as KEEP() in the linker script.
|
||||
*/
|
||||
|
||||
#define __define_initcall(fn, id) \
|
||||
static initcall_t __initcall_##fn##id __used \
|
||||
__attribute__((__section__(".initcall" #id ".init"))) = fn; \
|
||||
LTO_REFERENCE_INITCALL(__initcall_##fn##id)
|
||||
__attribute__((__section__(".initcall" #id ".init"))) = fn;
|
||||
|
||||
/*
|
||||
* Early initcalls run before initializing SMP.
|
||||
|
@ -205,15 +193,15 @@ extern bool initcall_debug;
|
|||
|
||||
#define __initcall(fn) device_initcall(fn)
|
||||
|
||||
#define __exitcall(fn) \
|
||||
#define __exitcall(fn) \
|
||||
static exitcall_t __exitcall_##fn __exit_call = fn
|
||||
|
||||
#define console_initcall(fn) \
|
||||
static initcall_t __initcall_##fn \
|
||||
#define console_initcall(fn) \
|
||||
static initcall_t __initcall_##fn \
|
||||
__used __section(.con_initcall.init) = fn
|
||||
|
||||
#define security_initcall(fn) \
|
||||
static initcall_t __initcall_##fn \
|
||||
#define security_initcall(fn) \
|
||||
static initcall_t __initcall_##fn \
|
||||
__used __section(.security_initcall.init) = fn
|
||||
|
||||
struct obs_kernel_param {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue