open-obfuscator/o-mvll

Duplicate Symbol omvll_decode

marcobrador opened this issue · 1 comments

Root cause and conditions to reproduce are not yet clear, but under some circumstances enabling String Encoding will result in the compiler raising an error about omvll_decode symbol being duplicated.

This was detected as part of #33

The plugin runs on each translation unit in isolation. If it needs encode/decode, then the decode routine is injected. If this applies to multiple compile units, the injected routines clash at link-time. If it's ok to keep the duplicates, switch the injected routine to private linkage and the symbol to hidden. Otherwise make sure they are all equivalent and handle it as ODR (resulting in a weak symbol at link-time).