From: "Tommy S. Christensen" <tommy.christensen@eicon.com>
To: shay@jungo.com
Cc: linux-mips@oss.sgi.com, michaels@jungo.com
Subject: Re: No bss cause strange values in insmod and ELF
Date: Thu, 10 May 2001 23:11:18 +0200 [thread overview]
Message-ID: <3AFB03F6.7A3C7847@eicon.com> (raw)
In-Reply-To: 01051009104509.01140@athena.home.krftech.com
Shay Deloya wrote:
>
> 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.
>
I had a look at the attachments and I think the cause of your problem is
that the module is not a relocatable file!
ld can fix this for you. Try ld -r -o new.o <modulename>.o, and then
insert new.o instead.
Regarding the effect of empty/non-empty .bss section (and of recompiling
modutils), I think this is just a case of "fix by accident". Meaning
that
it's still broke - it just didn't die (this time).
Regards,
Tommy Christensen
next prev parent reply other threads:[~2001-05-10 21:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-10 6:10 No bss cause strange values in insmod and ELF Shay Deloya
2001-05-10 21:11 ` Tommy S. Christensen [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-05-09 6:47 no " Shay Deloya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AFB03F6.7A3C7847@eicon.com \
--to=tommy.christensen@eicon.com \
--cc=linux-mips@oss.sgi.com \
--cc=michaels@jungo.com \
--cc=shay@jungo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.