79297673

Date: 2024-12-20 15:23:05
Score: 2.5
Natty:
Report link

This does work properly if the "constant" in question is a function address.

It may also be possible to reliably produce the relocation construct I want in LLVM IR (in the RL scenario I am in, there is code generation directly in IR, so I don't need to adhere to the behaviors/assumptions of a C compiler).

The situation in the original question seems to depend on what C/C++ compilers are allowed / not allowed to assume about just how "const" a const extern variable really is. Thanks everyone for the comments.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Yoni Lavi