Skip to content

Instantly share code, notes, and snippets.

@MaskRay
Created June 18, 2021 01:45
Show Gist options
  • Select an option

  • Save MaskRay/1cbca44b4c7fbf41356053801273c52b to your computer and use it in GitHub Desktop.

Select an option

Save MaskRay/1cbca44b4c7fbf41356053801273c52b to your computer and use it in GitHub Desktop.
STV_PROTECTED
__attribute__((visibility("protected")))
void *func_addr() { return (void *)func_addr; }
__attribute__((visibility("protected"))) void undef_func();
void *undef_func_addr() { return (void *)undef_func; }
__attribute__((visibility("protected"))) int var;
int load() { return var; }
__attribute__((visibility("protected"))) int inlinable(int x) { return x + x; }
int bar(int x) { return inlinable(x); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment