diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-14 17:26:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-14 17:26:58 -0400 |
commit | 84d69848c97faab0c25aa2667b273404d2e2a64a (patch) | |
tree | 594f3fe1b271b5255a1c5281e36f8bf938acd1c0 /include/linux/compiler.h | |
parent | d4d24d2d0a7ea3b62efd7336bfc2344e29b36bc5 (diff) | |
parent | 590abbdd273304b55824bcb9ea91840ea375575d (diff) |
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
...
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r-- | include/linux/compiler.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 668569844d37..f1bfa15b6f9b 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -182,6 +182,29 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
182 | # define unreachable() do { } while (1) | 182 | # define unreachable() do { } while (1) |
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | /* | ||
186 | * KENTRY - kernel entry point | ||
187 | * This can be used to annotate symbols (functions or data) that are used | ||
188 | * without their linker symbol being referenced explicitly. For example, | ||
189 | * interrupt vector handlers, or functions in the kernel image that are found | ||
190 | * programatically. | ||
191 | * | ||
192 | * Not required for symbols exported with EXPORT_SYMBOL, or initcalls. Those | ||
193 | * are handled in their own way (with KEEP() in linker scripts). | ||
194 | * | ||
195 | * KENTRY can be avoided if the symbols in question are marked as KEEP() in the | ||
196 | * linker script. For example an architecture could KEEP() its entire | ||
197 | * boot/exception vector code rather than annotate each function and data. | ||
198 | */ | ||
199 | #ifndef KENTRY | ||
200 | # define KENTRY(sym) \ | ||
201 | extern typeof(sym) sym; \ | ||
202 | static const unsigned long __kentry_##sym \ | ||
203 | __used \ | ||
204 | __attribute__((section("___kentry" "+" #sym ), used)) \ | ||
205 | = (unsigned long)&sym; | ||
206 | #endif | ||
207 | |||
185 | #ifndef RELOC_HIDE | 208 | #ifndef RELOC_HIDE |
186 | # define RELOC_HIDE(ptr, off) \ | 209 | # define RELOC_HIDE(ptr, off) \ |
187 | ({ unsigned long __ptr; \ | 210 | ({ unsigned long __ptr; \ |