Welcome to the new Woodmann RCE Messageboards Regroupment
Please be patient while the rest of the site is restored.

To all Members of the old RCE Forums:
In order to log in, it will be necessary to reset your forum login password ("I forgot my password") using the original email address you registered with. You will be sent an email with a link to reset your password for that member account.

The old vBulletin forum was converted to phpBB format, requiring the passwords to be reset. If this is a problem for some because of a forgotten email address, please feel free to re-register with a new username. We are happy to welcome old and new members back to the forums! Thanks.

All new accounts are manually activated before you can post. Any questions can be PM'ed to Kayaker.

make in aix5 creating exe with different cksum.please help.

RCE of Linux tools and programs.
Locked
net_invade

make in aix5 creating exe with different cksum.please help.

Post by net_invade »

i have make utlity in aix 5 creating the exe with different checksum for each build i create. the source comprises of .pc (which will generate .c ) and two header files.could not identify anything time dependent.every time i build using make , it create c file with same checksum and object and exe with different checksums. anyone could explain this ?
FrankRizzo
Posts: 359
Joined: Sat Nov 27, 2004 7:43 pm
Contact:

Post by FrankRizzo »

I would just about bet that there is "Build time" being included in there somewhere. If I were you, I would build the exe, rename it, rebuild it, and then compare the 2 to see where the changed bytes are.

Furthermore, I would do the same with the object file (.o?) as well.
net_invade

Post by net_invade »

Thanks a lot ! I did diff for the two exe-s and found the build time incorporated in exe.eg :
Sat Dec 27 22:30:19 2008 ·C for AIX Compiler Version 6.0.0.0 ---

So how can i make sure that the two exe-s made at different time are identical ?(i mean the exe which is created from same source code but built at different time). if i remove the exe alone keeping the outfiles intact , "sum -i " gives me the same out put.is there any other way to exclude these time factors and give a cksum ?

Thanks again for your help !
FrankRizzo
Posts: 359
Joined: Sat Nov 27, 2004 7:43 pm
Contact:

Post by FrankRizzo »

Well, I know nothing about AIX really, so it sounds like you are in for some studying of the toolchain to see if there is a way to NOT include the build time.

As a secondary option, you could write a little app that you use as a "post built processor" that sets the time to some agreed upon value so that THAT part is always the same.
net_invade

Post by net_invade »

thats a good idea.i guess i can use that as a reusable component as well.now my attention is towards how can i modify the binary information in the exe.coz two places in exe , the time is in text foramt.but at header its in binary format.if you have any idea of modifying binary information manually ,wud love to hear that.thanks again for ur time n help !
FrankRizzo
Posts: 359
Joined: Sat Nov 27, 2004 7:43 pm
Contact:

Post by FrankRizzo »

net_invade wrote:thats a good idea.i guess i can use that as a reusable component as well.now my attention is towards how can i modify the binary information in the exe.coz two places in exe , the time is in text foramt.but at header its in binary format.if you have any idea of modifying binary information manually ,wud love to hear that.thanks again for ur time n help !
He he he.

fopen
fread
buffer[x] = 0x00;
...
fwrite
fclose

:yay:
net_invade

Post by net_invade »

:stunned:
FrankRizzo
Posts: 359
Joined: Sat Nov 27, 2004 7:43 pm
Contact:

Post by FrankRizzo »

net_invade wrote: :stunned:
I left out the fseek stage. Which is needed, because after the read, the read pointer will be PAST the bytes you just read, so you need to reposition it before the write.

Let me know if that doesn't make sense.
net_invade

Post by net_invade »

I was trying to identify how can i locate the first byte of exe , created by xlc_r in aix 5.i cud get the header format from somewhere.
FrankRizzo
Posts: 359
Joined: Sat Nov 27, 2004 7:43 pm
Contact:

Post by FrankRizzo »

net_invade wrote:I was trying to identify how can i locate the first byte of exe , created by xlc_r in aix 5.i cud get the header format from somewhere.
Hmm.. If the format is like that of MOST compilers, and systems, you could search for the bytes that surround the time. There may be some sorta format in there.

Compile up a couple of files, and compare them, see if the bytes surrounding the time are the same. If so, you could search for them.
net_invade

Post by net_invade »

ok..will try that approach.
Locked