[PATCH] Fix regression introduced in r205566.

Shankar Easwaran shankare at codeaurora.org
Tue May 13 10:36:18 PDT 2014


The way I had done it earlier was to stop when the previous state and 
the new state was the same.

Its better to put the resolveState in my opinion.

Thanks

Shankar Easwaran

On 5/13/2014 9:43 AM, Simon Atanasyan wrote:
> 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() {
>      func();
>      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.
>
> http://reviews.llvm.org/D3734
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list