mirror of
https://github.com/dynup/kpatch
synced 2025-01-02 18:52:02 +00:00
create-diff-object: Remove REL24 rela check in kpatch_replace_sections_syms
Symbols with R_PPC64_REL24 relocation type are functions and it's currently assumed that all functions are replaced with their respective section symbols. There are function whose reference are not straight forward section symbol but section + offset. These function replacement should be handled more like bundled sections. Remove the check, which imposes the inital assumption. Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
This commit is contained in:
parent
c61cb6776a
commit
cac608a05a
@ -1168,17 +1168,6 @@ static void kpatch_replace_sections_syms(struct kpatch_elf *kelf)
|
||||
}
|
||||
|
||||
#ifdef __powerpc__
|
||||
/*
|
||||
* With -mcmodel=large, R_PPC64_REL24 is only used for
|
||||
* functions. Assuming the function is bundled in a
|
||||
* section, the section symbol should have been
|
||||
* replaced with a text symbol already. Otherwise,
|
||||
* bail out. If we hit this situation, more core is
|
||||
* needed here to calculate the value of 'add_off'.
|
||||
*/
|
||||
if (rela->type == R_PPC64_REL24)
|
||||
ERROR("Unexpected relocation type R_PPC64_REL24 for %s\n", rela->sym->name);
|
||||
|
||||
add_off = 0;
|
||||
#else
|
||||
if (rela->type == R_X86_64_PC32) {
|
||||
|
Loading…
Reference in New Issue
Block a user