[patch/rebase] Add a rebase database to keep track of DLL addresses
Charles Wilson
cygwin@cwilson.fastmail.fm
Sun Jul 24 19:13:00 GMT 2011
Ok, here's round 2. I've omitted rebase-dump-related changes for now,
other than moving the db typedefs to rebase-db.[h,c] (*).
(*) There's a .c because we probably need to have IMG_INFO_MAGIC and
IMG_INFO_VERSION tightly coupled with rebase-db.h. So, since I already
had the .c, I also moved the *_cmp() functions to rebase-db.[h,c]. It's
possible load_image_info, save_image_info, and print_image_info could
also be moved, but I think the needs of rebase.exe and rebase-dump.exe
are different enough that I didn't bother right now.
build-aux/config.guess: Add msys support.
build-aux/config.sub: Add msys support.
(Once again, whether to include these ^^^ changes, and fork config.*, is
up to Jason).
configure.ac: Specify -static-* and -D overrides, on a
platform-sensitive basis, here rather than hardcoding in
Makefile.in. Add strtoll.c to LIBOBJS for MSYS.
imagehelper/Makefile.in: Instead of hardcoding -static-* and -D
overrides here, use new platform-sensitive vars defined by
configure.
Makefile.in: Ditto. Also, add strtoll.c.
imagehelper/rebase_main.cc: Fix bug in GetImageInfos64 call.
Be explicit about CYGWIN vs MSYS.
imagehelper/sections.h: Fix portability issues with stdint.h
and uintptr_t.
rebase.c: Handle missing inttypes.h on MSYS. Be explicit about
CYGWIN vs MSYS. Move db typedefs and comparison functions to
rebase-db.[c,h]. Use standard GPLv2+ text.
(strtoull) [MSYS]: Declare missing function.
(main) [MSYS]: Allow room for msys-1.0.dll, as with cygwin1.dll.
(mkstemp) [MINGW]: Fix open flags.
(load_image_info): Fix open flags (O_BINARY). Validate read()
return value against requested number of bytes.
(merge_image_info) [MSYS]: Skip msys-1.0.dll, as with
cygwin1.dll.
(parse_args) [MINGW]: Use program path to determine location of
database.
rebaseall.in: Add platform-specific code to handle msys
shortcomings. Use standard GPLv2+ text.
peflagsall.in: Ditto.
peflags.c: Use standard GPLv2+ text.
rebase-db.h: New file.
rebase-db.c: New file.
strtoll.c: New file.
--
Chuck
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mingw-msys-updates-round2.patch
Type: application/x-patch
Size: 30894 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20110724/ca2f196c/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rebase-db.h
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20110724/ca2f196c/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rebase-db.c
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20110724/ca2f196c/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strtoll.c
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20110724/ca2f196c/attachment-0001.c>
More information about the Cygwin-apps
mailing list