Currently hardlink handling is done in the dwz function, on per-file basis,
with the analysis having a scope of previously processed files.
Move hardlink handling out of dwz into dedicated functions detect_hardlinks
and update_hardlinks, both called from dwz_files_1.
The detect_hardlinks is called before any file is processed, the
update_hardlinks is called after all files are processed.
This allows parallelization of the processing of the files.
2021-03-23 Tom de Vries <tdevries@suse.de>
* dwz.c (struct file_result): Add comment about res == -3 as
uninitialized. Add hardlink_to field.
(detect_hardlinks, update_hardlinks): New function, factored out of ...
(dwz): ... here. Drop resa and files parameters.
(dwz_with_low_mem): Drop resa and files parameters.
(dwz_one_file): Update call to dwz_with_low_mem.
(dwz_files_1): Update call to dwz_with_low_mem. Add calls to
detect_hardlinks and update_hardlinks.