[PATCH] optimize handle_COMDAT
Alan Modra
amodra@gmail.com
Wed Apr 26 05:59:49 GMT 2023
On Tue, Apr 25, 2023 at 06:48:11PM +0200, Oleg Tolmatcev via Binutils wrote:
> Hello all,
>
> linking with ld on Windows is currently slow. RPCS3 with BUILD_LLVM=ON
> takes 9 minutes to link on my PC and I am talking about the last step
> only. I have profiled `ld` with a profiler and optimized the code.
> With all the patches the linking only takes 1 min. now.
>
> This is the first patch of the series of 4 patches. Should I submit
> all at once or wait until this one is accepted before I send the next
> one?
Best get this one accepted first, because it has problems.
> diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
You shouldn't be editing bfd-in2.h. It is a generated file, your
changes will disappear.
> @@ -6822,6 +6822,15 @@ struct bfd
>
> /* For input BFDs, the build ID, if the object has one. */
> const struct bfd_build_id *build_id;
> + htab_t flags_hash;
> +};
Also, since flags_hash is specific to PE, it doesn't belong in
struct bfd. I think it should instead be put into struct pe_tdata,
see libcoff-in.h.
> diff --git a/bfd/opncls.c b/bfd/opncls.c
Your opncls.c changes don't belong there either. Likely peicode.h is
the correct place.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list