This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: adding sections to elf binary.


Hi Adam,

> 	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
directly.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]