Date: Mon, 14 Apr 1997 12:32:35 +0200 From: Martin Kammerhofer <dada@freepass.tu-graz.ac.at> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/3284: symorder(1): -t option does not work at all Message-ID: <199704141032.MAA14101@freepass.tu-graz.ac.at> Resent-Message-ID: <199704141040.DAA02577@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 3284
>Category: bin
>Synopsis: symorder(1): -t option doesnīt work at all
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 14 03:40:09 PDT 1997
>Last-Modified:
>Originator: Martin Kammerhofer
>Organization:
Graz University of Technology
>Release: FreeBSD 2.2.1-RELEASE i386
>Environment:
>Description:
Option -t of symorder(1) doesnīt work.
Furthermore if the table of excluded symbols specified by
the -x command line option or the mandatory "symlist" overflow
(static size SPACE) extra symbols are silently ignored!
I didnīt fix the latter, only increased SPACE.
>How-To-Repeat:
cat >hello.c
#include <stdio.h>
void
main()
{
printf("Hello wonderful world\n");
}
^D
cc -o hello hello.c
ldd -v hello | grep a_syms
echo start >start
symorder -t start hello
ldd -v hello | grep a_syms
>Fix:
--- /usr/src/usr.bin/symorder/symorder.c Fri Nov 3 19:27:18 1995
+++ ./symorder.c Thu Mar 27 13:26:56 1997
@@ -31,6 +31,8 @@
* SUCH DAMAGE.
*/
+/* $Id$ */
+
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1980 The Regents of the University of California.\n\
@@ -55,7 +57,7 @@
#include <stdlib.h>
#include <string.h>
-#define SPACE 500
+#define SPACE 0x2000
#define OKEXIT 0
#define NOTFOUNDEXIT 1
@@ -203,6 +205,7 @@
if (newstrings == NULL)
error(NULL);
t = newstrings;
+ i = symkept;
for (symp = symtab; --i >= 0; symp++) {
if (symp->n_un.n_strx == 0)
continue;
@@ -314,6 +317,8 @@
register char *nam;
register int x;
+ if (small && inlist(p) == -1)
+ return (1);
if (p->n_type & N_STAB || p->n_un.n_strx == 0)
return (0);
if (p->n_un.n_strx < sizeof(int) || p->n_un.n_strx >= strtabsize)
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704141032.MAA14101>
