summaryrefslogtreecommitdiffstats
path: root/courgette/courgette.gyp
Commit message (Collapse)AuthorAgeFilesLines
* [Courgette] Refactor: Manage AssemblyProgram and EncodedProgram with scoped_ptr.huangs2016-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | Previously naked pointers AssemblyProgram and EncodedProgram are used over the place, and are deallocated using Delete{AssemblyProgram, EncodedProgram}(). In this CL we use scoped_ptr to manage the life cycles of these objects. - Removed DeleteAssemblyProgram() and DeleteEncodedProgram() and replaced calls with e.g., program.reset(nullptr); if the manual deallocation is a peak memory optimization. - Moved Encode() and ReadEncodedProgram() to the .h files matching the .cc files. - Extracted DetectExecutableType() and ParseDetectedExecutable() from disassembly.* to new files program_detector*c, since Disassembly is really an implementation that caller's don't care about. Committed: https://crrev.com/0a9cbf1781a114b35a4e0f4a834f2d24ade2e917 Cr-Commit-Position: refs/heads/master@{#372212} Review URL: https://codereview.chromium.org/1629703002 Cr-Commit-Position: refs/heads/master@{#372436}
* Revert of [Courgette] Refactor: Manage AssemblyProgram and EncodedProgram ↵dcheng2016-01-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with scoped_ptr. (patchset #5 id:80001 of https://codereview.chromium.org/1629703002/ ) Reason for revert: Breaks ninja build on Linux GN. Original issue's description: > [Courgette] Refactor: Manage AssemblyProgram and EncodedProgram with scoped_ptr. > > Previously naked pointers AssemblyProgram and EncodedProgram are used over the > place, and are deallocated using Delete{AssemblyProgram, EncodedProgram}(). > In this CL we use scoped_ptr to manage the life cycles of these objects. > > - Removed DeleteAssemblyProgram() and DeleteEncodedProgram() and replaced calls > with e.g., program.reset(nullptr); if the manual deallocation is a peak > memory optimization. > - Moved Encode() and ReadEncodedProgram() to the .h files matching the .cc files. > - Extracted DetectExecutableType() and ParseDetectedExecutable() from > disassembly.* to new files program_detector*c, since Disassembly is really an > implementation that caller's don't care about. > > Committed: https://crrev.com/0a9cbf1781a114b35a4e0f4a834f2d24ade2e917 > Cr-Commit-Position: refs/heads/master@{#372212} TBR=wfh@chromium.org,grt@chromium.org,huangs@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1650013002 Cr-Commit-Position: refs/heads/master@{#372274}
* [Courgette] Refactor: Manage AssemblyProgram and EncodedProgram with scoped_ptr.huangs2016-01-291-0/+2
| | | | | | | | | | | | | | | | | | Previously naked pointers AssemblyProgram and EncodedProgram are used over the place, and are deallocated using Delete{AssemblyProgram, EncodedProgram}(). In this CL we use scoped_ptr to manage the life cycles of these objects. - Removed DeleteAssemblyProgram() and DeleteEncodedProgram() and replaced calls with e.g., program.reset(nullptr); if the manual deallocation is a peak memory optimization. - Moved Encode() and ReadEncodedProgram() to the .h files matching the .cc files. - Extracted DetectExecutableType() and ParseDetectedExecutable() from disassembly.* to new files program_detector*c, since Disassembly is really an implementation that caller's don't care about. Review URL: https://codereview.chromium.org/1629703002 Cr-Commit-Position: refs/heads/master@{#372212}
* allocator cleanup: remove dependencies on allocator from all targetsprimiano2016-01-281-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overview of the cleanup: ------------------------ - In the context of the discussion in https://goo.gl/K2m649 our illustrious base/ owners suggested that having base being the only target depending on allocator (and having the other targets inherit that recursively) would be a more scalable solution, as opposite to having to remember to add an exec -> allocator to each target. - This base -> allocator dep landed in crrev.com/1616793003. - After that CL, until this point, many targets got two paths that lead to allocator: 1. The indirect one via base (content_shell -> base -> allocator) which is what we want to preserve. 2. The direct one (content_shell -> allocator) which is the inconsistent one we want to drop. This CL gets rid of all the instances of 2. The nice property of this sequencing of CLs is that the effect of this large change on the final .ninja files is minimal. See details below. Effect on the produced ninja files: ----------------------------------- GYP, Linux, static build: https://paste.ee/p/RaJLj Just some small reordering of include paths. Dropping --rdynamic (as expected) in keyboard_unittests GN, Linux, static build: https://paste.ee/p/zYtrQ Various targets lose the dependency on allocator.stamp (expected, the order is enforced by depending on base which depends on allocator.stamp) GN, Android (both component and static are similar): https://paste.ee/p/Iq6DD As above. GN, Linux, component build: https://paste.ee/p/jHUmv This is the most juicy change. As expected all the ODR goes away and random targets stop re-linking tcmalloc .o files. GYP, Win, static: https://paste.ee/p/j0IjL Extremely minimal changes: All.ninja stops depending on libcmt.lib. Sounds fine as base (which depends on that) is definitely depending on libcmt. GN, Win, static: https://paste.ee/p/Q6zTo Minimal change, like Linux GN, dropping dependencies on the .stamp files. BUG=564618 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1647453002 Cr-Commit-Position: refs/heads/master@{#372167}
* [Courgette] Initial Implementation of LabelManagerhuangs2015-12-081-0/+5
| | | | | | | | | | | | This is part of the effort to reduce Courgette's peak memory. Main changes: - Moving Label to image_utils.h, and change Label::count_ from int to int32. - Adding utility class ConsecutiveRangeVisitor, with tests. - Adding LabelManager, with tests. The new code is not yet used in production. Review URL: https://codereview.chromium.org/1491703003 Cr-Commit-Position: refs/heads/master@{#363688}
* [Courgette] Refactor: Adding Rel32FinderWin32X86_Basic and Unittestshuangs2015-09-181-0/+5
| | | | | | | | | | | | | | | | We're planning to improve heuristic to find Rel32 addresses for Win32 x86. First refactor by by extraacting the feature into its own class. This also lead to the extraction of RVA and various helpers from disassembler.h to image_utils.h. Also adding unittests for Rel32FinderWin32X86_Basic. The test is data-driven by adding a simple parser for test data. BUG= Review URL: https://codereview.chromium.org/1344173003 Cr-Commit-Position: refs/heads/master@{#349727}
* Revert of [Courgette] Adding CourgetteConfig singleton and --experimental ↵huangs2015-09-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flag. (patchset #5 id:80001 of https://chromiumcodereview.appspot.com/1306193004/ ) Reason for revert: The original CL assumes Courgette had to deal with forward/backward compatibility issues. Turns out that (as seen in http://crbug.com/459505): - Courgette executable is shipped with new releases. - This allows Courgette workflow to proceed without being tied down to legacy. These new (to huangs@) facts render the original CL redundant. Original issue's description: > [Courgette] Adding CourgetteConfig singleton and --experimental flag. > > This prepare for upcoming experiments to reduce patch size. We want to > avoid disrupting existing functionality. > > Committed: https://crrev.com/fc0511d9067759336f42d04e918e8a3ce0b84376 > Cr-Commit-Position: refs/heads/master@{#346746} TBR=wfh@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1323263007 Cr-Commit-Position: refs/heads/master@{#347746}
* [Courgette] Adding CourgetteConfig singleton and --experimental flag.huangs2015-09-011-0/+2
| | | | | | | | | This prepare for upcoming experiments to reduce patch size. We want to avoid disrupting existing functionality. Review URL: https://codereview.chromium.org/1306193004 Cr-Commit-Position: refs/heads/master@{#346746}
* [Courgette] Extract qsufsort module and add tests.huangs2015-08-111-5/+7
| | | | | | | | | This is to prepare for a follow-up CL to optimize qsufsort(), which reduces run time by ~40%, and "courgette -gen" run time by ~10%. Review URL: https://codereview.chromium.org/1272453003 Cr-Commit-Position: refs/heads/master@{#342883}
* [Courgette] Fix NoThrowBuffer::end() off-by-1; add unittests.huangs2015-07-201-0/+1
| | | | | | | | | | | | | | | | | | | NoThrowBuffer::end() should be an exclusive upperbound, but the old implementation was inclusive. The impact is that std::sort() statements in - EncodedProgram::GeneratePeRelocations() - EncodedProgram::GenerateElfRelocations() will not sort the last element, leading to slight change in results. Also found potential use-after-free in NoThrowBuffer::reserve(), but using DCHECK() to block offending case Added basic unit tests for NoThrowBuffer. TEST=courgette_unittests --gtest_filter=MemoryAllocatorTest.NoThrowBuffer Review URL: https://codereview.chromium.org/1242263003 Cr-Commit-Position: refs/heads/master@{#339529}
* Isolate courgette_unittestsscottmg2015-01-221-0/+17
| | | | | | | | | | | | | | | Adding link to http://www.chromium.org/developers/testing/isolated-testing/for-swes for my future self. R=maruel@chromium.org,jochen@chromium.org TBR=jam@chromium.org BUG=98637, 450912 Committed: https://crrev.com/c9bd3b9a5667a36c05592ec9d16533be91b4567c Cr-Commit-Position: refs/heads/master@{#312531} Review URL: https://codereview.chromium.org/868433002 Cr-Commit-Position: refs/heads/master@{#312665}
* Revert of Revert of Revert of Isolate courgette_unittests (patchset #1 id:1 ↵kochi2015-01-221-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/867523002/) Reason for revert: Sorry for the mess - in the end, the original CL was causing the courgette_unittests failure. Reverting the original again. BUG=450912 Original issue's description: > Revert of Revert of Isolate courgette_unittests (patchset #1 id:1 of https://codereview.chromium.org/865133002/) > > Reason for revert: > The revert might have been wrong: reverting the revert again. > BUG=450912 > > Original issue's description: > > Revert of Isolate courgette_unittests (patchset #1 id:1 of https://codereview.chromium.org/868433002/) > > > > Reason for revert: > > http://crbug.com/450912 > > > > courget_unittests is failing on Win7(dbg) bots since build#34639. > > http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/34639 > > > > Original issue's description: > > > Isolate courgette_unittests > > > > > > Adding link to http://www.chromium.org/developers/testing/isolated-testing/for-swes for my future self. > > > > > > R=maruel@chromium.org,jochen@chromium.org > > > TBR=jam@chromium.org > > > BUG=98637 > > > > > > Committed: https://crrev.com/c9bd3b9a5667a36c05592ec9d16533be91b4567c > > > Cr-Commit-Position: refs/heads/master@{#312531} > > > > TBR=jam@chromium.org,jochen@chromium.org,maruel@chromium.org,scottmg@chromium.org > > NOPRESUBMIT=true > > NOTREECHECKS=true > > NOTRY=true > > BUG=98637 > > > > Committed: https://crrev.com/1bdeeeb5eae42e95f82806da9351d77a05403e67 > > Cr-Commit-Position: refs/heads/master@{#312571} > > TBR=jam@chromium.org,jochen@chromium.org,maruel@chromium.org,scottmg@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=98637 > > Committed: https://crrev.com/217c53ca8128370c64a5d1a4ba15cb4cea5564ac > Cr-Commit-Position: refs/heads/master@{#312577} TBR=jam@chromium.org,jochen@chromium.org,maruel@chromium.org,scottmg@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=450912 Review URL: https://codereview.chromium.org/800333003 Cr-Commit-Position: refs/heads/master@{#312584}
* Revert of Revert of Isolate courgette_unittests (patchset #1 id:1 of ↵kochi2015-01-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/865133002/) Reason for revert: The revert might have been wrong: reverting the revert again. BUG=450912 Original issue's description: > Revert of Isolate courgette_unittests (patchset #1 id:1 of https://codereview.chromium.org/868433002/) > > Reason for revert: > http://crbug.com/450912 > > courget_unittests is failing on Win7(dbg) bots since build#34639. > http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/34639 > > Original issue's description: > > Isolate courgette_unittests > > > > Adding link to http://www.chromium.org/developers/testing/isolated-testing/for-swes for my future self. > > > > R=maruel@chromium.org,jochen@chromium.org > > TBR=jam@chromium.org > > BUG=98637 > > > > Committed: https://crrev.com/c9bd3b9a5667a36c05592ec9d16533be91b4567c > > Cr-Commit-Position: refs/heads/master@{#312531} > > TBR=jam@chromium.org,jochen@chromium.org,maruel@chromium.org,scottmg@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=98637 > > Committed: https://crrev.com/1bdeeeb5eae42e95f82806da9351d77a05403e67 > Cr-Commit-Position: refs/heads/master@{#312571} TBR=jam@chromium.org,jochen@chromium.org,maruel@chromium.org,scottmg@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=98637 Review URL: https://codereview.chromium.org/867523002 Cr-Commit-Position: refs/heads/master@{#312577}
* Revert of Isolate courgette_unittests (patchset #1 id:1 of ↵kochi2015-01-221-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/868433002/) Reason for revert: http://crbug.com/450912 courget_unittests is failing on Win7(dbg) bots since build#34639. http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/34639 Original issue's description: > Isolate courgette_unittests > > Adding link to http://www.chromium.org/developers/testing/isolated-testing/for-swes for my future self. > > R=maruel@chromium.org,jochen@chromium.org > TBR=jam@chromium.org > BUG=98637 > > Committed: https://crrev.com/c9bd3b9a5667a36c05592ec9d16533be91b4567c > Cr-Commit-Position: refs/heads/master@{#312531} TBR=jam@chromium.org,jochen@chromium.org,maruel@chromium.org,scottmg@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=98637 Review URL: https://codereview.chromium.org/865133002 Cr-Commit-Position: refs/heads/master@{#312571}
* Isolate courgette_unittestsscottmg2015-01-221-0/+17
| | | | | | | | | | | | Adding link to http://www.chromium.org/developers/testing/isolated-testing/for-swes for my future self. R=maruel@chromium.org,jochen@chromium.org TBR=jam@chromium.org BUG=98637 Review URL: https://codereview.chromium.org/868433002 Cr-Commit-Position: refs/heads/master@{#312531}
* Remove {linux|android}_use_tcmalloc and switch to use_allocator in Chromium.dmikurube@chromium.org2014-05-071-2/+1
| | | | | | | | | | | | | | If this change breaks some bots, please try restarting the bot before reverting it. http://crrev.com/264460 may not be effective yet until restarting. See the bug and http://crrev.com/255129 for the details. BUG=345554 Review URL: https://codereview.chromium.org/258433005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268876 0039d316-1c4b-4281-b951-d872f2087c98
* Remove all uses of toolkit_use_gtk in the gyp files.erg@chromium.org2014-04-171-20/+0
| | | | | | | | | BUG=297026 R=ben@chromium.org, brettw@chromium.org Review URL: https://codereview.chromium.org/238633004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264609 0039d316-1c4b-4281-b951-d872f2087c98
* Add use_allocator instead of linux_use_tcmalloc to switch the allocator.dmikurube@chromium.org2014-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is to add a new build option 'use_allocator' which will replace 'linux_use_tcmalloc' in the future. It doesn't change the behavior immediately. The migration plan is as follows: 1) (this change) ... Add 'use_allocator' and set its default to "see_use_tcmalloc". ... Change allocator conditions to check use_allocator firstly. ... Use linux_use_tcmalloc if use_allocator=="see_use_tcmalloc". ... NO IMPACT without specifying use_allocator explicitly. 2) Change Blink to accept use_allocator. http://crrev.com/177053003/ 3) Change gyp to accept use_allocator. http://crrev.com/178643004/ 4) PSA the transition period to chromium-dev@. 5) (after the PSA-ed transition period) ... Make 'use_allocator' to "tcmalloc" or "none" (it depends) by default. ... Remove all linux_use_tcmalloc. ... Assert in gyp_chromium to check if linux_use_tcmalloc is not specified. At the point of this change (1), linux_use_tcmalloc is still used by default because 'use_allocator%': "see_use_tcmalloc". As written in http://crbug.com/345554, linux_use_tcmalloc would be confusing to have more options about allocators. We plan to: A) enable gperftools' heap-profiler with non-tcmalloc allocator, B) add a new memory allocator instead of tcmalloc. BUG=345554, 339604, 341349 R=agl@chromium.org, brettw@chromium.org, dgarrett@chromium.org, jam@chromium.org, jamesr@chromium.org, joi@chromium.org, miket@chromium.org, nick@chromium.org, rsleevi@chromium.org, scherkus@chromium.org, sergeyu@chromium.org, shess@chromium.org, sievers@chromium.org, sky@chromium.org, vitalybuka@chromium.org, willchan@chromium.org Review URL: https://codereview.chromium.org/177353002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255129 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Win64 build of base library even in a Win32 build.petewil@chromium.org2014-01-091-2/+2
| | | | | | | | | | | | | | | Some components of a 32 bit build of chrome for Windows need to be built as Win64 Dlls. To allow those components to use base, we make a Win64 build of the base library even when building chrome 32 bit. This is needed by the Chrome Desk Band code. crbug.com/327435. https://codereview.chromium.org/79173004/ BUG=327435 Review URL: https://codereview.chromium.org/103333004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243936 0039d316-1c4b-4281-b951-d872f2087c98
* Add PE64 support to courgettewfh@chromium.org2013-09-251-0/+3
| | | | | | | | | | | Add tests for PE64 BUG=38784 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/23600063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225224 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 224789 "Add PE64 support to courgette"piman@chromium.org2013-09-231-3/+0
| | | | | | | | | | | | | | | | | | Caused failures: http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/23037/steps/courgette_unittests/logs/stdio > Add PE64 support to courgette > > Add tests for PE64 > > BUG=38784 > > Review URL: https://chromiumcodereview.appspot.com/23600063 TBR=wfh@chromium.org Review URL: https://codereview.chromium.org/23591065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224806 0039d316-1c4b-4281-b951-d872f2087c98
* Add PE64 support to courgettewfh@chromium.org2013-09-231-0/+3
| | | | | | | | | | Add tests for PE64 BUG=38784 Review URL: https://chromiumcodereview.appspot.com/23600063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224789 0039d316-1c4b-4281-b951-d872f2087c98
* Convert most run_all_unittests.cc files to use new unit test launcher.phajdan.jr@chromium.org2013-09-051-1/+1
| | | | | | | | | | | | | Note that the new code is still behind a runtime flag (--brave-new-test-launcher), but compiling tests with support for it will make further testing possible. BUG=236893, 79359 R=akalin@chromium.org, enne@chromium.org, erikwright@chromium.org, joi@chromium.org, keybuk@chromium.org, sky@chromium.org, thestig@chromium.org, tommi@chromium.org, wtc@chromium.org, xhwang@chromium.org, yzshen@chromium.org Review URL: https://codereview.chromium.org/23442019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221464 0039d316-1c4b-4281-b951-d872f2087c98
* Copy courgette.exe to courgette64.exejschuh@chromium.org2013-08-161-0/+27
| | | | | | | | | | | Bot angry file not named way bot want. R=tommi@chromium.org,laforge@chromium.org BUG=273246 Review URL: https://chromiumcodereview.appspot.com/23050007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218108 0039d316-1c4b-4281-b951-d872f2087c98
* Added a TypedRVA to track what kind of branch instruction is used forpaulgazz@chromium.org2013-07-231-0/+1
| | | | | | | | | | | | the jump and compute the target RVA accordingly. Also updated the unit test to use TypedRVA and check that only X86 RVAs are found by the X86 "disassembler". BUG=258645 Review URL: https://chromiumcodereview.appspot.com/18055007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213220 0039d316-1c4b-4281-b951-d872f2087c98
* Factored out common ELF processing into a common superclass, an x86 ↵paulgazz@chromium.org2013-06-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* 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
* Add Elf 32 Support to Courgette.dgarrett@chromium.org2011-11-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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-071-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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-311-2/+2
| | | | | | | | | | | | | | | | 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
* Further refactoring, move ImageInfo into Disassembler/DisassemblerWin32X86.dgarrett@chromium.org2011-10-261-3/+1
| | | | | | | | | | | | | | | | 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-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-191-0/+1
| | | | | | | | | | | | | | | 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-181-1/+6
| | | | | | | | | | | | | | | | | | | | 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
* Revert 103879 - Start refactoring to reduce executable type knowledge.laforge@chromium.org2011-10-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/7920004 TBR=dgarrett@chromium.org Review URL: http://codereview.chromium.org/8234012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104926 0039d316-1c4b-4281-b951-d872f2087c98
* Start refactoring to reduce executable type knowledge.dgarrett@chromium.org2011-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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. 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
* Revert 102428 - Add a backwards compatibility unittest.dgarrett@chromium.org2011-09-231-2/+1
| | | | | | | | | | | | | | | This is a resubmit of CL 7915007. BUG=None TEST=New Unittest Review URL: http://codereview.chromium.org/7976035 TBR=dgarrett@chromium.org Review URL: http://codereview.chromium.org/7972027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102434 0039d316-1c4b-4281-b951-d872f2087c98
* Add a backwards compatibility unittest.dgarrett@chromium.org2011-09-231-1/+2
| | | | | | | | | | | | This is a resubmit of CL 7915007. BUG=None TEST=New Unittest Review URL: http://codereview.chromium.org/7976035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102428 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 101606 - Add a basic backwards compatibility unittest.rlp@chromium.org2011-09-171-2/+1
| | | | | | | | | | | | | | | | | | 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. BUG=None TEST=New Unittest Review URL: http://codereview.chromium.org/7915007 TBR=dgarrett@chromium.org Review URL: http://codereview.chromium.org/7930003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101617 0039d316-1c4b-4281-b951-d872f2087c98
* Add a basic backwards compatibility unittest.dgarrett@chromium.org2011-09-171-1/+2
| | | | | | | | | | | | | | | 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. BUG=None TEST=New Unittest Review URL: http://codereview.chromium.org/7915007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101606 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the comments setting emands and vim tab width and expansion variables.tony@chromium.org2011-07-111-6/+0
| | | | | | | | | | | | | | | | | These were added in r28089 (http://codereview.chromium.org/256059) but are unnecessary bloat for everyone to carry around, even those that don't use emacs or vim. In an earlier change, I added editor config files in src/tools/emacs/ and src/tools/vim/ so users of the appropriate editor can source those instead. BUG=none TEST=none Review URL: http://codereview.chromium.org/7310019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92046 0039d316-1c4b-4281-b951-d872f2087c98
* Remove msvs_guid from chrome_frame/, cloud_print/, content/tony@chromium.org2011-06-221-5/+0
| | | | | | | | | | courgette/, and google_update/. BUG=28727 Review URL: http://codereview.chromium.org/7191021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90119 0039d316-1c4b-4281-b951-d872f2087c98
* Final gyp patch to make use of the new cross-platform POSIX defines ↵tony@chromium.org2011-05-231-2/+2
| | | | | | | | toolkit_uses_gtk, os_posix, and use_x11. For lists of source files that use a mix of POSIX and Gtk APIs, toolkit_uses_gtk was given precedence. Solaris was made to use ALSA also, as libasound has been ported to FreeBSD and Solaris as a wrapper around the native OSS. Review URL: http://codereview.chromium.org/7055003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86352 0039d316-1c4b-4281-b951-d872f2087c98
* Globally replace <(library) with static_libraryevan@chromium.org2011-05-191-2/+2
| | | | | | | | | | | We provided <(library) as a variable to support a peculiar build configuration on Linux. We no longer support that build configuration, so we can simplify this code to no longer use a variable. Review URL: http://codereview.chromium.org/7051014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86004 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of an STL compatible allocator for Courgette on Windows.tommi@chromium.org2011-03-011-0/+2
| | | | | | | | | | | | | | | | | This is to better handle low memory situations when applying a differential patch to a large Chrome setup. For reading input files, I'm also switching to using memory mapped files instead of ReadFileToString to reduce the load on the heap. TEST=courgette.exe should succeed in applying a patch between two chrome 10.x archives on an XP machine with 180MB of physical memory and no page file. BUG=72459,73209 Review URL: http://codereview.chromium.org/6597038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76320 0039d316-1c4b-4281-b951-d872f2087c98
* Make the 32bit courgette.exe tool large-adddress-aware so that it can create ↵tommi@chromium.org2011-02-231-0/+5
| | | | | | | | | | | patches. (The courgette64 tool doesn't build in all configurations) Review URL: http://codereview.chromium.org/6565008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75763 0039d316-1c4b-4281-b951-d872f2087c98
* Also build a 64-bit exe version of the 32-bit courgettebradnelson@google.com2010-12-211-37/+78
| | | | | | | | | | | | utility + library to support larger input sizes. BUG=63793 TEST=None Review URL: http://codereview.chromium.org/5096007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69779 0039d316-1c4b-4281-b951-d872f2087c98