mold icon indicating copy to clipboard operation
mold copied to clipboard

option --section-ordering-file

Open waarmond opened this issue 1 year ago • 1 comments

https://github.com/intel/thin-layout-optimizer is using --text-section-ordering-file (in lld - mysterious user called ruiu)

Would it be worth to support?

waarmond avatar Apr 12 '24 07:04 waarmond

I assume you are talking about --symbol-ordering-file. We may want to include this feature, but I'm not certain if the --symbol-ordering-file is the best interface to implement it. It appears that ld.lld also supports --call-graph-profile-sort to optimize the section layout. However, I think we might want to allow users to pass a script file path to the linker, which would use the input section information as input and output the desired section order. Then, we could provide only this option instead of --symbol-ordering-file and --call-graph-profile-sort.

rui314 avatar Apr 12 '24 08:04 rui314