Skip to content

Commit

Permalink
UML: define RUNTIME_DISCARD_EXIT
Browse files Browse the repository at this point in the history
commit b99ddbe upstream.

With CONFIG_VIRTIO_UML=y, GNU ld < 2.36 fails to link UML vmlinux
(w/wo CONFIG_LD_SCRIPT_STATIC).

  `.exit.text' referenced in section `.uml.exitcall.exit' of arch/um/drivers/virtio_uml.o: defined in discarded section `.exit.text' of arch/um/drivers/virtio_uml.o
  collect2: error: ld returned 1 exit status

This fix is similar to the following commits:

- 4b9880d ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT")
- a494398 ("s390: define RUNTIME_DISCARD_EXIT to fix link error
  with GNU ld < 2.36")
- c1c551b ("sh: define RUNTIME_DISCARD_EXIT")

Fixes: 99cb0d9 ("arch: fix broken BuildID for arm64 and riscv")
Reported-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
masahir0y authored and gregkh committed Mar 17, 2023
1 parent 96a1600 commit 11cb8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/kernel/vmlinux.lds.S
@@ -1,4 +1,4 @@

#define RUNTIME_DISCARD_EXIT
KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER);

#ifdef CONFIG_LD_SCRIPT_STATIC
Expand Down

0 comments on commit 11cb8db

Please sign in to comment.