public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] PATCH for modutils to fix relocation of IMM64 type
@ 2001-12-21  4:19 Mallick, Asit K
  0 siblings, 0 replies; only message in thread
From: Mallick, Asit K @ 2001-12-21  4:19 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Here is a patch to fix the relocation problem in insmod for IMM64 types
(also attached).

Thanks,
Asit
 

--- modutils-2.4.12/obj/obj_ia64.c      Tue Sep 25 21:50:45 2001
+++ modutils-2.4.12-akm/obj/obj_ia64.c  Wed Dec 12 17:18:31 2001
@@ -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;
 }

 <<obj_ia64.diff>> 


[-- Attachment #2: obj_ia64.diff --]
[-- Type: application/octet-stream, Size: 892 bytes --]

--- modutils-2.4.12/obj/obj_ia64.c	Tue Sep 25 21:50:45 2001
+++ modutils-2.4.12-akm/obj/obj_ia64.c	Wed Dec 12 17:18:31 2001
@@ -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;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-21  4:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-21  4:19 [Linux-ia64] PATCH for modutils to fix relocation of IMM64 type Mallick, Asit K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox