system call used by SIZE command
am trying to implement a size command in C...
pls any one can help me which system call a have to use thanQ in advance |
Q: Is this a homework assignment?
Q: What have you tried so far? What's not working? |
Have you looked at the size command source code? The size man page footer shows that size is part of the GNU binutils package. Netsearching for binutils and "source code" finds GNU's binutils page which has a link to the source code. There's no better reference or authority than that :)
|
No its not assignment...
i tried using read system call to get the first 32 bits of the executable to Elf32_Ehrd. |
Hi -
"size" and "objdump" are command-line tools that help you parse an ELF-format binary file. There are no equivalent system calls. "od" is a command-line tool to help you dump the binary contents of a file; you can do a "read()" to get the bits directly from the file. If you want to programmatically do some of the same things that "size" or "objdump" do for you, then your best bet is to study the Gnu binutils source code (as catkins suggested about). 'Hope that helps .. PSM |
All times are GMT -5. The time now is 04:45 PM. |