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: GNU gcc library function checksum


Hi Duncan,

For the purposes of identifying changes in object code (library functions received as object code) I would like to calculate a checksum value of individual object
> files and / or each function within a library (archive). Are there any options I can
use with objdump to do this

No.


or are there any other tools that will enable me to compute the checksums?

You can compute checksums of entire object files by just extracting them and passing them to some external program. eg:


#!/bin/bash

LIB=libbfd.a

  for A in `ar t $LIB`
  do
    ar x $LIB $A
    echo "checksum: " `md5sum --binary $A`
    rm $A
  done

There is no simple equivalent for doing the same on a per-function basis, though, sorry. You would have to write a program to do this.

Cheers
  Nick


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