This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: binutils-2.17: --cref broken? Extra warnings and corrupted data
On 7/18/06, Alan Modra <amodra@bigpond.net.au> wrote:
On Tue, Jul 18, 2006 at 12:34:09PM +0930, Alan Modra wrote:
> On Mon, Jul 17, 2006 at 03:30:53PM -0700, H. J. Lu wrote:
> > --cref was broken by --as-needed.
>
> Ah. My bug then.
This extends the horrible hack of saving the main symbol table to saving
the cref table too. I'm not proud at all of this hack for --as-needed.
Some day when I have a some time on my hands I'll look at implementing
a two-pass approach to loading --as-needed library syms.
Attempting to build this on 2.17, I encountered two problems:
1) I had to figure out bfd-in2.h so I could put that in my patch
against the dist tarball. That wasn't hard, I got around it.
2) After that, building yields:
gcc -DHAVE_CONFIG_H -I. -I../.././binutils-2.17/binutils -I.
-D_GNU_SOURCE -I. -I../.././binutils-2.17/binutils -I../bfd
-I../.././binutils-2.17/binutils/../bfd
-I../.././binutils-2.17/binutils/../include
-I../.././binutils-2.17/binutils/../intl -I../intl
-DLOCALEDIR="\"/usr/local/i686/4.1.1-1b/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -O2 -pipe
-fno-stack-protector -c ../.././binutils-2.17/binutils/size.c
gcc -DHAVE_CONFIG_H -I. -I../.././binutils-2.17/gas -I. -D_GNU_SOURCE
-I. -I../.././binutils-2.17/gas -I../bfd
-I../.././binutils-2.17/gas/config
-I../.././binutils-2.17/gas/../include -I../.././binutils-2.17/gas/..
-I../.././binutils-2.17/gas/../bfd -I../.././binutils-2.17/gas/../intl
-I../intl -DLOCALEDIR="\"/usr/local/i686/4.1.1-1b/share/locale\"" -W
-Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -O2 -pipe
-fno-stack-protector -c ../.././binutils-2.17/gas/output-file.c
../.././binutils-2.17/ld/ldcref.c: In function `handle_asneeded_cref':
../.././binutils-2.17/ld/ldcref.c:242: error: structure has no member
named `count'
../.././binutils-2.17/ld/ldcref.c:283: error: structure has no member
named `count'
make[4]: *** [ldcref.o] Error 1
Indeed, there is no count in my version of struct
bfd_hash_table...actually there's no other usage of ".count" anywhere
in ld at least. Is that mainline only?
Thx...
-PN