https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99759

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-04-05
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
             Target|                            |i?86-linux-gnu
                   |                            |s390-linux-gnu
                   |                            |rs6000-linux-gnu

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The comment in morestack.S might be just wrong.

# Make __stack_split_initialize a high priority constructor.  FIXME:
# This is ELF specific.
        .section .ctors.65535,"aw",@progbits

So I read the manual and even read the details on the linker script.  The
comment is incorrect really.  The higher number the later it will be.  In this
case it is 64k-1.

So looking at the linker script:
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))

this means the ctors.65535 will come last.

I don't see any issue here really in the end because GCC will produce
init_array most of the time.

Reply via email to