Set SEC_ELF_REVERSE_COPY earlier
authorAlan Modra <amodra@gmail.com>
Wed, 12 Jan 2022 02:07:27 +0000 (12:37 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 12 Jan 2022 02:25:17 +0000 (12:55 +1030)
commitb02db37812bef6e12772bfbddd004e50534eaed1
tree775ed5bbacbb532774161bd54e4e34b89f7c2f71
parent295114a64ff50cc79e4510b8be935ebccda2900a
Set SEC_ELF_REVERSE_COPY earlier

For the sake of DT_RELR.

bfd/
* elflink.c (elf_link_input_bfd): Don't set SEC_ELF_REVERSE_COPY
here.  Move sanity checks to reverse copying code.
ld/
* ldlang.c (lang_add_section): Set SEC_ELF_REVERSE_COPY for
.ctors/.dtors in .init_array/.fini_array.
bfd/elflink.c
ld/ldlang.c