Subject: pkg/15141: Leading underscores trimmed by bfd-crunchide
To: None <>
From: David Querbach <>
List: netbsd-bugs
Date: 01/04/2002 14:14:22
>Number:         15141
>Category:       pkg
>Synopsis:       Leading underscores trimmed by bfd-crunchide
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 04 14:15:00 PST 2002
>Originator:     David Querbach
>Release:        NetBSD-20020103, NetBSD-1-5-2
Real-Time Systems Inc.
System: NetBSD qingdao 1.5.1 NetBSD 1.5.1 (RAID) #0: Tue Jul 17 22:25:40 PDT 2001 root@qingdao:/usr/src/sys/arch/i386/compile/RAID i386

	bfd-crunchide trims leading underscores from symbol names before it
	hides them.  This conflicts with the makefiles generated by
	crunchgen, which assumes the underscores are still there.
	Use bfd-crunchide to hide symbols in a two or more programs, say
	"foo" and "bar".  Use crunchgen to crunch the programs together. 
	Note unresolved symbols for "_crunched_foo_stub" and
	Apply the following patch:

*** crunchide.c~        Fri Jan  4 12:22:19 2002
--- crunchide.c Fri Jan  4 12:22:42 2002
*** 297,304 ****
                symname = bfd_asymbol_name(new_symtable[i]);
-               if (symname[0] == '_')
-                       symname++;
                if (in_keep_list(symname))
--- 297,302 ----