J. Mayer wrote:
> Following what I've done in the syscalls emulation routines, it appeared
> to me that there seems to be a lot of confusions between host and target
> long in the ELF loader.

But the ELF fields are tied to the ELFCLASS of the supported ABI, not to
the register width of the machine emulation. If anything they should
become the ELF types.

(Your approach will e.g. break down for MIPS N32, where "long" is smaller
thant the register width, and the ABI uses ELFCLASS32.)

> I tried to fix this. I also noticed that the image infos start_data
> field was not computed as the Linux kernel does. As the ARM and the
> Alpha targets use this information to initialize the program state
> before execution, it seems a good idea (to me !) to fix it.

This part looks reasonable.


Thiemo


Reply via email to