Skip to content

Instantly share code, notes, and snippets.

@MingruiZhangW
Created March 11, 2020 23:57
Show Gist options
  • Save MingruiZhangW/0d83a11e04eaf854a5a6e46574e1585f to your computer and use it in GitHub Desktop.
Save MingruiZhangW/0d83a11e04eaf854a5a6e46574e1585f to your computer and use it in GitHub Desktop.
Functional-Level Linking /Gy

Functional-Level Linking /Gy

  • For visual c++, /Gy -> is to provide a way of compiling functions into individual sections in object file. when the linker needs some functions, the section will be merged into the final output. For the function that are not used, they will be abandoned.

This will greatly decrease the length of the final output, but it will also slow down the compiling and the linking process.
Since the linker will calculate the dependencies of functions, and to keep all functions into individual sections will also increase the time of doing relocations. In the mean time, object files will also be large.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment