Tool/software: TI C/C++ Compiler
Hi,
I use Utimaco's CryptoServer (LAN V5) HSM which uses TI's C6000 toolchain for compilation. I have a requirement to modify the generated .out file. I am looking for objcopy like tool to modify one of the sections. Here is a GCC equivalent of what I would like to perform,
$ cat hello.c
#include <stdio.h>
int moduleID __attribute__(( section("edithere") )) = 0;
int main(int argc, char** argv) {
printf("moduleID is %d\n", moduleID);
return 0;
}
$ gcc hello.c
$ ./a.out
moduleID is 0
$ objcopy --dump-section edithere=edithere.bin a.out
$ hexdump -C edithere.bin
00000000 00 00 00 00 |....|
$ printf "\x7f\x00\x00\x00" > edithere.bin
$ objcopy --update-section edithere=edithere.bin a.out
$ ./a.out
moduleID is 127
I looked into radare2 and surprisingly it doesn't seem to recognize TI COFF2 format. Could you please let me know how can I perform the same using C6000 tools?
Thanks,
Krishnan