public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Matthias Maennich <maennich@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, gprocida@google.com, kernel-team@android.com,
	 maennich@google.com
Subject: [PATCH] tools-utils: Do not skip symbolic links when analyzing a linux tree
Date: Tue, 24 Aug 2021 22:30:12 +0100	[thread overview]
Message-ID: <20210824213012.2486940-1-maennich@google.com> (raw)

For various reasons, (parts of) a linux kernel tree containing vmlinux
and kernel modules might be organized using symbolic links. One reason
is that those binaries physically reside on a different storage and are
linked into place. To support such scenarios by allowing to traverse
symbolic links when discovering linux kernel binaries.

I could not see a reason why this was disabled in the first place.
Ignoring symbolic links had been the default since the inception of the
kernel mode.

Hence, allow valid symbolic links and that is what this patch does.

	* src/abg-tools-utils.cc (find_vmlinux_and_module_paths): Do not
	skip valid symbolic links.

Signed-off-by: Matthias Maennich <maennich@google.com>
---
 src/abg-tools-utils.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc
index 2fb20c6e9e2c..cc9a23ea3497 100644
--- a/src/abg-tools-utils.cc
+++ b/src/abg-tools-utils.cc
@@ -2298,8 +2298,8 @@ find_vmlinux_and_module_paths(const string&	from,
   FTSENT *entry;
   while ((entry = fts_read(file_hierarchy)))
     {
-      // Skip descendents of symbolic links.
-      if (entry->fts_info == FTS_SL || entry->fts_info == FTS_SLNONE)
+      // Skip descendents of dead symbolic links.
+      if (entry->fts_info == FTS_SLNONE)
 	{
 	  fts_set(file_hierarchy, entry, FTS_SKIP);
 	  continue;
-- 
2.33.0.rc2.250.ged5fa647cd-goog


             reply	other threads:[~2021-08-24 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 21:30 Matthias Maennich [this message]
2021-09-01  8:53 ` Dodji Seketeli

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=20210824213012.2486940-1-maennich@google.com \
    --to=maennich@google.com \
    --cc=dodji@seketeli.org \
    --cc=gprocida@google.com \
    --cc=kernel-team@android.com \
    --cc=libabigail@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).