Issue |
123565
|
Summary |
[ARM] Why mlong-calls codegen is not position independent?
|
Labels |
question,
backend:ARM
|
Assignees |
|
Reporter |
hstk30-hw
|
https://godbolt.org/z/eeEzd3Gre
```
const char * remote_n1 (void);
const char * call_remote_n1 (void) { return remote_n1 () + 1; }
```
with command : `-O1 -fPIC -mlong-calls` will generate `R_ARM_ABS32` relocation type for `remote_n1` ,
this lead to link error when create shared object :
```
relocation R_ARM_ABS32 cannot be used against symbol 'remote_n1'; recompile with -fPIC
```
Source code do the assert check in DEBUG edition, but not warning in RELEASE edition
https://github.com/llvm/llvm-project/blob/6972788bf3d330b7a6136e2ddd840782882b8dd0/llvm/lib/Target/ARM/ARMISelLowering.cpp#L2823-L2828
Besides, GCC work fine.
Have SPEC about this rule?
rel MR: https://github.com/llvm/llvm-project/commit/32bb362655c14d75124bb4d38c176145105c68c8
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs