[Intel-xe] [PATCH v2 2/3] UML: define RUNTIME_DISCARD_EXIT

Lucas De Marchi lucas.demarchi at intel.com
Fri Mar 17 15:44:03 UTC 2023


On Fri, Mar 17, 2023 at 04:07:40PM +0100, Mauro Carvalho Chehab wrote:
>On Thu, 16 Mar 2023 14:03:40 -0700
>Lucas De Marchi <lucas.demarchi at intel.com> wrote:
>
>> From: Masahiro Yamada <masahiroy at kernel.org>
>>
>> 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:
>>
>> - 4b9880dbf3bd ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT")
>> - a494398bde27 ("s390: define RUNTIME_DISCARD_EXIT to fix link error
>>   with GNU ld < 2.36")
>> - c1c551bebf92 ("sh: define RUNTIME_DISCARD_EXIT")
>>
>> Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv")
>> Reported-by: SeongJae Park <sj at kernel.org>
>> Signed-off-by: Masahiro Yamada <masahiroy at kernel.org>
>> Tested-by: SeongJae Park <sj at kernel.org>
>> Signed-off-by: Richard Weinberger <richard at nod.at>
>> (cherry picked from commit b99ddbe8336ee680257c8ab479f75051eaa49dcf)
>
>Hacky... Ok, feel free to add my R-B:


yeah, but we still expect the branch to be rebased. git will
automatically drop this commit when we rebase to a point that already
has it.

>
>Reviewed-by: Mauro Carvalho Chehab <mchehab at kernel.org>

thanks

Lucas De Marchi

>
>> ---
>>  arch/um/kernel/vmlinux.lds.S | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S
>> index 16e49bfa2b42..53d719c04ba9 100644
>> --- a/arch/um/kernel/vmlinux.lds.S
>> +++ b/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


More information about the Intel-xe mailing list