Summary: | Linking gcc and gold with ld.bfd with compressed debug sections fails on final close | ||
---|---|---|---|
Product: | binutils | Reporter: | dilyan.palauzov <dilyan.palauzov> |
Component: | ld | Assignee: | H.J. Lu <hjl.tools> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hjl.tools |
Priority: | P2 | ||
Version: | 2.27 | ||
Target Milestone: | 2.27 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
dilyan.palauzov@aegee.org
2016-04-26 21:18:38 UTC
It was caused by commit 4a539596f5d54d3116c5fdebd8be56998757288b Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Feb 2 08:14:43 2016 -0800 Store estimated istrances in compressed_size elf_x86_64_convert_load is very time consuming since it is called on each input section and has a loop over input text sections to estimate the branch distrance. We can store the estimated distrances in the compressed_size field of the output section, which is only used to decompress the compressed input section. Before the patch, linking clang 3.9 takes 52 seconds. After the patch, it only takes 2.5 seconds. PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distrances in the compressed_size field of the output section. The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91f8bf69a526912f86da81070407bba6a050e27f commit 91f8bf69a526912f86da81070407bba6a050e27f Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Apr 27 09:13:10 2016 -0700 Skip debug sections when estimating distances Skip debug sections when estimating distances between output sections since compressed_size is used to compress debug sections and debug sections aren't excluded from distances between output sections. bfd/ PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. ld/ PR ld/20006 * testsuite/ld-elfvsb/elfvsb.exp (COMPRESS_LDFLAG): New. (visibility_run): Pass COMPRESS_LDFLAG to visibility_test on ELF targets. The binutils-2_26-branch branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=805af9f6edbc8e1b1fa8fb6b30902decc5433bd0 commit 805af9f6edbc8e1b1fa8fb6b30902decc5433bd0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Apr 27 09:13:10 2016 -0700 Skip debug sections when estimating distances Skip debug sections when estimating distances between output sections since compressed_size is used to compress debug sections and debug sections aren't excluded from distances between output sections. Backport from master bfd/ PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. ld/ PR ld/20006 * testsuite/ld-elfvsb/elfvsb.exp (COMPRESS_LDFLAG): New. (visibility_run): Pass COMPRESS_LDFLAG to visibility_test on ELF targets. Fixed for 2.27 and 2.26 branch. |