Originally on i386, I used inline assembler with .long directives to store addresses in the jump table. However, this failed on amd64, since addresses are .quad, not .long.

Rather than having different inline assembler for 32-bit and 64-bit, a simple solution is to use __attribute__((__section__())) extension to force the addresses to appear in the desired section.

Description

I want to share crtbegin.c between the 32-bit and 64-bit builds.
Originally on i386, I used inline assembler with .long directives to store addresses in the jump table. However, this failed on amd64, since addresses are .quad, not .long.
Rather than having different inline assembler for 32-bit and 64-bit, a simple solution is to use __attribute__((__section__())) extension to force the addresses to appear in the desired section.