Fix a couple of endianness bugs that crept in.
Signed-off-by: Ingo Molnar <mingo@kernel.org> -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmCfe/sRHG1pbmdvQGtl cm5lbC5vcmcACgkQEnMQ0APhK1iVBw/9GMgwfp85TlB1vGN+ObOpAIAVHA839pIf Yvf1nRCWrK7P9+RdU5fZIi2CxuZ7QPcZK8r9zimwvpqhi2PVGfFPsciSVHzVxzll bvmqgfXMUWWwOdfUwg8cE3yK31J4s7yetrAx+Vklp/IiO72tvjNIcpxiI9unkyjb 9c758XtMb4M9cHlNC4g0+yNhZMfOHYsH9/nW+5jWFtvmWOMM7cpGUjees+Do83+H qRv8je7aYsyZH6ams9xsVaUv9hyONYG2hSFaTj0Lz8AmCnKjj+NQnydG5i/R0MyX 9i++JBdfsY3QjeqPQ4Rh82eAeqL3YcPQkReN+jcux7rFPa7ltsJL+wRnQoJcHS0H X+MJmBaII7JTE0LF2RXxauPkBeeK56Rg4M+kxI31X5Zq18KTmOjHb2Z4GUVbKzOV 6jrGu6iujcvpEgmlaku0E35+6e3VaGbDK8QFTXVDEc3Ksa0fkh8WZlVJLI/Y30Vv DRMI/w597xyiWYW3lXDFlxy/jnI+YFIFtYtE9ud1j2ftRRv0yp4BYFCRqRNTu0r1 uYKuDHssfshYscLb2LUumlA0VxOZHqnYZnWOOgyYnpkYyyLs1trI9eFrcgIJdAUi mAJzroDsJ6PsSj7AHCYNqcMx9OthDWBT32gYcazo7vFEyuNBDp8E79cI8pQiYGNN qEO+Lv1Z5Hk= =4nHq -----END PGP SIGNATURE----- Merge tag 'objtool-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "Fix a couple of endianness bugs that crept in" * tag 'objtool-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool/x86: Fix elf_add_alternative() endianness objtool: Fix elf_create_undef_symbol() endianness
This commit is contained in:
Коммит
e7c425b744
|
@ -19,6 +19,7 @@
|
|||
#include <objtool/elf.h>
|
||||
#include <objtool/arch.h>
|
||||
#include <objtool/warn.h>
|
||||
#include <objtool/endianness.h>
|
||||
#include <arch/elf.h>
|
||||
|
||||
static int is_x86_64(const struct elf *elf)
|
||||
|
@ -725,7 +726,7 @@ static int elf_add_alternative(struct elf *elf,
|
|||
return -1;
|
||||
}
|
||||
|
||||
alt->cpuid = cpuid;
|
||||
alt->cpuid = bswap_if_needed(cpuid);
|
||||
alt->instrlen = orig_len;
|
||||
alt->replacementlen = repl_len;
|
||||
|
||||
|
|
|
@ -762,6 +762,7 @@ struct symbol *elf_create_undef_symbol(struct elf *elf, const char *name)
|
|||
data->d_buf = &sym->sym;
|
||||
data->d_size = sizeof(sym->sym);
|
||||
data->d_align = 1;
|
||||
data->d_type = ELF_T_SYM;
|
||||
|
||||
sym->idx = symtab->len / sizeof(sym->sym);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче