7 ms·
So I was doing this (storing the main entry point) but it was crashing. I'll have to try again, I suppose.
by tekknolagi 6y ago
So I was doing this (storing the main entry point) but it was crashing. I'll have to try again, I suppose.
- oso2k 6y agoIs `kLabelPlaceholder` an absolute or relative address? If it's absolute, you start executing at `kLabelPlaceholder`. If it's relative, you start executing at `buf + kLabelPlaceholder`. You could see the final value if you compile with debug info and run the binary under `gdb` or some other debugger. It might help to read skeeto's blogs [0][1][2]. [0] https://nullprogram.com/blog/2015/03/19/ https://nullprogram.com/blog/2015/03/19/ [1] https://nullprogram.com/blog/2016/12/11/ https://nullprogram.com/blog/2016/12/11/ [2] https://nullprogram.com/blog/2018/11/15/ https://nullprogram.com/blog/2018/11/15/
- tekknolagi 6y agoIt's a placeholder. It's meant to fill in before actual addresses are filled in. But all the call targets are relative addresses.