This is the mail archive of the binutils@sourceware.org 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: get_section_by_name in libbfd


Hi,

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)

HTH
Vamsi kundeti
On 10/14/06, Sandeep Kumar <sandeepksinha@gmail.com> wrote:
Hi,

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.

--
Regards,
Sandeep





Winners expect to win in advance. Life is a self-fulfilling prophecy.



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