Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Function Level linking in gcc

I search in old threads. But didn't find any thread answering my question.

Is gcc support function level linking like vc++ ?

if yes what option should I give to link object files and library ?

like image 662
Vivek Goel Avatar asked Oct 20 '25 13:10

Vivek Goel


1 Answers

Looks like gcc does not support function level linking directly. You can pass -ffunction-sections -fdata-sections command line options to reduce resulting executable size. Look also this link for more info.

like image 130
ks1322 Avatar answered Oct 23 '25 09:10

ks1322



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!