summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-03-08 11:53:51 +0000
committerJay Freeman <saurik@saurik.com>2008-03-08 11:53:51 +0000
commitc2bea5000a0d07d1f4b5c5dcf6560b3bd24fae03 (patch)
tree3924a6539de282a7a0e9f0e85ad383f00e447f96 /data
parentc6320f629d8d1c9f617f3f77748980cb255ab1fb (diff)
Added the most recent patches to odcctools.
git-svn-id: http://svn.telesphoreo.org/trunk@165 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data')
-rw-r--r--data/odcctools/_metadata/name1
-rw-r--r--data/odcctools/adrbxj.diff10
-rw-r--r--data/odcctools/armv6.diff32
-rw-r--r--data/odcctools/imm12.diff46
4 files changed, 84 insertions, 5 deletions
diff --git a/data/odcctools/_metadata/name b/data/odcctools/_metadata/name
new file mode 100644
index 000000000..734ef1174
--- /dev/null
+++ b/data/odcctools/_metadata/name
@@ -0,0 +1 @@
+Darwin CC Tools
diff --git a/data/odcctools/adrbxj.diff b/data/odcctools/adrbxj.diff
index 4e82a3d19..7840a1fe7 100644
--- a/data/odcctools/adrbxj.diff
+++ b/data/odcctools/adrbxj.diff
@@ -1,8 +1,8 @@
diff -ru odcctools/as/arm.c odcctools+iPhone/as/arm.c
--- odcctools/as/arm.c 2007-09-13 02:31:45.000000000 +0000
+++ odcctools+iPhone/as/arm.c 2007-12-29 08:49:20.000000000 +0000
-@@ -648,6 +648,18 @@
- fill_reloc_value(buf, (unsigned int)n, 0x00000fff);
+@@ -655,6 +666,18 @@
+ fill_reloc_value(buf, n << 7, 31 << 7);
break;
+ case ARM_RELOC_ADR:
@@ -17,9 +17,9 @@ diff -ru odcctools/as/arm.c odcctools+iPhone/as/arm.c
+ fill_reloc_value(buf, (unsigned int)n, 0x00c00fff);
+ break;
+
- case ARM_RELOC_SHIFT_IMM:
- if (val == 32)
- val = 0;
+ default:
+ fprintf(stderr, "reloc type %d\n", fixP->fx_r_type);
+ as_fatal("md_number_to_imm: reloc unimplemented");
diff -ru odcctools/as/armop.c odcctools+iPhone/as/armop.c
--- odcctools/as/armop.c 2007-10-16 20:20:35.000000000 +0000
+++ odcctools+iPhone/as/armop.c 2007-12-29 08:49:59.000000000 +0000
diff --git a/data/odcctools/armv6.diff b/data/odcctools/armv6.diff
new file mode 100644
index 000000000..ab0ed8a4f
--- /dev/null
+++ b/data/odcctools/armv6.diff
@@ -0,0 +1,32 @@
+diff -ru odcctools/include/mach/machine.h odcctools+iPhone/include/mach/machine.h
+--- odcctools/include/mach/machine.h 2007-09-08 01:05:35.000000000 +0000
++++ odcctools+iPhone/include/mach/machine.h 2008-03-06 11:16:03.000000000 +0000
+@@ -330,4 +330,7 @@
+ #define CPU_SUBTYPE_VEO_2 ((cpu_subtype_t) 2)
+ #define CPU_SUBTYPE_VEO_ALL CPU_SUBTYPE_VEO_2
+
++#define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0)
++#define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6)
++
+ #endif /* _MACH_MACHINE_H_ */
+diff -ru odcctools/libstuff/arch.c odcctools+iPhone/libstuff/arch.c
+--- odcctools/libstuff/arch.c 2007-09-08 01:05:35.000000000 +0000
++++ odcctools+iPhone/libstuff/arch.c 2008-03-06 11:18:04.000000000 +0000
+@@ -62,7 +62,7 @@
+ { "m88k", CPU_TYPE_MC88000, CPU_SUBTYPE_MC88000_ALL },
+ { "i860", CPU_TYPE_I860, CPU_SUBTYPE_I860_ALL },
+ { "veo", CPU_TYPE_VEO, CPU_SUBTYPE_VEO_ALL },
+- { "arm", CPU_TYPE_ARM, 6 },
++ { "arm", CPU_TYPE_ARM, CPU_SUBTYPE_ARM_ALL },
+ /* specific architecture implementations */
+ { "ppc601", CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_601 },
+ { "ppc603", CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_603 },
+@@ -88,7 +88,7 @@
+ { "hppa7100LC", CPU_TYPE_HPPA, CPU_SUBTYPE_HPPA_7100LC },
+ { "veo1", CPU_TYPE_VEO, CPU_SUBTYPE_VEO_1 },
+ { "veo2", CPU_TYPE_VEO, CPU_SUBTYPE_VEO_2 },
+- { "arm", CPU_TYPE_ARM, 6 },
++ { "armv6", CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V6 },
+ { NULL, 0, 0 }
+ };
+
diff --git a/data/odcctools/imm12.diff b/data/odcctools/imm12.diff
new file mode 100644
index 000000000..3c7df13f0
--- /dev/null
+++ b/data/odcctools/imm12.diff
@@ -0,0 +1,46 @@
+diff -ru odcctools/as/arm.c odcctools+iPhone/as/arm.c
+--- odcctools/as/arm.c 2007-09-13 02:31:45.000000000 +0000
++++ odcctools+iPhone/as/arm.c 2008-03-06 10:46:58.000000000 +0000
+@@ -592,7 +592,7 @@
+ void md_number_to_imm(unsigned char *buf, signed_expr_t val, int size, fixS *
+ fixP, int nsect)
+ {
+- unsigned int n = 0;
++ unsigned int n = 0, err;
+
+ switch (fixP->fx_r_type) {
+ case ARM_RELOC_VANILLA:
+@@ -644,8 +644,19 @@
+ break;
+
+ case ARM_RELOC_SHIFT_IMM12:
+- n = generate_shifted_immediate(val, NULL);
+- fill_reloc_value(buf, (unsigned int)n, 0x00000fff);
++ n = generate_shifted_immediate(val, &err);
++ if (err) {
++ n = (0x3 << 21) | generate_shifted_immediate(~val, &err);
++ if (!err)
++ as_warn("Immediate value is out of range: converting "
++ "automatically to a MVN instruction, but if this "
++ "was not a MOV instruction then this is unsafe!");
++ else
++ as_bad("Immediate value out of range");
++ printf("%x\n", n);
++ fill_reloc_value(buf, (unsigned int)n, (0x3 << 21) | 0x00000fff);
++ } else
++ fill_reloc_value(buf, (unsigned int)n, 0x00000fff);
+ break;
+
+ case ARM_RELOC_SHIFT_IMM:
+diff -ru odcctools/as/army.y odcctools+iPhone/as/army.y
+--- odcctools/as/army.y 2007-10-16 23:11:52.000000000 +0000
++++ odcctools+iPhone/as/army.y 2008-03-06 10:47:08.000000000 +0000
+@@ -249,7 +249,7 @@
+ | expr
+ {
+ register_reloc_type(ARM_RELOC_SHIFT_IMM12, 4, 0);
+- $$ = ((0x1 << 25) | $1);
++ $$ = ((0x1 << 25) | $1 & 0xfff);
+ }
+ ;
+