AnsweredAssumed Answered

OpenCL ELF binary format

Question asked by balidani on Jun 21, 2013
Latest reply on Jun 22, 2013 by realhet

Hello!

 

I've been looking at the generated ELF binaries for OpenCL kernels and I have a few questions.

Is there any documentation for the structure of these binaries out there?

That would answer most of my questions if there was one.

 

I attached an example ELF for a very simple kernel.

In this binary there is an inner ELF in the .text section and this inner ELF contains the GCN microcode.

When I run readelf to see the sections of this inner ELF I get this:

 

$ readelf -S sample_inner.bin

There are 6 section headers, starting at offset 0xd0:

 

Section Headers:

  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al

  [ 0]                   NULL            00000000 000000 000000 00      0   0  0

  [ 1] .shstrtab         STRTAB          00000000 0000a8 000028 00      0   0  0

  [ 2] .text             PROGBITS        00000000 0005dc 00007c 00      0   0  0

  [ 3] .data             PROGBITS        00000000 000658 001280 1280    0   0  0

  [ 4] .symtab           SYMTAB          00000000 0018d8 000010 10      5   1  0

  [ 5] .strtab           STRTAB          00000000 0018e8 000002 00      0   0  0

Key to Flags:

  (...)

 

The weird part is that there is data in the ELF that is not contained by any section.

For example, you can find a bunch of text that says "ATI CAL" in the binary but those aren't contained by sections.

Does anyone know what that part is?

 

Thanks in advance,

Daniel

Attachments

Outcomes