[PATCH] gold: make the kept comdat structure have a direct link to sections map
Mikolaj Zalewski
mikolajz@google.com
Fri Feb 27 15:26:00 GMT 2009
Currently, if a comdat is already declared in a previous object and
we need to access its sections, Layout needs to map the comdat name to
original object/section index and the obejct must map section the
index to comdat information. With this patch, the Layout's
Kept_section structure has already all the information about the
comdat. The patch also changes the way comdat information is accessed
- it only does one insert, instead of an insert and if insert failed
then a find for the entry. This decreased linking CPU time on a sample
test by 2-2,5%. It produces the same binary as the previous version
and make check passed.
2009-02-27 Mikolaj Zalewski <mikolajz@google.com>
* layout.cc (find_or_add_comdat): a more generic version of add_comdat
(add_comdat): removed
* layout.h (Kept_section): move out of Layout
(Kept_section::group_sections_): new field
(Layout::Kep_section): remove
(find_or_add_comdat): a more generic version of add_comdat
(add_comdat): removed
* object.cc (include_section_group): use find_or_add_comdat and
Kept_section::group_sections_
(include_linkonce_section): use find_or_add_comdat and
Kept_section::group_sections_
* object.cc (Comdat_group): removed
(Comdat_group_table): removed
(find_comdat_grouop): removed
(add_comdat_group): removed
(comdat_groups_): removed
* plugin.cc (include_comdat_group): use the new Layout::find_or_add_comdat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Map-kept-comdat-groups-directly-to-sections-maps-i.patch
Type: text/x-patch
Size: 14752 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090227/88f50989/attachment.bin>
More information about the Binutils
mailing list