diff options
Diffstat (limited to 'data/odcctools')
-rw-r--r-- | data/odcctools/_metadata/version | 2 | ||||
-rw-r--r-- | data/odcctools/adrbxj.diff | 176 | ||||
-rw-r--r-- | data/odcctools/archive64.diff | 21 | ||||
-rw-r--r-- | data/odcctools/armv6.diff | 32 | ||||
-rw-r--r-- | data/odcctools/comm.diff | 35 | ||||
-rw-r--r-- | data/odcctools/ifnc.diff | 225 | ||||
-rw-r--r-- | data/odcctools/imm12.diff | 46 | ||||
-rw-r--r-- | data/odcctools/make.sh | 11 | ||||
-rw-r--r-- | data/odcctools/odcctools-209.tgz | bin | 2200232 -> 0 bytes | |||
-rw-r--r-- | data/odcctools/odcctools-238.tgz | bin | 0 -> 2236086 bytes | |||
-rw-r--r-- | data/odcctools/word.diff | 12 | ||||
-rw-r--r-- | data/odcctools/x86.diff | 53 |
12 files changed, 60 insertions, 553 deletions
diff --git a/data/odcctools/_metadata/version b/data/odcctools/_metadata/version index 7fba2b437..1cf253f92 100644 --- a/data/odcctools/_metadata/version +++ b/data/odcctools/_metadata/version @@ -1 +1 @@ -209 +238 diff --git a/data/odcctools/adrbxj.diff b/data/odcctools/adrbxj.diff deleted file mode 100644 index 7840a1fe7..000000000 --- a/data/odcctools/adrbxj.diff +++ /dev/null @@ -1,176 +0,0 @@ -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 -@@ -655,6 +666,18 @@ - fill_reloc_value(buf, n << 7, 31 << 7); - break; - -+ case ARM_RELOC_ADR: -+ val -= 4; -+ if (val >= 0) -+ n = 1 << 23; -+ else { -+ n = 1 << 22; -+ val = -val; -+ } -+ n |= generate_shifted_immediate(val, NULL); -+ fill_reloc_value(buf, (unsigned int)n, 0x00c00fff); -+ break; -+ - 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 -@@ -5,7 +5,7 @@ - - #include "army.h" - --int arm_op_count = 5823; -+int arm_op_count = 5863; - struct arm_op_info arm_op_info[] = { - { "adc", OP_DATA_PROC_3, 0xe0a00000 }, - { "adcal", OP_DATA_PROC_3, 0xe0a00000 }, -@@ -87,6 +87,46 @@ - { "addvcs", OP_DATA_PROC_3, 0x70900000 }, - { "addvs", OP_DATA_PROC_3, 0x60800000 }, - { "addvss", OP_DATA_PROC_3, 0x60900000 }, -+ { "adr", OP_ADR, 0xe0000000 }, -+ { "adral", OP_ADR, 0xe0000000 }, -+ { "adrals", OP_ADR, 0xe0100000 }, -+ { "adrcc", OP_ADR, 0x30000000 }, -+ { "adrccs", OP_ADR, 0x30100000 }, -+ { "adrcs", OP_ADR, 0x20000000 }, -+ { "adrcss", OP_ADR, 0x20100000 }, -+ { "adreq", OP_ADR, 0x00000000 }, -+ { "adreqs", OP_ADR, 0x00100000 }, -+ { "adrge", OP_ADR, 0xa0000000 }, -+ { "adrges", OP_ADR, 0xa0100000 }, -+ { "adrgt", OP_ADR, 0xc0000000 }, -+ { "adrgts", OP_ADR, 0xc0100000 }, -+ { "adrhi", OP_ADR, 0x80000000 }, -+ { "adrhis", OP_ADR, 0x80100000 }, -+ { "adrhs", OP_ADR, 0x20000000 }, -+ { "adrhss", OP_ADR, 0x20100000 }, -+ { "adrle", OP_ADR, 0xd0000000 }, -+ { "adrles", OP_ADR, 0xd0100000 }, -+ { "adrlo", OP_ADR, 0x30000000 }, -+ { "adrlos", OP_ADR, 0x30100000 }, -+ { "adrls", OP_ADR, 0x90000000 }, -+ { "adrlss", OP_ADR, 0x90100000 }, -+ { "adrlt", OP_ADR, 0xb0000000 }, -+ { "adrlts", OP_ADR, 0xb0100000 }, -+ { "adrmi", OP_ADR, 0x40000000 }, -+ { "adrmis", OP_ADR, 0x40100000 }, -+ { "adrne", OP_ADR, 0x10000000 }, -+ { "adrnes", OP_ADR, 0x10100000 }, -+ { "adrnv", OP_ADR, 0xf0000000 }, -+ { "adrnvs", OP_ADR, 0xf0100000 }, -+ { "adrpl", OP_ADR, 0x50000000 }, -+ { "adrpls", OP_ADR, 0x50100000 }, -+ { "adrs", OP_ADR, 0xe0100000 }, -+ { "adrul", OP_ADR, 0x30000000 }, -+ { "adruls", OP_ADR, 0x30100000 }, -+ { "adrvc", OP_ADR, 0x70000000 }, -+ { "adrvcs", OP_ADR, 0x70100000 }, -+ { "adrvs", OP_ADR, 0x60000000 }, -+ { "adrvss", OP_ADR, 0x60100000 }, - { "and", OP_DATA_PROC_3, 0xe0000000 }, - { "andal", OP_DATA_PROC_3, 0xe0000000 }, - { "andals", OP_DATA_PROC_3, 0xe0100000 }, -Only in odcctools+iPhone/as: armop.c.orig -Only in odcctools+iPhone/as: armop.c.rej -diff -ru odcctools/as/armop.in odcctools+iPhone/as/armop.in ---- odcctools/as/armop.in 2007-10-16 20:20:35.000000000 +0000 -+++ odcctools+iPhone/as/armop.in 2007-12-29 08:49:20.000000000 +0000 -@@ -27,6 +27,7 @@ - mov{<cond>}{s} t: OP_DATA_PROC_1 e: 1101 (21) - bic{<cond>}{s} t: OP_DATA_PROC_3 e: 1110 (21) - mvn{<cond>}{s} t: OP_DATA_PROC_1 e: 1111 (21) -+adr{<cond>}{s} t: OP_ADR e: 0000 (21) - - # Multiply instructions - mul{<cond>}{s} t: OP_MUL e: 0000000 (21), 1001 (4) -@@ -164,6 +165,7 @@ - # ----------------------------------------------------------------------------- - - blx{<cond>} t: OP_BLX e: 0 (0) -+bxj{<cond>} t: OP_BXJ e: 0 (0) - - smla{<x>}{<y>}{<cond>} t: OP_SMLA_XY e: 00010000 (20), 1 (7), 0 (4) - smlaw{<y>}{<cond>} t: OP_SMLA_XY e: 00010010 (20), 1 (7), 0 (5), 0 (4) -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 2007-12-29 08:49:20.000000000 +0000 -@@ -31,7 +31,7 @@ - %token <nval> OPRD_REG - %token <ival> OPRD_IMM - %token <nval> OP_BRANCH OP_DATA_PROC_1 OP_DATA_PROC_2 OP_DATA_PROC_3 OP_MUL --%token <nval> OP_MLA OP_SMLAL OP_CLZ OP_LDR OP_LDRH OP_LDM OP_SWI OP_BKPT -+%token <nval> OP_MLA OP_SMLAL OP_CLZ OP_LDR OP_LDRH OP_LDM OP_SWI OP_BKPT OP_BXJ - %token <nval> OP_CPS_EFFECT OP_CPS OP_LDREX OP_MCRR2 OP_PKHBT OP_QADD16 OP_REV - %token <nval> OP_RFE OP_SXTAH OP_SEL OP_SETEND OP_SMLAD OP_SMLALD OP_SMMUL - %token <nval> OP_SRS OP_SSAT OP_SSAT16 OP_STREX OP_SXTH OP_SWP OP_USAD8 OP_USADA8 -@@ -41,7 +41,7 @@ - %token <nval> OP_VFP_ST_D OP_VFP_MSR OP_VFP_MRS OP_VFP_MDXR OP_VFP_MRDX - %token <nval> OP_VFP_MXR OP_VFP_MRX OP_VFP_FMSTAT OP_VFP_DPX1_S OP_VFP_DPX1_D - %token <nval> OP_VFP_FMDRR OP_VFP_FMRRD OP_VFP_FMSRR OP_VFP_FMRRS OP_VFP_DPX_SD --%token <nval> OP_VFP_DPX_DS OP_MSR OP_MRS OP_LDC OP_MCR -+%token <nval> OP_VFP_DPX_DS OP_MSR OP_MRS OP_LDC OP_MCR OP_ADR - %token <nval> OPRD_LSL_LIKE OPRD_RRX OPRD_IFLAGS OPRD_COPROC OPRD_CR OPRD_REG_S - %token <nval> OPRD_REG_D OPRD_REG_VFP_SYS OPRD_ENDIANNESS OPRD_PSR - %token <nval> OPRD_COPRO_REG -@@ -66,6 +66,7 @@ - %type <nval> vfp_maybe_imm_offset generic_reg vfp_data_proc_inst - %type <nval> vfp_store_inst vfp_misc_inst vfp2_inst vfp_imm_offset_with_u_bit - %type <nval> vfp_store_am armv3_inst clz_class_inst armv2_inst -+%type <nval> bxj_class_inst - %type <nval> load_store_copro_am imm_div_4_with_u_bit mcr_opcode_2 - - %% -@@ -101,6 +102,11 @@ - { $$ = ($1 | $2 | $4 | (1 << 20)); } - | OP_DATA_PROC_3 dest_reg ',' src_reg ',' shifter_operand - { $$ = ($1 | $2 | $4 | $6); } -+ | OP_ADR dest_reg ',' expr -+ { -+ register_reloc_type(ARM_RELOC_ADR, 4, 1); -+ $$ = ($1 | $2 | (15 << 16) | (1 << 25)); -+ } - ; - - load_inst: -@@ -378,6 +384,7 @@ - - armv5_inst: - blx_class_inst { $$ = $1; } -+ | bxj_class_inst { $$ = $1; } - | smla_xy_class_inst { $$ = $1; } - | smlal_xy_class_inst { $$ = $1; } - | smul_xy_class_inst { $$ = $1; } -@@ -389,6 +396,10 @@ - OP_CLZ OPRD_REG ',' OPRD_REG { $$ = ($1 | ($2 << 12) | $4); } - ; - -+bxj_class_inst: -+ OP_BXJ OPRD_REG { $$ = ($1 | (0x12 << 20) | (0xfff2 << 4) | $2); } -+ ; -+ - blx_class_inst: - OP_BLX branch_am { $$ = ((0x7d << 25) | $2); } - | OP_BLX OPRD_REG { $$ = ($1 | (0x12 << 20) | (0xfff3 << 4) | $2); } -Only in odcctools+iPhone/as: army.y.orig -diff -ru odcctools/include/mach-o/arm/reloc.h odcctools+iPhone/include/mach-o/arm/reloc.h ---- odcctools/include/mach-o/arm/reloc.h 2007-09-08 01:05:35.000000000 +0000 -+++ odcctools+iPhone/include/mach-o/arm/reloc.h 2007-12-29 08:49:16.000000000 +0000 -@@ -21,7 +21,8 @@ - ARM_RELOC_PCREL_DATA_IMM12, /* Load and Store Word/Immediate Offset, r15 */ - ARM_RELOC_SHIFT_IMM12, /* Data-processing operands - Immediate */ - ARM_RELOC_PCREL_VFP_IMM8_TIMES_4, /* VFP Load and Store Word, r15 */ -- ARM_RELOC_SHIFT_IMM /* immediate shifter operand */ -+ ARM_RELOC_SHIFT_IMM, /* immediate shifter operand */ -+ ARM_RELOC_ADR /* immediate shifter operand with add/sub */ - }; - - /* Determines whether a reloc can be exported to object files (1) or whether diff --git a/data/odcctools/archive64.diff b/data/odcctools/archive64.diff deleted file mode 100644 index 48ecb5e1a..000000000 --- a/data/odcctools/archive64.diff +++ /dev/null @@ -1,21 +0,0 @@ -diff -r -u odcctools/libstuff/ofile.c odcctools+iPhone/libstuff/ofile.c ---- odcctools/libstuff/ofile.c 2007-09-08 01:05:35.000000000 +0000 -+++ odcctools+iPhone/libstuff/ofile.c 2007-12-29 09:01:22.000000000 +0000 -@@ -105,7 +105,7 @@ - unsigned long module_index); - - #ifndef OTOOL --#ifdef ALIGNMENT_CHECKS -+#ifdef ALIGNMENT_CHECKS_ARCHIVE_64_BIT - static - void - temporary_archive_member_warning( -@@ -128,7 +128,7 @@ - print("\n"); - va_end(ap); - } --#endif /* defined(ALIGNMENT_CHECKS) */ -+#endif /* defined(ALIGNMENT_CHECKS_ARCHIVE_64_BIT) */ - #endif /* !defined(OTOOL) */ - - #ifndef OFI diff --git a/data/odcctools/armv6.diff b/data/odcctools/armv6.diff deleted file mode 100644 index ab0ed8a4f..000000000 --- a/data/odcctools/armv6.diff +++ /dev/null @@ -1,32 +0,0 @@ -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/comm.diff b/data/odcctools/comm.diff deleted file mode 100644 index 93b5d0a54..000000000 --- a/data/odcctools/comm.diff +++ /dev/null @@ -1,35 +0,0 @@ -Index: as/read.c -=================================================================== ---- odcctools/as/read.c (revision 206) -+++ odcctools+iPhone/as/read.c (working copy) -@@ -1698,7 +1700,7 @@ - - /* - * s_comm() implements the pseudo op: -- * .comm name , expression -+ * .comm name , expression [ , align_expression ] - */ - static - void -@@ -1710,6 +1712,7 @@ - char *p; - signed_target_addr_t temp; - symbolS *symbolP; -+ int align; - - if(*input_line_pointer == '"') - name = input_line_pointer + 1; -@@ -1731,6 +1734,13 @@ - ignore_rest_of_line(); - return; - } -+ align = 0; -+ if(*input_line_pointer == ','){ -+ input_line_pointer++; -+ align = get_absolute_expression(); -+ as_warn("Alignment of %u specified on .comm, and we didn't care.", align); -+ } -+ - *p = 0; - symbolP = symbol_find_or_make(name); - *p = c; diff --git a/data/odcctools/ifnc.diff b/data/odcctools/ifnc.diff deleted file mode 100644 index 5d77c5981..000000000 --- a/data/odcctools/ifnc.diff +++ /dev/null @@ -1,225 +0,0 @@ -Index: as/read.c -=================================================================== ---- odcctools/as/read.c (revision 206) -+++ odcctools+iPhone/as/read.c (working copy) -@@ -524,6 +525,7 @@ - { "rept", s_rept, 0 }, - { "endr", s_endr, 0 }, - { "ifc", s_ifc, 0 }, -+ { "ifnc", s_ifnc, 0 }, - { NULL } /* end sentinel */ - }; - -@@ -3826,6 +3836,15 @@ - return(s); - } - -+static int is_identifier_char(char c) { -+ return -+ (c >= 'a' && c <= 'z') || -+ (c >= 'A' && c <= 'Z') || -+ (c >= '0' && c <= '9') || -+ (c == '_' || c == '.') || -+ (c == '=' || c == '$'); -+} -+ - /* - * demand_copy_string() - * -@@ -3855,19 +3874,20 @@ - obstack_1grow(¬es, c); - len++; - } -- /* -- * This next line is so demand_copy_C_string will return a null -- * termanated string. -- */ -- obstack_1grow(¬es, '\0'); -- retval = obstack_finish(¬es); - } - else{ -- as_bad("Missing string"); -- retval = NULL; -- ignore_rest_of_line(); -+ while (is_identifier_char(*input_line_pointer)) { -+ obstack_1grow(¬es, *input_line_pointer++); -+ len++; -+ } - } -+ /* -+ * This next line is so demand_copy_C_string will return a null -+ * termanated string. -+ */ -+ obstack_1grow(¬es, '\0'); - *lenP = len; -+ retval = obstack_finish(¬es); - return(retval); - } - -@@ -3964,6 +3984,36 @@ - } - - /* iPhone binutils extension: .ifc assembles if the two strings are the same */ -+void s_ifnc(int value) -+{ -+ char *ptr1, *ptr2; -+ int len1, len2; -+ -+ if (if_depth >= MAX_IF_DEPTH) -+ as_fatal("Maximum if nesting level reached"); -+ last_states[if_depth++] = the_cond_state; -+ the_cond_state.the_cond = if_cond; -+ -+ if (the_cond_state.ignore) -+ totally_ignore_line(); -+ else { -+ ptr1 = demand_copy_string(&len1); -+ -+ SKIP_WHITESPACE(); -+ if (*input_line_pointer != ',') -+ as_bad(".ifnc needs two strings separated by a comma (',')"); -+ else -+ input_line_pointer++; -+ -+ ptr2 = demand_copy_string(&len2); -+ -+ the_cond_state.cond_met = (len1 != len2 || strncmp(ptr1, ptr2, len1)); -+ the_cond_state.ignore = !the_cond_state.cond_met; -+ demand_empty_rest_of_line(); -+ } -+} -+ -+/* iPhone binutils extension: .ifc assembles if the two strings are the same */ - void s_ifc(int value) - { - char *ptr1, *ptr2; -@@ -4381,7 +4431,7 @@ - * determine which it is. */ - named_invocation = 0; - ptr = input_line_pointer; -- while (!is_end_of_line(*ptr)) { -+ while (is_identifier_char(*ptr)) { - if (*ptr == '=') { - named_invocation = 1; - break; -@@ -4391,66 +4441,58 @@ - - index = 0; - -- while (is_ignorable_ws(*input_line_pointer)) -- input_line_pointer++; -- ptr = input_line_pointer; -+ SKIP_WHITESPACE(); - - /* Ok, now parse each argument. */ - while (1) { -- if (is_end_of_line(*input_line_pointer) || *input_line_pointer == -- ',' || is_ignorable_ws(*input_line_pointer)) { -- len = input_line_pointer - ptr; -- arg_buf = malloc(len + 1); -- if (len) -- strncpy(arg_buf, ptr, len); -- arg_buf[len] = '\0'; -+ int length; -+ char *value = demand_copy_string(&length); - --#if 0 -- printf("arg is '%s'\n", arg_buf); --#endif -+ if (named_invocation) { -+ if (*input_line_pointer++ != '=') { -+ as_bad("In a named-argument-style macro invocation, " -+ "all of the arguments must be specified in the " -+ "named-argument style, but one or more weren't"); -+ break; -+ } - -- if (named_invocation) { -- arg_val_ptr = arg_buf; -- strsep(&arg_val_ptr, "="); -- if (arg_val_ptr == NULL) { -- as_bad("In a named-argument-style macro invocation, " -- "all of the arguments must be specified in the " -- "named-argument style, but one or more weren't"); -+ /* We've parsed it fine, now just find which argument the -+ * user meant. */ -+ which_arg = -1; -+ for (i = 0; i < info->arg_count; i++) { -+ if (!strcmp(value, info->args[i]->name)) { -+ which_arg = i; - break; - } -+ } - -- /* We've parsed it fine, now just find which argument the -- * user meant. */ -- which_arg = -1; -- for (i = 0; i < info->arg_count; i++) { -- if (!strcmp(arg_buf, info->args[i]->name)) { -- which_arg = i; -- break; -- } -- } -+ if (which_arg == -1) { -+ as_bad("'%s' doesn't name an argument of the macro " -+ "'%s'", arg_buf, info->name); -+ break; -+ } - -- if (which_arg == -1) { -- as_bad("'%s' doesn't name an argument of the macro " -- "'%s'", arg_buf, info->name); -- break; -- } -+ arguments[which_arg] = demand_copy_string(&length); -+ } else { -+ /* If not a named invocation, it's simple. */ -+ arguments[index++] = value; -+ } - -- arguments[which_arg] = arg_val_ptr; -- } else { -- /* If not a named invocation, it's simple. */ -- arguments[index++] = arg_buf; -- } -+ if (*input_line_pointer == ',') { -+ ++input_line_pointer; -+ SKIP_WHITESPACE(); -+ continue; -+ } else if ( -+ !is_end_of_line(*input_line_pointer) && -+ !is_ignorable_ws(*input_line_pointer) -+ ) { -+ as_bad("invalid macro expansion argument character (%c)", *input_line_pointer); -+ } - -- if (*input_line_pointer == ',' || is_ignorable_ws( -- *input_line_pointer)) { -- input_line_pointer++; -- while (is_ignorable_ws(*input_line_pointer)) -- input_line_pointer++; -- ptr = input_line_pointer; -- } else /* must be end of line */ -- break; -- } else -- input_line_pointer++; -+ SKIP_WHITESPACE(); -+ -+ if (is_end_of_line(*input_line_pointer)) -+ break; - } - - nargs = info->arg_count; -Index: as/read.h -=================================================================== ---- odcctools/as/read.h (revision 206) -+++ odcctools+iPhone/as/read.h (working copy) -@@ -110,6 +110,8 @@ - int value); - extern void s_endr( - int value); -+extern void s_ifnc( -+ int value); - extern void s_ifc( - int value); - extern void big_cons( diff --git a/data/odcctools/imm12.diff b/data/odcctools/imm12.diff deleted file mode 100644 index 3c7df13f0..000000000 --- a/data/odcctools/imm12.diff +++ /dev/null @@ -1,46 +0,0 @@ -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); - } - ; - diff --git a/data/odcctools/make.sh b/data/odcctools/make.sh index ab01d270f..d7405717e 100644 --- a/data/odcctools/make.sh +++ b/data/odcctools/make.sh @@ -1,8 +1,9 @@ -tar -zxvf "${PKG_DATA}/odcctools-209.tgz" -cd odcctools -rm -f include/mach/machine/{boolean,exception,kern_return,processor_info,thread_state,thread_status,vm_param,vm_types}.h -rm -f include/mach/{task,thread_act,thread_status}.h include/mach/machine/rpc.h +pkg:extract +cd * pkg:patch -pkg:configure +rm -f include/libkern/OSByteOrder.h +rm -f include/mach/{task,thread_act,thread_status}.h +rm -f include/mach/machine/{boolean,exception,kern_return,processor_info,rpc,thread_state,thread_status,vm_param,vm_types}.h +pkg:configure --disable-ld64 ac_cv_header_objc_objc_runtime_h=no make pkg:install diff --git a/data/odcctools/odcctools-209.tgz b/data/odcctools/odcctools-209.tgz Binary files differdeleted file mode 100644 index 05de50e94..000000000 --- a/data/odcctools/odcctools-209.tgz +++ /dev/null diff --git a/data/odcctools/odcctools-238.tgz b/data/odcctools/odcctools-238.tgz Binary files differnew file mode 100644 index 000000000..316c21c40 --- /dev/null +++ b/data/odcctools/odcctools-238.tgz diff --git a/data/odcctools/word.diff b/data/odcctools/word.diff deleted file mode 100644 index 9b588b21e..000000000 --- a/data/odcctools/word.diff +++ /dev/null @@ -1,12 +0,0 @@ -Index: as/read.c -=================================================================== ---- odcctools/as/read.c (revision 206) -+++ odcctools+iPhone/as/read.c (working copy) -@@ -488,6 +488,7 @@ - { "lcomm", s_lcomm, 0 }, - { "line", s_line, 0 }, - { "long", cons, 4 }, -+ { "word", cons, 4 }, - { "quad", cons, 8 }, - { "lsym", s_lsym, 0 }, - { "section", s_section, 0 }, diff --git a/data/odcctools/x86.diff b/data/odcctools/x86.diff new file mode 100644 index 000000000..14d4e2695 --- /dev/null +++ b/data/odcctools/x86.diff @@ -0,0 +1,53 @@ +diff -ru odcctools-236/libstuff/swap_headers.c odcctools-236+iPhone/libstuff/swap_headers.c +--- odcctools-236/libstuff/swap_headers.c 2008-03-20 16:32:08.000000000 +0000 ++++ odcctools-236+iPhone/libstuff/swap_headers.c 2008-03-30 20:18:22.000000000 +0000 +@@ -634,13 +634,13 @@ + || cputype == CPU_TYPE_X86_64 + #endif /* x86_THREAD_STATE64 */ + ){ +- i386_thread_state_t *cpu; ++ x86_thread_state_t *cpu; + #ifdef x86_THREAD_STATE64 + x86_thread_state64_t *cpu64; + #endif /* x86_THREAD_STATE64 */ + /* current i386 thread states */ + #if i386_THREAD_STATE == 1 +- struct i386_float_state *fpu; ++ struct x86_float_state *fpu; + i386_exception_state_t *exc; + #endif /* i386_THREAD_STATE == 1 */ + +@@ -678,8 +678,8 @@ + "LC_THREAD", i); + return(FALSE); + } +- cpu = (i386_thread_state_t *)state; +- state += sizeof(i386_thread_state_t); ++ cpu = (x86_thread_state_t *)state; ++ state += sizeof(x86_thread_state_t); + break; + /* current i386 thread states */ + #if i386_THREAD_STATE == 1 +@@ -694,8 +694,8 @@ + "LC_THREAD", i); + return(FALSE); + } +- fpu = (struct i386_float_state *)state; +- state += sizeof(struct i386_float_state); ++ fpu = (struct x86_float_state *)state; ++ state += sizeof(struct x86_float_state); + break; + case i386_EXCEPTION_STATE: + if(count != I386_EXCEPTION_STATE_COUNT){ +@@ -1313,9 +1313,9 @@ + /* current i386 thread states */ + #if i386_THREAD_STATE == 1 + case i386_FLOAT_STATE: +- fpu = (struct i386_float_state *)state; ++ fpu = (struct x86_float_state *)state; + swap_i386_float_state(fpu, target_byte_sex); +- state += sizeof(struct i386_float_state); ++ state += sizeof(struct x86_float_state); + break; + case i386_EXCEPTION_STATE: + exc = (i386_exception_state_t *)state; |