mirror of
https://github.com/dynup/kpatch
synced 2025-02-10 05:56:52 +00:00
Merge pull request #1428 from bhllamoreaux/photon-patches
Patches from Photon OS
This commit is contained in:
commit
b57508e694
@ -236,19 +236,19 @@ static struct rela *toc_rela(const struct rela *rela)
|
||||
static void kpatch_bundle_symbols(struct kpatch_elf *kelf)
|
||||
{
|
||||
struct symbol *sym;
|
||||
unsigned int expected_offset;
|
||||
uint64_t expected_offset;
|
||||
|
||||
list_for_each_entry(sym, &kelf->symbols, list) {
|
||||
if (is_bundleable(sym)) {
|
||||
if (sym->pfx)
|
||||
expected_offset = 16;
|
||||
expected_offset = sym->pfx->sym.st_size;
|
||||
else if (is_gcc6_localentry_bundled_sym(kelf, sym))
|
||||
expected_offset = 8;
|
||||
else
|
||||
expected_offset = 0;
|
||||
|
||||
if (sym->sym.st_value != expected_offset) {
|
||||
ERROR("symbol %s at offset %lu within section %s, expected %u",
|
||||
ERROR("symbol %s at offset %lu within section %s, expected %lu",
|
||||
sym->name, sym->sym.st_value,
|
||||
sym->sec->name, expected_offset);
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ static void kpatch_link_prefixed_functions(struct kpatch_elf *kelf)
|
||||
|
||||
list_for_each_entry(func, &kelf->symbols, list) {
|
||||
if (func->type == STT_FUNC && func->sec == pfx->sec &&
|
||||
func->sym.st_value == pfx->sym.st_value + 16) {
|
||||
func->sym.st_value == pfx->sym.st_value + pfx->sym.st_size) {
|
||||
|
||||
/*
|
||||
* If a func has aliases, it's possible for
|
||||
|
Loading…
Reference in New Issue
Block a user