Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
- Why store in memory on the stack only to load it again?
- Depending on how this is compiled it could use the GOT which isn't a good idea
- Dollars in a C identifier sound like a bad idea
- Relaxations need to be disabled for the address calculation specifically otherwise it will be relaxed to be GP-relative, which is clearly unhelpful
- Why is it declared as pointing to an intptr_t instead of being the usual char[]?
In short this really just needs to be done in assembly as the standard .option push; .option norelax; lla gp, __global_pointer$; .option pop.
Comment Actions
I've finally got around to testing this patch and it fixes the segfault I was having with clang 15 on visionfive 2.