Skip to content

Undefined reference to __stack_chk_fail #1

Description

@HectorPeeters

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);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions