This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Using the 'readelf' utility on any .obj file produced by cl6x or clpru produces a warning:
~/tmp$ echo >empty.c
~/tmp$ cl6x empty.c
~/tmp$ readelf --file-header empty.obj | grep program
readelf: Warning: possibly corrupt ELF header - it has a non-zero program header offset, but no program headers
Start of program headers: 2484 (bytes into file)
Size of program headers: 32 (bytes)
Number of program headers: 0
As shown, the file header indeed contains a non-zero program header table offset (e_phoff), even though it doesn't have a program header table. The ELF specification says:
e_phoff
I agree with your analysis. Thank you for letting us know about this problem. I filed CODEGEN-3597 in the SDOWP system to have this investigated. You are welcome to follow it with the SDOWP link below in my signature.
Thanks and regards,
-George