devel/binutils: Setting sh_link for SHT_REL/SHT_RELA
Import upstream commit 6b958fe36b7:
It's wrong to have an alloc reloc section trying to use a non-alloc
symbol table.
- elf.c (assign_section_numbers <SHT_REL, SHT_RELA>): Correct
comment. Always set sh_link to .dynsym for alloc reloc
sections and to .symtab for non-alloc.
This also fixes strip when using llvm-strip, i.e. when base built with
WITH_LLVM_BINUTILS.
PR: 271061, see also: 270961, 270960
Reported by: Emanuel Haupt <ehaupt@FreeBSD.org>
Approved by: cy
Obtained from: Upstream commit 6b958fe36b7
(cherry picked from commit 898053f9100240f305a2bc6d49998a13728d3a71)