mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Is Musl responsible for runpath parsing in an elf file?
@ 2020-06-16  0:45 Jeffrey Walton
  2020-06-16  1:16 ` Rich Felker
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Walton @ 2020-06-16  0:45 UTC (permalink / raw)
  To: musl

Hi Everyone,

Please forgive my ignorance... Is Musl responsible for runpath parsing
during elf loading? If it matters, I'm working on Alpine Linux.

Jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [musl] Is Musl responsible for runpath parsing in an elf file?
  2020-06-16  0:45 [musl] Is Musl responsible for runpath parsing in an elf file? Jeffrey Walton
@ 2020-06-16  1:16 ` Rich Felker
  2020-06-16  1:25   ` Jeffrey Walton
  0 siblings, 1 reply; 5+ messages in thread
From: Rich Felker @ 2020-06-16  1:16 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: musl

On Mon, Jun 15, 2020 at 08:45:18PM -0400, Jeffrey Walton wrote:
> Hi Everyone,
> 
> Please forgive my ignorance... Is Musl responsible for runpath parsing
> during elf loading? If it matters, I'm working on Alpine Linux.

Yes, loading of all libraries except the dynamic linker itself (which
includes libc on musl) is the responsibility of the dynamic linker and
is performed in userspace.

When searching for a given library as a dependency (DT_NEEDED), musl's
processing of rpath/runpath uses the runpath of the shared object
that's depending on it and causing it to be pulled in, and continues
this resolution recursively backwards, potentially up to the main
program's runpath, if not found.

Rich

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [musl] Is Musl responsible for runpath parsing in an elf file?
  2020-06-16  1:16 ` Rich Felker
@ 2020-06-16  1:25   ` Jeffrey Walton
  2020-06-17 19:40     ` Szabolcs Nagy
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Walton @ 2020-06-16  1:25 UTC (permalink / raw)
  To: Rich Felker; +Cc: musl

On Mon, Jun 15, 2020 at 9:16 PM Rich Felker <dalias@libc.org> wrote:
>
> On Mon, Jun 15, 2020 at 08:45:18PM -0400, Jeffrey Walton wrote:
> > Hi Everyone,
> >
> > Please forgive my ignorance... Is Musl responsible for runpath parsing
> > during elf loading? If it matters, I'm working on Alpine Linux.
>
> Yes, loading of all libraries except the dynamic linker itself (which
> includes libc on musl) is the responsibility of the dynamic linker and
> is performed in userspace.
>
> When searching for a given library as a dependency (DT_NEEDED), musl's
> processing of rpath/runpath uses the runpath of the shared object
> that's depending on it and causing it to be pulled in, and continues
> this resolution recursively backwards, potentially up to the main
> program's runpath, if not found.

Thanks Rich.

I may have mis-filed this against Alpine:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/11655.

Is it expected behavior? Should I move it to Musl bug tracker?

Jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [musl] Is Musl responsible for runpath parsing in an elf file?
  2020-06-16  1:25   ` Jeffrey Walton
@ 2020-06-17 19:40     ` Szabolcs Nagy
  2020-06-17 19:51       ` Jeffrey Walton
  0 siblings, 1 reply; 5+ messages in thread
From: Szabolcs Nagy @ 2020-06-17 19:40 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: Rich Felker, musl

* Jeffrey Walton <noloader@gmail.com> [2020-06-15 21:25:15 -0400]:
> On Mon, Jun 15, 2020 at 9:16 PM Rich Felker <dalias@libc.org> wrote:
> > On Mon, Jun 15, 2020 at 08:45:18PM -0400, Jeffrey Walton wrote:
> > > Hi Everyone,
> > >
> > > Please forgive my ignorance... Is Musl responsible for runpath parsing
> > > during elf loading? If it matters, I'm working on Alpine Linux.
> >
> > Yes, loading of all libraries except the dynamic linker itself (which
> > includes libc on musl) is the responsibility of the dynamic linker and
> > is performed in userspace.
> >
> > When searching for a given library as a dependency (DT_NEEDED), musl's
> > processing of rpath/runpath uses the runpath of the shared object
> > that's depending on it and causing it to be pulled in, and continues
> > this resolution recursively backwards, potentially up to the main
> > program's runpath, if not found.
> 
> Thanks Rich.
> 
> I may have mis-filed this against Alpine:
> https://gitlab.alpinelinux.org/alpine/aports/-/issues/11655.
> 
> Is it expected behavior? Should I move it to Musl bug tracker?

yeah i remember this discussion

https://sourceware.org/legacy-ml/binutils/2019-06/msg00014.html

i think there is no good solution, you have to figure
out the right level of escape magic for your build
system when passing runpath flags.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [musl] Is Musl responsible for runpath parsing in an elf file?
  2020-06-17 19:40     ` Szabolcs Nagy
@ 2020-06-17 19:51       ` Jeffrey Walton
  0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Walton @ 2020-06-17 19:51 UTC (permalink / raw)
  To: musl

On Wed, Jun 17, 2020 at 3:40 PM Szabolcs Nagy <nsz@port70.net> wrote:
>
> * Jeffrey Walton <noloader@gmail.com> [2020-06-15 21:25:15 -0400]:
> > On Mon, Jun 15, 2020 at 9:16 PM Rich Felker <dalias@libc.org> wrote:
> > > On Mon, Jun 15, 2020 at 08:45:18PM -0400, Jeffrey Walton wrote:
> > > > Hi Everyone,
> > > >
> > > > Please forgive my ignorance... Is Musl responsible for runpath parsing
> > > > during elf loading? If it matters, I'm working on Alpine Linux.
> > >
> > > Yes, loading of all libraries except the dynamic linker itself (which
> > > includes libc on musl) is the responsibility of the dynamic linker and
> > > is performed in userspace.
> > >
> > > When searching for a given library as a dependency (DT_NEEDED), musl's
> > > processing of rpath/runpath uses the runpath of the shared object
> > > that's depending on it and causing it to be pulled in, and continues
> > > this resolution recursively backwards, potentially up to the main
> > > program's runpath, if not found.
> >
> > Thanks Rich.
> >
> > I may have mis-filed this against Alpine:
> > https://gitlab.alpinelinux.org/alpine/aports/-/issues/11655.
> >
> > Is it expected behavior? Should I move it to Musl bug tracker?
>
> yeah i remember this discussion
>
> https://sourceware.org/legacy-ml/binutils/2019-06/msg00014.html
>
> i think there is no good solution, you have to figure
> out the right level of escape magic for your build
> system when passing runpath flags.

Man, I'm getting old. I forgot about that discussion.

My memory is not worth a shit anymore...

Jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-17 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16  0:45 [musl] Is Musl responsible for runpath parsing in an elf file? Jeffrey Walton
2020-06-16  1:16 ` Rich Felker
2020-06-16  1:25   ` Jeffrey Walton
2020-06-17 19:40     ` Szabolcs Nagy
2020-06-17 19:51       ` Jeffrey Walton

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).