Skip to content

Instantly share code, notes, and snippets.

View MingruiZhangW's full-sized avatar
🍉

MingRui Zhang MingruiZhangW

🍉
View GitHub Profile
@MingruiZhangW
MingruiZhangW / README.md
Created March 11, 2020 23:57
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.