From: Pekka J. <pek...@tu...> - 2011-12-19 12:05:02
|
On 12/19/2011 01:43 PM, Carlos Sánchez de La Lama wrote: > Again, ELF is used in BIF just as a wrapper, so you can create a > ".myownstuff" section and put whatever you want inside. There is no need > for it to be in the ".text" I know. But then, how I see it, ELF is just "abused" as an archive format here without actual benefits to generic file archive formats. If you do not use the executable and linking related info but treat all contents as "unknown binary blobs" with some "custom metadata", what's the point of using such a format? This adds a dependency to the ELF writing libraries (think Windows or embedded, for example) even when something much simpler could suffice. If we use ELF as the "OpenCL binary format" I think we should keep the binary program dlopenable (in .text, .rodata, .data) to have the benefits from the standard format (at least in operating systems that support ELF). This means (AFAIU) compiling the multiple versions of the kernel to the same .text with different function names. Or, if something simpler is chosen it could be a simple wrapper with quickly extractable final files (even tar could work or even our own simple format). The alternative could be to define a simplistic custom wrapper format that wraps in the final binaries and the bc. It would not care of the format of the final binaries (thus the OpenCL binary container *contents* would be platform-specific, but the container itself not) and would store enough metadata for choosing the correct final binary based on the dimensions. -- Pekka |