This is the mail archive of the
mailing list for the binutils project.
Re: adding sections to elf binary.
> I have a program which has only segments and 'program
> header'. However, it does not have any sections or
> 'section header'.
> Now is there some easy way to add 'section header'
> and section "String Table" to such binary.
You could try using objcopy with its --add-section switch. However
this may not do exactly what you want, since I assume from your choice
of section name you want the section to be recognised as the string
table and have its index set in the ELF header. To do that I suspect
that you will have to write a program to manipulate the binary