What's the difference between R_386_PC32 and R_X86_64_PC32 in link(GNU ld) relocation process
问题 When reading the book Computer System: A Programmer's Perspective Section 7.7.1 Relocation Entries: the brief content of this section is how a linker relocate reference in a different object file. When compile and objdump the example source code: void swap(); int buf[2] = {1, 2}; int main() { swap(); return 0; } Then gcc -Wall -c -o main.o main.c, and objdump -S -r main.o > main.asm; and will see the relocation entry for swap: 6: e8 fc ff ff ff call 7 <main+0x7> swap(); 7: R_386_PC32 swap