This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
};


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]