C/C++ on Linux/Unix

Moderators: Lundin
Number of threads: 314
Number of posts: 633

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problem in getting all Section names of Elf File using sprintf() Posted by Higher on 4 Feb 2013 at 12:44 AM
plz help m only getting one section name from the below code using sprintf
i am working on qt creator ..plz help


QString set;
char xyz[399];
scn = 0 ;
while (( scn = elf_nextscn(e , scn ))!=0)
    {

    if(gelf_getshdr ( scn , &shdr )!=&shdr)
    {
        set="error";

    }


        else if((name = elf_strptr(e , shstrndx , shdr.sh_name))==0)
        {
       

        set="error";
    }
   

sprintf (xyz, " Section %-4.4jd %s \n\n" , ( uintmax_t ) elf_ndxscn(scn), name );

set=xyz;
}

    emit button3Pushed(set);





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.