Skip to content

Conversation

@neox41
Copy link

@neox41 neox41 commented Sep 10, 2022

I've added support for x86. I've tested both x86 and x64 BOFs compiled with MSVC and they worked.

@Iamgublin
Copy link

Iamgublin commented Jun 29, 2023

case IMAGE_REL_I386_DIR32:*P = (*P + S); break; is incorrect. should change to:

case IMAGE_REL_I386_REL32: add32(P, S + SymOffset - (PBYTE)P - 4); break;   
case IMAGE_REL_I386_DIR32: *P = (*P + SymOffset + S); break;

https://github.com/llvm/llvm-project/blob/6bf66d839f1386c06e19a3621c02c8fc6a14f94f/lld/COFF/Chunks.cpp#L146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants