This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: FAIL: elf/tst-dlopen-aout?
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 11 Apr 2014 12:35:45 -0700
- Subject: Re: FAIL: elf/tst-dlopen-aout?
- Authentication-results: sourceware.org; auth=none
- References: <534731A1 dot 3000503 at redhat dot com> <CALoOobO28aeL-sKK7rbQgBzVVF6kUDUxd_fyYsuJmvVgs4NJyA at mail dot gmail dot com> <87k3aveq44 dot fsf at igel dot home>
On Fri, Apr 11, 2014 at 10:24 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Paul Pluzhnikov <ppluzhnikov@google.com> writes:
>
>> That requires that I build a separate b.out, and try to dlopen it from
>> tst-dlopen-aout. Unfortunately, I completely failed to understand the
>> Makefile machinery to have a test that depends on another binary.
>
> Add it to the dependency list of the *.out file.
I have added new source: elf/tst-dlopen-aout-helper.c, and modified
elf/Makefile like so:
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -148,11 +148,8 @@ tests += loadtest restest1 preloadtest loadfail
multiload origtest resolvfail \
tst-stackguard1 tst-addr1 tst-thrlock \
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
- tst-ptrguard1
+ tst-ptrguard1 tst-dlopen-aout
# reldep9
-ifeq ($(build-hardcoded-path-in-tests),yes)
-tests += tst-dlopen-aout
-endif
test-srcs = tst-pathopt
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
ifneq ($(selinux-enabled),1)
@@ -1060,6 +1057,8 @@ $(objpfx)tst-addr1: $(libdl)
$(objpfx)tst-thrlock: $(libdl) $(shared-thread-library)
$(objpfx)tst-dlopen-aout: $(libdl) $(shared-thread-library)
+$(objpfx)tst-dlopen-aout.out: $(objpfx)tst-dlopen-aout-helper
+# $(objpfx)tst-dlopen-aout-helper: tst-dlopen-aout-helper.c
CFLAGS-ifuncmain1pic.c += $(pic-ccflag)
CFLAGS-ifuncmain1picstatic.c += $(pic-ccflag)
This produces
make[1]: Leaving directory `/glibc/elf'
make: *** No rule to make target `/build/elf/tst-dlopen-aout-helper',
needed by `/build/elf/tst-dlopen-aout.out'. Stop.
If I comment in this line:
$(objpfx)tst-dlopen-aout-helper: tst-dlopen-aout-helper.c
then there is no make error (but no tst-dlopen-aout-helper is linked either).
I am utterly failing to understand why implicit rules aren't kicking
in, or what I need to do to get tst-dlopen-aout-helper built.
Help?
Thanks,
--
Paul Pluzhnikov