Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference to __stack_chk_fail #1

Open
HectorPeeters opened this issue Nov 22, 2022 · 0 comments
Open

Undefined reference to __stack_chk_fail #1

HectorPeeters opened this issue Nov 22, 2022 · 0 comments

Comments

@HectorPeeters
Copy link

When compiling the progenitor version of the kernel using gcc 12.2.0, the following error appears.

main.c:(.text+0x1d8): undefined reference to `__stack_chk_fail'

This could be fixed by either adding the -fno-stack-protector flag to KERNEL_FLAGS or by implementing the __stack_chk_fail function. A possible implementation could be:

void __stack_chk_fail() {
	print("Stack check failed!");
	while (1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant