On Tue, 2022-08-30 at 13:36 -0700, H.J. Lu wrote: > > >  SHT_RELA shouldn't be used for i386. > > > > But it is accepted by ld.bfd... > > Do you have .o files for ld.bfd I can take a look at? > > > FWIIW, only the dwarf debug sections are generated as SHT_RELA by > > nasm. Hi, $ cat t.asm section .text extern printf global main main: push ebp mov ebp, esp push msg call printf add esp, 4 leave ret section .data msg db 'Hello, world!', 13, 10, 0 section .note.GNU-stack noalloc noexec nowrite progbits $ nasm t.asm -f elf32 -F dwarf $ cc t.o && ./a.out Hello, world! $ cc -fuse-ld=gold t.o /usr/bin/ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3683 collect2: error: ld returned 1 exit status I'll attach "t.asm' and "t.o.gz". -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University