This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Raw Binary output from library (archive) file (c6x)

Is there a way to reproduce a library file from source code that doesn't have any binary differences between builds? 

 

I'm seeing STI* followed by random codes, and a numeric value that appears to increment if I have the same code, with an extra space in a source file to trigger the build.  I would think this would not cause a type library or function table change, but it might be the way the compiler/archiver treats changes to object files (even though no source changes were really made). 

  • Suresh Chandresekar said:
    I'm seeing STI* followed by random codes, and a numeric value that appears to increment if I have the same code

    How are you seeing that?  Please show a small example.

    Thanks and regards,

    -George

  • I suspect you're seeing the names of C++ static object initialization functions, which are named with prefix __sti__ and which have names that can vary from build to build.

  • The initialization function *.sti entry changes if I "touch" the file by putting a space in.  The STI*random number is described on this site as being one symbol that cannot be stripped using the strip6x tools. 

     These other values appear to be "random".  But, between builds, they increase.  I found a e2e link that mentions how to perform a comparison between two rts* libraries with c6x tools (e..g, ofd6x), and scripts that would do that.  What I would like to be able to do is build the library file, add a comment, and build again and not see a binary difference.  Is there a way to perform this in the CCS tools? 

    Its difficult to understand what the other binary differences appear to do as well.   

     

  • You cannot meaningfully compare library files with that method.  There is lots of meta-data which legitimately changes between builds.  One example is time stamps.  

    Instead, use objdiff from the cg_xml package.  My guess is that will show these libraries are the same.

    Thanks and regards,

    -George