Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Stale entries left in GOT & PLT while discarding sections: msg#00002

Subject: Re: Stale entries left in GOT & PLT while discarding sections
On 4/7/06, Alan Modra <amodra@xxxxxxxxxxxxxx> wrote:
> On Fri, Apr 07, 2006 at 07:09:55PM +0530, Rajat Jain wrote:
> > 1) As per my understanding the reason that the (stale) entries for the
> > removed sections / symbols are left in the GOT / PLT is because "ld"
> > creates the GOT and PLT at an early stage and later when reading the
> > linker script discards the sections as requested. It however does not
> > see (and does not care) that due to the removal of certain sections,
> > the entries in GOT and PLT have become inconsistent. Is my
> > understanding correct?
>
> Yes.
>
> > 2) Is there any solution to the problem I am facing here? I mean is
> > there a way to remove the entries from the GOT and PLT as well?
>
> I think the basic machinery to do this is already in the linker
> --gc-sections support.  If I was trying to do this, I would
>
> o Break out the gc_sweep_hook calls in elflink.c:elf_gc_sweep into
>  another function.  ie. Set SEC_EXCLUDE in elf_gc_sweep, but don't call
>  the hook to decrement plt/got reloc counts.  The new function should
>  call gc_sweep_hook on all SEC_EXCLUDE sections that have been
>  processed by check_relocs.
> o Arrange to call the new function immediately after
>  ldlang.c:lang_process calls lang_place_orphans.
>

Hi Alan,

Thanks for the clue. I now have a new direction to look at :)

Thanks again,

Rajat



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe