linux-mips
[Top] [All Lists]

No bss cause strange values in insmod and ELF

To: linux-mips@oss.sgi.com
Subject: No bss cause strange values in insmod and ELF
From: Shay Deloya <shay@jungo.com>
Date: Thu, 10 May 2001 09:10:45 +0300
Organization: Jungo Corp.
Reply-to: shay@jungo.com
Sender: owner-linux-mips@oss.sgi.com

----------  Forwarded Message  ----------
Subject: no bss cause strange values in insmod and ELF
Date: Wed, 9 May 2001 09:47:05 +0300
From: Shay Deloya <shay@jungo.com>
To: linux-mips@oss.sgi.com


Continuing my previous problem...

I have created a module with no bss , and compiled it with kernel 2.2.
Comparing this module with same code that has bss and acts OK.

Inserting the module with modutiles 2.2.2/ busybox insmod causes
a relocation overflow message , the reasons are:

1.in function obj_relocate: corrupted intsym->secidx value
  (not the needed index in the ELF)
   for some .text segments, other segments get their index value OK.
  the ELF file seems to be OK.
2. in function arch_apply_relocation: the wrong index (secidx=1006a1e8)
   cause R_MIPS_26 symbols (jump commands) to have the value of
   obj_reloc_overflow and then causes relocation overflow.

Does anyone knows why same module that has a variable in bss acts fine
 and the one without bss causes Relocation overflow in MIPS ? (in x86 there
is no problem).

Searching the code I see there is no initialization of the secidx ,
 is it a problem of wrong reading of ELF files by insmod ?

Attached the two ELF files , and obj_relocate values.

Thanks,
Shay Deloya
______________________________________
Software Developer
Jungo - R&D
email: shay@jungo.com
web: http://www.jungo.com
Phone: 1-877-514-0537(USA)  +972-9-8859365(Worldwide) ext. 221
Fax:   1-877-514-0538(USA)  +972-9-8859366(Worldwide)

-------------------------------------------------------

-- 
Shay Deloya
______________________________________
Software Developer
Jungo - R&D
email: shayd@jungo.com
web: http://www.jungo.com
Phone: 1-877-514-0537(USA)  +972-9-8859365(Worldwide) ext. 221
Fax:   1-877-514-0538(USA)  +972-9-8859366(Worldwide)

Attachment: elf.no_bss
Description: Text document

Attachment: obj_relocate_log
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>