[LLVMdev] Possible issue with ARM/MC/MachO fixup
Jason Kim
jasonwkim at google.com
Wed Jan 19 10:41:31 PST 2011
Hi everyone.
In ARMAsmBackend.cpp, in routine DarwinARMAsmBackend::ApplyFixup()
there is a curious call to getFixupKindNumBytes() - which can return
1,2, 3, or 4 depending upon the FixupKind
The code in ApplyFixup() seems to be lifted from the X86.
AFAIK, the initial Fixup.Offset() is always divisible by 4, at least
for ARM mode - i.e. it is always at the instruction boundary.
it looks like adjustFixupValue() is meant to create a mask that can be
bitwise OR'ed into the full instruction, which is 2 or 4 bytes
So what does it mean to patch 1 or 3 bytes starting from the
instruction boundary?
I don't know enough about Macho to tell whether this is a bug or not.
If it isn't, apologies for the noise.
-Jason
More information about the llvm-dev
mailing list