Patch "objtool: Fix elf_create_undef_symbol() endianness" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    objtool: Fix elf_create_undef_symbol() endianness

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     objtool-fix-elf_create_undef_symbol-endianness.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 46c7405df7de8deb97229eacebcee96d61415f3f Mon Sep 17 00:00:00 2001
From: Vasily Gorbik <gor@xxxxxxxxxxxxx>
Date: Wed, 12 May 2021 19:42:10 +0200
Subject: objtool: Fix elf_create_undef_symbol() endianness

From: Vasily Gorbik <gor@xxxxxxxxxxxxx>

commit 46c7405df7de8deb97229eacebcee96d61415f3f upstream.

Currently x86 cross-compilation fails on big endian system with:

  x86_64-cross-ld: init/main.o: invalid string offset 488112128 >= 6229 for section `.strtab'

Mark new ELF data in elf_create_undef_symbol() as symbol, so that libelf
does endianness handling correctly.

Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: https://lore.kernel.org/r/patch-1.thread-6c9df9.git-d39264656387.your-ad-here.call-01620841104-ext-2554@work.hours
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/objtool/elf.c |    1 +
 1 file changed, 1 insertion(+)

--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -961,6 +961,7 @@ static int elf_add_string(struct elf *el
 	data->d_buf = str;
 	data->d_size = strlen(str) + 1;
 	data->d_align = 1;
+	data->d_type = ELF_T_SYM;
 
 	len = strtab->len;
 	strtab->len += data->d_size;


Patches currently in stable-queue which might be from gor@xxxxxxxxxxxxx are

queue-5.10/objtool-fix-elf_create_undef_symbol-endianness.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux