Issue |
132694
|
Summary |
[llvm-objdump][ARM] Not implement findPltEntries for ARM lead to parse plt entry incorrectly
|
Labels |
new issue
|
Assignees |
|
Reporter |
hstk30-hw
|
```
#include <stdio.h>
void test() {
printf("test\n");
return;
}
```
with command: `clang test.c -o -fPIC -shared test.so`
the llvm-objdump output like:
```
Disassembly of section .plt:
00000310 <$a>:
310: e52de004 str lr, [sp, #-4]!
314: e59fe004 ldr lr, [pc, #4] @ 0x320 <.plt+0x10>
318: e08fe00e add lr, pc, lr
31c: e5bef008 ldr pc, [lr, #8]!
00000320 <$d>:
320: e0 8c 00 00 .word 0x00008ce0
00000324 <$a>:
324: e28fc600 add r12, pc, #0, #12
328: e28cca08 add r12, r12, #8, #20
32c: e5bcfce0 ldr pc, [r12, #3296]!
330: e28fc600 add r12, pc, #0, #12
334: e28cca08 add r12, r12, #8, #20
338: e5bcfcd8 ldr pc, [r12, #3288]!
33c: e28fc600 add r12, pc, #0, #12
340: e28cca08 add r12, r12, #8, #20
344: e5bcfcd0 ldr pc, [r12, #3280]!
348: e28fc600 add r12, pc, #0, #12
34c: e28cca08 add r12, r12, #8, #20
350: e5bcfcc8 ldr pc, [r12, #3272]!
354: e28fc600 add r12, pc, #0, #12
358: e28cca08 add r12, r12, #8, #20
35c: e5bcfcc0 ldr pc, [r12, #3264]!
...
00000454 <test>:
454: e92d4800 push {r11, lr}
458: e1a0b00d mov r11, sp
45c: e59f0008 ldr r0, [pc, #8] @ 0x46c <test+0x18>
460: e08f0000 add r0, pc, r0
464: ebffffb1 bl 0x330 <.plt+0x20> @ imm = #-316
468: e8bd8800 pop {r11, pc}
```
https://github.com/llvm/llvm-project/blob/849e5ea94fe8c0007f73ea793ba2a986608a67be/llvm/lib/Object/ELFObjectFile.cpp#L789-L808
Not support for ARM32,
and we also need to implement findPltEntries for ARMMCInstrAnalysis class.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs