Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

elf64_checksum(3) [freebsd man page]

GELF_CHECKSUM(3)					   BSD Library Functions Manual 					  GELF_CHECKSUM(3)

NAME
elf32_checksum, elf64_checksum, gelf_checksum -- return the checksum of an ELF object LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> long elf32_checksum(Elf *elf); long elf64_checksum(Elf *elf); #include <gelf.h> long gelf_checksum(Elf *elf); DESCRIPTION
These functions return a simple checksum of the ELF object described by their argument elf. The checksum is computed in way that allows its value to remain unchanged in presence of modifications to the ELF object by utilities like strip(1). Function elf32_checksum() returns a checksum for an ELF descriptor elf of class ELFCLASS32. Function elf64_checksum() returns a checksum for an ELF descriptor elf of class ELFCLASS64. Function gelf_checksum() provides a class-independent way retrieving the checksum for ELF object elf. RETURN VALUES
These functions return the checksum of the ELF object, or zero in case an error was encountered. ERRORS
These functions may fail with the following errors: [ELF_E_ARGUMENT] Argument elf was NULL. [ELF_E_ARGUMENT] Argument elf was not a descriptor for an ELF file. [ELF_E_ARGUMENT] The ELF descriptor elf was not opened for reading or updating. [ELF_E_CLASS] For functions elf32_checksum() and elf64_checksum(), ELF descriptor elf did not match the class of the called function. [ELF_E_HEADER] The ELF object specified by argument elf had a malformed executable header. [ELF_E_RESOURCE] An out of memory condition was detected during processing. [ELF_E_SECTION] The ELF object specified by argument elf contained a section with a malformed section header. [ELF_E_VERSION] The ELF object was of an unsupported version. SEE ALSO
strip(1), elf(3), gelf(3) BSD
August 29, 2006 BSD

Check Out this Related Man Page

GELF_CHECKSUM(3)					   BSD Library Functions Manual 					  GELF_CHECKSUM(3)

NAME
elf32_checksum, elf64_checksum, gelf_checksum -- return the checksum of an ELF object LIBRARY
ELF Access Library (libelf, -lelf) SYNOPSIS
#include <libelf.h> long elf32_checksum(Elf *elf); long elf64_checksum(Elf *elf); #include <gelf.h> long gelf_checksum(Elf *elf); DESCRIPTION
These functions return a simple checksum of the ELF object described by their argument elf. The checksum is computed in way that allows its value to remain unchanged in presence of modifications to the ELF object by utilities like strip(1). Function elf32_checksum() returns a checksum for an ELF descriptor elf of class ELFCLASS32. Function elf64_checksum() returns a checksum for an ELF descriptor elf of class ELFCLASS64. Function gelf_checksum() provides a class-independent way retrieving the checksum for ELF object elf. RETURN VALUES
These functions return the checksum of the ELF object, or zero in case an error was encountered. ERRORS
These functions may fail with the following errors: [ELF_E_ARGUMENT] Argument elf was NULL. [ELF_E_ARGUMENT] Argument elf was not a descriptor for an ELF file. [ELF_E_ARGUMENT] The ELF descriptor elf was not opened for reading or updating. [ELF_E_CLASS] For functions elf32_checksum() and elf64_checksum(), ELF descriptor elf did not match the class of the called function. [ELF_E_HEADER] The ELF object specified by argument elf had a malformed executable header. [ELF_E_RESOURCE] An out of memory condition was detected during processing. [ELF_E_SECTION] The ELF object specified by argument elf contained a section with a malformed section header. [ELF_E_VERSION] The ELF object was of an unsupported version. SEE ALSO
strip(1), elf(3), gelf(3) BSD
August 29, 2006 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Linux

PS Command Field

Is there any way to view the full contents of the command field when using ps -elf? I'm running a java process which has 4 lines worth of arguments. When i ps -elf no matter how much cut i use it will only display the first line of the command. Thanks, (2 Replies)
Discussion started by: akuma
2 Replies

2. UNIX for Advanced & Expert Users

sometimes "ps -elf" command doesn't work

