https://sourceware.org/bugzilla/show_bug.cgi?id=22677
--- Comment #4 from Nick Clifton <nickc at redhat dot com> --- Created attachment 10728 --> https://sourceware.org/bugzilla/attachment.cgi?id=10728&action=edit Proposed patch Hi David, Sorry - I missed the "-r" option in your initial bug report. This does pose an interesting problem however as your linker script fragment is only a partial solution. The .init_array and .fini_array sections can have a priority value as a suffix to their name, and this suffix must be preserved when linking with -r. (See ld/testsuite/ld-elf/init-fini-arrays.[sd] for an example of this). Hence using: .init_array { KEEP (.init_array.*) } will not work as it looses the section suffixes. So instead I am proposing the attached patch which adds a special case for init and fini arrays to the garbage collection code in the BFD library. Please could you try it out and let me know if it works for you. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils