Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils/usr.sbin/dbsym Add new option -P to p...
details: https://anonhg.NetBSD.org/src/rev/b16eac8f42fe
branches: trunk
changeset: 331634:b16eac8f42fe
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Aug 17 19:12:59 2014 +0000
description:
Add new option -P to print only the symbol table size.
diffstat:
external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 | 12 +++++++++---
external/gpl3/binutils/usr.sbin/dbsym/dbsym.c | 16 ++++++++++++----
2 files changed, 21 insertions(+), 7 deletions(-)
diffs (99 lines):
diff -r c607cdef898c -r b16eac8f42fe external/gpl3/binutils/usr.sbin/dbsym/dbsym.8
--- a/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 Sun Aug 17 16:57:37 2014 +0000
+++ b/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 Sun Aug 17 19:12:59 2014 +0000
@@ -1,6 +1,6 @@
-.\" $NetBSD: dbsym.8,v 1.3 2012/03/19 09:13:33 wiz Exp $
+.\" $NetBSD: dbsym.8,v 1.4 2014/08/17 19:12:59 joerg Exp $
.\"
-.Dd March 19, 2012
+.Dd August 14, 2014
.Dt DBSYM 8
.Os
.Sh NAME
@@ -8,7 +8,7 @@
.Nd copy kernel symbol table into db_symtab space
.Sh SYNOPSIS
.Nm
-.Op Fl pv
+.Op Fl Ppv
.Op Fl b Ar bfdname
.Ar kernel
.Sh DESCRIPTION
@@ -34,6 +34,12 @@
flag specifies BFD name of kernel.
.Pp
If the
+.Fl P
+flag is given,
+.Nm
+will report the size of the kernel symbol table.
+.Pp
+If the
.Fl p
flag is given,
.Nm
diff -r c607cdef898c -r b16eac8f42fe external/gpl3/binutils/usr.sbin/dbsym/dbsym.c
--- a/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Sun Aug 17 16:57:37 2014 +0000
+++ b/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Sun Aug 17 19:12:59 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbsym.c,v 1.3 2012/03/19 09:14:15 wiz Exp $ */
+/* $NetBSD: dbsym.c,v 1.4 2014/08/17 19:12:59 joerg Exp $ */
/*
* Copyright (c) 2001 Simon Burge (for Wasabi Systems)
@@ -39,7 +39,7 @@
__COPYRIGHT("@(#) Copyright (c) 1996 Christopher G. Demetriou.\
Copyright 2001 Simon Burge.\
All rights reserved.");
-__RCSID("$NetBSD: dbsym.c,v 1.3 2012/03/19 09:14:15 wiz Exp $");
+__RCSID("$NetBSD: dbsym.c,v 1.4 2014/08/17 19:12:59 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -76,6 +76,7 @@
int verbose;
int printsize;
+int printsize2;
int
main(int argc, char **argv)
@@ -91,7 +92,7 @@
setprogname(argv[0]);
bfdname = NULL;
- while ((ch = getopt(argc, argv, "b:pv")) != -1)
+ while ((ch = getopt(argc, argv, "b:Ppv")) != -1)
switch (ch) {
case 'b':
bfdname = optarg;
@@ -102,6 +103,9 @@
case 'p':
printsize = 1;
break;
+ case 'P':
+ printsize2 = 1;
+ break;
case '?':
default:
usage();
@@ -158,6 +162,10 @@
printf("%d %d\n", symtabsize, symtab_space);
goto done;
}
+ if (printsize2) {
+ printf("%d\n", symtabsize);
+ goto done;
+ }
if (symtabsize > symtab_space)
errx(1, "symbol table (%u bytes) too big for buffer (%u bytes)\n"
@@ -194,7 +202,7 @@
const char **list;
fprintf(stderr,
- "usage: %s [-pv] [-b bfdname] kernel\n",
+ "usage: %s [-Ppv] [-b bfdname] kernel\n",
getprogname());
fprintf(stderr, "supported targets:");
for (list = bfd_target_list(); *list != NULL; list++)
Home |
Main Index |
Thread Index |
Old Index