Download Yasm User Manual

Transcript
8.6. ELF32 SPECIAL SYMBOLS AND WRT
..plt Referring to a procedure name using wrt ..plt causes the linker to build a procedure linkage table
entry for the symbol, and the reference gives the address of the PLT entry. You can only use this in
contexts which would generate a PC-relative relocation normally (i.e. as the destination for CALL or
JMP), since ELF contains no relocation type to refer to PLT entries absolutely.
..sym Referring to a symbol name using wrt ..sym causes Yasm to write an ordinary relocation, but instead
of making the relocation relative to the start of the section and then adding on the offset to the symbol,
it will write a relocation record aimed directly at the symbol in question. The distinction is a necessary
one due to a peculiarity of the dynamic linker.
75