From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 1/3] scripts/dso-ordering-test.py: Generate program run-time dependencies
Date: Mon, 15 Aug 2022 16:30:50 +0200 [thread overview]
Message-ID: <9faf4908b8b923ca077b4a0eac10465d754350d2.1660573629.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1660573629.git.fweimer@redhat.com>
The main program needs to depend on all shared objects, even objects
that have link-time dependencies among shared objects. Filtering
out shared objects that already have an link-time dependencies is not
necessary here; make will do this automatically.
---
scripts/dso-ordering-test.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py
index 2dd6bfda18..f6d22aa00e 100644
--- a/scripts/dso-ordering-test.py
+++ b/scripts/dso-ordering-test.py
@@ -707,13 +707,12 @@ def process_testcase(t):
"\t$(compile.c) $(OUTPUT_OPTION)\n")
makefile.write (rule)
- not_depended_objs = find_objs_not_depended_on(test_descr)
- if not_depended_objs:
- depstr = ""
- for dep in not_depended_objs:
- depstr += (" $(objpfx)" + test_subdir + "/"
- + test_name + "-" + dep + ".so")
- makefile.write("$(objpfx)%s.out:%s\n" % (base_test_name, depstr))
+ # Ensure that all shared objects are built before running the
+ # test, whether there link-time dependencies or not.
+ depobjs = ["$(objpfx){}/{}-{}.so".format(test_subdir, test_name, dep)
+ for dep in test_descr.objs]
+ makefile.write("$(objpfx){}.out: {}\n".format(
+ base_test_name, " ".join(depobjs)))
# Add main executable to test-srcs
makefile.write("test-srcs += %s/%s\n" % (test_subdir, test_name))
@@ -779,6 +778,7 @@ def process_testcase(t):
# description string.
for obj in test_descr.objs:
src_name = test_name + "-" + obj + ".c"
+ print('Generating {}...'.format(src_name))
f = open(testpfx_src + src_name, "w")
if obj in test_descr.callrefs:
called_objs = test_descr.callrefs[obj]
--
2.37.1
next prev parent reply other threads:[~2022-08-15 14:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 14:30 [PATCH 0/3] Forced ordering for DFS ELF dependency sorting (bug 28937) Florian Weimer
2022-08-15 14:30 ` Florian Weimer [this message]
2022-08-15 14:35 ` [PATCH 1/3] scripts/dso-ordering-test.py: Generate program run-time dependencies Florian Weimer
2022-08-29 14:30 ` Adhemerval Zanella Netto
2022-08-15 14:30 ` [PATCH 2/3] elf: Rename _dl_sort_maps parameter from skip to force_first Florian Weimer
2022-08-29 16:40 ` Adhemerval Zanella Netto
2022-08-15 14:30 ` [PATCH 3/3] elf: Implement force_first handling in _dl_sort_maps_dfs Florian Weimer
2022-08-31 16:37 ` Adhemerval Zanella Netto
2022-08-31 16:37 ` Adhemerval Zanella Netto
2022-09-06 6:39 ` Florian Weimer
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=9faf4908b8b923ca077b4a0eac10465d754350d2.1660573629.git.fweimer@redhat.com \
--to=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).