Hi Team,

We have recently upgraded binutis from 2.29 version to 2.36 and noticed
that 'Debug' flavor builds are getting hang for a long time during the
linking step.

We are following partial linking (ld -r) approach in our build process as
mentioned here :-
https://stackoverflow.com/questions/29391965/what-is-partial-linking-in-gnu-linker

Since we deal with huge source code about 100's of obj files where the
static library size is getting huge, To Workaround it we are using partial
linking which eliminates a lot of duplication. So we are basically creating
a *.o* file out of a partial linking mechanism and using that .o file to
create a '*.a*' static library.

*Issue:-  *With linker (ld) from binutils 2.36 version, Partial linking
step is taking around 60 mins to complete for debug flavor builds.

We have narrowed down the issue by cloning binutins git repository and
performed 'git bisect' to find exact regression causing SHA-ID and noticed
that this :- 
*https://github.com/bminor/binutils-gdb/commit/21401fc7bf67dbf73f4a3eda4bcfc58fa4211584
<https://github.com/bminor/binutils-gdb/commit/21401fc7bf67dbf73f4a3eda4bcfc58fa4211584>*
is the regression causing change.

The SHA-ID just before the problematic one does not cause any issues where
linker(ld) command just finished in 1.5 to 2mins. But the culprit CL that
follows is causing the build hangs and linker 'ld' command took nearly
65mins to complete.

Please take a look!
Let me know if you still need anything from me.

Reply via email to