CVS commit: src/usr.bin/ldd

2023-01-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jan  4 03:33:54 UTC 2023

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
avoid printing the latest error message if some ldd method worked.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.27 src/usr.bin/ldd/ldd.c:1.28
--- src/usr.bin/ldd/ldd.c:1.27	Tue Oct 18 19:04:57 2022
+++ src/usr.bin/ldd/ldd.c	Wed Jan  4 03:33:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.c,v 1.27 2022/10/18 19:04:57 mrg Exp $	*/
+/*	$NetBSD: ldd.c,v 1.28 2023/01/04 03:33:54 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.27 2022/10/18 19:04:57 mrg Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.28 2023/01/04 03:33:54 mrg Exp $");
 #endif /* not lint */
 
 #include 
@@ -124,7 +124,7 @@ main(int argc, char **argv)
 	const char *fmt1 = NULL, *fmt2 = NULL;
 	int c, exit_status = EXIT_SUCCESS;
 	char cwd[MAXPATHLEN], path[MAXPATHLEN];
-	bool verbose = false, failed = false;
+	bool verbose = false;
 
 #ifdef DEBUG
 	debug = 1;
@@ -164,6 +164,7 @@ main(int argc, char **argv)
 
 	for (; argc != 0; argc--, argv++) {
 		int fd;
+		bool failed = false;
 
 		if (**argv != '/') {
 			strcpy(path, cwd);
@@ -185,17 +186,20 @@ main(int argc, char **argv)
 		}
 		/* Alpha never had 32 bit support. */
 #if (defined(_LP64) && !defined(ELF64_ONLY)) || defined(MIPS_N32)
-		if (failed && elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1) {
-			if (verbose)
-warnx("%s", error_message);
-			failed = true;
+		if (failed) {
+			if (elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1) {
+if (verbose)
+	warnx("%s", error_message);
+			} else
+failed = false;
 		}
 #if defined(__mips__) && 0 /* XXX this is still hosed for some reason */
-		if (failed &&
-		elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1) {
-			if (verbose)
-warnx("%s", error_message);
-			failed = true;
+		if (failed) {
+			if (elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1) {
+if (verbose)
+	warnx("%s", error_message);
+			} else
+failed = false;
 		}
 #endif
 #endif



CVS commit: src/usr.bin/ldd

2023-01-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jan  4 03:33:54 UTC 2023

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
avoid printing the latest error message if some ldd method worked.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



re: CVS commit: src/usr.bin/ldd

2022-10-25 Thread Ryo ONODERA
Hi,

matthew green  writes:

>> With this change, ldd /lib/libc.so.12.220 fails under NetBSD/amd64 9.99.101.
>>
>>
>> /lib/libc.so.12.220:
>> ldd: /lib/libc.so.12.220: invalid ELF class 2, expected 1
>>
>> It seems that elf32_ldd() fails.
>>
>> Builds of some pkgsrc packages that use gobject introspection and meson fails
>> because they uses ldd command during build.
>
> this should be fixed now.  sorry for the failure..

I am sorry. I have missed your email.
Thanks for your quick fix!!!

> .mrg.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


re: CVS commit: src/usr.bin/ldd

2022-10-18 Thread matthew green
> With this change, ldd /lib/libc.so.12.220 fails under NetBSD/amd64 9.99.101.
>
>
> /lib/libc.so.12.220:
> ldd: /lib/libc.so.12.220: invalid ELF class 2, expected 1
>
> It seems that elf32_ldd() fails.
>
> Builds of some pkgsrc packages that use gobject introspection and meson fails
> because they uses ldd command during build.

this should be fixed now.  sorry for the failure..


.mrg.


CVS commit: src/usr.bin/ldd

2022-10-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 18 19:04:57 UTC 2022

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
only try the other methods if the previous ones failed.

fixes problem reported by ryoon@


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/ldd

2022-10-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Oct 18 19:04:57 UTC 2022

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
only try the other methods if the previous ones failed.

fixes problem reported by ryoon@


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.26 src/usr.bin/ldd/ldd.c:1.27
--- src/usr.bin/ldd/ldd.c:1.26	Sat Oct 15 05:55:45 2022
+++ src/usr.bin/ldd/ldd.c	Tue Oct 18 19:04:57 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.c,v 1.26 2022/10/15 05:55:45 mrg Exp $	*/
+/*	$NetBSD: ldd.c,v 1.27 2022/10/18 19:04:57 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.26 2022/10/15 05:55:45 mrg Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.27 2022/10/18 19:04:57 mrg Exp $");
 #endif /* not lint */
 
 #include 
@@ -185,13 +185,14 @@ main(int argc, char **argv)
 		}
 		/* Alpha never had 32 bit support. */
 #if (defined(_LP64) && !defined(ELF64_ONLY)) || defined(MIPS_N32)
-		if (elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1) {
+		if (failed && elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1) {
 			if (verbose)
 warnx("%s", error_message);
 			failed = true;
 		}
 #if defined(__mips__) && 0 /* XXX this is still hosed for some reason */
-		if (elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1) {
+		if (failed &&
+		elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1) {
 			if (verbose)
 warnx("%s", error_message);
 			failed = true;



Re: CVS commit: src/usr.bin/ldd

2022-10-18 Thread Ryo ONODERA
Hi,

With this change, ldd /lib/libc.so.12.220 fails under NetBSD/amd64 9.99.101.

/lib/libc.so.12.220:
ldd: /lib/libc.so.12.220: invalid ELF class 2, expected 1

It seems that elf32_ldd() fails.

Builds of some pkgsrc packages that use gobject introspection and meson fails 
because they uses ldd command during build.

Thank you.

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

> On Oct 15, 2022, at 14:55, matthew green  wrote:
> 
> Module Name:src
> Committed By:mrg
> Date:Sat Oct 15 05:55:46 UTC 2022
> 
> Modified Files:
>src/usr.bin/ldd: ldd.1 ldd.c
> 
> Log Message:
> ldd(1): add a -v option to display all errors not just the latest.
> 
> ldd on a go binary currently fails with an error that basically
> says "not elf32 class".  this is a true statement, as it is an
> elf64 class object, but it's not useful.  it happens because
> ldd_elf64() is called, fails in _rtld_map_object(), and then
> ldd_elf32() is called, and it fails because the class is wrong,
> and only this error is returned.  (this problem remains.  the
> call to map the object fails due to there being 3 instead of 2
> elf segments in the file.  i guess we need similar code in
> ld.elf_so/map_objects.c as the kernel gained some time ago.)
> 
> perhaps the first error, not the last error, should be used if
> everything fails, but this allows all failures to be see and
> would be useful even if the error string handling changed.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.20 -r1.21 src/usr.bin/ldd/ldd.1
> cvs rdiff -u -r1.25 -r1.26 src/usr.bin/ldd/ldd.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 
> Modified files: Index: src/usr.bin/ldd/ldd.1 diff -u 
> src/usr.bin/ldd/ldd.1:1.20 src/usr.bin/ldd/ldd.1:1.21 --- 
> src/usr.bin/ldd/ldd.1:1.20 Mon Dec 25 05:08:49 2017 +++ src/usr.bin/ldd/ldd.1 
> Sat Oct 15 05:55:45 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: ldd.1,v 1.20 
> 2017/12/25 05:08:49 maya Exp $ +.\" $NetBSD: ldd.1,v 1.21 2022/10/15 05:55:45 
> mrg Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All 
> rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF 
> THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" 
> -.Dd December 25, 2017 +.Dd October 15, 2022 .Dt LDD 1 .Os .Sh NAME @@ -35,7 
> +35,7 @@ .Nd list dynamic object dependencies .Sh SYNOPSIS .Nm -.Op Fl o +.Op 
> Fl ov .Op Fl f Ar format .Ar program ... .Sh DESCRIPTION @@ -105,6 +105,10 @@ 
> which makes .Nm behave analogously to .Ic nm Fl o . +.Pp +The +.Fl v +option 
> turns on verbose mode. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO @@ -118,9 +122,3 
> @@ A utility first appeared in SunOS 4.0, it appeared in its current form in 
> .Nx 0.9a . -.Sh BUGS -The -a.out -.Nm -actually runs the program it has been 
> requested to analyze which in specially -constructed environments can have 
> security implications. Index: src/usr.bin/ldd/ldd.c diff -u 
> src/usr.bin/ldd/ldd.c:1.25 src/usr.bin/ldd/ldd.c:1.26 --- 
> src/usr.bin/ldd/ldd.c:1.25 Fri Jul 23 04:20:05 2021 +++ src/usr.bin/ldd/ldd.c 
> Sat Oct 15 05:55:45 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ldd.c,v 1.25 2021/07/23 
> 04:20:05 martin Exp $ */ +/* $NetBSD: ldd.c,v 1.26 2022/10/15 05:55:45 mrg 
> Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -62,7 
> +62,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ldd.c,v 1.25 2021/07/23 
> 04:20:05 martin Exp $"); +__RCSID("$NetBSD: ldd.c,v 1.26 2022/10/15 05:55:45 
> mrg Exp $"); #endif /* not lint */ #include @@ -124,11 +124,12 @@ main(int 
> argc, char **argv) const char *fmt1 = NULL, *fmt2 = NULL; int c, exit_status 
> = EXIT_SUCCESS; char cwd[MAXPATHLEN], path[MAXPATHLEN]; + bool verbose = 
> false, failed = false; #ifdef DEBUG debug = 1; #endif - while ((c = 
> getopt(argc, argv, "f:o")) != -1) { + while ((c = getopt(argc, argv, "f:ov")) 
> != -1) { switch (c) { case 'f': if (fmt1) { @@ -143,6 +144,9 @@ main(int 
> argc, char **argv) errx(1, "Cannot use -o and -f together"); fmt1 = 
> "%a:-l%o.%m => %p\n"; break; + case 'v': + verbose = true; + break; default: 
> usage(); /*NOTREACHED*/ @@ -174,17 +178,31 @@ main(int argc, char **argv) 
> warn("%s", *argv); continue; } - if (elf_ldd(fd, *argv, path, fmt1, fmt2) == 
> -1 - /* Alpha never had 32 bit support. */ + if (elf_ldd(fd, *argv, path, 
> fmt1, fmt2) == -1) { + if (verbose) + warnx("%s", error_message); + failed = 
> true; + } + /* Alpha never had 32 bit support. */ #if (defined(_LP64) && 
> !defined(ELF64_ONLY)) || defined(MIPS_N32) - && elf32_ldd(fd, *argv, path, 
> fmt1, fmt2) == -1 + if (elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1) { + if 
> (verbose) + warnx("%s", error_message); + failed = true; + } #if 
> defined(__mips__) && 0 /* XXX this is still hosed for some reason */ - && 
> elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1 + if 
> (elf32_ldd_compat(fd, *argv, path, fmt1, 

CVS commit: src/usr.bin/ldd

2022-10-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Oct 15 05:55:46 UTC 2022

Modified Files:
src/usr.bin/ldd: ldd.1 ldd.c

Log Message:
ldd(1): add a -v option to display all errors not just the latest.

ldd on a go binary currently fails with an error that basically
says "not elf32 class".  this is a true statement, as it is an
elf64 class object, but it's not useful.  it happens because
ldd_elf64() is called, fails in _rtld_map_object(), and then
ldd_elf32() is called, and it fails because the class is wrong,
and only this error is returned.  (this problem remains.  the
call to map the object fails due to there being 3 instead of 2
elf segments in the file.  i guess we need similar code in
ld.elf_so/map_objects.c as the kernel gained some time ago.)

perhaps the first error, not the last error, should be used if
everything fails, but this allows all failures to be see and
would be useful even if the error string handling changed.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/ldd/ldd.1
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ldd/ldd.1
diff -u src/usr.bin/ldd/ldd.1:1.20 src/usr.bin/ldd/ldd.1:1.21
--- src/usr.bin/ldd/ldd.1:1.20	Mon Dec 25 05:08:49 2017
+++ src/usr.bin/ldd/ldd.1	Sat Oct 15 05:55:45 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ldd.1,v 1.20 2017/12/25 05:08:49 maya Exp $
+.\"	$NetBSD: ldd.1,v 1.21 2022/10/15 05:55:45 mrg Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 25, 2017
+.Dd October 15, 2022
 .Dt LDD 1
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 .Nd list dynamic object dependencies
 .Sh SYNOPSIS
 .Nm
-.Op Fl o
+.Op Fl ov
 .Op Fl f Ar format
 .Ar program ...
 .Sh DESCRIPTION
@@ -105,6 +105,10 @@ which makes
 .Nm
 behave analogously to
 .Ic nm Fl o .
+.Pp
+The
+.Fl v
+option turns on verbose mode.
 .Sh EXIT STATUS
 .Ex -std
 .Sh SEE ALSO
@@ -118,9 +122,3 @@ A
 utility first appeared in SunOS 4.0, it appeared in its current form
 in
 .Nx 0.9a .
-.Sh BUGS
-The
-a.out
-.Nm
-actually runs the program it has been requested to analyze which in specially
-constructed environments can have security implications.

Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.25 src/usr.bin/ldd/ldd.c:1.26
--- src/usr.bin/ldd/ldd.c:1.25	Fri Jul 23 04:20:05 2021
+++ src/usr.bin/ldd/ldd.c	Sat Oct 15 05:55:45 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.c,v 1.25 2021/07/23 04:20:05 martin Exp $	*/
+/*	$NetBSD: ldd.c,v 1.26 2022/10/15 05:55:45 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.25 2021/07/23 04:20:05 martin Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.26 2022/10/15 05:55:45 mrg Exp $");
 #endif /* not lint */
 
 #include 
@@ -124,11 +124,12 @@ main(int argc, char **argv)
 	const char *fmt1 = NULL, *fmt2 = NULL;
 	int c, exit_status = EXIT_SUCCESS;
 	char cwd[MAXPATHLEN], path[MAXPATHLEN];
+	bool verbose = false, failed = false;
 
 #ifdef DEBUG
 	debug = 1;
 #endif
-	while ((c = getopt(argc, argv, "f:o")) != -1) {
+	while ((c = getopt(argc, argv, "f:ov")) != -1) {
 		switch (c) {
 		case 'f':
 			if (fmt1) {
@@ -143,6 +144,9 @@ main(int argc, char **argv)
 errx(1, "Cannot use -o and -f together");
 			fmt1 = "%a:-l%o.%m => %p\n";
 			break;
+		case 'v':
+			verbose = true;
+			break;
 		default:
 			usage();
 			/*NOTREACHED*/
@@ -174,17 +178,31 @@ main(int argc, char **argv)
 			warn("%s", *argv);
 			continue;
 		}
-		if (elf_ldd(fd, *argv, path, fmt1, fmt2) == -1
-		/* Alpha never had 32 bit support. */
+		if (elf_ldd(fd, *argv, path, fmt1, fmt2) == -1) {
+			if (verbose)
+warnx("%s", error_message);
+			failed = true;
+		}
+		/* Alpha never had 32 bit support. */
 #if (defined(_LP64) && !defined(ELF64_ONLY)) || defined(MIPS_N32)
-		&& elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1
+		if (elf32_ldd(fd, *argv, path, fmt1, fmt2) == -1) {
+			if (verbose)
+warnx("%s", error_message);
+			failed = true;
+		}
 #if defined(__mips__) && 0 /* XXX this is still hosed for some reason */
-		&& elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1
+		if (elf32_ldd_compat(fd, *argv, path, fmt1, fmt2) == -1) {
+			if (verbose)
+warnx("%s", error_message);
+			failed = true;
+		}
 #endif
 #endif
-		) {
+
+		if (failed) {
 			exit_status = EXIT_FAILURE;
-			warnx("%s", error_message);
+			if (!verbose)
+warnx("%s", error_message);
 		}
 		close(fd);
 	}



CVS commit: src/usr.bin/ldd

2022-10-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Oct 15 05:55:46 UTC 2022

Modified Files:
src/usr.bin/ldd: ldd.1 ldd.c

Log Message:
ldd(1): add a -v option to display all errors not just the latest.

ldd on a go binary currently fails with an error that basically
says "not elf32 class".  this is a true statement, as it is an
elf64 class object, but it's not useful.  it happens because
ldd_elf64() is called, fails in _rtld_map_object(), and then
ldd_elf32() is called, and it fails because the class is wrong,
and only this error is returned.  (this problem remains.  the
call to map the object fails due to there being 3 instead of 2
elf segments in the file.  i guess we need similar code in
ld.elf_so/map_objects.c as the kernel gained some time ago.)

perhaps the first error, not the last error, should be used if
everything fails, but this allows all failures to be see and
would be useful even if the error string handling changed.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/ldd/ldd.1
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/usr.bin/ldd

2018-06-22 Thread Kamil Rytarowski
On 22.06.2018 15:38, matthew green wrote:
> "Kamil Rytarowski" writes:
>> Module Name: src
>> Committed By:kamil
>> Date:Thu Jun 21 10:41:46 UTC 2018
>>
>> Modified Files:
>>  src/usr.bin/ldd/build: Makefile
>>  src/usr.bin/ldd/elf32: Makefile
>>  src/usr.bin/ldd/elf32_compat: Makefile
>>  src/usr.bin/ldd/elf64: Makefile
>>
>> Log Message:
>> Disable SANITIZER for ldd(1)
>>
>> These utilities (elf32, elf32_compat, elf64, liblldb) share code with the
>> ELF dynamic loader that is not being sanitized and its symbols are
>> installed into sanitized programs (in particular __tls_get_addr()).
>>
>> Additionally libldd is used in rescue that is not expected to be sanitized
>> as of today.
> 
> i'm not sure i understand.  ldd itself should be able to be
> sanitized.  even with shared code with ld.elf_so, this copy
> shouldn't be doing anything but reading data and outputting
> the various linkages found, but never executing anything not
> in ldd binary itself.  (this is unlike traditional ldd(1)
> in most implementations, which often makes the dynamic
> linker do the real work of ldd.)
> 
> what's the specific issue?  perhaps we can fix it..
> 

The first conflict is with __tls_get_addr(). This symbol could be renamed.

I'm in the process of designing a macro to rename conflicting symbols,
dedicated for programs in external/ and those reusing source code from
non-stanitized libraries like libc.

The current list of manual renames is specified here:
http://netbsd.org/~kamil/patch-00055-rename-symbols-clash-with-sanitizers.txt

Once I will get an installable release image under ASan, I will present
the macro and we can reevaluate ldd(1).

My current progress is being on the installboot(8) stage:

http://netbsd.org/~kamil/mksanitizer-reports/0020-installboot-ffsv2.txt

> 
> .mrg.
> 




signature.asc
Description: OpenPGP digital signature


CVS commit: src/usr.bin/ldd

2010-02-27 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Feb 27 11:17:05 UTC 2010

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
Sync against new ld.elf_so


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.13 src/usr.bin/ldd/ldd.c:1.14
--- src/usr.bin/ldd/ldd.c:1.13	Tue Feb 23 08:23:24 2010
+++ src/usr.bin/ldd/ldd.c	Sat Feb 27 11:17:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.c,v 1.13 2010/02/23 08:23:24 skrll Exp $	*/
+/*	$NetBSD: ldd.c,v 1.14 2010/02/27 11:17:05 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ldd.c,v 1.13 2010/02/23 08:23:24 skrll Exp $);
+__RCSID($NetBSD: ldd.c,v 1.14 2010/02/27 11:17:05 roy Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -92,6 +92,7 @@
 Obj_Entry *_rtld_objlist;	/* Head of linked list of shared objects */
 Obj_Entry **_rtld_objtail = _rtld_objlist;
 /* Link field of last object in list */
+int _rtld_objcount;		/* Number of shared objects */
 Obj_Entry *_rtld_objmain;	/* The main program shared object */
 size_t _rtld_pagesz;
 



CVS commit: src/usr.bin/ldd

2010-02-27 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Feb 27 11:17:05 UTC 2010

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
Sync against new ld.elf_so


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/ldd

2010-02-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb 23 08:23:24 UTC 2010

Modified Files:
src/usr.bin/ldd: ldd.c

Log Message:
Mark each object as printed as visited and then print.

Fixes PR/48211.

As a side effect the libraries are printed in, imo, a better order.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/ldd/ldd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.