check architecture before attempting to load object files
If a user somehow manages to trick ghci into loading a .o file for the wrong architecture (e.g. arm vs x86), the runtime linker doesn't notice and tries to load it anyway. That is likely to result in a confusing error or crash.
ocVerifyImage_ELF does already check the "ELF class", which amounts to 32-bit vs 64-bit. It should also check the architecture and, I think, endianness to make sure they are compatible with the running process.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1-rc1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Runtime System (Linker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |