PATCH for modutils to fix relocation of IMM64 type
Here is a patch to fix the relocation problem in insmod for IMM64 types (also attached).
Thanks,
Asit
obj/obj_ia64.c Wed Dec 12 17:18:31 2001 renamed from obj/obj_ia64.c Tue Sep 25 21:50:45 2001 +4 -3
@@ -255,14 +255,15 @@ { Elf64_Xword ins; - assert(slot == 1); + assert(slot == 2); + ins = obj_ia64_ins_extract_from_bundle(bundle, slot); - ins &= 0xffffffee000101ff; - ins |= ((v & 0x8000000000000000) >> 28) | ((v & 0x0000000000200000)) | + ins &= 0xffffffe000101fff; + ins |= ((v & 0x8000000000000000) >> 27) | ((v & 0x0000000000200000)) | ((v & 0x00000000001f0000) << 6) | ((v & 0x000000000000ff80) <<
20) |
((v & 0x000000000000007f) << 13);
obj_ia64_ins_insert_in_bundle(bundle, slot, ins);- obj_ia64_ins_insert_in_bundle(bundle, ++slot, ((v & 0x7fffffffffc00000)
Quoted 1 line
Quoted 1 line
22));
+ obj_ia64_ins_insert_in_bundle(bundle, --slot, ((v & 0x7fffffffffc00000)
Quoted 1 line
Quoted 1 line
22));
return obj_reloc_ok;
}
<<obj_ia64.diff>>
obj/obj_ia64.c +5 -4
@@ -255,14 +255,15 @@ {Elf64_Xword ins; -assert (slot ==1 ); +assert (slot ==2 ); + ins =obj_ia64_ins_extract_from_bundle (bundle, slot); - ins &=0xffffffee000101ff ; - ins |= ((v &0x8000000000000000 ) >>28 ) | ((v &0x0000000000200000 )) | + ins &=0xffffffe000101fff ; + ins |= ((v &0x8000000000000000 ) >>27 ) | ((v &0x0000000000200000 )) | ((v &0x00000000001f0000 ) <<6 ) | ((v &0x000000000000ff80 ) <<20 ) | ((v &0x000000000000007f ) <<13 );obj_ia64_ins_insert_in_bundle (bundle, slot, ins); -obj_ia64_ins_insert_in_bundle (bundle, ++slot, ((v &0x7fffffffffc00000 ) >>22 )); +obj_ia64_ins_insert_in_bundle (bundle, --slot, ((v &0x7fffffffffc00000 ) >>22 ));return obj_reloc_ok; }