I have got the AMD IL from source kernel in the binaries using the comiler options "-fno-bin-llvmir -fno-bin-source -fno-bin-exe -fbin-amdil". Now I need to modify the IL codes in the binaries and then build the program from binaries. To do this I use a hexeditor but I can only make very small changes in the IL codes i.e without making any change in the size of IL codes. Any addition or deletion of extra lines to IL would cause the clBuildProgram to fail. I'm not an expert in handling binaries so I need advice regarding how to achieve this. Also I would prefer any other method of editing IL which doesn't involve editing them in the binaries.
While this path is not officially supported, you can use something like libtoolchain's libelf to deconstruct, modify and reconstruct the OpenCL binary such that you can make any modifications to the IL and not fail clBuildProgram.