public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: libc-alpha@sourceware.org
Cc: Florian Weimer <fweimer@redhat.com>
Subject: Re: [PATCH v2] elf: Fix tst-nodeps2 test failure.
Date: Wed, 10 Jan 2024 16:22:19 -0500	[thread overview]
Message-ID: <eaa00312-8018-84f1-e089-cedb039a4595@redhat.com> (raw)
In-Reply-To: <20240110211521.532816-1-carlos@redhat.com>

On 1/10/24 16:15, Carlos O'Donell wrote:
> After 78ca44da0160a0b442f0ca1f253e3360f044b2ec
> ("elf: Relocate libc.so early during startup and dlmopen (bug 31083)")
> we start seeing tst-nodeps2 failures when building the testsuite with
> --enable-hard-coded-path-in-tests.
> 
> When building the testsuite with --enable-hard-coded-path-in-tests
> the tst-nodeps2-mod.so is not built with the required DT_RUNPATH
> values and the test escapes the test framework and loads the system
> libraries and aborts. The fix is to use the existing
> $(link-test-modules-rpath-link) variable to set DT_RUNPATH correctly.
> 
> No regressions on x86_64.
> 
> Reviewed-by: Florian Weimer <fweimer@redhat.com>

I have committed this version with an updated commit message.

> ---
>  elf/Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/elf/Makefile b/elf/Makefile
> index 600812e573..5d78b659ce 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -3022,6 +3022,8 @@ $(objpfx)tst-env-setuid: $(objpfx)tst-sonamemove-runmod2.so
>  $(objpfx)tst-env-setuid-static.out: $(objpfx)tst-sonamemove-runmod1.so
>  
>  # The object tst-nodeps1-mod.so has no explicit dependencies on libc.so.
> +# We do not use $(link-test-modules-rpath-link) since the object has no
> +# DT_NEEDED.
>  $(objpfx)tst-nodeps1-mod.so: $(objpfx)tst-nodeps1-mod.os
>  	$(LINK.o) -nostartfiles -nostdlib -shared -o $@ $^
>  tst-nodeps1.so-no-z-defs = yes
> @@ -3032,7 +3034,8 @@ $(objpfx)tst-nodeps1: $(objpfx)tst-nodeps1-mod.so
>  # with the IFUNC resolver reference.
>  $(objpfx)tst-nodeps2-mod.so: $(common-objpfx)libc.so \
>    $(objpfx)tst-nodeps1-mod.so $(objpfx)tst-nodeps2-mod.os
> -	$(LINK.o) -Wl,--no-as-needed -nostartfiles -nostdlib -shared -o $@ $^
> +	$(LINK.o) -Wl,--no-as-needed -nostartfiles -nostdlib -shared -o $@ $^ \
> +	$(link-test-modules-rpath-link)
>  $(objpfx)tst-nodeps2.out: \
>    $(objpfx)tst-nodeps1-mod.so $(objpfx)tst-nodeps2-mod.so
>  

-- 
Cheers,
Carlos.


      reply	other threads:[~2024-01-10 21:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 21:15 Carlos O'Donell
2024-01-10 21:22 ` Carlos O'Donell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eaa00312-8018-84f1-e089-cedb039a4595@redhat.com \
    --to=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).