News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to get rid of timedatestamp ?

Started by BlackVortex, September 30, 2008, 02:25:28 AM

Previous topic - Next topic

BlackVortex

So, both MS's linker and polink fill in the timedatestamp (correctly)

Thing is, I don't want it to be filled, mostly because I do many bytecompares of my exes and I don't want the extra confusion. Also, it's totally useless anyway.

So, I thought before I code a little utility that zeroes it out and put in my make-batch, maybe I'm missing some option to make the linker to keep that header field zero ?

P.S.: At least polink leaves the checksum blank, nice

jdoe

Quote from: BlackVortex on September 30, 2008, 02:25:28 AM
P.S.: At least polink leaves the checksum blank, nice

As the MS linker if you not use the /RELEASE switch.

For the timestamps, you should begin thinking to a little utility   :P
Also, there is undocumented data that the MS linker writes in the PE and maybe polink too but I don't remember if it is linker version specific or it change at each linking time.


hutch--

BlackVortex,

Just use the MZ and PE structures to locate the attribute you want then change it, its a simple task once you set up and use the structures. You get the PE offset from the end of the MZ header but if you are a slob you can get it with a search of "PE" in the first 1k of the app.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

BlackVortex

Thanks for the quick replies guys.

@ hutch
:bdg
muahahaha, of course I can locate that header field, I am very good in "walking" around the PE structure

It's just that I keep missing interesting command switches (like the release thingy) and I thought this'd be the case. I guess I'll write up a little header cleaner myself, maybe I'll find other useful uses to include.


P.S.: Did I just say "useful uses" ?    :snooty:

P1

Quote from: BlackVortex on September 30, 2008, 03:18:19 AMP.S.: Did I just say "useful uses" ?    :snooty:
Just a digital fingerprint of pride.   :eek  Because there is no reason "here" to defeat the normal operations of a linker. 

Regards,  P1   :8)

PBrennick

BlackVortex,
If you are so good at walking the PE, then it should be no problem for you to exclude the PE from your byte compares. That way, you can leave the PE alone and still get the job done. It really is the only viable solution IMO.

-- Paul
The GeneSys Project is available from:
The Repository or My crappy website

BlackVortex

Quote from: PBrennick on September 30, 2008, 03:42:52 PM
BlackVortex,
If you are so good at walking the PE, then it should be no problem for you to exclude the PE from your byte compares. That way, you can leave the PE alone and still get the job done. It really is the only viable solution IMO.

-- Paul

It's not my program that does the byte comparison, I have a batch file :
fc %1 %2 /b
pause

and I drag and drop 2 files there, lol

like I said, I will code a little utility to run after linking that will do some cleanup of useless header values (there's a lot) A nice side-effect is a few bytes better compression later (I value size over speed and use exepackers)

I'm not feeling naughty enough to mess with the linker itself   :naughty:

PBrennick

Yesh, well it is too bad that neither FC nor COMP have the ability to skip headers as an option. May be a future project for me. Seems like it would be pretty darn simple to do, actually. Let us know how ytou make out as it would make a pretty good watchdog utility.

-- Paul
The GeneSys Project is available from:
The Repository or My crappy website