Worth to mention is that -ffunction-sections -fdata-sections were good in
times where LTO was not available.

wt., 24 wrz 2019, 23:49 użytkownik Tomasz Gajc <tpg...@gmail.com> napisał:

> Hi,
>
> our linkers (ld.bfd, ld.lld) by default uses ICF and gc-sections
>
>
> https://github.com/OpenMandrivaAssociation/llvm/blob/3e06cf7671e8abed54b1f48c9689810d3cbf59f3/lld-default-settings.patch#L32
>
>
> https://github.com/OpenMandrivaAssociation/llvm/blob/3e06cf7671e8abed54b1f48c9689810d3cbf59f3/lld-default-settings.patch#L61
>
> 1. gc-sections
> This works only when -ffunction-sections is passed during compilation, and
> its GCC specific.
> Makes no sense to enable LD --gc-sections when our default %optflags does
> not emit -ffunction-sections -fdata-sections
>
> 2. ICF
> Same as above, without -ffunction-sections -fdata-sections in optflags it
> make no sense
>
> 3. Unsafe ?
> We are the only ones who enabled ICF and gc-section in gold and LLD. I
> really wonder if these uncommon options gives any advantage these days.
>
> WDYT ?
>

Reply via email to