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

ld fails with "unable to move location counter backward" #2041

Open
RossComputerGuy opened this issue Jul 26, 2024 · 5 comments
Open

ld fails with "unable to move location counter backward" #2041

RossComputerGuy opened this issue Jul 26, 2024 · 5 comments

Comments

@RossComputerGuy
Copy link

When building for x86_64, I've noticed that Nix fails to build the kernel:

x86_64-unknown-linux-gnu-ld: error: ../arch/x86/boot/setup.ld:15: unable to move location counter backward for: .bstext
x86_64-unknown-linux-gnu-ld: error: ../arch/x86/boot/setup.ld:15: unable to move location counter backward for: .bstext
x86_64-unknown-linux-gnu-ld: error: ../arch/x86/boot/setup.ld:15: unable to move location counter backward for: .bstext
make[2]: *** [../arch/x86/boot/Makefile:107: arch/x86/boot/setup.elf] Error 1
make[1]: *** [../arch/x86/Makefile:283: bzImage] Error 2
make[1]: *** Waiting for unfinished jobs....

This error looks similar to #1909 but it's with a different file. This is in kernel 6.6.41.

@nathanchance
Copy link
Member

nathanchance commented Jul 26, 2024

This involves a similar section as #1877 with the same file (.bstext here vs. .bsdata there), is it related?

@RossComputerGuy
Copy link
Author

Looks like it? That issue doesn't mention a line, this one says it's on line 15. The error messages are slightly different enough that I didn't know that issue existed.

@nathanchance
Copy link
Member

Right, I would not have expected you to catch that :)

That issue resulted in an upstream NixOS report and I wonder if this comment's workaround resolves this or the upstream patch that was submitted for #1983 (separate but related issue)?

@RossComputerGuy
Copy link
Author

I'll try that first patch, I already have CI testing it and I'm building it locally. Unfortunately, I have to cross compile because my machines are all ARM. Will report back if that patch works, can't do much about the boot failure until this is fixed.

@RossComputerGuy
Copy link
Author

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

2 participants