Closed as duplicate of#39970
Closed as duplicate of#39970
Description
demo:
#include <stdio.h>
int main ()
{
printf("hello");
return 0;
}
compile option: -fPIC -mlong-calls
target: armv7
https://godbolt.org/z/MzdPY3oTs
Hi, i am new to compiler.
In some scenarios, using dlopen to load so compiled with gcc -fPIC -mlong-calls is faster than so compiled with clang -fPIC to generate .and when i use clang -fPIC -mlong-calls compile same code, clang still slower than gcc.
i want know why gcc use GOT and clang not use GOT.