[PATCH] Fix regression introduced in r205566.

Simon Atanasyan simon at atanasyan.com
Tue May 13 07:43:35 PDT 2014

It looks like there is a bug in this patch. The lld linker hangs when build `a.out` executable in the following test case.

  % cat main.c
  int foo();

  int main() {
    return foo();

  % cat foo.c
  int bar();

  int foo() {
    return bar();

  % cat bar.c
  void func();

  int bar() {
    return 0;

  int bar1() {
    return 0;

  % gcc -c main.c foo.c
  % gcc -c -fPIC bar.c
  % lld -flavor gnu -target x86_64 -shared --noinhibit-exec -o libbar.so bar.o
  % lld -flavor gnu -target x86_64 -e main -o a.out main.o --start-group libbar.so foo.o --end-group

Probably because each time we scan libbar.so we find the undefined symbol `func` and call the `notifyProgress()` and go to the next scan.


More information about the llvm-commits mailing list