aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-02-08 12:29:07 +0000
committerNick Clifton <nickc@redhat.com>2018-02-08 12:29:07 +0000
commit8de3a6e2afe21ac93d610fa46fbc579a81ea2277 (patch)
tree557d97ca5eda8106e2480e3ec8360a8e166e3beb /binutils
parentef135d4314fd4c2d7da66b9d7b59af4a85b0f7e6 (diff)
downloadfsf-binutils-gdb-8de3a6e2afe21ac93d610fa46fbc579a81ea2277.zip
fsf-binutils-gdb-8de3a6e2afe21ac93d610fa46fbc579a81ea2277.tar.gz
fsf-binutils-gdb-8de3a6e2afe21ac93d610fa46fbc579a81ea2277.tar.bz2
Speed up readelf and objdump by not looking for DWO links unless the user has requested that they be displayed/followed.
PR 22802 * dwarf.c (load_separate_debug_file): Return early if the user is not interested in debug links.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/dwarf.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1e7e581..5fe9d97 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2018-02-08 Nick Clifton <nickc@redhat.com>
+
+ PR 22802
+ * dwarf.c (load_separate_debug_file): Return early if the user is
+ not interested in debug links.
+
2018-02-06 Nick Clifton <nickc@redhat.com>
PR 22793
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 71fdf39..6aca9b7 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -9876,6 +9876,10 @@ load_dwo_file (const char * main_filename)
void *
load_separate_debug_file (void * file, const char * filename)
{
+ /* Skip this operation if we are not interested in debug links. */
+ if (! do_follow_links && ! do_debug_links)
+ return NULL;
+
/* See if there is a dwo link. */
if (load_debug_section (str, file)
&& load_debug_section (abbrev, file)
@@ -9910,6 +9914,8 @@ load_separate_debug_file (void * file, const char * filename)
}
if (! do_follow_links)
+ /* The other debug links will be displayed by display_debug_links()
+ so we do not need to do any further processing here. */
return NULL;
/* FIXME: We do not check for the presence of both link sections in the same file. */