Skip to content

Instantly share code, notes, and snippets.

@brycelelbach
Created October 30, 2010 01:27
Show Gist options
  • Select an option

  • Save brycelelbach/654775 to your computer and use it in GitHub Desktop.

Select an option

Save brycelelbach/654775 to your computer and use it in GitHub Desktop.
21:23 < wash> One of the largest problems we've been having with Clang-compiled Linux is functions that are not emitted in the Linux binary, because they are only called from
inline assembly, and the Linux kernel devs neglected to mark all of these appriopitately with the __used attribute. Apparently, GCC has magic that allows it to
detect function usage in inline asm. So: 0.) Does path have the ability to detect function calls in inline asm? 1.) If not, does path support __used (attribute
attached to functions, prevents them from being omitted)? 2.) Does path support -femit-all-decls (we are working with on a static analysis using clang to detect all
the unused functions in Linux, so that we can go over them all and fix all of these problems, but until then, we're using -femit-all-decls for clang linux. A bit
unelegant, admittedly)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment