TODO for coalesced symbols: - Should external relocation entries for defined coalesced symbols only be created with -dynamic and not -static? TODO: - Add MacOS line termination \r . Known bugs: - The assembly line: bl ""foo"" causes the symbol name "" to be used. - cmpwi seems to be the same as cmpi for PowerPC. - Can't optimize because of compiler bug #50416 prevents line 235 in symbols.c from working (currently has #pragma CC_OPT_OFF and #pragma CC_OPT_RESUME around that routine). - The m88k instruction "tb0 0,r0,undef" trashes the instruction because of the undefined. - 68k does not handle packed immediates (the tables have been changed to dis- allow this) because there is no routine to convert a flonum to a 68k packed form. - The logical operators && and || are not implemented. Bugs to be fixed: - The m68k "jmp @(_foo)" is not legal and needs to be flaged. - The PowerPC extended branch mnemonic like beqlrl need to take a CRFONLY or a number shifted over by 2 (like the fcmpu instruction). Changes for the 5.26 release (the cctools-747 release): - Changed the assembler to put out a line table if no .loc directives are used but a .file directive to be used. This was causing a bad dwarf for data only files that used .file and had no .loc directives. The fix is in dwarf2_finish() in dwarf2dbg.c to add to the test to see we have seen any line number segs or .file was used before calling out_debug_line(). Radar bug #6593344. Changes for the 5.26 release (the cctools-746 release): - Added the support for the .sleb128 and .uleb128 directives. Radar bug #4545225. - Added rs_leb128 to the relax_stateT enum in relax.h . - Added the fields has_rs_leb128s and layout_pass to the frchain struct in sections.h . - Added entry for sleb128 and uleb128 to pseudo_table[] in read.c . - Added s_leb128(), sizeof_uleb128, emit_leb128_expr() to read.c . Where emit_leb128_expr() is heavily hacked from the original due to differences in expressions. In emit_leb128_expr() after the call to frag_var() for a rs_leb128 frchain_now->has_rs_leb128s is set to TRUE to mark the section as containing an rs_leb128 frag. - Added a case label for rs_leb128 in the first loop in relax_section() in layout.c with a line of code: address += fragP->fr_offset = 1; - Also added a case label for rs_leb128 in the second loop in relax_section() in layout.c to get the value of the symbol's expression and call sizeof_leb128() to get the current size, adjust the growth and save the new size in the fr_offset field of the frag. - Added code in layout_addresses() in layout.c to make three layout passes over the frags. Doing the debug sections last, ones with containing rs_leb128 frags before that and all other sections first. - Added a loop in the layout pass if relax_section() changes things. To do that the new field last_fr_address to the frag struct in frags.h, then changed relax_section() in layout.c to return non-zero if the things change by setting and testing the last_fr_address feild in each of the frags. - Added a case label for rs_leb128 in layout_addresses() in layout.c and code to get the value of the symbol's expression, then call output_leb128() to place that value in the frag and finally convert the frag to an rs_fill of the size of the bytes put in the frag. Changes for the 5.26 release (the cctools-745 release): - Changed the assembler to not put out a line table if no .loc directives are used. This was causing a second line table in the output with older compilers causing bad dSYM files to be created. The fix is in dwarf2_finish() in dwarf2dbg.c to test to see we have seen any line number segs before calling out_debug_line(). Radar bug #6589056. Changes for the 5.26 release (the cctools-744 release): - Fixed a problem with the code to support .file/.loc which was incorrectly putting out a Compile Unit into the debug_info section when it shouldn't. The code in dwarf2_finish() in dwarf2dbg.c was not ported correctly for checking if the debug_info section was empty. It was testing the section size for zero but that is not valid at that point in the code and needed to look for fragments in the section. So a version of the routine seg_not_empty_p() was ported and added to sections.[ch] . Radar bug #6573528. Changes for the 5.26 release (the cctools-741 release): - Fixed the encoding of the armv7 thumb2 instructions for where it places Rd in qadd, qdadd, qsub and qdsub. Added the do_t_rd_rm_rn() routine and changed the opcode entries for these instructions to use them. Radar bug #6522202. Changes for the 5.26 release (the cctools-740 release): - Removed the last abort() call in the reloc() routine in i386.c so user errors do not appear like assembler crashes. Radar bug #6516397. Changes for the 5.26 release (the cctools-739 release): - Changed the arm assembler to use 0x46c0 as the thumb1 nop pad for sections with pure instructions. The change was in s_align() in read.c. Radar bug #6517544. Changes for the 5.26 release (the cctools-738 release): - Removed the code and files for the old ProjectBuilder interface including the use of mig(1) in the Makefile. The files make.defs make_defs.h were removed and the code in as.c and messages.[ch] with the OLD_PROJECTBUILDER_INTERFACE #ifdef was removed. Radar bug #6457206. - Changed the arm assembler to put out a relocation entry for 32-bit thumb branches using the new ARM_THUMB_32BIT_BRANCH relocation type. Radar bug #6511482. - Changed arm.c to assign the enum type BFD_RELOC_THUMB_PCREL_BRANCH20 to the new ARM_THUMB_32BIT_BRANCH relocation type's value. - Changed nrelocs_for_fix() and fix_to_relocation_entries() in write_object.c so there is an #ifdef ARM and tests for the new ARM_THUMB_32BIT_BRANCH relocation type when archflag_cpusubtype == CPU_SUBTYPE_ARM_V7. To count 1 for the fixes in nrelocs_for_fix() and to put out a relocation entry in fix_to_relocation_entries() for the type ARM_THUMB_32BIT_BRANCH. The relocation entry put out is a local relocation entry that is pcrel, length of long and an symbolnum of R_ABS (0). Also in fix_to_relocation_entries() it sets fr_type to ARM_THUMB_32BIT_BRANCH so that BFD_RELOC_THUMB_PCREL_BRANCH20 versions with no symbol gets set correctly. Changes for the 5.26 release (the cctools-737 release): - Changed the logic in fixup_section() in layout.c to correctly not add the value of the symbol into the item to be relocated if it is an external coalesced symbol or weak symbol. Radar bug #6505278. - Changed frag_grow() in frags.c to not reduce the frags.chunk_size if 2 times the number of bytes needed is less than that. Radar bug #6490903. - Changed the arm assembler to pad sections with pure instructions with nop's other than zero bytes. Radar bug #6492867. - Changed arm.c and made the variable thumb_mode global and not static. - Changed s_align() and added #ifdef ARM code to use specific nop values. Changes for the 5.26 release (the cctools-736 release): - Fixed misspelling of "can not" to "cannot" in 4 error messages in i386.c . Radar bug #6447059. - Fixed bugs in dwarf support: - Changed layout_addresses() in layout.c to make two loops for calling relax_section(). The first for non-debug sections so the sizes of their sections are set before the second loop of the debug sections which might have line number sections. Radar bug #6460301. - To get the old .file and dwarf .file to both work the trick is that dwarf2_directive_file() parse the old .file directive stuff and pass it to s_app_file() to make this work. - This requires that dwarf2_directive_file is in md_pseudo_table[]. - Changed s_file() in read.[ch] to s_app_file(). - Changed the entry in the pseudo_table[] table from "file" to "appfile" in read.c - Changed process_entries() to return a non-zero value if it output something. - Changed out_debug_line() to check the return value of process_entries() and if nothing was outputted then output the a DW_LNE_set_address sequence to set the address to zero and the DW_LNE_end_sequence. - Changed dwarf2_finish() to also test files_in_use == 0 as part of its check that there is no line information and no non-empty .debug_info section. Then also added a check of all_segs == NULL before the check of all_segs->next == NULL, and added this same set of checks before calling out_debug_*() routines at the end. This is need so the file table in the line section is put out for something that has only data and no line numbers. - Changed fixup_section() in layout.c for x86_64 in debug sections to actually set the value of the expression. - Changed section_new() in sections.c to not set now_seg for section types of S_ZEROFILL. - Added the routine add_last_frags_to_sections() to layout.[ch] so that the hacks in get_frag_fix() will work. As get_frag_fix() will return 0 as the size of the last frag in a section. - Changed is_assembly_time_constant_subtraction_expression() in layout.c to treat expression with symbols from a debug section with FAKE_LABEL_NAMEs to be constant. - Changed fixup_section() in layout.c when it has a section difference relocatable subtraction where a symbol is at the end of a section and the section it is relocating is a debug section as an assembly time constant section if both symbols have FAKE_LABEL_NAMEs. - Changed section_set() in sections.c to simply call section_new() to fix the problems that it was not correctly setting frag_now and dropping the the fragments from the sections frag chain. - Fixed using basename() back to using lbasename() and added an lbasename() routine just before get_filenum() which returns a pointer into the path as expected by get_filenum(). - Fixed section_symbol() in symbols.c that was incorrectly testing frcP->section_symbol != NULL when it should have been == NULL. - Fixed the call to frag_align() in out_debug_aranges() in to pass the fill prameters correctly so it does not crash. - In read.c changed these routines: sizeof_sleb128() sizeof_uleb128() to be two routines: sizeof_sleb128_32() and sizeof_sleb128_64() sizeof_uleb128_32() and sizeof_uleb128_64() which has parameters of proper 32 and 64 bit signed types so when values of different types get passed they are correctly converted. Without this it will cause hangs as a shift of a negative value will be an arithmetic shift and will never become zero. - And added new sizeof_leb128() and sizeof_uleb128() routines that are #ifdef'ed ARCH64 to call the correct sized and typed new routines. - Changed relax_inc_line_addr() to not use make_expr_symbol() which is ifdef'ed to abort, and changed it to use symbol_temp_new() and create a SECT_DIFF expression in that symbol. - Changed dwarf2dbg_estimate_size_before_relax() to match what relax_inc_line_addr() creates and evaluate the symbol's expression before the symbol values are set using their frag values. - Changed dwarf2dbg_convert_frag() to match what relax_inc_line_addr() creates and evaluate the symbol's expression after the symbol values are set. - Hooked up the dwarf support for .loc and .file in the i386, ppc and arm assemblers. Radar bug #4298593. - Removed the #ifndef NeXT_MOD in the md_pseudo_table[] in i386.c around the .file and .loc directives that use dwarf2_directive_file() and dwarf2_directive_loc() respectively. - Removed the #ifdef OBJ_ELF in the md_pseudo_table[] in arm.c around the .file, .loc and .loc_mark_labels directives that use dwarf2_directive_file() dwarf2_directive_loc() and dwarf2_directive_loc_mark_labels() respectfully. - Removed the #ifndef NeXT_MOD in output_insn() in i386.c around the call to dwarf2_emit_insn() at the beginning of the routine. - Removed the #ifdef OBJ_ELF in output_inst() in arm.c around the call to dwarf2_emit_insn() at the end of the routine. - Removed the #ifdef OBJ_ELF in output_relax_insn() in arm.c around the call to dwarf2_emit_insn() at the beginning of the routine. - Removed the #ifdef OBJ_ELF in arm_frob_label() in arm.c at the end of the routine. - Added a call to dwarf2_emit_insn() in md_assemble() in ppc.c after the call to md_number_to_chars(). - Added a call to dwarf2_finish() in main() in as.c after the call to perform_an_assembly_pass(). - Added a case label for rs_dwarf2dbg in layout_addresses() in layout.c with a line of code: dwarf2dbg_convert_frag(fragP); - Added a case label for rs_dwarf2dbg in the first loop in relax_section() in layout.c with a line of code: address += dwarf2dbg_estimate_size_before_relax(fragP); - Added a case label for rs_dwarf2dbg in the second loop in relax_section() in layout.c with a line of code: growth = dwarf2dbg_relax_frag(fragP); Changes for the 5.26 release (the cctools-733 release): - Changed s_weak_definition() in read.c, colon() in symbols.c and layout_symbols() in write_object.c to not check for the symbol defined as not being in a coalesced section. Then changed fix_to_relocation_entries() in write_object.c to produce an external relocation entry if is is an external coalesced symbol or weak symbol. And changed fixup_section() in layout.c to not add the value of the symbol into the item to be relocated if it is an external coalesced symbol or weak symbol. Radar bug #6422713. Changes for the 5.26 release (the cctools-731 release): - Fixed s_thumb_set() in arm.c to set the N_ARM_THUMB_DEF bit in the sy_desc field of the symbol. Radar bug #6366869 Changes for the 5.26 release (the cctools-729 release): - Put back in the change below and removed the #ifdef CHANGE_FOR_6233320 in driver.c . Radar bug #6233320. Changes for the 5.26 release (the cctools-728 release): - Changed arm_force_relocation() in arm.c so the the first if() conditional includes the check for the relocation type BFD_RELOC_THUMB_PCREL_BRANCH25 to cause it to generate a relocation entry for thumb2 b.w version of the branch. Radar bug #6297258. - Changed md_apply_fix() in arm.c in the BFD_RELOC_ARM_SWI case if conditonal from this: if (fixP->tc_fix_data != 0) to: if (*((int*)fixP->tc_fix_data) != 0) Radar bug #6337904. - Backed out the change below with an #ifdef CHANGE_FOR_6233320 in driver.c for now. Radar bug #6233320. Changes for the 5.26 release (the cctools-727 release): - Put back in the change below and removed the #ifdef CHANGE_FOR_6233320 in driver.c . Radar bug #6233320. Changes for the 5.26 release (the cctools-724 release): - Backed out the change below with an #ifdef CHANGE_FOR_6233320 in driver.c for now. Radar bug #6233320. Changes for the 5.26 release (the cctools-723 release): - Changed the assember driver, /usr/bin/as , when running on an Intel x86_64 host to default to -arch x86_64 instead of -arch i386. The change was in driver.c in main() after it finds no arch_name set and calls get_arch_from_host(). A test for cputype == CPU_TYPE_I386 is made and if true the arch_flag gets set to the family flag for CPU_TYPE_X86_64. Radar bug #6233320. - radr://4545225 assembler should implement all dwarf-related GAS pseudo-ops This is NOT yet hooked up as of cctools-723, but the code changes are put in to top of tree to since they build and do not effect the operation of the assembler's existing functionality. - Moved now_seg definition from layout.c to sections.c and added the definition of now_subseg to sections.c. Added their declrations to sections.h . - Changed section_new() sections.c to always set now_seg as the value from the frch_nsect field in the struct frchain for the current section. now_subseg is always left with a value of zero. - This is done so now_seg can be used dwarf2dbg.c for the seg field of the struct line_seg. And letting now_subseg remain zero so there are just one line_subseg per line_seg. - Added the new routines get_section_by_nsect(), get_section_by_name() and section_set() to sections.[ch] . - Added dwarf2dbg.c from GAS and ported it: - The routine dwarf2_finish() got a bit of a rewrite to deal with Mach-O objects. And now uses section_new() and get_section_by_name() to see if it exists to replace the bfd_get_section_by_name() test. - Changed the three uses of seg_info() to get_section_by_nsect() and modified the code to use the returned struct frchain pointer. - The routines to emit the dwarf sections: out_debug_line(), out_debug_ranges(), out_debug_aranges(), out_debug_abbrev(), out_debug_info() were changes to instead take segT parameters to take struct frchain * parameters and there names changed to XXX_section from XXX_seg. - Changed subseg_set() to a new routine section_set() that was added to change sections. - Changed the call to resolve_symbol_value() in both dwarf2dbg_estimate_size_before_relax() and dwarf2dbg_convert_frag() to use the frag's values to calculate this. - The use of O_subtract with expressionS and use of the X_op_symbol field for the symbol value to subtract were change to use SEG_DIFFSECT and X_subtract_symbol instead. - Added rs_dwarf2dbg to relax_stateT enum in relax.h . - Added a definition and declration of debug_type and enum debug_info_type to as.[ch] and changed main() to set set debug_type to DEBUG_DWARF2 when the argument --gdwarf2 is specified. - Added an emit_expr() routine to dwarf2dbg.c based on the functionality of the one in GAS's read.c but just for the ported uses in dwarf2dbg.c . - Added to symbols.[ch] the routines: symbol_temp_new(),symbol_temp_new_now(), symbol_temp_make() and symbol_set_value_now() needed in dwarf2dbg.c . - Added a section_symbol field to the frchain struct in sections.h . - Added to sections.[ch] section_symbol() to create and set a symbol at the start of the section. - Changed all the routines used in the poc_handler field of a pseudo_typeS to change its parameter from int to uintptr_t to get rid of warnings. See Radar bug #6219587 below. Changes for the 5.26 release (the cctools-722 release): - Changed s_fill() in read.c to allow .fill with a size of 8. Radar bug #5783217. Changes for the 5.26 release (the cctools-718 release): - Fixed a bug in read.h which had an incorrect prameter type for the poc_handler function pointer field of the pseudo_typeS typedef. The poc_val parameter was an int type but is used to hold pointers so it needs to be a uintptr_t type. Radar bug #6219587. Changes for the 5.26 release (the cctools-716 release): - Fixed a bug in s_zerofill() in read.c caused by the change in Radar bug #6159238 where it needed to change to handle the case of an extra space after the segment name before a comma in the parsing. Radar bug #6195283. - Fixed a bug in parse_neon_el_struct_list() in arm.c where it was loosing the information about the index used for things like "d0[]" and making it look like "d0". In the loop to parse the argument list, in the is case "{d0[]-d1[0]}" it called parse_typed_reg_or_scalar() which was passed pointer to a neon_typed_alias struct, atype, to fill in. Then when it gets to parsing the "-" it does not look at the atype.defined like the code after the parsing of "-". So that same bit of code which looks like: if ((atype.defined & NTA_HASINDEX) != 0) { if (lane == -1) lane = atype.index; else if (lane != atype.index) { first_error (_(type_error)); return FAIL; } } else if (lane == -1) ... to match what is done after the the parsing of "-" so it does not lose the information about the index of "d0[]". What was happening for example was this instruction: vld1.f32 {d0[]-d1[]}, [r0] was ending up as this instruction: vld1.32 {d0-d1}, [r0] Radar bug #6185952. Changes for the 5.26 release (the cctools-715 release): - Fixed the .thumb_set directive fails which was failing to parse its second operand. The fix was in s_thumb_set() to include the call to pseudo_set() outside the #ifdef. And to change pseudo_set() in read.[ch] to not be static. Radar bug #6182961. - Fixed the handling of -force_cpusubtype_ALL for the arm assembler. The code near the end of md_begin() that tested for force_cpusubtype_ALL needed to be changed to set the cpu_variant variable to allow everything and to set archflag_cpusubtype to CPU_SUBTYPE_ARM_ALL as that is what will get set into the resulting object file (not md_cpusubtype). Radar bug #6150777. - Fixed a problem with the change to Radar bug #4141844 where it was trying to allow a prefix on the same line as the instruction without a separating shash, '/', character. The original change added a new "substate" variable to app.c. But there were cases that it did not get set back it its initial value of zero at the start of each line (state 0). So to make this a bit more robust all places where the state gets set back to zero the substate is also set to zero. Radar bug #6159238. Changes for the 5.26 release (the cctools-714 release): - Added the arm instructions vmrs and vmsr to be the same as fmrx and fmxr in arm.c . Radar bug #6152739. - Fixed a bug where the field sy_has_been_resolved in the symbol struct was being used uninitialized. The fix is in symbol_new() in symbols.c . Radar bug #6163385. Changes for the 5.26 release (the cctools-713 release): - Changed an error message in md_apply_fix() for the BFD_RELOC_ARM_OFFSET_IMM8 case to use as_bad_where() not as_bad() so a file and line number gets printed. Radar bug #5890008. Changes for the 5.26 release (the cctools-711 release): - Fixed a problem with getting the correct value of a difference of two symbols that it was divided by 2 for 32-bit targets. As the resulting value was being calculated into a 64-bit signed type, signed_expr_t, with a += of an expression of 2 32-bit unsigned types in fixup_section() in layout.c . Radar bug #6096697. Changes for the 5.26 release (the cctools-709 release): - Fixed a problem with .quad expression values getting assembled with constants larger than 32-bits being added to symbols. Two places were using 32-bit types, the offset field in the fix struct in fixes.h and the local variable value in fixup_section() in layout.c . Radar bug #5955044. - Removed the call to abort() in reloc() in i386.c that should not be there after a call to as_bad() to generate an error message. Radar bug #6029941. Changes for the 5.26 release (the cctools-706 release): - Fixed a problem with the ported to run on 64-bit hosts, where changes to atof-generic.c had 3 places change to uint32_t which should have been int32_t. Changes for the 5.26 release (the cctools-705 release): - Ported to run on 64-bit hosts. Radar bug #6022298 Changes for the 5.26 release (the cctools-703 release): - Added the .inlineasmstart and .inlineasmend directives to check that only numeric lables are defined between them. And if not generate an error message from the arguments of the .inlineasmstart directive. Radar bug #5896375. - In read.c added the new routine s_inlineasm() and added it to the pseudo_table[]. For the .inlineasmstart directive, s_inlineasm() is passed a value of 1 and parses out the optional file_name, line_number and column_number arguments. When the .inlineasmstart directive is see it sets the new inlineasm_checks variable and fills in the new variables inlineasm_file_name, inlineasm_line_number and inlineasm_column_number with the arguments. And when the .inlineasmend directive is seen it clears the new variables. The new variables are defined in read.[ch]. - The routine colon(), in symbols.[ch], was changed to take a new parameter local_colon that is set when called by local_colon. And a test was added if inlineasm_checks is set and local_colon() is not to cause an error. If inlineasm_file_name is set then the new routine, in messages.[ch], as_warn_where_with_column() is called else as_bad() is called to generate the error message. - The two plaves in read.c that call colon() had a 0 second argument added and the call to colon() from local_colon() in symbols.c had a 1 second argument added. - Improved the x86_64 assembly time by caching the value of the linked list search of x86_64_resolve_local_symbol() in i386.c. Added two fields, sy_has_been_resolved and sy_prev_resolved, to the symbol structure in struc-symbol.h. Radar bug #5902686. Changes for the 5.26 release (the cctools-701 release): - Fixed a problem in expr() in expr.c when it is combining a symbol that is a set to a substract expression, SEG_DIFFSECT, with a constant. In that case it gets incorrectly combined to a SEG_ABSOLUTE instead of retaining the SEG_DIFFSECT expression type. Also Changed the x86_64 assembler to allow a 32-bit displacement operand as a symbol set to the subtraction of two instructions. Code was added in output_disp() in i386.c to test for this specific case and create the needed fix for it. Radar bug #5683920. - Fixed a problem in pseudo_set() in read.c when it is setting a symbol to another symbol that was already a section difference expression. In that case expression() returns an expression of just one symbol and a type of SEG_DIFFSECT. Code at the case for SEG_DIFFSECT needed to be added to handle this case and copy the expression of the symbol in to the new symbol being set. Radar bug #5684077. - Changed the x86_64 assembler to allow a 32-bit displacement operand as a subtraction of two instructions. Code was added in output_disp() in i386.c to test for this specific case and create the needed relocation entries for it. Radar bug #5622258. Changes for the 5.25 release (the cctools-697 release): Changes for the 5.25 release (the cctools-689 release): - Fixed a place that needed force_cpusubtype_ALL tested in md_assemble() in arm.c . Radar bug #5817558. - Added support for the special assembly time constant expression of the diff- erence of two symbols defined in the same section then divided by exactly 2. Radar bug #5819903. - Added the field X_sectdiff_divide_by_two to the expressionS typedef in expr.h . - In expr() in expr.c added code to look for an expression with a SEG_DIFFSECT and a left side with an SEG_ABSOLUTE X_add_number == 2 and a O_divide right side and if so set the new X_sectdiff_divide_by_two field. - Added the field fx_sectdiff_divide_by_two to the struct fix. - Changed cons() in read.c to save the fix for a SEG_DIFFSECT and to copy the the new X_sectdiff_divide_by_two field from the expression to the new fx_sectdiff_divide_by_two field in the fix. - In fixup_section() in layout.c added code to test the news fx_sectdiff_divide_by_two field and if so divide the value by 2. And check to see that the expression is an assembly time constant. Changes for the 5.25 release (the cctools-686 release): - Changed arm_relax_frag() in arm.c to take a section number for the section it is operating on. That is in turn now passed to relax_branch() in arm.c and in there if the symbol that is being branched to is not for that section it returns 4 for the size of the instruction. - In md_apply_fix() for BFD_RELOC_THUMB_PCREL_BRANCH25 the fx_r_type type is set to BFD_RELOC_THUMB_PCREL_BRANCH23 so it can be output as a known relocation type (ARM_THUMB_RELOC_BR22). Changes for the 5.25 release (the cctools-685 release): - Changed relaxed_symbol_addr() in arm.c to also add in fragp->fr_symbol->sy_nlist.n_value when calculating the addr. Without this it can some times get "branch out of range" errors since it appears this to have the address of the symbol from the start of the fragment. - Changed the check in md_assemble() in arm.c for "width suffixes are invalid in ARM mode" to allow them with unified syntax. - Changed the arm APPLE LOCAL trap instruction opcode entry in arm.c from this: CE(trap, 7ffdefe, 0, (), noargs), to this: TUE(trap, 7ffdefe, defe, 0, (), noargs, noargs), which allows it to work with thumb mode. - Changed relax_section() in layout.c in two plaves #ifdef'ed ARM. In the first look it now sets frag's relax_marker field to zero. In the "Do relax" loop it flips the relax_marker field with an "^= 1". This is to fix a problem in relaxed_symbol_addr() so it knows to add the stretch amount to the addr it is returning. - Added a second call to as_file_and_line() in frag_var() in frags.c which was #ifdef ARM at the top of the file to set the fr_file and fr_line fields of the current frag before creating a new frag. This is needed because as the line number of the last instruction which is the "relaxable" instruction is the line number that is needed (not the first one). So when relax_section() calls arm_relax_frag() which calls md_convert_frag() it will call fix_new_exp() and fix_new_internal() so a new fix may be created after all code is read for the last instruction in the frag. So md_convert_frag() copies the fr_file and fr_line fields of the frag into the fx_file and fx_line fields of the fix so line numbers can be reported. Changes for the 5.25 release (the cctools-684 release): - Changed relaxed_symbol_addr() in arm.c to not use the hack ported S_GET_VALUE() as at that point the symbol does not have the value set. The code was #ifdef NOTYET to use fragp->fr_symbol->sy_frag->fr_address to get the address from the symbol's frag. The hack ported S_GET_VALUE() routine was removed from symbols.[ch]. - Changed relax_addsub() where it had a memcpy() hack in place of the #ifdef NOTYET out call to bfd_get_16() to a call to a call to md_chars_to_number() to retrive the old thumb opcode into op that output_relax_insn() put into the frag. - Added a call to as_file_and_line() in frag_var() in frags.c which was #ifdef ARM to set the fr_file and fr_line fields of the frag. This is needed because when relax_section() calls arm_relax_frag() which calls md_convert_frag() it will call fix_new_exp() and fix_new_internal() so a new fix will be created after all code is read. So md_convert_frag() copies the fr_file and fr_line fields of the frag into the fx_file and fx_line fields of the fix so line numbers can be reported. Changes for the 5.25 release (the cctools-683 release): - Fixed a bug in fix_new_arm() in arm.c after the call to fix_new_exp() before the default: case label as missing a break; statement. - Fixed a bug in relax_section() in layout.c for the "Do relax" loop where the call to arm_relax_frag() should have set the variable growth not incremented. The "+=" was change to just an assignment, "=". Changes for the 5.25 release (the cctools-682 release): - Changed relax_section() in layout.c for the "Do relax" loop and #ifdef'ed ARM the rs_machine_dependent case to call arm_relax_frag(). - Changed md_convert_frag() where it had a memcpy() hack in place of the #ifdef NOTYET out call to bfd_get_16() to a call to a call to md_chars_to_number() to retrive the old thumb opcode into old_op that output_relax_insn() put into the frag. Changes for the 5.25 release (the cctools-681 release): - Removed all __OPEN_SOURCE__ references in Makefile, notes, as.c, layout.c, messages.c, symbols.c, write_object.c, frags.h and symbols.h . - Fixed a bug in the table entries for the pextrq and pinsrq instructions as they should have had Size64 to force the REX.W byte. - Fixed a bug in the table entries for the i386 SSE4.1 instruction insertps where it had the second parameter as a general register not a xmm register. The change was in i386-opcode.h to change Reg32 and Reg64 to RegXMM. Radar bug #5650346. - Changed output_relax_insn() in arm.c to just used the undefined symbol instead of calling make_expr_symbol() if the expression is a just an undefined symbol and no subtract symbol. Changes for the 5.25 release (the cctools-680 release):