This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
incremental_test crashes gold on ARM.
- From: =?big5?b?RG91ZyBLd2FuICjD9q62vHcp?= <dougkwan at google dot com>
- To: Cary Coutant <ccoutant at google dot com>, binutils <binutils at sourceware dot org>
- Date: Tue, 14 Sep 2010 18:45:19 -0700
- Subject: incremental_test crashes gold on ARM.
Hi Cary, Attached is a test case for a problem that I ran into when
testing gold for ARM. The problem is reproducible on the x86 as
well. The symbol of "bar" for some reason does not have a symtab
index when it is being output in Output_section_incremental_inputs<64,
false>::write_info_blocks.
-Doug
::::::::::::::
Makefile
::::::::::::::
ALL: main
# ld needs to be in the same directory
main: main.o libfoo.so libbar.so
$(CC) -B. -o $@ main.o -L. -lfoo -lbar -Wl,-incremental
libfoo.so: foo.c libbar.so
$(CC) -fPIC -shared -o $@ $< -L. -lbar
libbar.so: bar.c bar.v
$(CC) -fPIC -shared -o $@ $< -Wl,--version-script,bar.v
clean:
$(RM) *.o *.so main
::::::::::::::
main.c
::::::::::::::
extern void foo ();
extern void bar ();
int
main (void)
{
foo ();
bar ();
return 0;
}
::::::::::::::
foo.c
::::::::::::::
extern void bar();
void
foo (void)
{
bar();
}
::::::::::::::
bar.c
::::::::::::::
void
bar (void)
{
}
::::::::::::::
bar.v
::::::::::::::
VERS_1 {
bar;
};