Yoder Stuart writes: > The ePAPR specifies that for an ELF file with a header > e_type value of ET_DYN, that the boot program can load > a client program at an address of its chosing. > > Question is how to set the ET_DYN flag in an ELF header? > I haven't had the time to dig through the linker > documentation yet, but wondered if anyone has tried > to do this yet, and if so, how you did it.
Link with -pie. For 32-bit, you then need to make sure you process the dynamic relocations at startup. I posted a patch that links the bootwrapper as a PIE some time back which you could use as an example (look for the subject "[RFC PATCH] Link the bootwrapper as a position-independent executable"). That relied on having the objects compiled with -fPIC. I'm working on a patch for a relocatable 32-bit kernel that handles more relocations and doesn't require compiling with -fPIC. I'll post it shortly. Paul. _______________________________________________ devicetree-discuss mailing list [email protected] https://ozlabs.org/mailman/listinfo/devicetree-discuss
