summaryrefslogtreecommitdiffstats
path: root/courgette
Commit message (Collapse)AuthorAgeFilesLines
* Fixed Courgette to correctly regenerate the ELF relocation table forpaulgazz@chromium.org2013-07-187-36/+122
| | | | | | | | | | | | | | ARM binaries. Note for reviewers: Don: general courgette correctness Ben: style, correctness BUG=258648 Review URL: https://chromiumcodereview.appspot.com/19022007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212449 0039d316-1c4b-4281-b951-d872f2087c98
* Add testing of disassembly and assembly to the stress testerpaulgazz@chromium.org2013-07-182-1/+34
| | | | | | | | | BUG=259153 TEST=run_stress_test data/x86-mario_3701.98.0/bin/ data/x86-mario_4206.0.0/bin/ st_bin_x86_test; analyze_stress_test st_bin_x86_test/log; Review URL: https://chromiumcodereview.appspot.com/19278002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212430 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of time headers in courgette/, crypto/, dbus/, device/, ↵avi@chromium.org2013-06-283-6/+6
| | | | | | | | | | | | google_apis/, gpu/, ipc/, jingle/. BUG=254986 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/18156002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209149 0039d316-1c4b-4281-b951-d872f2087c98
* Define a LoggingSettings struct to use for InitLogging()akalin@chromium.org2013-06-211-6/+4
| | | | | | | | | | | | | | | | | | Update all callers of InitLogging() to use LoggingSettings, only setting fields that need a non-default value. Turn LoggingDestination enum into a bit field and define add LOG_DEFAULT and LOG_ALL constants. Fix erroneous comment saying that the default was to not lock the log file. BUG=247594 TBR=brettw@chromium.org, cpu@chromium.org, gene@chromium.org, jam@chromium.org, rch@chromium.org, scherkus@chromium.org, sergeyu@chromium.org, sky@chromium.org, tkent@chromium.org, yfriedman@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/16519003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207920 0039d316-1c4b-4281-b951-d872f2087c98
* Differential updates for components. We are adding support for delivering ↵sorin@chromium.org2013-06-214-11/+59
| | | | | | | | | | | | delta updates for Chrome components. Initial platform support for the patcher is Windows only. The update response includes both the full update and, if available, the differential update. The differential update is tried first, then the full update, if needed. BUG=245318 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207805 Review URL: https://chromiumcodereview.appspot.com/15908002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207917 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 207805 "Differential updates for components. We are addin..."dmichael@chromium.org2013-06-214-59/+11
| | | | | | | | | | | | | | | | | | | Unit tests fail on Mac Dbg with this patch: http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac%2010.6%20Tests%20%28dbg%29%284%29&number=29470 and http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac%2010.7%20Tests%20%28dbg%29%284%29&number=12750 > Differential updates for components. We are adding support for delivering delta updates for Chrome components. Initial platform support for the patcher is Windows only. The update response includes both the full update and, if available, the differential update. The differential update is tried first, then the full update, if needed. > > BUG=245318 > > Review URL: https://chromiumcodereview.appspot.com/15908002 TBR=sorin@chromium.org Review URL: https://codereview.chromium.org/17551004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207823 0039d316-1c4b-4281-b951-d872f2087c98
* Differential updates for components. We are adding support for delivering ↵sorin@chromium.org2013-06-214-11/+59
| | | | | | | | | | delta updates for Chrome components. Initial platform support for the patcher is Windows only. The update response includes both the full update and, if available, the differential update. The differential update is tried first, then the full update, if needed. BUG=245318 Review URL: https://chromiumcodereview.appspot.com/15908002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207805 0039d316-1c4b-4281-b951-d872f2087c98
* Factored out common ELF processing into a common superclass, an x86 ↵paulgazz@chromium.org2013-06-2013-547/+811
| | | | | | | | | | | | | | | | | | | | | | | subclass, and an initial ARM subclass. Created a new disassembler virtual class, DisassemblerElf32, that implements the common functions for processing ELF 32-bit files. This class is defined in disassembler_elf_32.{h|cc}, and has nearly all of the methods and data that used to be in disassembler_elf_32_x86.{h|cc}. This class has two subclasses, one for x86 and one for arm, which implement the architecture-specific parts for generating courgette patches, namely extracting relative and absolute addresses. The ARM subclass is just a shell, but still yields correct courgette patches. The rest of the files add new enums for ARM and use the ARM subclasses for the courgette command-line tool. BUG= Review URL: https://chromiumcodereview.appspot.com/17325003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207388 0039d316-1c4b-4281-b951-d872f2087c98
* Created a script to measure the size of payloads made by courgette, bsdiff, ↵paulgazz@chromium.org2013-06-192-30/+98
| | | | | | | | | | | | and both. Also, the stress tester is updated to remove compressing the bsdiff patch, since the command-line bsdiff tool already compresses the patch. BUG=244607 Review URL: https://chromiumcodereview.appspot.com/15904022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207217 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a bug where courgette would fail if a relocation entry pointed to a ↵paulgazz@chromium.org2013-06-122-1/+24
| | | | | | | | | | | | section that isn't a progbits section, e.g., an init_array section This fix will check whether the relocation address is inside of an ELF section that isn't PROGBITS, and skip the relocation address if it is inside. BUG=246763 Review URL: https://chromiumcodereview.appspot.com/16658003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205872 0039d316-1c4b-4281-b951-d872f2087c98
* Rename base/hash_tables to base/containers/hash_tables.brettw@chromium.org2013-06-111-1/+1
| | | | | | | | | | | Remove forwarding header BUG= R=avi@chromium.org Review URL: https://codereview.chromium.org/16667019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205584 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in courgette/.avi@chromium.org2013-06-119-12/+12
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16739013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205524 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in chrome_frame/, ↵avi@chromium.org2013-06-072-2/+2
| | | | | | | | | | | | chromeos/, cloud_print/, components/, courgette/, device/, extensions/. BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16614002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204961 0039d316-1c4b-4281-b951-d872f2087c98
* Initial commit of the courgette stress tester scriptpaulgazz@chromium.org2013-06-041-0/+149
| | | | | | | | BUG=244603 Review URL: https://chromiumcodereview.appspot.com/15974013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203860 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded base/file_util.h includes in chrome_frame, ↵thestig@chromium.org2013-05-165-7/+3
| | | | | | | | courgette, ipc, media, and net. Review URL: https://chromiumcodereview.appspot.com/14820034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200419 0039d316-1c4b-4281-b951-d872f2087c98
* Make courgette_unittests depend on TCMalloc, like every other Linux binary ↵glider@chromium.org2013-05-151-0/+9
| | | | | | | | | | | at Chromium. BUG=240314,112389 TBR=tommi@chromium.org Review URL: https://codereview.chromium.org/14883013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200193 0039d316-1c4b-4281-b951-d872f2087c98
* Finish scoped_array<T> to scoped_ptr<T[]> conversion on Linux.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | There are only a few instances left in the Linux build, so lumping them all into one patch. BUG=171111 Review URL: https://codereview.chromium.org/13916003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193134 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-3/+3
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-3/+3
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-3/+3
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* ifdef OS_NAME -> if defined(OS_NAME)dbeam@chromium.org2013-03-232-2/+2
| | | | | | | | | | | | ifndef OS_NAME -> if !defined(OS_NAME) BUG=none TEST=no regressions Review URL: https://chromiumcodereview.appspot.com/12545059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190069 0039d316-1c4b-4281-b951-d872f2087c98
* [Cleanup] Remove StringPrintf from global namespacegroby@chromium.org2013-03-182-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | use of StringPrintf now requires prefixing with base:: or a per-scope using directive TBR'd: abodenha: chrome/service brettw: content, third_party, webkit darin: base, chrome/browser, chrome/renderer dgarret: courgette enne: cc fischmann: media gbillock: sql joi: google_apis,components rsleevi: net, crypto sky: chrome/test thestig: printing, chrome/common, tsepez: ipc wez: remoting yfriedman: testing/android NOTRY=true R=brettw@chromium.org TBR=joi@chromium.org, rsleevi@chromium.org, enne@chromium.org, thestig@chromium.org, darin@chromium.org, abodenha@chromium.org, sky@chromium.org, dgarret@chromium.org, tsepez@chromium.org, fishman@chromium.org, wez@chromium.org, gbillock@chromium.org, yfriedman@chromium.org BUG= Review URL: https://codereview.chromium.org/12767006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188857 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move MemoryMappedFile out of file_util.h and into its own header file.tfarina@chromium.org2013-02-241-3/+3
| | | | | | | | | | | BUG=175002 TEST=base_unittests R=brettw@chromium.org TBR=erikwright@chromium.org,tommi@chromium.org,fischman@chromium.org,ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/12321062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184356 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-243-5/+5
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Do a giant svn propset svn:eol-style LF on .cc and .h files thatjln@chromium.org2013-02-141-81/+81
| | | | | | | lack this property. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182368 0039d316-1c4b-4281-b951-d872f2087c98
* More FilePath -> base::FilePath replacement.brettw@chromium.org2013-02-106-39/+39
| | | | | | Review URL: https://codereview.chromium.org/12225112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181655 0039d316-1c4b-4281-b951-d872f2087c98
* Make courgette_unittests build on Win64 jschuh@chromium.org2013-02-101-0/+2
| | | | | | | | | | | | | Just c4267 build suppressions. BUG=166496 BUG=167187 TBR=sra@chromium.org R=sra@chromium.org Review URL: https://codereview.chromium.org/12207096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181636 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling nacl_win64 targets when building in target_arch!=ia32 mode.bradnelson@google.com2013-01-211-1/+1
| | | | | | | | | | | | | | | | When building on windows with target_arch=x64, we no longer need win32 targets forced to be 64-bit. This gates out these targets when target_arch!=ia32. (Prior CL dropped the minimal set to break the dependency between these targets and the rest of the build. This eliminates them completely.) BUG=None TEST=None R=jschuh@chromium.org,thestig@chromium.org TBR=darin@chromium.org,abodenha@chromium.org,apatrick@chromium.org,sra@chromium.org,wtc@chromium.org Review URL: https://chromiumcodereview.appspot.com/11929039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177959 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2012-07-262-4/+12
| | | | | | | | | | | | | CID_COUNT=7 CID=13432,14429,16922,101542,101734,102304,102305 BUG=none TEST=none R=tbreisacher TBR=jam@chromium.org,tommi@chromium.org,ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10830021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148592 0039d316-1c4b-4281-b951-d872f2087c98
* Add a clarifying comment to the memory layout navigation. (Inspired by ↵gbillock@chromium.org2012-07-251-1/+3
| | | | | | | | | | | | | Coverity CID 100022) R=tommi@chromium.org BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10826014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148412 0039d316-1c4b-4281-b951-d872f2087c98
* [Leak fixlet] Fix leak in courgette_unittestsgroby@chromium.org2012-06-011-1/+3
| | | | | | | | | | BUG=46649 TEST=none Review URL: https://chromiumcodereview.appspot.com/10453106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140077 0039d316-1c4b-4281-b951-d872f2087c98
* Set svn:executable on windows executables.maruel@chromium.org2012-04-274-0/+0
| | | | | | | | | | | | | Remove third_party/tlslite/installers/ TBR=thestig@chromium.org BUG= TEST= NOTRY=true Review URL: https://chromiumcodereview.appspot.com/10178018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134316 0039d316-1c4b-4281-b951-d872f2087c98
* Add owners to src/courgette so that we can lessen the need for a wildcard in ↵dpranke@chromium.org2012-03-131-0/+3
| | | | | | | | | | | src/OWNERS. R=dgarrett@chromium.org, tommi@chromium.org, sra@chromium.org BUG=117608 Review URL: https://chromiumcodereview.appspot.com/9691008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126289 0039d316-1c4b-4281-b951-d872f2087c98
* Use a different define to decide which CRC library to use.dgarrett@chromium.org2011-12-011-7/+19
| | | | | | | | | | | | | | | | | | | | | | | Change 8569018 used a #ifdef to conditionally decide which external library to use for Crc calculation. It used OS_CHROMIUMOS to tell if the build was targetted at Chromium OS. However, it broke Chromium OS builds of the full Chromium tree in some cases (heapcheck bots), and was reverted. Since I really only want to change the library when building from inside a custom ebuild in the Chromium OS build, it makes sense to use a #define custom to that ebuild. So, this change is the same as 8569018, except that is uses COURGETTE_USE_CRC_LIB instead of OS_CHROMIUMOS. BUG=8569018 Review URL: http://codereview.chromium.org/8763014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112565 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 112083 - Try a different library for Crc32.cbentzel@chromium.org2011-11-301-19/+7
| | | | | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8569018 TBR=dgarrett@chromium.org Review URL: http://codereview.chromium.org/8742002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112104 0039d316-1c4b-4281-b951-d872f2087c98
* Try a different library for Crc32.dgarrett@chromium.org2011-11-301-7/+19
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8569018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112083 0039d316-1c4b-4281-b951-d872f2087c98
* Add -supported command line option to describe if a given file is supporteddgarrett@chromium.org2011-11-212-9/+51
| | | | | | | | | | | | and what type of executable it is, if it is. BUG=None TEST=None Review URL: http://codereview.chromium.org/8558009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110993 0039d316-1c4b-4281-b951-d872f2087c98
* Switching all wstrings in courgette_tool to FilePaths.dgarrett@chromium.org2011-11-181-57/+35
| | | | | | | | | | | | | Presubmit checks now consider the presence of wstring to be an error, so switching all wstrings in courgette_tool to FilePath's as evanm had already called out in a TODO. BUG=chromiumos:22693 Review URL: http://codereview.chromium.org/8498032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110611 0039d316-1c4b-4281-b951-d872f2087c98
* Fix two pointer arithmetic errors.dgarrett@chromium.org2011-11-093-7/+7
| | | | | | | | | | | | | In the heuristic for detecting relative references, we had two non-fatal, but sub-optimal mistakes with pointer arithmetic. This fixes them for both ELF 32 and Win 32. BUG=chromiumos:22677 Review URL: http://codereview.chromium.org/8501023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109172 0039d316-1c4b-4281-b951-d872f2087c98
* Replace "bool ok" style with early returns.dgarrett@chromium.org2011-11-092-89/+72
| | | | | | | | | | | | | | | Stephen pointed out that he doesn't like the "bool ok" style and prefers the early return style during an earlier code review. I agree, but was using this style to match existing code. This CL switches a number of methods over to the early return style. BUG=None Review URL: http://codereview.chromium.org/8499034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109137 0039d316-1c4b-4281-b951-d872f2087c98
* Add Elf 32 Support to Courgette.dgarrett@chromium.org2011-11-0819-51/+1109
| | | | | | | | | | | | | | | | | | | | | | | | | This change takes advantage of recent refactoring and adds support for Elf X86 32 executables to courgette. It should have no effect on handling of Windows PE executables. We have planned ahead to be able to restrict the code size of the courgette library in different cases to reduce patcher sizes, but this change does not yet take advantage of that (all platforms are supported everywhere). Also, the patcher class currently contains a very small amount of Elf/PE specific code for recreating relocation tables that cannot (currently) be compiled out. BUG=chromium-os:22149 TEST=Please verify that Chrome/Chromium patches can still be generated and work. Also, please see how much the updater executable which is downloaded to users has changed in size since R16. Review URL: http://codereview.chromium.org/8477045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109089 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 108929 - Add Elf 32 Support to Courgette.csilv@chromium.org2011-11-0719-1111/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change takes advantage of recent refactoring and adds support for Elf X86 32 executables to courgette. It should have no effect on handling of Windows PE executables. We have planned ahead to be able to restrict the code size of the courgette library in different cases to reduce patcher sizes, but this change does not yet take advantage of that (all platforms are supported everywhere). Also, the patcher class currently contains a very small amount of Elf/PE specific code for recreating relocation tables that cannot (currently) be compiled out. BUG=chromium-os:22149 TEST=Please verify that Chrome/Chromium patches can still be generated and work. Also, please see how much the updater executable which is downloaded to users has changed in size since R16. Review URL: http://codereview.chromium.org/8428009 TBR=dgarrett@chromium.org Review URL: http://codereview.chromium.org/8490023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108934 0039d316-1c4b-4281-b951-d872f2087c98
* Add Elf 32 Support to Courgette.dgarrett@chromium.org2011-11-0719-51/+1111
| | | | | | | | | | | | | | | | | | | | | | | | | This change takes advantage of recent refactoring and adds support for Elf X86 32 executables to courgette. It should have no effect on handling of Windows PE executables. We have planned ahead to be able to restrict the code size of the courgette library in different cases to reduce patcher sizes, but this change does not yet take advantage of that (all platforms are supported everywhere). Also, the patcher class currently contains a very small amount of Elf/PE specific code for recreating relocation tables that cannot (currently) be compiled out. BUG=chromium-os:22149 TEST=Please verify that Chrome/Chromium patches can still be generated and work. Also, please see how much the updater executable which is downloaded to users has changed in size since R16. Review URL: http://codereview.chromium.org/8428009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108929 0039d316-1c4b-4281-b951-d872f2087c98
* Last small bit of refactoring.dgarrett@chromium.org2011-10-3110-38/+35
| | | | | | | | | | | | | | | | Move the Win32X86Generator and Patcher classes to non-windows specific names since they can be reused untouched for Elf. Move them from one file to files with matching names while at it. Store the transformation kind on the generator class so that it can be know if it's PE or Elf. Unified the TransformationId and ExecutableType enums into a single enum used everywhere (defined in courgette.h since it's now part of the external API). BUG=chromium-os:22149 TEST=Unittests Review URL: http://codereview.chromium.org/8417045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108019 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the Courgette ensemble unittest.dgarrett@chromium.org2011-10-261-1/+2
| | | | | | | | | | | | | This test is taking about 7 minutes to run on windows trybots and buildbots, so disabling (but not removing it) for the time being. BUG=None TEST=Ran Unitests Review URL: http://codereview.chromium.org/8393032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107288 0039d316-1c4b-4281-b951-d872f2087c98
* Further refactoring, move ImageInfo into Disassembler/DisassemblerWin32X86.dgarrett@chromium.org2011-10-2619-841/+838
| | | | | | | | | | | | | | | | This means that all PE specific knowledge is now contained in a single class which leaves us in pretty good shape for supporting ELF 32. There are still widespread assumptions about being 32 bit, but those can be addressed at a much later date. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/8166013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107260 0039d316-1c4b-4281-b951-d872f2087c98
* Start refactoring to reduce executable type knowledge.dgarrett@chromium.org2011-10-2120-522/+593
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates executable detection functions, a globally shared enum for describing an executable type, and reduces the number of classes and locations with executable specific knowledge. These changes, along with moving architecture specific classes into their own files should make it easier to produce special purpose clients that only contain the code required to apply their own form of patch. DisassemblerWin32EXE, ImagePE, CourgetteWin32X86PatchGenerator, and CourgetteWin32X86Patcher, and ensemble handling are all heavily affected here. This should have no effect on the behavior of the system yet, and is instead all prep-work. This is the same as an earlier CL, except that ParseHeader will now return an error for 64 bit PE executables, and resource only DLLs. This is because the detection factories depend on ParseHeader to decide if a given file is supported. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/7920004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103879 0039d316-1c4b-4281-b951-d872f2087c98 Review URL: http://codereview.chromium.org/8344037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106793 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unittest for ensemble diffing.dgarrett@chromium.org2011-10-194-0/+92
| | | | | | | | | | | | | | | The courgette refactoring broke the ability to handle ensembles with 64 bit PE files, or resource only DLLs. This unittest handles patching ensembles that contain these file types to confirm my fix, and ensure I don't introduce this regression again. BUG=None TEST=New Unittest Review URL: http://codereview.chromium.org/8330006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106223 0039d316-1c4b-4281-b951-d872f2087c98
* Add a basic backwards compatibility unittest.dgarrett@chromium.org2011-10-188-131/+126
| | | | | | | | | | | | | | | | | | | | This verifies we can still apply old patches, but does not verify that old clients can apply new patches. That seems important, but I'm not sure how to do it without storing old client binaries in version control. Also refactors a number of unit tests to allow code sharing for reading files into memory. This is done via a new base class. Uses test binaries submitted seperatly because of build tools problems. BUG=None TEST=New Unittest Review URL: http://codereview.chromium.org/8252011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105982 0039d316-1c4b-4281-b951-d872f2087c98
* Add another binary file needed by tests that will be submitted later.dgarrett@chromium.org2011-10-131-0/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105364 0039d316-1c4b-4281-b951-d872f2087c98