1- cpusubtype_findbestarch() in best_arch.c when passed CPU_SUBTYPE_POWERPC_ALL 2 as the cpusubtype and only 7440 and 750 were in the fat file nothing was 3 selected. Is this right? 4 5TODO: 6- Deal with LC_PREPAGE and unknown load commands that don't need to be swapped. 7 8Changes for the 5.33 release (the cctools-845 release): 9- Added the lib_static_ofiles Makefile target to be used by the top level 10 Makefile so that it does not use the all target and causing libstuff.a to 11 be overwritten when built with the SED_RC_CFLAGS without the 64-bit archs. 12 Radar bug #13461906. 13 14Changes for the 5.33 release (the cctools-841 release): 15- Added support for the LC_LINKER_OPTION load command. Radar bug #12906665. 16 - Added swap_linker_option_command() to bytesex.c . 17 - Added support for the LC_LINKER_OPTION command in check_Mach_O() in 18 ofile.c and in swap_object_headers() in swap_headers.c . 19- Changed llvm_create_disasm() in llvm.c and added a CPU argument. 20 Radar bug #12839170. 21 22Changes for the 5.33 release (the cctools-840 release): 23- Changed llvm_create_disasm() in llvm.c to now call lto_initialize_disassembler 24 if it exists. Radar bug #12750395. 25- Added support for new archs: armv6m / armv7m / armv7em . Radar bug #11314463. 26 - Added entries to the arch_flags[] table in arch.c . 27 - Updated cpusubtype_findbestarch() in best_arch.c . 28 - Updated get_arch_from_host() in get_arch_from_host.c . 29 - Updated get_lto_cputype() in lto.c . 30- Added support for marked up llvm disassembler output. Radar bug #11764962. 31 - Added llvm_disasm_set_options() to llvm.c . 32 33Changes for the 5.32 release (the cctools-835 release): 34- Added support for the LC_ENCRYPTION_INFO_64 load command. Radar bug #11862845. 35 - Added swap_encryption_command_64() to bytesex.c . 36 - Added support for the LC_ENCRYPTION_INFO_64 command in check_Mach_O() in 37 ofile.c and in swap_object_headers() in swap_headers.c . 38 39Changes for the 5.32 release (the cctools-830 release): 40- Added swap_data_in_code_entry() to bytesex.c. Radar bug #11498575. 41 42Changes for the 5.31 release (the cctools-829 release): 43- Fixed the change in check_fat_object_in_archive() in ofile.c to handle llvm 44 bitcode in fat files in archives for Radar bug #9087924. The added code was 45 slightly in the wrong place. Radar bug #11423019. 46 47Changes for the 5.31 release (the cctools-827 release): 48- Changed check_fat_object_in_archive() in ofile.c to handle llvm bitcode in 49 fat files in archives. Radar bug #9087924. 50- Fixed the type of the second parameter to in the calls to 51 _NSGetExecutablePath() so they are uint32_t in execute.c llvm.c lto.c. 52 Radar bug #11274640. 53 54Changes for the 5.31 release (the cctools-825 release): 55- Changed the type of the local variables size and offset from uint32_t to 56 uint64_t in ofile_first_member(), ofile_next_member(), ofile_specific_member() 57 and check_archive() in ofile.c . Radar bug #11089424. 58 59Changes for the 5.31 release (the cctools-824 release): 60- Added a test of filetype not being MH_DSYM before the calls to 61 check_overlaping_element() for section contents in check_Mach_O() in ofile.c 62 to allow the tools to work with dSYM files. Radar bug #8483201. 63- Change the Makefile to also use -I$(DT_TOOLCHAIN_DIR)/usr/local/include where 64 it uses -I/Developer/usr/local/include. When the project nolonger neededs to 65 build on older system then the -I/Developer/usr/local/include can be removed. 66 Radar bug #11015395. 67- Changed one check in check_Mach_O() when checking that the section offset is 68 greater than the size of headers to not cause an error when the section size 69 is zero. Radar bug #9608550. 70- Changed the size variable in ofile_map() and the size parameter in 71 ofile_map_from_memory() from a uint32_t type to a uint64_t type. Radar bug 72 #10645295. 73 74Changes for the 5.30 release (the cctools-822 release): 75- The "low risk fix to strip(1)" below in cctools-821 for Radar bug #10718585 76 breaks striping .o files with dwarf debug info. Because the input file has 77 an "ld -r" run on it so it is not the original input file. That change has 78 been backed out. 79 80Changes for the 5.30 release (the cctools-821 release): 81- As part of a low risk fix to strip(1) to fix bugs when stripping objects with 82 code signature data, code was added in dyld_order() in checkout.c that 83 records the size of the symbolic information in the new field 84 checkout_sym_info_size in the object struct. Radar bug #10718585. 85 86Changes for the 5.30 release (the cctools-820 release): 87- Added creating an apple_version.c file in the Makefile that uses 88 $(RC_ProjectSourceVersion). Radar bug #10596469. 89 90Changes for the 5.30 release (the cctools-814 release): 91- Added support for new load commands LC_MAIN, LC_DATA_IN_CODE, 92 LC_SOURCE_VERSION and LC_DYLIB_CODE_SIGN_DRS. 93 - Added swap_entry_point_command() and swap_source_version_command() 94 added to bytesex.c . 95 - Added code in check_Mach_O() in ofile.c to check the new load commands. 96 - Added code in swap_object_headers() in swap_headers.c for the new load 97 commands. 98 - Added code in check_object() and dyld_order() in checkout.c for 99 LC_DATA_IN_CODE and LC_DYLIB_CODE_SIGN_DRS load commands. 100 - Added code in copy_new_symbol_info() in writeout.c for the data of the new 101 LC_DATA_IN_CODE and LC_DYLIB_CODE_SIGN_DRS load commands. 102 Radar bug #10290817. 103- Update copy_new_symbol_info() in writeout.c to handle object files without 104 an LC_DYLD_INFO to that might have a LC_FUNCTION_STARTS load command 105 and write out its data. Radar bug #10171548. 106 107Changes for the 5.27 release (the cctools-809 release): 108- Added is_llvm_bitcode_from_memory() to "stuff/lto.h" and changed 109 is_llvm_bitcode() to use it. Changed set_lto_cputype() to get_lto_cputype() 110 and to take a pointer to an arch_flag struct. Radar bug #9087924. 111 112Changes for the 5.27 release (the cctools-806 release): 113- Maded more changes to check_archive_toc() only set the new ofile bad_toc 114 field when the anything is bad about the table of contents. Radar bug 115 #9594589. 116 117Changes for the 5.27 release (the cctools-805 release): 118- Changed check_archive_toc() to set the new ofile bad_toc field when the 119 file offset or string offset of a toc entry is out of range. This will 120 cause libtool/ranlib to rebuild it. Radar bug #9475790. 121 122Changes for the 5.27 release (the cctools-804 release): 123- Fixed a bug that when check_archive_toc() was geting called when the whole 124 was not a file is a thin archive it was producing an error when it should 125 have just not done the checks. Radar bug #9505797. 126 127Changes for the 5.27 release (the cctools-803 release): 128- Changed ofile_first_member() in ofile.c to fill in the added toc_* fields in 129 the ofile struct. And added a check_archive_toc() routine to make sure 130 the table of contents offests are valid. Radar bug #9354605. 131 132Changes for the 5.28 release (the cctools-801 release): 133- Changed ofile_map_from_memory() to take an mtime parameter and ofile_map() 134 to pass it. ofile_map_from_memory() then saves that into the ofile's new 135 file_mtime field. Changed breakout_mem() in breakout.c to pass 0 as the mtime 136 parameter. Radar bug #9354501 137 138Changes for the 5.28 release (the cctools-800.3 release): 139- Added armv7[fsk] entries to arch_flags[] in arch.c, code in set_lto_cputype() 140 in lto.c, code in get_arch_from_host() in get_arch_from_host.c and code in 141 cpusubtype_findbestarch() in best_arch.c for these. Radar bug #8987684. 142 143Changes for the 5.28 release (the cctools-799 release): 144- Changed is_llvm_bitcode() in lto.c to check for a filesize of zero and just 145 return since the libLTO API's will crash it handed a empty file. Radar bug 146 #8628314. 147 148Changes for the 5.28 release (the cctools-798 release): 149- Changed is_llvm_bitcode() in lto.c to first call 150 lto_module_is_object_file_in_memory(). Radar bug #8628314. 151 152Changes for the 5.28 release (the cctools-797 release): 153- Added support for LC_DYLD_ENVIRONMENT in swap_headers.c and ofile.c . 154 Radar bug #8653976. 155 156Changes for the 5.28 release (the cctools-795 release): 157- Fixed symbol_string_at_end() to allow for a the codesign data at the end of 158 the file before the string table. Radar bug #8308587. 159 160Changes for the 5.28 release (the cctools-792 release): 161- Fixed problems with not coping out the function start info. Updated 162 copy_new_symbol_info() to uses the new fields for the info and copy the info 163 into the output buffer. Radar bug #8401082. 164 165Changes for the 5.28 release (the cctools-791 release): 166- Fixed some missing copy and paste errors swap_object_headers() in 167 swap_headers.c where it was using ld-> not vc-> for the LC_VERSION_MIN_* 168 stuff. 169 170Changes for the 5.28 release (the cctools-790 release): 171- Fixed problems with the incorrect support for LC_VERSION_MIN_* and 172 LC_FUNCTION_STARTS. Radar bug #8274584. 173 - In check_Mach_O() in ofile.c needed to set vers to NULL. 174 - In check_object() in checkout.c added code to set the new 175 func_starts_info_cmd field. 176 - In dyld_order() in checkout.c added code to check that if the 177 func_starts_info_cmd is set its data is after the split-seg data and before 178 the symbol table. 179 180Changes for the 5.27 release (the cctools-784 release): 181- Added swap_version_min_command() to bytesex.c . Added checking of the 182 new load commands to check_Mach_O() in ofile.c . Added swapping the new 183 commands to swap_object_headers() in swap_headers.c . Radar bug #7902277. 184 185Changes for the 5.27 release (the cctools-783 release): 186- Change code that used S_ZEROFILL to also use S_THREAD_LOCAL_ZEROFILL. 187 Radar bug #7796734. 188 189Changes for the 5.28 release (the cctools-781 release): 190- The check in check_Mach_O() in ofile.c that was checking that the addr field 191 of section less than the segment's vmaddr to not do that check if the Mach-O 192 file was an MH_DYLIB_STUB. Radar bug #7709068. 193- Removed the checking of LC_ENCRYPTION_INFO overlapping in check_Mach_O() in 194 ofile.c as it is part of the __TEXT segment and does overlap by design. 195 Also fixed a bug in check_overlaping_element() in ofile.c which did not catch 196 the size and offset completely covering an element in list. Radar bug 197 #7690872. 198- Added support in writeout.c to add content to Mach-O files so the 199 program ctf_insert(1) can add a (__CTF,__ctf) section to a statically 200 linked Mach-O file. Radar bug #7016839. 201- Added support for LC_LOAD_UPWARD_DYLIB in check_Mach_O() in ofile.c and 202 swap_object_headers() in swap_headers.c . Radar bug #7659206. 203 204Changes for the 5.28 release (the cctools-779 release): 205- Fixed a problem with the check for overlapping module table in check_Mach_O() 206 in ofile.c . It was using modtaboff when it should have been using nmodtab. 207 Radar bug #7520315. 208 209Changes for the 5.28 release (the cctools-778 release): 210- Fixed a problem with the check for overlapping local relocation entries in 211 check_Mach_O() in ofile.c . It was using locreloff when it should have been 212 using nlocrel. Radar bug #7479717. 213 214Changes for the 5.28 release (the cctools-777 release): 215- Changed round() to rnd() and stuff/round.h to stuff/rnd.h in all files and 216 removed -fno-builtin-round from the Makefile. Radar bug #7475139. 217- Changed the Makefile to use -Os for OFLAG. Radar bug #7475093. 218- Changed the error checking in check_Mach_O() in ofile.c for checking that 219 a segment's filesize or section's size is not greater than its vmsize if the 220 vmsize is zero. As this is used for unmapped segments. Radar bug #7467115. 221 222Changes for the 5.28 release (the cctools-776 release): 223- Fixed a bug check_Mach_O() in ofile.c for looping over sections in a 64-bit 224 mach-O file. It was incrementing s not s64 at the end of the loop. 225- Improved the error checking in check_Mach_O() in ofile.c to make sure that 226 elements don't overlap. Added the struct element and the static routines 227 check_overlaping_element() and free_elements. And the calls to them in 228 check_Mach_O(). Also fixed the dyld info checking in case of integer over 229 flow and a logic error the was not getting to the checking the size. Radar 230 bug #6083845. 231- Improved the error checking in check_archive() in ofile.c to make sure that 232 member_size does not extend past the end of the file before the contents of 233 the member are used. Radar bug #6078200. 234- Improved the error checking in check_Mach_O() in ofile.c to make sure that 235 flavor and count that follow a thread command fits in side their command. 236 Radar bug #6179251. 237- Improved the error checking in check_Mach_O() in ofile.c to make sure that 238 commands fit inside their cmdsize. Also that thread states fit in side their 239 thread command. Radar bug #6077166. 240- Fixed the error check in check_fat() in ofile.c for the offset plus size so 241 it will be detected in the add overflows. Radar bug #6076414. 242- Improved the error checking in check_Mach_O() in ofile.c to make sure that 243 sections are contained in their segments. Radar bug #6081358. 244 245Changes for the 5.28 release (the cctools-775 release): 246- Updated reloc_has_pair() and reloc_is_sectdiff() in reloc.c for the new 247 arm HALF relocation entries. Radar bug #7421496. 248 249Changes for the 5.27 release (the cctools-769 release): 250- Changed round() in round.c to take and return uint64_t types. Radar bug 251 #7245879. 252 253Changes for the 5.27 release (the cctools-767 release): 254- Updated get_byte_sex_from_flag() in arch.c to include CPU_TYPE_X86_64. Radar 255 bug #7222145. 256 257Changes for the 5.27 release (the cctools-762 release): 258- Changed the Makefile to set CC when when SDKROOT is set. Radar bug #7078805. 259 260Changes for the 5.27 release (the cctools-760 release): 261- Changed the sources so the armv7 stuff is a no longer #ifndef __OPEN_SOURCE__ 262 Radar bug #7016121. 263 - Changed the Makefile and removed the OPEN macro which was -D__OPEN_SOURCE__ 264 and removed it from CFLAGS. 265 - Removed #ifndef __OPEN_SOURCE__ 266 bracketed armv7 references. 267 268Changes for the 5.27 release (the cctools-759 release): 269- Changed the Makefile to add -isysroot $(SDKROOT) to compile and link lines 270 when SDKROOT is set. Radar bug #6965029. 271 272Changes for the 5.26 release (the cctools-758 release): 273- Changed ofile_process() in ofile.c to default to 64-bit intel if the program 274 is being run as a 64-bit binary on an intel machine. Radar bug #6942056. 275 276Changes for the 5.26 release (the cctools-756 release): 277- Added add_execute_list_with_prefix() to execute() to add a string prefixed 278 with the executable's path. Radar bug #6821441. 279 280Changes for the 5.26 release (the cctools-753 release): 281- Changed the Makefile to not use -iwithsysroot when RC_MAJOR_RELEASE_TRAIN is 282 Tiger. Radar bug #6796174. 283 284Changes for the 5.26 release (the cctools-752 release): 285- Ported to build with clang. 286 - Changed Makefile to work around bugs 6756912 and 6757212. 287 - Added cast to int in swap_headers.c (two places) and ofile.c in switch 288 statements (one place). 289 - Fixed warnings about extra tokens at end of #endif directive in ofile.c 290 by putting them in a comment. 291 292Changes for the 5.26 release (the cctools-750 release): 293- Added lto_get_nlist_64() to lto.c for use by nm(1) print information from 294 llvm bit code files. Radar bug #6067110. 295- Updated set_lto_cputype() in lto.c for the arm target_triples. Radar bug 296 #6654890. 297 298Changes for the 5.26 release (the cctools-748 release): 299- Fixed a bug in swap_object_headers() where it was missing a second case for 300 LC_DYLD_INFO_ONLY which caused that load command to not actually get swapped. 301 Radar bug #6591303. 302 303Changes for the 5.26 release (the cctools-733 release): 304- Changed check_Mach_O() in ofile.c to allow 64-bit Mach-O core files to have 305 LC_THREAD commands that are only a multiple of 4 and not 8 since the kernel 306 produces them. Radar bug #6379874. 307 308Changes for the 5.26 release (the cctools-730 release): 309- Changed set_lto_cputype() in lto.c to also check for "i386" as well as "i686" 310 when determining the target_triple string is for a CPU_TYPE_I386. Radar bug 311 #6331191. 312 313Changes for the 5.26 release (the cctools-726 release): 314- Changed lto_toc_symbol() in lto.c to return 0 for symbols with the 315 LTO_SYMBOL_SCOPE_MASK bits being LTO_SYMBOL_SCOPE_INTERNAL. 316 Radar bug #6092587. 317 318Changes for the 5.26 release (the cctools-725 release): 319- Added support for new compressed LINKEDIT information. Radar bug #6232822. 320 - Implemented swap_dyld_info_command() in bytesex.c . 321 - Handle LC_DYLD_INFO in check_object() and dyld_order() in checkout.c . 322 - Check for malformed dyld_info in check_Mach_O() in ofile.c . 323 - Handle dyld_info in swap_object_headers() in swap_headers.c . 324 - Handle dyld_info in copy_new_symbol_info() in writeout.c . 325 326Changes for the 5.26 release (the cctools-721 release): 327- Changed the Makefile and removed -force_cpusubtype_ALL from KERN. Radar bug 328 #6233829. 329 330Changes for the 5.25 release (the cctools-718 release): 331- Added swap_debug_directory_entry() and swap_mtoc_debug_info() to 332 coff_bytesex.c. Radar bug #6211642. 333 334Changes for the 5.26 release (the cctools-709 release): 335- Fixed the integer overflows bugs in ofile.c: 336 - In check_Mach_O() in ofile.c changed the check for inconsistent cmdsize in 337 an LC_SEGMENT to calculate the size into a 64-bit value from the 32-bit 338 values and used a 64-bit compare so it can't overflow. Radar bug #5749756. 339 - In check_Mach_O() in ofile.c changed the check for load command that extend 340 past the commands to calculate the end of the current load command into 341 a 64-bit value from the 32-bit value and use a 64-bit compare against the 342 sizeofcmds so it can't overflow. Radar bug #5749890. 343 - In check_Mach_O() in ofile.c change all the remaining checks to calculate 344 the size or count into a 64-bit value from the 32-bit values and use a 345 64-bit compare so it can't overflow. Radar bug #5750382. 346 347Changes for the 5.26 release (the cctools-708 release): 348- Changed writeout.c to use use the ar long string format for the __.SYMDEF 349 table of contents member so it will produce archive member offsets after 350 that that are 8 byte aligned. 351- Updated the #ifdef around ALIGNMENT_CHECKS_ARCHIVE_64_BIT to not do it when 352 __x86_64__ is defined. 353 354Changes for the 5.26 release (the cctools-707 release): 355- Added -I/Developer/usr/local/include to the lto.o build line in the Makefile. 356 357Changes for the 5.26 release (the cctools-705 release): 358- Ported to work on 64-bit hosts. Radar bug #6022298. 359 - Changed the unsigned long types in coff_bytesex.c to a uint32_t types. 360 - Changed the unsigned long types in version_number.c to a uint32_t types. 361 - Changed the unsigned long types in symbol_list.c to a uint32_t types. 362 - Changed the unsigned long types in round.c to a uint32_t types. 363 - Changed the unsigned long types in reloc.c to a uint32_t types. 364 - Changed the unsigned long types in ofile.c to a uint32_t types and changed 365 the long types to int32_t types. Except for the sizeof(long) used for 366 thread states it was changed to sizeof(uint32_t). Also change all the %lu 367 formats to %u and one %ld to %u. Also changed uses of ULONG_MAX to 368 UINT_MAX. 369 - Changed the unsigned long type in ofile_get_word.c to a uint32_t type and 370 changed the long type to an int32_t type. 371 - Changed the unsigned long types in macosx_deployment_target.c to uint32_t 372 types and %lu to %u in a sprintf format string. 373 - Changed the unsigned long types in lto.c to size_t types. 374 - Changed the unsigned long types in hppa.c to uint32_t types. 375 - Changed the long types in hash_string.c to int32_t types. 376 - Changed the long types in execute.c to int types. 377 - Changed the unsigned long types in seg_addr_table.c to uint32_t types and 378 changed %lu to %u in an error string formats. Also changed uses of 379 ULONG_MAX to UINT_MAX. And changed to use mmap() instead of map_fd(). 380 - Changed the type of errors in errors.c from an unsigned long type to a 381 uint32_t type. 382 - Changed the unsigned long types in dylib_table.c to uint32_t types and 383 changed 3 %lu to %u in an error string formats. 384 - Changed the one unsigned long type in dylib_roots.c to a uint32_t type. 385 - Changed the unsigned long type and the unsigned int type in crc32.c to 386 uint32_t types. 387 - Changed the unsigned long types in bytesex.c and get_toc_byte_sex.c to 388 uint32_t types. 389 - Changed the unsigned long types in checkout.c to uint32_t types. And changed 390 one %lu to %u in an error string format. 391 - Changed the unsigned long types in writeout.c to uint32_t types. Except for 392 the time variables which were changed to the time_t type from unsigned long. 393 Also changed the remaining long types to int32_t types. And changed one 394 %lu to %u in an error string format. Also changed uses of ULONG_MAX to 395 UINT_MAX. 396 - Changed the unsigned long types in breakout.c to uint32_t types. And added 397 two (long unsigned int) casts before two printf() parameters. 398 - Changed the type that cpusubtype_findbestarch() takes in best_arch.c to a 399 uint32_t from an unsigned long. And changed the remaining use of 400 unsigned long to uint32_t in best_arch.c . 401 - Changed the type that get_stack_size_from_flag(), get_segalign_from_flag() 402 and get_shared_region_size_from_flag() returns in arch.c to a uint32_t from 403 an unsigned long. Changed the type that get_stack_direction_from_flag() 404 returns in arch.c to an int from a long. Changed the remaining uses of 405 unsigned long to uint32_t in arch.c . 406 - Changed the type that allocate() and reallocate() takes in allocate.c to a 407 size_t from an unsigned long. 408 409Changes for the 5.26 release (the cctools-703 release): 410- Fixed an incorrect usage of the unsigned long type that should have been 411 uint32_t in swap_object_headers() in swap_headers.c and in check_Mach_O() in 412 ofile.c used in arm threads . 413- Fixed a warning in swap_object_headers() in swap_headers.c that was using the 414 wrong pointer type in the first LC_ENCRYPTION_INFO case. 415 416Changes for the 5.26 release (the cctools-701 release): 417- Changed ofile_first_member() in ofile.c to test the archive member name for 418 "__.SYMDEF SORTED" or "__.SYMDEF" and not call is_llvm_bitcode() if the 419 member name is either of those two table of contents member names. 420 Radar bug #5919409. 421 422Changes for the 5.25 release (the cctools-698 release): 423- Added support for LLVM bitcode files. Radar bug #5712460. 424 It was added undef the ifdef LTO_SUPPORT and can be disabled by setting the 425 LTO Makefile macro to nothing instead of its default -DLTO_SUPPORT . 426 - Added lto.c with new routines to support llvm bitcode files. 427 - Added lto.c to the Makefile and the LTO macro defined to -DLTO_SUPPORT to 428 enable it. 429 - Added support for llvm bitcode files to ofile.c . 430 - ofile_map_from_memory() now calls is_llvm_bitcode() when it has an 431 unknown ofile type to see if it is a llvm bitcode file and make 432 the error checks against any arch_flag and object_name. 433 - ofile_first_member(), ofile_next_member() and ofile_specific_member() now 434 call is_llvm_bitcode() when it has an unknown member and sets it up the 435 ofile . They also clear the new lto* fields in the ofile. 436 437Changes for the 5.25 release (the cctools-697 release): 438- Changed the sources so the armv7 stuff is not in the open source version. 439 Radar bug #5844124. 440 - Changed the Makefile to add the OPEN macro as -D__OPEN_SOURCE__ and added it 441 to the CFLAGS. 442 - Added #ifndef __OPEN_SOURCE__ 443 references. 444 445Changes for the 5.25 release (the cctools-696 release): 446- Changed the Makefile to use -iwithsysroot as part of the KERN flags. 447 448Changes for the 5.25 release (the cctools-691 release): 449- Added support for the LC_ENCRYPTION_INFO load command. Radar bug #5811994. 450 - Added swap_encryption_command() to bytesex.c . 451 - Added support for the LC_ENCRYPTION_INFO command in check_Mach_O() in 452 ofile.c and in swap_object_headers() in swap_headers.c . 453 454Changes for the 5.25 release (the cctools-690 release): 455- Changed the Makefile to not build coff_bytesex.c if EFITOOLS is not set via 456 the top level Makefile. Radar bug #5826370. 457 458Changes for the 5.25 release (the cctools-688 release): 459- Added a case label for LC_LAZY_LOAD_DYLIB in check_Mach_O() in ofile.c and 460 in swap_object_headers() in swap_headers.c . Radar bug #5760930. 461 462Changes for the 5.25 release (the cctools-679.4 and cctools-686 releases): 463- Changed the Makefile to test OLD_LIBKLD passed down from the upper Makefile 464 so to not build libmacho_kld.a when OLD_LIBKLD is not YES. Radar bug #5780592. 465 466Changes for the 5.25 release (the cctools-682 release): 467- Changed get_macosx_deployment_target() in macosx_deployment_target.c under the 468 label bad_system_value to use 10.6 as the highest know shipping version. 469- Updated the logic in cpusubtype_combine() in best_arch.c to include armv7. 470 471Changes for the 5.25 release (the cctools-681 release): 472- Removed all __OPEN_SOURCE__ references in: Makefile, notes, arch.c, 473 best_arch.c, bytesex.c, get_arch_from_host.c, ofile.c, reloc.c and 474 swap_headers.c . 475 476Changes for the 5.25 release (the cctools-680 release): 477- Added support for ARMv7. Radar bug #5490815. 478 - Added "arm7" to arch_flags[] in arch.c . 479 480Changes for the 5.25 release (the cctools-678 release): 481- Added swap_ms_dos_stub(), swap_filehdr(), swap_aouthdr(), swap_scnhdr() and 482 swap_syment() to coff_bytesex.c . Radar bug #5536661. 483 484Changes for the 5.25 release (the cctools-677 release): 485- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . 486 Radar bug #5563553. 487 488Changes for the 5.25 release (the cctools-676 release): 489- Changed ofile_process() in ofile.c when dealing with a fat file where -arch 490 flags are specified on when to treat the -arch flag as a family flag. Now 491 the check for the family flag is done even if there is more than one -arch 492 flag. Radar bug #5205751. 493- Changed ofile_process() in ofile.c to call ofile_unmap() before returning. 494 Radar bug #5156499. 495- Added coff_bytesex.c to swap structs in PECOFF base relocation table. 496 Radar bug #5218665. 497- Change swap_base_relocation_block_header() in coff_bytesex.c to use SWAP_INT 498 in place of SWAP_LONG so it would not be undefined when __LP64__ is defined. 499 500Changes for the 5.25 release (the cctools-675 release): 501- Changed free_archs() in breakout.c to call ofile_unmap() on the new ld_r_ofile 502 field in the struct object if it is not NULL. It is set in strip(1) when 503 making an ld -r of an object for stripping DWARF. Radar bug #5343015. 504 505Changes for the 5.25 release (the cctools-673 release): 506- Changed the sources so the arm stuff is not in the open source version. 507 Radar bug #5326431. 508 - Changed the Makefile to build with -D__OPEN_SOURCE__ with $(OPEN) 509 - Added #ifndef __OPEN_SOURCE__ 510 arch.c, best_arch.c, bytesex.c, get_arch_from_host.c, ofile.c, reloc.c and 511 swap_headers.c . 512 513Changes for the 5.24 release (the cctools-669 release): 514- Change swap_arm_thread_state_t() in bytesex.c, check_Mach_O() in ofile.c and 515 swap_object_headers() in swap_headers.c to use SWAP_INT in place of SWAP_LONG 516 so it would not be undefined when __LP64__ is defined. 517 518Changes for the 5.24 release (the cctools-667.2 release): 519- Changed get_segalign_from_flag() in arch.c so that if returns 4K for 520 CPU_TYPE_POWERPC64 and CPU_TYPE_X86_64 so that the __LINKEDIT segment after 521 codesign_allocate(1) does not end up with zerofill (and writeable) pages at 522 the end. Radar bug #5363873. 523 524Changes for the 5.24 release (the cctools-663 release): 525- Changed get_macosx_deployment_target() in macosx_deployment_target.c so that 526 it now takes a pointer to a struct that it fills in with the major, minor and 527 name of the macosx_deployment_target. Also changed the default to be the 528 current version of the machine it is running on. Radar bug #5132019. 529 530Changes for the 5.24 release (the cctools-658 release): 531- Changed symbol_string_at_end() in checkout.c to also set the 532 input_indirectsym_pad field in the object structure for relocatable objects 533 just as dyld_order() does for fully linked objects. To deal correctly with 534 the fact that 64-bit files may or may not have padding after the indirect 535 symbol table entries. Radar bug #5054452. 536 537Changes for the 5.24 release (the cctools-657 release): 538- Fixed a problem with the fix below. Basically what was needed was to swap 539 back the headers of a fat file when ever only some parts were processed or 540 stepped over and other parts could be processed. The fix is the same as below 541 but in more places. This is now done by testing headers_swapped field in the 542 ofile struct can calling the new routine swap_back_Mach_O(). Radar bug 543 #5055223. 544 545Changes for the 5.24 release (the cctools-656 release): 546- Fixed a problem with the fix to Radar bug #4970647. That fix missed the 547 case when an architecture was swap a first time and used then stepped over a 548 second time. The fix was in ofile_process() in ofile.c to also check 549 the headers_swapped field in the case the architecture was used to also swap 550 it back. Radar bug #5047924. 551 552Changes for the 5.24 release (the cctools-653 release): 553- Updated ofile.c and swap_headers.c to handle the LC_REEXPORT_DYLIB load 554 command. Radar bug #4986624. 555 556Changes for the 5.24 release (the cctools-651 release): 557- Changed check_Mach_O() in ofile.c to set the new headers_swapped field in the 558 ofile struct. Then in ofile_process() for looping through a fat file this 559 is checked and if TRUE, cleared and the headers are swapped back. 560 Radar bug #4970647. 561 562Changes for the 5.24 release (the cctools-645 release): 563- Added support for rpath load command. Radar bug #4822880. 564 - Added swap_rpath_command() to bytesex.c . 565 - Updated swap_object_headers() in swap_headers.c to support the LC_RPATH 566 load command. 567 - Added checks in check_Mach_O() in ofile.c to all the LC_RPATH load command. 568 569Changes for the 5.24 release (the cctools-648 release): 570- Changed the check in ofile_map_memory(1) for the nfat_arch being too large 571 so the check does not overflow and later cause a crash. Then changed the 572 #ifdef'ed OTOOL code to simply allocate the size of the file minus the fat 573 header for swapping and printing. Radar bug #4860769. 574 575Changes for the 5.24 release (the cctools-644 release): 576- Changed ofile_map() in ofile.c to test if the size of the file attempted to 577 be mmap(2)'ed is zero and not call mmap(2). Radar bug #4795458. 578- Added entries in arch_flags[] in arch.c for veo3 & veo4. Added code for 579 CPU_SUBTYPE_VEO_3 and CPU_SUBTYPE_VEO_4 to cpusubtype_findbestarch() and 580 cpusubtype_combine() in best_arch.c and to get_arch_from_host() in 581 get_arch_from_host.c . Radar bug #4799550. 582- Changed get_stack_addr_from_flag() in arch.c to return a uint64_t and added 583 case values for CPU_TYPE_POWERPC64 and CPU_TYPE_X86_64. Radar bug #4458775. 584 585Changes for the 5.24 release (the cctools-640 release): 586- Changed arch.c, best_arch.c, ofile.c, and set_arch_flag_name.c to use 587 CPU_SUBTYPE_MASK to mask out the capability bits from the cpusubtype on 588 comparisons. Radar bug #4754462. 589 590Changes for the 5.24 release (the cctools-639 release): 591- Changed copy_new_symbol_info() in writeout.c to use the input_indirectsym_pad 592 from the object struct instead of trying to pad based on the number of 593 indirect symbol table entries. Radar bug #4759112. 594 595Changes for the 5.24 release (the cctools-638 release): 596- Changed dyld_order() in checkout.c to deal with the fact that 64-bit files may 597 or may not have padding after the indirect symbol table entries. The padding 598 in the input file is determined and saved in the new input_indirectsym_pad 599 field in the object struct. Also changed copy_new_symbol_info() in writeout.c 600 to pad the indirect symbol table if it has an odd number of entries for 64-bit 601 files. Radar bug #4747408. 602 603Changes for the 5.24 release (the cctools-637 release): 604- Changed dyld_order() in checkout.c to round the offset after the in indirect 605 symbol table entries to a multiple of 8 if it is a 64-bit Mach-O file and 606 their are an odd number of indirect symbol table entries. Radar bug #4737991. 607 608Changes for the 5.24 release (the cctools-626 release): 609- Made the needed changes to support the split info. Radar bug #4695477. 610 - Changed check_object() in checkout.c to pick up the LC_SEGMENT_SPLIT_INFO 611 command and check for duplicates. 612 - Added checks in dyld_order() in checkout.c to check the order of the split 613 info data if it is there. 614 - Changed copy_new_symbol_info() in writeout.c to copy out and or increment 615 the *size passed in for the output_split_info_data_size . 616 - Added checks in check_Mach_O() in ofile.c to check the LC_SEGMENT_SPLIT_INFO 617 command and check for duplicates. 618 - Updated swap_object_headers() in swap_headers.c to support the 619 LC_SEGMENT_SPLIT_INFO load command. 620 621Changes for the 5.24 release (the cctools-632 release): 622- Ported code the code used by libredo_prebinding.a and libsyminfo.a to be 623 compiled for 64-bit hosts. Radar bug #4407440. 624 - Changed the Makefile and added the lib_ofiles and lib_ofiles_install targets 625 to build just the dynamic target for use with libredo_prebinding.a and 626 libsyminfo.a to be built for all architectures in RC_CFLAGS. 627 - Ported writeout.c to by not using ranlib structs since ran_un.ran_name 628 can be used when compiling for 64-bit hosts. 629 - Changed the code to use the new toc_entry struct added to 630 <stuff/breakout.h>. and changed the uses of toc_nranlibs field name to 631 ntocs. 632 - Also changed the use of SWAP_LONG to SWAP_INT for the size of ranlib 633 structs and strings in the table of contents and changed the used of 634 sizeof(long) to sizeof(uint32_t). 635 - Change the size of an indirect symbol table entries to sizeof(uint32_t) 636 from sizeof(unsigned long). 637 - Ported bytesex.c by changing SWAP_LONG to SWAP_INT and a number of local 638 struct definitions using fields to union with uint32_t instead of unsigned 639 long. Change the type of the pointer to indirect symbol table entries 640 from unsigned long * to uint32_t in swap_indirect_symbols() and changed 641 the count to a uint32_t. 642 - Ported get_toc_byte_sex.c, ofile_get_word.c, swap_headers.c and ofile.c by 643 changing SWAP_LONG to SWAP_INT and a number unsigned long uses to uint32_t. 644 - Also changed ofile.c so temporary_archive_member_warning() in also defined 645 when ALIGNMENT_CHECKS_ARCHIVE_64_BIT is defined. 646 - Also changed ofile_map() in ofile.c to use mmap() instead of map_fd(). 647 - Ported dyld_order() and symbol_string_at_end() in checkout.c to change 648 a use of unsigned long to uint32_t for the size of indirect symbol table 649 entries. 650 651Changes for the 5.24 release (the cctools-627 release): 652- As part of the port to unify otool(1) and otool64(1) finished the port of 653 libstuff and removed the no longer needed libstuff64 libraries. Radar bug 654 #3903136. 655- Fixed a number of place in ofile.c that was not setting ofile->mh64 to NULL 656 when it was setting ofile->mh to NULL. Radar bug #4593267. 657 658Changes for the 5.24 release (the cctools-627 release): 659- Changed check_object() in checkout.c so the test for not having an LC_ID_DYLIB 660 load command if it is a MH_DYLIB_STUB and has a non-zero number of load 661 commands. Radar bug #4511628. 662 663Changes for the 5.24 release (the cctools-626 release): 664- Made the needed changes to support the code signature. Radar bug #4588023. 665 - Changed check_object() in checkout.c to pick up the LC_CODE_SIGNATURE 666 command and check for duplicates. 667 - Added checks in dyld_order() in checkout.c to check the order of the code 668 signature data if it is there. 669 - Changed copy_new_symbol_info() in writeout.c to copy out and or increment 670 the *size passed in for the output_code_sig_data_size . 671 - Added checks in check_Mach_O() in ofile.c to check the LC_CODE_SIGNATURE 672 command and check for duplicates. 673 - Added swap_linkedit_data_command() to bytesex.c . 674 - Updated swap_object_headers() in swap_headers.c to support the 675 LC_CODE_SIGNATURE load command. 676 677Changes for the 5.23 release (the cctools-620 release): 678- Added the routines swap_x86_float_state64(), swap_x86_state_hdr(), 679 swap_x86_exception_state64(), swap_x86_debug_state32(), 680 swap_x86_debug_state64() to bytesex.c . Radar bug #4491230. 681 682Changes for the 5.23 release (the cctools-614 release): 683- Changed bytesex.c to add macros that rename structure members of the 684 ppc and i386 thread states for Unix conformance. Radar bug #4508798. 685- Changed swap_headers.c to add macros that rename i386 thread states for 686 Unix conformance. Radar bug #4508798. 687 688Changes for the 5.23 release (the cctools-610 release): 689- Added a few ifdef x86_THREAD_STATE64 to a few places in bytesex.c and 690 swap_headers.c to allow it to build on Tiger. Radar bug #4535019. 691 692Changes for the 5.22 release (the cctools-590.38.3 release): 693- Don't consider X86_64_RELOC_SUBTRACTOR relocations to be paired. Radar bug 694 #4504190. 695 696Changes for the 5.22 release (the cctools-590.37.3 release): 697- When swap_object_headers sees a thread state flavor that it doesn't know 698 about, print the flavor number itself in the error message in addition to the 699 other information that was already being printed. Radar bug #4491140. 700- Correctly swap x86_THREAD_STATE64 states when running on PowerPC. Also, 701 update to the current definition of the x86-64 thread state. Radar bug 702 #4491228. 703 704Changes for the 5.22 release (the cctools-590.36.3 release): 705- Swap the LC_ROUTINES_64 load command correctly. Radar bug #4451600. 706 707Changes for the 5.22 release (the cctools-590.31.1 release): 708- Added support for the x86_64 architecture. Radar bug #4345090. 709 710Changes for the 5.21 release (the cctools-590.25 release): 711- Added more support for DWARF. Radar bug #4367423. 712 - Updated check_Mach_O() in ofile.c to deal with LC_UUID load commands. 713 714Changes for the 5.21 release (the cctools-590.24 release): 715- Added support for DWARF. Radar bug #4367423. 716 - Added swap_uuid_command() to bytesex.c . 717 - Updated swap_object_headers() in swap_headers.c to deal with LC_UUID load 718 commands. 719 720Changes for the 5.20 release (the cctools-590.23 release): 721- Changed swap_i386_float_state() in bytesex.c for the current floating point 722 i386 thread state (#if i386_THREAD_STATE == 1 case) so that it does swap 723 the struct fields if i386_EXCEPTION_STATE_COUNT is defined. Radar bug 724 #4350771. 725 726Changes for the 5.20 release (the cctools-590.21 release): 727- Fixed a bug in writeout_to_mem() in writeout.c for the code that was 728 staggering the timestamps of dylibs with muliple cpusubtypes. It needed to 729 have code to be able byteswap the load commands because the archs it was 730 walking through may have been byte swapped for output. Radar bug #4265381. 731- Fixed a bug in ofile_process() for the #ifdef OTOOL case that needed to have 732 code that checked the non-swapped case since the checking code is not called 733 to set up the ofile->mh_cputype fields. Radar bug #4337271. 734 735Changes for the 5.20 release (the cctools-590.20 release): 736- Removed the warnings when building. Radar bug #4340147. 737 - Added -fno-builtin-round to the Makefile. 738 - Removed the const from command_line_macosx_deployment_target in and 739 put_macosx_deployment_target() in macosx_deployment_target.c . 740 - Added two #undef THREAD_STATE_NONE and two #undef VALID_THREAD_STATE_FLAVOR 741 to bytesex.c and swap_headers.c . 742 743Changes for the 5.19 release (the cctools-590.12 release): 744- Added the new routine get_segprot_from_flag() to arch.c that is passed an 745 arch flag and returns the default segment protection. Radar bug #4281171. 746 747Changes for the 5.19 release (the cctools-590.11 release): 748- Changed swap_i386_float_state() in bytesex.c for the current i386 thread 749 states (#if i386_THREAD_STATE == 1 case) so that it does not swap any fields. 750 Removed the three added #defined's from the change below now that they are 751 no longer needed. Radar bug #4282026. 752 753Changes for the 5.19 release (the cctools-590.10 release): 754- Added three #defined's to bytesex.c: 755 #define obsolete1 fpkind 756 #define obsolete2 initialized 757 #define obsolete3 exc_status 758 allow the source to build on Leopard with different fields in the struct 759 i386_float_state in <mach-o/i386/thread_status.h> . Radar bug #4279472. 760 761Changes for the 5.19 release (the cctools-590.8 release): 762- Changed check_Mach_O() in ofile.c as well as swap_object_headers() in 763 swap_headers.c and added an #if to allow the older i386_THREAD_STATE value of 764 -1. Radar bug #4240450. 765- Changed the needed code to for the new i386 thread states. Radar bug #4200908. 766 - Changed bytesex.c to #if the old swap_i386_thread_fpstate(), 767 swap_i386_thread_exceptstate() and swap_i386_thread_cthreadstate() routines 768 and added the new swap_i386_float_state() and swap_i386_exception_state() 769 routines. 770 - Changed swap_object_headers() in swap_headers.c and check_Mach_O() in 771 ofile.c to #if the code for the new and old i386 thread states and adding 772 code for the new thread states. 773 774Changes for the 5.19 release (the cctools-590.7 release): 775- Added the new routine put_macosx_deployment_target() to 776 macosx_deployment_target.c to allow the value of MACOSX_DEPLOYMENT_TARGET to 777 be set on the argument to the compiler command line flag -macosx_version_min. 778 Radar bug #4195253. 779 780Changes for the 5.19 release (the cctools-590.1 release): 781- Fixed a bug in setup_symbol_list() in symbol_list.c where if there are more 782 than two duplicates in the list only the first duplicate is removed. 783 Radar bug #4139106. 784 785Changes for the 5.18 release (the cctools-589 release): 786- Added support for the CPU_SUBTYPE_PENTIUM_4 cpusubtype. Radar bug #4115802 787 - Added an entry in the arch_flags[] array in arch.c for pentium4 as: 788 { "pentium4",CPU_TYPE_I386, CPU_SUBTYPE_PENTIUM_4 }, 789 - Added code in get_arch_from_host() in get_arch_from_host.c for the 790 CPU_SUBTYPE_PENTIUM_4 cpusubtype. 791 - Added a case for CPU_SUBTYPE_PENTIUM_4 in cpusubtype_execute() in 792 best_arch.c . 793- Changed the Makefile and added a LEGACY macro with two defines to allow 794 the code to use the old field name "environ" from the i386 structs. 795 Radar bug #4113580. 796 797Changes for the 5.18 release (the cctools-583 release): 798- Added the following entry to the table in macosx_deployment_target.c : 799 { "10.5", MACOSX_DEPLOYMENT_TARGET_10_5 }, 800 Radar bug #4098516. 801- Changed the Makefile so that when RC_XBS is set to YES then the compiler 802 options -MD and -dependency-file as well as the md(1) program are not used. 803 Radar bug #4029936. 804 805Changes for the 5.18 release (the cctools-580 release): 806- Changed get_macosx_deployment_target() in macosx_deployment_target.c to take 807 an additional cpu_type_t parameter. Then if new cpu_type_t parameter is 808 CPU_TYPE_I386 the default is set to 10.4 otherwise it is set to 10.1. 809 Radar bug #4081062. 810 811Changes for the 5.17 release (the cctools-574 release): 812- Changed the routine cpusubtype_combine() in best_arch.c to combine any i386 813 subtype to the ALL subtype. Radar 4002756. 814- Added the routine force_cpusubtype_ALL_for_cputype() to arch.c that is passed 815 a cputype and returns TRUE if the that architecture is to force its 816 cpusubtypes to be the ALL type. And the implementation returns TRUE for 817 CPU_TYPE_I386 and FALSE for all others. Radar bug #4002758. 818 819Changes for the 5.17 release (the cctools-572 release): 820- Fixed a bug in swap_object_headers() in swap_headers.c which was missing some 821 code to handle the ppc64 thread state. Radar bug #4010859. 822- Fixed a bug in check_Mach_O() in ofile.c which was missing the code to handle 823 the ppc64 thread state. Radar bug #3987993. 824 825Changes for the 5.17 release (the cctools-568 release): 826- Changed bytesex.c and swap_headers.c to remove multiply defined warnings by 827 changing all #import's to #include's and adding #undef's 828 for MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT after including 829 <mach/m68k/thread_status.h> and <mach/ppc/thread_status.h>. 830 831Changes for the 5.17 release (the cctools-562 release): 832- Changed swap_ppc_thread_state_t() in bytesex.c to use cpu->vrsave and not 833 cpu->pad. Radar bug #3930480. 834 835Changes for the 5.17 release (the cctools-559 release): 836- Change ofile_process() to simply treat a dynamic library without modules as 837 if the flat_dylib parameter were set. Radar bug #3883039. 838- Added building libstuff_kld.a built for the kernel's kld use. Radar bug 839 #3906133. 840 - Changed the code to only compile the needed routines when RLD is defined: 841 - best_arch.c only compile cpusubtype_combine() for RLD 842 - arch.c to only compile arch_flags[], get_arch_name_from_types(), 843 get_arch_family_from_cputype(), get_byte_sex_from_flag() and 844 get_segalign_from_flag(). 845 - Changed the following files and ifndef RLD their entire contents: 846 errors.c, execute.c, fatals.c, arch_usage.c, ofile.c, print.c, 847 set_arch_flag_name.c, seg_addr_table.c, dylib_table.c, breakout.c, 848 writeout.c, checkout.c, fatal_arch.c, dylib_roots.c, SymLoc.c, 849 get_arch_from_host.c, symbol_list.c, unix_standard_mode.c, 850 vm_flush_cache.c, macosx_deployment_target.c, guess_short_name.c . 851 852Changes for the 5.17 release (the cctools-557 release): 853- Removed support for the INTERIM_PPC64. The changes were to remove the 854 #ifdef INTERIM_PPC64 source changes in reloc.c, ofile.c, best_arch.c and 855 arch.c. Radar bug #3600419. 856 857Changes for the 5.17 release (the cctools-554 release): 858- Fixed a bug in the swap_segment_64() routine in bytesex.c that was using 859 SWAP_LONG for the fileoff and filesize fields when it should have been using 860 SWAP_LONG_LONG. Radar bug #3891223. 861 862Changes for the 5.17 release (the cctools-552 release): 863- Changed print.c to include stdarg.h . Radar bug #3640701. 864- Added the source file unix_standard_mode.h for the new routine 865 get_unix_standard_mode() to know when we are running in UNIX standards 866 conformance mode. Radar bug #3852702. 867- Picked up the changes to check_for_dylib() in dylib_roots.c to deal with 868 both 32-bit and 64-bit Mach-O files. Radar bug #3861276. 869 870Changes for the 5.17 release (the cctools-551 release): 871- Added support for the ppc64 thread state. Radar bug #3866755. 872 - Added swap_ppc_thread_state64_t() to bytesex.c . 873 - Added a case statement for swapping a PPC_THREAD_STATE64 to 874 swap_headers() in swap_headers.c . 875- Changed ofile.c to not produce a warning for archives that have 64-bit Mach-O 876 archive members that are 8 byte boundaries. Radar bug #3818951. 877 878Changes for the 5.17 release (the cctools-549 release): 879- Fixed a bug in cpusubtype_combine() in best_arch.c that was missing the case 880 for CPU_TYPE_POWERPC64. Radar bug #3856997. 881- Fixed the error handling in the breakout code. In breakout_internal() at the 882 end when it detects an error it calls free_archs() it needed to clear the 883 values in *archs and *narchs before returning. Also in both breakout_mem() 884 and breakout() a check for errors != 0 was added and if so the ofile was 885 free'ed() and NULL was returned. Radar bug #3839049. 886 887Changes for the 5.17 release (the cctools-544 release): 888- Fixed a bug in ofile_map_from_memory() in ofile.c that was missing an "else" 889 before the if statement to check for 64-bit Mach-O files. Radar bug #3837563. 890 891Changes for the 5.17 release (the cctools-541 release): 892- Fixed a bug in reloc_has_pair() in reloc.c that needed a case statement for 893 CPU_TYPE_POWERPC64 in all cases. Radar bug #3829545. 894- Fixed a bug in make_table_of_contents() in writeout.c that did not correctly 895 set up the sections arrays for both 32-bit and 64-bit Mach-O files. Radar 896 bug #3829545. 897 898Changes for the 5.17 release (the cctools-540 release): 899- Fixed a bug in dyld_order() in checkout.c that was not checking which type 900 Mach-O file before using the seg_linkedit field. Radar bug #3829149. 901 902Changes for the 5.17 release (the cctools-539 release): 903- Changed to support 32-bit & 64-bit tools that write binaries. Radar bug 904 #3812858. 905 - Changed breakout_internal() in breakout.c to set both the mh and the mh64 906 fields of the struct object. 907 - Changed cksum_object() and dyld_order() in breakout.c to use and set either 908 the 32-bit fields or the 64-bit fields. 909 - Changed the code in writeout.c to to test the mach header field, mh for 910 NULL, to see which type of object it has and then added/modified the code 911 to deal with both. Also changed all rounding to 8 from 4 so members end up 912 on a 8-byte boundary. 913- Changed symbol_string_at_end() in checkout.c to allow any object with its 914 string table not at the end but rounded to 8 bytes. To deal with archive 915 members that are extracted from archives and end up padded. 916- Fixed a warning about temporary_archive_member_warning() in ofile.c being 917 defined but not used when ALIGNMENT_CHECKS is not defined. 918 919Changes for the 5.17 release (the cctools-535 release): 920- Changed symbol_string_at_end() in checkout.c to deal with archive members that 921 are rounded up to 8 bytes. Since the object file maybe smaller than that the 922 check needs to check the rounded size of the string table end. Then it 923 changes the object_size to where the string table ends so tools like strip(1) 924 that expect the string table at the end of the object will work. Radar bug 925 #3811489. 926 927Changes for the 5.17 release (the cctools-533 release): 928- Fixed bugs in ofile_map_from_memory() and ofile_first_member() that was still 929 incorrectly using mach_header_t when it should have been using struct 930 mach_header. That was not correctly changed as part of the changes to 931 cctools-533. 932- Temporarily changed the alignment errors of 64-bit objects in archives to be 933 a warning not an error in ofile.c in many places. Added the file level static 934 boolean, archive_64_bit_align_warning, to be used to cause the warning to be 935 printed only once. Also added temporarily the routine 936 temporary_archive_member_warning() to ofile.c . 937 938Changes for the 5.17 release (the cctools-533 release): 939- Changes to support 32-bit & 64-bit tools in the same binary. Radar bug 940 #3793394. 941 - Changed the code in ofile.c to fill in and deal with the changed struct 942 ofile in "stuff/ofile.h" to have both a pointer to a 32-bit and 64-bit 943 mach header. Also to fill in and use the fields mh_cputype, mh_cpusubtype, 944 and mh_filetype in the ofile structure. 945 - Added new swap_* routines in bytesex.h to have a routine for the 946 32-bit and 64-bit structs. 947 - Changed the breakout() code and added an ifdef ARCH64 and some code to use 948 the ofile->mh64 field to assign to the mh mach_header_t field of the arch 949 struct. 950 - Changed the writeout() code to use the new macro swap_nlist_t from 951 "stuff/target_arch.h" in 4 places. 952 - Changed swap_object_headers() in swap_headers.c to take a void * for the 953 mach_header and work with both 64-bit and 32-bit Mach-O files. 954- Fixed a problem in check_Mach_O() in ofile.c for the INTERIM_PPC64 format that 955 was missing a check for CPU_TYPE_POWERPC64 when dealing with 32-bit thread 956 commands. Radar bug #3792737. 957 958Changes for the 5.16 release (the cctools-532 release): 959- Made more changes to support 64-bit tools. Radar bug #3600431. 960 - Changed arch.c to not ifdef the 64-bit arch types and the 32-bit arch types. 961 This is done to allow lipo(1) to use the table of values. 962 - Added swap_mach_header_64(), swap_segment_command_64() and swap_section_64() 963 routines to byteswap.c . 964 965Changes for the 5.16 release (the cctools-529 release): 966- Made changes to support 64-bit tools. Radar bug #3600431. 967 - Changed the Makefile to build libstuff64 versions to be linked with 968 64-bit tools. The sources are compiled with -DARCH64 . 969 - Changed the Makefile to no longer build with -DINTERIM_PPC64 . 970 - Added the include "stuff/target_arch.h" to the following files: 971 breakout.c 972 bytesex.c 973 checkout.c 974 get_toc_byte_sex.c 975 ofile.c 976 ofile_get_word.c 977 swap_headers.c 978 writeout.c 979 and changed the uses of structs, constants and names that are different for 980 64-bit files to the typedefs in "stuff/target_arch.h". 981 - Added SWAP_LONG_LONG() to bytesex.c. 982 - Added bits of ifdef ARCH64 code to bytesex.c to swap the new fields and the 983 different sized fields. 984 - Added ifdef ARCH64 to arch.c and added two 64-bit arch types, ppc64 and 985 ppc970-64 to the arch_flags[] array. 986 - Changed the #ifdefs in: 987 get_byte_sex_from_flag() in arch.c 988 reloc_pair_r_type() in reloc.c 989 reloc_has_pair() in reloc.c 990 to be #if defined(INTERIM_PPC64) || defined(ARCH64) for CPU_TYPE_POWERPC64. 991 - Added ifdef ARCH64 to cpusubtype_findbestarch() in best_arch.c for 992 64-bit architectures. 993 994Changes for the 5.16 release (the cctools-528 release): 995- Support the new GENERIC_RELOC_LOCAL_SECTDIFF reloc. 996 997Changes for the 5.16 release (the cctools-527 release): 998- Support the new PPC_RELOC_LOCAL_SECTDIFF reloc. 999 1000Changes for the 5.16 release (the cctools-526 release): 1001- Changed a few places in ofile.c from %lu to %u to remove warnings for the 1002 fields that changed in <mach-o/fat.h> from unsigned long to uint32_t. 1003 Radar bug #3744082. 1004 1005Changes for the 5.16 release (the cctools-524 release): 1006- Fixed a bug in check_sort_ranlibs() in writeout.c that caused a crash if 1007 there are 0 ranlib structs to sort. Reported in Radar bug #3451378. 1008- Fixed a bug in cpusubtype_findbestarch() in best_arch.c when trying to pick 1009 the lowest model i386 fat arch. The variable lowest_model was initialized to 1010 ULONG_MAX when it should have been LONG_MAX as it was a signed value. Radar 1011 bug #3694812. 1012 1013Changes for the 5.16 release (the cctools-520 release): 1014- Fixed a bug that caused otool(1) to crash when it was called with a bad fat 1015 file (a java class file). The calls to ofile_first_arch() in ofile.c was not 1016 checking its return value and later causing the code to crash when it should 1017 have returned in case of an error. Radar bug #3670740. 1018 1019Changes for the 5.16 release (the cctools-515 release): 1020- Added the installGASsrc and fromGASsrc Makefile targets to install and build 1021 just the need sources to build the PowerPC assembler from the GAS sources: 1022 bytesex.c 1023 round.c 1024 and changed the Copyright in this file to the Apple BSD License. 1025 Radar bug #3657295. 1026 1027Changes for the 5.16 release (the cctools-513 release): 1028- Changed writeout_to_mem() in writeout.c to move the local declrations of: 1029 long toc_time, timestamp, index; 1030 to the start of the routine so it would compile on older systems. Also fixed 1031 the intenting of the first bit of code in that routine. 1032 1033Changes for the 5.16 release (the cctools-512 release): 1034- Fixed a bug in the change made for Radar bug #3176679 in cctools-495.3 where 1035 the new writeout_to_mem() routine did not pass up the value of the boolean 1036 seen_archive to the outer routine writeout(). So the outer routine never made 1037 the call utime() to reset the mod time as the value of seen_archive was always 1038 FALSE in the outer routine. The change was add the parameter seen_archive 1039 as a enum bool * to writeout_to_mem() in writeout.c and set the value 1040 indirectly. Then the outer routine writeout() was changed to pass the address 1041 of its seen_archive variable to writeout_to_mem(). Radar bug #3645280. 1042 1043Changes for the 5.16 release (the cctools-509 release): 1044- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 1045 file format. And added -DINTERIM_PPC64 to the Makefile. 1046 1047Changes for the 5.16 release (the cctools-499.1 release): 1048- Made changes to support the interim ppc64 file format. Radar bug #3562133 1049 and #3562232. 1050 - Added an entry in the arch_flags[] array in arch.c for ppc64 as: 1051 { "ppc64", CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC64_ALL }, 1052 - Updated get_byte_sex_from_flag() in arch.c to return BIG_ENDIAN_BYTE_SEX 1053 for CPU_TYPE_POWERPC64. 1054 - Updated cpusubtype_findbestarch() in best_arch.c for CPU_TYPE_POWERPC64 1055 and its cpusubtype. 1056 1057Changes for the 5.13.2 release (the cctools-495.3 release): 1058- Modified breakout.c to include a breakout_mem() function which will perform 1059 the breakout on a memory buffer, rather than reading from a file. The 1060 internals of breakout() were moved to breakout_internal() so they could 1061 be shared by both breakout() and breakout_mem(). Radar bug #3176679. 1062- Modified writeout.c to include a writeout_to_mem() function which will 1063 return a vm_allocate'd buffer of the contents of the output file. The 1064 interanls of writeout() were moved to writeout_to_mem() so that writeout() 1065 calls writeout_to_mem(), which produces the contents of the file, and 1066 writeout() writes it to the output file. Radar bug #3176679. 1067 1068Changes for the 5.14 release (the cctools-496 release): 1069- Added the following entry to the table in macosx_deployment_target.c : 1070 { "10.4", MACOSX_DEPLOYMENT_TARGET_10_4 }, 1071 Radar bug #3445632. 1072 1073Changes for the 5.12 release (the cctools-490 release): 1074- Fixed cpusubtype_findbestarch() in best_arch.c to not select a PowerPC 970 1075 if not on a PowerPC 970. And fixed it when passed the family ALL type and 1076 there is not an exact match to select the cpusubtype's from the "top" of the 1077 list going all possible subtypes. Also added the new routine 1078 cpusubtype_execute() to best_arch.c for use by the dynamic linker. 1079 Radar bug #3387962. 1080 1081Changes for the 5.12 release (the cctools-469 release): 1082- Fixed a problem with the added checks of the of the dylib_module struct in 1083 ofile.c made in cctools-466 for Radar bug #3208399 where it did not work if 1084 the file was not in host byte sex. The fix was to copy the struct and byte 1085 swap it if needed before doing the checks on the copy of the struct in 1086 check_dylib_module() in ofile.c . Radar bug #3228664. 1087 1088Changes for the 5.12 release (the cctools-467 release): 1089- Added support for the PPC_RELOC_LO14_SECTDIFF relocation type used with 1090 double word load/store instructions. Radar bug #3218027. 1091 - Added tests for PPC_RELOC_LO14_SECTDIFF in both reloc_has_pair() and 1092 reloc_is_sectdiff() in reloc.c . 1093 1094Changes for the 5.12 release (the cctools-466 release): 1095- Fixed the incorrect casts on the comparison of the nlist struct's n_strx field 1096 where the value being compared to was casted to a long. The correct fix was 1097 to cast n_strx to an unsigned long. 1098- Added the missing checking of the dylib_module struct in ofile.c so that it 1099 would not return an ofile struct with a bad dylib_module. Also fixed a number 1100 of places the routine Mach_O_error() was called to print an error message but 1101 the code failed to return a failure status. Radar bug #3208399. 1102 1103Changes for the 5.12 release (the cctools-464 release): 1104- Made changes to build cleanly with gcc3.3 1105 - Removed -Wno-precomp from the Makefile 1106 - Fixed warnings for "comparison between signed and unsigned" in writeout.c, 1107 symbol_list.c, ofile_get_word.c, round.c, ofile.c, and best_arch.c . 1108 1109Changes for the 5.12 release (the cctools-462 release): 1110- Added support for MH_DYLIB_STUB libraries. Radar bug #3193744. 1111 - Did NOT change writeout() in writeout.c to handle the timestamp in 1112 MH_DYLIB_STUB filetypes like MH_DYLIB filetypes as the timestamp should 1113 not be changed or else this would mess up building prebound. 1114 - Changed the routines in ofile.c to handle MH_DYLIB_STUB filetypes like 1115 MH_DYLIB filetypes. 1116 - Changed check_object() in checkout.c to handle MH_DYLIB_STUB filetypes like 1117 MH_DYLIB filetypes. 1118 1119Changes for the 5.12 release (the cctools-457 release): 1120- Changed ofile_map() added ofile_map_from_memory() which is everything from 1121 the original ofile_map() except mapping the file. This is needed so the 1122 NSCreateObjectFileImageFromMemory() api can be implemented. Radar bug 1123 #3131622. 1124 1125Changes for the 5.12 release (the cctools-455 release): 1126- Changed the code in dylib_roots.c to remove the check that the actual path of 1127 a binary equals the install name of the dynamic library. Radar bug #3147668. 1128 1129Changes for the 5.12 release (the cctools-450 release): 1130- Changed get_segalign_from_flag() in arch.c to have 4K returned for i386 also. 1131 Radar bug #3120579. 1132 1133Changes for the 5.12 release (the cctools-449 release): 1134- Added the arch flag i686 to be the same as pentpro in arch.c. Radar bug 1135 #3111977. 1136 1137Changes for the 5.11 release (the cctools-444 release): 1138- Added the file symbol_list.c which contains the code from strip.c for the 1139 symbol lists. Now also used by ld(1)'s -exported_symbols_list and 1140 -unexported_symbols_list options. Radar bug #3083844. 1141- Picked up fix to LocForDylib() in SymLoc.c that was crashing when the 1142 DylibProjects directory was empty. Radar bug #3079374. 1143 1144Changes for the 5.11 release (the cctools-440 release): 1145- Fixed the warnings about extra tokens at end of #endif directive in ofile.c 1146 (Radar bug #3072042). 1147 1148Changes for the 5.11 release (the cctools-439 release): 1149- Made the needed changes to arch.c, get_arch_from_host.c, ofile.c, reloc.c, 1150 swap_headers.c & best_arch.c for VEO support. Radar bug #3068161. 1151 1152Changes for the 5.11 release (the cctools-438 release): 1153- Added the following entry to the table in macosx_deployment_target.c : 1154 { "10.3", MACOSX_DEPLOYMENT_TARGET_10_3 }, 1155 Radar bug #3049974. 1156 1157Changes for the 5.10 release (the cctools-416 release): 1158- Changed writeout() in writeout.c to not update the LC_ID_DYLIB timestamp if 1159 the new dont_update_LC_ID_DYLIB_timestamp is TRUE. Radar bug #2914003. 1160 1161Changes for the 5.10 release (the cctools-414 release): 1162- Changed the two calls to mach_host_self() in get_arch_from_host.c and 1163 writeout.c to call mach_port_deallocate() on the port after the calls. Radar 1164 bug #2895931. 1165 1166Changes for the 5.10 release (the cctools-412 release): 1167- Added the no_error_if_missing parameter to symLocForDylib(), dstLocForDylib() 1168 and LocForDylib() in SymLoc.c . In LocForDylib() no call to error() is made 1169 if the installName can't be found. Radar bug #2882324. 1170- Added the no_error_if_missing parameter to get_symfile_for_dylib() and 1171 get_dstfile_for_dylib() in dylib_roots.c which is pass through to 1172 symLocForDylib() or dstLocForDylib(). Radar bug #2882324. 1173 1174Changes for the 5.10 release (the cctools-411 release): 1175- Added the file macosx_deployment_target.c to libstuff so that both the 1176 ld(1) code and the seg_addr_table(1) code can use the same code. Radar bug 1177 #2848945. 1178 1179Changes for the 5.10 release (the cctools-404 release): 1180- Changed crc32() in crc32.c to be a __private_extern__. Radar bug #2859919. 1181 1182Changes for the 5.10 release (the cctools-400 release): 1183- Changed the Makefile back to again use the -dependency-file with gcc. 1184- Added a new throttle parameter to writeout() in writeout.c to allow 1185 redo_prebinding(3) used with prebinding on demand to throttle back its 1186 I/O when running in the back ground. Radar bug #2850642. 1187- Added code in writeout() in writeout.c to use fcntl() with the F_NOCACHE 1188 option to not cache the blocks of the output file. 1189 1190Changes for the 5.10 release (the cctools-397 release): 1191- Changed where "stuff/bool.h" was included in ofile.c 1192Radar bug #2831923. 1193 1194Changes for the 5.10 release (the cctools-394 release): 1195- Changed the Makefile to not use the -dependency-file with gcc as well as 1196 mwccppc. 1197- Added an include for <string.h> in bytesex.c, ofile_get_word.c to remove the 1198 warning: implicit declaration of function `memcpy'. 1199 1200Changes for the 5.10 release (the cctools-393 release): 1201- Added the code needed in check_Mach_O() in ofile.c for the LC_LOAD_WEAK_DYLIB 1202 variant of the LC_LOAD_DYLIB load command. 1203- Added the code needed in swap_object_headers() in swap_object_headers.c for 1204 the LC_LOAD_WEAK_DYLIB variant of the LC_LOAD_DYLIB load command. 1205 1206Changes for the 5.10 release (the cctools-392 release): 1207- Added the new parameter use_member_syntax to the ofile_process() in ofile.c. 1208 Changed the two calls to ofile_process() in dylib_roots.c to pass FALSE for 1209 use_member_syntax. Radar bug #2730127. 1210 1211Changes for the 5.10 release (the cctools-389 release): 1212- Changed writeout() in writeout.c to not set the modification time back by 1213 5 seconds if the file does not contain an archive. Radar bug #2788034. 1214 1215Changes for the 5.10 release (the cctools-388 release): 1216- Changed check_for_install_name() in dylib_roots.c used in seg_addr_table(1) 1217 so that if the install name starts with @executable_path it is considered ok. 1218 This will also be a problem for libhotspot/libjvm also, since libhotspot.dylib 1219 will have a libjvm install_name. 1220 1221Changes for the 5.10 release (the cctools-387 release): 1222- Changed writeout() in writeout.c to stagger the time stamps of dynamic 1223 libraires with multiple cpusubtypes. This avoids problems with prebinding. 1224 Radar bug #2676444. 1225 1226Changes for the 5.10 release (the cctools-386 release): 1227- Picked up the crc32.c file from the freeBSD code. 1228- Added the calculate_input_prebind_cksum parameter to breakout() in breakout.c 1229 and the new routine cksum_object() to calculate the input's check sum for the 1230 cases that the redo_prebinding code needs it. 1231- Added logic to check_Mach_O() in ofile.c for checking the new LC_PREBIND_CKSUM 1232 load command. 1233- Added swap_prebind_cksum_command() for the new LC_PREBIND_CKSUM command and 1234 also updated swap_headers(). 1235 1236Changes for the 5.10 release (the cctools-385 release): 1237- Moved the routines archive_error(), archive_member_error() and 1238 Mach_O_error() from ofile.c to ofile_error.c so the redo_prebinding library 1239 can override them. 1240- Fixed a bug in breakout.c that called realloc() on *archs which could not 1241 be NULL the first time. So set *archs to NULL and *narchs to zero in 1242 breakout.c. 1243- Added __private_extern__ to free_archs() in breakout.c. 1244- Added some checks to checkout() in checkout.c to make sure an MH_DYLIB has 1245 a LC_ID_DYLIB command and the name.offset is valid. 1246 1247Changes for the 5.9 release (the cctools-381 release): 1248- Changed check_Mach_O() in ofile.c and ifdef'ed out the check for unknown 1249 load commands when OFI is defined. This is needed so that new load commands 1250 do not cause NSCreateObjectFileImageFromFile() and the like API's to fail 1251 when a new load command is seen in the image. The dynamic linker has also 1252 been changed to look for the new LC_REQ_DYLD bit and cause dyld to refuse to 1253 use an image if it contains something that dyld must understand to execute 1254 properly. 1255 1256Changes for the 5.9 release (the cctools-370 release): 1257- Added checks in check_object() checkout.c to check that if there is a hints 1258 command there is a dysymtab command and if the nhints is non-zero it matches 1259 the nundefsym value. Also added check in dyld_order() in checkout.c to 1260 check the order of the local, external and undefined symbol indexes in 1261 the dysymtab command. 1262- Fixed bugs in breakout() in breakout.c where if one of the ofile routines 1263 set errors to non-zero the breakout code continued on and used 1264 ofile.arch_flag.name which could be NULL when it called savestr() and caused 1265 a crash. This happened when an new load command was added and the old code 1266 did not know about it, printed a message but later crashed. 1267 1268Changes for the 5.9 release (the cctools-369 release): 1269- Added code in check_object() in checkout.c to deal with the two-level hints 1270 command. Also added code in dyld_order() in checkout.c to deal with the 1271 hints table itself. 1272- Changed copy_new_symbol_info() in writeout.c to take a the old and new hints 1273 command and writeout the hints. 1274 1275Changes for the 5.9 release (the cctools-367 release): 1276- Added code in check_Mach_O() in ofile.c to check an LC_SUB_LIBRARY command. 1277 Added code in swap_object_headers() in swap_headers.c to call 1278 swap_sub_library_command(). Added swap_sub_library_command() to bytesex.c . 1279 Radar bug #2697458. 1280- Added code in check_Mach_O() in ofile.c to check an LC_TWOLEVEL_HINTS command. 1281 Added code in swap_object_headers() in swap_headers.c to call 1282 swap_twolevel_hints_command(). Added swap_twolevel_hints_command() and 1283 swap_twolevel_hint() to bytesex.c . Radar bug #2558069. 1284- Fixed a problem with writeout() in writeout.c not deallocating the memory if 1285 the write() fails. This is an issue with the redo_prebinding(3) API so it can 1286 effect update_prebinding(1). Radar bug #2691920. 1287 1288Changes for the 5.9 release (the cctools-364 release): 1289- Changed cpusubtype_combine() in best_arch.c (as well as NXCombineCpuSubtypes() 1290 in libmacho) for the ppc to select the highest subtype when there is not 1291 an exact match and neither is a 601. 1292- Changed cpusubtype_findbestarch() in best_arch.c (as well as 1293 NXFindBestFatArch() in libmacho) which had a problem with selecting the ppc 1294 cpusubtype when an exact match could not be found. See Radar bug #2678019 1295 against exec(2). 1296 1297Changes for the 5.9 release (the cctools-360 release): 1298- Fixed a bug in writeout() that showed up in strip(1) not correctly excluding 1299 N_SECT symbols marked with the attribute NO_TOC from the the table of 1300 contents. Radar bug #2663483. The old libtool/ranlib Radar bug was #2494286. 1301- Changed the two calls to malloc() in get_arch_from_host.c to savestr() and 1302 changed the one call to malloc() in arch.c to savestr(). These were 1303 changed to allocate() because libdyld/ofi.c needs this and overrides 1304 savestr() so using allocate() would end up getting multiple definitions of 1305 _savestr (one from ofi.o and one from libstuff(allocate.o)). 1306- Changed breakout() in breakout.c to allocate and return its ofile struct for 1307 the arch it returns. This will allow the redo_prebinding library API to 1308 call ofile_unmap() on this. 1309- Changed guess_short_name() to be __private_extern__ in guess_short_name.c . 1310 1311Changes for the 5.9 release (the cctools-359 release): 1312- Fixed two places in ofile.c, three in fatal_arch.c and one in writeout.c that 1313 was using size_ar_name() and not using the member_name_size and member_name 1314 fields of the ofile struct for printing error messages. 1315- Added -Wno-long-double to shutup the compiler for 1316 <architecture/m88k/fp_regs.h>. 1317 1318Changes for the 5.8 release (the cctools-357 release): 1319- Added support for the CPU_SUBTYPE_POWERPC_7450 in arch.c, best_arch.c and 1320 get_arch_from_host.c. Radar bug #2599869. 1321 1322Changes for the 5.8 release (the cctools-356 release): 1323- Changed execute.c and ofile.c to include <libc.h> instead of <bsd/libc.h> 1324 1325Changes for the 5.8 release (the cctools-345 release): 1326- Fixed a bug in guess_short_name() that showed up in seg_addr_table(1) that 1327 caused it to crash as it was doing a strcpy for the suffix when it should 1328 have been doing a strncpy() (Radar bug #2540744). 1329 1330Changes for the 5.8 release (the cctools-344 release): 1331- Fixed a bug in swap_object_headers() which was missing the calls to swap 1332 the swap_sub_umbrella_command() and swap_sub_client_command(). 1333- Changed cpusubtype_findbestarch() in best_arch.c in the loop looking for the 1334 lowest_model to save the current lowest_model so it finds the lowest_model. 1335 1336Changes for the 5.8 release (the cctools-342 release): 1337- Added support for swapping the LC_SUB_CLIENT load command (Radar bug 1338 #2533649). 1339 1340Changes for the 5.8 release (the cctools-341 release): 1341- Added support for swapping the LC_SUB_UMBRELLA load command (Radar bug 1342 #2530028). 1343- Pulled get_arch_from_host() out of arch.c and put it into get_arch_from_host.c 1344 so kld could avoid referencing host_info and mach_host_self. 1345 1346Changes for the 5.7 release (the cctools-334 release): 1347- Changed guess_short_name()'s has_suffix argument to return_suffix to a pointer 1348 to the suffix so checksyms could check for "_debug". 1349 1350Changes for the 5.7 release (the cctools-332 release): 1351- Changed the following routines to take a disablewarnings flag which was added 1352 to seg_addr_table(1): get_symfile_for_dylib() and get_dstfile_for_dylib() in 1353 dylib_roots.c and dstLocForDylib(), get_dstfile_for_dylib() and LocForDylib() 1354 in SymLoc.c (Radar bug #2482327). 1355 1356Changes for the 5.7 release (the cctools-329 release): 1357- Changed iinit and ninit fields of the struct dylib_module in 1358 swap_dylib_module() in bytesex.c to iinit_iterm and ninit_nterm. 1359 Radar bug #2469527. 1360 1361Changes for the 5.7 release (the cctools-327 release): 1362- ifdef'ed __GONZO_BUNSEN_BEAKER__ the code in seg_addr_table.c for its use of 1363 /Local to use /AppleInternal by default. 1364- ifdef'ed __GONZO_BUNSEN_BEAKER__ the code in and dylib_table.c for its use of 1365 /Local to use /MacOSX by default. And added code ifndef'ed 1366 __GONZO_BUNSEN_BEAKER__ to use /AppleInternal/... 1367 1368Changes for the 5.6 release (the cctools-324 release): 1369- Picked up the mods to SymLoc.c from Doug Wiebe in B&I which no longer does 1370 a chdir(). This allows the -seg_addr_table option to seg_addr_table not to 1371 be an absolute path. 1372 1373Changes for the 5.6 release (the cctools-323 release): 1374- Found the bug in find_dylib_in_root() in dylib_roots.c which was not doing 1375 an fts_close() and causing "Too many open files" later. 1376 1377Changes for the 5.6 release (the cctools-322 release): 1378- Added ifdef'ed for __SPACE__ and created a macro SYSTEM_LIBRARY in 1379 dylib_table.c in preparation for the directory changes. /System/Library 1380 changing to /MacOSX/System. 1381 1382Changes for the 5.6 release (the cctools-321 release): 1383- Moved SymLoc.m to SymLoc.c as it contains only 'C' code and the debugger was 1384 crashing when it was an Objective-C file. 1385 1386Changes for the 5.6 release (the cctools-320 release): 1387- Added support for the new LC_SUB_FRAMEWORK load command to support "Guarding 1388 against direct linking of non-umbrella frameworks". The files that swap 1389 load commands, bytesex.c and swap_headers.c, were update. As part of this 1390 work the routine guess_short_name() was broken out of seg_addr_table.c into 1391 guess_short_name.c so it could be used by the static linker. 1392 Radar bug 2443212. 1393 1394Changes for the 5.6 release (the cctools-319 release): 1395- Added the file seg_addr_table.c with the support routines for segment address 1396 tables. 1397- Added the file dylib_table.c which broke out some of the code that was used 1398 in checksyms(l) in to support routines used by it and the new 1399 seg_addr_table(l) tool. 1400- Picked up the file SymLoc.m from Doug Wiebe in B&I which returns the SYMROOT 1401 for a given release (used by the seg_addr_table(l) tool). It currently uses 1402 Foundation which would cause build dependencies problems so this can't be 1403 used in a submission. Doug is planning to do a version that does not use 1404 Foundation. 1405- Added the file dylib_roots.c which looks for a dynamic library in a given 1406 root (used by the seg_addr_table(l) tool). 1407 1408Changes for the 5.5 release (the cctools-307 release): 1409- Added support for the CPU_SUBTYPE_POWERPC_7400 in arch.c and best_arch.c. 1410 Radar bug #2397523. 1411 1412Changes for the 5.4 release (the cctools-300 release): 1413- Added logic to check_Mach_O() in ofile.c for checking the new LC_ROUTINES 1414 load command. 1415- Added swap_routines_command() for the new LC_ROUTINES command and also updated 1416 swap_headers(). 1417 1418Changes for the 5.3 release (the cctools-292 release): 1419- Added get_segalign_from_flag() to allow setting the default segment alignment 1420 to 4K for PowerPC and 8K for everything else. Used by ld(1) in layout.c in 1421 layout() to fix Radar bug #2277625. 1422 1423Changes for the 5.3 release (the cctools-286 release): 1424- Change the use of the i386 cpp macro to __i386__ and ppc to __ppc__ 1425 1426Changes for the 5.3 release, MacOS X bring up (the cctools-282 release): 1427- Added the source files arch_usage.c ofile.c print.c set_arch_flag_name.c 1428 to be shipped so that libtool can be built from the source given to MetroWerks 1429- Changed swap_ppc_thread_state_t() to not use bit fields for srr1, cr and exr 1430 to match the ppc_thread_state for Rhapsody/MacOS X. 1431- Changed host_self() and task_self() to mach_host_self() and mach_task_self() 1432 for MacOS X. Also included "stuff/openstep_mach.h" for macros to allow it 1433 to still build on Openstep. Also changed ifdef's __SLICK__ to __OPENSTEP__. 1434- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. 1435- Changed vm_task_t to mach_port_t in vm_flush_cache.c to build for MacOS X. 1436 1437Changes for the 5.2 release (the cctools-277 release): 1438- Added default cases for i386 and ppc subtypes to get_arch_from_host() which 1439 does a sprintf() for the unknown subtypes. Also added code for unknown 1440 types to get_arch_name_from_types() insteading of returning "unknown". 1441 Radar bug #2241690. 1442 1443Changes for the 5.2 release (the cctools-274 release): 1444- Removed all uses of CPU_SUBTYPE_586SX. Added the pentium, pentiumpro, 1445 pentiumIImodel3 and pentiumIImodel5 subtypes. Updated cpusubtype_combine() and 1446 cpusubtype_findbestarch() deal with the new intel cpusubtypes. Radar bug 1447 #2231830. 1448 1449Changes for the 5.2 release (the cctools-270 release): 1450- Fixed a bug in get_toc_byte_sex() which did not have code to deal with the 1451 extended format #1. 1452 1453Changes for the 5.2 release (the cctools-267 release): 1454- Added many casts and dummy variables to deal with MetroWerks compiler 1455 warnings (the ones with out -Wall). Radar bug #2227678. 1456- Added support for the 4.4BSD extend format #1 feature where the size of the 1457 name is in the ar_name field and the name follow the archive header before the 1458 contents of the member. A member_name and member_name_size field have been 1459 added to the ofile struct to support this. Radar bug #1670513. 1460 1461Changes for the 5.1 release (the cctools-261 release): 1462- Added the 603e, 603ev, and 750 to the table of arch types. 1463- Added the case for CPU_SUBTYPE_POWERPC_750 in get_arch_from_host() in arch.c 1464 (it had support for CPU_SUBTYPE_POWERPC_603e and CPU_SUBTYPE_POWERPC_603ev). 1465 (Radar 2213821) 1466- Changed cpusubtype_findbestarch() in best_arch.c for PowerPC subtypes. If an 1467 exact match is not found the subtype will be picked from the following order: 1468 750, 604e, 604, 603ev, 603e, 603, ALL 1469 Note the 601 is NOT in the list above. It is only picked via an exact match. 1470 (Radar 2213821) 1471- Changed cpusubtype_combine() in best_arch.c for for PowerPC subtypes. 1472 Combining with the ALL type becomes the other type. Combining anything with 1473 the 601 becomes 601. All other non exact matches combine to the ALL type. 1474 (Radar 2213821) 1475 1476Changes for the 5.1 release (the cctools-254 release): 1477- Fixed a bug in swap_dylib_module() where it did not swap the two objc fields. 1478 1479Changes for the 5.1 release (the cctools-252 release): 1480- Removed the m98k arch entry from arch.c and reorder the table to put the 1481 Rhapsody archs first. 1482 1483Changes for the 5.1 release (the cctools-247 release): 1484- Added MKDIRS if code to the Makefile to build native on Rhapsody. 1485- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody 1486 where tar does not. 1487- Changed the Makefile so profiled objects get built for RC_OS teflon. 1488- Changed the code ifdef __TEFLON__ to ifndef __SLICK__ (where __TEFLON__ will 1489 nolonger be defined for Rhapsody builds) so the default builds will be native 1490 Rhapsody builds. The changes were to execute.c, ofile.c and writeout.c . 1491 1492Changes for the 5.0 release (the cctools-240 release): 1493- Moved fatals.c in the Makefile from CFILES2 to CFILES1 so it can be used by 1494 the GNU assembler source. 1495 1496Changes for the 5.0 release (the cctools-239 release): 1497- Fixed a bug in get_arch_from_host() for the family cpusubtype not getting 1498 set correctly for 603, 604 and 604e 1499 1500Changes for the 5.0 release (the cctools-235 release): 1501- Added PPC_RELOC_JBSR to reloc_has_pair() in reloc.c . 1502- Fixed a warning about testing an unsigned value for less than zero in 1503 writeout.c 1504 1505Changes for the 5.0 release (the cctools-230 release): 1506- Added ppc604e to the arch table and to get_arch_from_host(). This is what 1507 some kernels on some of Power Mac 8500 is returning today. 1508- Added a cast to writeout.c to get rid of a warning and fix a bug where it 1509 was testing ran_off < 0 which is now unsigned. 1510 1511Changes for the 5.0 release (the cctools-226 release): 1512- Added ppc604 to the arch table and to get_arch_from_host(). This is what 1513 the kernel on the Power Mac 8500 is returning. 1514 1515Changes for the 5.0 release (the cctools-224 release): 1516- Changed including <bsd/ranlib.h> to <mach-o/ranlib.h> which uses unsigned long 1517 instead of off_t (64 bits on Teflon). 1518- Fixed a bug in the __TEFLON__ execute code that was not testing the return 1519 status for 0. 1520- Added the routines swap_ppc_float_state_t() and swap_ppc_exception_state_t() 1521 to swap the other ppc flavors to byteswap.c and swap_headers.c . 1522- Changed cpusubtype_findbestarch() for PowerPC to deal with the 603 and 604 1523 types the best I can. 1524- Changed cpusubtype_combine() for PowerPC to combine any specific cpusubtype 1525 with the CPU_SUBTYPE_POWERPC_ALL and return the specific cpusubtype. Made 1526 a cut at combining the 603 and 604 types. 1527 1528Changes for the 5.0 release (the cctools-222 release): 1529- Added get_stack_direction_from_flag(), get_stack_addr_from_flag() and 1530 get_stack_size_from_flag() routines to arch.c. 1531 1532Changes for the 5.0 release (the cctools-221.1 and cctools-222 releases): 1533- Picked up changed to the Makefile to not build profile objects for teflon. 1534 This is because the PowerPC compiler core dumps with -pg. 1535 1536Changes for the 5.0 release (the cctools-221 release): 1537- Picked up the changes for the correct Rhapsody thread state changes into 1538 ofile.c, bytesex.c and swap_headers.c. 1539 1540Changes for the 5.0 release (the cctools-215 release): 1541- Updated reloc_is_sectdiff() and reloc_has_pair() in reloc.c for the PowerPC 1542 relocation types PPC_RELOC_HI16_SECTDIFF, PPC_RELOC_LO16_SECTDIFF and 1543 PPC_RELOC_HA16_SECTDIFF. 1544 1545Changes for the 5.0 release (the cctools-212 release): 1546- Added the ppc601 and ppc603 specific arch types. The specific types at this 1547 point are treated as mutually exclusive and can't combine with each other and 1548 only can combine with the ALL type. 1549 1550Changes for the 5.0 release (the cctools-211 release): 1551- Integrated changes to allow teflon builds (RC_OS=teflon or RC_OS=nextstep) to 1552 not build shlib in the Makefile. Also changes in the sources to not 1553 include <libc.h> for __TEFLON__ builds. 1554 1555Changes for the 5.0 release (the cctools-210 release): 1556- Changed everything from using m98k to ppc. 1557 1558Changes for the 4.0 release (the cctools-193 release): 1559- Changed the way what appears to be a malformed fat file for files that start 1560 with the FAT_MAGIC to treat them as unknown files rather than malformed fat 1561 files. This fixes the problem checksyms(l) was having with java applets which 1562 use the same magic number (bug #63886). 1563 1564Changes for the 4.0 release (the cctools-185 release): 1565- Changed checkout.c to deal with ld -r files vs. .o files from the assember 1566 which differ as the indirect symbol table is between the symbol table and 1567 string table in the ld -r case. This was to fix redo_prebinding(1) but also 1568 fixes strip. 1569- Changed checkout.c to deal with segments marked SG_FVMLIB so not to complain 1570 about them. This was to fix redo_prebinding(1). 1571- Changed ofile.c for i860 thread status on non-m68k machines to not check or 1572 swap the thread status which the struct has different layout on non-m68k 1573 machines. This was to fix redo_prebinding(1). 1574 1575Changes for the 4.0 release (the cctools-168 release): 1576- Change the version numbers of dynamic library to the form X[.Y[.Z]] to match 1577 how next does versioning of it's projects. This effected libtool(1), ld(1), 1578 otool(1), dyld, libstuff(version_number.c) and man pages for ld and libtool 1579 bug #55627). The change here is the new file version_number.c. 1580 1581Changes for the 4.0 release (the cctools-166 release): 1582- Changed the use of the cpp macro DYNAMIC (set by the Makefile) to __DYNAMIC__ 1583 (set by the compiler when -dynamic is in effect). 1584 1585Changes for the 4.0 release (the cctools-161 release): 1586- Added in the Makefile passing -DDYNAMIC for things built with -dynamic 1587 Then ifdef'ed out the const in arch.c for arch_flags[] with DYNAMIC so that 1588 when this is put in a dynamic shared library it does not have relocation 1589 entries in a read-only section. 1590 1591Changes for the 4.0 release (the cctools-154 release): 1592- To fix a bug in stripping .o files compiled dynamic the routine 1593 copy_new_symbol_info() needed to base it's copy output on if there was an 1594 dynamic symbol table command in the object not on if it had MH_DYLDLINK in 1595 the mach header. So a pointer to the old dynamic symbol table command is now 1596 passed and if not null the full dynamic symbol table is copied out. 1597 1598Changes for the 4.0 release (the cctools-150 release): 1599- Fixed some problems in ofile_process() with passing the correct arch_name 1600 argument to processor() for fat files. 1601- Changed the profiled objects to be compiled with -dynamic. 1602- Changed everything to use __private_extern__ . 1603 1604Changes for the 4.0 release (the cctools-149 release): 1605- Fixed a bug in ofile_process() in ofile.c for #ifdef OTOOL when an arch was 1606 specified as for cross bytesex. The problem was the #ifdef OTOOL does not 1607 swap the mach header and it was being used in ofile_process() to select the 1608 arch. Some ifdef'ed OTOOL was added (bug #50350). 1609 1610Changes for the 4.0 release (the cctools-148 release): 1611- Changed how the libstuff directory builds. It now builds 4 libraries. One 1612 for the following uses: static, dynamic, profiled and shlib. 1613 1614Changes for the 4.0 release (the cctools-146 release): 1615- Fixed a bug in swap_sparc_thread_state_regs() where the reserved field of 1616 the psw was not included in the swap code (bug #49685). This was CCC 1617 approved for 3.3risc and a cctools-142.1 clone with just this fix was 1618 submitted. 1619 1620Changes for the 4.0 release (the cctools-145 release): 1621- Changed writeout() to update the time stamp for dylibs. 1622 1623Changes for the 4.0 release (the cctools-143 release): 1624- Added support to loop through the modules of a dylib in ofile_process() when 1625 the new prameter dylib_flat == FALSE. This is use in nm(1) to print the 1626 symbol tables of a dylib. 1627 1628Changes for the 4.0 release (the cctools-140 release): 1629- Changed vm_flush_cache() to define __3_3_User_with_hppa__ so it will build 1630 for 4.0. 1631 1632Changes for the 4.0 release (the cctools-133 release): 1633- Picked up the sparc changes to byte_sex.c and swap_headers.c that swaps the 1634 floating-point sparc thread state. 1635- Picked up the sparc changes to check_Mach_O() in ofile.c for checking and 1636 swaping the floating-point thread. 1637- Fixed a problem in strip for cross byte sex striping when the dynamic 1638 symbol table info is present. In strip.c the problem was the new symbolic 1639 tables were not swapped to the target byte sex. And in writeout.c in libstuff 1640 the problem was that parts of the headers were used after they were swapped. 1641 1642Changes for the 4.0 release (the cctools-132 release): 1643- Picked up the sparc changes to reloc.c for the sparc relocs. 1644- Picked up the sparc changes to byte_sex.c and swap_headers.c that swaps the 1645 sparc thread state. 1646- Picked up the sparc changes to check_Mach_O() in ofile.c for checking the 1647 sparc thread state. 1648- Fixed a logic bug in cpusubtype_findbestarch() where the loops after the 1649 cases on the cputype were not checking to make sure the cputype of the fat 1650 arch struct was right before checking the subtype. 1651 1652Changes for the 3.3 release (the cctools-128 release): 1653- Fixed a bug in symbol_string_at_end() in checkout.c which was not using the 1654 object->object_size to test if the LINKEDIT segment covered the end of the 1655 file. 1656 1657Changes for the 3.3 release (the cctools-125 release): 1658- Fixed a bug in get_arch_from_host() in arch.c for the hppa where the family 1659 cpu_subtype was getting set to a specific subtype CPU_SUBTYPE_HPPA_7100 for 1660 that host. 1661 1662Changes for the 3.3 release (the cctools-124 release): 1663- Added a temporary error message to check_object() in checkout.c to print the 1664 error "current limitation, can't process files with LC_DYSYMTAB load command" 1665 so the strip(1), nmedit(1) and indr(l) for now print a reasonable message 1666 when such a file is used. 1667 1668Changes for the 3.3 release (the cctools-119 release): 1669- Picked up first set of changes for sparc target. 1670 1671Changes for the 3.3 release (the cctools-118 release): 1672- Fixed a bug that crashed strip when doing a strip -S on a library and a member 1673 had no symbol table command. The bug was in writeout.c in libstuff at line 1674 490 where it indirected thought the pointer to the symbol table command 1675 without checking if it was NULL. 1676 1677Changes for the 3.3 release (the cctools-104 release): 1678- Changed the name of the first parameter of swap_ident_command() from id to 1679 id_cmd (in bytesex.c). The compiler is treating this as a reserved word. 1680 1681Changes for the 3.3 release (the cctools-102 release): 1682- Integrated in the hppa support. 1683 Changed the rounding in calc_hppa_HILO() in hppa.h to round to nearest (add 1684 half then round) from round up. 1685created libstuff/hppa.c and include/stuff/hppa.h for cctools-102 1686 Contains the definition of: 1687 calc_hppa_HILO() 1688different libstuff/arch.c (integrated for cctools-102) 1689 Using cctoolshppa-37. New stuff for hppa cputype. 1690different libstuff/best_arch.c (integrated for cctools-102) 1691 Using cctoolshppa-37. New stuff for hppa cputype. 1692different libstuff/bytesex.c (integrated for cctools-102) 1693 Using cctoolshppa-37. New stuff for hppa cputype. 1694different libstuff/ofile.c (integrated for cctools-102) 1695 Using cctoolshppa-37. New stuff for hppa cputype. 1696different libstuff/swap_headers.c (integrated for cctools-102) 1697 Using cctoolshppa-37. New stuff for hppa cputype. 1698 1699Changes for the 3.2 release (the cctools-25 release): 1700- Added Makefile support for installGNUsrc and fromGNUsrc. 1701 1702Changes for the 3.1 release (the cctools-22 release): 1703- Changed ofile_map() when one architecture is specified to first look for that 1704 specific cpusubtype then the family. This caused gprof(1) to fail to open 1705 a fat file (or fat shlibs) that had an i486 subtype (bug #31857). 1706- Added to arch.c (bug #32553): 1707 { "any", CPU_TYPE_ANY, CPU_SUBTYPE_MULTIPLE }, 1708 { "little", CPU_TYPE_ANY, CPU_SUBTYPE_LITTLE_ENDIAN }, 1709 { "big", CPU_TYPE_ANY, CPU_SUBTYPE_BIG_ENDIAN }, 1710 1711Changes for the 3.1 release (the cctools-15 release): 1712- Fixed a bug where cpusubtype_findbestarch() would fail to select an i486 1713 object from a fat file when a starting with a CPU_SUBTYPE_I386_ALL. 1714 The fix was that cpusubtype_findbestarch() was changed such that 1715 previously when it failed it would pick something (architecture dependent) 1716 that will work for the cputype and will successfully combine when 1717 cpusubtype_combine() is applied to the two cpusubtypes. 1718 1719 For the i386 architecture the selection is the lowest in order of 1720 CPU_SUBTYPE_I386_ALL, CPU_SUBTYPE_486, CPU_SUBTYPE_486SX, CPU_SUBTYPE_586 1721 and CPU_SUBTYPE_586SX starting with the given cpusubtype. 1722 1723 For the m68k architecture (where the cpusubtypes do NOT run on anything 1724 other than that implementation) the selection favors the 1725 CPU_SUBTYPE_MC68040 over the CPU_SUBTYPE_MC68030_ONLY when starting 1726 with the cpusubtype of CPU_SUBTYPE_MC680x0_ALL. 1727 Bug #30765. 1728- Removed the kludged mach/m98k/thread_status.h with only an entry point and 1729 added the code to swap the grf thread with the real entry point. 1730 1731Changes for the 3.1 release (the cctools-13 release): 1732- Added the m98k (PowerPC) architecture. This includes a kludged 1733 mach/m98k/thread_status.h with only an entry point. 1734 1735Changes for the 3.1 release (the cctools-10 release): 1736- Changed the cpusubtypes to use the correct #defines from <mach/machine.h> in 1737 arch.c, ofile.c and swap_headers.c . Also added the i486, i486SX, i586, and 1738 i586SX arch flags and code to back them up. 1739 1740Changes for the 3.1 release (the cctools-8 release): 1741- Changed the checking in check_archive to only look at the cputype and not at 1742 both the cputype and cpusubtype (this will change as the correct handling of 1743 the cpusubtype is implemented). 1744 1745Changes for the 3.1 release (the cctools-6 release): 1746- Fixed a bug in get_arch_from_host() where it did not recognize the 486 cpu 1747 subtype. 1748- Hacked in a fix for a basic algorthim flaw in ofile_process() in ofile.c as 1749 it makes a second pass over the mapped ofile it looses the information as 1750 to which bytesex the objects were because it swaps the memory in place. 1751 So a call to ofile_unmap() and ofile_map() were placed after the first 1752 loop. (this still needs a better fix). 1753 1754Changes for the 3.1 release (the cctools-5 release): 1755- Picked up the lono team mods to ofile.c and swap_headers for the change to 1756 the i386 thread_status.h. 1757- Picked up the lono team mods to bytesex.c for some new code to swap 16-bit 1758 address segments. 1759- Fixed a bug in ofile_next_member() in ofile.c where if the next member was not 1760 an object file the fields (object_*, mh, load_commands) were not zeroed out. 1761 This caused libtool(1) to think an archive member was an object file when it 1762 was not. 1763 1764Changes for the 3.1 release (the cctools-4 release): 1765- Changed the arch name of ix86 to i386. 1766- Fixed a bug in get_arch_from_host() in arch.c that set the cpusubtype for the 1767 family arch_flags wrong. This needed to be set based on the cputype and 1768 hard coded for each cputype. The problem was that the 040 cpusubtype was 1769 being set for the family arch_flags when the 030 cpusubtype was needed. 1770 1771Changes for the 3.0 release (the -56 compiler release): 1772- Added hash_string.c from the mkshlib directory to libstuff. 1773 1774Changes for the 3.0 release (the -56 compiler release): 1775- Picked up some fixes for ofile.c where host_byte_sex was not set early enough 1776 in some of the functions. 1777 1778Changes for the 3.0 release (the -53 compiler release): 1779- Added SWAP_FLOAT(). 1780 1781Changes for the 3.0 release (the -49 compiler release): 1782- Changed {BIG,LITTLE}_ENDIAN to __{BIG,LITTEL}_ENDIAN__ as the cc-49 cc driver 1783 will define them. 1784- Changed the Makefile to meet the RC api. 1785 1786Changes for the 3.0 release (the -44 compiler release): 1787- Created the libstuff directory. 1788