using relocs in disassembler
Alan Modra
alan@SPRI.Levels.UniSA.Edu.Au
Mon Nov 15 15:20:00 GMT 1999
More information about the Binutils mailing list
Mon Nov 15 15:20:00 GMT 1999
- Previous message (by thread): using relocs in disassembler
- Next message (by thread): using relocs in disassembler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 15 Nov 1999, Lynn Winebarger wrote: > relocs. First let me see if my assumption about static relocs can be > verified: a reloc affects at most one immediate operand of an You could have more than one reloc affecting an instruction. eg. x86 "movl $addr1,addr2" Other architectures may allow even more (vax ?) > instruction. Thus I don't need to worry about the size of a reloc, I can > just let the disassembler get the operand as normal, and then just ignore > it (except for the size). > Now, I guess my question also applies to some static relocs: when a > reloc appears in data, how can I tell how much data is taken up by the > reloc, and exactly what I should replace it with. I'm guessing, if it's > data, the data would become a pointer to the symbol (or the value of the > symbol). Think of a reloc record as just being a formula telling you how to modify existing instruction or data bytes. As far as I know, a reloc never changes the size of an instruction in an object file.
- Previous message (by thread): using relocs in disassembler
- Next message (by thread): using relocs in disassembler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list