https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82723
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Again this is not a gcc issue. It is a linker issue. You are most likely using binutils for the linker. Second this has been this behavior ever since the elf format came about 20 years ago.