jumper, maybe we can just use constants
As long as everything is laid out the same way they were originally, I don't
think there's any reason we can't just use %rip-relative addressing on x86-64.
Basically, we just need to keep all the sections together in order.
Somewhat subtly we cannot just use -D to disassemble all sections. -D will
double-disassemble some bytes, which throws off our %rip-relative addressing
of constants. You can see this in PS1. So we whitelist sections instead.
, from man objdump:
This option also has a subtle effect on the disassembly of instructions in code
sections. When option -d is in effect objdump will assume that any symbols
present in a code section occur on the boundary between instructions and it will
refuse to disassemble across such a boundary. When option -D is in effect however
this assumption is supressed. This means that it is possible for the output of -d
and -D to differ if, for example, data is stored in code sections.
Commit-Queue: Mike Klein <firstname.lastname@example.org>
Reviewed-by: Herb Derby <email@example.com>
4 files changed