Opened 7 months ago

Last modified 6 months ago

#8405 new task

experiment with using function-sections for linking (for smaller libs and executables)

Reported by: carter Owned by:
Priority: normal Milestone: 7.10.1
Component: Compiler Version: 7.6.3
Keywords: Cc: the.dead.shall.rise@…, mle+hs@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:


currently the only support we have for making small (ish) executables using split objects, which

  1. is not on by default, for various good reasons
  1. can seriously penalize compile times
  1. in tandem, something like strip is often used, but on some platforms/targets (such as the iOS cross compiler), strip will actually break things

might be worth seriously experimenting with function-sections / gc-sections in the object files we generate.

example slide deck on this

Change History (4)

comment:1 Changed 7 months ago by refold

  • Cc the.dead.shall.rise@… added

comment:2 Changed 7 months ago by refold

  1. Apparently doesn't work with -fllvm (#8300)

comment:3 Changed 7 months ago by refold

Looks like --gc-sections is not supported on Windows:

Version 0, edited 7 months ago by refold (next)

comment:4 Changed 6 months ago by erikd

  • Cc mle+hs@… added
Note: See TracTickets for help on using tickets.