Category "relocation"

Why function pointer in the structure causes relocation at program load-time

I've the following code that I compile and run on Linux: #include <stdio.h> // can't be static void do_stuff(void) { ;; } typedef void (*func)(void)

relocation truncated to fit r_386_8 against .bss'

When I try to build my source into a 32-bit static executable for Linux with nasm -f elf -F dwarf -g loop.asm ld -m elf_i386 -o loop loop.o I get this R_386_