[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/30155] ld: Segfault in _bfd_nearby_section with custom linker sc
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/30155] ld: Segfault in _bfd_nearby_section with custom linker scripts |
Date: |
Fri, 24 Feb 2023 07:54:01 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30155
--- Comment #3 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=18e7a6587e3f111e9367ea707f9eb21acf4b9af7
commit 18e7a6587e3f111e9367ea707f9eb21acf4b9af7
Author: Alan Modra <amodra@gmail.com>
Date: Thu Feb 23 18:23:12 2023 +1030
PR30155, ld segfault in _bfd_nearby_section
The segfault was a symptom of messing with the absolute section next
field, confusing bfd_section_removed_from_list in linker.c:fix_syms.
That's not all that was going wrong. The INSERT list of output
sections was being inserted into itself, ie. lost from the main
list of linker statements.
PR 30155
* ldlang.c (process_insert_statements): Handle pathological
case of the insert script being inserted before the first
output section statement in the default script.
(output_prev_sec_find): Don't test section owner here.
(insert_os_after): Change parameter to a list union pointer.
(lang_insert_orphan): Test section owner here and adjust
insert_os_after call.
--
You are receiving this mail because:
You are on the CC list for the bug.