
Chris,
in message A1DD009E87CDD2119E940008C7334DA4021CCB18@ns.radstone.co.uk you wrote:
I've come across a problem using the ELF loader, the existing one relocates the data in the ELF image using section headers. This prevented a LynxOS image I have being loaded correctly. I was lead to believe by the ELF standard that section headers are for linking, not loading and execution. I have reimplemented the ELF loader using program headers, this is shown in the code snippet below. (The original code is left in for reference but commmented out) Can anyone tell me if there is a valid reason for the way it was done originally?
I think your code is correct. As far as I can tell, according to the standard an ELF file is supposed to be loaded using program headers and not section headers.
Can you please submit your new code as a patch against the current CVS tree?
Ummm... are you aware of the fact that you don't clear the BSS are, which is required by the standard?
Best regards,
Wolfgang Denk