LTOModule::parseSymbols not handling GlobalAlias

Hello everyone,

  ...I should have used a different subject line in the first place...

I've asked Rafael a question about GlobalAlias handling in
LTOModule::parseSymbols, but he seems to be on vacation...

Does anyone knows the answer?

Thanks a lot!

Sergei

Hi,

There is a genuine case that lto_module_get_num_symbols doesnot return all the symbols that are in the bitcode file.

Test case:-

cat > test.c << \!
int bar() { return 0; }
int foo() __attribute__ ((weak, alias ("bar")));
!

clang -c test.c -emit-llvm

Use a program to list all the symbols using lto_module_get_num_symbols, and foo will be missing from the list.

Thanks

Shankar Easwaran

I can't reproduce this. If a run

llvm-lto -dso-symbol bar -dso-symbol foo test.o -o out.o

I do get both symbols in the output. Setting a breakpoint in
llvm-lto.cpp:154 also shows NumSyms being 2.

Cheers,
Rafael

Rafael,

  This was triggered by my original question... Can you please take a look? Thanks.

Sergei