summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c21
-rw-r--r--libexec/rtld-elf/rtld.h3
2 files changed, 12 insertions, 12 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 1456ad9..9decc12 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: rtld.c,v 1.4 1998/09/02 01:09:34 jdp Exp $
+ * $Id: rtld.c,v 1.5 1998/09/02 02:00:20 jdp Exp $
*/
/*
@@ -1388,17 +1388,16 @@ trace_loaded_objects(Obj_Entry *obj)
bool is_lib;
for (needed = obj->needed; needed; needed = needed->next) {
- name = (char *)obj->strtab + needed->name;
- if (!strncmp(name, "lib", 3)) {
- is_lib = true; /* XXX bogus */
- } else {
- is_lib = false;
- }
-
- if (needed->obj == NULL)
- path = "not found";
- else
+ if (needed->obj != NULL) {
+ if (needed->obj->traced)
+ continue;
+ needed->obj->traced = true;
path = needed->obj->path;
+ } else
+ path = "not found";
+
+ name = (char *)obj->strtab + needed->name;
+ is_lib = strncmp(name, "lib", 3) == 0; /* XXX - bogus */
fmt = is_lib ? fmt1 : fmt2;
while ((c = *fmt++) != '\0') {
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index a8490d1..679a676 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: rtld.h,v 1.2 1998/04/30 07:48:02 dfr Exp $
+ * $Id: rtld.h,v 1.3 1998/08/21 03:29:40 jb Exp $
*/
#ifndef RTLD_H /* { */
@@ -109,6 +109,7 @@ typedef struct Struct_Obj_Entry {
bool rtld; /* True if this is the dynamic linker */
bool textrel; /* True if there are relocations to text seg */
bool symbolic; /* True if generated with "-Bsymbolic" */
+ bool traced; /* Already printed in ldd trace output */
struct link_map linkmap; /* for GDB */
} Obj_Entry;
OpenPOWER on IntegriCloud