code as follow
```c++
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void Func(void)
{
printf("this is a.so\n");
char *pStr = strdup("hello");
if (pStr == NULL) {
printf("strdup fail\n");
return;
}
printf("pStr:%s %p\n", pStr, pStr);
free(pStr);
return;
}
void test_main(void)
{
Func();
}
```
option
```
clang -shared -fPIC demo.c -o demo.out
```
In clang's aarch64 and gcc arm32/aarch64, test_main call Func through plt,while clang's arm don't generate plt call.
It makes the Func symbol be non-preemptible.
Is there a compile option to align clang's behavior on arm32 with gcc?
code as follow
option
In clang's aarch64 and gcc arm32/aarch64, test_main call Func through plt,while clang's arm don't generate plt call.
It makes the Func symbol be non-preemptible. Is there a compile option to align clang's behavior on arm32 with gcc?