summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2013-09-02 22:55:37 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2013-09-02 22:55:37 -0700
commite58574abf6529058ed277b13c8af3bff3c126186 (patch)
tree1ed237d17ec1650ff98a21c630488cdc02b5d047
parent9b4ef9a50c9de548ddb65bdc8d157d4b8155b9e7 (diff)
downloadldid-1.1.0.tar.gz
ldid-1.1.0.tar.zst
ldid-1.1.0.zip
Add special cases to support old codesign_allocate.v1.1.0
-rw-r--r--ldid.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/ldid.cpp b/ldid.cpp
index f561fa6..20fbd64 100644
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -946,13 +946,37 @@ int main(int argc, const char *argv[]) {
args.push_back(path);
_foreach (allocation, allocations) {
- args.push_back("-A");
+ if (allocation.type_ == 12 && (
+ allocation.subtype_ == 0 ||
+ allocation.subtype_ == 6 ||
+ false)) {
+ // Telesphoreo codesign_allocate
+ args.push_back("-a");
+
+ const char *arch;
+ switch (allocation.subtype_) {
+ case 0:
+ arch = "arm";
+ break;
+ case 6:
+ arch = "armv6";
+ break;
+ default:
+ arch = NULL;
+ break;
+ }
- asprintf(&arg, "%u", allocation.type_);
- args.push_back(arg);
+ _assert(arch != NULL);
+ args.push_back(arch);
+ } else {
+ args.push_back("-A");
- asprintf(&arg, "%u", allocation.subtype_);
- args.push_back(arg);
+ asprintf(&arg, "%u", allocation.type_);
+ args.push_back(arg);
+
+ asprintf(&arg, "%u", allocation.subtype_);
+ args.push_back(arg);
+ }
size_t alloc(0);
alloc += sizeof(struct SuperBlob);