This is the mail archive of the
mailing list for the binutils project.
Re: get_section_by_name in libbfd
- From: "vamsi krishna" <vamsi dot krishnak at gmail dot com>
- To: "Sandeep Kumar" <sandeepksinha at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 14 Oct 2006 14:46:01 -0400
- Subject: Re: get_section_by_name in libbfd
- References: <firstname.lastname@example.org>
You might want to see how 'readelf --segments' is giving out the
segment to section mappings.
Actually the segment to section mapping for a executable is predefined
while creating the executable itsself. The segment information is the
Program Headers (Elf_Phdrs) for a elf executable. The text is of type
PT_LOAD with permissions 'R-E' (read and execute)
On 10/14/06, Sandeep Kumar <email@example.com> wrote:
Is it possible to get all the names of all the sections which will
get mapped into the text segment at runtime, using libbfd.
I tried using get_section_by_name, but in this case i dont know all
the names of the section which will get mapped into the text segment.
".text" is by deafult, but there can be many more like .text.hot ,
.text.likely , .text.unlikely, etc.
Winners expect to win in advance. Life is a self-fulfilling prophecy.