This is the mail archive of the cygwin-apps mailing list for the Cygwin 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] |
On Nov 20 18:22, Achim Gratz wrote: > Corinna Vinschen writes: > > Well, perhaps. I'm just not sure it's the right thing to do it at > > postinstall time. I mean, it's not impossible, obviously, but it's > > a lot of stuff per executable and running this for a few thousand .exe > > files could take some time. > > Yes, it does... but ever since I've switched to doing incremental > autorebases that time has shrunk a lot. > > > We would also have to make sure that the sections with long section > > names are recreated after adding the .rsrc section, which is something > > I don't quite see how to accomplish, right now. > > Hmm. I'm out of my depths on this, but would it be possible to excise > those sections, do whatever changes are necessary to the rest of the > executable and then add them back? I don't know. It's apparently more complicated than just calling objcopy. For instance, objcopy can export sections from a file in whatever format you want, but it can only add back sections if they are given as binary blobs. If you add such a binary blob it's missing relocation information. Also, you have to make sure all the sections start at the right address, thanks to the harebrained PE/COFF format. This is apparently a big deal, otherwise it should have been no problem to add a resource binary blob into an executable without making Windows choke on it (ERROR_BAD_EXE_FORMAT). Maybe I did something wrong, but I would have no idea what option I missed. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Attachment:
pgpU5IDEc1tKo.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |