On Mon, Jul 24, 2023 at 5:56 PM Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Andrew Pinski via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > > The problem -fasynchronous-unwind-tables is on by default for aarch64 > > We need turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ > > point > > to .eh_frame data from crtbeginT.o instead of the user-defined object > > during static linking. > > Could you go into more details? Which user-defined object do you mean? > > I notice alpha has: > > # When GAS-generated unwind tables are created, they get created > # after the __FRAME_END__ terminator, which causes an ld error. > CRTSTUFF_T_CFLAGS = -fno-unwind-tables > > which I guess was a separate problem.
x86 has # crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, # because then __FRAME_END__ might not be the last thing in .eh_frame # section. > > Thanks, > Richard