]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section
authorJan Beulich <jbeulich@novell.com>
Sun, 27 Jul 2008 17:30:04 +0000 (17:30 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Aug 2008 18:50:42 +0000 (11:50 -0700)
commit2b12fe50eff8e574b153919955c9991bfb2d0114
tree6bbe80d7f132be731c00e6939f1991f28928097f
parente1ff4ff140fb5e92bd0e1ea2af4c6159ee4d3186
vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section

commit fb5e2b379732e1a6ea32392980bb42e0212db842 upstream

Due to the addition of __attribute__((__cold__)) to a few symbols
without adjusting the linker scripts, those symbols currently may end
up outside the [_stext,_etext) range, as they get placed in
.text.unlikely by (at least) gcc 4.3.0. This may confuse code not only
outside of the kernel, symbol_put_addr()'s BUG() could also trigger.
Hence we need to add .text.unlikely (and for future uses of
__attribute__((__hot__)) also .text.hot) to the TEXT_TEXT() macro.

Issue observed by Lukas Lipavsky.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Tested-by: Lukas Lipavsky <llipavsky@suse.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/asm-generic/vmlinux.lds.h