bfd: ld: sframe: set SEC_EXCLUDE when discarding SFrame sections

Fix PR libsframe/33127 "ld -r" doesn't remove the sframe relocation
against the discarded section

When an SFrame section is marked for deletion, set its section size to
zero.  And mark it with SEC_EXCLUDE.

Using the testcase provided by H.J. Lu.

bfd/
	PR ld/33127
	* elf-sframe.c: Set section size to 0 if all FDEs are to be
	deleted.  While at it, keep the rawsize updated.
	* elflink.c (bfd_elf_discard_info): Set SEC_EXCLUDE to mark for
	exclusion from final link.
ld/
	PR ld/33127
	* testsuite/ld-x86-64/sframe-reloc-2.d: New test.
	* testsuite/ld-x86-64/x86-64.exp: Run sframe-reloc-2.
4 files changed