[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on po
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu |
Date: |
Fri, 28 Jan 2022 06:32:28 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28827
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0441f94fba61998b4bd18487aacf70a672df099c
commit 0441f94fba61998b4bd18487aacf70a672df099c
Author: Alan Modra <amodra@gmail.com>
Date: Fri Jan 28 09:46:13 2022 +1030
PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
The assertion is this one in ppc_build_one_stub
BFD_ASSERT (stub_entry->stub_offset >=
stub_entry->group->stub_sec->size);
It is checking that a stub doesn't overwrite the tail of a previous
stub, so not something trivial.
Normally, stub sizing iterates until no stubs are added, detected by
no change in stub section size. Iteration also continues if no stubs
are added but one or more stubs increases in size, which also can be
detected by a change in stub section size. But there is a
pathological case where stub section sizing decreases one iteration
then increases the next. To handle that situation, stub sizing also
stops at more than STUB_SHRINK_ITER (20) iterations when calculated
stub section size is smaller. The previous larger size is kept for
the actual layout (so that building the stubs, which behaves like
another iteration of stub sizing, will see the stub section sizes
shrink). The problem with that stopping condition is that it assumes
that stub sizing is only affected by addresses external to the stub
sections, which isn't always true.
This patch fixes that by also keeping larger individual stub_offset
addresses past STUB_SHRINK_ITER. It also catches a further
pathological case where one stub shrinks and another expands in such a
way that no stub section size change is seen.
PR 28827
* elf64-ppc.c (struct ppc_link_hash_table): Add stub_changed.
(STUB_SHRINK_ITER): Move earlier in file.
(ppc_size_one_stub): Detect any change in stub_offset. Keep
larger one if past STUB_SHRINK_ITER.
(ppc64_elf_size_stubs): Iterate on stub_changed too.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/28827] New: [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, doko at debian dot org, 2022/01/27
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, doko at debian dot org, 2022/01/27
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, amodra at gmail dot com, 2022/01/27
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, doko at debian dot org, 2022/01/27
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, amodra at gmail dot com, 2022/01/27
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu,
cvs-commit at gcc dot gnu.org <=
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, cvs-commit at gcc dot gnu.org, 2022/01/29
- [Bug ld/28827] [2.38 Regression] ld hits assertion building LLVM 9 on powerpc64le-linux-gnu, cvs-commit at gcc dot gnu.org, 2022/01/30