<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[917] branches/PR-8817822</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.macosforge.org/projects/darwinbuild/changeset/917">917</a></dd>
<dt>Author</dt> <dd>wsiegrist@apple.com</dd>
<dt>Date</dt> <dd>2011-02-04 14:37:04 -0800 (Fri, 04 Feb 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove support for unprebinding since prebinding does not happen anymore.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesPR8817822darwinbuildxcodeprojprojectpbxproj">branches/PR-8817822/darwinbuild.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchesPR8817822darwinupDigestcpp">branches/PR-8817822/darwinup/Digest.cpp</a></li>
<li><a href="#branchesPR8817822darwinupDigesth">branches/PR-8817822/darwinup/Digest.h</a></li>
<li><a href="#branchesPR8817822darwinupFilecpp">branches/PR-8817822/darwinup/File.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branchesPR8817822darwinupredo_prebindingh">branches/PR-8817822/darwinup/redo_prebinding.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesPR8817822darwinbuildxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/PR-8817822/darwinbuild.xcodeproj/project.pbxproj (916 => 917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/PR-8817822/darwinbuild.xcodeproj/project.pbxproj 2011-02-04 22:12:32 UTC (rev 916)
+++ branches/PR-8817822/darwinbuild.xcodeproj/project.pbxproj 2011-02-04 22:37:04 UTC (rev 917)
</span><span class="lines">@@ -37,17 +37,6 @@
</span><span class="cx"> name = darwinbuild_scripts;
</span><span class="cx"> productName = darwinbuild_scripts;
</span><span class="cx"> };
</span><del>- 7227AC7E1098EF6400BE33D7 /* libredo_prebinding.a */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = 7227AC841098EF8000BE33D7 /* Build configuration list for PBXAggregateTarget "libredo_prebinding.a" */;
- buildPhases = (
- 7227AC7D1098EF6400BE33D7 /* ShellScript */,
- );
- dependencies = (
- );
- name = libredo_prebinding.a;
- productName = libredo_prebinding.a;
- };
</del><span class="cx"> 725740981097B051008AD4D7 /* darwinxref_plugins */ = {
</span><span class="cx"> isa = PBXAggregateTarget;
</span><span class="cx"> buildConfigurationList = 725740A01097B08A008AD4D7 /* Build configuration list for PBXAggregateTarget "darwinxref_plugins" */;
</span><span class="lines">@@ -112,7 +101,6 @@
</span><span class="cx"> 7227AB67109899A600BE33D7 /* cfutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 72C86BE910965E7500C66E90 /* cfutils.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="cx"> 7227AB68109899A600BE33D7 /* DBPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 72C86BED10965E7500C66E90 /* DBPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="cx"> 7227AB7510989F8D00BE33D7 /* manifest.c in Sources */ = {isa = PBXBuildFile; fileRef = 72C86C2E1096600B00C66E90 /* manifest.c */; };
</span><del>- 7227ACA01098FCAA00BE33D7 /* libredo_prebinding.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72C86CDD10974C3A00C66E90 /* libredo_prebinding.a */; };
</del><span class="cx"> 7227AD1C109A05FA00BE33D7 /* buildlist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7227AB871098A7BF00BE33D7 /* buildlist */; };
</span><span class="cx"> 7227AD1D109A05FA00BE33D7 /* buildorder in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7227AB881098A7BF00BE33D7 /* buildorder */; };
</span><span class="cx"> 7227AD1E109A05FA00BE33D7 /* ditto in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7227AB891098A7BF00BE33D7 /* ditto */; };
</span><span class="lines">@@ -607,13 +595,6 @@
</span><span class="cx"> remoteGlobalIDString = 72D05CAD11D267C400B33EDD;
</span><span class="cx"> remoteInfo = query;
</span><span class="cx"> };
</span><del>- DFCB82D9109A2F9A00D2DB2F /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 726DD14910965C5700D5AEAB /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 7227AC7E1098EF6400BE33D7;
- remoteInfo = libredo_prebinding.a;
- };
</del><span class="cx"> /* End PBXContainerItemProxy section */
</span><span class="cx">
</span><span class="cx"> /* Begin PBXCopyFilesBuildPhase section */
</span><span class="lines">@@ -721,7 +702,6 @@
</span><span class="cx"> 72C86BE010965E4F00C66E90 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = File.cpp; path = darwinup/File.cpp; sourceTree = "<group>"; };
</span><span class="cx"> 72C86BE110965E4F00C66E90 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = File.h; path = darwinup/File.h; sourceTree = "<group>"; };
</span><span class="cx"> 72C86BE210965E4F00C66E90 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = darwinup/main.cpp; sourceTree = "<group>"; };
</span><del>- 72C86BE310965E4F00C66E90 /* redo_prebinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = redo_prebinding.h; path = darwinup/redo_prebinding.h; sourceTree = "<group>"; };
</del><span class="cx"> 72C86BE410965E4F00C66E90 /* SerialSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SerialSet.cpp; path = darwinup/SerialSet.cpp; sourceTree = "<group>"; };
</span><span class="cx"> 72C86BE510965E4F00C66E90 /* SerialSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SerialSet.h; path = darwinup/SerialSet.h; sourceTree = "<group>"; };
</span><span class="cx"> 72C86BE610965E4F00C66E90 /* Utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Utils.cpp; path = darwinup/Utils.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -779,7 +759,6 @@
</span><span class="cx"> 72C86C381096607900C66E90 /* darwinbuild */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = darwinbuild; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx"> 72C86C481096609500C66E90 /* darwinup */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = darwinup; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx"> 72C86C52109660CA00C66E90 /* darwintrace.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = darwintrace.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
</span><del>- 72C86CDD10974C3A00C66E90 /* libredo_prebinding.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libredo_prebinding.a; path = /usr/local/lib/libredo_prebinding.a; sourceTree = "<absolute>"; };
</del><span class="cx"> 72C86CE310974CC800C66E90 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = /usr/lib/libsqlite3.dylib; sourceTree = "<absolute>"; };
</span><span class="cx"> 72D05CA911D2678F00B33EDD /* query.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = query.c; sourceTree = "<group>"; };
</span><span class="cx"> 72D05CB711D267C400B33EDD /* query.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.objfile"; includeInIndex = 0; path = query.so; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="lines">@@ -985,7 +964,6 @@
</span><span class="cx"> buildActionMask = 2147483647;
</span><span class="cx"> files = (
</span><span class="cx"> 72C86CE410974CC800C66E90 /* libsqlite3.dylib in Frameworks */,
</span><del>- 7227ACA01098FCAA00BE33D7 /* libredo_prebinding.a in Frameworks */,
</del><span class="cx"> );
</span><span class="cx"> runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx"> };
</span><span class="lines">@@ -1014,7 +992,6 @@
</span><span class="cx"> 72C86BD610965DD000C66E90 /* darwinxref */,
</span><span class="cx"> 72C86BD510965DC900C66E90 /* darwinbuild */,
</span><span class="cx"> 72C86C391096607900C66E90 /* Products */,
</span><del>- 72C86CDD10974C3A00C66E90 /* libredo_prebinding.a */,
</del><span class="cx"> 72C86CE310974CC800C66E90 /* libsqlite3.dylib */,
</span><span class="cx"> 72574A0F10977F7A00B13BC3 /* CoreFoundation.framework */,
</span><span class="cx"> 72574A1410977FAD00B13BC3 /* libtcl.dylib */,
</span><span class="lines">@@ -1085,7 +1062,6 @@
</span><span class="cx"> 72C86BE010965E4F00C66E90 /* File.cpp */,
</span><span class="cx"> 72C86BE110965E4F00C66E90 /* File.h */,
</span><span class="cx"> 72C86BE210965E4F00C66E90 /* main.cpp */,
</span><del>- 72C86BE310965E4F00C66E90 /* redo_prebinding.h */,
</del><span class="cx"> 72C86BE410965E4F00C66E90 /* SerialSet.cpp */,
</span><span class="cx"> 72C86BE510965E4F00C66E90 /* SerialSet.h */,
</span><span class="cx"> 72C86BE610965E4F00C66E90 /* Utils.cpp */,
</span><span class="lines">@@ -1755,7 +1731,6 @@
</span><span class="cx"> buildRules = (
</span><span class="cx"> );
</span><span class="cx"> dependencies = (
</span><del>- DFCB82DA109A2F9A00D2DB2F /* PBXTargetDependency */,
</del><span class="cx"> );
</span><span class="cx"> name = darwinup;
</span><span class="cx"> productName = darwinup;
</span><span class="lines">@@ -1858,7 +1833,6 @@
</span><span class="cx"> 7227AC151098D8DB00BE33D7 /* thinPackages */,
</span><span class="cx"> 7227AC1E1098DB9200BE33D7 /* installXcode */,
</span><span class="cx"> 7227AC271098DBDF00BE33D7 /* installXcode32 */,
</span><del>- 7227AC7E1098EF6400BE33D7 /* libredo_prebinding.a */,
</del><span class="cx"> 720BE2EA120C90A700B3C4A5 /* digest */,
</span><span class="cx"> );
</span><span class="cx"> };
</span><span class="lines">@@ -2045,19 +2019,6 @@
</span><span class="cx"> shellPath = /bin/sh;
</span><span class="cx"> shellScript = "/bin/cp $DERIVED_FILE_DIR/installXcode32 $BUILT_PRODUCTS_DIR/installXcode32";
</span><span class="cx"> };
</span><del>- 7227AC7D1098EF6400BE33D7 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "set -x\nBUILD=10A432\nHOST=src.macosforge.org\n\n# make sure we only run when needed\nif [ -f /usr/local/lib/libredo_prebinding.a ]; then\n\texit 0;\nfi\n\n/usr/bin/curl -kL http://$HOST/Roots/$BUILD/cctools_ofiles.root.tar.gz > $CONFIGURATION_TEMP_DIR/cctools_ofiles.root.tar.gz\n\n/bin/mkdir -p $BUILT_PRODUCTS_DIR\n\n/usr/bin/tar zxOf $CONFIGURATION_TEMP_DIR/cctools_ofiles.root.tar.gz ./usr/local/lib/libredo_prebinding.a > $BUILT_PRODUCTS_DIR/libredo_prebinding.a\n\n/bin/mkdir -p $DSTROOT/$PREFIX/lib/\n\n/bin/cp $BUILT_PRODUCTS_DIR/libredo_prebinding.a $DSTROOT/$PREFIX/lib/\n";
- };
</del><span class="cx"> /* End PBXShellScriptBuildPhase section */
</span><span class="cx">
</span><span class="cx"> /* Begin PBXSourcesBuildPhase section */
</span><span class="lines">@@ -2620,11 +2581,6 @@
</span><span class="cx"> target = 72D05CAD11D267C400B33EDD /* query */;
</span><span class="cx"> targetProxy = 72D05CB911D2688D00B33EDD /* PBXContainerItemProxy */;
</span><span class="cx"> };
</span><del>- DFCB82DA109A2F9A00D2DB2F /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 7227AC7E1098EF6400BE33D7 /* libredo_prebinding.a */;
- targetProxy = DFCB82D9109A2F9A00D2DB2F /* PBXContainerItemProxy */;
- };
</del><span class="cx"> /* End PBXTargetDependency section */
</span><span class="cx">
</span><span class="cx"> /* Begin XCBuildConfiguration section */
</span><span class="lines">@@ -2865,27 +2821,6 @@
</span><span class="cx"> };
</span><span class="cx"> name = Release;
</span><span class="cx"> };
</span><del>- 7227AC7F1098EF6400BE33D7 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = libredo_prebinding.a;
- };
- name = Debug;
- };
- 7227AC801098EF6400BE33D7 /* Public */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = libredo_prebinding.a;
- };
- name = Public;
- };
- 7227AC811098EF6400BE33D7 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- PRODUCT_NAME = libredo_prebinding.a;
- };
- name = Release;
- };
</del><span class="cx"> 72573F7C1097A488008AD4D7 /* Debug */ = {
</span><span class="cx"> isa = XCBuildConfiguration;
</span><span class="cx"> baseConfigurationReference = 72574B3E10979D6000B13BC3 /* c_plugins.xcconfig */;
</span><span class="lines">@@ -3777,16 +3712,6 @@
</span><span class="cx"> defaultConfigurationIsVisible = 0;
</span><span class="cx"> defaultConfigurationName = Public;
</span><span class="cx"> };
</span><del>- 7227AC841098EF8000BE33D7 /* Build configuration list for PBXAggregateTarget "libredo_prebinding.a" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 7227AC7F1098EF6400BE33D7 /* Debug */,
- 7227AC801098EF6400BE33D7 /* Public */,
- 7227AC811098EF6400BE33D7 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Public;
- };
</del><span class="cx"> 72573F7B1097A488008AD4D7 /* Build configuration list for PBXNativeTarget "dependencies" */ = {
</span><span class="cx"> isa = XCConfigurationList;
</span><span class="cx"> buildConfigurations = (
</span></span></pre></div>
<a id="branchesPR8817822darwinupDigestcpp"></a>
<div class="modfile"><h4>Modified: branches/PR-8817822/darwinup/Digest.cpp (916 => 917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/PR-8817822/darwinup/Digest.cpp 2011-02-04 22:12:32 UTC (rev 916)
+++ branches/PR-8817822/darwinup/Digest.cpp 2011-02-04 22:37:04 UTC (rev 917)
</span><span class="lines">@@ -40,15 +40,6 @@
</span><span class="cx"> #include <string.h>
</span><span class="cx"> #include <unistd.h>
</span><span class="cx">
</span><del>-// For SHA1DigestMachO
-#include <mach/mach_init.h>
-#include <mach/vm_map.h>
-extern "C" {
-// <rdar://problem/4319807> redo_prebinding.h should use extern "C"
-//#include <mach-o/redo_prebinding.h> // from cctools_ofiles
-#include "redo_prebinding.h"
-}
-
</del><span class="cx"> uint8_t* Digest::data() { return m_data; }
</span><span class="cx"> uint32_t Digest::size() { return m_size; }
</span><span class="cx">
</span><span class="lines">@@ -123,45 +114,6 @@
</span><span class="cx"> CC_SHA1((const void*)data, (CC_LONG)size, md);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-SHA1DigestMachO::SHA1DigestMachO(const char* filename) {
- char* error = NULL;
-
- // Check for Mach-O
- int type = object_file_type(filename, NULL, &error);
- if (type == OFT_EXECUTABLE ||
- type == OFT_DYLIB ||
- type == OFT_BUNDLE) {
- // XXX - type == OFT_ARCHIVE?
- void* block = NULL;
- unsigned long blocklen = 0;
- int ret = unprebind(filename,
- NULL,
- NULL,
- &error,
- 1,
- NULL,
- 0,
- &block,
- &blocklen);
- if (ret == REDO_PREBINDING_SUCCESS && block != NULL) {
- digest(m_data, (uint8_t*)block, blocklen);
- } else {
- //fprintf(stderr, "%s:%d: unexpected unprebind result: %s: %s (%d)\n", __FILE__, __LINE__, filename, error, ret);
- int fd = open(filename, O_RDONLY);
- digest(m_data, fd);
- close(fd);
- }
- if (block != NULL) {
- kern_return_t ret = vm_deallocate(mach_task_self(), (vm_address_t)block, (vm_size_t)blocklen);
- assert(ret == 0);
- }
- } else {
- int fd = open(filename, O_RDONLY);
- digest(m_data, fd);
- close(fd);
- }
-}
-
</del><span class="cx"> SHA1DigestSymlink::SHA1DigestSymlink(const char* filename) {
</span><span class="cx"> char link[PATH_MAX];
</span><span class="cx"> int res = readlink(filename, link, PATH_MAX);
</span></span></pre></div>
<a id="branchesPR8817822darwinupDigesth"></a>
<div class="modfile"><h4>Modified: branches/PR-8817822/darwinup/Digest.h (916 => 917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/PR-8817822/darwinup/Digest.h 2011-02-04 22:12:32 UTC (rev 916)
+++ branches/PR-8817822/darwinup/Digest.h 2011-02-04 22:37:04 UTC (rev 917)
</span><span class="lines">@@ -111,18 +111,6 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> ////
</span><del>-// SHA1DigestMachO
-// Digests of canonicalized Mach-O file formats.
-////
-struct SHA1DigestMachO : SHA1Digest {
- // Computes the SHA-1 digest of the data in the file.
- // If the file is a Mach-O executable or dynamic library,
- // the SHA-1 digest is computed from its canonical
- // representation.
- SHA1DigestMachO(const char* filename);
-};
-
-////
</del><span class="cx"> // SHA1DigestSymlink
</span><span class="cx"> // Digests of the target of a symlink.
</span><span class="cx"> ////
</span></span></pre></div>
<a id="branchesPR8817822darwinupFilecpp"></a>
<div class="modfile"><h4>Modified: branches/PR-8817822/darwinup/File.cpp (916 => 917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/PR-8817822/darwinup/File.cpp 2011-02-04 22:12:32 UTC (rev 916)
+++ branches/PR-8817822/darwinup/File.cpp 2011-02-04 22:37:04 UTC (rev 917)
</span><span class="lines">@@ -266,14 +266,14 @@
</span><span class="cx"> : File(serial, archive, info, path, mode, uid, gid, size, digest) {}
</span><span class="cx">
</span><span class="cx"> Regular::Regular(Archive* archive, FTSENT* ent) : File(archive, ent) {
</span><del>- m_digest = new SHA1DigestMachO(ent->fts_accpath);
</del><ins>+ m_digest = new SHA1Digest(ent->fts_accpath);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Regular::Regular(uint64_t serial, Archive* archive, uint32_t info, const char* path,
</span><span class="cx"> mode_t mode, uid_t uid, gid_t gid, off_t size, Digest* digest)
</span><span class="cx"> : File(serial, archive, info, path, mode, uid, gid, size, digest) {
</span><span class="cx"> if (digest == NULL || serial == 0) {
</span><del>- m_digest = new SHA1DigestMachO(path);
</del><ins>+ m_digest = new SHA1Digest(path);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesPR8817822darwinupredo_prebindingh"></a>
<div class="delfile"><h4>Deleted: branches/PR-8817822/darwinup/redo_prebinding.h (916 => 917)</h4>
<pre class="diff"><span>
<span class="info">--- branches/PR-8817822/darwinup/redo_prebinding.h 2011-02-04 22:12:32 UTC (rev 916)
+++ branches/PR-8817822/darwinup/redo_prebinding.h 2011-02-04 22:37:04 UTC (rev 917)
</span><span class="lines">@@ -1,273 +0,0 @@
</span><del>-/*
- * Copyright (c) 2005-2010 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_BSD_LICENSE_HEADER_START@
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @APPLE_BSD_LICENSE_HEADER_END@
- */
-#define REDO_PREBINDING_VERSION 2
-#include <mach/machine.h>
-/*
- * For all APIs in this file the parameters program_name and error_message
- * are used the same. For unrecoverable resource errors like being unable to
- * allocate memory each API prints a message to stderr precede with program_name
- * then calls exit(2) with the value EXIT_FAILURE. If an API is unsuccessful
- * and if error_message pass to it is not NULL it is set to a malloc(3)'ed
- * buffer with a NULL terminated string with the error message. For all APIs
- * when they return they release all resources (memory, open file descriptors,
- * etc).
- *
- * The file_name parameter for these APIs may be of the form "foo(bar)" which is
- * NOT interpreted as an archive name and a member name in that archive. As
- * these API deal with prebinding and prebound binaries ready for execution
- * can't be in archives.
- *
- * If the executable_path parameter for these APIs is not NULL it is used for
- * any dependent library has a path that starts with "@executable_path". Then
- * "@executable_path" is replaced with executable_path.
- *
- * If the root_dir parameter is not NULL it is prepended to all the rooted
- * dependent library paths.
- */
-
-/*
- * dependent_libs() takes a file_name of a binary and returns a malloc(3)'ed
- * array of pointers (NULL terminated) to names (also malloc(3)'ed and '\0'
- * terminated names) of all the dependent libraries for that binary (not
- * recursive) for all of the architectures of that binary. If successful
- * dependent_libs() returns a non NULL value (at minimum a pointer to one NULL
- * pointer). If unsuccessful dependent_libs() returns NULL.
- */
-extern
-char **
-dependent_libs(
-const char *file_name,
-const char *program_name,
-char **error_message);
-
-/*
- * install_name() takes a file_name of a binary and returns a malloc(3)'ed
- * pointer to a NULL terminated string containing the install_name value for
- * the binary. If unsuccessful install_name() returns NULL. In particular,
- * NULL is returned if the binary is not a dylib and there is no error_message
- * set. If the all of the arch's are dylibs but all the install names don't
- * match NULL is returned and a error_message is set. If some but not all of
- * the archs are dylibs NULL is returned and a error_message is set.
- */
-extern
-char *
-install_name(
-const char *file_name,
-const char *program_name,
-char **error_message);
-
-/* return values for redo_prebinding() */
-enum redo_prebinding_retval {
- REDO_PREBINDING_SUCCESS,
- REDO_PREBINDING_FAILURE,
- /* the following can only be returned if the parameter only_if_needed set */
- REDO_PREBINDING_NOT_NEEDED,
- REDO_PREBINDING_NOT_PREBOUND,
- REDO_PREBINDING_NEEDS_REBUILDING
-};
-
-/*
- * redo_prebinding() takes a file_name of a binary and redoes the prebinding on
- * it. If output_file is not NULL the update file is written to output_file,
- * if not it is written to file_name. If redo_prebinding() is successful it
- * returns REDO_PREBINDING_SUCCESS otherwise it returns REDO_PREBINDING_FAILURE.
- * If the parameter allow_missing_architectures is zero and not all
- * architectures can be updated it is not successful and nothing is done and
- * this returns REDO_PREBINDING_FAILURE. If the parameter
- * allow_missing_architectures is non-zero then only problems with missing
- * architectures for the architecure of the cputype specified by
- * allow_missing_architectures will cause this call to fail. Other
- * architectures that could not be prebound due to missing architectures in
- * depending libraries will not have their prebinding updated but will not
- * cause this call to fail.
- * If the slide_to_address parameter is non-zero and the binary is a
- * dynamic library it is relocated to have that has its prefered address. If
- * only_if_needed is non-zero the prebinding is checked first and only done if
- * needed. The checking includes checking the prefered address against the
- * slide_to_address value if it is non-zero. If only_if_needed is non-zero
- * and the prebinding does not have to be redone REDO_PREBINDING_NOT_NEEDED is
- * returned, if the binary is not prebound REDO_PREBINDING_NOT_PREBOUND is
- * returned and if the new load commands do not fit in the binary and it needs
- * to be rebuilt REDO_PREBINDING_NEEDS_REBUILDING is returned.
- * If zero_out_prebind_checksum is non-zero then the cksum field of the
- * LC_PREBIND_CKSUM load command (if any) is set to zero on output (this should
- * always be set by B&I tools and never set by the update_prebinding(1)
- * command).
- * If throttle is non-NULL it points to a value of the maximum bytes per second
- * to use for writting the output. If the value is ULONG_MAX then the actual
- * bytes per second is returned indirectly through *throttle.
- */
-extern
-enum redo_prebinding_retval
-redo_prebinding(
-const char *file_name,
-const char *executable_path,
-const char *root_dir,
-const char *output_file,
-const char *program_name,
-char **error_message,
-unsigned long slide_to_address,
-int only_if_needed,
-int zero_out_prebind_checksum,
-cpu_type_t allow_missing_architectures,
-unsigned long *throttle);
-
-
-/* return values for needs_redo_prebinding() */
-enum needs_redo_prebinding_retval {
- PREBINDING_UPTODATE, /* a binary who's prebinding is up todate */
- PREBINDING_OUTOFDATE, /* a binary who's prebinding is out of date */
- NOT_PREBOUND, /* a binary, but not built prebound */
- NOT_PREBINDABLE, /* not a binary or statically linked,
- prebinding does not apply */
- PREBINDING_UNKNOWN /* a binary who's prebinding can't be determined
- because it is malformed, a library it depends
- on is missing, etc. */
-};
-
-/*
- * needs_redo_prebinding() takes a file_name and determines if it is a binary
- * and if its prebinding is uptodate. It returns one of the return values
- * above depending on the state of the binary and libraries. If the parameter
- * allow_missing_architectures is zero then the value returned is based on the
- * first architecture for fat files. If the parameter
- * allow_missing_architectures is non-zero then the value returned is based on
- * the cputype specified by allow_missing_architectures. If that architecture
- * is not present then PREBINDING_UPTODATE is returned. If the parameter
- * expected_address is not zero and the binary is a dynamic library then the
- * library is checked to see if it is at the expected_address if not the
- * prebinding is assumed to be out of date and PREBINDING_OUTOFDATE is returned.
- */
-extern
-enum needs_redo_prebinding_retval
-needs_redo_prebinding(
-const char *file_name,
-const char *executable_path,
-const char *root_dir,
-const char *program_name,
-char **error_message,
-unsigned long expected_address,
-cpu_type_t allow_missing_architectures);
-
-
-/*
- * unprebind() takes a file_name of a binary and resets or removes prebinding
- * information from it. If inbuf is non-NULL, the memory pointed to by inbuf is
- * used as the input file contents. Otherwise, the contents are loaded from
- * the file at path file_name. Even if inbuf is non-NULL, a file_name
- * parameter should be specified for error reporting. Similarly, if outbuf is
- * non-NULL, upon return, outbuf will point to a buffer containing the
- * unprebound binary and outlen will point to the length of the output buffer.
- * This buffer is vm_allocate'd and therefore should be vm_deallocate'd when it
- * is no longer needed. If outbuf is NULL, and output_file is not NULL the
- * update file is written to output_file, if outbuf is NULL and output_file is
- * NULL, it is written to file_name.
- * If unprebind() is successful it returns REDO_PREBINDING_SUCCESS otherwise it
- * returns REDO_PREBINDING_FAILURE If the binary is already unprebound (i.e. it
- * has the MH_PREBINDABLE flag set) then REDO_PREBINDING_NOT_NEEDED is returned.
- * If the binary is not prebound and not prebindable,
- * REDO_PREBINDING_NOT_PREBOUND is returned. If zero_checksum is non-zero then
- * the cksum field the LC_PREBIND_CKSUM load command (if any) is set to zero on
- * output, otherwise it is left alone.
- * Unprebinding slides dynamic libraries to address zero, resets prebound
- * symbols to address zero and type undefined, resets symbol pointers, removes
- * LC_PREBOUND_DYLIB commands, resets library timestamps, resets two-level hints
- * and updates relocation entries if necessary. Unprebound binaries have
- * the MH_PREBINDABLE flag set, but not MH_PREBOUND. It will also set the the
- * MH_ALLMODSBOUND flag if all two-level libraries were used and all modules
- * were found to be bound in the LC_PREBOUND_DYLIB commands.
- * As unprebinding is intended to produce a canonical Mach-O
- * binary, bundles and non-prebound executables and dylibs are acceptable
- * as input. For these files, the unprebind operation will zero library
- * time stamps and version numbers and zero entries in the two-level hints
- * table. These files will not gain the MH_PREBINDABLE flag.
- * All resulting binaries successfully processed by unprebind() will have
- * the MH_CANONICAL flag.
- */
-extern
-enum redo_prebinding_retval
-unprebind(
-const char *file_name,
-const char *output_file,
-const char *program_name,
-char **error_message,
-int zero_checksum,
-void *inbuf,
-unsigned long inlen,
-void **outbuf,
-unsigned long *outlen);
-
-enum object_file_type_retval {
- OFT_OTHER,
- OFT_EXECUTABLE,
- OFT_DYLIB,
- OFT_BUNDLE,
- OFT_ARCHIVE,
- OFT_INCONSISTENT,
- OFT_FILE_ERROR
-};
-
-/*
- * object_file_type() takes a file_name and determines what type of object
- * file it is. If it is a fat file and the architectures are not of the same
- * type then OFT_INCONSISTENT is returned. If the file_name can't be opened,
- * read or malformed then OFT_FILE_ERROR is returned.
- */
-extern
-enum object_file_type_retval
-object_file_type(
-const char *file_name,
-const char *program_name,
-char **error_message);
-
-struct prebind_cksum_arch {
- cpu_type_t cputype; /* cpu specifier */
- cpu_subtype_t cpusubtype; /* machine specifier */
- unsigned long has_cksum; /* 1 if the arch as an LC_PREBIND_CKSUM */
- unsigned long cksum; /* value of the cksum in LC_PREBIND_CKSUM */
-};
-
-/*
- * get_prebind_cksums() takes a file_name that is a Mach-O file or fat file
- * containing Mach-O files and returns a malloc(3)'ed array of
- * prebind_cksum_arch structs indirectly through the cksums parameter. The
- * number of prebind_cksum_arch structs is returned indirectly through the
- * ncksums parameter. If successful it returns zero else it returns non-zero.
- */
-extern
-int
-get_prebind_cksums(
-const char *file_name,
-struct prebind_cksum_arch **cksums,
-unsigned long *ncksums,
-const char *program_name,
-char **error_message);
</del></span></pre>
</div>
</div>
</body>
</html>