summaryrefslogtreecommitdiff
path: root/usr/src/lib/libdwarf/common/dwarf_weaks.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2020-06-25 17:58:31 -0700
committerRobert Mustacchi <rm@fingolfin.org>2020-07-10 12:35:15 -0700
commit4d9fdb46b215739778ebc12079842c9905586999 (patch)
tree3771cce63ac88d62941f4174ee3fa58336a95775 /usr/src/lib/libdwarf/common/dwarf_weaks.c
parent4c60ecf710115cd5ae61f6b97dafc7ff963259f4 (diff)
downloadillumos-gate-4d9fdb46b215739778ebc12079842c9905586999.tar.gz
12223 Update libdwarf to libdwarf-20200612
Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/libdwarf/common/dwarf_weaks.c')
-rw-r--r--usr/src/lib/libdwarf/common/dwarf_weaks.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/usr/src/lib/libdwarf/common/dwarf_weaks.c b/usr/src/lib/libdwarf/common/dwarf_weaks.c
index 425916e62e..55bf938fc1 100644
--- a/usr/src/lib/libdwarf/common/dwarf_weaks.c
+++ b/usr/src/lib/libdwarf/common/dwarf_weaks.c
@@ -4,41 +4,31 @@
Portions Copyright (C) 2009-2010 David Anderson. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
+ under the terms of version 2.1 of the GNU Lesser General Public License
as published by the Free Software Foundation.
This program is distributed in the hope that it would be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
+ free of the rightful claim of any third person regarding infringement
+ or the like. Any license provided herein, whether implied or
otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
+ any, provided herein do not apply to combinations of this program with
+ other software, or any other product whatsoever.
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, write the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
USA.
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
*/
-
-
#include "config.h"
-#include "dwarf_incl.h"
#include <stdio.h>
+#include "dwarf_incl.h"
+#include "dwarf_error.h"
#include "dwarf_weaks.h"
#include "dwarf_global.h"
@@ -51,11 +41,15 @@ dwarf_get_weaks(Dwarf_Debug dbg,
if (res != DW_DLV_OK) {
return res;
}
+ if (!dbg->de_debug_weaknames.dss_size) {
+ return (DW_DLV_NO_ENTRY);
+ }
+
- return _dwarf_internal_get_pubnames_like_data(dbg,
- dbg->de_debug_weaknames.dss_data,
- dbg->de_debug_weaknames.dss_size,
- (Dwarf_Global **) weaks, /* Type punning for sections
+ return _dwarf_internal_get_pubnames_like_data(dbg,
+ dbg->de_debug_weaknames.dss_data,
+ dbg->de_debug_weaknames.dss_size,
+ (Dwarf_Global **) weaks, /* Type punning for sections
with identical format. */
ret_weak_count,
error,