]> git.baikalelectronics.ru Git - kernel.git/commit
UML: define RUNTIME_DISCARD_EXIT
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 7 Feb 2023 16:41:56 +0000 (01:41 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:32 +0000 (08:50 +0100)
commitb1d51de14cc39e3f7ecc6fdaa013b9c482d41f26
treeffe55da8b127430683b9b2207e5b9dc57f3bde73
parent7bba498e75da0166d0fb6504776cb8d2b00b20f9
UML: define RUNTIME_DISCARD_EXIT

commit 53bed695e1600b38478e2e14e92fe201883eec84 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:

f16784fb4712 ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT")
d0b09f9bf044 ("s390: define RUNTIME_DISCARD_EXIT to fix link error
  with GNU ld < 2.36")
ad886b09257c ("sh: define RUNTIME_DISCARD_EXIT")

Fixes: fe15ce495a51 ("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>
arch/um/kernel/vmlinux.lds.S