tilegx: Set this_hdr.sh_entsize only if section size > 0
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 8 Oct 2017 21:29:52 +0000 (14:29 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 8 Oct 2017 21:29:52 +0000 (14:29 -0700)
commit4c7236d3cb7b971bbdc97b6aec348a4aa0594a9b
tree8ef779b7e3f64aadd3dabc5498d1b1bc4c8c31b0
parent70090aa5f629dcbdfa88b20c29951fa8f50f0545
tilegx: Set this_hdr.sh_entsize only if section size > 0

This fixes:

/export/build/gnu/binutils-cross/build-tilegx-linux/ld/ld-new   -o tmpdir/comm-data -z norelro -L/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf  -T comm-data2.ld -Ltmpdir -lcomm-data tmpdir/comm-data2.o
sh: line 1:  9208 Segmentation fault      (core dumped) /export/build/gnu/binutils-cross/build-tilegx-linux/ld/ld-new -o tmpdir/comm-data -z norelro -L/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf -T comm-data2.ld -Ltmpdir -lcomm-data tmpdir/comm-data2.o 2>&1
FAIL: Common symbol override test

* elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
this_hdr.sh_entsize only if section size > 0.
bfd/ChangeLog
bfd/elfxx-tilegx.c