[PATCH] D82536: [AVR] Use correct relocation for function pointers in globals
Ayke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 03:37:02 PDT 2020
aykevl added a comment.
There is a test failure in `llvm/test/MC/AVR/relocations-abs.s`. With this change the LLVM behavior would start to differ from the avr-gcc behavior. But actually, the avr-gcc behavior might be a bug.
This is the affected code:
bar:
.short 1f
1:
This is considered a function (not data) by the assembler, which you can see if you run `nm`:
$ avr-nm relocations-abs.o
00000000 t bar
I think all function pointers in globals should be using the `R_AVR_16_PM` relocation, no matter whether it's created in assembly or IR.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82536/new/
https://reviews.llvm.org/D82536
More information about the llvm-commits
mailing list