The __visible linkage changes st_value calculation for genksyms on newer
compilers such as OL7's 4.8 and SCL's 4.9. However, this symbol is in
the kABI whitelist and needs to retain its old st_value, even though the
guts of the compiled function have not changed.
Add a special directive, CONFIG_SIMULATE_GCC44_KABI, which will mask the
__visible qualifier at genksyms time; and use it only on OL6 builds.
Orabug:
27509351
Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
string
option env="SRCARCH"
+# special hack for UEK-OL6 to allow special kABI hacks
+config SIMULATE_GCC44_KABI
+ bool "Simulate the gcc 4.4 kABI"
+ default n
+
source "arch/$SRCARCH/Kconfig"
* Called when gcc's -fstack-protector feature is used, and
* gcc detects corruption of the on-stack canary value
*/
-__visible void __stack_chk_fail(void)
+#if !defined(CONFIG_SIMULATE_GCC44_KABI) || !defined(__GENKSYMS__)
+__visible
+#endif
+void __stack_chk_fail(void)
{
panic("stack-protector: Kernel stack is corrupted in: %p\n",
__builtin_return_address(0));
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_ARCH_HAS_SG_CHAIN=y
+CONFIG_SIMULATE_GCC44_KABI=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_ARCH_HAS_SG_CHAIN=y
+CONFIG_SIMULATE_GCC44_KABI=y