when i give "ps -elf" or "ps" system gets hung. if i press "^c" come out from it... pls help..what should i do to get it resolved. thanks CKanth (4 Replies)
Discussion started by: srikanthus2002
4 Replies

3. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

4. Programming

disassemble

hello! does anybody know a way to disassemble a object file(ELF format) using C commands!? thanxx (1 Reply)
Discussion started by: nicos
1 Replies

5. Solaris

wrong ELF class: ELFCLASS32 when trying to run ps as particular user

I get the following error when running /usr/bin/ps on Solaris 10 as a particular non-privileged user: ld.so.1: ps: fatal: /usr/dt/lib/libXm.so.3: wrong ELF class: ELFCLASS32 Killed However I can run /usr/bin/ps successfuly as root or as any other non-privileged user. What could it be about this... (5 Replies)
Discussion started by: aussieos
5 Replies

6. Shell Programming and Scripting

Extracting the checksum

I wanted a script that can give the checksum of a particular zipped file. Can somebody help me in writing a shell script in getting the checksum of a particular tar file. (1 Reply)
Discussion started by: vkca
1 Replies

7. Post Here to Contact Site Administrators and Moderators

What's happens with my thread about "-bash: ELF: command not found "?

Hi, Today, I've submitted a new tread in "Shell Programming and Scripting" forum, with title "-bash: ELF: command not found ". However, this thread has disappear. Can somebody give me an explanation? Regards. (3 Replies)
Discussion started by: Sonia_
3 Replies

8. Programming

could not open source file "sys/elf_386.h"

Hello All, i am porting my application from SunSolaris to Linux (RHEL4). When i compile my c/c++ code i am getting the following errors. 1. catastrophic error: could not open source file "sys/elf_386.h" #include <sys/elf_386.h> 2. catastrophic error: could not open source file... (2 Replies)
Discussion started by: tsaravanan
2 Replies

9. Programming

A help to create an ELF file

Hi!!! How do I create a file .ELF? What code should I use, could help me with a simple code or example? I know programming to Windows by important languages but this seems to be more sistematical, and I really don't know how to. (2 Replies)
Discussion started by: linecoder
2 Replies

10. UNIX for Dummies Questions & Answers

Relocatable code, Etcetera

I was reading about ELF files and it has lead to Relocatable Code and also P.I.C. I have searched the net like never before and I can't find a whole lot of comprehensive/organized info on this topic. I really can't put together a decent enough question at this point. Is... (2 Replies)
Discussion started by: theKbStockpiler
2 Replies

11. Shell Programming and Scripting

print column value after exact match of variables in file

I have file like below summit hvar_rgrpd_10d_hvams17_ _kgr_prod.rec checksum checksum us europe summit hvar_rgrpd_10d_hvams17_ _kgr_prod.xml var summit us ... (5 Replies)
Discussion started by: manas_ranjan
5 Replies

12. Shell Programming and Scripting

Need get content of ELF shell script

I have a script file that file type is ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs) Now I want to get the contents of this file. How can I ? Any help me to get cotents of this file type? (2 Replies)
Discussion started by: karthickk02
2 Replies

13. Shell Programming and Scripting

ps -elf AND grep for changes

Hoping theres something already out there like this. I have a list of proccesses who's "ps -elf" (field 10) values I need to continuously monitor and if the values of field 10 start to signiciantly increase (double, triple) then do something. The field 10 is the "memory size" field. (these... (4 Replies)
Discussion started by: ajp7701
4 Replies

14. Red Hat

Wrong ELFCLASS64 in RHEL 5 64 bit

Hi, I am using DB2 9.7 , configured odbc.ini file and exported environment variables but I am getting the following error. error while loading shared libraries: libodbc.so.1: wrong ELF class: ELFCLASS64 Kindly help. (4 Replies)
Discussion started by: roopalidalvi231
4 Replies

15. Programming

How Readelf command works?

Hello all I want to read program header of a executable without using readelf. I know it can be tough. I will do the programming myself. Just give me a hint of it. Thanks ---------- Post updated at 05:02 AM ---------- Previous update was at 04:58 AM ---------- basically i want to count... (3 Replies)
Discussion started by: aditya08
3 Replies