[BOLT] Properly handle non-standard function refs
Summary: Application code can reference functions in a non-standard way, e.g. using arithmetic and bitmask operations on them. One example is if a program checks if a function is below a certain address or within a certain address range to perform a low-level optimization or generate a proper code (JIT). Instead of relying on a relocation value (symbol+addend), we use only the symbol value, and then check if the value is inside the function. If it is, we treat it as a code reference against location within the function, otherwise we handle it as a non-standard function reference and issue a warning. (cherry picked from FBD7996274)
Loading
Please sign in to comment