Skip to content

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

Open

Description

@RossComputerGuy

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.

Activity

  1. nathanchance commented on Jul 26, 2024

    @nathanchance
    Member

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

  2. RossComputerGuy commented on Jul 26, 2024

    @RossComputerGuy
    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.

  3. nathanchance commented on Jul 26, 2024

    @nathanchance
    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)?

  4. RossComputerGuy commented on Jul 26, 2024

    @RossComputerGuy
    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.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions