When is it better for an assembler to use sign extended relocation like R_X86_64_32S instead of zero extension like R_X86_64_32?
问题 As a concrete example, on GAS 2.24, moving the address: mov $s, %eax s: After: as --64 -o a.o a.S objdump -Sr a.o Uses zero extension: 0000000000000000 <s-0x5>: 0: b8 00 00 00 00 mov $0x0,%eax 1: R_X86_64_32 .text+0x5 But memory access: mov s, %eax s: Compiles to sign extension: 0000000000000000 <s-0x7>: 0: 8b 04 25 00 00 00 00 mov 0x0,%eax 3: R_X86_64_32S .text+0x7 Is there a rationale to using either in this specific case, or in general? I don't understand how the assembler could to any