[uCsimm] Re: [UCLINUX] Fw: 32-bit PIC patches for the uCsimm !

From: 권석근 (kwonsk@mutech.co.kr)
Date: Thu Jan 06 2000 - 08:35:26 EST

Vadim may be right, because there are object format specific loader code in
the kernel
like fs/binfmt_aout.c fs/binfmt_flt.c.
My guess: a nessary job for sharing bss/data segment of shared libraries is
done at this
loader file. Is it right? Somebody could explain this correctly but i don't
know exact mechanizm yet..
So to make shared library working, both kernel and linker (or compiler it
self?) must be patched.

BTW, the msg of "32bit-pic" from Erwin Authried sounds really great!
and i have a question.

Mr. Erwin, what the meaning of followng comments?
you wrote:
>> There are just a few library-internal calls that
>> cannot be relocated because the call is made between the start
>> of the text segment to the end of the text segment where the libraries
>> are located. When those few calls are fixed.........
this means that "If i recompile all libraries then it's clean but
if i do not want to recompile it, then there must be a problem"?
or "after recompile all libraries, some problems still remained"?
If your answer is second one, then what is the function which make problems?
(Doesn't linker resolve all the relocations?)
Thanks in advance.

-----원본 메시지-----
보낸 사람: Vadim Lebedev <vlebedev@aplio.fr>
받는 사람: Erwin Authried <eauth@softsys.co.at>; ucsimm@uClinux.com
참조: uclinux@c3po.kc-inc.net <uclinux@c3po.kc-inc.net>
날짜: 2000년 1월 6일 목요일 오후 8:22
제목: [uCsimm] Re: [UCLINUX] Fw: 32-bit PIC patches for the uCsimm !

>I'll try to explain:
> suupose you have library rootine foo(), which updates global variable
>errno, with the code like this:
> foo()
> {
> errno = 5;
> }
>it will be compiled to simething like:
> mov d1,5
> mov errno(a5), d1
> ret
>Now, when you link this library to the aplllication A, errno offset from
>beginnig of data segment will be let's say 0x100
>and when you link the library to application B the offset could be
>In any case the actual contents of the libaray .text
>segment is different, hence you can't do code sharing.....

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:33 EST