Re: Regarding GOT table in PIC code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Ian, Andrew.

- chethan

On Tue, Jan 10, 2012 at 10:31 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
>
> Chethan Palakshamurthy <pchethan@xxxxxxxxx> writes:
>
> >>> 1. Does the dynamic linker map the physical pages for .data segments
> >>> such that GOT is at a fixed offset from code in logical address space?
> >>> is this true?
> >>
> >>Yes, it has to do this or it wouldn't be possible to find the GOT.
> >
> > So, this method of paging is what makes it possible to share code
> > pages across processes? Several sources online(/books) mention that
> > PIC is the one which make code sharing across processes possible.
>
> I would not say that it's the method of paging that makes that
> possible.  That is merely a detail in how the GOT is implemented.
>
> The GOT makes sharing possible because it separates the final address of
> the variable from the code.  Thus the code can be shared even though the
> address of the variable will be different in different processes.
>
> Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux