Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patches from Photon OS #1428

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion kpatch-build/kpatch-elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading