This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Finding the path of the current binary?


> That's not really an unreasonable requirement.  It would just be one
> argument to a general function.  

I know, I know, I'm just difficult :) My real concern is that it's just
one more place to forget to change if you bump the soname.... a very
minor thing, but it'd be nice to avoid it if possible.

> But as has been pointed out, it's not
> really required because a function can be written that examines the
> _DYNAMIC table itself.  If that function lives in another shared library,
> it needs to take &_DYNAMIC as an argument from code in the library that
> wants to know about itself.

Thanks, I'll have a play with this. Should be fine for now.

> > > That said, it might indeed be nice to have a library interface for
> > > substituting $ORIGIN and similar magic bits.
> > 
> > That would be idea really. Any idea how complex such a patch would be?
> 
> Adding something to glibc would be trivial if an interface is chosen.
> The Solaris `dlinfo' interface looks reasonable at a glance.  I could add that.

Yep, dlinfo looks good. Want me to file it in the redhat bugzilla, or is
that not the right place?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]