XCOFF linker segmentation fault
authorAlan Modra <amodra@gmail.com>
Mon, 27 May 2019 06:08:55 +0000 (15:38 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 28 May 2019 00:35:02 +0000 (10:05 +0930)
commit0eb32b6e1dee07ac199b4bba855205e4de099213
tree88dc12d092aaa765abbad027322f67724abbb457
parent58db964680f0f17197849a714c30430deafb8bc7
XCOFF linker segmentation fault

The XCOFF linker temporarily trims the output bfd section list,
without adjusting section_count to suit.  This is a little rude, but
the dwarf line number code can easily cope with this situation.  So
check for a NULL end of list as well as limiting the saved section
VMAs to the first section_count list entries.

Also fixes
-FAIL: Weak test 3 (main, static) (32-bit)
-FAIL: Weak test 3 (main, static) (64-bit)

PR 24596
* dwarf2.c (save_section_vma, section_vma_same): Check for NULL
end of section list as well as section_count.
* xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
section list before returning error.
bfd/ChangeLog
bfd/dwarf2.c
bfd/xcofflink.c
This page took 0.02954 seconds and 4 git commands to generate.