From b70edbd1fc75474487c7f242a22e69754eee5d47 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 13 May 2015 22:24:14 +0100 Subject: [PATCH] 751 --- cctools/Makefile | 414 +- cctools/RelNotes/CompilerTools.html | 14 +- cctools/RelNotes/Private_CompilerTools.html | 11218 +------------------------- cctools/as/Makefile | 91 - cctools/as/arm.c | 3 +- cctools/as/fixes.c | 1 + cctools/as/notes | 577 +- cctools/include/mach/machine.h | 1 - cctools/include/notes | 1467 +--- cctools/ld/notes | 5143 +----------- cctools/libmacho/notes | 490 +- cctools/libstuff/notes | 1499 +--- cctools/man/arch.3 | 4 +- cctools/man/codesign_allocate.1 | 4 +- cctools/man/notes | 7 + cctools/misc/install_name_tool.c | 2 +- cctools/misc/notes | 2799 +------ cctools/otool/notes | 1329 +-- cctools/otool/print_objc.c | 16 +- cctools/otool/print_objc2_32bit.c | 10 +- cctools/otool/print_objc2_64bit.c | 20 +- 21 files changed, 387 insertions(+), 24722 deletions(-) rewrite cctools/Makefile (98%) rewrite cctools/RelNotes/Private_CompilerTools.html (99%) rewrite cctools/as/notes (99%) rewrite cctools/include/notes (97%) rewrite cctools/ld/notes (98%) rewrite cctools/libmacho/notes (88%) rewrite cctools/libstuff/notes (99%) rewrite cctools/misc/notes (99%) rewrite cctools/otool/notes (97%) diff --git a/cctools/Makefile b/cctools/Makefile dissimilarity index 98% index 3b075b0..44e56a4 100644 --- a/cctools/Makefile +++ b/cctools/Makefile @@ -1,410 +1,4 @@ -# Note: For Darwin developers only building for current MacOS X release is -# supported. The Openstep target will NOT build outside of Apple as it requires -# 4.3bsd licenced code. -# -# Building for three target OS's are currently supported: -# -# MacOS X (the default) -# RC_OS is set to macos (the top level makefile does this) -# RC_CFLAGS needs -D__KODIAK__ when RC_RELEASE is Kodiak (Public Beta), -# to get the Public Beta directory layout. -# RC_CFLAGS needs -D__GONZO_BUNSEN_BEAKER__ when RC_RELEASE is Gonzo, -# Bunsen or Beaker to get the old directory layout. -# The code is #ifdef'ed with __Mach30__ is picked up from -# Rhapsody -# RC_OS is set to teflon -# RC_CFLAGS needs the additional flag -D__HERA__ -# Openstep -# RC_OS is set to nextstep -# RC_CFLAGS needs the additional flag -D__OPENSTEP__ -# -export USE_APPLE_PB_SUPPORT = all - -DSTROOT = / -RC_OS = macos -RC_CFLAGS = - -INSTALLSRC_SUBDIRS = $(COMMON_SUBDIRS) $(SUBDIRS_32) ar include efitools -COMMON_SUBDIRS = libstuff as gprof misc libmacho RelNotes man cbtlibs otool -APPLE_SUBDIRS = ar -SUBDIRS_32 = ld - -ifeq "macos" "$(RC_OS)" - OLD_LIBKLD := $(shell if [ "$(RC_RELEASE)" = "Puma" ] || \ - [ "$(RC_RELEASE)" = "Jaguar" ] || \ - [ "$(RC_RELEASE)" = "Panther" ] || \ - [ "$(RC_RELEASE)" = "MuonPrime" ] || \ - [ "$(RC_RELEASE)" = "MuonSeed" ] || \ - [ "$(RC_RELEASE)" = "SUPanWheat" ] || \ - [ "$(RC_RELEASE)" = "Tiger" ] || \ - [ "$(RC_RELEASE)" = "SUTiSoho" ] || \ - [ "$(RC_RELEASE)" = "Leopard" ] || \ - [ "$(RC_RELEASE)" = "Vail" ] || \ - [ "$(RC_RELEASE)" = "SugarBowl" ] || \ - [ "$(RC_RELEASE)" = "BigBear" ] || \ - [ "$(RC_RELEASE)" = "Homewood" ]; then \ - echo "YES" ; \ - else \ - echo "NO" ; fi; ) -else - OLD_LIBKLD = NO -endif - -ifeq "macos" "$(RC_OS)" - TRIE := $(shell if [ "$(RC_RELEASE)" = "Puma" ] || \ - [ "$(RC_RELEASE)" = "Jaguar" ] || \ - [ "$(RC_RELEASE)" = "Panther" ] || \ - [ "$(RC_RELEASE)" = "MuonPrime" ] || \ - [ "$(RC_RELEASE)" = "MuonSeed" ] || \ - [ "$(RC_RELEASE)" = "SUPanWheat" ] || \ - [ "$(RC_RELEASE)" = "Tiger" ] || \ - [ "$(RC_RELEASE)" = "SUTiSoho" ] || \ - [ "$(RC_RELEASE)" = "Leopard" ] || \ - [ "$(RC_RELEASE)" = "Vail" ] || \ - [ "$(RC_RELEASE)" = "SugarBowl" ] || \ - [ "$(RC_RELEASE)" = "BigBear" ] || \ - [ "$(RC_RELEASE)" = "Homewood" ] || \ - [ "$(RC_RELEASE)" = "Kirkwood" ]; then \ - echo "" ; \ - else \ - echo "-DTRIE_SUPPORT" ; fi; ) -else - TRIE = -endif - - -# work around to avoid 5820763 -ifeq "$(IPHONEOS_DEPLOYMENT_TARGET)" "2.0" - EFITOOLS = -else - EFITOOLS = efitools -endif - -ifeq "nextstep" "$(RC_OS)" - SUBDIRS = $(COMMON_SUBDIRS) -else - SUBDIRS = $(COMMON_SUBDIRS) $(APPLE_SUBDIRS) $(EFITOOLS) -endif - -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif - -all clean: $(DSTROOT) - @if [ "$(SRCROOT)" != "" ] && \ - [ "$(OBJROOT)" != "" ] && \ - [ "$(SYMROOT)" != "" ]; \ - then \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - for i in `echo $(SUBDIRS)`; \ - do \ - echo =========== $(MAKE) $@ for $$i =============; \ - (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/$$i \ - OBJROOT=$(OBJROOT)/$$i \ - SYMROOT=$(SYMROOT)/$$i $@) || exit 1 ; \ - done; \ - SED_RC_CFLAGS=`echo "$(RC_CFLAGS)" | sed 's/-arch ppc64//' \ - | sed 's/-arch x86_64//'`; \ - for i in `echo $(SUBDIRS_32)`; \ - do \ - echo =========== $(MAKE) $@ for $$i =============; \ - (cd $$i; $(MAKE) "RC_CFLAGS=$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/$$i \ - OBJROOT=$(OBJROOT)/$$i \ - SYMROOT=$(SYMROOT)/$$i $@) || exit 1 ; \ - done \ - else \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - for i in `echo $(SUBDIRS)`; \ - do \ - echo =========== $(MAKE) $@ for $$i =============; \ - (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT $@) || exit 1 ; \ - done; \ - SED_RC_CFLAGS=`echo "$(RC_CFLAGS)" | sed 's/-arch ppc64//' \ - | sed 's/-arch x86_64//'`; \ - for i in `echo $(SUBDIRS_32)`; \ - do \ - echo =========== $(MAKE) $@ for $$i =============; \ - (cd $$i; $(MAKE) RC_CFLAGS="$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT $@) || exit 1 ; \ - done \ - fi - -install: - @if [ $(SRCROOT) ]; \ - then \ - projName=`basename $(SRCROOT) | \ - sed 's/-[-0-9.]*//' | sed 's/\.cvs//'`; \ - if [ "$$projName" = cctools ]; \ - then \ - target=install_tools; \ - elif [ "$$projName" = cctools_sdk ]; \ - then \ - target=install_tools; \ - elif [ "$$projName" = cctoolslib ]; \ - then \ - target=lib_ofiles_install; \ - else \ - echo "Unknown project name $$projName"; \ - exit 1; \ - fi; \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - echo =========== $(MAKE) $$target =============; \ - $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" TRIE="$(TRIE)" \ - DSTROOT=$$DSTROOT/$(INSTALL_LOCATION) \ - SRCROOT=$(SRCROOT) \ - OBJROOT=$(OBJROOT) \ - SYMROOT=$(SYMROOT) $$target; \ - else \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - echo =========== $(MAKE) install_tools =============; \ - $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" RC_ARCHS="$(RC_ARCHS)" \ - RC_OS="$(RC_OS)" SUBDIRS="$(SUBDIRS)" \ - SUBDIRS_32="$(SUBDIRS_32)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" TRIE="$(TRIE)" \ - DSTROOT=$$DSTROOT install_tools lib_ofiles_install; \ - fi - -install_tools: installhdrs - @if [ $(SRCROOT) ]; \ - then \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - for i in `echo $(SUBDIRS)`; \ - do \ - echo ======== $(MAKE) install for $$i ============; \ - (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/$$i \ - OBJROOT=$(OBJROOT)/$$i \ - SYMROOT=$(SYMROOT)/$$i install) || exit 1; \ - done; \ - SED_RC_CFLAGS=`echo "$(RC_CFLAGS)" | sed 's/-arch ppc64//' \ - | sed 's/-arch x86_64//'`; \ - for i in `echo $(SUBDIRS_32)`; \ - do \ - echo ======== $(MAKE) install for $$i ============; \ - (cd $$i; $(MAKE) RC_CFLAGS="$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/$$i \ - OBJROOT=$(OBJROOT)/$$i \ - SYMROOT=$(SYMROOT)/$$i install) || exit 1; \ - done; \ - if [ $(RC_RELEASE) ]; \ - then \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - for i in `echo $(SUBDIRS)`; \ - do \ - echo ===== $(MAKE) shlib_clean for $$i ==========; \ - (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" \ - TRIE="$(TRIE)" DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/$$i \ - OBJROOT=$(OBJROOT)/$$i \ - SYMROOT=$(SYMROOT)/$$i shlib_clean) || exit 1; \ - done \ - fi \ - else \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - for i in `echo $(SUBDIRS)`; \ - do \ - echo ========= $(MAKE) install for $$i ===========; \ - (cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" TRIE="$(TRIE)" \ - DSTROOT=$$DSTROOT install) || exit 1; \ - done; \ - SED_RC_CFLAGS=`echo "$(RC_CFLAGS)" | sed 's/-arch ppc64//' \ - | sed 's/-arch x86_64//'`; \ - for i in `echo $(SUBDIRS_32)`; \ - do \ - echo ========= $(MAKE) install for $$i ===========; \ - (cd $$i; $(MAKE) RC_CFLAGS="$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" TRIE="$(TRIE)" \ - DSTROOT=$$DSTROOT install) || exit 1; \ - done \ - fi - -ofiles_install: - @ export RC_FORCEHDRS=YES; \ - $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" \ - RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT) \ - OBJROOT=$(OBJROOT) \ - SYMROOT=$(SYMROOT) \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" TRIE="$(TRIE)" \ - lib_ofiles_install - -lib_ofiles lib_ofiles_install: installhdrs - @if [ $(SRCROOT) ]; \ - then \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - SED_RC_CFLAGS=`echo "$(RC_CFLAGS)" | sed 's/-arch ppc64//' \ - | sed 's/-arch x86_64//'`; \ - echo =========== $(MAKE) $@ for libstuff =============; \ - (cd libstuff; $(MAKE) "RC_CFLAGS=$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/libstuff \ - OBJROOT=$(OBJROOT)/libstuff \ - SYMROOT=$(SYMROOT)/libstuff $@) || exit 1; \ - echo =========== $(MAKE) all for libstuff =============; \ - (cd libstuff; $(MAKE) "RC_CFLAGS=$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - OLD_LIBKLD="$(OLD_LIBKLD)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/libstuff \ - OBJROOT=$(OBJROOT)/libstuff \ - SYMROOT=$(SYMROOT)/libstuff all) || exit 1; \ - echo =========== $(MAKE) $@ for libmacho =============; \ - (cd libmacho; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - OLD_LIBKLD="$(OLD_LIBKLD)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/libmacho \ - OBJROOT=$(OBJROOT)/libmacho \ - SYMROOT=$(SYMROOT)/libmacho $@) || exit 1; \ - echo =========== $(MAKE) $@ for ld =============; \ - (cd ld; $(MAKE) "RC_CFLAGS=$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - OLD_LIBKLD="$(OLD_LIBKLD)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/ld \ - OBJROOT=$(OBJROOT)/ld \ - SYMROOT=$(SYMROOT)/ld $@) || exit 1; \ - echo =========== $(MAKE) $@ for misc =============; \ - (cd misc; $(MAKE) "RC_CFLAGS=$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - TRIE="$(TRIE)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/misc \ - OBJROOT=$(OBJROOT)/misc \ - SYMROOT=$(SYMROOT)/misc $@) || exit 1; \ - echo =========== $(MAKE) $@ for cbtlibs =============; \ - (cd cbtlibs; $(MAKE) "RC_CFLAGS=$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT \ - SRCROOT=$(SRCROOT)/cbtlibs \ - OBJROOT=$(OBJROOT)/cbtlibs \ - SYMROOT=$(SYMROOT)/cbtlibs $@) || exit 1; \ - else \ - CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - SED_RC_CFLAGS=`echo "$(RC_CFLAGS)" | sed 's/-arch ppc64//' \ - | sed 's/-arch x86_64//'`; \ - echo =========== $(MAKE) $@ for libstuff =============; \ - (cd libstuff; $(MAKE) "RC_CFLAGS=$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT $@) || exit 1; \ - echo =========== $(MAKE) all for libstuff =============; \ - (cd libstuff; $(MAKE) "RC_CFLAGS=$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT all) || exit 1; \ - echo =========== $(MAKE) $@ for libmacho =============; \ - (cd libmacho; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT $@) || exit 1; \ - echo =========== $(MAKE) $@ for ld =============; \ - (cd ld; $(MAKE) "RC_CFLAGS=$$SED_RC_CFLAGS" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - OLD_LIBKLD="$(OLD_LIBKLD)" \ - DSTROOT=$$DSTROOT $@) || exit 1; \ - echo =========== $(MAKE) $@ for misc =============; \ - (cd misc; $(MAKE) "RC_CFLAGS=$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - TRIE="$(TRIE)" \ - DSTROOT=$$DSTROOT $@) || exit 1; \ - (cd cbtlibs; $(MAKE) "RC_CFLAGS=$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT $@) || exit 1; \ - fi - -installsrc: SRCROOT - $(MKDIRS) $(SRCROOT) - cp Makefile APPLE_LICENSE PB.project $(SRCROOT) - for i in `echo $(INSTALLSRC_SUBDIRS)`; \ - do \ - echo =========== $(MAKE) $@ for $$i =============; \ - (cd $$i; $(MAKE) SRCROOT=$$SRCROOT/$$i \ - EFITOOLS="$(EFITOOLS)" OPEN="$(OPEN)" $@) || exit 1; \ - done - -installGASsrc: SRCROOT - $(MKDIRS) $(SRCROOT) - cp Makefile $(SRCROOT) - @for i in as libstuff include ; \ - do \ - echo =========== $(MAKE) $@ for $$i =============; \ - (cd $$i; $(MAKE) SRCROOT=$$SRCROOT/$$i $@) || exit 1; \ - done - -fromGASsrc: - @CWD=`pwd`; cd "$(DSTROOT)"; DSTROOT=`pwd`; cd "$$CWD"; \ - echo =========== $(MAKE) fromGASsrc for libstuff =============; \ - (cd libstuff; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT fromGASsrc) || exit 1; \ - echo =========== $(MAKE) appc_build for as =============; \ - (cd as; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \ - RC_ARCHS="$(RC_ARCHS)" RC_OS="$(RC_OS)" \ - DSTROOT=$$DSTROOT appc_build) || exit 1; \ - -installhdrs: $(DSTROOT) - @if [ $(SRCROOT) ]; \ - then \ - projName=`basename $(SRCROOT) | sed 's/-[0-9.]*//'`; \ - if [ "$$projName" = cctools -a $(RC_OS) = macos ] && \ - [ "$(RC_FORCEHDRS)" != "YES" ]; \ - then \ - echo === cctools does not install headers for macos ===;\ - else \ - (cd include; $(MAKE) DSTROOT=$(DSTROOT) \ - RC_OS="$(RC_OS)" install) || exit 1; \ - fi; \ - else \ - (cd include; $(MAKE) DSTROOT=$(DSTROOT) RC_OS=$(RC_OS) \ - install) || exit 1; \ - fi - -$(DSTROOT): - $(MKDIRS) $@ - -SRCROOT: - @if [ -n "${$@}" ]; \ - then \ - exit 0; \ - else \ - echo Must define $@; \ - exit 1; \ - fi +# Note: For Darwin developers only building for current MacOS X release is +# supported. The Openstep target will NOT build outside of Apple as it requires +# 4.3bsd licenced code. +# diff --git a/cctools/RelNotes/CompilerTools.html b/cctools/RelNotes/CompilerTools.html index 9583393..190556e 100644 --- a/cctools/RelNotes/CompilerTools.html +++ b/cctools/RelNotes/CompilerTools.html @@ -1,5 +1,5 @@ - + Mac OS X Compiler Tools Release Notes @@ -7,7 +7,7 @@ -

Mac OS X Xcode 3.2 Release Notes:
+

Mac OS X Xcode 3.2.1 Release Notes:
Compiler Tools

@@ -21,8 +21,9 @@ Compiler Tools

-

These notes are for the MacOS X Xcode 3.2 Release of the compiler -tools. They contain information about the following topics:

+

These notes are for the MacOS X Xcode 3.2.1 Release of the +compiler tools. They contain information about the following +topics:

  • The Mac OS X Mach-O GNU-based assemblers
  • @@ -33,6 +34,11 @@ tools. They contain information about the following topics:

    on)
+

Notes Specific to Mac OS X Xcode 3.2.1 Release

+ +

There only new feature is supporting the iPhone 3.0 sdk and there +have been bug fixes.

+

Notes Specific to Mac OS X Xcode 3.2 Release

There are no new features and only bug fixes.

diff --git a/cctools/RelNotes/Private_CompilerTools.html b/cctools/RelNotes/Private_CompilerTools.html dissimilarity index 99% index adea258..cf7a160 100644 --- a/cctools/RelNotes/Private_CompilerTools.html +++ b/cctools/RelNotes/Private_CompilerTools.html @@ -1,11143 +1,75 @@ - - - - Private Compiler Tools Release Notes - - - - - - -

Mac OS X Xcode 3.2 Developer Release Copyright -2008 by Apple, Inc. All Rights Reserved.

- -

Private Mac OS X Xcode 3.2 Developer Release:
-Compiler Tools (cctools-750)

- -

This file contains release notes for the 5.26 release of the -Compiler Tools for the Mac OS X Xcode 3.2 Developer Release. This -file contains information about the following topics:

- -
    -
  • The Mac OS X Mach-O GNU-based assemblers
  • - -
  • The classic Mac OS X 32-bit Mach-O static link editor
  • - -
  • Mach-O object tools (nm, otool, and so - on) 
  • -
- -

Notes Specific to Release 5.26 (Mac OS X Xcode 3.2 Developer -Release)

- -
Changes since the last release (cctools-749 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed libtool(1) to correctly place different arm cpusubtype - llvm bit code files in different fat slices. Radar bug - #6654890.
  • - -
  • Updated nm(1) to display the symbol table of llvm bit code - files in archives. Radar bug #6067110.
  • - -
  • Fixed a bug in otool(1) that was incorrectly disassembling the - operand of an i386 instruction using an index register without a - base register. Radar bug #6533811.
  • - -
  • Improved the error message of install_name_tool(1) when the - operation can't be preformed and the file must be re-linked to - include a suggestion of maybe using -headerpad or - -headerpad_max_install_names. Radar bug #6632968.
  • - -
  • Improved the error message of strip(1) when used on a dSym - file to indicate strip(1) does not operate on that file type. - Radar bug #6569909.
  • - -
  • Fixed otool(1) so it correctly displayed the S_16BYTE_LITERALS - flag for 16-byte literal sections. Radar bug #5947957.
  • - -
  • Fixed a bug in otool(1) when running as a 64-bit program and - using the -ov options on a 32-bit binary where it incorectly - printed an error message about the category defs entries entending - past the end of the section. Radar bug #6652270.
  • - -
  • Added the -rpath, -add_rpath and -delete_rpath options to - install_name_tool(1) for modifying LC_RPATH load commands. Radar - bug #5684850.
  • - -
  • Changed otool(1) to default to use thumb instructions for some - arm cpusubtypes. Radar bug #6651124.
  • -
- -
Changes since the last release (cctools-748 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed otool(1)'s -ov option so it works on 64-bit Mach-O files - and added -V support to print symbol names. Radar bug - #6549235.
  • -
- -
Changes since the last release (cctools-747 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with codesign_allocate(1) producing an - incorrect Mach-O for a 64-bit file. Radar bug #6591303.
  • - -
  • Fixed a crash in segedit(1) when used to replace a section in - a 64-bit Mach-O file.
  • -
- -
Changes since the last release (cctools-746 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with the assembler incorrectly not emitting - Dwarf line table when only .file and no.loc directive is not used. - Radar bug #6593344.
  • -
- -
Changes since the last release (cctools-745 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Added support for the .uleb128 and .sleb128 directives. Radar - bug #4545225.
  • -
- -
Changes since the last release (cctools-744 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with the assembler incorrectly emitting an - extra Dwarf line table when .file/.loc directives are not used. - Radar bug #6589056.
  • -
- -
Changes since the last release (cctools-743 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with the assembler incorrectly emitting an - extra Dwarf Compile Unit when .file/.loc directives are used in - more than one section. Radar bug #6573528.
  • -
- -
Changes since the last release (cctools-742 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with the redo_prebinding(1)(3) code's handling - of LC_REEXPORT_DYLIB's load commands that was causing undefined - symbols. Radar bug #4986624.
  • -
- -
Changes since the last release (cctools-741 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • The cctools-742 version was a version for testing only and not - released.
  • -
- -
Changes since the last release (cctools-740 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed the arm assembler's encoding of where it places Rd in - the instructions qadd, qdadd, qsub and qdsub. Radar bug - #6522202.
  • -
- -
Changes since the last release (cctools-739 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the x86_64 assembler to not call abort() after - reporting assembly errors. Radar bug #6516397.
  • -
- -
Changes since the last release (cctools-738 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the arm assembler to emit 0x46c0 as the thumb 1 nop to - pad to alignment in sections with pure instructions. Radar bug - #6517544.
  • -
- -
Changes since the last release (cctools-737 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Removed the used of mig(1) in the cctools project. Radar bug - #6457206.
  • - -
  • Changed the armv7 assember to mark 32-bit branch instructions - with a new relocation entry. Radar bug #6511482.
  • -
- -
Changes since the last release (cctools-736 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with the assembler incorrectly adding the - value of a weak symbol to the contents of an item to be relocated - referencing it. Radar bug #6505278.
  • - -
  • Fixed a but in otool(1)'s disassembly of arm code that could - cause it to loop if the instruction at the end of a section was 2 - bytes of a 4 byte instruction. Radar bug #6504790.
  • - -
  • Changed the arm assembler to emit nop's to pad to alignment in - sections with pure instructions. Radar bug #6492867.
  • - -
  • Fixed an internal assembler error that can result in an error - like "Can't extend frag 86. chars". Radar bug #6490903.
  • -
- -
Changes since the last release (cctools-735 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Added support for the dwarf .loc and .file directives. Radar - bug #4298593 and #6460301.
  • - -
  • Fixed a mispelling of a relocation error message in the - assembler. Radar bug #6447059.
  • -
- -
Changes since the last release (cctools-734 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed strip(1) so that when run on binaries with the new - compressed LINKEDIT information it does not attempt to update the - info if it is not removing global symbols. Radar bug - #6476423.
  • -
- -
Changes since the last release (cctools-733 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with strip(1) and the -no_uuid option run on - binaries with the new compressed LINKEDIT information. Radar bug - #6478235.
  • -
- -
Changes since the last release (cctools-732 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the assembler to allow .weak_definition on a symbol in - any section. Radar bug #6422713.
  • - -
  • Updated strip(1) to support the new compressed LINKEDIT - information. Radar bug #6257854.
  • - -
  • Fixed the dissassembly of the arm ldmia instruction so it - correctly indicated when write back is to Rn is not going to - happnen and the '!' character is not used when Rn is is the - register list. Radar bug #6394340.
  • - -
  • Changed strings(1) and other tools to allow 64-bit Mach-O core - files to have LC_THREAD commands that are only a multiple of 4 and - not 8 and not cause a malformed object error. Radar bug - #6379874.
  • -
- -
Changes since the last release (cctools-731 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with the arm assembler directive .thumb_set in - not setting the N_ARM_THUMB_DEF bit on the symbol. Radar bug - #6366869.
  • -
- -
Changes since the last release (cctools-730 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the cctools_ofiles project to not build libkld for the - current iPhone SDK. Radar bug #6376136.
  • -
- -
Changes since the last release (cctools-729 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the internal routine in cctools that translates - the target_triple string returned - by lto_module_get_target_triple() to allow "i386". Radar bug - #6331191.
  • -
- -
Changes since the last release (cctools-728 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the assembler driver, /usr/bin/as , when running on an - Intel x86_64 host to default to -arch x86_64 instead of -arch - i386. Radar bug #6233320.
  • -
- -
Changes since the last release (cctools-727 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed the arm assembler to create a relocation entry for a b.w - instruction. Radar bug #6297258.
  • - -
  • Fixed the arm assembler to allow a 24-bit parameter to the svc - instruction. Radar bug #6337904.
  • - -
  • Backed out the changed the assembler driver, /usr/bin/as, when - it is being run as a 64-bit program on Intel x86 hardware, to - default to assemble as if the -arch x86_64 flag was set. Radar bug - #6233320.
  • -
- -
Changes since the last release (cctools-726 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the assembler driver, /usr/bin/as , when running on an - Intel x86_64 host to default to -arch x86_64 instead of -arch - i386. Radar bug #6233320.
  • -
- -
Changes since the last release (cctools-725 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with libtool(1) incorrectly putting internal - symbols from LTO objects in the archive table of contents. Radar - bug #6092587.
  • -
- -
Changes since the last release (cctools-724 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Added support for new compressed LINKEDIT information. Radar - bug #6232822.
  • - -
  • Fixed a problem with otool(1) incorrectly print the archive - table of contents of a thin LTO archive. Radar bug #6303685.
  • -
- -
Changes since the last release (cctools-723 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Added the MH_KEXT_BUNDLE and MH_DEAD_STRIPPABLE_DYLIB - constants to <mach-o/loader.h> and printing of them in - otool(1). Radar bug #6272534.
  • - -
  • Updated the getsegbyname(3) man page to reference the use of - _dyld_get_image_vmaddr_slide(0) with executables linked with -pie. - Radar bug #6194728.
  • - -
  • Backed out the changed the assembler driver, /usr/bin/as, when - it is being run as a 64-bit program on Intel x86 hardware, to - default to assemble as if the -arch x86_64 flag was set. Radar bug - #6233320.
  • -
- -
Changes since the last release (cctools-722 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the assembler driver, /usr/bin/as, when it is being - run as a 64-bit program on Intel x86 hardware, to default to - assemble as if the -arch x86_64 flag was set. Radar bug - #6233320.
  • - -
  • Integrated the beginning changes for dwarf directive support - in the assembler. This is not yet hooked up and just allows the - source base to remain up to date with the work going on. Radar bug - #4545225.
  • -
- -
Changes since the last release (cctools-721 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed ar(1) if when trying to lock the output file for - writing and gets a Resource temporarily unavailable error to loop - up to 10 time sleeping a second before trying again. Radar bug - #6085183.
  • - -
  • Changed the assembler's .fill directive to allow a size of 8. - Radar bug #5783217.
  • - -
  • Changed the way otool(1)'s -ov for Objective C 2.0 prints the - ivar offset. It now prints that pointer as hex and derefences it - and also print sthe real offset being pointed to as well. Radar - bug #5733291.
  • -
- -
Changes since the last release (cctools-720 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the cctools Makefiles that build kernel pieces and - removed the use of the -force_cpusubtype_ALL flag. Radar bug - #6233829.
  • -
- -
Changes since the last release (cctools-719 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the cctools Makefile remove the added a target for - cctools_ofiles below and add support for the cctools_sdk project - name that appends $(INSTALL_LOCATION) to DSTROOT. Radar bug - #6231663.
  • - -
  • Fixed a typo in the libtool(1) man page. Radar bug - #4574762.
  • -
- -
Changes since the last release (cctools-718 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed the cctools Makefile to add a target for - cctools_ofiles should optionally install into the SDK path. Radar - bug #6231663.
  • -
- -
Changes since the last release (cctools-717 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in the assembler source that would not allow it to - correctly compile with LLVMgcc42. Radar bug #6219587.
  • -
- -
Changes since the last release (cctools-716 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Added the -d file option to mtoc(1) to create a debug - directory entry with it. Radar bug #6211642.
  • -
- -
Changes since the last release (cctools-715 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in the arm assemler where it encoded load-splat - and load-single as load-multiple. Radar bug #6185952.
  • - -
  • Fixed a bug introduced with the change for Radar bug #6159238 - in cctools-715 that caused the parsing of the .zerofill - directive's segment name argument to append a space to it if the - assembly code had a space before the comma. Radar bug - #6195283.
  • - -
  • Fixed a problem with mtoc(1) incorrectly treating some - debugging symbols as undefined symbols. Radar bug 6194828.
  • -
- -
Changes since the last release (cctools-714 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in the assemler that caused it in some cases to - fail to assemble i386 code that used prefixes on the same line as - instructions. Radar bug #6159238.
  • - -
  • Fixed a bug in otool(1) that caused it to loop with the -o - options when the object file has no code and only Objective-C meta - data. Radar bug 6164922.
  • - -
  • Fixed a bug in the arm assemler when used with - -force_cpusubtype_ALL that incorrectly caused it to restricts - instructions that could be assembled. Radar bug #6150777.
  • - -
  • Changed mtoc(1) to now use the correct constant in the f_magic - field for arm binaries not use the one for i386 binaries. Radar - bug #6163015.
  • - -
  • Fixed the assembler's .thumb_set directive which was failing - to parse its second operand. Radar bug #6182961.
  • -
- -
Changes since the last release (cctools-713 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed lipo(1) to not cause and error when empty files are - used. Radar bug #6169510.
  • - -
  • Changed libtool(1) to create separate fat archs for each arm - cpusubtype. Radar bug #6155212.
  • - -
  • Fixed a bug in the assemler that can cause a crash due to an - uninitialized variable. Radar bug #6163385.
  • - -
  • Added the vmrs and vmsr instuctions to the arm assembler. - Radar bug #6152739.
  • -
- -
Changes since the last release (cctools-712 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in lipo(1) if is used on a directory, which - results in a crash after it prints out an Invalid argument - message. Radar bug #6147708.
  • - -
  • Fixed a bug in otool(1) that caused it to crash with the -Lv - or the -ov options when it got to printing out times and Category - Definitions. Radar bug 6107717.
  • - -
  • Fixed some possible crashes with malformed binaries in - otool(1). Radar bug #5796857.
  • - -
  • Updated the arm assembler to print the file and line number - for a case of a bad immediate value. Radar bug #5890008.
  • -
- -
Changes since the last release (cctools-711 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in codesign_allocate (1) if is used on a fat file - with code signatures and not all architectures are specified with - the -a options, which results in a malformed output file. Radar - bug #6128288.
  • -
- -
Changes since the last release (cctools-710 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in the arm assembler that was causing an assembly - time error when assembling (L3-L10)/2 expressions in .byte - expressions when the (L3-L10) value was negitive. Radar bug - #6096697.
  • - -
  • Fixed the cctools sources to correctly build libkld for arm - release trains.
  • -
- -
Changes since the last release (cctools-709 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in lipo(1). Radar bug #4545225.
  • -
- -
Changes since the last release (cctools-708 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in the x86_64 assembler that was incorrectly - relocating items with 64 bit addend with non-zero bits in the high - 32-bits. Radar bug #5955044.
  • - -
  • Fixed some possible crashes with malformed binaries in their - thread commands in the tools. Radar bug #5749890.
  • - -
  • Fixed some possible crashes with malformed binaries in their - section headers in the tools. Radar bug #5749756.
  • - -
  • Fixed some other possible crashes with malformed binaries in - the tools. Radar bug #5750382.
  • - -
  • Removed a call to abort(3) after an assembler error message - that made it appear the assembler was crashing. Radar bug - #6029941
  • - -
  • Fixed some other possible crashes with malformed binaries in - otool(1). Radar bug #5796857.
  • -
- -
Changes since the last release (cctools-707 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed strip(1) to deal with ld(1) -r produced objects that - have no symbols but incorrectly have a filesize of the unnamed - segment to include the whole file as in radar bug #6048484.
  • - -
  • Fixes a bug in checksyms(1) that was giving an error when - built as an x86_64 program if it was given an archive that had - 64-bit objects not on offsets that were multiples of 8.
  • - -
  • Updated the comments in <mach-o/x86_64/reloc.h> . Radar - bug #5949622.
  • - -
  • Changed libtool(1) and strip(1) to used an archive member with - a long name for __.SYMDEF table of contents member so that 64-bit - objects in the archive are on 8-byte offsets.
  • -
- -
Changes since the last release (cctools-706 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a problem with strip(1) to using ld(1) -r to strip - 64-bit object files as it was incorrectly run on non MH_OBJECT - files.
  • - -
  • Fixed the cctools project to build when - /usr/local/include/llvm-c/lto.h is in - /Developer/usr/local/include/llvm-c/lto.h .
  • - -
  • Fixed the cctools project to build the arm assembler for the - Kirkwood and OunceNinety RC_RELEASE values. Radar bug - #6034553.
  • -
- -
Changes since the last release (cctools-705 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a propblem in the assembler getting incorrect values - assembled for floating point constants caused by the ported of - cctools to run on 64-bit hosts.
  • - -
  • Changed strip(1) to use ld(1) -r to strip 64-bit object files. - Radar bug #5829662.
  • - -
  • Fixed a bug in codesign_allocate(1) for 64-bit objects it did - not correctly extend the __LINKEDIT segment. Radar bug - #6000731.
  • - -
  • Fixed a bug in checksyms(1) that was printing an incorrect - error for MH_DYLIB_STUB files missing LC_ID_DYLIB command. Radar - bug #6035486.
  • -
- -
Changes since the last release (cctools-704 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Ported cctools programs to run on 64-bit hosts. Radar bug - #6022298.
  • - -
  • Fixed a problem that gprof(1) would complain executables are - "not of the host architecture". Radar bug #5960471.
  • -
- -
Changes since the last release (cctools-703 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed redo_prebinding(1) to only zero out the UUID and code - signing data when the -u option is used. Radar bug #5984993.
  • -
- -
Changes since the last release (cctools-702 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Added the new assembler directives .inlineasmstart and - .inlineasmend for the compiler used to make non-numeric label - definition an error in an inlineasm region. Radar bug - #5896375.
  • - -
  • Improved the x86_64 assembly time. Radar bug #5902686.
  • - -
  • Change the libtool(1) sources so it can be compiled as a - 64-bit program and create large static libraries. Radar bug - #5780008.
  • -
- -
Changes since the last release (cctools-701 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Changed checksyms(1) to allow the local symbol creadted by - strip(1) for the change to radar bug #5614542 and not to be - counted as a local symbol or debugging symbol and string. Radar - bug #5938033.
  • -
- -
Changes since the last release (cctools-700 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in otool(1) -ov for Objective-C 2 not printing - class meta data. Radar bug #5909952.
  • - -
  • Changed the needs_redo_prebinding() API to use the - allow_missing_architecture parameter so the check only applys to - the slice requested isn't prebound. Radar bug #4701556.
  • - -
  • Changed strip(1) to avoid creating a file with an indirect - symbol table entry with an index of zero into the symbol table - which caused some programs to crash. Radar bug #5614542.
  • - -
  • Fixed a problem with the assembler using a .set directive to a - symbol that is the difference of two symbols that was causing an - incorrect "Complex expression" error. Radar bug #5684077.
  • - -
  • Fixed a bug in the assembler that would incorrectly calculate - address differences. Radar bug #5683920.
  • - -
  • Fixed a bug in the x86_64 assembler that would not assembler a - 32-bit displacement as the difference of two symbols. Radar bug - #5622258.
  • - -
  • Added the -align option to mtoc(1) to set both the PECOFF file - and section alignment.
  • - -
  • Fixed a bug in install_name_tool(1) that was casuing it to - crash when trying to print an error message saying the file needed - to be relinked. Radar bug #5932327.
  • - -
  • Changed the internal implementation of cctools to avoid - loading the LTO library on archive table of contents. Radar bug - #5919409
  • -
- -
Changes since the last release (cctools-699 for -the 5.26 Mac OS X Xcode 3.2 Developer release)
- -
    -
  • Fixed a bug in swap_relocation_info() when running on x86_64 - that did not work correctly. Radar bug #5904383.
  • - -
  • Fixed a problem with 16 character section names not getting - printed correctly with otool(1)'s -ov for x86_43 binaries. Radar - bug #5912294.
  • - -
  • Fixed lipo(1)'s -blank_arch option when used with arvmv6. - Radar bug #5547634.
  • - -
  • Changed redo_prebinding(1)'s -u option to zero out the UUID - and code signing data. Radar bug #5631467.
  • -
- -
Changes since the last release (cctools-698 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed codesign_allocate(1) work with MH_OBJECT file types. - Radar bug #5545465.
  • - -
  • Changed the ld_classic(1) source to not use obsolete dyld - APIs. Radar bug #5620031.
  • - -
  • Fixed a problem in the mtoc(1) tool that did not including the - zero fill part of sections in the SizeOfImage field.
  • - -
  • Updated the ARM disassembler in otool(1). Radar bug - #5874064.
  • - -
  • Backed out the change to redo_prebinding(1) to set the first - two pointers in the __dyld section. Radar bug #5902653.
  • -
- -

Notes Specific to Release 5.25 (Mac OS X Xcode 3.1 Developer -Release)

- -
Changes since the last release (cctools-697 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added support to allow libtool(1), and ranlib(1), to work with - LLVM bitcode files so static archive targets work with LTO. Radar - bug #5712460.
  • -
- -
Changes since the last release (cctools-696 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed the cctools sources to not build the ARM assembler for - the Opal train. Radar bug #5844124.
  • -
- -
Changes since the last release (cctools-695 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed the cctools Makefiles to use -iwithsysroot when - building libmacho and libstuff.
  • - -
  • Changed the cctools <mach/arm/thread_status.h> guard to - match xnu's of _ARM_THREAD_STATUS_H_ .
  • -
- -
Changes since the last release (cctools-694 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed the cctools Makefile to use -iwithsysroot when - building libkld.
  • -
- -
Changes since the last release (cctools-693 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Fixed a bug in strip(1) that caused it to crash on stipping an - MH_PRELOAD filetype. Radar bug #5834516.
  • - -
  • Changed the cctools Makefile to build libkld for releases: - Vail, SugarBowl, BigBear and Homewood.
  • -
- -
Changes since the last release (cctools-692 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Updated otool(1) to print Objective-C 2.0 information for arm - binaries. Radar bug #5739542.
  • - -
  • Changed otool(1) to print ABSOLUTE for indirect symbol table - entries in an i386 binary marked with only INDIRECT_SYMBOL_ABS. - Radar bug #5829053.
  • - -
  • Fixed a spurious otool -I error. Radar bug #5728302.
  • -
- -
Changes since the last release (cctools-691 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Updated strip(1) to support binaries that use lazy dylibs. - Radar bug #5828589.
  • -
- -
Changes since the last release (cctools-690 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added a definition for a new load command for iPhone app - encryption. Radar bug #5811987.
  • - -
  • Updated cctools to not choke on iPhone binary with new - "encrypted binary" load command. Radar bug #5811994.
  • -
- -
Changes since the last release (cctools-689 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed the cctools sources to not build the efitools for - iPhone build as a work around to avioid a compiler problem. Radar - bug #5826370.
  • -
- -
Changes since the last release (cctools-688 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Fixed a bug in the arm assembler that incorrectly produced - "selected processor does not support" error messages when - -force_cpusubtype_AL was used. Radar bug #5817558
  • - -
  • Changed the assembler to allow (L3-L10)/2 expressions in .byte - expressions. Radar bug #5819903.
  • -
- -
Changes since the last release (cctools-687 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added cctools support for lazy dylib loading. Radar bug - #5760930.
  • - -
  • Fixed bug in mtoc(1) to correctly pick the next available - address in a Mach-O file for the .reloc PECOFF section when the - Mach-O file has a __LINKEDIT segment.
  • -
- -
Changes since the last release (cctools-686 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added checking for undefined symbols (64-bit) in mtoc(1).
  • - -
  • Added cctools support for lazy dylib loading. Radar bug - #5760930.
  • -
- -
Changes since the last release (cctools-685 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added the "-section_alignment <hex_value>" option to - mtoc(1).
  • - -
  • In mtoc(1) added a check to make sure the headers are not - mapped on top of its sections in the PECOFF output.
  • - -
  • Added alternate names for the subsystem arguments in - mtoc(1).
  • - -
  • Added checking for undefined symbols (32-bit only so far) in - mtoc(1).
  • - -
  • Changed project to not build unneeded support libraries for - libkld for SnowLeopard. Radar bug #5780592.
  • -
- -
Changes since the last release (cctools-684 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Updated mtoc(1) to deal with MH_EXECUTE file types and MH_PIE - flag.
  • - -
  • Again more changes for arm support. Radar bug #5490815
  • -
- -
Changes since the last release (cctools-683 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Three more changes for arm support. Radar bug #5490815
  • -
- -
Changes since the last release (cctools-682 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Two more changes for arm support. Radar bug #5490815
  • -
- -
Changes since the last release (cctools-681 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Still more changes for arm support. Radar bug #5490815
  • - -
  • Updated cctools support for Mac OS X deployment target support - and changed the highest know shipping version to 10.6 .
  • - -
  • Picked up a change to the otool Makefile to compile - print_objc.o with -fobjc-abi-version=1 .
  • -
- -
Changes since the last release (cctools-680 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added the -A option to codesign_allocate(1). Rdar bug - #5681427.
  • - -
  • Changed codesign_allocate(1) to be a member of - com.apple.tool.codesign_allocate . Rdar bug #5681503.
  • - -
  • Added the new mtoc(1) program. Radar bug #5536661,
  • - -
  • Fixed the SSE4.1 pextrq and pinsrq instructions which did not - have a REX.W byte.
  • - -
  • Fixed the SSE4.1 insertps instruction where it had the second - parameter as a general register not a xmm register. Radar bug - #5650346.
  • - -
  • Removed the sources changes to #ifndef __OPEN_SOURCE__ to - isolate arm sections of cctools sources that was put in for Radar - bug #5326431.
  • - -
  • More changes for arm support. Radar bug #5490815
  • -
- -
Changes since the last release (cctools-679.3 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changes for arm support. Radar bug #5490815.
  • -
- -
Changes since the last release (cctools-679.2 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed the cctools project to no longer build libkld for - SnowLeopard. Radar bug #5698612.
  • -
- -
Changes since the last release (cctools-679.1 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Fixed a problem with symlist creation failing for some ppc - projects. Radar bug #5630991.
  • -
- -
Changes since the last release (cctools-679 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Backed out the changed to strip(1) so that it will strip DWARF - debugging symbols by calling ld(1) to do the stripping for Radar - bug #5343015. Because of the ld(1) bug 5675774. Radar bug - #5660086.
  • - -
  • Fixed a problem with symlist creation failing for some ppc - projects. Radar bug #5681670.
  • -
- -
Changes since the last release (cctools-678 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Fixed a problem in the strip(1) program which caused it to - crash when run on a file without a dynamic symbol table that was - to be fully stripped. The change for Radar bug #5008421, was - missing a check for a null dynamic symbol table pointer. Radar bug - #5588769.
  • -
- -
Changes since the last release (cctools-677 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Fixed a problem in the x86_64 assembler caused by the change - for Radar bug #5122861, which was incorrectly assembling - rip-relative references. Radar bug #5584168.
  • -
- -
Changes since the last release (cctools-676 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed the cctools Makefiles to not use -Wno-long-double and - -no-cpp-precomp so it will build with gcc-4.2. Radar bug - #5563553.
  • - -
  • Fixed a problem in the x86_64 assembler which incorrectly - added in offsets into pcrel instructions. Radar bug #5326431.
  • -
- -
Changes since the last release (cctools-675 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Added the Logical and and or operators in the assembler. Radar - bug #4110102.
  • - -
  • Fixed ranlib(1) to not overwrite files without write - permission. Radar bug #4242330.
  • - -
  • Added the .balign assembler directive. Radar bug - #4352052.
  • - -
  • Changed the assembler to accept .endmacro as .endm . Radar bug - #4361968.
  • - -
  • Changed the assembler to accept carrage returns in the input - assembly file. Radar bug #4372927.
  • - -
  • Fixed the assembler so that the value of symbol set with - initially unresolved subtract expression can be changed. Radar bug - #4433066.
  • - -
  • Fixed a bug in otool(1) that was giving a warning about a - section offset being past end of file for 0-length sections at end - of file. Radar bug #4455994.
  • - -
  • Changed the assembler directive .machine to allow the argument - "all". Radar bug #4512478.
  • - -
  • Changed the assembler to make a section difference relocable - subtraction expression using assembler temporay labels where one - is at the end of the section into an assembly time constant and - there are no non-assembler temporay labels between them. Radar bug - #4515996.
  • - -
  • Fixed a bug in the asembler when it was generating SLINE stabs - with -g so that the address is at the beginning of the - instruction. Radar bug #4521858.
  • - -
  • Fixed the x86_64 assembler to correctly assemble absolute - 64bit addressing. Radar bug #4534958.
  • - -
  • Fixed some typos in the libtool(1) man page. Radar bug - #4574762.
  • - -
  • Added pushfd and popfd as the same as pushf and popf for the - i386 assembler. Radar bug #4676279.
  • - -
  • Fixed the -extract_family option in lipo(1) so it produced - correct output files. Radar bug #4695968.
  • - -
  • Changed the cctools source to use the prototype of - _NSetMachExecuteHeader from crt_externs.h . Radar bug - #4696889.
  • - -
  • Cleaned up the libtool(1) BUGS section of the man page to - reflect the current behavior. Radar bug #4708229.
  • - -
  • Fixed a bug in otool(1) that did not show all bytes of i386 - unknown opcodes. Radar bug #4760658.
  • - -
  • Added the PowerPC simplified mnemonic "mtvrsave". Radar bug - #4955676.
  • - -
  • Fixed a typo in the nmedit(1) man page. Radar bug - #5068920.
  • - -
  • Fixed a bug in the x86_64 assembly and dissembly of a - rip-relative call. Radar bug #5122861.
  • - -
  • Fixed a bug in otool(1) that did not free memory between - corefiles causing it to run out of memory and crash. Radar bug - #5156499.
  • - -
  • Fixed a typo on the libtool(1) man page. Radar bug - #5160229.
  • - -
  • Fixed a bug in otool(1) that was preventing it from printing - labels in x86_64 disassembly. Radar bug #5186450.
  • - -
  • Fixed some typos in the redo_prebinding error messages. Radar - bug #5188349.
  • - -
  • Changed the assembler to print Apple Inc. not Apple Computer, - Inc. Radar bug #5197757
  • - -
  • Fixed a problem with nm(1) that would print architecture is - missing in some cases. Radar bug #5205751.
  • - -
  • Added printiing of PECOFF base relocation entries symbolically - in otool(1). Radar bug #5218665.
  • - -
  • Added support in the assembler for local labels beyond 9. - Radar bug #5256532.
  • - -
  • Changed the x86 assembler to allow the implicit xmm0 first - register argument to be coded with blendvpd, blendvps and - pblendvb. Radar bug #5268692.
  • -
- -
Changes since the last release (cctools-674 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed <mach-o/nlist.h> so that it has it is wraped - with extern "C" for C++ compiles. Radar bug #5419852.
  • - -
  • Changed strip(1) so that it will strip DWARF debugging symbols - by calling ld(1) to do the stripping. Radar bug #5343015.
  • - -
  • Fixed strip(1) to correctly do a full symbol strip on a - relocatable .o file if it would only have LOCAL indirect symbol - table and local relocation enties. Radar bug #5008421.
  • - -
  • Fixed otool(1) to not crash if given a malformed object file - that had a segment command with a very large number of sections. - Radar bug #5405675.
  • -
- -
Changes since the last release (cctools-673 for -the 5.25 Mac OS X Xcode 3.1 Developer release)
- -
    -
  • Changed redo_prebinding to not put LC_PREBOUND_DYLIB commands - in prebound images if MACOSX_DEPLOYMENT_TARGET is 10.4 or later. - Radar bug #5350524.
  • -
- -
Changes since the last release (cctools-672 for -the 5.24 Mac OS X Xcode 3.0 Developer release)
- -
    -
  • Changed the sources to #ifndef __OPEN_SOURCE__ to isolate arm - sections of cctools sources. Radar bug #5326431.
  • -
- -

Notes Specific to Release 5.24 (Mac OS X Xcode 3.0 Developer -Release)

- -
Changes since the last release (cctools-671 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed an issue with the change below so that a common symbol - continues to have an external relocation entry. Radar bug - #5259877.
  • -
- -
Changes since the last release (cctools-670 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the x86_64 assembler to use local relocation entries - in a debug section for a defined symbol. Radar bug #5259877.
  • -
- -
Changes since the last release (cctools-669 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the arm assembler to provide a diagnostic for swp and - swpb instructions if <Rn> is the same as <Rm> or - <Rd>. Radar bug #5281523.
  • -
- -
Changes since the last release (cctools-668 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the assembler back to only warn about duplicate macro - definitions.
  • - -
  • Fixed problems in the cctools source when compiled for 64-bit - targets that would cause an undefined symbol for SWAP_LONG.
  • -
- -
Changes since the last release (cctools-667.2 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed codesign_allocate(1) to never update the LC_ID_DYLIB - timestamps. Radar bug #5374218.
  • -
- -
Changes since the last release (cctools-667.1 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a problem codesign_allocate(1) that was incorrectly - rounding up the __LINKEDIT segement for 64-bit Mach-O files to 8K - not 4K. Radar bug #5363873.
  • -
- -
Changes since the last release (cctools-667 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changes to support the arm architecture were merged in. Radar - bug #5241042.
  • -
- -
Changes since the last release (cctools-666 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a problme with the change below to strip(1)'s -c option - to always remove the LC_CODE_SIGNATURE load command and signature - data from the output. Radar bug #5207629.
  • -
- -
Changes since the last release (cctools-665 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed strip(1)'s -c option to always remove the - LC_CODE_SIGNATURE load command and signature data from the output. - Radar bug #5207629.
  • -
- -
Changes since the last release (cctools-664 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Added support for the Intel SSE4.1 and SSE4.2 instructions. - Radar bug #4943015.
  • -
- -
Changes since the last release (cctools-663 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug that would cause an internal error when ranlib(1) - was used on two or more libraries. Radar bug #5169741.
  • -
- -
Changes since the last release (cctools-662 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed ld_classic(1)'s -macosx_version_min argument and - MACOSX_DEPLOYMENT_TARGET to support minor version numbers. Radar - bug #5132019.
  • - -
  • Changed the as(1) man page's reference to the the assembler - manual. Radar bug #5143784.
  • - -
  • Changed libtool(1) to not make the computer unresponsive when - building large static libraries. Radar bug #5052598.
  • -
- -
Changes since the last release (cctools-661 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the x86_64 assembler(1) to allow the .mod_init_func - and .mod_term_funcs directives when -static is used. Radar bug - #5127668.
  • - -
  • Changed kld(3) to keep the LC_UUID (if any) from the last - object loaded in the linked output. Radar bug #5137807.
  • -
- -
Changes since the last release (cctools-660 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed strip(1) to not change LC_ID_DYLIB timestamp in - unprebound dylibs. Radar bug #5093170.
  • -
- -
Changes since the last release (cctools-659 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed the header file <mach-o/swap.h> to include an - extern "C". Radar bug #5075908.
  • -
- -
Changes since the last release (cctools-658 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed otool(1) to handle the change of the ObjcC 2.0 section - names for the -ov option. Radar bug #5066149.
  • - -
  • Fixed otool(1) for disassembly of the MOV instruction with - 64-bit offsets for "accumulator from memory" and "accumulator to - memory" and also use the mnemonic "movabsl". Radar bug - #4693534
  • -
- -
Changes since the last release (cctools-657 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in nmedit(1) and strip(1) where when run on a - 64-bit relocatable object files where the string table was on an 8 - byte offset in the file with padding before it, it would produce a - corrupt output file. Radar bug #5054452.
  • -
- -
Changes since the last release (cctools-656 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in nm(1) where when run with a -arch flags on a - fat file archive of the non-native bytesex it crashes. Radar bug - #5055223.
  • -
- -
Changes since the last release (cctools-655 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in codesign_allocate(1) such that when run on a - 64-bit Mach-O file when the string table offset is not on an 8 - byte boundary the resulting output file is malformed such that the - symbol names appear incorrect. Radar bug #5047066
  • - -
  • Added MH_PIE to <mach-o/loader.h>. Radar bug - #5041291.
  • - -
  • Fixed a bug in nm(1) where when run with multiple -arch flags - on a fat file does not print symbol names. Radar bug - #5047924.
  • -
- -
Changes since the last release (cctools-654 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in strip(1) so that when the -no_uuid option is - used on a binary with a LC_SEGMENT_SPLIT_INFO load command it - does not produce a corrupt binary. Radar bug #5033393.
  • -
- -
Changes since the last release (cctools-653 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed libtool(1) to work with Xcode coexistence and correctly - open files for -lx options based on the -syslibroot and -L flags. - Radar bug #5029099.
  • -
- -
Changes since the last release (cctools-652 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Updated otool(1) to print the Objective-C garbage collection - status. Radar bug #4983418.
  • - -
  • Added support for the LC_REEXPORT_DYLIB load command. Radar - bug #4986624.
  • - -
  • Fixed gprof(1) to work with dyld shared cache. Radar bug - #4960162.
  • - -
  • Backed out the change for Radar bug #4930693 in kld(1) when it - called the address_func it is passed the allocated_size of memory - including the symbol table. Radar bug #4994738
  • -
- -
Changes since the last release (cctools-651 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Added project version information to libmacho. Radar bug - #4980378.
  • -
- -
Changes since the last release (cctools-650 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in ld_classic(1) which was causing a crash when - linking against a dyanmic library built by the unified linker that - has an LC_SEGMENT_SPLIT_INFO load command. Radar bug - #4953247.
  • - -
  • Fixed a bug in nm(1) that caused it to show the symbols - swapped when multiple -arch flags were specified for a fat file. - Radar bug #4970647.
  • -
- -
Changes since the last release (cctools-649 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed kld(1) so when it calls the address_func it is passed - the allocated_size of memory including the symbol table. Radar bug - #4930693.
  • -
- -
Changes since the last release (cctools-648 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Added an open source cctools.plist. Radar bug #4898129.
  • - -
  • Fixed a bug in ld_classic(1) which was getting an internal - error when the -s option (strip all symbols) was used and there - was a symbol that was both a private external and marked - referenced dynamically. Radar bug #4885434.
  • - -
  • Updated otool(1)'s -ov option to print out the objc 2.0 - metadata in 64-bit objects. Radar bug #4560930.
  • - -
  • Added S_DTRACE_DOF to <mach-o/loader.h>. Radar bug - #4918330.
  • - -
  • Added checks to ld_classic(1) so that you can't create a bad - .o file with -r when the r_address field of a scattered relocation - over flows. Radar bug #4921122.
  • -
- -
Changes since the last release (cctools-647 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Enhanced otool(1)'s -s option when printing - S_MOD_{INIT,TERM}_FUNC_POINTERS section types to print them as - pointers with the -v option and print symbol names of the pointers - with the -V option. Radar bug #4880624.
  • - -
  • Ported gprof(1) to work with 64-bit Mach-O files. Radar bug - #4601274.
  • - -
  • Changed the cctools project to now install these private - release notes in - /Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools - for Xcode coexistence.
  • - -
  • Fixed bugs in otool(1), lipo(1), nm(1), and strings(1) that - caused crashes with malformed fat file when the number of - architectures in the fat header is a large number.  Radar bug - #4860769.
  • -
- -
Changes since the last release (cctools-646 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed problems with codesign_allocate(1) not correctly - matching architectures with new capability bits set in the - cpusubtype. Radar bug #4849153.
  • - -
  • Changed the cctools project to stop installing - the deprecated dyld_debug(3) man page. Radar bug - #4734305.
  • -
- -
Changes since the last release (cctools-645 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the assembler driver, /usr/bin/as, to execute the - target specific assemblers relative to where the assembler driver - is installed. Radar bug #4841943.
  • - -
  • Fixed otool(1)'s Intel disassembler to correctly disassemble - call <constant>. Radar bug #4523901.
  • - -
  • Fixed otool(1)'s Intel disassembler to correctly use the rep - not repz prefix with the instructions ins, outs, movs, lods, and - stos. Radar bug #4467453.
  • - -
  • Fixed otool(1)'s 64-bit Intel disassembler to correctly - disassemble the MOV accumulator to memory operand as a 64-bit - immediate. Radar bug #4693534.
  • -
- -
Changes since the last release (cctools-644 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed strip(1) and otool(1) to support LC_RPATH - commands. Radar bug #4822880.
  • - -
  • Changed ld_classic(1) to support libtool(1) options. Radar bug - #4758790.
  • - -
  • Changed the header file <mach-o/getsect.h> to be - protected by extern "C" for use in C++ apps. Radar bug - #4814441.
  • -
- -
Changes since the last release (cctools-643 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed otool(1) -c work with 64-bit Mach-O files.  Radar - bug #4458775
  • - -
  • Added support for the CPU_SUBTYPE_VEO_3 and CPU_SUBTYPE_VEO_4 - cpusubtypes. Radar bug #4799550.
  • - -
  • Fixed a problem with the libredo_prebinding API's leaking file - descriptors and mmap(2) mappings. Radar bug #4800981.
  • - -
  • Fixed a problem with checksyms(l) failing to work with empty - files. Radar bug #4795458.
  • -
- -
Changes since the last release (cctools-642 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed strip(1) -X on x86_64 objects to silently do nothing. - Radar bug #4800628.
  • - -
  • Ported cmpdylib(1) to work with 64-bit Mach-O files. Radar bug - #4040804.
  • -
- -
Changes since the last release (cctools-641 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed needs_redo_prebinding(3) when passed a Mach-O file - that only has 64-bit architectures to return NOT_PREBOUND. Radar - bug #4788385.
  • - -
  • Fixed otool(1) so it understands the x86 branch - prediction. Radar bug #4474395
  • - -
  • Fixed the 64-bit assemblers not allowing a value larger - than 2GB with a .lcomm directive.  Radar bug - #4098028.
  • -
- -
Changes since the last release (cctools-640.1 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the x86_64 assembler to always save assembler - temporary symbols in cstring literal sections and use external - relocation entries when they are referenced. Radar bug - #4765733.
  • -
- -
Changes since the last release (cctools-640 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a problem with NXGetArchInfoFromCpuType(3) and using - CPU_SUBTYPE_MULTIPLE. Radar bug #4787007.
  • -
- -
Changes since the last release (cctools-639 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Updated the tools to deal with cpusubtypes that have the new - capability bits set. Radar bug #4754462.
  • -
- -
Changes since the last release (cctools-638 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed problems with the updated strip(1) and nmedit(1) with - trying to correctly handle 64-bit Mach-O files with an odd number - of indirect table entires (with or without padding). Radar bug - #4762627.
  • -
- -
Changes since the last release (cctools-637 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Updated strip(1) and codesign_allocate(1) to correctly handle - 64-bit Mach-O files with an odd number of indirect table entires - (with or without padding). Radar bug #4747408.
  • - -
  • Fixed the i386 assembler to not crash or get internal erors - when .org is used. Radar bug #4750873.
  • - -
  • Changed the x86_64 assembler to always emit a relocation entry - for @GOTPCREL reference. Radar bug #4742404,
  • -
- -
Changes since the last release (cctools-636 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed strip(1) to correctly handle keeping symbols marked as - weak defintions by default. Radar bug #4732639.
  • - -
  • Fixed a bug in strip(1) that was incorrectly causing an error - when creating a stub library and not all the global symbols were - kept. Radar bug #4742051.
  • - -
  • Fixed a bug in libtool(1) that caused it to crash when an - input file had a bad symbol table entry for an N_SECT symbol which - had a bad section number. Radar bug #4739572.
  • - -
  • Updated strip(1), codesign_allocate(1) and redo_prebinding(3) - to correctly handle 64-bit Mach-O files with an odd number of - indirect table entires. Radar bug #4737991.
  • -
- -
Changes since the last release (cctools-635 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a problem with ld_classing iincorrectly generated a - warning, ntroduced with the change to 4695477. Radar bug - #4733384.
  • -
- -
Changes since the last release (cctools-634 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a problem introduced with the change to 4141844 with the - Intel assembler not expanding macros correctly. Radar bug - #4729012.
  • - -
  • Added the -verify_arch flag to lipo(1). Radar bug - #4496521.
  • - -
  • Changed strings(1) to with files that have parenthesis in - their names. Radar bug #4172811.
  • -
- -
Changes since the last release (cctools-633 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Updated the tools to handle the LC_SEGMENT_SPLIT_INFO load - command and its data. Radar bug #4695477.
  • -
- -
Changes since the last release (cctools-632 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Ported the code in libredo_prebinding and libsyminfo to work - for 64-bit hosts and now build them for all architectures. Radar - bug #4407440.
  • -
- -
Changes since the last release (cctools-631 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug that caused the assembler with -static to produce - incorrectly assembed files introduced with Radar bug #4096964. - Radar bug #4700558.
  • -
- -
Changes since the last release (cctools-630 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug that caused the assembler to crash introduced with - Radar bug #4096964. Radar bug #4685058.
  • - -
  • Fixed a bug that casued libkld to have undefined symbols - introduced with Radar bug #4599790. Radar bug #4685060.
  • - -
  • Changed libtool(1) to not invoke ld64(1). Radar bug - #4682470.
  • -
- -
Changes since the last release (cctools-629 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug that caused the assembler to crash introduced with - Radar bug #4096964. Radar bug #4666308.
  • - -
  • Picked up the changes from cctools-625.1 in Radar bug #4664658 - that were missed. Radar bug #4678307.
  • - -
  • Fixed a problem with the assembler not returning a failure - status for bogus arguments introduced with changes in - cctools-590.31.1 . Radar bug #4674902.
  • -
- -
Changes since the last release (cctools-628 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in the codesign_allocate(1) tool that caused it to - build programs that would not execute. Radar bug #4666308.
  • - -
  • Changed the x86 assemblers to use optimal NOP's for alignment - padding in sections containing instructions. Radar bug - #4096964.
  • - -
  • Fixed a bug in ld_classic(1) that was misaligning coalesced - section contents. Radar bug #4599790.
  • - -
  • Updated the ld_classic(1) man page with the description that - CPU subtypes get combined. Radar bug #3820769.
  • - -
  • Added an example to the strip(1) man page on how to create a - stub library. Radar bug #4399175.
  • - -
  • Fixed a typo on the ld_classic(1) man page. Radar bug - #4099445.
  • - -
  • Added the description of the -arch option to the strip(1) man - page. Radar bug #4470756.
  • - -
  • Added the description of the -arch option to the strings(1) - man page. Radar bug #4416906.
  • - -
  • Fixed a warning when building the x86_64 assembler. Radar bug - #4504314.
  • - -
  • Clarified the error message for unknown architecture in the - assembler driver. Radar bug #4666302.
  • - -
  • Updated otool(1) to print MH_DSYM symbolically. Radar bug - #4511760.
  • - -
  • Changed strip(1) -R on x86_64 objects to silently do nothing. - Radar bug #4568747.
  • -
- -
Changes since the last release (cctools-627 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the i386 assembler to allow a prefix with a space - before the instruction. Radar bug #4141844.
  • - -
  • Changed the strip(1) tool to support blank stubs. Radar bug - #4511628.
  • -
- -
Changes since the last release (cctools-626 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Ported otool(1) to work with 64-bit Mach-O files and removed - otool64(1). Radar bug #3903136 and Radar bug #4593267.
  • -
- -
Changes since the last release (cctools-625 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Added the codesign_allocate(1) tool that allocates space in a - Mach-O file for code signing data. Updated the other tools to - allow them to work on Mach-O files with code signing data. Radar - bug #4588023.
  • - -
  • Changed the command otool(1) to be build dynamically. Radar - bug #4624240 and Radar bug #4633942.
  • -
- -
Changes since the last release (cctools-624 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Track symbols by definition order, not value. Radar bug - #4619741.
  • -
- -
Changes since the last release (cctools-623 for -the 5.24 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Added new constants and strcutures to <mach-o/loader.h> - to support Mac OS X 10.5 features. Radar bug #4614861.
  • -
- -
Changes since the last release (cctools-622.1 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the cctools project to install the static link editor - as /usr/bin/ld_classic and changed the man page to ld_classic(1). - Radar bug #4606627.
  • -
- -

Notes Specific to Release 5.23 (Mac OS X Xcode 2.4 Developer -Release)

- -
Changes since the last release (cctools-622 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Add S_16BYTE_LITERALS as a fixed-size data section. Radar bug - #4610297.
  • -
- -
Changes since the last release (cctools-621 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • In x86-64 code, synthesize a symbol for each fixup, which - allows the assembler to determine later whether to require a - relocation entry for that fixup. Radar bug #4577120.
  • -
- -
Changes since the last release (cctools-620 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed symbol_list_sort_by_value to perform a stable sort. - Radar bug #4598955.
  • -
- -
Changes since the last release (cctools-619 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Added the routines to byteswap the other x86-64 thread states. - Radar bug #4491230.
  • - -
  • Fixed a bug in otool64(1) that truncates high address. Radar - bug #4591066.
  • - -
  • Fixed a bug in the x86_64 assembler which would cause it to - generate invalid relocation entries when there were forward - references to local symbols. Radar bug #4501115.
  • -
- -
Changes since the last release (cctools-618 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed otool64(1) correctly disassemble call instructions for - the x86_64 architecture so the symbols has the correct (or no - offset). Radar bug #4483416.
  • - -
  • Fixed a bug in the x86_64 assembler that would cause it to - crash when assembling a call instruction to an absolute address - (with no symbolic symbol name). Radar bug #4523898.
  • - -
  • Fixed a bug in ld(1) that incorrectly ignored the argument - after the -allow_stack_execute option. Radar bug #4571206.
  • - -
  • Fixed a problem with ld(1) getting an internal error when - linking objects with DWARF information for weak symbols and - linking those to shared libraries with non-weak symbols. Radar bug - #4570143.
  • - -
  • Fixed a bug in the x86_64 assembler when making a call to an - assembler tempoary label that generated an incorrect relocation - entry. Radar bug #4581768.
  • -
- -
Changes since the last release (cctools-617 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed checksyms(1) to not report unprebound executables when - MACOSX_DEPLOYMENT_TARGET >= 10.4. Radar bug #4110782.
  • - -
  • Added support for 16 byte literal constant sections. Radar bug - #4555162.
  • - -
  • Changed the x86 assembler to not create a spurious undefined - symbol _GLOBAL_OFFSET_TABLE_ when the source makes no reference to - the symbol. Radar bug #4534951.
  • -
- -
Changes since the last release (cctools-616 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed the disassembly of i386 instructions in otool(1) like - sete so they don't get dissassembled with a suffix. Radar bug - #3873844.
  • - -
  • Fixed the disassembly of x86_64 move instructions in - otool64(1) that did not used numbered registers. Radar bug - #4555277.
  • - -
  • Fixed the disassembly of i386 instructions in otool(1) like - pushq which was disassembled as pushl. Radar bug #4563547.
  • - -
  • Changed ld(1) to ignore ranlib "out of date" errors. Radar bug - #4462449.
  • - -
  • Changed lipo(1) to not set the the timestamp of universal file - containing static libraries o the earliest of the timestamps of - the thin libraries. Radar bug #4492604.
  • -
- -
Changes since the last release (cctools-615 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • The x86-64 assembler was fixed so it does not corrupt line - information for x86_64. Radar bug #4498034.
  • - -
  • The tool pagestuff(1) has now been ported to work on 64-bit - binaries. Radar bug #4375624.
  • - -
  • The tool nmedit(1) has been updated to work with 64-bit - binaries that have refereces to global coalesced symbols that are - to be maded private symbols. Radar bug #4414533.
  • - -
  • The missing 64-bit swap routines have been added to libmacho - which is part of libSystem. Radar bug #4358209.
  • - -
  • The tool lipo(1) was changed to hard code the segment - alignment for ppc, ppc64, i386 and x86_64 architecutes to 4096 so - that when creating universal files it always uses that segment - alignment. Radar bug #4178258.
  • -
- -
Changes since the last release (cctools-614 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed the assembler's .comm directive so it would correctly - take values greater than 32-bits.  Radar bug #4177397.
  • - -
  • The x86-64 assembler now implements the GOT_LOAD relocation - entry type. Radar bug #4486815.
  • -
- -
Changes since the last release (cctools-613 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Made the needed changes to the source code and project to - build with UNIX conformance header.  Radar bug #4508798.
  • -
- -
Changes since the last release (cctools-612 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in the x86_64 assembler in that was not generating - a relocation entries to non-local symbols that were PC-relative - when it should.  Radar bug #4545597.
  • -
- -
Changes since the last release (cctools-611 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed strip(1) so that using the -x option on an x86_64 - object file does nothing.  Radar bug #4541291.
  • -
- -
Changes since the last release (cctools-610 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Fixed a bug in the x86_64 assembler in the way it generates - relocation entries to "fixed-size-data" sections.  Radar bug - #4536738.
  • -
- -
Changes since the last release (cctools-609 for -the 5.23 Mac OS X Xcode 2.4 Developer release)
- -
    -
  • Changed the sources so they can build on Tiger. Radar bug - #4535019.
  • - -
  • Added support for the Intel Vanderpool instructions. Picked up - from cctools-590.43. Radar bug #4534436.
  • - -
  • Fixed a bug in ld(1) that caused it to crash when using the -Y - flag to trace undefined symbols. Picked up from cctools-590.42. - Radar bug #4521358.
  • - -
  • Fixed a bug in the redo_prebinding code that was causing a - memory leak.. Picked up from cctools-590.23.6. Radar bug - #4503576.
  • - -
  • Fixed a bug in the redo_prebinding code that unnecessarily - calling chmod(2) and chown(2) when no output_file is specified. - Picked up from cctools-590.23.6. Radar bug #4503724.
  • -
- -
Changes since the last release (cctools-590.41.4 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • The sources for cctools-590.41.4 were moved from the - Mustard_bringup_branch to the trunk's top of tree. It is the same - except for the version number changing to cctools-609.
  • -
- -

Notes Specific to Release 5.22 (Mac OS X Xcode 2.3.1 Developer -Release)

- -
Changes since the last release (cctools-590.41.3 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Change the previous fix to not reference the reserved1 field - when fixing up indirect symbols in the non-lazy symbol pointer - section. Radar bug #4522347.
  • -
- -
Changes since the last release (cctools-590.41.2 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Fixed nmedit(1) so that it sets the value of symbol pointers - when it changes the indirect symbol table entries for them into - INDIRECT_SYMBOL_LOCAL. The change was in check_indirect_symtab() - in symbols.c and a bit of code was added to take the n_value from - the symbol table entry swap it if needed and write into the - section contents for that symbol pointer. The additional - parameters contents and host_byte_sex were added to the routine - and pass from the two places it was called. Radar bug - #4514531.
  • -
- -
Changes since the last release (cctools-590.41.1 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • When stripping coalesced symbols from 64-bit files, only save - symbols which are used as weak definitions. Radar bug - #4487972.
  • -
- -
Changes since the last release (cctools-590.38.3 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Ignore multiple -syslibroot flags if they specify the same - argument. Radar bug #4354876.
  • -
- -
Changes since the last release (cctools-590.38.2 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Force GOT and GOT_LOAD relocations to be PC-relative, as they - always should be, so we don't eliminate them later in the - assembler. Radar bug #4500790.
  • - -
  • Don't consider X86_64_RELOC_SUBTRACTOR relocations to be - paired. Radar bug #4504190.
  • - -
  • Fix a typo for 64-bit code in an error case in strip(1) which - would cause it to crash. Radar bug #4502835.
  • - -
  • Add a new -arch_blank option to lipo(1). Radar bug - #4473483.
  • - -
  • Support 64-bit constants in .code64 blocks in x86-64 assembly. - Radar bug #4439905.
  • - -
  • Ignore stabs when fixing up x86-64 symbols in the assembler. - Radar bug #4502759.
  • - -
  • Accept 'LL' and 'ULL' as suffixes for constants in assembly - code. Radar bug #4496022.
  • - -
  • Get RIP-relative relocations correct for local symbols in - non-fixed-size-data sections. Radar bug #4497536.
  • -
- -
Changes since the last release (cctools-590.38.1 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Don't convert external relocation entries to internal ones - when looking at x86-64 relocation entries in nmedit(1). Radar bug - #4497429.
  • -
- -
Changes since the last release (cctools-590.37.3 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Merged in cctools-590.38.
  • -
- -
Changes since the last release (cctools-590.37.2 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Add back support for the E9 form of the jmp instruction for - x86-64 disassembly. Radar bug #4489937.
  • - -
  • Use a 'q' suffix rather than an 'l' suffix when disassembling - call and jmp instructions for x86-64. Radar bug #4483621.
  • - -
  • Get offsets right for RIP-relative non-external relocations in - x86-64 code. Radar bug #4486817.
  • - -
  • When swap_object_headers sees a thread state flavor that it - doesn't know about, print the flavor number itself in the error - message in addition to the other information that was already - being printed. Radar bug #4491140.
  • - -
  • Correctly swap x86_THREAD_STATE64 states when running on - PowerPC. Also, update to the current definition of the x86-64 - thread state. Radar bug #4491228.
  • - -
  • Handle symbols with NULL names when fixing up x86-64 symbols. - Radar bug #4475602.
  • - -
  • Fix a regression in the assembler which prevented it from - reading 8-bit characters. Radar bug #4488556.
  • - -
  • Improve the comments in the x86-64 reloc.h. Radar bug - #4488180.
  • -
- -
Changes since the last release (cctools-590.37.1 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Don't go down the scattered relocation code path in the - assembler for x86-64 relocation entries. Radar bug #4486807.
  • - -
  • Don't allow illegal section types for x86-64 assembly. Radar - bug #4475470.
  • - -
  • Support 32-bit difference GOTPCREL syntax in x86-64 assembly. - Radar bug #4485082.
  • - -
  • Generate the right relocation entry type for .long GOTPCREL - expressions. Radar bug #4486764.
  • - -
  • Fix two typos in the ld(1) man page. Radar bug #4099445.
  • - -
  • Add an extern "C" block to redo_prebinding.h. Radar bug - #4319807.
  • - -
  • Cleaned up some binutils merge issues in as/i386.c. Radar bug - #4422698.
  • -
- -
Changes since the last release (cctools-590.36.3 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Don't allow illegal section types in x86-64 assembly. Radar - bug #4475470.
  • -
- -
Changes since the last release (cctools-590.36.2 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Add support for the new relocation entry types for x86-64. - Radar bug #4475165.
  • - -
  • Don't include symbol offsets in fixups for external symbols - for x86-64 and don't fix up x86_64 symbols in sections that always - contain fixed-size data. Also, rename i386_fixup_symbol to - x86_64_fixup_symbol because it's only used for x86_64 code. Radar - bug #4475152.
  • - -
  • Print %cs, %fs, and %gs as 64-bit values in x86_64 thread - states in otool. Radar bug #4468148.
  • - -
  • Disassemble pushq instructions with extended x86_64 registers - correctly. Radar bug #4476218.
  • - -
  • Swap the LC_ROUTINES_64 load command correctly. Radar bug - #4451600.
  • -
- -
Changes since the last release (cctools-590.36.1 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Add #defines to ensure that libmacho builds on systems with - POSIX conformant headers. Radar bug #4471574.
  • -
- -
Changes since the last release (cctools-590.34.1 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Fix suffixes in x86-64 disassembly for push, pop, and moves to - and from control and debug registers, as well as disassembly of - short jumps. Radar bug #4467441.
  • -
- -
Changes since the last release (cctools-590.31.4 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Improve the message that appears when we try to assemble - 32-bit signed static relocations in x86-64 code. Radar bug - #4434039.
  • - -
  • Revert the 4-byte alignment change in lipo from the previous - release. Radar bug #4428605.
  • - -
  • Disassemble x86-64 instructions with SIB bytes correctly. - Radar bug #4436608.
  • - -
  • Disassemble x86-64-specific instructions properly and don't - recognize i386-specific instructions when disassembling x86-64 - code. Radar bug #4437391.
  • - -
  • Disassemble the movslq instruction correctly for x86-64. Radar - bug #4437197.
  • - -
  • Fixed addends for relocation entries for RIP-relative x86-64 - instructions. Radar bug #4440315.
  • - -
  • Eliminated extraneous suffixes from disassembly of some i386 - and x86-64 instructions. Radar bug #4441526.
  • - -
  • Fixed x86-64 disassembly for moves to and from control and - debug registers. Radar bug #4439907.
  • -
- -
Changes since the last release (cctools-590.31.2 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Modified lipo to only require 4-byte alignment for load - commands. Radar bug #4428605.
  • - -
  • Added x86_64 support to the relocation entry functions in - misc/reloc.c, used by strip and other tools. Radar bug - #4430570.
  • - -
  • Converted more warnings to errors in the assembler, as - required by the as_warn changes in cctools-590.31.1. Radar bug - #4429135.
  • - -
  • Correctly generate x86_64 relocation entries for files - containing common symbols and for local symbols that resolve to - the same non-local symbol. Radar bug #4427629.
  • - -
  • Fix a typo in mach-o/reloc.h. Radar bug #3754196.
  • -
- -
Changes since the last release (cctools-590.31.1 -for the 5.22 Mac OS X Xcode 2.3.1 Developer release)
- -
    -
  • Fixed an incorrect merge of i386 relocation entry generation - for intersegment jumps. Radar bug #4421123.
  • - -
  • Added support for printing x86_64 thread states to otool64. - Radar bug #4424303.
  • -
- -
Changes since the last release (cctools-590.31 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Added support for the x86_64 architecture to all of the tools. - Radar bug #4345090.
  • - -
  • Merged the i386 assembler from GNU binutils 2.16.1 into the - i386 Mach-O assembler sources. Radar bugs #4178064, #4215749, - #4299651, #4299664, #4359724.
  • - -
  • Added support for the Merom New Instructions to the i386 - assembler and disassembler. Radar bug #4407298.
  • - -
  • Improved otool's output for a number of i386 - instructions.
  • - -
  • Changed as_warn to be a warning rather than an error, removed - as_warning, changed as_warning calls to as_warn, and changed - as_warn calls which expected to be errors to as_bad or as_fatal as - appropriate. This matches GNU binutils.
  • - -
  • Changed ld to invoke ld64 without any extra arguments when - invoked for a 64-bit architecture.
  • -
- -

Notes Specific to Release 5.21 (Mac OS X Xcode 2.3 Developer -Release)

- -
Changes since the last release (cctools-590.40 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in ld(1) that caused it to generate an incorrect - error about an attempt to redefine ___dso_handle when - -bundle_loader was used. Radar bug #4482300.
  • -
- -
Changes since the last release (cctools-590.39 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in pagestuff(1) that caused it to crash with a - dSYM file. Radar bug #4495141.
  • -
- -
Changes since the last release (cctools-590.38 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in ld(1) that caused it to generate spurious - tracing of indirect undefined symbols. Radar bug #4495010.
  • -
- -
Changes since the last release (cctools-590.37 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in ld(1) that caused a warning message that it - could not understand DWARF debug information from empty files. - Radar bug #4492686.
  • - -
  • Fixed a bug in ld(1) that produce the error message "internal - error: output_local_symbols() inconsistent local symbol count" - when there were multiple defined symbols from .o files with DWARF - debugging information and the -m option was used. Radar bug - #4487503.
  • - -
  • Fixed a bug in ld(1) that produce the error message "internal - error: output_local_symbols() inconsistent local symbol count" - when there were common symbols from .o files with DWARF debugging - information and the common symbols got discarded for a true - definition in a shared library. Radar bug #4446605.
  • - -
  • Changed ld(1) to allow the -Y flag to appear multiple times. - Radar bug #4461031.
  • - -
  • Changed ld(1) to not cause an error if symbols listed in the - file for the -unexported_symbols_list option are not found in the - linked objects. Radar bug #4465511.
  • - -
  • Changed the compiler tools source to compile with the lastest - conformance headers. Radar bug #4438650.
  • -
- -
Changes since the last release (cctools-590.36 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a problem using a relocatable expression with an - absolute symbol who's value came from a .set directive and an - expression of the form "symbol1 + constant - symbol2" where the - constant was non-zero. Radar bug #4473241.
  • - -
  • Changed the static linker to not remove the contents of a - section created from a file with -sectcreate when -dead_strip is - specified. Radar bug #4439885.
  • - -
  • Fixed a bug in the static linker when the ___dso_handle linker - defined symbol in an executable is not exported using - -exported_symbol_list which resulted in an internal error. Radar - bug #4461173.
  • - -
  • Fixed a bug in the 32-bit assemblers when a symbol's value was - used in an expression it was not being signed extended correctly. - This caused problems because expressions are internally - represented as 64-bit values so if the expression's sign was - tested it would not correctly be negitive in those cases. Radar - bug #4461836.
  • - -
  • Added a synonym for the i386 assembler for the "fisttp" - instruction without a suffix that is the same as "fisttps". Radar - bug #4462289.
  • - -
  • Changed libtool to pass the -t flag on to ld(1). Radar bug - #4213190.
  • - -
  • Changed the assembler to allow a string that has a single - quote escaped with a backslash. Radar bug #4391495.
  • -
- -
Changes since the last release (cctools-590.35 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Changed the linker defined symbol __dso_handle to - ___dso_handle.(three leading underbars). Radar bug #3992244.
  • -
- -
Changes since the last release (cctools-590.34 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Added the linker defined symbol __dso_handle for all linked - images types that can be used with the dynamic liker. Radar bug - #3992244.
  • - -
  • Added the MH_DSYM filetype constant to - <mach-o/loader.h>. Radar bug #4443871.
  • - -
  • Added a warning to nmedit(1) when a global coalesced symbol is - seen in a final linked image that it can't be turned into a staitc - symbol and suggest the use of ld(1)'s -exported_symbols_list - option. Radar bug #4269492.
  • - -
  • Changed seg_hack(1) to not affect debug sections. Radar bug - #4421656.
  • -
- -
Changes since the last release (cctools-590.33 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Changed nm(1) to not exit with a non-zero status when run on a - file with no symbols. Radar bug #4421611.
  • - -
  • Fixed a bug in the assembler that was not correctly handling - constants as 64-bit values. Radar bug #4434572.
  • -
- -
Changes since the last release (cctools-590.32 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Suppress compilation directory SO stab when none is - provided/necessary and append '/' to it otherwise. Radar bug - #4426731.
  • - -
  • Fix another bug in the DWARF debug map code that could produce - 'inconsistent local symbol count'. Radar bug #4428677.
  • -
- -
Changes since the last release (cctools-590.31 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed two bugs in the DWARF debug map code that could produce - the message 'inconsistent local symbol count'. Radar bug #441933 - and bug #4421606.
  • - -
  • Don't produce debug map symbols for sections with - S_ATTR_STRIP_STATIC_SYMS set.
  • - -
  • Added support for the debug map to nmedit. Radar bug - #4421583.
  • - -
  • cctools will now build without using buildit again! Radar bug - #4402489.
  • - -
  • Added support for logging of command-line options to stderr - with LD_PRINT_OPTIONS.
  • - -
  • Changed XBS environment variables to begin with LD instead of - RC. Radar bug #4420393.
  • - -
  • Updated XBS logging output to use string XBS instead of Build - & Integration. Radar Bug #4214105.
  • - -
  • Added support for XBS logging output directly to a file. Radar - bug #4214101.
  • - -
  • Added the environment variable LD_LIBRARY_PATH as a colon - separated set of paths to be searched just before the default list - of paths. Radar bug #4314159.
  • - -
  • Changed the assemblers to allow the .quad directive with the - 32-bit assemblers. Radar bug #4227961.
  • - -
  • Picked up the changed in the source code of cctools-590.23.4 - to add macros that rename structure members of the - ppc_thread_state_t for building with Unix conformance headers. - Radar bug #4340681.
  • -
- -
Changes since the last release (cctools-590.30 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in ld(1) that caused it to crash when the argument - to -init or -e was an undefined symbol. Radar bug #4401068.
  • - -
  • Changed ld(1) to not create an LC_UUID load command unless an - input file contains a debug section or an LC_UUID load command. - Also added the -no_uuid option to ld(1) to always suppress the - creation of the LC_UUID load command. Radar bug #4415529.
  • - -
  • Added the -no_uuid option to strip(1) to remove any LC_UUID - load commands. Radar bug #4415536.
  • -
- -
Changes since the last release (cctools-590.29 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Change output_local_symbols in symbols.c to give the N_OSO - stab in the DWARF map a n_desc of 1. Radar bug #4414139.
  • - -
  • Add support for generating the DWARF debug map. Radar bugs - #4370126 and #4409967.
  • -
- -
Changes since the last release (cctools-590.28 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Removed the check in the static linker to produce an error if - there is a relocation entry for a global coalesced symbol and - non-zero offset. Radar bug #4405403.
  • -
- -
Changes since the last release (cctools-590.27 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in ld(1) that caused it to crash when linking for - the non-host bytesex and an input file has an LC_UUID load - command. Radar bug #4401375.
  • - -
  • Added a check to the static linker to produce an error if - there is a relocation entry for a global coalesced symbol and - non-zero offset. Radar bug #4213478.
  • -
- -
Changes since the last release (cctools-590.26 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Changed the assembler to allow the .set direcitve to be used - with a subtract expression between two symbols where one of the - symbols is not defined at the point of the .set directive. Radar - bug #4390251.
  • -
- -
Changes since the last release (cctools-590.25 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Fixed a bug in ld(1) that did not ignore the uuid load command - in .o files. Radar bug #4388766.
  • -
- -
Changes since the last release (cctools-590.24 -for the 5.21 Mac OS X Xcode 2.3 Developer release)
- -
    -
  • Added support for the debug attribute and other DWARF support. - Radar bug #3415593.
  • -
- -
Changes since the last release (cctools-590.23 -for the 5.20 Mac OS X Xcode 2.2.1 Developer release)
- -
    -
  • Added support for the debug attribute and .debug_note asembler - directive in the assembler. Radar bug #4367423.
  • -
- -

Notes Specific to Release 5.20 (Mac OS X Xcode 2.2.1 Developer -Release)

- -
Changes since the last release (cctools-590.22 -for the 5.20 Mac OS X Xcode 2.2.1 Developer release)
- -
    -
  • Fixed the routines that byteswap the i386 floating point - thread state. Radar bug #4350771.
  • -
- -
Changes since the last release (cctools-590.21 -for the 5.20 Mac OS X Xcode 2.2.1 Developer release)
- -
    -
  • Fixed a bug in ld(1) code that caused it to crash when linking - Objective-C code. Radar bug #4348548.
  • -
- -
Changes since the last release (cctools-590.20 -for the 5.20 Mac OS X Xcode 2.2.1 Developer release)
- -
    -
  • Fixed a bug in the libkld code that caused it to crash using - the kld_forget_symbol() api. Radar bug #4346485.
  • - -
  • Fixed a bug in strip(1) that caused it to crash when stripping - a dynamic library with multiple cpusubtypes on a host machine with - different byte sex, Radar bug #4265381.
  • - -
  • Fixed a bug otool(1) when a -arch flag was specified on a thin - binary which caused an incorrect error about the architecture not - being present. Radar bug #4337271.
  • -
- -
Changes since the last release (cctools-590.19 -for the 5.20 Mac OS X Xcode 2.2.1 Developer release)
- -
    -
  • Fixed a bug in the redo_prebinding code for the new self - (dyld) modifying Intel stubs that was not correctly setting the - jmp instruction target for symbols defined in a shared library. - Radar bug #4335281.
  • - -
  • Fixed a bug in ld(1) that was causing an internal error if - both -s and -dead_strip were used and there were dead private - extern symbols. Radar bug #4286691.
  • - -
  • Fixed a bug in ld(1) when -w was used that did not suppress - printing the list of multiply defined symbols from dylibs. Radar - bug #4334705.
  • - -
  • Cleaned up the cctools source code so it will build cleanly - without warnings. Radar bug #4340147.
  • - -
  • Fixed a problem in the cctools source that would not allow it - to build on Leopard9A68. Radar bug #4342523.
  • -
- -
Changes since the last release (cctools-590.18 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Made changes to improve the performance of the static link - editor. Radar bug 4299546.
  • -
- -

Notes Specific to Release 5.19 (Mac OS X Xcode 2.2 Developer -Release)

- -

New Features

- -

The static link editor now supports the new option -Sp to strip, -edit and add debugging symbols so the debugger can used most of the -debugging symbols from the object files.

- -

The ar(1) tool has the new -S option to suppress building the -table of contents.

- -
Changes since the last release (cctools-590.17 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Fixed a bug in nmedit(1) which caused it to produced a bad - relocation entry when there was one for a global coalesced symbol - defined in the file being changed into a static. Radar bug - 4318688.
  • -
- -
Changes since the last release (cctools-590.16 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Fixed a bug in strip(1) which caused it to produced a bad - indirect symbol table entry when there was more than one non-lazy - pointer section with the same indirect symbol defined in the file - being stripped. Radar bug 4316021.
  • -
- -
Changes since the last release (cctools-590.15 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed ld(1) so that the -Sp option discards all type stabs. - Radar bug 4312007.
  • -
- -
Changes since the last release (cctools-590.14 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed ld(1) so that the -Sp option discards unnamed type - stabs. Radar bug 4305465.
  • - -
  • Added support for encrypted binaries. Radar bug #4298526.
  • -
- -
Changes since the last release (cctools-590.13 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Made changes to the cctools source to allow it to build on the - current Mac OS X version for Intel. Radar bug 4303606.
  • -
- -
Changes since the last release (cctools-590.12 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Fixed a bug in ld(1) when using -dead_strip that incorrectly - removed local symbols for coalesced sections. This caused - debugging C++ templements not to work. Radar bug #4293942.
  • -
- -
Changes since the last release (cctools-590.11 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Made changes to support non executable stacks. Radar bug - 4281171.
  • - -
  • Added the assembler directives.secure_log_unique and - .secure_log_reset . Radar bug #4255881.
  • -
- -
Changes since the last release (cctools-590.10 -for the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Made changes to the cctools source to allow it to build on the - what will ship for Mac OS X 10.5. Radar bug 4282026.
  • -
- -
Changes since the last release (cctools-590.9 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Added support for the new self (dyld) modifying Intel stubs. - Radar bug #4202415.
  • - -
  • Fixed the PowerPC assembler so it will correctly assembly - conditional branch instructions that use the count register or - link register that have prediction. Radar bug #4274713.
  • - -
  • Fixed ld(1) so that the -Sp option correctly keeps C++ scoped - type stabs. Radar bug #4233860.
  • - -
  • Added the i386 pushfd/popfd mnemonics as synonyms for - pushf/popf. Radar bug #4272274.
  • - -
  • Made changes to the cctools source to allow it to build on the - current Mac OS X 10.5 9A40. Radar bug 4279472.
  • -
- -
Changes since the last release (cctools-590.8 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Improved ld(1')'s implementaion of -Sp to be faster. Radar bug - #4157062.
  • - -
  • Changed ld(1) to cause it to not use a weak symbol from a - shared library but rather on in a .o file being linked even if it - is linked in afterwards. Radar bug #4231836.
  • -
- -
Changes since the last release (cctools-590.7 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed the tools to understand the new non-general register - thread states for i386. Radar bug #4200908.
  • - -
  • Changed the tools to understand both the new and old general - register thread state for i386. Radar bug #4240450 .
  • -
- -
Changes since the last release (cctools-590.6 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed ld(1')'s implementaion of -dead_strip to be faster - especially with large .o file created with ld -r. Radar bug - #4228195.
  • - -
  • Changed ld(1) so that dead code C++ with exeception - information will be stripped with -dead_strip. Radar bug - #4213358
  • - -
  • Added the -macosx_version_min command line option to ld(1) to - override the MACOSX_DEPLOYMENT_TARGET environment variable. Radar - bug #4195253.
  • -
- -
Changes since the last release (cctools-590.5 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed ld(1) to not delete type stabs in groups of stabs - paired by N_BNSYM/N_ENSYM stabs that are for deleted coalesced - symbols or dead code stripped symbols. Radar bug #4205997.
  • - -
  • Fixed a problem when the -Sp below was added that caused - libkld to have incorrect undefined references. Radar bug - #4220100.
  • -
- -
Changes since the last release (cctools-590.4 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • The static link editor now supports the new option -Sp to - strip, edit and add debugging symbols so the debugger can used - most of the debugging symbols from the object files. Radar bug - #4202462.
  • - -
  • The static link editor now does not cause an error on an empty - archive thinking it is malformed. Radar bug #4201492.
  • -
- -
Changes since the last release (cctools-590.3 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • The static link editor was change to not issue a warning - message about both NEXT_ROOT being set and -syslibroot being - specified unless the two values are different. Radar bug - #3593340.
  • - -
  • The warning message the static link editor issues about a - missing indirectly referenced dynamic library now includes the - name of the library that made the reference. Radar bug - #4106804.
  • - -
  • Fixed a bug in the i386 assembler that did not assembler the - outw and inw instructions correctly. Radar bug #4110183.
  • - -
  • Added the -S option to ar(1) to suppress creating the table of - contents. Radar bug #4130034.
  • - -
  • The man pages have been updated to not use the term fat files - but changed to use the term universal files. Radar bug - #4171207.
  • - -
  • Fixed a bug in the static link editor that could incorrectly - issue a mismatching weak reference error message when a - -weak_framework flag was used. Radar bug #4180599.
  • - -
  • Fixed a bug in the i386 assembler that did not assemble the - "fsubrp %st(i)" instruction correctly. Radar bug #4182849.
  • - -
  • Fixed the i386 assembler so that the -n option would work and - not cause a crash. Radar bug #4192255.
  • - -
  • Changed the PowerPC assembler to allow the dcbzl instruction - without the -force_cpusubtype_ALL or -arch ppc64. Radar bug - #4181833.
  • -
- -
Changes since the last release (cctools-590.2 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed as(1) now sets the n_value field of BINCL stabs to be - the BINCL/EINCL checksum. Radar bug #4181871.
  • -
- -
Changes since the last release (cctools-590.1 for -the 5.19 Mac OS X Xcode 2.2 Developer release)
- -
    -
  • Changed ld(1) to now unique the BINCL/EXCL strings, which - reduces the size of final linked images built with -gfull. Radar - bug #4151821.
  • -
- -
Changes since the last release (cctools-590 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a bug in processing ld(1) symbols lists for flags such - as -unexported_symbols where if more than two duplicates are on - the list only one of the duplicates are removed. Radar bug - #4139106.
  • - -
  • Fixed the assembler so that when a .private_extern appears - before a .zerofill for a symbol it correctly gets created as a - private extern symbol. Radar bug #4156921.
  • -
- -

Notes Specific to Release 5.18 (Mac OS X Xcode 2.1 Developer -Release)

- -

New Features

- -

The tools now have support for the handful of x86 sse3 -instructions.

- -
Changes since the last release (cctools-589 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Changed the static linker to prepend the value of -syslibroot - to all absolute search paths of -L and -F if they exist. Radar bug - #4127020.
  • - -
  • Added code to libredo_prebinding when undoing the prebinding, - to reset the (__DATA,__dyld) section contents to a canonical - value. Radar bug #4126660.
  • - -
  • Changed the code to libredo_prebinding when undoing the - prebinding,, to reset the values of symbol pointers to symbols - defined in the image depending on if either MH_WEAK_DEFINES or - MH_BINDS_TO_WEAK is set to work with the Tiger dyld. Radar bug - #4126666.
  • -
- -
Changes since the last release (cctools-588 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Added support for the CPU_SUBTYPE_PENTIUM_4 cpusubtype and the - -arch pentium4 to be used with the tools. Radar bug #4115802.
  • - -
  • Changed the cctools project to allow it to build with the - changes to the i386 header files with the field names "environ" - changed and also build on releases without that change. Radar bug - #4113580.
  • -
- -
Changes since the last release (cctools-587 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Added code to libredo_prebinding to provide fix-ups to work - around the problems with the FCS Tiger dyld's prebinding - incorrectly changing some stab's addresses. Radar bug - #4113681.
  • -
- -
Changes since the last release (cctools-586 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Added code to libredo_prebinding to provide fix-ups to work - around the problems with the FCS Tiger dyld's prebinding - incorrectly changing some absolute symbols addresses and not - updateding the objc_module_info_addr field in the module table. - Radar bug #4108651.
  • - -
  • Fixed the libredo_prebinding code to not change the time stamp - of 64-bit Mach-O files. Radar bug #4105452.
  • -
- -
Changes since the last release (cctools-585 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a problem with the libsyminfo.a build that was - incorrectly built with -static. Radar bug #4105797.
  • -
- -
Changes since the last release (cctools-584 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a problem with the libkld.a build that had an undefined - symbol _get_macosx_deployment_target. Radar bug #4100992.
  • -
- -
Changes since the last release (cctools-583 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a bug in assembling the i386 movd instructions with MMX - register to memory forms that encoded the operands in the wrong - order. Radar bug #4098884 (aka #4100636)
  • -
- -
Changes since the last release (cctools-582 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Added the value 10.5 to be one of the known values allowed for - environment variable MACOSX_DEPLOYMENT_TARGET (Radar bug - #4098516).
  • - -
  • Changed the cctools project so it does not use the -MD - compiler option when RC_XBS is YES so that it will build with - gcc-5000 series compilers and multiple -arch options. Radar bug - #4029936.
  • -
- -
Changes since the last release (cctools-581 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a bug in the ppc64 assembler that incorrectly caused an - error for instructions like fsqrt that said the - -force_cpusubtype_ALL option was needed. Radar bug #4092588.
  • -
- -
Changes since the last release (cctools-580 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a bug in assembling the i386 movq instructions with - register to register forms that encoded the operands in the wrong - order. Radar bug #4089432.
  • - -
  • Fixed a bug in ld(1) introduced in cctools-580 in the handling - of MACOSX_DEPLOYMENT_TARGET which would cause errors when options - that required specific values were being checked. Radar bug - #4092246.
  • -
- -
Changes since the last release (cctools-579 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Fixed a bug in the static linker that would incorrectly - produce a "mismatching weak references" error when a symbol - defined in a dylib is first linked in followed by an undefined - weak reference from a .o file. Radar bug #4016228.
  • - -
  • Changed the PowerPC assembler to accept "mtocrf" as a synonym - for "mtcrf" and accept "mfocrf" as a synonym for "mfcr". And when - these mnemonic is used the argument must have exactly one bit set. - Also changed otool(1)'s disassembler to use mtocrf/mfocrf when bit - 11 is set. Radar bug #4034280.
  • - -
  • Changed the cctools project to also use gcc-3.5 when - RC_USE_GCC35_FOR_PPC64 is YES. Radar bug #4066237.
  • - -
  • Changed the i386 disassembler to use 32-bit values for - negitive constants who's width is less than 32-bits. Radar bug - #4079507.
  • - -
  • Change ld(1) to default MACOSX_DEPLOYMENT_TARGET to 10.4 for - x86 architectures. Radar bug #4081062.
  • - -
  • Fixed the assembly of the i386 ud2 instruction to use the 0x0f - 0x0b opcodes. Radar bug #4085845.
  • - -
  • Changed the i386 disassembler to use the 0x0f 0x0b opcodes for - the i386 ud2 instruction. Radar bug #4085846.
  • - -
  • Fixed the as(1) man page path to the assembler manual is - correct. Radar bug #4088403.
  • - -
  • Fixed a bug in the Panther dynamic linker that would cause - programs to crash that were buildt with -bind_at_load that had - images with weak references to symbols. Radar bug #4062410.
  • -
- -
Changes since the last release (cctools-578 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Changed the cctools project to build with RC_RELEASE being - Saffron like Tiger so the 3-way fat libmacho objects are compiled - with gcc-3.5.
  • -
- -
Changes since the last release (cctools-577 for -the 5.18 Mac OS X Xcode 2.1 Developer release)
- -
    -
  • Added support to the x86 assembler and disassembler for the - sse3 instructions. (Radar bug #4014327).
  • - -
  • Fixed ld(1) when running on x86 machines to ignore 64-bit - Mach-O files when -no_arch_warnings is specified. (Radar bug - #4014404).
  • -
- -
Changes since the last release (cctools-576 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in the libredo_prebinding(3) code that was casuing - an incorrect error message that file was malformed and an - r_address field was bad. (Radar bug #4054854).
  • -
- -

Notes Specific to Release 5.17 (Mac OS X Xcode 2.0 Developer -Release)

- -

New Features

- -

The support for 64-bit tools for -Tiger.

- -

The current version of cctools has tools needed to do the -development of binaries for 64-bit systems. The only tools that are -not seamless and handle both 32-bit and 64-bit objects are otool(1) -and ld(1). The cctools project provides an otool64(1) for 64-bit -objects. More fixes and changes to the tools are expected in releases -to follow.

- -
Changes since the last release (cctools-575 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the ld(1) man page noting 64-bit differences. (Radar - bug #3853561).
  • -
- -
Changes since the last release (cctools-574 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in ld(1) that when building a two-level namespace - image and linking against flat namespace shared libraries it could - result in undefined symbol errors from references from the flat - namespace shared libraries. (Radar bug #4022543).
  • -
- -
Changes since the last release (cctools-573 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the x86 assembler to have -force_cpusubtype_ALL as the - default. (Radar bug #4002758).
  • - -
  • Changed the static linler when linking x86 objects to have - -force_cpusubtype_ALL as the default. (Radar bug #4002756).
  • -
- -
Changes since the last release (cctools-572 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • No changes, there was a filesystem problem with the submission - to B&I of cctools-572 so a cctools-573 was resubmitted to fix - that.
  • -
- -
Changes since the last release (cctools-571 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug that will now allow MallocScribble to be on and - ld(1) not to crash. (Radar bug #3980535).
  • - -
  • Fixed a bug that caused nm(1) to crash for ppc64 binaries when - run on Darwin Intel. (Radar bug #3987993).
  • - -
  • Fixed a typo in the lipo(1) man page that incorrectly - referenced VAX and Mips architectures. (Radar bug #4007112).
  • - -
  • Fixed a bug in the assemblers that incorrectly removed - /dev/null when the it was used as the output file. (Radar bug - #4007180).
  • - -
  • Fixed a bug that caused libkld.dylib to be built with no - exported symbols when built with gcc-4.0. (Radar bug - #4008570).
  • - -
  • Fixed a bug that caused strip(1) to crash for ppc64 binaries - when run on Darwin Intel. (Radar bug #4010859).
  • - -
  • Fixed a bug in the assembler that cause it to crash with 8-bit - characters input that had the high bit set. (Radar bug - #3943609).
  • - -
  • Changed the output of nm(1) with the -P option to print the - size field as zero. (Radar bug #3652346).
  • -
- -
Changes since the last release (cctools-570 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the cctools project so it will build in the SUPanWheat - release train. (Radar bug #3979451).
  • -
- -
Changes since the last release (cctools-569 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in the assembler that caused it to incorrectly - generate an error for a symbol being already defined if the .desc - directive was used to set the REFERENCED_DYNAMICALLY bit before - the label was seen. (Radar bug #3975121).
  • -
- -
Changes since the last release (cctools-568 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in the static linker that caused it to generate an - internal error for the count of relocation entries. (Radar bug - #3934341).
  • -
- -
Changes since the last release (cctools-567 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The interposing section type was added. (Radar bug - #3965794).
  • - -
  • A bug in the 32-bit Mach-O static link editor was fixed which - was incorrectly generating a error of the form: "illegal reference - for -dynamic code (reference to a coalesced section ..." when it - should not have been. (Radar bug #3961903).
  • -
- -
Changes since the last release (cctools-566 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The unneeded 64-bit Mach-O assembler driver, /usr/bin/as64, - has been removed. (Radar bug #3953127).
  • - -
  • A man page for otool64(1) has been added that simply sources - the otool(1) man page. (Radar bug #3954720).
  • -
- -
Changes since the last release (cctools-565 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The tool strings(1) has been updated to work with 64-bit - Mach-O files. (Radar bug #3943477).
  • - -
  • Fixed another bug in nmedit(1) that cause it to make fat - dylibs with 64-bit Mach-O files to render the 64-bit Mach-O dylib - unusable. (Radar bug #3949527).
  • -
- -
Changes since the last release (cctools-564 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in nmedit(1) with the -p option that cause it to - crash with 64-bit Mach-O files. (Radar bug #3945219).
  • -
- -
Changes since the last release (cctools-563 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the cctools project source to no longer install the - header file <mach-o/dyld_debug.h>. (Radar bug - #3937664).
  • - -
  • Fixed a bug in nmedit(1) that cause it to make fat dylibs with - 64-bit Mach-O files to render the 64-bit Mach-O dylib unlinkable. - (Radar bug #3940965).
  • -
- -
Changes since the last release (cctools-562 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed bugs in the 32-bit static link editor with respect to - private extern common symbols. (Radar bug #3928792),
  • - -
  • Changed the redo_prebinding(1)(3) code on how it sets the - values of the two pointers in the (__DATA,__dyld) section. (Radar - bug #3828403).
  • - -
  • Made enhancements to 32-bit static link editor to support dyld - coalescing symbols across dylibs.(Radat bug #3933777).
  • -
- -
Changes since the last release (cctools-561 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the cctools project source to be compatible with the - upcoming UNIX03-333 branch of xnu. (Radar bug #3930480).
  • - -
  • Changed install_name_tool (1) to to work with both 64-bit and - 32-bit Mach-O files. (Radar bug #3930775).
  • -
- -
Changes since the last release (cctools-560 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in nmedit(1) that would produce malformed output - files with bad symbol tables from dynamic shared librarie files - without a module table. (Radar bug #3926028).
  • - -
  • Changed ld(1) to disable prebinding when the environment - variable MACOSX_DEPLOYMENT_TARGET >= 10.4 for anything that is - not a split shared library. (Radar bug #3924730).
  • -
- -
Changes since the last release (cctools-559 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the constant FAT_CIGAM in <mach-o/fat.h> to be a - real constant and not use NXSwapInt(). (Radar bug #3914142).
  • - -
  • Changed strip(1) to follow symlinks and not replace them with - the stripped file they are pointing to. (Radar bug #3889109)
  • -
- -
Changes since the last release (cctools-558 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a problem with building libkld that cause the kernel to - fail to link. (Radar bug #3906133).
  • - -
  • Fixed a problem with a strip(1) fix that caused it to print - extra newlines. (Radar bug #3907726).
  • - -
  • Fixed a problem with the assembler not allowing altivec - instructions with ppc64 assembly files. (Radar bug #3906004).
  • - -
  • Fixed a problem with strip(1) and the -c option that did not - correctly set the filetype for stub libraries. (Radar bug - #3909472).
  • - -
  • Changed nm(1) to deal with dynamic shared libraries without - module tables. (Radar bug #3883039).
  • -
- -
Changes since the last release (cctools-557 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The tool seg_addr_table(1) has been changed to not emit split - addresses for libraries built nonsplit. (Radar bug #3903547).
  • - -
  • A fix to otool(1), for the option to print the hints table, - -H, when it was used without the verbose option, -v, was made to - remove an incorrect warning about Inconsistent mh_sizeofcmds". - (Radar bug #3902811).
  • -
- -
Changes since the last release (cctools-556 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The tool size(1) has been updated to work with 64-bit Mach-O - files. (Radar bug #3900014).
  • - -
  • The sources of the cctools project have been change to remove - the old support for the WWDC 2004 interim 64-bit format. (Radar - bug #3600419).
  • -
- -
Changes since the last release (cctools-555 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Added the -syslibroot <argument> option to ld(1) as - another way to specifiy NEXT_ROOT. (Radar bug #3886145).
  • - -
  • Changed ranlib(1) with the -q option not to print a warning - about empty archives. (Radar bug #3893339).
  • - -
  • Changed ranlib(1) with the -q option not to add a table of - contents when the archive contains no objects. (Radar bug - #3893392).
  • - -
  • Change the way ld(1) lays out dyld to make the first address - of the first section remain semi-constant. (Radar bug - #3893651).
  • -
- -
Changes since the last release (cctools-554 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a problem with libkld having an undefined symbol - _pass2_nsect_merged_symbol_section_type introduced by the change - in Radar bug #3884596 for ld(1)'s checking of illegal references - to coalesced sections that did not correctly flag an illegal - reference. (Radar bug #3894721).
  • -
- -
Changes since the last release (cctools-553 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in strings(1) -a option that was failing to print - the last character of a string a the end of a section. (Radar bug - #3766901).
  • - -
  • Changed ranlib(1) when used witht the -q option to not print - warnings about empty libraries. (Radar bug #3878332).
  • - -
  • Changed strip(1) to better handle filenames of PATH_MAX . - (Radar bug #3878381).
  • - -
  • Changed nm(1) to take the a -- argument that treats all - remaining arguments as file names, make the default format for the - -P option hex, and print the pathname on each line for the -A - option. (Radar bug #3878451).
  • - -
  • Fixed a bug in ld(1) checking of illegal references to - coalesced sections that did not correctly flag an illegal - reference. (Radar bug #3884596).
  • - -
  • Fixed a bug in otool(1) that did not print symbol names when - disassembling. (Radar bug #3889188).
  • - -
  • Fixed a bug in the ppc64 assembler that would produce an - object file with bad fileoff/filesize values in the LC_SEGMENT_64 - load command. (Radar bug #3891223).
  • -
- -
Changes since the last release (cctools-552 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The static linker, ld(1), now support the environment variable - LD_UNPREBOUND_LIBRARIES which is the name of a file containing - dynamic library install names not to prebind. Also supports the - environment variable LD_SPLITSEGS_NEW_LIBRARIES to build libraries - not in the seg_addr_table as split. (Radar bug #3875865).
  • - -
  • Fixed a bug in the nmedit(1) tools that incorrectly produced - errors about symbols having bad n_sect values. (Radar bug - #3880780).
  • - -
  • Made changes to the seg_addr_table(1) tools for the Mac OS X - 10.4 prebinding. (Radar bug #3871826).
  • - -
  • Changed the redo_prebinding code to ignore 64-bit Mach-O - files. (Radar bug #3877703).
  • -
- -
Changes since the last release (cctools-551 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The tool strip(1) how has the "--" option which treats all - arguments after it as files. (Radar bug #3571788).
  • - -
  • The cctools project now builds with a stdio.h that does not - include stdarg.h. (Radar bug #3640701).
  • - -
  • The strings(1) command now has the UNIX standard conformance - -n and -t options (see the man page for more details). (Radar bug - #3644256).
  • - -
  • The nm(1) command now has the UNIX standard conformance -A and - -P options (see the man page for more details). (Radar bug - #3652346).
  • - -
  • The ld(1) command now does not ignore the umask(2) value when - creating output files. (Radar bug #3761943).
  • - -
  • The ld(1) command no longer overwrites non-writeable files. - (Radar bug #3762029).
  • - -
  • The ar(1) command will now produce archives libraries that - ld(1) will process without running ranlib(1) if the archive - members are not fat .o files. (Radar bug #3762136).
  • - -
  • The ld(1) command now writes its diagnostics to stderr.(Radar - bug #3762151).
  • - -
  • The strip(1) command no longer overwrites non-writeable files - (Radar bug #3852702).
  • - -
  • The nm(1) command's usage line now matches the SYNOPSIS of the - nm(1) man page. (Radar bug #3856321).
  • -
- -
Changes since the last release (cctools-550 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Sped up the 32-bit Mach-O static link editor, ld(1), symbol - searching. (Radar bug #3836837).
  • - -
  • Changed otool64(1) to symbolically print the PowerPC 64-bit - thread state. (Radar bug #3866755)
  • - -
  • Fixed a bug in the undo prebinding code that would not - correctly set the MH_ALLMODSBOUND flag in the mach header when it - should have. (Radar bug #3864573).
  • - -
  • Changed the 32-bit Mach-O static link editor, ld(1), to remove - symbol stubs and lazy pointers when linking the dynamic linker, - (Radar bug #3863439).
  • - -
  • Changed ranlib(1) to not produce a waning about 64-bit Mach-O - files not on 8 byte offsets. (Radar bug #3818951).
  • - -
  • Changed the PowerPC assembler to not treat the instruction - stfiwx as optional so it will assemble without the - -force_cpusubtype_ALL option. (Radar bug #3841472).
  • -
- -
Changes since the last release (cctools-549 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed libsyminfo to work with both 64-bit and 32-bit Mach-O - files. (Radar bug #3854972).
  • - -
  • Changed the seg_addr_table(1) tools to ignore 64-bit Mach-O - files. (Radar bug #3861276).
  • - -
  • Changed nm(1) to to work with both 64-bit and 32-bit Mach-O - files and removed the nm64(1) tool. (Radar bug #3859090).
  • -
- -
Changes since the last release (cctools-548 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in ghe the get_prebind_cksums(3) API that would - cause it to crash on corrupt input. (Radar bug #3839049)
  • - -
  • Made a changed to ld(1) when the -dead_strip option is used - that improves debugging with -O3 compiled files. (Radar bug - #3839049).
  • - -
  • Changed ld(1) to disable prebinding when the environment - variable LD_PREBIND_SPLITSEGS_ONLY for anything that is not a - split shared library. (Radar bug #3855581).
  • - -
  • Fixed the ppc64 assembler so it will accept the .machine - ppc970-64 directive. (Radar bug #3856997).
  • - -
  • Changed libsyminfo to not crash if presented with a 64-bit - Mach-O file. (Radar bug #3854972).
  • -
- -
Changes since the last release (cctools-547 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in tool tool strip(1) that caused it to not - correctly update the indirect symbol table entries in 64-bit - Mach-O files (Radar bug #3848104).
  • -
- -
Changes since the last release (cctools-546 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Ported the libredo_prebinding code to not creash when it sees - a 64-bit Mach-O files (Radar bug #3851599).
  • -
- -
Changes since the last release (cctools-546 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Ported the libmacho code for libSystem to work with both - 64-bit and 32-bit Mach-O files. (Radar bug #3780704).
  • - -
  • Fixed a bug in otool64(1) that did not correctly print the - cpusubtype for -arch ppc970-64 objects. (Radar bug #3825281).
  • -
- -
Changes since the last release (cctools-544 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in tool tool strip(1) that caused it to corrupt - 64-bit Mach-O files and archives containing 64-bit Mach-O files - (Radar bug #3836060).
  • -
- -
Changes since the last release (cctools-543 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in the libdyld code that would cause it to not - load any fat bundles. (Radar bug #3837563).
  • -
- -
Changes since the last release (cctools-542 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in ld(1) that would cause it to crash on i386 - machines. (Radar bug #3830818).
  • - -
  • Fixed a regression in the tool nmedit(1) from the changes put - in for 3812858 that manifiested it self the same as 3806356. - (Radar bug #3833852).
  • -
- -
Changes since the last release (cctools-541 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in tool tool strip(1) that caused it to corrupt - the __LINKEDIT section in 64-bit Mach-O files. (Radar bug - #3831401).
  • -
- -
Changes since the last release (cctools-540 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in tha tool strip(1) that cause it to produce an - internal eroor for 64-bit Mach-O files. (Radar bug #3829545).
  • -
- -
Changes since the last release (cctools-539 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a bug in the tool strip(1) that cause it to produce an - incorrect malformed object file eroor for 64-bit Mach-O files. - (Radar bug #3829149).
  • -
- -
Changes since the last release (cctools-538 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The tool strip(1) was changed to understand both 32-bit and - 64-bit Mach-O files. (Radar bug #3812858).
  • -
- -
Changes since the last release (cctools-537 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • As part of the transition, ld(1) now executes /usr/bin/ld64 if - a "-arch ppc64" is seen anywhere on the command line. (Radar bug - #3823359).
  • -
- -
Changes since the last release (cctools-536 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fix a bug in libtool(1)/ranlib(1) that caused it to grow the - size of member names. (Radar bug #3817546).
  • - -
  • Changed the redo_prebinding(3) API to return - REDO_PREBINDING_SUCCESS any time a new file is created. (Radar bug - #3818477).
  • - -
  • Changed ld(1) to ignore 64-bit Mach-O files when - -no_arch_warnings is specified. (Radar bug #3815344).
  • -
- -
Changes since the last release (cctools-535 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fix a bug in the PowerPC assembler that produced an incorrect - expression out of range error. (Radar bug #3813143).
  • - -
  • Fix a bug in the i386 assembler that produced an incorrect "no - opcode suffix given; can't determine immediate size" error and use - larger instructions that it should. (Radar bug #3813924).
  • -
- -
Changes since the last release (cctools-534 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fix problems with strip(1) not being able to process static - libraries produced by libtool(1) that had archive members on 8 - byte boundaries. (Radar bug #3811489).
  • -
- -
Changes since the last release (cctools-533 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixing libtool(1) and ranlib(1) to correctly place 64-bit - Mach-O files on 8 byte boundaries. (Radar bug #3808740).
  • - -
  • The cctools-534 sources no longer installs its libdyld - archives for libSystem builds. (Radar bug #3780216).
  • - -
  • The lipo(1) -info and -detailed_info options now work for - 64-bit Mach-O files. (Radar buf #3793539).
  • - -
  • The value of CPU_TYPE_POWERPC64 has been changed to include a - CPU_IS64BIT (0x1000000) and is that or'ed with the old value of - CPU_TYPE_POWERPC. (Radar bug #3806447).
  • - -
  • libtool(1) now runs ld64(1) when for 64-bit architectures. - (Radar bug #3807911).
  • -
- -
Changes since the last release (cctools-532 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed libtool(1) and ranlib(1) to understand both 32-bit and - 64-bit Mach-O files and removed the creation of libtool64(1) and - ranlib64(1). (Radar bug #3793394).
  • - -
  • The cctools-533 souces were changed to no longer use the - obsolete NX*Zone routines. (Radar bug #3461591).
  • - -
  • Changed ld(1) to allow more padding of load commands so that - output files linked with -prebind can be successfully re-prebound. - (Radar bug #3784597).
  • -
- -
Changes since the last release (cctools-531 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed lipo(1) understands both 32-bit and 64-bit Mach-O - files . (Radar bug #3600431).
  • - -
  • Fixed the cctools sources so that it would build with the - gcc-3.5 compiler. (Radar bug #3751608).
  • - -
  • Removed the -mc68000 and -mc68010 options should from as man - page. (Radar bug #3704760).
  • - -
  • Changed the constants MH_CIGAM and MH_CIGAM_64 in - <mach-o/loader.h> to be real constants not use NXSwapInt(). - (Radar bug #3762888).
  • -
- -
Changes since the last release (cctools-530 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Added libtool64(1) and an ranlib64(1) which are the - development tools targeting 64-bit systems . (Radar bug - #3600431).
  • -
- -
Changes since the last release (cctools-529 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The redo_prebinding code now sets the first two pointers in - the __dyld section. (Radar bug #3751608).
  • -
- -
Changes since the last release (cctools-528.5 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed nmedit(1) to allow it to handle changing global - coalesced symbols into static symbols when they have a pcrel - relocation entry to them. (Radar bug #3806356).
  • -
- -
Changes since the last release (cctools-528.5 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Added as64(1), otool64(1) and an nm64(1) which are the - development tools targeting 64-bit systems . (Radar bug - #3600431).
  • -
- -
Changes since the last release (cctools-528.4 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Fixed a problem with the seg_addr_table(1) tool that did not - correctly set the read-write address of split libraries that - overlapped. (Radar bug #3767036).
  • - -
  • Changed the cctools-528.5 sources to assume a Mac OS 10.3 - build when RC_RELEASE is set to MuonSeed.
  • - -
  • Fixed a problem with the assembler's .machine directive that - did not correctly allow altivec instructions to be assembled. - (Radar bug #3492132).
  • - -
  • Changed the undo_prebinding code to so it correctly adjusts - relocation entries of nonprebound dylibs. (Radar bug # - 3652989).
  • - -
  • Fixed a bug in ld(1) that caused it to crash when tracing - undefined symbols with the -Y option, which was introduced in - cctools-528.3 with the change to Radar 3737622. (Radar bug - #3797052).
  • - -
  • Fixed a problem with ld(1)'s -dead_strip option producing - binaries that gdb(1) was having trouble debugging. (Radar bug - #3739451).
  • -
- -
Changes since the last release (cctools-528.3 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • Changed the filesize and fileoff fields of the struct - segment_command_64 structure to be 64-bits. (Radar bug - #3781406).
  • - -
  • Fixed a build problem building libkld for the kernel. (Radar - bug #3782212).
  • - -
  • Changed the assember to not use the new section difference - relocations to local symbols when -static is specified, which - allows kernel extensions to be compatible for linking on older - systems. (Radar bug #3753904).
  • -
- -
Changes since the last release (cctools-528.2 for -the 5.17 Mac OS X Xcode 2.0 Developer release)
- -
    -
  • The static link editor no longer searches indirectly - referenced shared libraries when -twolevel_namespace is in effect. - (Radar bug #3737622).
  • -
- -
Changes since the last release (cctools-528 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Allowed duplicate symbols in kexts. (Radar bug #3633627).
  • - -
  • Fixed handling of forward labels in the 64-bit assembler. - (Radar bug #3757398).
  • -
- -

Notes Specific to Release 5.16 (Mac OS X Xcode 1.5 Developer -Release)

- -

New Features

- -

The static linker has an option to do dead code -stripping

- -

See the Public release notes for the details.

- -
Changes since the last release (cctools-527 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added support for section difference relocations to local - symbols inside procedures referenced by a globally visible - coalesced symbol, on i386. (Radar bug #3744821).
  • -
- -
Changes since the last release (cctools-526 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added the structures for 64-bit Mach-O files to the Mach-O - headers. (Radar bug #3742429).
  • - -
  • The assembler was made faster. (Radar bug #3739375).
  • - -
  • The checksymb(1) tool once again has a what(1) string. (Radar - bug #3746707).
  • - -
  • Added support for section difference relocations to local - symbols inside procedures referenced by a globally visible - coalesced symbol, on powerpc. (Radar bug #3744821).
  • -
- -
Changes since the last release (cctools-525 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a missed worded linker error message where the - -flat_namespace flag is mentioned as -flatname_space. (Radar bug - #3743186).
  • - -
  • Changed the Mach-O headers need to be 64-bit clean. (Radar bug - #3742429).
  • - -
  • Changed the cctools sources to compile without warnings and - the 64-bit clean Mach-O headers. (Radar bug #3744082).
  • - -
  • Fixed the mispelling of 'meaningless' in linker error message. - (Radar bug #3739217).
  • - -
  • Added the -V flag to libtool(1) to print its version - information. (Radar bug #3738616).
  • - -
  • Added support for the i386 3DNow! instructions to the - assembler and otool(1)'s disassembler. (Radar bug #3737535).
  • -
- -
Changes since the last release (cctools-524 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Changed the static link editor, ld(1), to link output files - for use by the dynamic linker faster. (Radar bug #3728427).
  • -
- -
Changes since the last release (cctools-523 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Changed the static link editor, ld(1), to not create scattered - relocation entried in output files for use with the dynamic - linker. And also to disable prebinding when the output is too - large that it would run into the limitation of the 24-bit - r_address field of scattered relocation entries. (Radar bug - #3451378).
  • - -
  • Fixed the otool(1) command's -fv output so that it does - not print (illegal duplicate architecture) and take a long - time producing the output on a two-way fat file. (Radar bug - #3709358).
  • - -
  • Fixed the strip(1) command that caused it to crash when run - with no options on a the dynamic linker.(Radar bug #3697374).
  • - -
  • Fixed a bug in selecting an i386 architecture from fat file - that only contained a i686 architecture which would cause ld(1) to - think the file was a bad Mach-O file. (Radar bug #3694812).
  • -
- -
Changes since the last release (cctools-522 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a bug in the Power PC assembler that would cause it to - incorrectly assemble lwa instructions. Radar bug #3687246.
  • -
- -
Changes since the last release (cctools-521 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a bug in the interum ppc64 assembler that would cause it - to incorrectly generate an error about a missing expression. Radar - bug #3682374.
  • - -
  • Changed how otool(1) gets built so it will build in the - current B&I Tiger BuildRoot with libc changes from 3535291. - Radar bug #3685865.
  • -
- -
Changes since the last release (cctools-520 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Changed where the public release notes get installed. They are - now installed in the directory /Developer/ADC Reference - Library/releasenotes/DeveloperTools. Radar bug #3678389.
  • -
- -
Changes since the last release (cctools-519 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added the cmovnz instruction as an equivalent to cmovne for - the i386 assrmbler. Radar bug #3345900.
  • - -
  • Fixed otool(1)'s disassembly of the i386 assrmbler movdq2q - instruction. (Radar bug #3488840).
  • - -
  • Fixed otool(1)'s disassembling the move word to accumulator - i386 nstructions. (Radar bug #3515794).
  • - -
  • Fixed typos in the ld(1) man page. (Radar bug #3545222).
  • - -
  • Fixed a bug in ld(1)'s relocation of jbsr pseudo instructions - in multi-module dynamic libraries which was are not correctly - setting to branch to the true target when the branch reaches. - (Radar bug #3545578).
  • - -
  • Added the -v flag to ld(1) to print its version information. - (Radar bug #3557760).
  • - -
  • Fixed libtool(1)'s printing of logging file names when -static - is used when the environment variable RC_TRACE_ARCHIVES is set so - that it prints out the path returned by realpath(3). (Radar bug - #3585834).
  • - -
  • Fixed libsyminfo so it will not crash if it encounters a - binary that contains an unknown architecture. (Radar bug - #3590209)
  • - -
  • Fixed the kld(3) man page to correctly reference kextload(8) - not the obsoleted kmodload(8). (Radar bug #3633604).
  • - -
  • Fixed the strip(1) command when run with no options on a - dynamic library so that it does not produce a malformed - file.(Radar bug #3641669).
  • - -
  • Fixed a bug in otool(1) that caused it to crash when run on - Java class files. (Radar bug #3670740).
  • - -
  • Fixed a bug in ld(1) when the -dead_strip option that was - always stripping static symbols in symbol stub and symbol pointer - sections. (Radar bug #3669400)
  • - -
  • Changed libtool(1) to take and pass along ld(1)'s - -executable_path flag. (Radar bug #3489733).
  • - -
  • Added the.machine directive to the assembler. (Radar bug - #3492132)
  • - -
  • Fixed a bug in ld(1) when -x and -bundle were used when - linking objects with private extern coalesced symbols. This would - result in bad bundle output files that would crash when used. - (Radar bug #3464004).
  • - -
  • Fixed a bug in ld(1) when -s was used on an executable output - file that could produce bad indirect symbol table entries. (Radar - bug #3534709).
  • - -
  • Changed the PowerPC assembler to allow the streaming dcbt - instructions without the -force_cpusubtype_ALL flag. (Radar bug - #3468847).
  • - -
  • Changed ld(1) when the -sectorder option is used so that the - symbols not listed in the order file will be linked in the order - they appeared in the input .o files. (Radar bug #3382272).
  • - -
  • Fixed a bug in the assembler that could cause it to generate - bad relocation entries if the .o file had a relocatable item after - more than 16megs of code or data in the same section. (Radar bug - #3604972).
  • - -
  • Changed ld(1)'s -sectorder file format to treat lines that - start with a # as a comment. (Radar bug #3360823)
  • - -
  • Changed the i386 assembler to allow the prefetcht0, - prefetcht1, prefetcht2 and prefetchnta instructions without the - -force_cpusubtype_ALL flag. (Radar bug #3500323).
  • - -
  • Fixed a typo in install_name_tool(1) man page. (Radar bug - #3501918).
  • - -
  • Changed the PowerPC assembler to allow the frsqrte and fres - instructions without the -force_cpusubtype_ALL flag. (Radar bug - #3519365).
  • - -
  • Fixed a memory leak in libsyminfo. (Radar bug #3554267).
  • - -
  • Removed a warning in the static linker, ld(1), when the - -dead_strip option is used that generated a warning saying that - -gused was used to compile a .o file and -gfull should be used - even though -gfull was used. (Radar bug #3663248).
  • - -
  • Fixed a bug in the assembler when a .private_extern directive - for a symbol was seen before an assignment of the symbol to an - absolute value that resulted in the symbol not being marked as a - private extern symbol. (Radar bug #3660818).
  • - -
  • Changed the tools that produce archive table of contents, - libtool(1) and ranlib(1), as well as the static linker, ld(1), to - no longer warn about creating or using an archive with multiple - members defining the same symbol. (Radar bug #3653845).
  • - -
  • Fixed a bug with ld(1) -s produced executables having invalid - indirect symbol table entries for stripped symbols.(Radar bug - #3534709).
  • -
- -
Changes since the last release (cctools-518 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a problem with the cctools project not installing all of - its man pages.
  • -
- -
Changes since the last release (cctools-517 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a problem with the cctools project not installing all of - its man pages when RC_RELEASE is not set.
  • -
- -
Changes since the last release (cctools-516 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a problem with the cctools project not installing all of - its headers when RC_RELEASE is not set.
  • -
- -
Changes since the last release (cctools-515 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed the cctools project to for the change in Radar bug - #3639836 to install the dynamic linker and other pieces for the - MuonPrime RC_RELEASE. (Radar bug #3657739).
  • -
- -
Changes since the last release (cctools-514 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added the installGASsrc and fromGASsrc Makefile targets to - install and build just the PowerPC assembler from the GAS sources. - (Radar bug #3657295).
  • -
- -
Changes since the last release (cctools-513 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a build problem with cctools' "mach/machine.h" header - file not containing the typedef for cpu_threadtype_t.
  • -
- -
Changes since the last release (cctools-512 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Changed the cctools project to no longer install the dynamic - linker, /usr/lib/dyld, and the header files <mach-o/dyld.h>, - <mach-o/dyld_gdb.h> and <mach-o/dyld_priv.h> as well - as the man pages dyld(1), dyld(3), NSModule(3), - NSObjectFileImage(3) and NSObjectFileImage_priv(3). (Radar bug - #3639836).
  • - -
  • Integrated the changes from cctools-495.8 in Mac OS X 10.3.4 - (Radar bug #3650224).
  • -
- -
Changes since the last release (cctools-511 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed bug in the static linker that cause it to crash when the - -dead_strip option was used with -preload output files. (Radar bug - #3649317).
  • - -
  • Fixed a bug that cuased strip(1) an other tools that created - archive libraries to not correctly set the time stamp on the - archive resulting in ld(1) thinking the archive's table of - contents was out of date. (Radar bug #3645280).
  • - -
  • Fixed bug in the static linker that caused it to generate an - internal error when referencing an undefined symbol from a - coalesced section that is defined in another .o file as a global - coalesced symbol. (Radar bug #3644011).
  • - -
  • Removed a debugging print statement in ld(1) (Radar bug - #3643349).
  • - -
  • Fixed bug in the static linker when the -dead_strip option was - used that caused it to generate an internal error (Radar bug - #3643111).
  • - -
  • Fixed bug in the static linker when the -dead_strip option and - the -s option was used that caused it to generate an internal - error (Radar bug #3639490).
  • - -
  • Change the compiler tools project to install the - redo_prebinding(3) man page as a local man page. (Radar bug - #3638779).
  • - -
  • Fixed the compiler tools release notes for -arch ppc64 to say - -dynamic binaries are not supported. (Radar bug #3638698).
  • - -
  • Integrated the changes from cctools-495.7 in Mac OS X 10.3.4 - (Radar bug #3629498).
  • -
- -
Changes since the last release (cctools-510 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed bug in the static linker when the -dead_strip option - that caused some things not to be aligned correctly. This would - happen for things that used assembler temporary labels such as - compiler generated altivec constants (Radar bug #3625632).
  • -
- -
Changes since the last release (cctools-509 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Integrated the changes from cctools-495.6 in Mac OS X 10.3.4 - (Radar bug #3630920).
  • -
- -
Changes since the last release (cctools-508 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Integrated the changes from cctools-499.4 for the interium - -arch ppc64 architecture.
  • -
- -
Changes since the last release (cctools-507 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Integrated the changes from cctools-495.[345] in Mac - OS X 10.3.4.
  • -
- -
Changes since the last release (cctools-506 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed another bug in the static linker when the -dead_strip - option is used with object files containing multiple gobal symbols - at the same address. This too caused ld(1) produce files that - would crash due to incorrectly dead stripping (Radar bug - #3625582).
  • -
- -
Changes since the last release (cctools-505 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a bug in the static linker when the -dead_strip option - is used with object files containing multiple gobal symbols at the - same address. This caused ld(1) produce files that would crash due - to incorrectly dead stripping (Radar bug #3625582).
  • -
- -
Changes since the last release (cctools-504 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a bug in the static linker when the -dead_strip option - is used with object files containing indirect symbol table entries - that are INDIRECT_SYMBOL_LOCAL or INDIRECT_SYMBOL_ABS that caused - ld(1) to crash or produce files that would crash due to - incorrectly dead stripping live blocks (Radar bug #3625527)
  • - -
  • Fixed a bug in the static linker when the -dead_strip option - is used with C++ that caused it to incorrectly point an error - message about an illegal reference into a stub section (Radar bug - #3625527).
  • -
- -
Changes since the last release (cctools-503 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added the environment variable LD_DEAD_STRIP_DYLIB which - causes -dead_strip to specified for all ld(1) commands that have - the -dylib option specified.
  • - -
  • Fixed a problem with the cctools source that would not build - the kld libraries (Radar bug #3625471).
  • -
- -
Changes since the last release (cctools-502 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed problems linking with the kld libraries getting - undefined symbols caused by the changes to the code base for dead - code stripping. (Radar bug #2284500).
  • -
- -
Changes since the last release (cctools-501 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a bug in the static link editor with the use of - -dead_strip and -prebind that caused an internal error. (Radar bug - #2284500).
  • - -
  • Fixed a bug in the static link editor with the use of - -dead_strip that in some cases would incorrectly produce a warning - message about "symbol appears more than once in the same file". - (Radar bug #2284500).
  • - -
  • Fixed a bug where common symbols were not correctly dead - stripped if a -sectorder file was not used. (Radar bug - #2284500).
  • - -
  • Added support for -dead_strip for i386 and m68k - architectures.
  • -
- -
Changes since the last release (cctools-500 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added support for the new subsections_via_symbols - assembler directive to mark objects ok to divide their section - contents via symbols. Objects without this mark have their - sections kept whole if anything in the section is live. (Radar bug - #2284500).
  • - -
  • Fixed a bug in the assembler that would cause an incorrect - symbol re-definition error if a .no_dead_strip directive was used - before a .comm directive for the same symbol. (Radar bug - #2284500).
  • -
- -
Changes since the last release (cctools-499.4 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added dead code stripping to the static linker, ld(1), with - the new flag -dead_strip (see the Public release notes for - the details ). Also the new flag - -no_dead_strip_inits_and_terms causes all constructors and - destructors to never be dead code stripped. (Radar bug - #2284500).
  • -
- -
Changes since the last release (cctools-499.3 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Removed the partial support for -arch ppc64-970.
  • -
- -
Changes since the last release (cctools-499.2 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Fixed a bug in the static linker, ld(1), that caused it to - generate an error message about malformed objects when linking - ppc64 objects with -r. (Radar bug #3594978).
  • - -
  • Fixed a bug in the assembler with handling of integer - expressions when hosted on i386. (Radar bug #3591543).
  • - -
  • Added a definition of _NSGetProgname() in dyld to resolve a - dyld link failure due to changes in Libc-327. (Radar bug - #3593079).
  • -
- -
Changes since the last release (cctools-499.1 for -the 5.16 Mac OS X Xcode 1.5 Developer release)
- -
    -
  • Added a dummy definition of __cxa_finalize() in dyld to - resolve a dyld link failure due to changes in Libc-326. (Radar bug - #3586910).
  • -
- -
Changes since the last release (cctools-499 for -the 5.15 Mac OS X Xcode 1.2 release)
- -
    -
  • Added support for the interium -arch ppc64 architecture (LP64 - code gen in a Mach-O 32-bit file). (Radar bugs #3562133 and - #3562232).
  • -
- -

Notes Specific to Release 5.15 (Mac OS X Xcode 1.2 Release)

- -
Changes since the last release (cctools-498 for -the 5.14 Mac OS X December 2003 Developer release)
- -
    -
  • Fixed a bug in the static linker, ld(1), that caused it to - generate an internal error message about the count of local - relocation entries does not matching when jbsr pseudo instructions - were used when creating a dynamic library. (Radar bug - #3518096).
  • -
- -

Notes Specific to Release 5.14 (Mac OS X December 2003 Developer -Release)

- -
Changes since the last release (cctools-497 for -the 5.14 Mac OS X December 2003 Developer release)
- -
    -
  • Added the PowerPC pseudo-instruction jmp as the - non-linking form of jbsr. (Radar bug #3458928).
  • -
- -
Changes since the last release (cctools-496 for -the 5.14 Mac OS X December 2003 Developer release)
- -
    -
  • Changed the assembler to accept the --gstabs option to be the - same as the -g option and treat the --gdwarf2 option as an unknown - option. (Radar bug #3411071).
  • - -
  • Change the libtool(1) command to pass the - -prebind_allow_overlap on to ld(1). (Radar bug #3452484).
  • - -
  • Fixed a bug in the static linker, ld(1), that caused it to - generate an error message about relocation entries in read-only - sections when jbsr pseudo instructions were used when creating a - dynamic library. (Radar bug #3452964).
  • -
- -
Changes since the last release (cctools-495 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Added the value 10.4 to be one of the known values allowed for - environment variable MACOSX_DEPLOYMENT_TARGET (Radar bug - #3445632).
  • - -
  • Changed the cctools project to include the FSF COPYING file at - the top level of the assembler. (Radar bug #3443583).
  • - -
  • Changed seg_addr_table(3) so it does not reserves more space - than necessary for flat dylibs. (Radar bug #3440884).
  • - -
  • Changed NSModule(3) man page so NSLinkModule states you need - to pass the image path as the module name if you want to use - gdb(1) on it (Radar bug #3408768).
  • - -
  • Changed the header file <mach-o/dyld.h> so the API's - introduced in 10.3 are marked with the AvailabilityMacros (Radar - bug #3401910).
  • - -
  • Changed ld(1) to call realpath(3) on the filenames printed - with RC_TRACE_ARCHIVES. (Radar bug #3443289).
  • -
- -

Notes Specific to Release 5.13.2 (Mac OS X 10.3.4 Release)

- -
Changes since the last release (cctools-495.7 for -the 5.13.1 Mac OS X 10.3.3 release)
- -
    -
  • Fixed a bug that was caused by the changes to dyld in - cctools-495.3 for Radar bug #3622330 that would cause undefined - symbols errors. (Radar bug #3650224).
  • -
- -
Changes since the last release (cctools-495.6 for -the 5.13.1 Mac OS X 10.3.3 release)
- -
    -
  • Fixed a bug that was caused by the changes to dyld in - cctools-495.3 for Radar bug #3622330 that would not correctly - fully bind symbols and modules. (Radar bug #3629498).
  • -
- -
Changes since the last release (cctools-495.5 for -the 5.13.1 Mac OS X 10.3.3 release)
- -
    -
  • Fixed a bug that was caused by the changes to dyld in - cctools-495.3 for Radar bug #3622330 that would cause private - bundles to fail to load if they had mutiply defined symbols (Radar - bug #3626905).
  • -
- -
Changes since the last release (cctools-495.4 for -the 5.13.1 Mac OS X 10.3.3 release)
- -
    -
  • Fixes a bug that was caused by the changes to dyld in - cctools-495.3 for Radar bug #3622330 that would cause a crash in - apps that were built ld(1) -s and the un fixed bug 3534709. The - work around for this bug had a logic error (Radar bug - #3627380).
  • - -
  • Fixed a bug that was caused by the changes to dyld in - cctools-495.3 for Radar bug #3622330 that would cause a crash in - dyld when there were unused non-lazy symbols in a multi-module - dynamic library (Radar bug #3625797).
  • -
- -
Changes since the last release (cctools-495.3 for -the 5.13.1 Mac OS X 10.3.3 release)
- -
    -
  • Changes were made to dyld that improve launch times. (Radar - bug #3622330).
  • -
- -
Changes since the last release (cctools-495.2 for -the 5.13.1 Mac OS X 10.3.3 release)
- -
    -
  • Added the unprebind(3) API to libredo_prebinding and - the -u option to the redo_prebinding(1) command. - (Radar bug #3176679).
  • - -
  • Added the -seg1addr hex_addeess option to to the - redo_prebinding(1) command to specify the address of a - dynamic shared library. (Radar bug #3176679).
  • - -
  • Added the -s option to to the redo_prebinding(1) - command to cause it to write its output to standard output, rather - than to an output file. (Radar bug #3176679).
  • -
- -

Notes Specific to Release 5.13.1 (Mac OS X 10.3.3 Release)

- -
Changes since the last release (cctools-495 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in dyld that was causing it not to trigger - fix_prebinding. (Radar bug #3489918).
  • -
- -

Notes Specific to Release 5.13 (Mac OS X 10.3)

- -
Changes since the last release (cctools-494 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Changed the default headerpad in ld(1) when it creates a - prebound executable to be 3 times instead of 6 times the size of - its LC_PREBOUND_DYLIB load commands so it has a better chance of - its prebinding being able to be redone if the dependent libaries - change and does not increase the size of the file as much. (Radar - bug #3410151).
  • -
- -
Changes since the last release (cctools-493 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Changed the default headerpad in ld(1) when it creates a - prebound executable to be 6 times the size of its - LC_PREBOUND_DYLIB load commands so it has a better chance of its - prebinding being able to be redone if the dependent libaries - change. (Radar bug #3410151).
  • -
- -
Changes since the last release (cctools-492 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in the redo_prebinding(1)(3) code that would cause - an error if an indirectly dependent library changed its install - name. (Radar bug #3408696).
  • -
- -
Changes since the last release (cctools-491 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Changed the seg_addr_table(1) tool to assign addresses for - _debug and _profile libraries addresses to start at 0x40000000 - through lower addresses. (Radar bug #3360593).
  • - -
  • Fixed a bug in the seg_addr_table(1) tool where the bounds - checking of an assigned address would be allowed when it shouldn't - have been if the library entirely fit inside a reserved region. - (Radar bug #3359505).
  • -
- -
Changes since the last release (cctools-490 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in the dynamic linker in the code that implements - of the API NSLookupSymbolInImage() that can cause it to crash when - looking up a symbol in a bundle when another thread is still - loading that bundle. (Radar bug #3393517).
  • -
- -
Changes since the last release (cctools-489 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed problems dealing with ppc970 cpusubtype binaries being - incorrectly selected when not on a G5 for execution and not being - selected when building and linking with a fat file containing only - a ppc970 object file. (Radar bug #3387962).
  • -
- -
Changes since the last release (cctools-488 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Change the code for otool(1) to have stub versions of the - notify API so it will build. (Radar bug #3378781).
  • -
- -
Changes since the last release (cctools-487 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a problem with the ld(1) man page where the description - of -weak_framework got incorrectly inserted in the description of - -framework. (Radar bug #3375695).
  • - -
  • Updated the source code in the cctools project to the APSL - 2.0. (Radar bug #3369348).
  • - -
  • Change the code in the dynamic linker to define its own - version of gettimeofday() so it will build with the latest Libc - and Libnotify projects. (Radar bug #3375399).
  • -
- -
Changes since the last release (cctools-485 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in the dynamic linker that would cause incorrectly - relocate items causing the program to crash. (Radar bug - #3364959).
  • - -
  • Fixed a bug in the PowerPC assembler that would cause it to - print an error message when it sees a 64-bit compare instruction - or optional instructions the 970 implements even though -arch - ppc970 was specified. (Radar bug #3364523).
  • -
- -
Changes since the last release (cctools-485 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Added the environment variable - DYLD_PRINT_LIBRARIES_POST_LAUNCH as an option to the dynamic - linker that cause it to print out the dynamic libraries that are - loaded after the program reaches its entry point. (Radar bug - #3342354).
  • -
- -
Changes since the last release (cctools-484 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed some bugs in the static linker that would cause it to - not mark an umbrella library or framework weak when it was linked - with -weak_framework when the program used symbols just from the - umbrella framework's sub-frameworks. (Radar bug #3337262).
  • -
- -
Changes since the last release (cctools-483 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in the static linker that would cause it to print - an error message when the argument to -bundle_loader contained a - non default stack. (Radar bug #3329902).
  • - -
  • Fixed a bug in the dynamic linker that would cause it to crash - if a weak library in an umbrella library or framework was missing. - (Radar bug #3328875).
  • -
- -
Changes since the last release (cctools-482 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in the static linker that would cause it to print - a malloc(3) warning if a -lx option were used when the string x - ends in a dot followed by a single character. (Radar bug - #3285575).
  • - -
  • Fixed a bug in the libtool(1) command when using the - -weak_framework and -weak_library options that was causing it to - incorrecly produce an error. (Radar bug #3318491).
  • - -
  • Change the libtool(1) command to pass the ld(1) -m option on - to ld(1). (Radar bug #3305123)
  • -
- -
Changes since the last release (cctools-481 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Added the SPI NSFindSectionAndOffsetInObjectFileImage() to the - new file <mach-o/dyld_priv.h>. (Radar bug #3318440).
  • -
- -
Changes since the last release (cctools-480 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Fixed a bug in the optimization of trying to use prebound - libraries post-launch into programs that were built with - -prebind_all_twolevel_modules when loading bundles that was taking - uneeded time. (Radar bug #3303038).
  • -
- -
Changes since the last release (cctools-479 for -the 5.13 Mac OS X 10.3 release)
- -
    -
  • Changed the kld(3) and rld(3) load calls to zero out the - alignment of existing sections before loading the specified - objects takes place. (Radar bug #3261751).
  • -
- -
Changes since the last release (cctools-478 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added the -executable_path path_name option to - the static linker where path_name is is used to replace - @executable_path for dependent libraries. (Radar bug - #3278995).
  • - -
  • Fixed the error message in dyld for multiply defined symbols - to use the physical name not the logical name of the modules - defining the symbols. (Radar bug #3295565).
  • -
- -

Notes Specific to Release 5.12 (Mac OS X June 2003 Developer -Release)

- -
Changes since the last release (cctools-477 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in dyld that was causing things to be doublely - relocated and causing programs to crash. (Radar bug - #3274768).
  • -
- -
Changes since the last release (cctools-476 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added the new PowerPC assembler mnemonic "dcbzl" to be the - same as "dcbz128" and changed the assembler to disassemble this as - "dcbzl". (Radar bug #3270067).
  • - -
  • Added the kld_set_link_options() to the kld library to contol - the stripping of the generated files. (Radar bug #3270588).
  • - -
  • Changed the source of the cctools project to allow it to build - with Libc-302 by stubbing out the functions __fpclassifyd(), for - PowerPC and __fpclassify() for i386. (Radar bug #3271830).
  • -
- -
Changes since the last release (cctools-475 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in the otool(1)'s i386 disassembly of some of the - movq instructions where it was not printing the mnemonic. (Radar - bug #3268255).
  • -
- -
Changes since the last release (cctools-474 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Updated the assembler man page, as(1) and the arch(3) man - page. (Radar bug #3265334).
  • - -
  • Fixed The Data Cache Block Touch Instruction variant with the - TH field so it is 4 bits and marked as a 64-bit instruction. - (Radar bug #3265411).
  • -
- -
Changes since the last release (cctools-473 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug the libredo_prebinding(3) code that caused it to - leak memory when run on system with partially fat files. (Radar - bug #3144803).
  • -
- -
Changes since the last release (cctools-472 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug the static linker that can cause it to crash when - linking with large dynamic libraries. (Radar bug #3255992).
  • -
- -
Changes since the last release (cctools-471 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed the libkld routines so that symbol files for kernel - extensions for i386 can be built on ppc. (Radar bug - #3251273).
  • - -
  • Fixed a bug in the i386 assembler where it used the incorrect - operand for the movq instruction so that the source & - destination got reversed. (Radar bug #3250086).
  • - -
  • Fixed a bug in the seg_addr_table(1) tools that when the - -relayout option is used it did not set the <<< Next - split address to assign >>> properly. . (Radar bug - #3245958).
  • -
- -
Changes since the last release (cctools-470 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in the dynamic linker that caused it to crash if a - symbol is undefined that is using -undefined dynamic_lookup when - trying to print out the name of the undefined symbol. (Radar bug - #3246167).
  • - -
  • Fixed a bug in the kld libraries where the code that was not - ignoring the alignment of non-regular non-zerofill sections from - the base file. (Radar bug #3245534).
  • - -
  • Backed out the change made in ld(1) to call _exit instead of - exit() done for Radar bug #3245341 as it does not correctly flush - the output buffers. (Radar bug #3245341).
  • - -
  • Changed the dynamic linker so that when the private - LINK_OPTION_RELOC_JUST_THIS_MODULE option to NSLinkModule() is - used the undefined handler gets the last undefined symbol not the - first. (Radar bug #3243939).
  • - -
  • Fixed a bug in the dynamic linker where it incorrectly stopped - trying to use prebound libraries after a launch if a plugin was - loaded that was out of date with respect to its libraries. (Radar - bug #3243961).
  • -
- -
Changes since the last release (cctools-469 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added the private LINK_OPTION_RELOC_JUST_THIS_MODULE option to - NSLinkModule() to be used by ZeroLink to improve the performance - by avoid spending time filling in the indirect symbol pointers for - anything but the new image. (Radar bug #3235113).
  • - -
  • Added the strip(1) option -c to create create stub - libraries from dynamic libraries by stripping the section - contents. (Radar bug #3235093).
  • - -
  • Improved the interface between the dynamic linker and debugger - so that the debugger spends less time reading the state of the - dynamic linker, especially for ZeroLink. (Radar bug - #3233782).
  • - -
  • Added the ld(1) option -search_paths_first . When - specified and -dynamic is in effect this casuses ld(1) to - search for files for -lx arguments in each library - search path for libx.dylib then libx.a before searching the next - library search path. (Radar bug #3176974).
  • - -
  • Changed ld(1) to call _exit instead of exit(). (Radar bug - #3245341).
  • -
- -
Changes since the last release (cctools-468 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added the ld(1) options -weak_framework, - -weak_library and -weak-l to force a dynamic library - and all references to it to be marked as weak imports. (Radar bug - #3069758).
  • - -
  • Changed the dynamic linker's internal inline strcmp to have - the correct GNU asm constrains. (Radar bug #3225099)
  • - -
  • Fixed a bug in seg_addr_table(1) that caused it to crash - introduced in cctools-464. (Radar bug #3225931).
  • - -
  • Fixed a bug in the assembler's .p2align directive when used - with no fill expression that did not fill with no-op instructions - when appropriate. (Radar bug #3227897).
  • - -
  • Fixed a problem with the fix to Radar bug #3208399 that caused - an incorrect "malformed object" error on a dynamic shared library - with the opposite byte sex of the host machine. (Radar bug - #3228664).
  • - -
  • Added private callbacks in the dynamic linker so ZeroLink can - help locate definitions faster. (Radar bug #3229077).
  • -
- -
Changes since the last release (cctools-467 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in the compiler tools that caused the static link - editor, ld(1), to mess up the static branches that were predicted - using the Y-bit in cases it changed the sign of the displacement. - (Radar bug #3223045).
  • - -
  • Fixed a bug in the static link editor, ld(1), when linking - against stub libraries it would incorrectly record the dependent - libraries of the stub libraries. This caused library ordinals for - undefined symbols to be incorrect causing the program to fail to - run with an error from the dynamic linker saying it can't find a - symbol from the incorrecly recorded library. (Radar bug - #3220772).
  • -
- -
Changes since the last release (cctools-466 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Changed the assember to allow .section directives with - diffenent attributes. (Radar bug #3218644).
  • - -
  • Changed the compiler tools to allow section difference - relocations with PowerPC load/store double instructions. (Radar - bug #3218027).
  • -
- -
Changes since the last release (cctools-465 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in nm(1), and other object tools, that could cause - it to crash on a malformed dynamic library with bad module table - entries. (Radar bug #3208399).
  • - -
  • Added the -undefined dynamic_lookup option to - ld(1) to allow two-level namespace images to have their - remaining undefined symbols marked to be dynamically looked up at - runtime. This option is only allowed when MACOSX_DEPLOYMENT_TARGET - is set to 10.3 or greater (since this requires a new - version of dyld). As such this option is not described yet in the - public compiler tools release notes. (Radar bug #3210803).
  • - -
  • Fixed the problem with gprof(1) crashing introduced when - fixing warnings in the code in cctools-464 (Radar bug - #3212306).
  • - -
  • Added the -undefined define_a_way option to - ld(1) as a work a round to not having dead-code stripping - that also strips out references to undefined symbols from the dead - code. Which leads to link time failures due to undefined symbols. - With this option ld(1) defines the remaining undefined - symbols as private definitions and allows the link to succeed. The - program then runs as long as it does not use any of the undefined - symbols. (Radar bug #3216770).
  • - -
  • Fixed a bug in libtool(1) when the -static - option is used to create an archive library that caused it to - crash when the input object files do not contain symbols that will - be in the archive table of contents. (Radar bug #3217471).
  • -
- -
Changes since the last release (cctools-465 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added the .p2align[wl] directives to the assembler - which take the form: - -
      -
    • .p2align[wl] align, [fill[, - max_bytes_to_fill]]
    • -
    - -

    and allows a maximum number of bytes to fill to be specified. - (Radar bug #3207027).

  • - -
  • Fixed a bug in otool(1)'s disassembly of "movd -12(%ebp), - %mm0" which was disassembling incorrectly without the - displacement. (Radar bug #3206331).
  • - -
  • Changed the dynamic link editor to align its stack on a 16 - byte (SSE2) boundary. (Radar bug #3204580).
  • - -
  • Changed the static link editor's handing of begin include/end - include stab groups (BINCL/ENCL) such that if the starting BINCL - has a non-zero checksum it is preserved and then the static link - editor does not calculate the a checksum for the group. (Radar bug - #3201935).
  • - -
  • Fixed the assembler's - -
      -
    • .fill repeat_expression , fill_size , fill_expression
    • -
    - -

    directive where for a fill_size of anything but 1 it was is - broken. (Radar bug #3201031).

  • -
- -
Changes since the last release (cctools-464 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a spelling error in <mach-o/loader.h> in the - MH_NOMULTIDEFS comment. (Radar bug #3198288).
  • - -
  • Added the API NSHasModInitObjectFileImage() to - <mach-o/dyld.h>. (Radar bug #3196951).
  • - -
  • Updated the cctools-464 project to build with gcc-3.3.
  • -
- -
Changes since the last release (cctools-462 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added support for dynamic shared library stubs. (Radar bug - #3193744).
  • - -
  • Implemented the NSGetSectionDataInObjectFileImage() API which - was previously stubbed out. (Radar bug #3194204).
  • -
- -
Changes since the last release (cctools-461 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Added the new NSLINKMODULE_OPTION_TRAILING_PHYS_NAME option to - the NSLinkModule(3) to allow ZeroLink so it can specify both the - logical name of the image and the physical name of the object file - . (Radar bug #3190599).
  • - -
  • Fixed a problem with the static linker not correctly detecting - the case when the relocated displacement of 14-bit PowerPC branch - instruction did not reach. (Radar bug #3190434).
  • -
- -
Changes since the last release (cctools-460 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in install_name_tool(1) that caused it to crash - when changing the shared library names to shorter names. (Radar - bug #3161586).
  • - -
  • Changed the assembler to allow for the code generation for - fix-n-continue to use symbol pointers for local symbols. (Radar - bug #3182683).
  • - -
  • Added the new NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES - option to the NSLinkModule(3) to not run module initializers to be - used for fix-n-continue. (Radar bug #3183011).
  • - -
  • Fixed the building of libdyld so that it can be linked against - without getting an out of date table of contents error. (Radar bug - #3183053).
  • -
- -
Changes since the last release (cctools-459 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Install the Tachyon special pre-release of dyld for zero-link - in - /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/Resources/dyld. - (Radar bug #3180833).
  • - -
  • Implemented the following API's
    - NSSymbolDefinitionCountInObjectFileImage
    - NSSymbolDefinitionNameInObjectFileImage
    - NSSymbolReferenceCountInObjectFileImage
    - NSSymbolReferenceNameInObjectFileImage
    - NSIsSymbolDefinedInObjectFileImage
    - which were previously stubbed out. (Radar bug #3179011).
  • - -
  • Fixed a bug in the dynamic linker so that when the undefined - handler loaded the needed symbol it would correctly check to see - if there were any more undefined symbols and if not resume the - program instead of exit. (Radar bug #3178607).
  • -
- -
Changes since the last release (cctools-457 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Change the i386 assembler to not treat the pause instruction - as optional so it can be assembled without requiring - -force_cpusubtype_ALL (Radar bug #3173226).
  • -
- -
Changes since the last release (cctools-456 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Implemented NSCreateObjectFileImageFromMemory() which was - previously stubbed out. (Radar bug #3131622).
  • - -
  • Fixed a bug in the static link editor that was not removing - the symbol stubs of private extern coalesced symbols when creating - a single module dynamic library. (Radar bug #3163714).
  • -
- -
Changes since the last release (cctools-455 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Changed the environment variable XBS_TRACE_BUNDLE_LOADER to - LD_TRACE_BUNDLE_LOADER. Radar bug #3152604).
  • - -
  • Picked up the internal libsyminfo library which has API to - extract export/import information from Mach-O files. (Radar bug - #3145742).
  • - -
  • Backed out the change to the dynamic linker to force any - module containing an initialization or termination routine to be - fully bound when any symbol in the module is bound. This caused - launch time regressions in programs not built with - -prebind_all_twolevel_modules. (Radar bug #3158070).
  • - -
  • Fixed a bug in the dynamic linker that caused loading a bundle - into a program that is built with -prebind_all_twolevel_modules to - crash. (Radar bug #3148967).
  • - -
  • Fixed a bug in the redo_prebinding(3) API that incorrectly - caused a error return in the case that there is a fat file that - the architecture we don't care about which depends on a library in - another fat file and the time stamps for the libraries don't match - instead of ignoring it as it should. (Radar bug #3144552).
  • -
- -
Changes since the last release (cctools-454 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Changed the seg_addr_table(1) tool to no longer require that - the actual path of a dynamic library equals the install name of - the dynamic library (Radar bug #3147668).
  • - -
  • Fixed a bug in the redo_prebinding code that would cause it to - not correctly set the bits in the linked_module bit vector for - modules referenced via private externs (Radar bug #3126383).
  • -
- -
Changes since the last release (cctools-453 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in otool(1)'s i386 disassembler when disassembling - an instruction with a bad segment register encoding that caused it - to crash (Radar bug #3144846).
  • - -
  • Fixed a bug in ld(1) when using the -m flag when there are - multiply defined private external symbols that cause an internal - error. (Radar bug #3143764).
  • - -
  • Change the assembler's .include directive to automatically - find files in the same directotry as the file including it if - assembled in a different directory (Radar bug #3139454).
  • - -
  • Change the assembler to no longer have a fixed sized input - buffer so it can assembler the very long stabs lines generated by - the compiler (Radar bug #3138898).
  • - -
  • Updated the prebinding release notes to reflect the change of - the range of split address libraries from 10.1 to 10,2. (Radar bug - #3135553).
  • - -
  • Fixed a bug in the seg_addr_table(1) tool that did not - correctly generate an error message when a split library was - allocated an address in the alternate area. (Radar bug - #3138181).
  • - -
  • Fixed a bug in ld(1) when using the -i flag with a private - external symbol that cause an internal error. (Radar bug - #3134759).
  • - -
  • Changed the dynamic linker to force any module containing an - initialization or termination routine to be fully bound when any - symbol in the module is bound. The effect this will have is that - if a C++ executable has a constructor the entire program will be - fully bound at launch time. (Radar bug #3016816).
  • -
- -
Changes since the last release (cctools-452 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Changed the dyld's dyld_mach_thread_self() to match the - updated system's implementation to check if the port is not - MACH_PORT_NULL before deallocating the port (Radar bug - #3133910).
  • -
- -
Changes since the last release (cctools-451 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in the bug fix for Radar bug #3124262 (below in - cctools-451). This caused fix_prebinding to crash (Radar bug - #3133589).
  • -
- -
Changes since the last release (cctools-450 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in the redo_prebinding code that would cause it to - loose the -prebind_all_twolevel_modules state if the binary had a - new dependency (Radar bug #3124262).
  • -
- -
Changes since the last release (cctools-449 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed a bug in the assembler that was incorrectly causing an - error message for a section difference expresion using a symbol at - the end of a section for a .lcomm symbol (Radar bug - #3123561).
  • - -
  • Changed the static linker's default segment alignment for the - i386 architecture is 4K instead of 8K (Radar bug #3120579).
  • - -
  • Fixed the i386 assembler so that the i386 movd instructions - using GPR registers are assembled correctly (Radar bug - #3117280).
  • - -
  • Fixed otool's disassembler so that the i386 movd instructions - using GPR registers is correctly disassembled (Radar bug - #3117176).
  • - -
  • Fixed the i386 assembler so that it will assemble mov to/from - segment register instructions in 32-bit mode (Radar bug - #3114720).
  • - -
  • Fixed the cctools Makefile so that the project can be built - when in a directory which has a space in the name (Radar bug - #3114622).
  • - -
  • Fixed ld(1)'s -S symbol stripping option to strip symbols in - sections marked with the section attribute - S_ATTR_STRIP_STATIC_SYMS (Radar bug #3114458).
  • - -
  • Fixed ld(1)'s -x symbol stripping option to strip private - externs symbol that get turned into statics (Radar bug - #3114182).
  • - -
  • Changed the ar(1) tool to deal with creating files on NFS - servers that support file locking (Radar bug #3105943)
  • -
- -
Changes since the last release (cctools-448 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Changed the i386 assembler use the ALL subtype even if a - processor specific instruction is used. And added the -arch i686 - flag to be the same as -arch pentpro flag (Radar bug - #3111977)
  • - -
  • Fixed a memory leak in the dynamic linker with the - NSUnLinkModule() API that leaked the memory for the moduleName - parameter of the NSLinkModule() API (Radar bug #3073359).
  • - -
  • Changed the dynamic linker to use the prebinding of dynamic - libraries loaded via runtime APIs if possible (Radar bug - #3055389).
  • - -
  • Changed the gprof(1) man page to include "dyld(1) and the - DYLD_IMAGE_SUFFIX environment variable" in the SEE ALSO section - (Radar bug #2572028).
  • - -
  • Changed the assembler to generate an error message for a - subtraction expression that uses a label at the end of a section - and suggest how to create an assembly time constant expression - (Radar bug #2259427).
  • - -
  • Changed the assembler error message for a non-relocatable - subtraction expression to print the file and line number along - with which symbol is undefined (Radar bug #2254439).
  • -
- -
Changes since the last release (cctools-447 for -the 5.12 MacOS June 2003 Developer release)
- -
    -
  • Fixed nm(1) to print the OPT for the N_OPT stab gcc2_compiled. - stab produced by the compiler (Radar bug #3104328).
  • - -
  • Fixed ld(1)'s -x option to strip out all stabs including the - N_OPT gcc2_compiled. stab produced by the compiler (Radar bug - #3104019).
  • - -
  • Changed the dynamic linker to make the internal routine - relocate_symbol_pointers more efficient (Radar bug #3102491).
  • - -
  • Backed out the change in the dynamic linker to force any - module containing an initialization or termination routine to be - fully bound when any symbol in the module is bound. The original - Radar bug was #3016816 but this change caused a preformance - regression (Radar bug #3101666).
  • - -
  • Fixed the i386 assembler so it assembles the cmpxchg8b - instruction correctly (Radar bug #3099684).
  • - -
  • Added the _dyld_get_image_header_containing_address() SPI that - returns a pointer to the mach header if the address is a dyld - image. See the dyld(3) man page for more detailes (Radar bug - #2967928).
  • - -
  • Changed the dynamic linker to not leak memory when using the - NSADDIMAGE_OPTION_WITH_SEARCHING option with NSAddImage() and - loading a malformed library (Radar bug #2956804).
  • -
- -
Changes since the last release (cctools-446 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Changed the NXGetArchInfoFromName() API to work with VEO - binaries (Radar bug #3096745).
  • - -
  • Changed the dynamic linker to make the API - _dyld_image_containing_address more efficient (Radar bug - #3096691).
  • - -
  • Fixed a bug in the static link editor that was causing dynamic - libraries that had nothing referenced in them that also were used - indirectly that did have symbols indirectly referenced in them to - be marked as weak libraries when they shouldn't have been, (Radar - bug #3094497).
  • - -
  • Changed the dynamic linker to not cause fix_prebinding to be - notified if the problem dynamic library is non-prebound (Radar bug - #3091026).
  • - -
  • Changed the assembler to pad sections containing instructions - with nops (Radar bug #3073763).
  • - -
  • Added the SPI _dyld_all_twolevel_modules_prebound() that can - be used to check if all libraries are currently being used as - two-level namespace libraires, are prebound and all modules in - them are bound (Radar bug #3055372).
  • - -
  • Added the -noprebind_all_twolevel_modules flag that - overrides the setting of the environment variable - LD_PREBIND_ALL_TWOLEVEL_MODULES static linker (Radar bug - #3055372).
  • - -
  • Changed the dynamic linker to force any module containing an - initialization or termination routine to be fully bound when any - symbol in the module is bound. The effect this will have is that - if a C++ executable has a constructor the entire program will be - fully bound at launch time. (Radar bug #3016816).
  • -
- -

Notes Specific to Release 5.11 (Mac OS X November 2002 Developer -Release)

- -
Changes since the last release (cctools-445 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Fixed a bug in the static linker that caused it to crash when - an export lists was specified that did not include common symbols - that was not dynamically referenced. (Radar bug #3088916).
  • - -
  • Changed the static linker so that the -s option can - when used building an executable that uses the dynamic linker that - results in the same size output as strip(1) with no options - (Radar bug #3089997).
  • - -
  • Changed libtool(1) so that it passes the -x option to the - static linker (Radar bug #3088301).
  • - -
  • Changed the i386 assembler so that it allows all of the - supported operands to the cmpxchg8b (Radar bug #3089041).
  • -
- -
Changes since the last release (cctools-444 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Changed the static linker so that the -s option can be - used when building an executable that uses the dynamic linker that - results in the same output as strip(1) with no options - (Radar bug #2545288).
  • -
- -
Changes since the last release (cctools-443 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Export lists can now be specified to the static link editor - with the new options -exported_symbols_list filename - and -unexported_symbols_list filename. - See the ld(1) man page for more details. (Radar bug - #3083844).
  • - -
  • Fixed a bug in the seg_addr_table(1) tool that was causing it - to crash when the -release does not have a DylibProjects file in - its directory. (Radar bug #3079374).
  • - -
  • Fixed a bug in the static linker when doing an ld(1) -r - building kexts where a jbsr to a symbol that is undefined in - output file is relocated wrong (Radar bug #3054747).
  • - -
  • Fixed the formating on the arch(3) man page (Radar bug - #2903710).
  • -
- -
Changes since the last release (cctools-442 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • The static link editor can now build dynamic libraries as a - single module with the new option -single_moule. The default - remains the same and can explicitly specified with -multi_module. - (Radar bug #3080780).
  • -
- -
Changes since the last release (cctools-441 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Fixed the ld(1) man page to not reference the obsolete - CALL_ON_MODULE_BIND pragma where it now references the current - CALL_ON_LOAD pragma (Radar bug #3078181).
  • - -
  • Changed where the i386 assembler gets installed so it will be - on the developer CD and not in the Local package (Radar bug - #3074138).
  • - -
  • Changed the i386 assembler to take an fxch instruction with no - operands (Radar bug #3073760).
  • -
- -
Changes since the last release (cctools-439 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Fixed the headers (and source code) so that they won't get the - "extra tokens at end of #endif directive" warnings (Radar bug - #3072042).
  • -
- -
Changes since the last release (cctools-438 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Added support for the VEO cpu type (Radar bug #3068161).
  • - -
  • Added the install_name(3) API for extracting install_name - value from dylibs to libredo_prebinding (Radar bug #3065586).
  • - -
  • Changed the needs_redo_prebinding(3) API to check all archs if - allow_missing_archs is zero (Radar bug #3065577).
  • - -
  • Changed the libtool(1) command to allow the -no_arch_warnings - option as a no-op when -dynamic is specified (Radar bug - #3064819).
  • - -
  • Changed the static link editor to remove partial output files - when coredumping (Radar bug #3062745).
  • - -
  • Made a fix to the a bug fix in cctools-436 for Radar bug - #3037279 in the static link editor that was not removing a symbol - stubs for private weak definitions (Radar bug #3054990).
  • - -
  • Fixed a bug in the static link editor that fail to mark a - dynamic library weak if all of the references to it were weak when - the library had internal references (Radar bug #3051119).
  • - -
  • Updated the code in the make_dyld_image_data_writable(3) dyld - debug API to use the dyld preferred address in Mac OS X 10.2 as - its initial guess when scaning memory looking for dyld (Radar bug - #3042819).
  • - -
  • Removed the support for the dyld DYLD_MEM_PROTECT feature - (Radar bug #3035901).
  • - -
  • Added support for the Intel SSE2/SSE/MMX instructions in - otool(1)'s disassembler (Radar bug #2972491).
  • - -
  • Finished the support for the Intel SSE2/SSE/MMX instructions - in the assembler (Radar bug #2972486).
  • - -
  • Added the .align32 assembler directive that takes a 32bit fill - value for use by the compiler with -falign-loops. (Radar bug - #2680692).
  • -
- -
Changes since the last release (cctools-437 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Added the value 10.3 to be one of the known values allowed for - environment variable MACOSX_DEPLOYMENT_TARGET (Radar bug - #3049974).
  • -
- -
Changes since the last release (cctools-436 for -the 5.11 MacOS November 2002 Developer release)
- -
    -
  • Added most of the Intel SSE2/SSE/MMX instructions to the - assembler (Radar bug #2972486).
  • - -
  • Fixed many bugs in ld(1) and kld(3) having to do with the - relocation of the PowerPC pseudo instruction jbsr which are - generated with the compiler -mlong_branch option (Radar bug - #3046962).
  • - -
  • Changed the cctools project to not build a -static compiled - libredo_prebinding library (Radar bug #3000895).
  • - -
  • Updated the nm(1) tool to print the new stab entry containing - full compiler flags, compiler version and the optimization level - (Radar bug #3000792).
  • - -
  • Fixed a bug the static link editor that can cause it to crash - when dealing with a truncated dynamic library (Radar bug - #2999466).
  • - -
  • Fixed the static link editor error message handling of an - archive that does not have the needed architecture when the - -no_arch_warnings is used (Radar bug #2986587).
  • - -
  • Fixed a crash that can occur in the nmedit(1) tool if the list - of symbols contains duplicate symbol names (Radar bug - #2962899).
  • -
- -
Changes since the last release (cctools-435 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug the static link editor that was incorrectly - removing a symbol stub for a weak definition (Radar bug - #3037279).
  • -
- -

Notes Specific to Release 5.10 (Mac OS X 10.2)

- -

New Features

- -

The dynamic linker now supports weak references -and weak dylibs

- -

The dynamic linker now supports weak symbol references and weak -dymamic libraries. When creating a binary with the static link editor -if all the symbols referenced from a given dependent dynamic library -are weak references then the library is marked weak. When the binary -is used at execution time and a weak library is missing the dynamic -linker will not cause an error. For all weak symbols that are missing -execution time the dynamic linker uses zero as their address. This -allows a weak symbol's address to be tested for zero at runtime -allowing the code to avoid using the weak symbol when it is missing. -Binaries that use weak references require a dynamic linker from Mac -OS X 10.2 or later.

- -

To indicate a symbol is to be a weak reference the -__attribute((weak_import)) is used on the prototype of the symbol. -When a binary is created by the static link editor normally the all -the undefined symbol references of the object files being linked -should be consistent for each undefined symbol. That is all undefined -symbols should either be weak or non-weak references. If they are not -by default this is treated as an error and can be changed with the -ld(1) -weak_reference_mismatches treatment flag (see -the ld(1) man page for more details).

- -

Weak referenced symbols and weak libraries are only created in the -output by the static link editor, ld(1), when the -MACOSX_DEPLOYMENT_TARGET environment variable is set to 10.2. If not -a warning is generated when a weak reference would be in the output -and it is not marked weak. Note the default for the -MACOSX_DEPLOYMENT_TARGET environment variable 10.1 so weak referenced -symbols and weak libraries are not created by default. See the -ld(1) man page for more information on the -MACOSX_DEPLOYMENT_TARGET environment variable.

- -

redo_prebinding can now slide dylibs

- -

The redo_prebinding(1) command and the -redo_prebinding(3) API now can slide dymamic libraries to new -prefered addresses (see the man page for more details).

- -

Support for weak definitions in coalesced -sections

- -

There is now support for the .weak_definition -symbol_name assembler directive for symbols in a coalesced -section. This is used by the C++ compiler to support explicit -template instantiation. The assembler symtax for this is:

- -
.section __TEXT, __template, coalesced
- .private_extern _template_func
- .weak_definition _template_func
- _template_func:
- li r3,1
- blr
- -

The compiler uses a coalesced section with the -.weak_definition directive for implicitly instantiated -templates. And uses a regualr section (.text, .data, etc) for an -explicit template instantiation.

- -

The static link editor then discards all of the copies of a weak -symbol in a coalesced section if the same symbol is defined in -another section. If there exists only definitions of the weak symbols -in a coalesced section then the one from the first object file being -linked will be used and the others will be discarded.

- -

The support for flat namespace images using weak symbols from a -coalesced section is likely to be buggy as the semantics for it and -lazy binding are not well defined.

- -
Changes since the last releases (cctools-434 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Change redo_prebinding(1)(3) to not attempt to redo the - prebinding on any file that has a resource fork. (Radar bug - #2987656).
  • - -
  • Fixed a bug in the redo_prebinding(3) APIs of - get_prebind_cksums() and object_file_type() where its error - handling code was causing a crash in processing the error. (Radar - bug #2992414).
  • -
- -
Changes since the last releases (cctools-433 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the nmedit(1) tool when the -p option was used - that incorrectly changed the indirect symbol table entries to be - marked as INDIRECT_SYMBOL_LOCAL which it shouldn't do when the -p - option is used. (Radar bug #2986703).
  • -
- -
Changes since the last releases (cctools-432 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the dynamic linker handling of global coalesced - symbols in two-level prebound images to be faster. (Radar bug - #2951657).
  • -
- -
Changes since the last releases (cctools-431 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Change libtool(1) when the -static is in effect to not copy a - dynamic library file that is on the command line into the output - file. (Radar bug #2970223).
  • - -
  • Fixed a bug in the static link editor that was incorrectly - setting the weak definition bit on an undefined symbol. (Radar bug - #2969501).
  • - -
  • Fixed a bug in the static link editor that was incorrectly - produce the error message "illegal reference to symbol defined in - indirectly referenced dynamic library" when the -r option was - used. (Radar bug #2969437).
  • - -
  • Fixed a crash in the static link editor that was introduced - with the change for Radar bug #2969353. (Radar bug #2969353).
  • -
- -
Changes since the last releases (cctools-430 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the static link editor that caused it to - produce the internal error message: - -

    ld: internal error: output_section() count of external - relocation entries does not match

    - -

    when the input object files contained a reference to a - coalesced symbol and a definition of the symbol in a different - object file and -bundle was used.(Radar bug #2963045).

  • -
- -
Changes since the last releases (cctools-427,8,9 -for the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the nmedit(1) tool so that with the -s option when run - on MH_OBJECT files it turns global coalesced symbols into static - symbols. (Radar bug #2957909).
  • -
- -
Changes since the last release (cctools-426 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the static linker, ld(1), when creating a - two-level namespace image where it was producing a bad image when - a symbol from an object was discared and became an illegal - reference to an indirectly referenced dylib. (Radar bug - #2956332).
  • - -
  • Changed the nmedit(1) tool so that with the -p option it turns - global coalesced symbols into private extern symbols. (Radar bug - #2956057).
  • -
- -
Changes since the last release (cctools-425 for -the 5.10 MacOS 10.2 release)
- -
    -
  • The fix below in the static linker, ld(1), was still - incomplete. If multiple weak private externs are seen then a - non-weak global symbol was seen it was also have the same problem. - (Radar bug #2952209).
  • -
- -
Changes since the last release (cctools-424 for -the 5.10 MacOS 10.2 release)
- -
    -
  • The fix below in the static linker, ld(1), was incomplete. If - the second symbol came from a dynamic library or the - -bundle_loader argument it was also have the same problem. (Radar - bug #2952209).
  • -
- -
Changes since the last release (cctools-423 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the static linker, ld(1), when creating a - dynamic library. The bug was when the static linker first sees a - weak private extern symbol from an object file, which is later - discarded for a non-weak symbol the resulting dynamic library has - the wrong reference type for the symbol in the module created for - the object file with the weak private extern symbol. This would - result in a error of the form: (Radar bug #2952209). - -
      -
    • ld: /usr/local/lib/private/libstdc++.dylib(strstream.o) - isym field (2683) of reference table entry 609 for private - reference not in the local symbols for any module
    • -
    -
  • -
- -
Changes since the last release (cctools-422 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Re-fixed a bug in the dynamic linker that caused it to crash - if it loaded an image with a zero sized segment. (Radar bug - #2931784).
  • - -
  • Changed the dynamic linker's default error handling to cause a - break point trap instead of exiting. (Radar bug #2405619).
  • -
- -
Changes since the last release (cctools-421 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a small memory leak when malformed library is loaded via - a search path in the dynamic linker. (Radar bug #2914747).
  • - -
  • Added some pentium pro instructions to the Intel assembler and - disassembler in otool(1). (Radar bug #2928507).
  • - -
  • Added the section attribute strip_static_syms to be used by - the compiler for the C++ exception frame section. This will cause - the static symbols in that section to be stripped by the strip(1) - tool when they are in a binary built for the dynamic linker. - (Radar bug #2945659).
  • -
- -
Changes since the last release (cctools-420 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the dynamic linker to use the mach service interface - for the prebinding on demand feature to allow dyld to send a mach - message to a server registered with the bootstrap port. (Radar bug - #2944779).
  • - -
  • Changed the dynamic linker to not trigger the prebinding on - demand feature when the program is not using the system shared - regions. (Radar bug #2942209).
  • - -
  • Added the new -nofixprebinding option to ld(1) to be used when - building the tool fix_prebinding(1). Since this is likely not to - be needed by any other program it will need to be passed to ld(1) - via the -Wl,-nofixprebinding compiler driver flag. (Radar bug - #2941669).
  • - -
  • Added the new -relayout_nonsplit option to the - seg_addr_table(1) tool that could be run in tandem with the - -update_overlaps option to assign new addresses to all flat - libraries and fix up any overlaps found in the split region. - (Radar bug #2935630).
  • - -
  • Fixed a bug in the redo_prebinding(3) APIs where calling a - sequence of the redo_prebinding(3) APIs caused one of the later - API to give the wrong answer. (Radar bug #2933102).
  • - -
  • Changed the libkld libraries to not call the routine - reset_prebound_undefines() to avoid a possible kernel panic. - (Radar bug #2931331).
  • - -
  • Changed the way the gprof(1) tool reads the gmon.out file to - be faster. (Radar bug #2876478).
  • -
- -
Changes since the last release (cctools-419 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a problem introduced in cctools-419 where the libkld - libraries had an undefined symbol for get_output_section. (Radar - bug #2936244
  • - -
  • Changed the libtool(1) command to take and pass through the - ld(1) -M option. (Radar bug #2935497).
  • - -
  • Updated the size(1) man page in include the description of te - -arch flag that was missing from the man page. (Radar bug - #2934869).
  • - -
  • Changed the return values for redo_prebinding(3) API's for - statically linked executables. So needs_redo_prebinding(3) returns - NOT_PREBINDABLE and redo_prebinding(3) when the only_if_needed - parameter is non-zero returns REDO_PREBINDING_NOT_NEEDED. (Radar - bug #2934831).
  • -
- -
Changes since the last release (cctools-418 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the dynamic linker that caused it to crash if - it loaded an image with a zero sized segment. (Radar bug - #2931784).
  • - -
  • Fixed a bug in the static link editor that caused it to - produce a bad object file with the -r option if the input object - files contained a weak coalesced symbol and a non-weak symbol that - has a reference to the symbol coalesced symbol. (Radar bug - #2931708).
  • -
- -
Changes since the last release (cctools-417 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the assembler to not cause an error if a section - attribute is used with out -dynamic. (Radar bug #2929120).
  • - -
  • Changed the dynamic linker to ignore any filename that is - matched when using a DYLD PATH environment variable that is a - directory. (Radar bug #2917660).
  • -
- -
Changes since the last release (cctools-416 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the static linker that would cause incorrect - "illegal reference" error messages (Radar bug #2925564).
  • - -
  • Changed the compiler tools project to build a -static compiled - version of libredo_prebinding for fix_prebinding(1) to link with - when it is compiled -static. (Radar bug #2922145).
  • - -
  • Changed the dynamic linker to never run fix_prebinding(1) when - any of its DYLD PATH or INSERT environment variables are set. - (Radar bug #2921735).
  • -
- -
Changes since the last release (cctools-415 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the static linker to not generate multiply defined - warnings and errors when one of the multiple symbols comes from a - indirectly referenced dynamic library (Radar bug #2921080).
  • - -
  • Changed the support for weak coalesced symbols to not use the - weak_definitions attribute for coalesced sections but use a - .weak_definition symbol_name assembler directive - (see the notes above for the new features) (Radar bug - #2919646).
  • - -
  • Fixed a bug in ld(1) where it was incorrectly generating a - warning message about archives that did not match the -arch flag - when the -no_arch_warnings flag was specified.(Radar bug - #2918296).
  • - -
  • Fixed a bug in the redo_prebinding(3) API when the - allow_missing_architectures prarmeter was non-zero and one of the - dependent library's architecture was missing. The code incorrectly - updated the timestamp in the dylib for all architectutes when it - should not have done this for architectures it did not update the - prebinding. (Radar bug #2914003).
  • - -
  • Fixed a bug in the PowerPC assembler that did not correctly - generate an error when a 5 parameter instruction had more than 5 - parameters (Radar bug #2911611).
  • - -
  • Added the -m option to otool(1) to not treat the filenames - containing parenthesis as archive and an archive member syntax - Radar bug #2904708).
  • -
- -
Changes since the last release (cctools-414 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the static linker that would cause incorrect - "illegal reference to a coalesced section" error messages when a - symbol from a regular section is used in place of discarded symbol - in a coalesced section with the weak_definitions attribute (Radar - bug #2911339).
  • - -
  • Changed the i386 assembler to assemble fildll and fistpll as - fildq and fistpq (Radar bug #2909568).
  • - -
  • Changed the incomplete implementation of dlopen()'s dlsym() - routine to append '_' to names passed to it (Radar bug - #2908831).
  • - -
  • Fixed a bug in the redo_prebinding(1)(3) code where it would - not preserve all two-level modules as linked if an executable was - built with -prebind_all_twolevel_modules flag (Radar bug - #2909518).
  • - -
  • Fixed a bug in the dynamic linker that would caused undefined - symbol errors from sub-libraries when the DYLD_IMAGE_SUFFIX - environment variable is used (Radar bug #2906863).
  • - -
  • Fixed a bug in the PowerPC assembler that did not correctly - set the branch hints bit for some conditional branches (Radar bug - #2905071).
  • - -
  • Re-fixed a bug in the dynamic linker where it would get a - malloc(3) double free(3) error with the NSAddImage(3) API when the - NSADDIMAGE_OPTION_WITH_SEARCHING is specified and the library was - searched for and found to already be loaded. (Radar bug - #2892860).
  • -
- -
Changes since the last release (cctools-413 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added support for weak_definitions in coalesced sections (see - the notes above for the new features). (Radar bug #2898558).
  • - -
  • The DYLD_TRACE variable has been turned back off by default - (Radar bug #2859113).
  • - -
  • Fixed a bug in the dynamic linker where it would get a - malloc(3) double free(3) error with the NSAddImage(3) API when the - NSADDIMAGE_OPTION_WITH_SEARCHING is specified and the library was - searched for and found to already be loaded. (Radar bug - #2892860).
  • - -
  • Fixed a bug in needs_redo_prebinding(3), and - redo_prebinding(1)(3) where it would not determine the file needs - to be rebuilt when its dependent libraries install names changed - (Radar bug #2894021).
  • - -
  • Fixed some bugs in the cctools code base where there could be - a possible leak of a Mach privileged host port. (Radar bug - #2895931).
  • - -
  • Changed the seg_addr_table(1) tool's default starting - address for allocating flat shared libraries to 0x8fe00000 not - 0x7fe00000. Also changed the default address of dyld to 0x8fe00000 - not 0x7fe00000. (Radar bug #2897418).
  • - -
  • Added a check in the static link editor, ld(1), to not allow a - shared library to be linked against another shared library that - has the same install name.. (Radar bug #2890446).
  • - -
  • Fixed a bug in the PowerPC assembler in the range checking for - 16 bit branch displacements so the maximum negative range is not - treated as an error. (Radar bug #2890217).
  • - -
  • Changed the dyld(1) man page to be clearer on what the - otool -L option does. (Radar bug #2710374).
  • -
- -
Changes since the last release (cctools-412 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed the seg_addr_table(1) tool's default starting - address for allocating flat shared libraries to 0x7fe00000 not - 0x7ffc0000. Also changed the default address of dyld to 0x7fe00000 - not 0x7ffc0000. (Fix to Radar bug #2848945).
  • -
- -
Changes since the last release (cctools-411 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the cctools project to no longer build the file(1) - command. This is now done by the by the System Commands project. - (Radar bug #2883427).
  • - -
  • Fixed a bug in the dynamic link editor's error handling of - unknown load commands with the LC_REQ_DYLD bit set. This only - showed up with RETURN_ON_ERROR options to the dyld APIs. (Radar - bug #2882932).
  • - -
  • Fixed some some problems with mutiple calls to the - redo_prebinding(3) routines that did not correctly reset the - initial state later calls did not work correctly. (Radar bug - #2882844).
  • - -
  • Changed the dynamic link editor's internal handling of the - DYLD_INSERT_LIBRARIES string to match what gdb(1) wants. It now - copies the string and replaces the colon characters with null - characters. (Radar bug #2882739).
  • - -
  • Changed the static link editor, ld(1), to generate an - error message when too many sections are used. (Radar bug - #2882553).
  • - -
  • Changed the seg_addr_table(1) command to not cause an error - when dylibs in the seg_addr_table are not found when the tool is - run in the -update or -update_overlaps mode. (Radar bug - #2882324).
  • - -
  • Added the -sect_diff_relocs flag and LD_SECT_DIFF_RELOCS - environment variable to ld(1) to allow checking that things were - compiled with -mdynamic-no-pic (see the man page for more - details). (Radar bug #2870529).
  • - -
  • Changed the strings(1) command to process non-object files by - default as if the '-' (single dash) option were given. (Radar bug - #2868578).
  • - -
  • Fixed some spelling errors in the dyld(1), dylibprof(1), ld(1) - and nmedit(1). (Radar bugs #2854497, #2854501, #2854516 and - #2854539).
  • -
- -
Changes since the last release (cctools-410 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the seg_addr_table(1) tool's default address - ranges for allocating shared libraries (see the - seg_addr_table(1) man page for details). Also changed the - default address of dyld to 0x7ffc0000. Once the shared libaries - have been moved to the new addresses this will allow a larger - maximum limit for malloc()'s by a program (Radar bug - #2848945).
  • - -
  • Removed the dummy versions of __isinfd(), __isnand() and - __inf() from dyld as these were put back in libc.a .
  • -
- -
Changes since the last release (cctools-409 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed dyld to defined dummy versions of __isinfd(), - __isnand() and __inf() deal with these symbols being moved out of - libc.a
  • -
- -
Changes since the last release (cctools-408 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added the second prototype of prebinding on demand code to - dyld. This still uses vfork and execl to run - /usr/bin/fix_prebinding for binaries that were launch and the - prebinding information could not be used (Radar bug - #2870411).
  • - -
  • Fixed a case where __initialize_Cplusplus() fails to call the - library's initializers (Radar bug #2869388).
  • - -
  • Fixed a spelling error in man page for libtool (Radar bug - #2856089) and one in the ld man page (Radar bug #2775049).
  • -
- -
Changes since the last release (cctools-407 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added the first prototype of prebinding on demand code to - dyld. This uses vfork and execl to run /usr/bin/fix_prebinding for - binaries that were launch and the prebinding information could not - be used (Radar bug #2866348).
  • -
- -
Changes since the last release (cctools-406 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Removed the proto type support for -run_init_lazily which was - trying to allow a shared library routine to be marked to have its - initialization routine run on first use of the library by the - program rather than at program start up when the program is - launched prebound. This prototype code caused a second thread to - be created to handle the memory exception. Since the support for - doing this without a second thread is not to be done (see Radar - bug #2552042) this prototype code has been removed (Radar bug - #2864021).
  • -
- -
Changes since the last release (cctools-405 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed dependent_libs(3) to work for MH_BUNDLE type - objects (Radar bug #2862297).
  • -
- -
Changes since the last release (cctools-404 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the change to strip(1) introduced in - cctools-404 fix (Radar bug #2860291).
  • -
- -
Changes since the last release (cctools-403 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the change to strip(1) introduced in - cctools-402 that was causing some symbols not to be saved and - generating an errror message stating "symbols referenced by - indirect symbol table entries that can't be stripped" (Radar bug - #2860291).
  • - -
  • Fixed the libredo_prebinding.a library to not export - the _crc32 symbol (Radar bug #2859919).
  • - -
  • Fixed a bug in NSLookupSymbolInImage(3) when that - caused it to crash when the image was the executable or a bundle - (not a shared library) when the symbol being looked up was not - found (Radar bug #2857197).
  • -
- -
Changes since the last release (cctools-402 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the cctools project to conform to the Darwin Makefile - API so that "make" builds everything and "make install" builds - everything and installs things into "/" (or into the value of - $(DSTROOT) if set) (Radar bug #2859138).
  • - -
  • Fixed a bug in the needs_redo_prebinding(3) API when - the allow_missing_architectures parameter was set that did not - check the specified architecture and returned the wrong value - (Radar bug #2836068).
  • - -
  • Changed the use of #import to #include in the header files - mach-o/i386/swap.h and mach-o/ppc/swap.h (Radar bug - #2778821).
  • -
- -
Changes since the last release (cctools-401 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed strip(1) to strip private externs that were - turned into statics that are in a dynamic library that are not - referenced by a module other than where the symbols is defined. - (Radar bug #2853161).
  • - -
  • Changed "it's" to "its" on the nmedit man page (Radar bug - #2420515).
  • -
- -
Changes since the last release (cctools-400 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added the i386 instruction fistp to be the same as - fistps since gcc3 generates this form. (Radar bug - #2851846).
  • -
- -
Changes since the last release (cctools-399 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the checksyms(1) tool and removed the checks to - see that the address(es) of a shared library matches the entries - in the segment address table specified (Radar bug #2847857).
  • - -
  • Changed the seg_addr_table(1) tool in the - -update or -update_overlapps cases to not fail if a - dynamic library in the table does not exist (Radar bug - #2848667).
  • - -
  • Added the new throttle parameter to the - redo_prebinding(3) API for use by a prebinding agent to - allow it throttle its I/O and not impact other applications when - running in the back ground (Radar bug #2850642).
  • - -
  • Fixed a bug in the strip(1) command that caused it to crash - when run with no options on a framework. This was a regression - introduced in cctools-394 in the changes to strip coalesced - symbols that are not used with indirect symbols which was Radar - bug #2689894. (Radar bug #2851013).
  • -
- -
Changes since the last release (cctools-398 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed seg_addr_table(1) tool in the -update or - -update_overlapps cases to not check that non-zero - addresses in the table match the addresses in the dynamic library - file (Radar bug #2841199).
  • - -
  • Changed the assembler's line buffer size from 32k to 64k to - allow long .stab lines created with GCC3 to be assembled. (Radar - bug #2840883).
  • -
- -
Changes since the last release (cctools-397 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed the redo_prebinding(1)(3) code to only load a library - only once for libraries that have have mutiple names via symlinks - (Radar bug #2839783).
  • -
- -
Changes since the last release (cctools-396 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Changed the needs_redo_prebinding(3) API to be able to ignore - missing architectures with the addition of the new - allow_missing_architectures parameter (Radar bug #2836068).
  • - -
  • Added a version number to the redo_prebinding API's (Radar bug - #2836572).
  • - -
  • The DYLD_TRACE variable has been turned on by default in the - dynamic linker for Jaguar development (Radar bug #2836321).
  • - -
  • Changed the static link editor to no longer print warnings - about unused mutiply defined symbols by default. The new - -multiply_defined_unused treatment flag can be used to re-enable - this warning (Radar bug #2835152).
  • - -
  • The DYLD_BOOL macro was removed from the header file - <mach-o/dyld.h>(Radar bug #2831923).
  • - -
  • The new mechanism to control the use of incompatible features - in produced by the devenv tools using the MACOSX_DEPLOYMENT_TARGET - environment variable has been implemented in ld(1) and - controls the output of weak references & libraries and the - prebind checksum load command. See the ld(1) man page for - more details (Radar bug #2830042).
  • - -
  • The SPI _NSGetExecutablePath(3) was added to return - full path of the executable. See the NSModule(3) man page - for more details (Radar bug #2432816).
  • - -
  • The message in the static link editor, ld(1), "Logging - for Build & Integration] Used dynamic library: - filename" was changed again slightly to print the - realname(2) of the file open(2)'ed for - filename and not the install name (Radar bug - #2826775).
  • -
- -
Changes since the last release (cctools-395 for -the 5.10 MacOS 10.2 release)
- -
    -
  • The seg_addr_table(1) tool was changed to not use the - SYMROOT file when -update_overlaps is used (Radar bug - #2826945).
  • - -
  • The message in the static link editor, ld(1), "Logging - for Build & Integration] Used dynamic library: - filename" was changed to print the name of the file - open(2)'ed for filename and not the install name - (Radar bug #2826775).
  • - -
  • Added the new allow_missing_architectures parameter to - the redo_prebinding(3) API for use by update_prebinding(1) - to use to allow it not to fail when redoing the prebinding of a - file that has missing architectures other than the host machine - (Radar bug #2809673).
  • - -
  • Added the new assembler directive .weak_symbol symbol_name to - the assembler for use by the compiler when it sees a reference to - a symbol that has the __attribute__((weak_import)).
  • - -
  • Added the -weak_reference_mismatches treatment - flag to the static linker, ld(1). That specifies how to - treat mismatches of symbol references in the the object files - being linked. See the ld(1) man page for more details.
  • - -
  • Added the -s flag to ar(1) to run ranlib(1) to - produce a table of contents (Radar bug #2814831).
  • -
- -
Changes since the last release (cctools-394 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in redo_prebinding(1)&(3) that should not have - been checking for symbols being overridden from flat-libraries - (like libMallocDebug) in two-level namespace libraries.
  • - -
  • Changed as(1) man page to correctly reference the assember - manual in /Developer/Documentation/DeveloperTools/Assembler (Radar - bug #2803486).
  • -
- -
Changes since the last release (cctools-393 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added LD_FORCE_NO_PREBIND environment variable to the static - link editor, ld(1), to override the command line and the - LD_PREBIND environment variable (Radar bug #2814402).
  • - -
  • Changed the .Os macros in nlist(3), stab(5), ranlib(5) to use - Darwin (Radar bug #2813834).
  • - -
  • Fixed a bug in redo_prebinding(1)&(3) that should not have - been checking for symbols being overridden in two-level namespace - images.
  • - -
  • Changed the strip(1) command to strip coalesced symbols that - are not used with indirect symbols (Radar bug #2689894).
  • - -
  • Changed the cctools project to build the static link editor, - ld(1), that outputs LC_PREBIND_CKSUM and LC_LOAD_WEAK_DYLIB - commands only when RC_RELEASE is Proton or Jaguar.
  • - -
  • Change the static linker to not put out a LC_LOAD_WEAK_DYLIB - load command for a library unless some thing is used from the - library (or sub-images) and all references are weak. This avoid - using LC_LOAD_WEAK_DYLIB load commands for umbrella frameworks and - libraries.
  • - -
  • Added support in the code of the redo_prebinding(1) - command and the code of the redo_prebinding(3) API for weak - symbols and weak libraries (Radar bug #2803414).
  • -
- -
Changes since the last release (cctools-392 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added support in the dynamic linker for weak symbols and weak - libraries. As well as support in the static link editor to mark a - dynamic library as weak when all symbols used from it are marked - weak. Other object file tools, otool(1), nm(1), - etc., have also been updated as needed to support binaries with - weak symbols and weak libraries.
  • - -
  • Fixed a bug that caused the static link editor to crash when - the option -prebind_all_twolevel_modules was used.
  • - -
  • Changed the cctools project to no longer install the rld(3) - man page and removed references to rld from the nmedit(1) and - strip(1) man pages (Radar bug #2784528).
  • -
- -
=Changes since the last release (cctools-391 for -the 5.10 MacOS 10.2 release)
- -
    -
  • The tool dhecksyms(1) was changed to not use the - "libfoo.a(bar.o)" syntax to specify an archive member but rather - take the string as a file name (Radar bug #2730127).
  • -
- -
Changes since the last release (cctools-390 for -the 5.10 MacOS 10.2 release)
- -
    -
  • The man pages for Mach-O(5), ranlib(5), - stabs(5) and nlist(3) were moved to the cctools - project from the man project and updated (Radar bug - #2793998).
  • -
- -
Changes since the last release (cctools-389 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added the install_name_tool(1) that changes the recored - install names of dynamic shared libraries in Mach-O binaries. See - the install_name_tool(1) man page for more details.
  • -
- -
Changes since the last release (cctools-388 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Fixed a bug in the static link editor that caused it to create - binaries that had a bad load command with a zero size. This only - happened when the binary was attempted to be prebound and the - prebinding was disabled due to segment overlapps.
  • - -
  • Added the -headerpad_max_install_names flag to the - static link editor, ld(1), that will add enough extra - padding to the header pad needed to allow all install names in the - output file being created to be later changed to be as long as - MAXPATHLEN. Until Radar bug #2791100 is fixed passing this linker - flag through the compiler driver cc(1) has to be done with - driver flag -Wl,-headerpad_max_install_names.
  • - -
  • Added the -D option to the otool(1) to print out - just the install name of the LC_ID_DYLIB load command of a dynamic - shared library.
  • - -
  • Changed the nmedit(1) and strip(1) programs to - not back set the modify time by 5 seconds for file that do not - contain archives (Radar bug #2788034).
  • - -
  • Fixed a bug in the kld(3) library code that was - incorrectly setting the MH_TWOLEVEL flag in the mach header of - kernel drivers (Radar bug #2787764).
  • - -
  • Fixed a bug in the redo_prebinding(1)(3) code that was - not correctly checking the LIBRARY_ORDINAL of undefined symbols in - executables for the reserved value SELF_LIBRARY_ORDINAL (a value - of zero) which is only used in dynamic shared libraries. This bug - caused update_prebinding(1) program to crash when it ran as - part of installing an iDVD pacakge with a malformed executable - (Radar bug #2787021).
  • - -
  • Changed the PowerPC assembler to not treat the fsel - instruction as optional so it can be used without specifing - -force_cpusubtype_ALL.
  • - -
  • Added the option -prebind_all_twolevel_modules to the - static link editor that causes all modules from two-level - namespace prebound libraries to be marked as used by the program. - This can also be specified with the environment variable - LD_PREBIND_ALL_TWOLEVEL_MODULES (Radar bug #2784627). Until - Radar bug #2791100 is fixed passing this linker flag through the - compiler driver cc(1) has to be done with driver flag - -Wl,-prebind_all_twolevel_modules.
  • -
- -
Changes since the last release (cctools-387 for -the 5.10 MacOS 10.2 release)
- -
    -
  • To allow tbe MacOS X build system to support dynamic libraries - who's install names do not match their file system paths the - seg_addr_table(1) command was changed so that if the - install name starts with @executable_path then the checks - for the install name matching the name in the table entry is not - done.
  • - -
  • Fixed the spelling of "inconsistent" in otool(1) error - messages (Radar bug #2783706).
  • - -
  • Changed the use of #import to #include in the header files in - the mach-o directory and added guards to the needed header files - to prevent multiple includes (Radar bug #2778821).
  • -
- -
Changes since the last release (cctools-386 for -the 5.10 MacOS 10.2 release)
- -
    -
  • To allow tbe MacOS X build system to support dynamic libraries - who's install names do not match their file system paths the - -seg_addr_table_filename pathname flag was added to - the ld(1), redo_prebinding(1), checkyms(1) - and check_dylib(1) commands. This flag is optional and if - not passed the install name of the dynamic library is used. For - check_dylib(1) this flag is required. One other change to - check_dylib(1) is that if the install name starts with - @executable_path then the checks for the install name - matching the -install_name argument is not done. See man - pages on these command for details. Until Radar bug #2772574 is - fixed passing the linker flag -seg_addr_table_filename - pathname through the compiler driver cc(1) has to be - done with driver flag - -Wl,-seg_addr_table_filename,pathname.
  • - -
  • To allow java system to have the ablity to change the Java - VM's at runtime to include other java libraries linked with libjvm - the NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME option to the - NSAddImage(3) API was added. See the NSModule(3) man page for - details on this option to this API.
  • - -
  • Fixed it so that when prebinding against a dynamic library - with multiple cpusubtypes the case where the program could crash - if run on a cpusubtype other than the one it was prebound no - longer crashes. The fix involves running strip(1) or - nmedit(1) on the dynamic library with multiple cpusubtypes - (Radar bug #2676444).
  • - -
  • Fixed a grammatical error in an error message of - redo_prebinding(3) (Radar bug #2764926).
  • - -
  • Fixed a bug in the static linker for PowerPC conditional - branches where the prediction would get changed incorrectly (Radar - bug #2765281).
  • -
- -
Changes since the last release (cctools-385 for -the 5.10 MacOS 10.2 release)
- -
    -
  • Added a pre-redo_prebinding checksum to binraries that get - prebound as a new load command. When a prebound file is created or - modified by any tool other than redo_prebinding the tool sets the - value of the checksum in the load command to zero. When - redo_prebinding is run on a binary if the checksum value is zero - it calculates the checksum and stores that in the load command in - the output it creates. If when redo_prebinding is run on a binary - the checksum value is not zero it does not change the checksum - value. The redo_prebinding(1) command has a new -z - option and the tredo_prebinding(3) API has a new - zero_out_prebind_checksum parameter to allow the B&I - tools to always zero this out. The new routine - get_prebind_cksums(3) has been added to the - libredo_prebinding.a library.
  • -
- -
Changes since the last release (cctools-384 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the -seg_addr_table filename option to the - redo_prebinding(1) command (Radar bug #2575205).
  • - -
  • The redo_prebinding(3) slide_to_address - parameter when non-zero now slides a dynamic library to that new - prefered address. Also the new only_if_needed parameter has - been added to the redo_prebinding(3) API and the API now - returns an enum value. The needs_redo_prebinding(3) API now - has a new unsigned long parameter expected_address. The new - routine object_file_type(3) has been added to the - libredo_prebinding.a library. (Radar bug #2575205 and - #2729976).
  • -
- -

Notes Specific to Release 5.9 (MacOS X -10.1)

- -

New Features

- -

Two level namespace

- -

Work on the compiler tools to support two level name space is now -complete and -twolevel_namespace is now the default (Radar bugs -2372124 and 2415916). See the Public release notes for the -details.

- -
Changes since the last release (cctools-383 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed the change to the header file <mach-o/dyld.h> that - added extern "C" ifdef'ed with __cplusplus that had an extra - trailing semicolon after the closing curly brace (Radar bug - #2748160).
  • -
- -
Changes since the last release (cctools-382 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Changied the semantic of NSLookupSymbolInImage() and - NSIsSymbolNameDefinedInImage() to ignore the specified image if it - is not a private image if DYLD_FORCE_FLAT_NAMESPACE is set (Radar - bug #2731330).
  • -
- -
Changes since the last release (cctools-381 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug introduced in cctools-381 that caused libkld to - have an undefined symbol _twolevel_namespace_hints.
  • - -
  • Picked up the Compiler Tools release notes edits from tech - pubs (Radar bug #2739023).
  • -
- -
Changes since the last release (cctools-380 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Changed the dynamic linker and the - NSCreateObjectFileImageFromFile(3) API to allow for a mechanism - for "future compatibility" when adding new load commands to the - Mach-O object file format (Radar bug #2737644).
  • -
- -
Changes since the last release (cctools-379 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the flag -twolevel_namespace_hints to the static - link editor. This specifies to create the output with the - two-level namespace hints table to be used by the dynamic linker. - This is the default except when the -bundle flag is - specified. If this is used when the -bundle flag is - specified the bundle will fail to load on a MacOS X 10.0 system - with a malformed object error. Radar bug #2735266.
  • -
- -
Changes since the last release (cctools-378 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Changed the dynamic linker to not unnecessarily touches link - edit pages for the module table of dynamic libraries when a - dynamic library does not have any module initialization and - termination routines (Radar bug #2732714).
  • -
- -
Changes since the last release (cctools-377 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Changed the header file <mach-o/dyld.h> to have extern - "C" ifdef'ed with __cplusplus (Radar bug #2728016).
  • -
- -
Changes since the last release (cctools-376 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a problems with the cctools-376 project not building its - cctools_ofiles target due to the changes made for Radar bug - #2716249 (Radar bug #2727607).
  • - -
  • Fixed a bug in the dynamic linker that caused programs to - crash when DYLD_IMAGE_SUFFIX was used (Radar bug #2724475).
  • -
- -
Changes since the last release (cctools-375 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed the static link editor that caused it to crash when the - -Y flag was used with two-level namespace libraries introduced - with the fix in cctools-375 below for Radar bug #2716249.
  • -
- -
Changes since the last release (cctools-374 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed the PowerPC assembler to protect the short-form macros - which is needed so they do not incorrectly expand under certain - circumstances (Radar bug #2717461).
  • - -
  • Removed the dependency on libstreams by the assemblers so - nothing in the cctools project depends on
  • - -
  • Fixed the static link editor to correctly deal with the - semantics of two-level namespace libraries so it won't build - programs that would fail to launch correctly flagging multiply - defined and undefined symbol errors (Radar bug #2716249).
  • -
- -
Changes since the last release (cctools-373 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the dynamic linker that caused programs to get - undefined symbols or crash (in one of dyld's symbol lookup - routines) if the program or one of the libraries had been built - with two-level namespace hints.
  • - -
  • Fixed a bug in the dynamic linker that caused the Puma5E9 - DirectoryService daemon thread count grows unbounded. Radar bug - #2716915
  • - -
  • Fixed a bug in the optimization to use two-level namespace - prebound libraries in the dynamic linker that caused programs to - crash when using the DYLD_*_PATH enironment variables.
  • -
- -
Changes since the last release (cctools-372 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Changed the static link editor to have -twolevel_namespace as - the default (Radar bug #2717678)
  • -
- -
Changes since the last release (cctools-371 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the optimization to use two-level namespace hints to the - dynamic linker (Radar bug #2558069).
  • - -
  • Added the -update_overlaps option to the seg_addr_table(1) - tool.
  • -
- -
Changes since the last release (cctools-370 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the optimization to use two-level namespace prebound - libraries to the dynamic linker.
  • - -
  • Changed the static link editor to log the used of the - -bundle_loader argument with the environment variable - XBS_TRACE_BUNDLE_LOADER set (Radar bug #2710229)
  • - -
  • Changed the dynamic linker to not leak a send port right on - the thread it is doing an operation for (Radar bug #2704241).
  • - -
  • Fixed a bug in the tool redo_prebinding(1) so it uses "up to - date" not "uptodate" in its error messages (Radar bug - #2711451).
  • -
- -
Changes since the last release (cctools-369.3 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Changed the compiler tools to produce, update, pass through - and print a two-level namespace hints lookup table (Radar bug - #2558069). The dynamic linker does not yet use this table (that - will be done in a subsequent release of cctools).
  • - -
  • Added the -nomultidefs flag to the the static link - editor. Specifying this flag marks the umbrella being created such - that the dynamic linker is guaranteed that no multiple defintions - of symbols in the umbrella's sub-images will ever exist. This - allows the dynamic linker to always use the two-level namespace - lookup hints even if the timestamps of the sub-images do not - match. This should be used with all Apple umbrellas. This has to - be used with -Wl,-nomultidefs with the compiler driver, - cc(1), until Radar bug #2705158 is fixed.
  • -
- -
Changes since the last release (cctools-369.2 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the tool redo_prebinding(1) that produced an - incorrect error message when run on a binary with debugging - symbols. The incorrect error message reported the file as - malformed because of a bad LIBRARY_ORDINAL in a symbol table - entry.
  • -
- -
Changes since the last release (cctools-369.1 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the dynamic linker when an umbrella library for - a two-level namspace library is loaded after the two-level - namspace library is initally loaded. This would cause refernces - from from sub libraries of the umbrella to symbols in the - two-level library to crash (Radar bug #2706662) .
  • -
- -
Changes since the last release (cctools-369 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Re-fixed the bug in the dynamic linker API - NSLookupSymbolInImage() where if called from a shared library init - routine it would relocate the library module a second time causing - pointers to have twice their values and the program to crash.
  • - -
  • Changed the dynamic linker API NSLookupSymbolInImage() to - allow it to take a pointer to the mach header of the executable or - a bundle as well as dynamic libraries.
  • -
- -
Changes since the last release (cctools-368 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the the tool redo_prebinding(1) with undefined - symbol references from two-level images where the definition of - the symbol is in a sub-framework of a flat namespace umbrella - framework would come up undefined.
  • - -
  • Fixed a bug in the dynamic linker API NSLookupSymbolInImage() - where if called from a shared library init routine it is possible - that it can return a non-NULL NSSymbol but a call to - NSAddressOfSymbol() or other uses of that NSSymbol may not work - (in the case of NSAddressOfSymbol() it returns NULL).
  • - -
  • Picked up the new rld interfaces kld_load_from_memory & - kld_load_basefile_from_memory (see the rld(3) man page for more - information).
  • -
- -
Changes since the last release (cctools-367 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the static link editor that would cause it to - crash when using -bundle_loader and doing a cross bytesex link - (using -arch i386 while linking on a PowerPC machine for - example).
  • -
- -
Changes since the last release (cctools-366 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the -sub_library flag to the static linker and all the - support needed in cctools for it. This is needed to allow - Foundation to lhave libobjc treated as a sub-umbrella (Radar bug - #2697458). For now this must be passed using cc(1) with - -Wl,-sub_library,library_name until and if Radar bug #2699511 is - fixed.
  • - -
  • Fixed a bug in the redo_prebinding(3) APIs that did not - deallocate a buffer if the open(2) or write(2) fails for it is - output (Radar bug #2691920).
  • - -
  • Fixed a bug static linker that with -twolevel_namespace it did - not search the sub-umbrella's in the same order as the dynamic - linker.
  • -
- -
Changes since the last release (cctools-365 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the dynamic linker with undefined symbol - references from two-level images where the definition of the - symbol is in a sub-framework of a flat namespace umbrella - framework would come up undefined.
  • -
- -
Changes since the last release (cctools-364 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the dynamic linker API's NSAddImage(), - NSLookupSymbolInImage() and NSIsSymbolNameDefinedInImage() for use - in doing two-levelnamespace lookups. For more information see the - NSModule(3) man page (Radar bug #2689833).
  • - -
  • Fixed a bug in the dynamic linker when - NSLINKMODULE_OPTION_RETURN_ON_ERROR option of the NSLinkModule() - API is used and plugins fail to load it can later cause the - program to crash (Radar bug #2665925).
  • -
- -
Changes since the last release (cctools-363 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Added the -prebind_allow_overlap to the static linker, which - causes it to prebind the output even if the addresses of the - dynamic libraries it uses overlap. The resulting output can then - have redo_prebinding(1) run on it to fix up the prebinding after - the overlapping dynamic libraries have been rebuilt. This option - can also be specified by setting the environment variable - LD_PREBIND_ALLOW_OVERLAP. It is intended for use only in - B&I.
  • - -
  • Changed NXFindBestFatArch() which had a problem with selecting - the PowerPC cpusubtype when an exact match could not be found. See - Radar bug #2678019 against exec(2) which is the same problem as - this but in the exec code.
  • - -
  • Changed NXCombineCpuSubtypes() for the PowerPC to select the - highest subtype when there is not an exact match and neither is a - 601.
  • - -
  • Fixed a bug in the dynamic linker when DYLD_LIBRARY_PATH ended - in a ':' that caused it to crash (Radar bug #2676732).
  • - -
  • Fixed a bug in the dynamic linker when a module from a - prebound dynamic library wasn't originally used by the program was - later dynamically bound and referenced another prebound dynamic - library that also was not originally used that had a C++ - constuctor which was not called when the first symbol was - dynamically bound (Radar bug #2650066).
  • - -
  • Fixed a bug in the dynamic linker that caused prebound dynamic - libraries that had nmedit(1) run on it to not be relocated - correctly and cause the code in them to crash (Radar bug - #2676317).
  • - -
  • Picked up the change suggested in Radar bug #2686444 which - makes the dynamic linker recurse too much for its algorithm to use - the header dependencices instead of the symbol dependencies when - calling library init routines which was added for Radar bug - #2571628.
  • - -
  • Picked up a change to the PowerPC assembler adds the 4-arg - option to rlwinm and friends, and uses mask->mb/me (Radar bug - #2684824).
  • - -
  • Fixed a bug in the assembler when a ".=value" was past the - value of the current location counter and caused the assembler to - crash (Radar bug #2682911).
  • -
- -
Changes since the last release (cctools-362 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Picked up the change suggested in Radar bug #2667248 which is - a small speed up to dyld locking.
  • - -
  • Picked up the change suggested in Radar bug #2667241 which - added a dyld_mach_thread_self() call to lock.c to improve - preformance by caching the last value of the mach_thread_self() - call against the page truncated stack address making the - call.
  • - -
  • Fixed a bug in the PowerPC assembler that set the Y bit - inappropriately in bdnzt when no prediction was specified (Radar - bug #2665165).
  • - -
  • Changed libtool(1) so that if -arch_only is - specified with a specific cpusubtype other than the family - cpusubtype it does not use -force_cpusubtype_ALL and passes - the -arch_only argument to ld(1) as the -arch - flag so that the output is to be tagged with that - cpusubtype..
  • - -
  • Changed the PowerPC assembler so that vector instructions can - be used when -arch 7400 and -arch 7450 are specified - without specifying -force_cpusubtype_ALL.
  • -
- -
Changes since the last release (cctools-361 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in the redo_prebinding code that did not honor the - sticky bit when creating its output file.
  • - -
  • Picked up one of the bug fixes to the dynamic linker made in - cctools-361 that was also needed in the redo_prebinding code.
  • -
- -
Changes since the last release (cctools-360 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Made a 4 bug fixes to the dynamic linker for bugs when running - two-level namesapce images. With these fixes the 70 projects that - Sherlock depends on can be built with -twolevel_namespace in - effect and run.
  • - -
  • The ld(1) and dyld(1) man pages have been - updated with the information about two level name space and the - associated options.
  • - -
  • Fixed a bug in ld(1) in that caused it to crash when doing a - cross byte sex link with -twolevel_namespace and linking both a - sub-umbrella and its outer umbrella framework.
  • - -
  • Picked up the fixes for otool(1) -ov from Radar bug - #2660421.
  • - -
  • The redo_prebinding(3) has been written and is now a - part of cctools-361.
  • - -
  • Added the slide_to_address parameter to the redo_prebinding(3) - API to be used in the furture to support changing the prefered - address of a dynamic library.
  • - -
  • Fixed a bug in the redo_prebinding(3) API - needs_redo_prebinding() where after it returned an error, all - subsequent calls return PREBINDING_UNKNOWN.
  • -
- -
Changes since the last release (cctools-359 for -the 5.9 MacOS 10.1 release)
- -
    -
  • Fixed a bug in strip(1) that did not honor the NO_TOC - section attribute when creating archive table of contents (Radar - bug #2663483).
  • - -
  • Added the redo_prebinding(3) APIs (Radar bug - 2604014).
  • - -
  • Added the -e executable_path argument to - redo_prebinding(1) to allow it to be used with programs and - dynamic libraries that use the "@executable_path" prefix in - install names.
  • - -
  • Changed the cctoolslib project to no longer build librld and - its varients when RC_RELEASE is not Cheetah (or an earilier build) - as the use of librld was removed earily in the Cheetah build - cycle.
  • -
- -
Changes since the last release (cctools-358 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Added support for two-level namespace (Radar bugs 2372124 and - 2415916).
  • - -
  • Changed the redo_prebinding(1) so that it won't trash - file it is operating on when out of disk space (Radar bug - #2639352).
  • - -
  • Changed the dynamic linker locking routine to nolonger use an - "extra" sync after a load with reservation which was needed only - for some old 604 processors (Radar bug #2615783).
  • - -
  • Updated the pagestuff(1) man page as edited by tech - pubs (Radar bug #2582293).
  • - -
  • Changed the the static linker's, ld(1), overlap - checking when building an executable to not disable prebinding - when the split library's __LINKEDIT segment the executable is - being linked overlap. This can happen when some of the split - libraries linked with are from the $(SYMROOT) and are not - stripped.
  • - -
  • Changed checksyms(1) to open the default segment - address table if none is specified via a -seg_addr_table - argument (and not try to open the old DylibTable).
  • -
- -

Notes Specific to Release 5.8 (MacOS X -10.0)

- -

New Features

- -

Two level namespace

- -

Work on the compiler tools to support two level name space is in -progress (Radar bugs 2372124 and 2415916). Even though some object -file constants and command line options exist they should not be used -and are for development purposes only. Do not expect any of this to -work at all.

- -
Changes since the last release (cctools-357 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed a bug in the dynamic linker where a C++ plugin using - templates, stripped with strip(1)'s -s option and then loaded - privately will crash the program loading the plugin. (Radar bug - #2631405).
  • -
- -
Changes since the last release (cctools-356 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Added support for the Vger (7450) cpu subtype to the compiler - tools. Radar bug #2599869.
  • - -
  • Fixed a bug in the tool seg_addr_table(1) when the -update - option was used that it did not preserve the non-zero addresses in - the table. Instead it changed the non-zero entries to the values - in the libraries were built with. (Radar bug 2575214).
  • -
- -
Changes since the last release (cctools-355 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed a bug in the tool seg_addr_table(1) where it was not - allowing any padding when laying out split libraries. (Radar bug - 2575211).
  • - -
  • Fixed a bug in the dynamic linker where a multi threaded - program could crash in a library module being linked. (Radar bug - #2584800).
  • -
- -
Changes since the last release (cctools-354 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Changed the include file <mach/vm_task.h> to - <mach/vm_map.h> in two files so that the cctoolslib project - would build on the Cheetah4J8 release. (Radar bug #2579488).
  • - -
  • Fixed a bug strip(1) where it could complain about not being - able to strip the compiler generated symbols using private extern - coalesced symbols. (Radar bug #2584111).
  • - -
  • Changed otool(1) to disassemble sections marked with - S_ATTR_SOME_INSTRUCTIONS as some coalesced sections created by the - compiler that are not marked with S_ATTR_PURE_INSTRUCTIONS as they - contain jump tables as well as instructions (Radar bug - #2580311).
  • - -
  • The assembler has been changed to allow the .section directive - to take mutiple attributes separated with a plus sign '+' (Radar - bug 2580298).
  • - -
  • Fixed a bug in the implementation of two of - NSLookupAndBindSymbolWithHint () that was causing the symbol - tables to be touched when the symbol was already bound (Radar bug - #2580180).
  • - -
  • Fixed a bug in the dynamic linker where it would hang the - program when a -run_init_lazily library is used. (Radar bug - #2582778).
  • -
- -
Changes since the last release (cctools-353 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed a bug in the implementations of two of new lookup with - hint APIs that were added with cctools-353. The two API's that - were fixed were NSLookupAndBindSymbolWithHint () and - _dyld_lookup_and_bind_with_hint() this was causing pbxbuild to - crash in Cheetah4I.
  • - -
  • Fixed a bug in libtool(1) that caused it to crash when a - -filelist containing 1 file was used.
  • -
- -
Changes since the last release (cctools-352 for -the 5.8 MacOS 10.0 release)
- -
    -
  • The PowerPC assembler is now installed in - /usr/libexec/gcc/darwin/ppc/as with the other assemblers - installed in /usr/local/libexec/gcc/darwin/arch/as (Radar - bug 2574173).
  • - -
  • The assembler has been changed to allow the .set directive to - work with expressions of the form a-b and produce an absolute - value for the difference of the symbols even if the symbol are not - yet declared when the .set directive is seen (Radar bug - 2573260).
  • - -
  • The static link editor has been changed to allow compiler to - create position independent (read-only) unwind tables for template - functions that the compiler creates as coalesced symbols (Radar - bug #2564555).
  • - -
  • Changed dyld's calling of shared library init routines in the - prebound case to not touch the symbol table (Radar bug - 2573679).
  • - -
  • The real implementations for three new lookup with hint APIs - have been added. Previously they were just dummy covers that - called the un hinted APIs. They are NSIsSymbolNameDefinedWithHint - (), NSLookupAndBindSymbolWithHint () and - _dyld_lookup_and_bind_with_hint() defined in <mach-o/dyld.h> - (Radar bug 2571272).
  • - -
  • The headers files are now installed in /usr/include and - /usr/local/include (Radar bug 2569880).
  • - -
  • Fixed a bug the static link editor that did not disable - prebinding when symbols in a dynamic library were overridden by - symbols in another dynamic library. Also fixed a bug in the - dynamic linker that incorrectly tried to launch a program where - the same case of symbols in a dynamic library were overridden by - symbols in another dynamic library. This showed up in building a - Cocoa app profiled and the symbols in System framework were being - overidden by the System_profile framework (Radar bug - #2564555).
  • -
- -
Changes since the last release (cctools-351 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed yet another bug in the tool nmedit(1) when used with the - -s file option on a dynamic library hat would cause the module - table to be malformed (specifically the fields nlocalsym and - nextdefsym were likely to have wrong values).
  • -
- -
Changes since the last release (cctools-350 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed a bug in the tool nmedit(1) when used with the -s file - option on a dynamic library of the opposite byte sex that would - cause the module table to be malformed. Also fixed a bug in the - tool nm(1) that would crash on this type of malformed dynamic - library.
  • -
- -
Changes since the last release (cctools-349 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Added the new environment variable - DYLD_NEW_LOCAL_SHARED_REGION to the dynamic link editor which - causes the split shared libraries to not be loaded in to the - system wide shared region (Radar bug 2567132).
  • - -
  • Added support for three new lookup with hint APIs. They are - NSIsSymbolNameDefinedWithHint (), NSLookupAndBindSymbolWithHint () - and _dyld_lookup_and_bind_with_hint() defined in - <mach-o/dyld.h> (Radar bug 2567184).
  • - -
  • Changed the static link editor to call vm_msync() with the - VM_SYNC_DEACTIVATE option to avoid having the kernel keep all the - pages of the input object files mapped and swapping out all other - tasks (Radar bug #2567196). This seems to fix Radar bug - #2538797.
  • -
- -
Changes since the last release (cctools-348 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Changed the static link editor to use the fcntrl() F_NOCACHE - option to avoid having the kernel cache the pages being written to - the output file (may help fix Radar bug #2538797).
  • - -
  • Changed the dynamic link editor to use the new kernel api - reset_shared_file(2) to deallocate the memory for a split dynamic - library when it trys to unload it when a plugin fails to load and - the split library was loaded by the plugin (Radar bug 2549068). - Also see the kernel bug in Radar bug #2545459.
  • - -
  • Made a small optimization in the dynamic linker to inline - bsearch(3) and strcmp(3) which should make launching non-prebound - apps a bit faster (Radar bug 2558068).
  • - -
  • Added support for the new dyld/gdb interface to the dynamic - linker as documented in <mach-o/dyld_gdb.h> (Radar bug - 2559324).
  • -
- -
Changes since the last release (cctools-347 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Clarified the nmedit(1) man page adding a comment about when - both -s and -R are specified (Radar bug 2555491).
  • - -
  • Changed the tool nmedit(1) to handle symbols listed more than - once in the -s file and not produce a misleading error that the - symbol was not found in file to be edited.
  • -
- -
Changes since the last release (cctools-346 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Added the NSAddLibraryWithSearching api (Radar bug - 2535633).
  • - -
  • Added the _dyld_register_func_for_remove_image api for C++ - exception runtime (Radar bug 2553324).
  • - -
  • Fixed a bug in libtool(1) that did not recognize the - -final_ouput flag correctly (needed for Radar bug 2550094).
  • -
- -
Changes since the last release (cctools-345 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Added logging why a binary was not prebound for B&I when - the environment variable RC_TRACE_PREBINDIND_DISABLED is set - (Radar bug 2550094). Also see compiler driver Radar bug - #2550125.
  • - -
  • Fixed a bug in the static link editor when a private extern - symbol is referenced from a from coalesced section that generated - an internal ld(1) error when using -bundle. (Radar bug - 2548925).
  • -
- -
Changes since the last release (cctools-344 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Changed the static link editor to ignore the - -segs_read_write_addr address it reads from the segment address - table if both the -segs_read_only_addr and -segs_read_write_addr - address are zero use 0x10000000 (256meg) for the - -segs_read_write_addr to construct a valid layout for a split - library. (Radar bug 2544818).
  • - -
  • Changed the dynamic link editor to not try to deallocate the - memory for a split dynamic library when it trys to unload it when - a plugin fails to load and the split library was loaded by the - plugin (Radar bug 2544696). Also see the kernel bug in Radar bug - #2545459.
  • - -
  • Fixed a bug in the redo_prebinding(1) tool that caused it to - not work on split dynamic libraries producing dynamic libraries - with the items to be relocated not updated correctly (Radar bug - 2544599).
  • - -
  • Fixed a bug in the redo_prebinding(1) tool that was not - detecting that the dependent libraries of an executable were out - of date with respect to thier prebinding (Radar bug 2544407).
  • - -
  • Changed the static link editor to allow split dynamic library - __LINKEDIT segments to overlap an not disable prebinding (Radar - bug 2543932).
  • - -
  • Changed the redo_prebinding(1) tool so that with the -c (check - only) option it will check the installed dynamic library against - the argument of the tool to see the build time stamps match (Radar - bug 2541232).
  • - -
  • Fixed a bug in the seg_addr_table(1) tool that would cause it - to crash with after a number of messages from malloc are printed - about "Deallocation of a pointer not malloced" (Radar bug - 2540744).
  • -
- -
Changes since the last release (cctools-343 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Added the needed support for the static link editor to do with - the tracking and setting the library ordinal for - -twolevel_namespace against the "primary" library. (Radar bug - 2538835).
  • - -
  • The cctoolslib project can now build the kld libraries now - that the kernel framework installes the libsa headers. Radar bug - 2538829.
  • - -
  • Fixed a bug with the -sub_umbrella option in the static link - editor which causes ld(1) to crash when a library built with the - -sub_umbrella option is linked against. (Radar bug 2538825).
  • - -
  • Fixed a bug with the -allowable_client option in the static - link editor which builds malformed objects for cross bytesex - builds. (Radar bug 2538774).
  • - -
  • Fixed a bug in the static link editor where it was creating - local relocation entries for global coalesced symbols when the - flag -keep_private_extern was specified (Radar bug 2536788).
  • -
- -
Changes since the last release (cctools-342 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed the inadvernt change to the value of the constant - REFERENCED_DYNAMICALLY in <mach-o/nlist.h> that got changed - as part of Radar bug 2534043.
  • -
- -
Changes since the last release (cctools-341 for -the 5.8 MacOS 10.0 release)
- -
    -
  • Fixed a bug in the change to the static link editor for Radar - bug 2530729 where it also changed the reference table for - non-coalesced symbols which it should not have.
  • - -
  • Added the needed constants, macros, and comments to the header - files <mach-o/loader.h> and <mach-o/nlist.h> for - supporting two level name space. As well as support for the - -twolevel_namespace, -flat_namespace and -force_flat_namespace - options. (Radar bug 2534043). The compiler driver does not yet - pass these flags (see Radar 2534146) so -Wl,-option can be used - for now.
  • - -
  • Fixed a bug in the static link editor so that non-lazy - pointers to private extern coalesced symbols work correctly. - (Radar bug 2534011).
  • - -
  • Added the -allowable_client and -client_name options to the - static link editor to allow other framworks and bundles to link - with a subframework built with -umbrella which are not part of - that umbrella. (Radar bug 2533649). The compiler driver does not - yet pass these flags (see Radar 2534146) so -Wl,-option,argument - can be used for now.
  • - -
  • Fixed a bug in the tool seg_addr_table(1) where it was - printing a message about an overlapp when it shouldn't. (Radar bug - 2531831).
  • -
- -
Changes since the last release (cctools-340 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Fixed a bug in the static link editor when it creates a - dynamic library and discards a private extern coalesced symbol - after already keeping a global one. This produced a dynamic - library that can't be linked against as reference table has the - wrong type of reference (Radar bug 2530729).
  • - -
  • Added the -sub_umbrella option to the static link editor. - (Radar bug 2530028).
  • - -
  • Fixed a bug in the tool otool(1) where it was printing a - message about a Stray PPC_RELOC_PAIR relocation entry when it - shouldn't. (Radar bug 2523845).
  • - -
  • Added the kld(3) interfaces as requested by the driver group. - (Radar bug 2523649).
  • - -
  • Changed the nmedit(1) and strip(1) commands to allow the file - listing symbol names not to end in a new line. (Radar bug - 2520711).
  • - -
  • Changed the file(1) command to print "CFM binary" instead of - data for CFM binaries. (Radar bug 2511106).
  • - -
  • Fixed a bug in the dynamic link editor where it would used the - wrong global coalesced symbol if the program overrides a symbol - used by a shared library library init routine in a library that - also defines the shared library init.. (Radar bug 2511358).
  • - -
  • The dynamic library was changed to allow the environment - variables that effect which libraries a program uses to let root - always use them even for set uid and set gid programs (Radar bug - 2497678).
  • - -
  • The man page for rld was moved from the file rld.3l to rld.3 - so man rld will work correctly. (Radar bug 2505760).
  • - -
  • The sizes of the data structures in the dynamic linker have - been tune to match the Kodiak1G7 Finder. (Radar bug 2504987).
  • - -
  • The support to allow a shared library routine to be marked to - have its initialization routine run on first use of the library by - the program rather than at program start up when the program is - launched prebound is now extened to module initialization routines - (C++ static initializers). This is done with the shared library is - built via the flag -run_init_lazily. Until Radar bug #2491001 is - fixed this option can't be specified directly to the compiler - driver cc(1). For now the linker option can be used via the - -Wl,-linker_option,argument compiler - driver option. This feature is broken in the Kodiak1G7 kernels, - see Radar bug #2504021. (Radar bug 2502941).
  • - -
  • Fixed a bug in the static link editor where it generates a - warning about the use of a global coalesced symbol not coming from - the first dynamic library when it shouldn't. (Radar bug - 2503703).
  • - -
  • Fixed a bug in the static link editor where a global coalesced - symbol is repodted as a multply defined symbol when first defined - in a dynamic library then in a static library. (Radar bug - 2503694).
  • - -
  • Fixed a bug in the static link editor when a private extern - coalesced symbol is defined in a dynamic shared library and the - static link editor creates a modlule table entry with the wrong - number of external defined symbols. This results in a malformed - dynamic library. (Radar bug 2503688).
  • - -
  • Changed the tools nmedit(1) and strip(1) to not change global - coalesced symbols into statics or strip them. (Radar bug - 2503670).
  • - -
  • Fixed a memory leak in the NSCreateObjectFileImageFromFile() - API. (Radar bug 2500014 ).
  • -
- -

Notes Specific to Release 5.7 (MacOS X Public -Beta)

- -

New Features

- -

Automatic initialization of dependent libraries

- -

The dynamic linker now calls shared library initialization -routines in their dependent order (Radar bug #2441683).

- -

The new function __initialize_Cplusplus() now can be called from a -shared library initialization routines to cause the static C++ -objects in the library to be initialized. This them allows shared -library initialization routines to make use of statically initialized -C++ objects. (Radar bug 2441683).

- -

Update to module termination functions

- -

The dynamic linker now supports module termination functions for -all types of images (executables, plugins that are not unloaded and -shared libraries). This will allow the C++ compiler to use module -termination functions for destructors instead of atexit(3) so that a -C++ plugin that has a destructor being unloaded does not cause a -crash in atexit(3).

- -

Update to support for managing the list of globally exported -names

- -

If you are building a dynamic library you nolonger have to do and -"ld -r" of all of your object files into one object file. The tool -nmedit(1) now can be run on dynamic libraries. Further -__private_extern__ symbols can now be used in modules of dynamic -libraries that also have definitions of global symbols. (Radar bug -2420307 ).

- -
Changes since the last release (cctools-339 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Changed the dynamic link editor so that the debugger interface - does not cause the task being debugged to hang. (Radar bug - 2487248).
  • -
- -
Changes since the last release (cctools-338 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Updates the cctools project with the edited release notes from - tech pubs. (Radar bug 2510274).
  • -
- -
Changes since the last release (cctools-337 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Fixed a bug in the assembler that would not set the correct - value for the trailing N_FUN stab which was the difference of a - symbol at the end of the function and the function symbol when the - function was large. (Radar bug 2504182).
  • -
- -
Changes since the last release (cctools-336 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Fixed a bug in the static link editor when a private extern - symbol is referenced from a from coalesced section that generated - an internal ld(1) error. (Radar bug 2497954).
  • - -
  • The segment address table tool, seg_addr_table(1), was changed - to allocate the read-only region of split libraries starting at - 0x70000000 and the read-write regions starting at 0x80000000. - (Radar bug 2496843).
  • - -
  • Changed the dynamic linker to align the stack it starts using - to 32 bytes where previously it was aligened to 16 bytes. (Radar - bug 2495403).
  • - -
  • Changed the tool nmedit(1) to make it compatible with an - upcoming compiler change that creates a new an end of function - symbolic table entry. This new entry has an empty name for a N_FUN - stab which nmedit(1) previouly generated an error when - encountered. (Radar bug 2495413).
  • -
- -
Changes since the last release (cctools-335 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Added support for marking coalesced symbols and to not appear - in a static libraries table of contents. This will be used for - RTTI data genetated by the C++ compiler. (Radar bug 2494286).
  • - -
  • Fixed a bug in the dynamic linker which would crash in - _dyld_image_containing_address if a plugin was unloaded. This - showed up in Kodiak1E5 with - /Developer/Applications/OpenGLInfo.app/Contents/MacOS/OpenGLInfo. - (Radar bug 2493911 also 2496107).
  • -
- -
Changes since the last release (cctools-334 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Fixed a bug resulting in an internal error in the static link - editor when linking objects with private extern coalesced symbols. - (Radar bug 2493452).
  • - -
  • Fixed a bug in the static link editor when creating relocation - entries for literal pointer sections used by Objective-C for split - libraries. This would cause the dynamic linker to crash the - program when the library was not loaded at its prefered address. - (Radar bug 2493445).
  • - -
  • Fixed a bug in the dynamic linker with respect to - @executable_path not finding a library sometimes. (Radar bug - 2493400).
  • -
- -
Changes since the last release (cctools-333 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Added support to allow a shared library routine to be marked - to have its initialization routine run on first use of the library - by the program rather than at program start up when the program is - launched prebound. This is done with the shared library is built - via the flag -run_init_lazily. Until Radar bug #2491001 is fixed - this option can't be specified directly to the compiler driver - cc(1). For now the linker option can be used via the - -Wl,-linker_option,argument compiler - driver option. (Radar bug 2490396).
  • - -
  • The verification tool has been changed not to generate an - error message if a library is not found in the segment address - table if specified. Also all checks for conventional path names of - dynamic libraries has been removed. (Radar bug 2490411).
  • - -
  • The segment address table tool, seg_addr_table(1), was changed - to pack all the split libraries into the first 128meg of a split - 256meg region. Also it now checks so that only the first 128meg of - a 256meg split segment is allocated. (Radar bug 2490413).
  • -
- -
Changes since the last release (cctools-332 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Changed the dynamic linker for gratuitous changes to - load_shared_file() in Kodiak1E. (Radar bug 2484973).
  • - -
  • Fixed a bug in strip(1) and nmedit(1) which produces bad - outputs for fat files with more than one architecture. (Radar bug - 2484851).
  • -
- -
Changes since the last release (cctools-331 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Fixed a bug in the dynamic linker that caused programs to - crash that used used signal() when trying to fully bind the signal - handler which showed up in Kodiak1C4. (Radar bug 2483733 ).
  • - -
  • Fixed a bug in the tool seg_addr_table(l) when the -update - operation was used where it would sometimes not update the entries - to be updated with the correct address. Also added the - -disablewarnings option. (Radar bug 2482327).
  • - -
  • The tool nmedit(1), the dynamic and static linker has been - changed to allow nmedit(1) to be run on dynamic libraries. (Radar - bug 2420307).
  • - -
  • The dynamic linker has the changes need to support the changes - in the load_shared_file() interface. (Radar bug 2480801).
  • -
- -
Changes since the last release (cctools-330 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • The cctools-331 project has the change that was missed for the - Kodiak1C directory layout so that the release notes are installed - in /Developer/Documentation/ReleaseNotes/CompilerTools.html - instead of - /System/Developer/Documentation/ReleaseNotes/CompilerTools.html as - was changed for Kodiak1A.
  • -
- -
Changes since the last release (cctools-329 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • The dynamic linker has a fix for a bug that was introduced - with the code to call shared library initialization routines in - their dependent order for an edge case that caused the program to - crash in dyld. The edge case is when a shared library - initialization routine ends up depending on the executable and - there are undefined symbols (Radar bug 2477856).
  • - -
  • The dynamic linker now uses the variable _cpu_has_altivec and - the new kernel trap processor_facilities_used() to determine when - to save fp and altivec registers (Radar bug 2477859).
  • - -
  • The cctools-330 project has the changes for the Kodiak1C - directory layout so that /Library/Frameworks is used instead of - /MacOSX/Library/Framework as was changed for Kodiak1A (Radar bug - #2477862).
  • - -
  • Fixed an error message in the static linker for the incorrect - usage of the -umbrella flag where -sub_framework was used where - -umbrella should have been used (Radar bug 2477866).
  • - -
  • Changed the static linker, libtool and the assemblers so they - once again send messages to ProjectBuilder (Radar bug - 2473864).
  • -
- -
Changes since the last release (cctools-328 for -the 5.7 MacOS X Public Beta release)
- -
    -
  • Fixed a bug in the strings(1) command that caused it not to - read standard input if any command line argument was specified - (Radar bug #2459126).
  • - -
  • The dynamic linker now calls shared library initialization - routines in their dependent order (Radar bug 2441683).
  • - -
  • The new function __initialize_Cplusplus() now can be called - from a shared library initialization routines to cause the static - C++ objects in the library to be initialized. This them allows - shared library initialization routines to make use of statically - initialized C++ objects (Radar bug 2441683). This requires the - dylib1.o from the Csu-33 project (Radar bug 2466821).
  • - -
  • The dynamic linker now supports module termination functions - for all types of images (executables, plugins that are not - unloaded and shared libraries) (Radar bug #2469527). This requires - the crt1.o from the Csu-33 project (Radar bug #2466821).
  • - -
  • A check has been added to the PowerPC assebler to check the - range of a PPC_RELOC_BR14 and PPC_RELOC_BR24. Previously it - assembled the branch instructions wrong that overflowed without - any error (Radar bug #2469441).
  • - -
  • Added the new routines NSCreateCoreFileImageFromFile(3) and - _dyld_debug_task_from_core(3) to support getting the information - about the state of the dynamic libraries in a core file (Radar bug - #2155790).
  • - -
  • Created the man pages NSModule(3) and NSObjectFileImage(3) - (Radar bug #2469604).
  • - -
  • Fixed a bug in libtool/ranlib that did not deal with zero - length archive members that had long names and used 4.4BSD - extended format #1 and caused ranlib to crash (Radar bug - #2460604).
  • - -
  • Changed nmedit(1) and strip(1) to allow Macintosh \r's in the - files specified with lists of symbols (Radar bug #2458346).
  • - -
  • Fixed a few bugs in the seg_addr_table(l) tool. The first was - a problem with not correctly reporting the previous file name that - had an address that matched the table when another library did not - match the table's address. The second was when -upate was used and - a new library like a _profiled version was added with a 0x0 - address and there was an existing version with an assigned address - the tool complained abou the new library not having the correct - address (Radar bug #2469876).
  • - -
  • Changed the seg_addr_table(l) tool to check to make sure it - does not assign any addresses above 0xc0000000 since this address - space is not available on intel in user space (Radar bug - #2418080).
  • - -
  • Changed the PowerPC assembler to check to make sure that 14 - bit branch instructions do not overflow (Radar bug #2469441).
  • - -
  • Cleaned up the yet to be implemented NSReplaceModule() API, - added enum for other link edit errors and changed the yet to be - implemented NSCreateObjectFileImageFromMemory() API to return - NSObjectFileImageFailure (Radar bug #2469558).
  • - -
  • Changed the checksyms(l) tool to check to allow debug symbols - for _debug frameworks and libraries (Radar bug #2469760).
  • - -
  • Changed libtool(1) to pass the -whatsloaded flag on to ld(1) - (Radar bug #2469803).
  • -
- -
Changes since the last release (cctools-327 for -the 5.6 MacOS X Public Beta release)
- -
    -
  • The cctools-328 project has the change to the new directory - layout for /usr/local/lib/system instead of - /AppleInternal/Developer/System.
  • -
- -
Changes since the last release (cctools-326 for -the 5.6 MacOS X DP4 release)
- -
    -
  • The cctools-327 project has the changes to support the new - directory layout. The old layout can still be built from the - cctools-327 project if RC_RELEASE is Gonzo and the -othercflags - -D__GONZO_BUNSEN_BEAKER__ is defined.
  • -
- -

Notes Specific to Release 5.6 (MacOS X -DP4)

- -

New Features

- -

Support for using shared page table entries on the PowerPC with -dynamic libraries

- -

For the current generation of PowerPC chips to be able to share -the page table entries among different processes everything mapped -from one 256meg boundary to another 256meg boundary must be the same -in the different processes. This is has not been possible with MacOS -X Mach-O shared libraries as the code and data for each shared -library is staticly linked such that the virtual address of the data -immediately follows the code. And since the data for each process is -different in each process shared page table entries can't be -used.

- -

To make it possible for the current PowerPC chips to be able to -use shared page table entries a new form of MacOS X Mach-O shared -libraries can now be created and used starting with the MacOS X DP4 -release. The new form of shared libraries splits the code and data in -to two groups. There is one group for the read-only segments -generated by the compiler system and one group for the read-write -segments.

- -

To create a the new "split" form of shared libraries the new -option -segs_read_only_addr <hex_address> is used -to specify the preferred virtual address of the read-only segments -(where -seg1addr <hex_address> is continued to be -used for the existing "flat" non-split shared libraries). The address -of the read-write segments is specified with --segs_read_write_addr <hex_address> or defaults -to the address of the read-only segments plus 256meg -(0x10000000).

- -

Until Radar bug #2443215 is fixed these options can't be specified -directly to the compiler driver cc(1). For now the linker -options can be used via the --Wl,-linker_option,argument compiler -driver option.

- -

When creating a shared library in the split the read-only segments -must not contain any relocation entries. So the used of anything but -the default -read_only_relocs error is not allowed with the -split form of shared libraries.

- -

The kernel starting with the MacOS X DP4 release will reserve two -256meg regions for these split shared libraries to be loaded into -every process that uses the dynamic linker. All shared libraries -having the split form must be placed in these regions. To make it -easier to maintain the preferred virtual addresses of shared -libraries an alternate way of specifying their addresses will be used -by the projects built by Apple's Build and Integration team for MacOS -X. This will involve using a "segment address table" for all dynamic -libraries. This segment address table will be built by Apple's Build -and Integration team and installed in -/AppleInternal/Developer/seg_addr_table. The segment address table -will have entries for each shared library containing its install name -and its -seg1addr or pair of addresses for its --segs_read_only_addr and -segs_read_write_addr. Then -specifying the address of a shared library will be done with the -option -seg_addr_table -/AppleInternal/Developer/seg_addr_table. Since it may not be -possible to get all project building shared libraries to change to -using the -seg_addr_table option in a timely manner, this can -also be specified via an environment variable. The environment -variable LD_SEG_ADDR_TABLE can be set to the file name of the -segment address table and if so the static link editor will ignore -any -seg1addr, -segs_read_only_addr, --segs_read_write_addr and -seg_addr_table arguments and -will then use the addresses from the table.

- -

The local tool seg_addr_table(l) is also provided for used by -Apple's Build and Integration team to build and maintain the segment -address table. See the man page for more details.

- -

Radar entry #2415906.

- -
Changes since the last release (cctools-325 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Fixed a bug NSCreateObjectFileImageFromFile(3) where it does - not vm_deallocate(2) the memory for an object file if it is not an - MH_BUNDLE type. Radar bug #2459727.
  • -
- -
Changes since the last release (cctools-324 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Fixed a bug in the static link editor which caused it to - crash. Most notably when run via libtool with the error - "/usr/bin/libtool: fatal error in ld".
  • -
- -
Changes since the last release (cctools-323 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Changed the dynamic link editor to support using just prebound - dynanmic libraries when there are coalesced symbols.
  • - -
  • Fixed a bug in the static link editor when linking coalesced - symbols that only appear in dynamic libraries getting a mutiply - defined symbol error that shouldn't.
  • - -
  • Fixed a few bugs in the seg_addr_table (l) tool. The first was - a problem with not correctly stepping over the fixed regions not - to allocate when doing a -relayout or an -update. The second was - with using a -seg_addr_table argument and it failing with a can't - open error.
  • -
- -
Changes since the last release (cctools-322 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Changed again the cctools and cctoolslib projects to leave - things in /System/Library when built for the Space release train - (changed back from cctools-322). The release notes are put into - /MacOSX/Documentation/Developer/ReleaseNotes instead of - /System/Documentation/Developer/ReleaseNotes for the Space - release. Also the libraries that are part of the System framework - are installed in /AppleInternal/Developer/System instead of - /Local/Developer/System for the Space release. The project - currently relys on RC_RELEASE being set to Space and the macro - __SPACE__ being defined. When this becomes the default for the - Gonzo release train these things will be tweaked to make this - happen by default for the Gonzo release train.
  • - -
  • Fixed a bug in the tool redo_prebinding(1) which could cause a - shared library initialization routine not to be called. Radar bug - #2450931.
  • - -
  • Changed the dynamic linker to use VRsave to know which Altivec - registers to save before calling shared library initialization or - module initialization routines. With gcc 2.95 now the default, - VRsave is now correctly set. Radar bug #2450639.
  • - -
  • The -checkonly option has been added to the seg_addr_table(l) - tool at the request of Apple's Build and Integration team. See the - man page for details.
  • - -
  • The tool check_dylib(l) has been created for Apple's Build and - Integration team. See the man page for details.
  • -
- -
Changes since the last release (cctools-321 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Changed the cctools and cctoolslib projects to build and put - things in /MacOSX/System instead of /System/Library when built for - the Space release train. Also the release notes are put into - /Developer/ReleaseNotes instead of - /System/Documentation/Developer/ReleaseNotes. The project - currently relys on RC_RELEASE being set to Space and the macro - __SPACE__ being defined. When this becomes the default for the - Gonzo release train these things will be tweaked to make this - happen by default for the Gonzo release train.
  • - -
  • Fixed the end(3) man page to correctly reference get_end(3). - Radar bug #2448020.
  • -
- -
Changes since the last release (cctools-320 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Changed the assembler so the built in section directives - .objc_class_names, .objc_meth_var_types and .objc_meth_var_names - now use the (__TEXT,__cstring) section. Radar bug #2447117.
  • - -
  • Changed checksyms(l) not to check that objc_unique was run on - the file. Radar bug #2448096.
  • - -
  • Edited the dyld(1) man page to fix its readablity. Radar bug - #2438996 and #2392392.
  • -
- -
Changes since the last release (cctools-319 for -the 5.6 MacOS X DP4 release)
- -
    -
  • The static linker now has support for guarding against direct - linking of non-umbrella frameworks via the -umbrella - option. See the ld man page for more details. Radar bug #2443212. - Until Radar bug #2443215 is fixed this option can't be specified - directly to the compiler driver cc(1). For now the linker - option can be used via the - -Wl,-linker_option,argument compiler - driver option.
  • - -
  • Changed the cctools project to install dyld's images.h and - stuff/bool.h into - /System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/dyld - . Radar bug #2376135.
  • -
- -
Changes since the last release (cctools-318 for -the 5.6 MacOS X DP4 release)
- -
    -
  • The static and dynamic linker now supports a new "split" form - of shared libraries to to reduced wired-memory usage (see above in - the new features section). Radar bug #2438996.
  • - -
  • Changed the checksyms(l) used in the B&I verification - process to not require dynamic libraries have execute bits set. - Also changed checksyms(l) to allow all known MacOS X DP3 dynamic - library install paths as a stop gap until information is provided - by the App Packaging owners as to where are the Apple conventional - install paths.
  • - -
  • Edited the dyld(1) man page to fix its readablity. Radar bug - #2438996.
  • - -
  • Changed the cctools project to no longer install the GNU - source as this is covered by the Darwin project.
  • -
- -
Changes since the last release (cctools-317 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Changed the cctools project to also install librld.a into - /usr/local/lib/ . Radar bug #2436955.
  • -
- -
Changes since the last release (cctools-316 for -the 5.6 MacOS X DP4 release)
- -
    -
  • Changed the cctools project top level Makefile to build both - the cctools and cctoolslib targets when RC_RELEASE is Darwin.
  • -
- -
Changes since the last release (cctools-315 for -the 5.5 MacOS X DP3 release)
- -
    -
  • Fixed a bug in the dynamic linker that did not correctly bind - the modules which define shared library initialization routines - after an unsucessful attempt to launch the program using just - prebound shared libraries. Radar bug #2428317.
  • - -
  • Fixed a bug in the static link editor that generated an error - mesage of the form "malformed object, illegal reference (reference - from a lazy symbol pointer section ..." when linking an object - that was the result of compiling an empty file with the -pg flag. - Radar bug #2431435.
  • -
- -

 

- -

Notes Specific to Release 5.5 (MacOS X -DP3)

- -

New Features

- -

Support removing duplicate debugging information from header -files

- -

The static linker supports removing duplicate debugging -information from header files when this information appears in -multiple object files being linked. This is done with the -Si option -to the static link editor is now the default. To have no symbols -stripped when linking the new -Sn option is now used.

- -

Support the first phase of "coalesced symbols".

- -

I) Goals

- -

The goal of coalesced symbols is to provide the linker support -needed for the C++ compiler to solve problems with generating code -for the following C++ features:

- -
    -
  • implicit template instantiation
  • - -
  • static variables in inline functions
  • - -
  • RTTI
  • -
- -

II) The functionality

- -

A "coalesced symbol" is a true definition of a symbol that may -appear one or more times in the compilation units generated by the -compiler. This will allow the compiler to provide a better user -experience by not forcing the user to tell the compiler exactly where -to output the definition of the symbol, which is problematic in -implementing some of the above C++ features.

- -

The static link editor will allow multiple definitions of a -"coalesced symbol" without any warnings or errors. The static link -editor will output only one instance of each "coalesced symbol" using -the first instance it encounters in the object files being linked. -The static link editor will always output an instance of a "coalesced -symbol" if it appears in the object files being linked even if it -also appears in the dynamic libraries being referenced.

- -

The dynamic link editor will then do its relocation such that only -one instance of each "coalesced symbol" is used throughout the -program.

- -

III) The implementation

- -

A Mach-O new section type, "coalesced", has been be added to the -compiler tools. A "coalesced symbol" will simply be a symbol defined -in a section with the type "coalesced". The assembler has been -changed to accept the new section type identifier "coalesced".

- -

For example to create a "coalesced symbol" named _foo as a 4-byte -integer initialized to one, the following assembly code could be -used:

- -
.section __DATA, __coalesced, coalesced
- .globl _foo
- _foo: .long 1
- -

An example of a template function created as a "coalesced symbol" -could use the following assembly code:

- -
.section __TEXT, __template, coalesced, - pure_instructions
- .globl _template_func
- _template_func:
- li r3,1
- blr
- -

Once the compiler group establishes conventional sections for -various C++ "coalesced symbols" we will add built-in assembler -section directives like: .template, .coalesced_data, .rtti_data as -equivalents for the above section directives.

- -

A new section type constant, S_COALESCED, has been added to the -header file, <mach-o/loader.h> which describes the Mach-O -object file format. In the object files created by the assembler -"coalesced" section types have this constant in the flags field of -the section header.

- -

The static and dynamic linker look at the section type to -determine that the symbol is a "coalesced symbol" and allow multiple -definitions of "coalesced symbols".

- -

The static link editor effectively divides up a "coalesced -section" on the boundaries of the symbols in that section, -associating the bytes of the section after each symbol with the -preceding symbol. An object file is considered malformed if a -"coalesced section" did not have a symbol at the first address of the -section.

- -

The symbolic debugging symbol table entries, STABS, for a given -coalesced symbol must be preceded by the new begin nsect symbol stab -(N_BNSYM) and an end with the new end nsect symbol stab (N_ENSYM). -These stabs must be at the start and end of the given coalesced -symbol.

- -

IV) The restrictions

- -

In order to allow the dynamic linker to make sure only one -instance of of each "coalesced symbol" is used throughout the -program, all references to "coalesced symbols" via instructions must -be done indirectly through symbol stubs (for calls) or through -non-lazy pointers. The static link editor enforces this restriction -by checking that there are no direct relocation entries to "coalesced -symbol" using section difference relocation entries, and if any are -found it will considered the object file malformed. This is must be -true even if the coalesced symbol is defined in the same compilation -unit where references are also being made.

- -

The assembler and static link editor have also been changed so -that if a global symbol is referenced in a "coalesced section" that -is defined, an external relocation entry is used instead of a local -relocation entry.

- -

Routines generated for C++ static initializers which are -initializing a "coalesced symbol" must also be a "coalesced symbol". -They do require one code generation change to make it possible that -they could be called more than once and only do the initializing the -first time. This is required so they dynamic linker does not need to -keep track of the initializers for each "coalesced symbol". It will -further require the existing implementation in the GNU compiler to -change slightly. Currently the GNU compiler generates one -initializers function for all C++ static initializers in the -compilation unit. This will have to change so that a separate -function would be created for initializing a "coalesced symbol".

- -

Lazy binding of symbols vs binding all symbols at launch -time

- -

For MacOS X the dynamic linker defaults to lazy binding. That is, -symbols are linked into the program as they are needed. For function -calls this usually happens when the function is called the first -time. For data references this happens before any code that can -reference the data is executed. This generally reduces the time it -takes to start execution of the program by delaying the binding and -initialization of symbols.

- -

With lazy binding, the linking of symbols into the program happens -in a distributed fashion as opposed to binding all symbols when the -program is launched. A program or plugin may be built with the --bind_at_load option to force all symbols to be bound when the -program is launched or when the plugin is loaded.

- -

There can be rare cases where lazy binding and binding at launch -can produce different results. These cases can only occur when a -program is using more than one library that defines the same symbol, -which is not generally a common occurrence. For example a program -could be linked against both a debug and non-debug version of the -same library. Even in this case, usually both libraries define all -the same symbols, so the symbols the program ends up using are those -from the first library listed on the program's link line. However if -the two libraries do not define the same symbols organized in the -same way, that's when these rare cases where lazy binding and binding -at launch can produce different results.

- -

To understand these cases one needs to understand what is meant by -"how a library's symbols are organized" and how that effects linking. -The symbols of a library are organized into modules. Library modules -are the object files that were used to build the library and are -typically the created from compiling one source file. However the -library implementor may combine a number of compiled source files for -a library subsystem into a larger object file that is then used to -build the library. The library implementor will do this when the -interface symbols that make up a subsystem share some private or -internal data, such that all the interface symbols for that subsystem -must be used together for the subsystem to work correctly. Examples -might include a malloc subsystem, a pthreads subsystem, or data base -subsystem. These subsystems may have many interface symbols that must -be used together as they are sharing data among the interfaces. And -the interface symbols would not work correctly if some symbols were -used from one implementation and some from another. Rather than just -let the program work incorrectly in these cases, when the static or -dynamic linker detects these cases they will generate a multiply -defined symbol error. Indicating that parts of more than one -implementation of a subsystem are trying to be used in the same -program.

- -

Now how library modules effects linking is, that if a symbol is -needed to resolve an undefined reference, the first library module in -the list of libraries that has a definition is used. Then not only is -the symbol that resolves the undefined reference used from the -library module but all symbols in that same library module are then -used.

- -

So when more than one library that defines the same symbol is -used, the static and dynamic linkers must select a definition for the -symbol to be used from one of the libraries. As stated above, the -first library module in the list of libraries that has a definition -is used. Then all the symbols from that library module are then used. -So which library modules get used by a program is a function of which -undefined references must be resolved, the order they are resolved -and which symbols are defined in each library module.

- -

For lazy binding and binding at launch the list of undefined -references that must be resolved are typically different. For lazy -binding this usually is a subset of the undefined symbols that a -program uses. So if more than one library is used by the program that -defines the same global symbols but are organized into different -library modules, it is possible that depending on which undefined -references are need to be resolved that different library modules -maybe selected. In the case of lazy binding a first subset of the -symbols may select a library module from one library and a second -subset of symbols may select a library module from a different -library. This may lead to multiply defined symbol errors. Or may lead -to symbols being used from different implementations of a -subsystem.

- -

But in the common case, if no two libraries that are used by a -program define the same symbols there is not a difference in lazy -binding and binding at launch. Further if there is more than one -library that defines the same symbols and the are organized into the -same library modules again there is no difference in lazy binding and -binding at launch. For MacOS X post PR2, the static link editor, now -detects cases where lazy binding and binding at launch could produce -different results, and issues a warning. The warning suggests the use -of the -bind_at_load option. Also for MacOS X post PR2, the dynamic -linker ensures that symbols in a program built with the -bind_at_load -option, are the same as the static link editor determined would be -used. See Radar bug #2378121.

- -
Changes since the last release (cctools-314 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Fixed a bug in the dynamic linker that did not save volatile - floating point or Altivec registers before calling shared library - initialization or module initialization routines. Radar bug - #2424571.
  • - -
  • Fixed a bug in the dynamic linker that did not fully bind - library initialization routines which had private extern - references. Radar bug #2423809.
  • - -
  • Removed the references to Rhapsody from the libtool man page. - Radar bug #2399334.
  • -
- -
Changes since the last release (cctools-313 for -the 5.5 MacOS X PR3 release)
- -
    -
  • The environment variable DYLD_ABORT_MULTIPLE_INITS has been - added as a debugging aid. When set it causes the program to abort - when multple library initialization routines are being run which - can happen if code called via a library initialization routine - makes a call to a dyld API. Then under the debugger it is easy to - do a back trace and find the code that is making the call to a - dyld API via code called from a library initialization routine. - Radar bug #2423143.
  • - -
  • Re-fixed a bug in the dynamic linker that did not fully bind - library initialization routines before calling them. There was a - case with Classic crashing. Radar bug #2413950.
  • - -
  • New the API _dyld_debug_set_error_func() has been added to the - dyld debug API set to better determine what has happened when a - dyld debug API returns DYLD_FAILURE. Radar bug #2421770.
  • - -
  • The dynamic linker was changed to send a DYLD_MODULE_REMOVED - and then a DYLD_IMAGE_REMOVED event when the plugin is unloaded. - This will allow the debugger to know the plucin is nolonger - present in the task. Radar bug #2421760.
  • - -
  • The public release notes have been edited by the Tech Pubs - group for DP3. Radar bug #2420736.
  • - -
  • The tool nmedit is now installed in /usr/bin instead of - /usr/local/bin so that Project Builder can use it for export - lists. Radar bug #2396595.
  • -
- -
Changes since the last release (cctools-312 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Fixed a bug in the dynamic linker that did not fully bind - library initialization routines before calling them. Radar bug - #2419089.
  • -
- -
Changes since the last release (cctools-311 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Changed the static linker to cleanup the code gen of the - compiler where the compiler generates an indirect call to a - function forward defined. This code gen caused a problem when the - dynmaic linker was trying to fully bind a library initialization - routine because the indirect call in this case does not have an - undefined reference in the object module but rather a definition. - This then caused initialization routines to be interleaved when - this call was lazy bound. Radar bug #2417690.
  • -
- -
Changes since the last release (cctools-310 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Fixed a bug in the static linker that caused gdb to print - variables as <incomplete type>. This can only occur if an - incremental link is done as part of building the image (aka ld - -r). Radar bug #2415697.
  • -
- -
Changes since the last release (cctools-309 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Fixed a bug in the static linker that incorrectly printed a - warning message about symbols used from earilier dynamic libraries - and suggesting the use of -bind_at_load when it shouldn't. Also - fixed one more case where something can be successfully staticly - linked with -bind_at_load and then fails to link with a multiply - defined error from the dynamic linker when executed. Radar bug - #2378121.
  • - -
  • Fixed a bug in the static linker that did not recognize the - -Sn option. Radar bug #2415456.
  • -
- -
Changes since the last release (cctools-308 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Fixed a bug in the dynamic linker that did not fully bind - library initialization routines before calling them. Radar bug - #2413950.
  • -
- -
Changes since the last release (cctools-307 for -the 5.5 MacOS X PR3 release)
- -
    -
  • Support in the static linker was added to remove duplicate - BINCL/EINCL stab groups. This is enabled with the -Si option to - ld(1) and is the default (see new features above). To get the - static linker to not strip any symbols the new option -Sn can be - used. Radar bug #2410704.
  • - -
  • Changed <mach-o/dyld.h> so that it does not use "bool" - when compiled with the C++ compiler. Radar bug #2412898.
  • -
- -
Changes since the last release (cctools-306 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Added the first phase of support for "coalesced symbols". - Currently only support for -dynamic code gen for PowerPC has been - tested (intel and static code gen is not yet tested). The support - is complete except for prebinding with coalesced symbols. Because - of that reason use of coalesced symbols should not yet be used in - B&I builds. See new features above. Radar bug #2411273.
  • - -
  • Changed the references to "Rhapsody" to "MacOS X" on the - assembler man page. Radar bug #2399294.
  • - -
  • Removed the the references to "Rhapsody" on the ar(5) man page - and the statement that the extended format was not supported as - support for it was added back in the Rhapsody DR2 release. Radar - bug #2399338.
  • - -
  • Added support for the G4 (7400) cpu subtype to the compiler - tools. Radar bug #2397523.
  • - -
  • The static and dynamic link editors were changed to fix cases - where lazy binding can result in two different globals functions - being used (or multiply defined errors). In these cases the - program needs to be built with the -bind_at_load flag (or run with - DYLD_BIND_AT_LAUNCH set) and the static link editor now detects - these cases and issues a warning suggesting the use of the - -bind_at_load option and then lists the symbols which are used - from dynamic libraries where there is an earilier dynamic library - with a definition of the symbol. See notes above about "Lazy - binding of symbols vs binding all symbols at launch time". Radar - bug #2378121.
  • - -
  • Added the dyld environment variable DYLD_IMAGE_SUFFIX which - can be set to a library or framework suffix to be used by the - program. Also included in this change is an optimization that - removes some system calls in the case a library has already been - loaded. of Radar bug #2384450
  • - -
  • Added printing a line of the form "[Logging for Build - & Integration] Used dynamic library: dylib_name", where - dylib_name is a dynamic library being used in the link. This is - done when the environment variable RC_TRACE_DYLIBS is set. Radar - bug #2389955.
  • - -
  • Fixed a bug in the assemblers where it would ignore a line - followed by a single '#'. Radar bug #2393418.
  • - -
  • The tool, nmedit(l), was fixed so that "-arch i386" can be - used as the i386 architecture family type like the other object - file tools. This bug caused nmedit(l) with "-arch i386" not to - work on object files that had the i486 cpusubtype. Radar bug - #2405763.
  • - -
  • The Intel assembler was changed to assemble the 'fild' - instruction the same as the "filds" and the "fist" instruction the - same as the "fists". Radar bug #2410226.
  • - -
  • The cctools project was changed to install the external - release notes instead of the Documentation project. Radar bug - #2411118.
  • -
- -

Notes Specific to Release 5.4 (MacOS X -PR2) 

- -

New Features

- -

Dynamic shared libraries now can have a dynamic shared library -initialization routine (Radar bug #2367584). This routine is -specified to libtool(1) with the new "-init symbol_name" -argument. The library initialization routine is called before any -symbol is used from the library including C++ static initializers -(and #pragma CALL_ON_MODULE_BIND routines). If cc(1) -dynamiclib is -used instead of libtool(1), you may need to pass the argument with --Wl,-init, symbol_name until Radar bug #2367569 is fixed. Also -gdb(1) will not read the symbols of dynamic shared libraries with -library initialization routine due to Radar bug #2367576.

- -

The dynamic linker now supports shared library install names that -start with "@executable_path/" and substitutes the directory path of -the executable for "@executable_path/"when locating the library. This -requires a kernel from Beaker2H3 or later. Without that kernel, this -feature can only be used if argv[0] is in fact the name of -the executable and it is an absolute path or relative to the current -directory (contains at a '/' in the argv[0] string). The -kernel in Beaker2H3 was extended to pass the first argument to exec() -to the entry point interface, and having that kernel this feature can -be used no matter what argv[0] is.

- -

The NSLinkModule() API now has an option to cause it to return -when there is an error loading the module and a new API -NSLinkEditError() to get the error information. To use this the -constant NSLINKMODULE_OPTION_RETURN_ON_ERROR needs to be or'ed into -the options parameter to NSLinkModule(). Then if NSLinkModule() -returns NULL the error information can be retrieved with -NSLinkEditError().

- -

The NSLINKMODULE_OPTION_RETURN_ON_ERROR option is an alternative -method to the existing dyld error handling which fits better with a -plugin model. With the NSLINKMODULE_OPTION_RETURN_ON_ERROR option, -the model for handling errors is to simply return without any changes -to the program. To support this model of error handling a new API has -been added to allow the programmer to get the error information that -the dyld error handlers would normally have gotten. The API is -similar to the dyld linkEdit error handler except that all the -parameters are passed as pointers to be filled in.

- -
extern void NSLinkEditError(
- NSLinkEditErrors *c,
- int *errorNumber,
- const char **fileName,
- const char **errorString);
- -

The last two parameters return pointers to static buffers -allocated in the dynamic linker which get reused on subsequent calls -to NSLinkEditError(). The NSLinkEditErrors enum has been extended to -include NSLinkEditUndefinedError and -NSLinkEditMultiplyDefinedError.

- -
Changes since the last release (cctools-305 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Fixed a bug in the dynamic linker where a non-lazy reference - from a dynamic library module that only had private extern symbol - definitions was not getting bound. This showed up in keymgr.o from - libcc_dynamic.a referencing the symbol ___eh_global_dataptr. Radar - bug #2391709.
  • -
- -
Changes since the last release (cctools-304 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Fixed a bug in ld(1) when -U flags to allow undefined symbols - and LD_PREBIND was set it would exit non-zero. Radar bug - #2389026.
  • -
- -
Changes since the last release (cctools-303 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Backed out the fix for Radar bug #2378121 done in cctools-303 - as it caused progams like Terminal to launch very slowly. Terminal - is calling signal(2) which causes the executable containing the - signal handler to be fully bound. The fix for Radar bug #2378121 - in this case caused a big slow down in the case of fully - binding.
  • -
- -
Changes since the last release (cctools-302 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Fixed a bug where gprof -S crashed when run on the Appkit - trying to produce an order file. Radar bug #2377933.
  • - -
  • Changed a message printed by checksyms(l) from using "release - control" to using "Build & Integration". Radar bug - #2377929.
  • - -
  • Fixed a bug in the dynamic linker in a case where lazy binding - can result in two different globals functions being used. Radar - bug #2378121.
  • - -
  • Picked up the Tech Pubs edited dyld(1) man page. Radar bug - #2366767.
  • -
- -
Changes since the last release (cctools-301 for -the 5.4 MacOS X PR2 release)
- -

Fixed a bug where the intel instruction "setc %al" did not -assemble. Radar bug #2374684.

- -

Fixed a bug in the static link editor where the wrong private -extern function could be called from a dynamic library. Radar bug -#2374465. This resulted in throw() and dynamic_cast() to crash when -in a shared library. The Finder was the one having these problems -(Radar bugs 2369470 and 2364994).

- -
Changes since the last release (cctools-300 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Fixed a bug in the cctools project that caused System - Framework to come up with an undefined for the symbol - _qsort_load_order_values.
  • -
- -
Changes since the last release (cctools-299 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Dynamic shared libraries now can have a dynamic shared library - initialization routine Radar bug #2367584. See new features - above.
  • - -
  • The PowerPC instruction "vspltisb v1,-1" assembles wrong. - Radar bug #2366525.
  • - -
  • There was a typo in arch 3 man page where "pcc" should have - been "ppc". Radar bug #2366781.
  • - -
  • There was a typo in dyld.1 man page where "effect" should have - been "affect". Radar bug #2366750.
  • - -
  • Fix a bug where the assembler does not catch the error case of - an unterminated .macro directive. Radar bug #2368659.
  • - -
  • The was a bug in nmedit(1) when using -R and processing more - than one architecture it printed an error stating "more than one - symbol" for a symbol listed in the -R file appeared in the input - file. Also changed nmedit(l) to strip all arch's when no -arch - flags are specified to match the behavior of strip(1). Radar bug - #2367598.
  • - -
  • Changed the cctools project when building for Beaker - (RC_OS=macos) to not install its headers into the DSTROOT. Radar - bug #2370826.
  • -
- -
Changes since the last release (cctools-298 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Fixes were made to one of the assembly language interfaces in - the dynamic linker to allow it to be used with CFM vector - libraries. Radar bug #2358962.
  • -
- -
Changes since the last release (cctools-297 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Added support for "@executable_path/" in shared library - install names. See new features above.
  • -
- -
Changes since the last release (cctools-296 for -the 5.4 MacOS X PR2 release)
- -
    -
  • Fixed a bug introduced in the cctools-296 dyld that caused - Terminal (and potentally any program) to crash. This was fixed as - part of the quick looks for Beaker2F and is fixed in the released - Beaker2F1.
  • -
- -
Changes since the last release (cctools-295 for -the 5.4 MacOS X PR2 release)
- -
    -
  • The NSLinkModule() now can return when an error occurs in - loading a module and the new API NSLinkEditError() allows error - information to be retrieved. See new features above.
  • - -
  • Fixed a bug in NSAddLibrary() that did not load the dependent - libraries. This showed up when doing an NSAddLibrary() on Carbon - and then trying to look up a symbol in the QuickDraw library that - Carbon was linked with.
  • - -
  • Added the -v (verification flag) to checksyms(1) to print out - a single line for each type of error checksyms finds. Also added - hacks to checksyms(1) to allow all MacOS X PR1 paths for shared - library install names.
  • -
- -
Changes since the last release (cctools-294 for -the 5.3 MacOS X PR1 release)
- -
    -
  • The sources have had the Darwin copyrights added to them.
  • - -
  • A bug fix was made to the new API - _dyld_image_containing_address() that was added for cctools-294. - The routine would generally return the wrong for anything loaded - with NSLinkModule() or any non-prebound shared library. The values - used for checking the address ranges effectively had the value of - the vmslide (the difference from the staticly linked address and - the address loaded) added twice. So if the vmslide were zero, as - in the case with prebound libraries things it would work but tend - to fail otherwise (except for the executable which worked).
  • -
- -

Notes Specific to Release 5.3 (MacOS X -PR1)

- -

New Features

- -

The NSLinkModule() API now can create private modules and the new -API NSLookupSymbolInModule() allows symbols to be looked up in a -private module. To do this the interface to NSLinkModule() has change -in a compatible way from:

- -
extern NSModule NSLinkModule(
- NSObjectFileImage objectFileImage,
- const char *moduleName,
- enum bool bindNow);
- -

to:

- -
extern NSModule NSLinkModule(
- NSObjectFileImage objectFileImage,
- const char *moduleName,
- unsigned long options);
- -

with the options as follows:

- -
#define NSLINKMODULE_OPTION_NONE 0x0
- #define NSLINKMODULE_OPTION_BINDNOW 0x1
- #define NSLINKMODULE_OPTION_PRIVATE 0x2
- -

The first two are the same as bindNow with a value of FALSE and -TRUE. The private options is what is used to load a private module. -The API for getting to the symbols of a NSModule that has been -privately linked is:

- -
extern NSSymbol NSLookupSymbolInModule(
- NSModule module,
- const char *symbolName);
- -

Then to get the address of the returned NSSymbol, the existing -NSAddressOfSymbol() API can be used.

- -

The NSUnLinkModule() API is now implemented with enough -functionality to make Apache work (Radar bug #2262020). This has been -confirmed by Wilfredo Sanchez the owner of the Apache project. It -currently has the following limitations (to be fixed in future -releases):

- -
    -
  • only works for plugins (can only be called on modules that - were returned by NSLinkModule).
  • - -
  • C++ plugins that have static destructor can't be unloaded. The - program will crash in atexit(3) when the unlinked destructor is - attempted to be called.
  • - -
  • Objective-C plugins should not be unloaded. The Objective-C - runtime has not been updated to know about unloading and the - result is very likely to crash the program.
  • - -
  • The debugger has not been update to know about unloading and - trying to debug a program that unloads it's plugins may confuse or - crash the debugger.
  • -
- -

The interface to NSUnLinkModule has change in a compatible way -from:

- -
extern enum bool NSUnLinkModule(
- NSModule module,
- enum bool keepMemoryMapped);
- -

to:

- -
extern enum bool NSUnLinkModule(
- NSModule module,
- int options);
- -

where the options are:

- -
#define NSUNLINKMODULE_OPTION_NONE 0x0
- #define NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED 0x1
- #define NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES 0x2
- -

The first two are the same as keepMemoryMapped with a value of -FALSE and TRUE. The reset lazy references allows unloaded modules -with only call sites to undefined functions (direct calls not calls -through pointers) to be allowed when unloading and not causing an -undefined symbol error. Then if a subsequent module is loaded that -defines symbols that were previously undefined, the call sites will -then use the new definitions. This is currently only implemented for -PowerPC. For intel it prints a message and exits even if the symbol -gets redefined. This will be fixed for intel in a future release.

- -

Support for module termination functions has been added for -plugins (only). Currently the compiler pragma CALL_ON_UNLOAD (as well -as CALL_ON_LOAD) is not yet implemented to use this feature as -intended. A work around can be done in place of having the -pragma:

- -
void my_term(void)
- {
- /* do module termination */
- }
- /* #pragma CALL_ON_UNLOAD my_term */
- #pragma SECTION data ".section __DATA, __mod_term_func, - mod_init_funcs"
- static void (*dummy)(void) = my_term;
- #pragma SECTION data
- -

The cctools-294 project has an implementation of the FreeBSD -dlopen() interfaces. The header file dlfcn.h and the library libdl.a -are NOT installed or built by the project by default. This is to -avoid automatic configure scripts of projects from using this stuff -in release builds before it can be tested by project owners. If an -when a future version of cctools has a working set of dlopen() -interfaces it will install the header file dlfcn.h and build the -library code by default. Most likely the library code will be in -included in System framework and not a separate libdl.a. At that time -a man page will installed. Currently there is no MacOS X Server -version of the man page and the FreeBSD version must be -consulted.

- -

There is support for managing the list of globally exported names -in cctools that is generally not well known. For managing the list of -globally exported names with a list of global symbols that is -maintained by the developer the existing tools nmedit(l) and strip(1) -can be used. The approach is to build the project normally with full -debugging symbols. Then nmedit(1) is run on that with the list of -exported symbols and the result is placed in the standard $(SYMROOT). -nmedit(1) turns all other global symbols not listed in the file into -statics. That resulting file still has all the debugging symbols and -can be fully symbolically debugged. Then when the file is copied from -the $(SYMROOT) to the $(DSTROOT) in the install process, it is -strip(1)'ed with the usual -S (or other options) to remove debugging -symbols. This leaves the static symbols as well as the global symbols -so that back traces will still have the symbol names. Assuming the -list of symbols is in the file save_syms, the example commands would -be:

- -
nmedit -s save_syms $(OBJROOT)/hello -o - $(SYMROOT)/hello
- strip -S $(SYMROOT)/hello -o $(DSTROOT)/hello
- -

If you are building a dynamic library you may also have to do and -"ld -r" of all of your object files into one object file. You can -also manage the list of globally exported names in your project with -nmedit(1) or strip(1).

- -

In the future there will also be compiler support to use the -external/internal #pragmas that CFM uses. Today you can use the key -word __private_extern__ to get this functionality.

- -

As of cctools-292, the cctools project has been updated to be able -to built with the egcs compiler with no warnings from source code of -the project (the header files in Beaker1I2 still produce -warnings).

- -

The cctools-294 project has been ported and tested on MacOS X -using Beaker1L. To build cctools-294 for MacOS X, first the SDK has -to be installed on a PowerPC machine with -/System/Administration/Installer.app into /Local/Public/MacOSX. Then -the commands to build it are:

- -
# ~rc/bin/buildit -release Beaker cctools-293 RC_OS=macos
- -

Only the profileServer is left to be ported. It is currently not -built for MacOS X when RC_OS=macos.

- -
Changes since the last release (cctools-293 for -the 5.3 MacOS X PR1 release)
- -
    -
  • The cctools-294 version of ld(1) as a fix for a crash that - ocurred when building the CoreGraphicsRIP-30 project for - Beaker1L3.
  • - -
  • The new API _dyld_image_containing_address() was added. It - takes an address and returns TRUE or FALSE depending on if that - address is in any dyld managed image. Radar bug #2325380.
  • - -
  • The man page for libtool(1) has been updated. Radar bug - #2324061.
  • -
- -
Changes since the last release (cctools-292 for -the 5.3 MacOS X PR1 release)
- -
    -
  • The cctools-293 project code has the fixes needed to complile - and use POSIX threads instead of cthreads. This has been tested on - Beaker1I2 compiling with -D_ POSIX_THREADS defined (this is - defined in <unistd.h> for Beaker1J2 but not for Beaker1I2). - Testing could not be done using Beaker1J2 as is too unstable. The - code that tried to use pthreads in cctools-292 will not even - compile when _ POSIX_THREADS is defined.
  • -
- -
Changes since the last release (cctools-291 for -the 5.3 MacOS X PR1 release)
- -
    -
  • The cctools project code now uses POSIX threads instead of - cthreads.
  • - -
  • The default segment alignment in the static link editor when - linking a PowerPC target is now 4K instead of 8K. All other target - architectures have not changed and their default segment alignment - remains 8K. Radar bug # 2277625.
  • - -
  • The cctools project code now compiles with no warnings from - the egcs compiler (header files in Beaker1I2 still produce - warnings).
  • - -
  • Moved the i386 assembler to /usr/local/libexec/i386/as for - MacOS X builds. The assembler driver /usr/bin/as and the compiler - driver /usr/bin/cc are uneffected and will find the assembler in - either the old or new place.
  • -
- -
Changes since the last release (cctools-290 for -the 5.3 MacOS X PR1 release)
- -
    -
  • Fixed a bug introduced in the cctools-288 ld(1) when doing an - ld -r with an indirect entry for a private_extern. This problem - would show up when executing a binary with the error from dyld: - -
      -
    • dyld: /System/Applications/MailViewer.app/MailViewer - Undefined symbols:
      - dyld_lazy_symbol_binding_entry_point
    • -
    -
  • - -
  • The problem in this case was the Message framework built with - the ld(1) that had the bug. This also has been seen in Carbon - apps, with the problem the Carbon framework.
  • -
- -
Changes since the last release (cctools-289 for -the 5.3 MacOS X PR1 release)
- -
    -
  • Fixed a bug in the code added to nmedit for the -p option. The - bug caused uses of nmedit without the -p option and with the -s - option to not find any symbols listed in the -s argument.
  • -
- -
Changes since the last release (cctools-288 for -the 5.3 MacOS X PR1 release)
- -
    -
  • Added the -p option to nmedit(l) which instead of changes - symbols to static changes them to private externs. This option is - allowed by itself without a -s or -R option which then changes all - defined symbols to private extern. This is used to change all the - symbols in libcc_dynamic.a to private extern as the C++ compiler - has never supported the keyword __private_extern__.
  • -
- -
Changes since the last release (cctools-287 for -the 5.3 MacOS X PR1 release)
- -
    -
  • Fixed nmedit(l) to change the indirect symbol table entries - for global symbols it makes static. This problem showed up in - using nmedit for the work around with the egcs compiler and C++ - RTTI common data in a dynamic shared library.
  • - -
  • Fixed ld(1) when doing an ld -r with an indirect entry for a - private_extern. This problem showed up when building the Message - framework and would get the error from ld: "ld: indirect symbol:_y - can not be a private extern". And it also showed up in building - Carbon when using strip which would produce the error message from - ld: "ld: x.o indirect symbol table entry 0 past the end of the - symbol table".
  • - -
  • Fixed ld(1) to correctly relocate non-lazy symbol pointers for - non-global symbols. This can occur in one of three ways when a - global symbol is changed to a non-global, via private_extern and - ld -r, via nmedit and via strip.
  • - -
  • Changed dyld to print on stderr not on stdout for it's - debugging output (Radar bug #2274737).
  • - -
  • Added passing -whyload through libtool(1) to ld(1).
  • - -
  • Fixed a bug so that if a PowerPC binary used the - RESET_LAZY_REFERENCES NSUnLinkModule() option, and it was not - linked with crt1.0, bundle1.o or dylib1.o that has the ".long - dyld_stub_binding_helper" fix it won't crash.
  • - -
  • Changed the message printed when the environment variable - RC_TRACE_ARCHIVES is set from: "RC_TRACE_ARCHIVES archive_name" - to: "[Logging for Build & Integration] Used static - archive: archive_name". Radar bug #2310273.
  • -
- -
Changes since the last release (cctools-286 for -the 5.3 MacOS X PR1 release)
- -
    -
  • The NSLinkModule() now can create private modules and the new - API NSLookupSymbolInModule() allows symbols to be looked up in a - private module. See new features above.
  • - -
  • The NSUnLinkModule() API is now implemented with enough - functionality to make Apache work (Radar bug #2262020). See new - features above.
  • - -
  • The cctools-287 project has an implementation of the FreeBSD - dlopen() interfaces. See new features above.
  • -
- -
Changes since the last release (cctools-285 for -the 5.3 MacOS X PR1 release)
- -
    -
  • Support for module termination functions has been added for - things loaded with NSLinkModule() when NSUnLinkModule() is called. - In this version of cctools NSUnLinkModule() is not implemented - (that will be integrated in a later version). For now to test this - -DTESTING_MOD_TERM needs to be set in RC_CFLAGS.
  • - -
  • Change the use of the i386 cpp macro to __i386__ and ppc to - __ppc__ so this this version of cctools will compile with the - upcoming release of the egcs compiler.
  • -
- -
Changes made in cctools-285
- -
    -
  • Fixed a bug in libtool(1) that was not using NEXT_ROOT when - set to expand -l flags.
  • - -
  • Added printing a line of the form "RC_TRACE_ARCHIVES - archive_name", where archive_name is a archive being put into the - output of libtool(1) -static or being linked against by ld(1). - This is done when the environment variable RC_TRACE_ARCHIVES is - set. Radar bug #2303376.
  • - -
  • Made a change to the way the cctools project builds it's - objects for the System framework. It now creates archives in - /Local/Developer/System for libdyld, librld and libmacho. It - creates profile versions with _pg and -static compiled versions - with _static in the filenames. Radar bug #2268413.
  • - -
  • Removed an incorrect warning in ld(1) that stated - -keep_private_externs must be used with -dynamic. - This would be produced when using ld(1) with -static.
  • - -
  • Fixed a bug in ld(1) that was producing an incorrect error of - the form "indirect symbol table entry 353 past the end of the - symbol table". This can occured when a file is strip(1)'ed and - global symbols are removed. This was found when the CoreGraphics - framework was stripped removing two globals symbols and then the - resulting framework was linked against.
  • - -
  • Fixed a bug in the i386 assembler in assembling the cmpxchg - instruction. Previously this assembled using the opcode from the - i486 manual ( 0F A6/r and 0F A7/r ) and was changed to the opcode - in the Pentium manual (0F B0/r and 0F B1/r). The dissassembly in - otool(1) was also changed.
  • - -
  • Fixed a bug in ranlib(1) (aka libtool) after printing warnings - about with multiple symbols defined different archive members it - crashed with a bus error.
  • - -
  • Fixed a bug in strip(1) when using the -s filename - option on a dynamic library. This showed when linking against a - CoreGraphics framework, the resulting link would fail with a - malformed object error "ilocalsym field plus nlocalsym field of - module table entry 1 past the end of the symbol table".
  • - -
  • Changed the #import <sys/types.h> in ranlib.h to - #include <sys/types.h>. Radar bug #2303937.
  • - -
  • Made cctools 285 build without -DNeXT defined.
  • - -
  • A fix was made to the dyld debug code that get the thread - suppend count of reset correctly for the thread that has the dyld - lock when the dyld debug thread handles a message.
  • - -
  • The fixes were made to the dyld debug code made in cctools - 283.1 were picked up. Includes Radar bug #2286661.
  • - -
  • The fixes to moved the text files gprof.flat and gprof.callg - from /usr/lib to /usr/share made in cctools 281.2 were picked - up.
  • -
- -
Changes made in cctools-284
- -
    -
  • The fix to ar(1), made in cctools-281.1 (Radar bug #2284290) - was merged in. The changed made to fix the dyld debug code made in - cctools-283.1 are not in cctools-284.
  • -
- -
Changes made in cctools-283.1
- -
    -
  • Fixes were made to the dyld debug code for the port to MacOS X - (Mach 3.0) to get it working.
  • -
- -
There are no changes in cctools-283 -clone
- -
Changes made in cctools-282
- -
    -
  • The tools have been ported to MacOS X. The needed code is - #ifdef'ed __MACH30__ which is defined in <mach/mach.h> when - building for MacOS X.
  • -
- -

 

- -

Notes Specific to Release 5.2 (Rhapsody -CR1)

- -

New Features

- -

The compiler tools now support the 4.4bsd archive extened format 1 -for long names (and names with embedded spaces). This is now the -default. The option -L to produce archives using the extended format -and the option -T to truncate names, as previously supported in the -ar(1) command now also apply to ranlib(1) and libtool(1). Radar bug -#1670513.

- -

The header file <mach-o/getsect.h> has been added to the -system as the proper place to get the prototypes of the Mach-O -routines. Radar bug #2227839.

- -

The VMX opcodes have been added to the Rhapsody PowerPC assembler -and are documented in the assembler manual. Radar bug #2237908.

- -

The routine sa_rld_with_symtab() was added for use with the -standalone runtime link editor. Radar bug #2231758.

- -
There are no changes in cctools-281.3 -clone
- -
Changes made in cctools-281.2
- -
    -
  • Moved text files gprof.flat and gprof.callg from /usr/lib to - /usr/share . gprof/Makefile and gprof/gprof.h were changed. Radar - bug #2287470.
  • -
- -
Changes made in cctools-281.1
- -
    -
  • In a stat struct there are three struct timespec's (defined in - sys/time.h). The field name ts_sec was change to tv_sec to match - Posix (Radar bug #2005170). So in for cctools, the use in - ar/archive.c of the field ts_sec was changed to tv_sec in three - places. Radar bug #2284290.
  • -
- -
Changes since the last release (cctools-280 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Changed redo_prebinding to exit with a error code of 3 if the - dependent libraries are out of date. Radar bug #2259447.
  • -
- -
Changes since the last release (cctools-279 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Changed libtool to pass -F and -L flags to objcunique. Radar - bug #2257931.
  • -
- -
Changes since the last release (cctools-278 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • A bug fix was made to the dyld library debug code that fixes a - problem which prevents gdb getting the symbols for dynamic - libraries. Radar bug #2255036.
  • -
- -
Changes since the last release (cctools-277 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • The header file <mach-o/rld.h> was moved to - PrivateHeaders in the System Framework as it uses - <streams/streams.h> in it's API. Radar bug #2249999.
  • -
- -
Changes since the last release (cctools-276 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Changed the handling of unknown i386 and ppc subtypes so that - the routines never fail but return sprintf()'ed strings for the - decriptions. For i386 the string will be of the form "Intel family - X model Y" and for ppc it will be "PowerPC cubsubtype X". Radar - bug #2241690.
  • -
- -
Changes since the last release (cctools-275 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Build fix, the Radar bug #2239280 in strip(1) was using a data - structure after it was free()'ed. The free() call was move after - the last use.
  • -
- -
Changes since the last release (cctools-274 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Fixed a bug in the static link editor where the module name of - dynamic shared library was set wrong. This happened when creating - a dynamic shared library from an archive library member that had a - long name (using the 4.4bsd archive extened format 1). The module - name dynamic shared library would end up like "#1/20" rather than - its correct name. Radar bug #2239283.
  • - -
  • Fixed a bug in strip(1) when stripping a dynamic shared - library. This happened when the stripping was removing a symbol - defined in one module and referenced in other modules. The - library's table of contents was not correctly updated to reflect - this symbol was no longer defined. This would then cause the - static link editor to think the library was malformed as a module - was loaded did not define a symbol as expected in the table of - contents. Radar bug #2239280.
  • -
- -
Changes since the last release (cctools-273 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • The VMX opcodes have been added to the Rhapsody PowerPC - assembler. Radar bug #2237908.
  • - -
  • Fixed a bug that caused NSModuleForSymbol() to return NULL - when called in a module initializer routine on a symbol in that - module. Radar bug #2238301.
  • - -
  • Removed the -arch i586SX and added the following intel x86 - specific subtype archs: pentium, pentpro, pentIIm3 and pentIIm5. - Radar bug #2231830.
  • - -
  • Fixed a bug in dyld that used the wrong segment's address for - executable's base relocation address. It was using the segment - with the lowest address not the first segment's address. Radar bug - #2237029.
  • - -
  • Changed the way the static link editor assigns segment address - of segments that were not specified on the command line. - Previously the static link editor often picked overlapping - addresses for these segments and the link would then fail. Now the - static link editor assigns segment address at the next available - address after the first segment that doesn't overlap with other - segments. So if some segments are assigned address the first - segment must also be assigned, which can be done via -seg1addr or - by name with -segaddr. Radar bug #2237029.
  • - -
  • A missing test was added to the static link editor. This is to - prevent it from producing an executable that is prebound which - would crash when launched and prebinding was disabled. This - happens when too much address space is spanned and the first - segment is more than 24-bits away from a prebound lazy pointer. - This occurred with BlueBox. Radar bug #2237029.
  • - -
  • Fixed a bug in the dyld debug library code the caused it to - crash (usually the debugger). This would tend to happen on - executables being debugged that did not have it headers linked at - the default address. This occurred with BlueBox. Radar bug - #2236161.
  • - -
  • Added the -R filename options to strip(1) and - nmedit(l). This specifies a list of specific symbols to be removed - (or changed to static in the case of nmedit(l)). Also changed the - filename syntax to allow white space around symbol names and - comment lines starting with a '#'. Radar bug #2235926.
  • -
- -
Changes since the last release (cctools-272 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Changed dyld so that it does a fflush(3) after doing any - printing with printf(3) so that ProjectBuilder's launcher gets the - ouput of things like DYLD_PRINT_LIBRARIES and it does not get - buffered in the pipe(2)'ed output. Radar bug #2227265. Was - approved for cctools-268 but was never integrated.
  • -
- -
Changes since the last release (cctools-271 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Fixed two bugs in dyld that prevents programs launching - programs with many frameworks that reference many other - frameworks. Radar bug #2230181.
  • - -
  • The routine sa_rld_with_symtab() was added for use with the - standalone runtime link editor. Radar bug #2231758.
  • -
- -
Changes since the last release (cctools-270 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Build fix, changed libtool(1) -static not to flag -Ldir - and -lx flags as warings as they are valid flags with - -static.
  • -
- -
Changes since the last release (cctools-269 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Build fix, corrected the routine get_toc_byte_sex() which did - not have code to deal with the archive extended format #1. This - would cause ld(1) to think the table of contents was malformed if - the first member after the table of contents was in extended - format #1.
  • -
- -
Changes since the last release (cctools-268 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Build fix, backed off change to libtool(1) to treat incorrect - flags as warnings not hard errors.
  • -
- -
Changes since the last release (cctools-267 for -the 5.2 Rhapsody CR1 release)
- -
    -
  • Build fix, removed getmachhead.o from libmacho/dylib.ofileList - .
  • -
- -
Changes since the last release (cctools-266 for -the 5.1 Rhapsody DR2 release)
- -
    -
  • The program checksyms(l) used in the Build and Integration - build verification pass, now checks that projects are prebound and - has no relocation entries in read only sections. Radar bug - #2227469.
  • - -
  • Changed the profileServer to use bootstrap_register() rather - than bootstrap_check_in() so that it can be started from - /etc/bootstrap.conf. See the man page for details. Radar bug - #2227888.
  • - -
  • The VMX opcodes have been added back in to the assembler. - Radar bug #2227999.
  • - -
  • Changed all of the compiler tools to support the 4.4bsd - archive extened format 1. The tools ranlib(1) and libtool(1) now - take the -L option to produce archives using the extended format - and the -T option to truncate names. The default is -L. Radar bug - #1670513.
  • - -
  • The error message printed in dyld for the case when the path - name of a dynamic library turns out to be a path name of a - directory has been changed. Previously it just printed can't - map_fd the path name. It now prints the file name is not a regular - file. Radar bug #2227477.
  • - -
  • The processing of the environment variables for dyld paths has - been changed to ignore paths with no characters in them. This led - to confusion when the directory layout was changed to have a - directory named /System and then the System framework would be - searched as /System if a path with no characters in it was in - DYLD_LIBRARY_PATH. Radar bug #2227589.
  • - -
  • Fixed a bug in nm(1) with the -o option on a dynamic shared - library that did not print the colon ':' between the library - module name and symbol name. Radar bug #2227852.
  • -
- -

Documentation 

- -
PowerPC assembler manual (PowerPC Addressing -Modes and Assembler Instructions)
- -
See Jeff Mattson (jmattson_ext@next.com) for the latest - copy.
- -
Dynamic Shared Libraries User's Guide
- -
The current version of this can be found in (not - updated with respect to PowerPC yet): - -
/Net/seaport/projects/cctools/docs/shlib/user_guide/user_guide.ps
- -
Dynamic Shared Libraries Detailed Design -Document
- -
The current version of this can be found in (updated - for PowerPC): - -
/Net/seaport/projects/cctools/docs - /shlib/detail_doc/current/detail_doc.ps
- -
Man Pages
- -
Unix manual pages for the cctools release are installed - in /usr/share/man. This allows updated manual pages to be used in - software by setting the MANPATH environment variable to include - one or more paths. For example if the Rhapsody man pages are - wanted you might set MANPATH as follows in your .login: - -
setenv MANPATH /usr/share/man
- -

 

- -

Notes Specific to Release 5.1 (Rhapsody -DR2)

- -

New Features

- -

The rld function rld_write_symfile() has been added for use by the -kern loader.

- -
Changes since the last release (cctools-265 for -the 5.1 Rhapsody DR2 release)
- -
    -
  • Fixed a bug in the change of the default headerpad in ld(1) to - be the sizeof two section structures because objcunique(1) now can - add 2 section headers.
  • -
- -
Changes since the last release (cctools-264 for -the 5.1 Rhapsody DR2 release)
- -
    -
  • Changed the default headerpad in ld(1) to be the sizeof two - section structures because objcunique(1) now can add 2 section - headers.
  • -
- -
Changes since the last release (cctools-263 for -the 5.1 Rhapsody DR2 release)
- -
    -
  • Added a definition of getenv() in the dyld code that always - returns NULL so the reference to_dyld_lookup_and_bind() is not - pulled in by the libc_dynamic code.
  • -
- -
Changes since the last release (cctools-262 for -the 5.1 Rhapsody DR2 release)
- -
    -
  • The VMX opcodes have been removed. Radar bug #2219166.
  • - -
  • A bug was fixed in the code that starts the dyld debug thread - that effected executables who's load commands were larger than 4k - (like ProjectBuilder). Radar bug #2218925.
  • -
- -
Changes since the last release (cctools-261 for -the 5.1 Rhapsody DR2 release)
- -
    -
  • The use of the profil(2) system call has been updated to - reflect the fix in the kernel for the bucket incremented in - profileServer(1) and in dyld. Radar bug #2215979.
  • -
- -
Changes since the last release (cctools-260 for -the 5.1 Rhapsody DR2 release)
- -

Added supporting the PowerPC subtypes 603e, 603ev and 750. Changed -NXFindBestFatArch() for PowerPC subtypes to the following: if an -exact match is not found the subtype will be picked from the -following order: 750, 604e, 604, 603ev, 603e, 603, ALL. Note the 601 -is not in the list, it is only picked via an exact match. Changed -NXCombineCpuSubtypes() for PowerPC subtypes to the following: -combining with the ALL type becomes the other type. Combining -anything with 601 becomes 601. All other non exact matches combine to -the ALL type. Radar bug #2213821.

- -
    -
  • Added the dcba PowerPC optional instruction to the assembler - and otool.
  • - -
  • Added the special register names for the PowerPC 750 - processor:Radar bug #2212878 - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Special register name

-
-

Number

-
-

ummcr0

-
-

936

-
-

upmc1

-
-

937

-
-

upmc2

-
-

938

-
-

usia

-
-

939

-
-

ummcr1

-
-

940

-
-

upmc3

-
-

941

-
-

upmc4

-
-

942

-
-

l2cr

-
-

1017

-
-

ictc

-
-

1019

-
-

thrm1

-
-

1020

-
-

thrm2

-
-

1021

-
-

thrm3

-
-

1022

-
-

- -
  • Assembling PowerPC VMX instructions now requires the - -force_cpusubtype_ALL flag. And code that uses them must dynamicly - check to see if VMX is supported on the processor before using VMX - instructions. Radar bug #2213821.
  • - -
  • Change the PowerPC instructions tlbld and tlbli to marked as - OPTIONAL rather than 603 specific. This leaves the only - instructions specific for a PowerPC cpu being 601 instructions. - Radar bug #2213821.
  • - -
  • Moved the assemblers into /usr/libexec and /usr/local/libexec. - Radar bug #2213838.
  • - - -
    Changes since the last release (cctools-259 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Added the path /Local/Library/Frameworks to checksyms(l) as a - conventional path Frameworks can be found in. Also corrected - "it's" to "its" in error messages.
    • - -
    • Added -c to all the install(1) commands in all the - Makefiles.
    • -
    - -
    Changes since the last release (cctools-258 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Changed cctools to not use /usr/local/bin/install where it - needed the -sS option but rather call strip -S and create a - temporary file and install the temporary file.
    • -
    - -
    Changes since the last release (cctools-257 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Changed checksyms(l) to once again treat /usr/lib/java as a - conventional path libraries can be found in. This path got changed - to /System/Library/Frameworks/JavaVM.framework/Libraries where - that path should have been just added.
    • - -
    • Fixed dylib shared pc sampling. Radar bug #2004555.
    • -
    - -
    Changes since the last release (cctools-256 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Changed checksyms(l) to treat - /System/Library/Frameworks/JavaVM.framework/Libraries as a - conventional path libraries can be found in.
    • - -
    • Changed the default address of dyld to 0x41100000.
    • - -
    • Changed cctools to use /usr/local/bin/install where it needs - the -sS option.
    • -
    - -
    Changes since the last release (cctools-255 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Changed checksyms(l) to treat /usr/lib/java as a conventional - path libraries can be found in. Radar bug #2005914.
    • -
    - -
    Changes since the last release (cctools-254 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • The VMX opcodes have been added. Radar bug 2004760.
    • -
    - -
    Changes since the last release (cctools-253 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Fixed a bug in ld(1) that prevented the Objective-C runtime - optimization using _dyld_bind_objc_module() from working. The bug - was in the routine that swaps the module table of a dynamic - library.
    • - -
    • Added the rld function rld_write_symfile() for use by the kern - loader.
    • -
    - -
    Changes since the last release (cctools-252 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Updated the cctools project for the new directory layout for - Premier (changing the directories with the word Next in them). See - the updated man pages for specific details.
    • - -
    • Added the -b option to checksyms(l) to check dynamic binaries - for relocation entries in read-only sections, make sure they are - prebound and have had objcunique run on them. This is not yet the - default.
    • - -
    • Delt with a bug in the 4.4bsd ar(1) which produced bad - archives when the uid (or gid) field overflowed or underflowed. - Radar bug #2000486.
    • -
    - -
    Changes since the last release (cctools-251 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Fixed a bug in the disassembly output of otool(1) for ppc bl - instructions that was not printing any address or symbol. Also - added printing out a comment for branch targets to symbol stubs - including the name of the symbol the stub is for.
    • - -
    • Changed the ppc dissassembly in otool(1) of "addis rX,0,immed" - to "lis rX,immed" and "addi rX,0,immed" to "li rX,immed".
    • - -
    • Updated the dyld(1) man page to include the default fall back - paths.
    • - -
    • Removed the -arch m98k which was the same as -arch ppc.
    • -
    - -
    Changes since the last release (cctools-250 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Corrected the bug fix in ld(1) when doing prebound builds in - Slick build environment with $NEXT_ROOT set. The change also - effected Titan builds because RC builds do have $NEXT_ROOT set (to - nothing).
    • -
    - -
    Changes since the last release (cctools-249 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • The man pages now get installed into /usr/share/man directly - out of the cctools project. The man pages had some small updates - cleaning up some things. arch(3) was added to the cctools set and - updated. The also now have Apple Computer, Inc. on them instead of - NeXT.
    • - -
    • Fixed a bug in as(1) where it would not take the cpu specific - arch types -arch ppc604 or -arch ppc604e. Also changed the - assembler to print out the cctools version as the Apple version - instead of the NeXT version.
    • - -
    • Changed the ppc locking code in dyld to allow it to be stepped - over by single step profiling tools using the step to branch mode - in that code.
    • -
    - -
    Changes since the last release (cctools-248 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Changed libtool(1) and redo_prebinding(1) look for objcunique - in /usr/bin rather than in /bin.
    • - -
    • Added support for the ppc architecture to - redo_prebinding(1).
    • - -
    • Fixed a bug in ld(1) when prebinding and segments in the - output file overlap dependent libraries. In this case the output - gets marked as prebound even though a message is printed that says - it was disabled. This would cause redo_prebinding(1) to fail on it - because of overlapping segments.
    • - -
    • Fixed a bug in ld(1) when prebinding with -i options. The - indirect symbols being defined with -i options were being turned - into prebound undefined symbols. Then after the binary was - strip(1)'ed redo_prebinding(1) would fail on it because of - undefined symbols.
    • - -
    • Fixed a bug in ld(1) when doing prebound builds in Slick build - envorinment with $NEXT_ROOT set. It was recording the dynamic - libraries name with $NEXT_ROOT prepened to it in LC_PREBOUND_DYLIB - load commands.
    • - -
    • Fixed a bug where the ouput of nm(1) -n was not sorted - correctly.
    • - -
    • Fixed a potentinal bug in dyld if a very long symbol name was - to be printed as part of an error message it could have crashed - the program.
    • -
    - -
    Changes since the last release (cctools-247 for -the 5.1 Rhapsody DR2 release)
    - -
      -
    • Changed the gmon.out format gprof(1) understands to be in sync - with the 4.4bsd format. The header file <mach-o/gmon.h> is - no longer installed and the 4.4bsd file in <sys/gmon.h> with - Rhapsody updates is now used.
    • - -
    • Fixed a bug that would cause programs to segfault if dyld had - to relocate itself because the executable overlapped with dyld's - prefered address.
    • -
    - -
    Changes since the last release (cctools-246 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • The project source tree has been converted to build natively - on Rhapsody.
    • - -
    • The binaries are now installed in the correct places for a - 4.4BSD system. There are nolonger any symbolic links to other - locations. Radar bugs #1673496, #1680747 and #1682569.
    • - -
    • The command ar(1) was changed to have the -T options on by - default. This causes archive member names to be truncated and does - not use the extend format for long names which the compiler tools - does not yet understand. The new option -L causes the extend - format to be used. The hope is the compiler tools will understand - the extened format for the Rhapsody Unified release. Radar bug - #1670513.
    • - -
    • Removed the comment allowing the moduleName parameter of - NSLinkModule() in <mach-o/dyld.h> to be NULL. Radar bug - #1670835.
    • -
    - -

    Documentation 

    - -
    PowerPC assembler manual (PowerPC Addressing -Modes and Assembler Instructions)
    - -
    See Jeff Mattson (jmattson_ext@next.com) for the latest - copy.
    - -
    Dynamic Shared Libraries User's Guide
    - -
    The current version of this can be found in (not - updated with respect to PowerPC yet): - -
    /Net/seaport/projects/cctools/docs/shlib/user_guide/user_guide.ps
    - -
    Dynamic Shared Libraries Detailed Design -Documen
    - -
    The current version of this can be found in (updated - for PowerPC): - -
    /Net/seaport/projects/cctools/docs - /shlib/detail_doc/current/detail_doc.ps
    - -
    Man Pages
    - -
    Unix manual pages for the cctools release are installed - in /usr/share/man. This allows updated manual pages to be used in - software by setting the MANPATH environment variable to include - one or more paths. For example if the Rhapsody man pages are - wanted you might set MANPATH as follows in your .login: - -
    setenv MANPATH /usr/share/man  
    - -

    Notes Specific to Release 5.0 (Rhapsody -DR1)

    - -

    New Features

    - -

    There is only one new feature for the 5.0 release:

    - -
      -
    • The tools now use -arch ppc for the PowerPC architecture . The - tools have been brought up the 603, 603e, 604 and 604e PowerPC - from the 601. Support for dynamic shared libraries has been - added.
    • -
    - -

    The current state of the dynamic shared library port to the -PowerPC

    - -
    As of cctools-246 the all the tools are working or - ported. This includes the assembler, the static linker, otool - (including it's PowerPC disassembler), the dynamic linker and the - various object tools like nm, size, etc. The PowerPC assembler as - of the current release is now complete for the Rhapsody Developer - release. It now supports all of the PowerPC extended mnemonics and - all features of the 603, 603e, 604 and 604e PowerPC architecture.
    - -

    Current status of the support for the PowerPC

    - -
    Changes since the last release (cctools-245 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a bug in the static link editor for PPC_RELOC_JBSR - relocation types. The other_part field was being tuncating to the - low16 bits.
    • -
    - -
    Changes since the last release (cctools-244 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • The symbolic links made in /usr/bin for the commands as, ld, - strip, strings, nm and size for which the binaries are in /bin - were corrected to use a relative path. Radar bug #1672088.
    • -
    - -
    Changes since the last release (cctools-242 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Symbolic links were made in /usr/bin for the commands as, ld, - strip, strings, nm and size for which the binaries are in /bin. - Radar bug #1672088.
    • -
    - -
    Changes since the last release (cctools-241 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Removed the builtin macro clrlsdi which was a typo for the - correct macro clrlsldi.
    • - -
    • Removed the following builtin macros left over from the NRW - port: mtrtcd, mfrtcd, mtrtci, mfrtci, mtbatu, mfbatu, mtbatl and - mfbatl.
    • - -
    • Changed the PowerPC instruction "eciwx" to be marked as - optional so to require -force_cpusubtype_ALL when used.
    • - -
    • Removed the non-existant "stmd", "mtpmr" and "mfpmr" - instructions from the PowerPC assembler.
    • - -
    • Fixed the following extended mnemonics to the PowerPC - assembler: - -

      - - - - - - - - - - -
      -

      mtrtcu Rx

      -
      -

      equivalent to

      -
      -

      mtspr 20,Rx

      -
      -

      mtrtcl Rx

      -
      -

      equivalent to

      -
      -

      mtspr 21,Rx

      -
      -

      - -

      Note these are 601 specific and the special register numbers - moving to (20,21) the Real Time Clock are diffierent from moving - from (4,5) the same registers.

    • -
    - -
    Changes since the last release (cctools-240 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a bug that caused bundles to not load on the PowerPC - 604e as there was no table entry in the ArchInfoTable.
    • -
    - -
    Changes since the last release (cctools-239 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Changed the PowerPC assembler to nolonger support the - mull[o][.] and mulwd[.] instructions - produced by the NRW compiler.
    • - -
    • Added the special register names: - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -

      Special register name

      -
      -

      Number

      -
      -

      Processor

      -
      -

      mmcr0

      -
      -

      952

      -
      -

      604 and 604e

      -
      -

      pmc1

      -
      -

      953

      -
      -

      604 and 604e

      -
      -

      pmc2

      -
      -

      954

      -
      -

      604 and 604e

      -
      -

      sia

      -
      -

      955

      -
      -

      604 and 604e

      -
      -

      mmcr1

      -
      -

      956

      -
      -

      604e

      -
      -

      pmc3

      -
      -

      957

      -
      -

      604e

      -
      -

      pmc4

      -
      -

      958

      -
      -

      604e

      -
      -

      sda

      -
      -

      959

      -
      -

      604 and 604e

      -
      -

      dmiss

      -
      -

      976

      -
      -

      603

      -
      -

      dcmp

      -
      -

      977

      -
      -

      603

      -
      -

      hash1

      -
      -

      978

      -
      -

      603

      -
      -

      hash2

      -
      -

      979

      -
      -

      603

      -
      -

      imiss

      -
      -

      980

      -
      -

      603

      -
      -

      icmp

      -
      -

      981

      -
      -

      603

      -
      -

      rpa

      -
      -

      982

      -
      -

      603

      -
      -

    • -
    - - -
  • Removed the bat[0123][ul] 601 special register - names left over from the NRW port. The names with - ibat[0123][ul] are to be used.
  • - -
  • Changed the name of the 601 special register "pid" to "pir" - and added the special register name "hid15" also with the number - 1023.
  • - -
  • Removed the special register names rtcd (281), rtci (282) and - fpecr (1022) which appear to be left over from the NRW port.
  • - -
  • Added the special register ear (282) which is optional in the - PowerPC.
  • - -
  • Added the special registers tbl (284) and tbu (285) which were - missing.
  • - -
  • Fixed the clrrdi simplified mnemonics to use rldicr not rldicl - which they were using.
  • - -
  • Added the simplified mnemonic clrlsdi rA,rS,b,n equivalent to - rldic rA,rS,n,b-n.
  • - -
  • Added the multiply low double word (mulld) 64-bit - instruction.
  • - -
  • Added flagging invalid forms of branch conditional - instructions where reserved bits of the BO field are not zero when - -force_cpusubtype_ALL is not specified.
  • - -
  • Added flagging all 64-bit compares as invalid forms when - -force_cpusubtype_ALL is not specified.
  • - -
  • Added flagging all 64-bit instructions and optional - instructions as invalid forms when -force_cpusubtype_ALL is not - specified.
  • - -
  • Removed the Power forms, ai[.], of the PowerPC - instructions addic[.] from the assembler.
  • - -
  • Removed the non-existant "lmd" instruction from the - assembler.
  • - -
  • Added flagging invalid forms load multiple instructions (lmw, - lswi and lswx).
  • - -
  • Changed the rA parameter of lhax, lfsx, lfdx, ldx, lbzx, - lhbrx, lhzx, lwax, lwbrx, stbx, stdcx., stdx, stfdx, stfiwx, - stfsx, sthbrx, sthx, stwbrx, stwx, eciwx, ecowx from rA to (rA|0) - to match the manual. These are the same as the Radar bug #1653885 - for lwzx. The disassembler in otool(1) was also changed to match - the manual.
  • - -
  • Changed the rA parameter of lfdu, lfsu, lhau, ldu, lwzu, stbu, - stdu, stfdu, stfsu, sthu and stwu from (rA|0) to rA to match the - manual. The disassembler in otool(1) was also changed to match the - manual.
  • - -
  • Added flagging the "branch conditional to count register" - (bcctr and bcctrl) that use the "decrement and test CTR" option as - invalid forms.
  • - -
  • Fixed a bug in the static link editor that caused it to exit - with an internal error if prebinding was done with objects - compiled with PowerPC dynamic code generation.
  • - -
  • Added the file libstuff/fatals.c to the files installed in the - GNU source package as it is needed to build the GNU assembler - source.
  • - -
  • Changed the cctools project so that atom(1) only gets built - for OS=nextstep because it uses the encumbered gnu/a.out.h header - file.
  • - -
  • Removed the files gnu/a.out.h and gnu/exec.h from the files - that get installed for the GNU source package as they are not - needed to build the GNU assembler source and are encumbered with - 4.3bsd UNIX.
  • -
    - -
    Changes since the last release (cctools-238 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a bug that caused bundles to not load on the - PowerPC.
    • -
    - -
    Changes since the last release (cctools-237 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a build problem where the file /etc/magic should have - been installed in /private/etc/magic.
    • -
    - -
    Changes since the last release (cctools-236 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Changed the PowerPC immediate shifted instructions (addis and - lis) to not check the sign of the immediate, but just to check for - out of 16 bit range (signed or unsigned).
    • - -
    • Fixed the following extended mnemonic for the PowerPC - assembler that was wrong in cctools-235: - -

      - - - - - -
      -

      crmove crbT,crbA

      -
      -

      equivalent to

      -
      -

      cror crbT,crbA,crbA

      -
      -

    • - -
    • It was was crxor which it should not have been.
    • - -
    • Added forms of PowerPC instructions: cmpd, cmpdi, cmpld, - cmpldi, cmpw, cmpwi, cmplw and cmplwi that take a number as their - first parameter (previously they only took a cr register).
    • - -
    • Added forms of PowerPC instructions "tw 31,0,0" and "ori - 0,0,0" toallow the zeros to be encoded where registers are - required.
    • - -
    • Added the following extended mnemonic to the PowerPC - assembler:
    • -
    - -

    mttbl rS equivalent to mtspr 284,rS

    - -
      -
    • Fixed the PowerPC opcode of "mttbu rS" "Move to time base - upper" to be equivalent to "mtspr 285,rS".
    • - -
    • Removed the PowerPC instruction mttb "Move to time base".
    • - -
    • Fixed a bug in the PowerPC instruction "lwzx rD,rA,rB" where - rA should have been (rA|0). Radar bug #1653885.
    • -
    - -
    Changes since the last release (cctools-235 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added the PowerPC instruction jbsr pseudo instruction for use - with kernel relocatables. This has the following form: - -

      jbsr _foo,L1
      - ...
      - L1: lis r12,hi16(_foo) ; long branch stub
      - ori r12,r12,lo16(_foo)
      - mtctr r12
      - bctr

    • - -
    • The jbsr pseudo instruction assembles to a bl instruction - targeted at L1. It also generates a PPC_RELOC_JBSR relocation - entry for the symbol _foo. Then when the linker creates a - non-relocatable output file it will change the target of the bl - instruction to _foo if the bl instruction's displacement will - reach. Else it will leave the bl instruction targeted at L1. - otool(1) understands how to disassemble these pseudo - instructions.
    • - -
    • Fixed a bug in both the static and the dynamic link editors - where it was not correctly checking for relocation overflow for - PPC_RELOC_BR24 relocation types (used with bl instructions). The - checking was off by the high bit as the displacement is - signed.
    • - -
    • The cctools project has been unencumbered (for Grail, - RC_OS=teflon). The programs ar(1) and file(1) are now ported - OpenBSD versions. They should work the same but beware they are - completely different sources.
    • - -
    • Added the following extended mnemonics to the PowerPC - assembler: - -

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -

      mtrtcu Rx

      -
      -

      equivalent to

      -
      -

      mtspr rtcu,Rx

      -
      -

      mtrtcl Rx

      -
      -

      equivalent to

      -
      -

      mtspr rtcl,Rx

      -
      -

      mtmq Rx

      -
      -

      equivalent to

      -
      -

      mtspr mq,Rx

      -
      -

      mfrtcu Rx

      -
      -

      equivalent to

      -
      -

      mfspr Rx,rtcu

      -
      -

      mfrtcl Rx

      -
      -

      equivalent to

      -
      -

      mfspr Rx,rtcl

      -
      -

      mfmq Rx

      -
      -

      equivalent to

      -
      -

      mfspr Rx,mq

      -
      -

      mfspr Rx,mq

      -
      -

      equivalent to

      -
      -

      bcctr BO,BI

      -
      -

      bctrl BO,BI

      -
      -

      equivalent to

      -
      -

      bcctrl BO,BI

      -
      -

      crmove crbT,crbA

      -
      -

      equivalent to

      -
      -

      crxor crbT,crbA,crbA

      -
      -

      crnot crbT,crbA

      -
      -

      equivalent to

      -
      -

      crnor crbT,crbA,crbA

      -
      -

      mfear rT

      -
      -

      equivalent to

      -
      -

      mfspr rT,282

      -
      -

      mtear rS

      -
      -

      equivalent to

      -
      -

      mtspr 282,rS

      -
      -

      mtfs[.] frB

      -
      -

      equivalent to

      -
      -

      mtfsf[.] 0xff,frB

      -
      -

      la rT,d(rA)

      -
      -

      equivalent to

      -
      -

      addi rT,rA,d

      -
      -

      cmp crT,rA,rB

      -
      -

      equivalent to

      -
      -

      cmp crT,0,rA,rB

      -
      -

      cmp num,rA,rB

      -
      -

      equivalent to

      -
      -

      cmp num,0,rA,rB

      -
      -

      cmpi crT,rA,s16

      -
      -

      equivalent to

      -
      -

      cmpi crT,0,rA,s16

      -
      -

      cmpi num,rA,s16

      -
      -

      equivalent to

      -
      -

      cmpi num,0,rA,s16

      -
      -

      cmpl crT,rA,rB

      -
      -

      equivalent to

      -
      -

      cmpl crT,0,rA,rB

      -
      -

      cmpl num,rA,rB

      -
      -

      equivalent to

      -
      -

      cmpl num,0,rA,rB

      -
      -

      cmpli crT,rA,s16

      -
      -

      equivalent to

      -
      -

      cmpli crT,0,rA,u16

      -
      -

      cmpli num,rA,s16

      -
      -

      equivalent to

      -
      -

      cmpli num,0,rA,u16

      -
      -

    • -
    - - -
  • Added the following mnemonics to the PowerPC assembler: - -

    eciwx rD,rA,rB
    - ecowx rS,rA,rB
    - fres[.] frD,frB
    - frsqrte[.] frD,frB
    - fsel[.] frD,frA,frC,frB
    - fsqrt[.] frD,frB
    - fsqrts[.] frD,frB
    - stfiwx frs,rA,rB
    - tlbsync

  • - -
  • Added additional forms for the following mnemonics to the - PowerPC assembler:\ - -

    - - - - - - - - - - - - -
    -

    mcrfs crfD,crfS

    -
    -

    Allows a crf as the first operand (previously only a - number)

    -
    -

    mcrxr crfD

    -
    -

    Allows a crf as the operand (previously only a - number)

    -
    -

    mftb rT,TBR

    -
    -

    Allows specifying the value of the timer base - register

    -
    -

  • - -
  • Fixed the 4 parameter forms of cmpli, and cmplwi to take an - unsigned immediate not a signed immediate.
  • - -
  • Fixed the PowerPC clrlslwi macros which were incorrect as: - -

    clrlslwi[.] ra,rs,b,n equivalent to rlwinm[.] - ra,rs,n.b-n,31-b

    - -

    corrected to:

    - -

    clrlslwi[.] ra,rs,b,n equivalent to rlwinm[.] - ra,rs,n.b-n,31-n

  • -
    - -
    Changes since the last release (cctools-234 thru -cctools-230 for the 5.0 Rhapsody DR1 release)
    - -
      -
    • The only changes were to fix build problems relating to new - System Framework & Kernel header files and the switch to the - -dynamic compiler for PowerPC.
    • - -
    • Removed the changed the static link editor to ignore -seg1addr - (also known as -image_base) for dynamic libraries greater than - 0x4000000 for PowerPC. This was only needed to allow static code - gen to be used with Frameworks.
    • -
    - -
    Changes since the last release (cctools-229 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added ppc604e to the arch table for a specific architecture as - this is returned on some Macs.
    • -
    - -
    Changes since the last release (cctools-228 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • The changed the assembler in cctools-228 was wrong. It - resulted in producing bad code when compiling -static (triggered - by the change to compiler in cc-752). The change has been fixed in - the cctools-229 assembler.
    • -
    - -
    Changes since the last release (cctools-227 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Changed the assembler to allow section difference relocations - with the -static flag. This fixes using the cc-752 and getting the - "Can't emit reloc ..." error message from the assembler.
    • -
    - -
    Changes since the last release (cctools-226 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added the PowerPC mnemonics ai and ai. the assembler which are - archaic forms of addic[.] as the compiler currently - generates them in some cases.
    • - -
    • Fixed otool -c for use with PowerPC core files.
    • -
    - -
    Changes since the last release (cctools-225 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added ppc604 to the arch table for a specific architecture as - this is what the Kernel is returning on the Power Mac 8500. This - was causing code that supported loading bundles to fail (this is - library code in System framework, thus a new System framework - needs to be built and used to see this fix).
    • - -
    • Fixed a bug in the dynamic link editor where it was not - correctly calculating the immediate of a HA16 reloc by checking - the 0x8000 bit of the other half. This was causing address to be - off by 0x10000.
    • - -
    • Fixed a bug in the dynamic link editor when the $HOME - environment variable was not set. (the case for the single user - prompt on PowerPC). This was causing bus errors when a dynamic - library was not found.
    • -
    - -
    Changes since the last release (cctools-224 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a bug in the static link editor where the __PAGEZERO - segment was not being created for PowerPC (left over from NRW when - executables started at high addresses and the kernel was at - zero).
    • - -
    • Changed the static link editor to ignore -seg1addr (also known - as -image_base) for dynamic libraries greater than 0x4000000 for - PowerPC. This will allow static code gen to be used with - Frameworks.
    • - -
    • Changes since the last release (cctools-223 for the 5.0 - Rhapsody release)
    • - -
    • Changed the source of cctools-224 to define NO_INDR_LIBC if - __TEFLON__ is defined so it will build with SDK2 which is not - using indr(l). This will allow cctools-224 to built for the - Grail RC target.
    • - -
    • Fixed a bug in the static link editor when defining common - symbols when a common section exists in the input .o files which - has an alignment less than the alignment needed for the common - symbols being defined by the link editor did not get aligned - correctly.
    • - -
    • Fixed libtool(1) running on Teflon so it doesn't always - report "internal link edit command failed". The link actually - worked but the checking of the return code for Teflon was - wrong.
    • - -
    • Fixed as(1) running on Teflon so it doesn't always exit - non-zero when it runs the target assembler (/lib/arch/as). The - assembly actually worked but the checking of the return code for - Teflon was wrong.
    • - -
    • The other thread states for PowerPC are now printed by otool - (useful for core files).
    • - -
    • Added the PowerPC simplified mnemonics crset, crclr and mtcr - to the assembler.
    • - -
    • Added the include file <mach-o/ranlib.h> to the cctools - project from <bsd/ranlib.h> and changed off_t type to - unsigned long because off_t on Teflon is 64 bits - which would break compatibility with existing libraries.
    • - -
    • Added the header files <mach-o/sparc/swap.h>and - <mach-o/ppc/swap.h> which get installed in the System - Framework to be shipped. This and the added library code allows - swapping of thread states.
    • - -
    • Added the header files <mach-o/i860/swap.h>and - <mach-o/m88k/swap.h> which get installed locally and not - shipped. The code was not added to the System Framework.
    • - -
    • Changed the cctools package to install - <mach-o/ppc/reloc.h> with the exported headers. And to - install <mach-o/hppa/reloc.h> with the local headers.
    • - -
    • Changed of the ppc subtypes to match the kernel. Only the 601 - and 603 types are currently used by the assembler. The types - currently in use are as follows: - -
        -
      • /*
        - * PowerPC subtypes
        - */
        - #define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0)
        - #define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1)
        - #define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2)
        - #define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3)
        - #define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4)
        - #define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5)
        - #define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6)
        - #define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7)
        - #define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8)
        - #define CPU_SUBTYPE_POWERPC_740 ((cpu_subtype_t) 9)
      • -
      -
    • - -
    • The -arch flags for the 601 and 603 are -arch ppc601 and -arch - ppc603. Others will be defined as needed.
    • - -
    • Updated the NXFindBestFatArch(3) and NXCombineCpuSubtypes(3) - to include PowerPC guessing at how to combine the PowerPC subtypes - (someone in the OS group should look at this).
    • - -
    • Updated the ArchInfoTable to include PowerPC and removed mips - and vax which gets returned with NXGetAllArchInfos(3).
    • - -
    • Updated <mach-o/swap.h> and library code with all the - things for dynamic shared libraries that never made it into the - System Framework code.
    • -
    - -
    Changes since the last release (cctools-222 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed changes to allow cctools-223 to build for 4.2mach as - well as PowerPC & Intel with Teflon SDK2.
    • -
    - -
    Changes since the last release (cctools-221 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added the -stack_addr and -stack_size options to ld(1). - Note the kernel support for these has not yet been added. So the - flags should only be used for bringing up the support in the - kernel at this time. See the ld(1) man page for details on - these flags.
    • - -
    • Fixed a bug in the link editor ld(1) for PowerPC HA16 - relocation types when bit 15 was set in the other half of the - immediate stored in the relocation entry. This resulted in bad - code. This bug was found when bringing up driverkit and is needed - for anyone doing development on driverkit for PowerPC.
    • - -
    • Fixed a bug in the link editor ld(1) where it generated - an error message for the lazy symbol pointer section in crt1.o for - PowerPC which it shouldn't have. This bug was found bring up - -dynamic code gen for PowerPC and is needed for anyone using - -dynamic code gen for PowerPC.
    • - -
    • Incorporated many changes to allow cctools-222 to build for - PowerPC & Intel with Teflon SDK2.
    • -
    - -
    Changes since the last release (cctools-220 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • The thread status for the PowerPC has changed to match the - kernel. This makes all previous executables incompatible. The old - otool(1) will no longer work on PowerPC executables because - of this change. All executables should be relinked.
    • -
    - -
    Changes since the last release (cctools-219 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a bug in the link editor ld(1)where $NEXT_ROOT - did not get prefixed to depenendent dynamic libraries.
    • -
    - -
    Changes since the last release (cctools-218 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added searching fallback paths when dynamic libraries can't be - found. The two paths are in the environment variables - DYLD_FALLBACK_FRAMEWORK_PATH and DYLD_FALLBACK_LIBRARY_PATH. If - these are not set they default to - $(HOME)/Library/Frameworks:/LocalLibrary/Frameworks:/NextLibrary/Frameworks - and $(HOME)/lib:/usr/local/lib:/lib:/usr/lib (bug #69135).
    • - -
    • Changed the static linker to pad pure instruction sections of - i386 outputs with nop's (bug #77806).
    • - -
    • Added .section_align align_value to be allowed in - section order files. This causes the symbol following it to be - aligned on a 2^align_value byte boundary (bug #77807).
    • -
    - -
    Changes since the last release (cctools-217 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Changed the cctools project to build with gnumake.
    • - -
    • Updated the locking code and the cache management code in the - dynamic linker for the PowerPC with suggestions from the ppc - bringup team.
    • -
    - -
    Changes since the last release (cctools-216 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Ported the dynamic linker to PowerPC.
    • -
    - -
    Changes since the last release (cctools-215 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Changed the standard symbol stubs for the PowerPC to take - advantage of the super scaler nature of the 603 and 604. See the - updated Dynamic Shared Libraries Detailed Design Document for the - details.
    • -
    - -
    Changes since the last release (cctools-214 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Made the cctools-215 project build (except for linking dyld - and otool) under the Teflon SDK.
    • - -
    • Fixed the PowerPC assembler to use the correct opcodes for - mftb and mftbu and updated otool's disassembly.
    • - -
    • Added the support in the static link editor to understand - thePowerPC position-independent relocation entries (section - difference). This allows PowerPC dynamic shared libraries and - executables that use them to be built (Note as stated above there - is not yet a compiler that supports -dynamic for -arch ppc, and - there is no dynamic linker yet for PowerPC).
    • - -
    • Added the support in the PowerPC assembler for the standard - symbol stubs.
    • -
    - -
    Changes since the last release (cctools-213 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Added the support in the PowerPC assembler for - position-independent relocation entries (section difference). As - well as support in otool for printing them and dissassembling with - them.
    • - -
    • Updated the Detailed Design Document with the first cut at the - code generation for -dynamic for the PowerPC. This is just a first - pass to allow getting the assember and otool in place so that the - compiler work can start.
    • - -
    • Fixed a bug in the PowerPC assembler where it treated the - comment character ';' (semicolon) as a statement separator.
    • - -
    • Fixed the PowerPC assembler to allow -arch m98k if passed to - it.
    • -
    - -
    Changes since the last release (cctools-212 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • The header files for mach-o subdirectory and the library files - were added to the cctools project taken from the libc_macho - project.
    • - -
    • Fixed the typo in the ld(1) warning message for bug - #77070.
    • - -
    • Fixed a bug in ld(1) that was causing prebinding not to - happen if a private extern had the same name as a global function - in a dependent library (this can occur because -lcc_dynamic is - being linked in).
    • - -
    • Fixed the PowerPC's assembler manual for compare instructions - to have a 0 not a 1 for the 32-bit version not the 64-bit version. - For example cmp 0,1,RA,RB was changed to cmp 0,0,RA,RB.
    • - -
    • Changed libtool(1) to ignore the -pg flag.
    • - -
    • Added the not rA,rT and not. rA,rT instructions.
    • -
    - -
    Changes since the last release (cctools-211 for -the 5.0 Rhapsody DR1 release)
    - -
      -
    • Fixed a bug in the link editor ld(1)where $NEXT_ROOT - did not prefix standard framework paths. Also fixed -Z to not use - standard framework paths.
    • - -
    • Changed the following instructions to the correct PowerPC - mnemonics: - -

      - - - - - - - - - - - - -
      -

      NRW compiler mnemonic

      -
      -

      PowerPC mnemonic

      -
      -

      tlbiex

      -
      -

      tlbie

      -
      -

      slbiex

      -
      -

      slbie

      -
      -

    • - -
    • Also corrected the opcodes for slbie and slbia - instructions.
    • - -
    • The bug in the assembler that causes it exits with a zero - status and create an output file if it can't open the input file - has been fixed.
    • - -
    • The .flag_reg num and .noflag_reg num ppc - directives were added to the assembler to allow warnings to be - generated for specific register uses.
    • - -
    • The -no_ppc601 flag and the .no_ppc601 directive were added to - the assembler to warn of 601 uses.
    • - -
    • The 603 instructions tlbld rB and tlbli rB were added to the - assembler.
    • - -
    • The missing 601 instruction clcs rD,rA was added to the - assembler.
    • - -
    • Use of instructions specific to the 601 and 603 now cause the - assembler to mark the resulting object file with the specific - cpusubtype. Note the assembler is currently not complete with - respect to instructions for the specfic cpusubtypes. All of the - ppc subtypes have been added to cctools-212's version of - <mach/machine.h> but only the 601 and 603 types are - currently used. The types are as follows: - -
        -
      • /*
        - * PowerPC subtypes
        - */
        - #define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0)
        - #define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1)
        - #define CPU_SUBTYPE_POWERPC_601v ((cpu_subtype_t) 2)
        - #define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 3)
        - #define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 4)
        - #define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 5)
        - #define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 6)
        - #define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 7)
        - #define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 8)
        - #define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 9)
        - #define CPU_SUBTYPE_POWERPC_X704 ((cpu_subtype_t) 10)
        - #define CPU_SUBTYPE_POWERPC_603q ((cpu_subtype_t) 11)
      • -
      -
    • - -
    • The -arch flags for the 601 and 603 are -arch ppc601 and -arch - ppc603. Others will be defined as needed.
    • - -
    • Changes since the last release (cctools-210 for the 5.0 - Rhapsody release)
    • - -
    • The project sources were changed so that the lib_ofiles target - could be built for teflon in the Grail release control - target.
    • -
    - -
    Changes since the last release (cctools-209.2 for -the 4.2 OpenStep release)
    - -
      -
    • Changed the PowerPC assembler to treat $ the same as . (dot) - for the current pc.
    • - -
    • Changed the treatment of stswi and lswi instruction's third - parameter so that it allows the value 32 in the assembly language - and is treated as if it were 0.
    • - -
    • Changed the following instructions to the correct PowerPC - mnemonics: - -

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -

      NRW compiler mnemonic

      -
      -

      PowerPC mnemonic

      -
      -

      mull

      -
      -

      mullw

      -
      -

      mull.

      -
      -

      mullw.

      -
      -

      mullo

      -
      -

      mullwo

      -
      -

      mullo.

      -
      -

      mullwo.

      -
      -

      mulwd

      -
      -

      mulhw

      -
      -

      mulwd.

      -
      -

      mulhw.

      -
      -

    • - -
    • The NRW compiler mnemonics will continue to work as long as - the NRW compiler is in use. Assembly code should be converted to - use the correct mnemonics. The disassembly of otool -tV uses the - correct PowerPC mnemonics.
    • - -
    • Fixed the mr instruction (it was ori rA,rS,0 not or rA,rS,rS - as it should have been). Also added the mr. instruction.
    • - -
    • Changed the lis instruction to treat it's immediate as - unsigned causing it not to flag the instructions like lis - r1,0x8000. This is now consistant with addis r1,0,0x8000.
    • - -
    • The tools now use -arch ppc for the PowerPC architecture - (previously they used -arch m98k, which still works but is no - longer supported). 
    • -
    - -

    Documentation 

    - -
    PowerPC assembler manual (PowerPC Addressing -Modes and Assembler Instructions)
    - -
    See Jeff Mattson (jmattson_ext@next.com) for the latest - copy.
    - -
    Dynamic Shared Libraries User's Guide
    - -
    The current version of this can be found in (not - updated with respect to PowerPC yet): - -
    /Network/Servers/seaport/projects/cctools/docs/shlib/user_guide/user_guide.ps
    - -
    Dynamic Shared Libraries Detailed Design -Document
    - -
    The current version of this can be found in (updated - for PowerPC): - -
    /Network/Servers/seaport/projects/cctools/docs/shlib/detail_doc/current/detail_doc.ps
    - -
    Man Pages
    - -
    Unix manual pages for the cctools release are installed - in the standard places. These are updated for for every - submission.
    - - + + + + Private Compiler Tools Release Notes + + + + + + +

    Mac OS X Xcode 3.2.1 Developer Release Copyright +2009 by Apple, Inc. All Rights Reserved.

    + +

    Private Mac OS X Xcode 3.2.1 Developer Release:
    +Compiler Tools (cctools-751)

    + +

    This file contains release notes for the 5.27 release of the +Compiler Tools for the Mac OS X Xcode 3.3 Developer Release. This +file contains information about the following topics:

    + +
      +
    • The Mac OS X Mach-O GNU-based assemblers
    • + +
    • The classic Mac OS X 32-bit Mach-O static link editor
    • + +
    • Mach-O object tools (nm, otool, and so + on) 
    • +
    + +

    Notes Specific to Release 5.27 (Mac OS X Xcode 3.2.1 Developer +Release)

    + +
    Changes since the last release (cctools-750 for +the 5.26 Mac OS X Xcode 3.2 Developer release)
    + +
      +
    • Fixed a problem with the assembler incorrectly not allowing + the SDIV and UDIV instructions for Cortex-M3. Radar bug + #6697528.
    • + +
    • Fixed a typo in the usage error message of + install_name_tool(1) where it had -rpaths that should have been + -rpath. Radar bug #6707169.
    • + +
    • Fixed a problem with the assembler not working with + MallocScribble. Radar bug #5930362.
    • + +
    • Fixed a problem with otool -ov printing meaningless strings + when used on protected binaries. Radar bug #5578032.
    • + +
    • Fixed a problem with the arch(3) man page incorrectly listing + a type as unsigned long for the parameter nfat_archs in + NXFindBestFatArch which should have been uint32_t. Radar bug + #4717379.
    • +
    + +

    Notes Specific to Release 5.26 (Mac OS X Xcode 3.2 Developer +Release)

    + +
    Changes since the last release (cctools-749 for +the 5.26 Mac OS X Xcode 3.2 Developer release)
    + +
      +
    • Fixed libtool(1) to correctly place different arm cpusubtype + llvm bit code files in different fat slices. Radar bug + #6654890.
    • + +
    • Updated nm(1) to display the symbol table of llvm bit code + files in archives. Radar bug #6067110.
    • + +
    • Fixed a bug in otool(1) that was incorrectly disassembling the + operand of an i386 instruction using an index register without a + base register. Radar bug #6533811.
    • + +
    • Improved the error message of install_name_tool(1) when the diff --git a/cctools/as/Makefile b/cctools/as/Makefile index d2e3c54..6208d96 100644 --- a/cctools/as/Makefile +++ b/cctools/as/Makefile @@ -361,94 +361,3 @@ test: apple_version.c: echo "const char apple_version[]= " \"`vers_string $(VERS_STRING_FLAGS) -f cctools`\" ";" > \ - $(OFILE_DIR)/$@ - -ifeq "NO" "$(USE_DEPENDENCY_FILE)" -.c.o: - $(CC) $(COPTS) $(CFLAGS) $(RC_CFLAGS) -c -o $(OFILE_DIR)/$*.o $< -else -.c.o: - $(CC) $(COPTS) $(CFLAGS) $(RC_CFLAGS) -c -MD \ - -dependency-file $(OFILE_DIR)/$*.d -o $(OFILE_DIR)/$*.o $< - md -d -u $(OFILE_DIR)/Makedep $(OFILE_DIR)/$*.d -endif - -clean shlib_clean: - -rm -r -f $(OFILE_DIRS) make.out - -installsrc installGASsrc: - $(MKDIRS) $(SRCROOT) - chmod 755 $(SRCROOT) - gnutar cf - $(INSTALL_FILES) | (cd $(SRCROOT); gnutar xf -) - chmod 444 $(SRCROOT)/* - -install: all $(RC_OS)_install - -macos_install: common_install xcommon_install - $(MKDIRS) $(DSTROOT)$(LIBDIR)/i386 - install -c -s -m 555 $(SYMROOT)/a386_dir/as \ - $(DSTROOT)$(LIBDIR)/i386/as - $(MKDIRS) $(DSTROOT)$(LIBDIR)/x86_64 - install -c -s -m 555 $(SYMROOT)/ax86_64_dir/as \ - $(DSTROOT)$(LIBDIR)/x86_64/as - -teflon_install: common_install xcommon_install - $(MKDIRS) $(DSTROOT)$(LIBDIR)/i386 - install -c -s -m 555 $(SYMROOT)/a386_dir/as \ - $(DSTROOT)$(LIBDIR)/i386/as - -xcommon_install: - $(MKDIRS) $(DSTROOT)$(USRBINDIR) - install -c -s -m 555 $(SYMROOT)/driver_dir/driver \ - $(DSTROOT)$(USRBINDIR)/as - $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceVersions/ - install -c -s -m 444 $(SRCROOT)/cctools.plist \ - $(DSTROOT)/usr/local/OpenSourceVersions/cctools.plist - $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceLicenses/ - install -c -s -m 444 $(SRCROOT)/COPYING \ - $(DSTROOT)/usr/local/OpenSourceLicenses/cctools.txt - $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc - install -c -s -m 555 $(SYMROOT)/appc_dir/as \ - $(DSTROOT)$(LIBDIR)/ppc/as - $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc64 - install -c -s -m 555 $(SYMROOT)/appc64_dir/as \ - $(DSTROOT)$(LIBDIR)/ppc64/as - $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m68k - install -c -s -m 555 $(SYMROOT)/a68_dir/as \ - $(DSTROOT)$(LOCLIBDIR)/m68k/as - $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/sparc - install -c -s -m 555 $(SYMROOT)/asparc_dir/as \ - $(DSTROOT)$(LOCLIBDIR)/sparc/as - -nextstep_install: common_install - $(MKDIRS) $(DSTROOT)$(BINDIR) - install -c -s -m 555 $(SYMROOT)/driver_dir/driver \ - $(DSTROOT)$(BINDIR)/as - $(MKDIRS) $(DSTROOT)$(LIBDIR)/m68k - install -c -s -m 555 $(SYMROOT)/a68_dir/as \ - $(DSTROOT)$(LIBDIR)/m68k/as - $(MKDIRS) $(DSTROOT)$(LIBDIR)/i386 - install -c -s -m 555 $(SYMROOT)/a386_dir/as \ - $(DSTROOT)$(LIBDIR)/i386/as - $(MKDIRS) $(DSTROOT)$(LIBDIR)/sparc - install -c -s -m 555 $(SYMROOT)/asparc_dir/as \ - $(DSTROOT)$(LIBDIR)/sparc/as - $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/ppc - install -c -s -m 555 $(SYMROOT)/appc_dir/as \ - $(DSTROOT)$(LOCLIBDIR)/ppc/as - -common_install: - $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m88k - install -c -s -m 555 $(SYMROOT)/a88_dir/as \ - $(DSTROOT)$(LOCLIBDIR)/m88k/as - $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/hppa - install -c -s -m 555 $(SYMROOT)/ahppa_dir/as \ - $(DSTROOT)$(LOCLIBDIR)/hppa/as - $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/i860 - install -s -m 555 $(SYMROOT)/a860_dir/as \ - $(DSTROOT)$(LOCLIBDIR)/i860/as - -$(OFILE_DIRS) $(SYM_DIRS): - $(MKDIRS) $@ - --include $(DEP_DIR)/Makedep diff --git a/cctools/as/arm.c b/cctools/as/arm.c index 9decd30..7c051a3 100644 --- a/cctools/as/arm.c +++ b/cctools/as/arm.c @@ -17997,7 +17997,8 @@ md_begin (void) case CPU_SUBTYPE_ARM_V7: { static const arm_feature_set arm_arch_v7_vfp_v3_plus_neon_v1 = - ARM_FEATURE (ARM_AEXT_V7_ARM, FPU_VFP_V3 | FPU_NEON_EXT_V1); + ARM_FEATURE (ARM_AEXT_V7_ARM | ARM_EXT_DIV, + FPU_VFP_V3 | FPU_NEON_EXT_V1); cpu_variant = arm_arch_v7_vfp_v3_plus_neon_v1; } break; diff --git a/cctools/as/fixes.c b/cctools/as/fixes.c index 58d2e3d..32a685b 100644 --- a/cctools/as/fixes.c +++ b/cctools/as/fixes.c @@ -53,6 +53,7 @@ fix_new_internal (fragS *frag, /* Which frag? */ fixP->fx_pcrel = pcrel; fixP->fx_pcrel_reloc = pcrel_reloc; fixP->fx_r_type = r_type; + fixP->fx_sectdiff_divide_by_two = 0; #if defined(I386) && defined(ARCH64) if(fixP->fx_r_type == X86_64_RELOC_SIGNED){ switch(offset){ diff --git a/cctools/as/notes b/cctools/as/notes dissimilarity index 99% index 85e4124..f366d34 100644 --- a/cctools/as/notes +++ b/cctools/as/notes @@ -1,565 +1,12 @@ -TODO for coalesced symbols: -- Should external relocation entries for defined coalesced symbols only be - created with -dynamic and not -static? - -TODO: -- Add MacOS line termination \r . - -Known bugs: -- The assembly line: - bl ""foo"" - causes the symbol name "" to be used. -- cmpwi seems to be the same as cmpi for PowerPC. -- Can't optimize because of compiler bug #50416 prevents line 235 in symbols.c - from working (currently has #pragma CC_OPT_OFF and #pragma CC_OPT_RESUME - around that routine). -- The m88k instruction "tb0 0,r0,undef" trashes the instruction because of - the undefined. -- 68k does not handle packed immediates (the tables have been changed to dis- - allow this) because there is no routine to convert a flonum to a 68k packed - form. -- The logical operators && and || are not implemented. - -Bugs to be fixed: -- The m68k "jmp @(_foo)" is not legal and needs to be flaged. -- The PowerPC extended branch mnemonic like beqlrl need to take a CRFONLY or - a number shifted over by 2 (like the fcmpu instruction). - -Changes for the 5.26 release (the cctools-747 release): -- Changed the assembler to put out a line table if no .loc directives are - used but a .file directive to be used. This was causing a bad dwarf for data - only files that used .file and had no .loc directives. The fix is in - dwarf2_finish() in dwarf2dbg.c to add to the test to see we have seen any - line number segs or .file was used before calling out_debug_line(). Radar - bug #6593344. - -Changes for the 5.26 release (the cctools-746 release): -- Added the support for the .sleb128 and .uleb128 directives. Radar bug - #4545225. - - Added rs_leb128 to the relax_stateT enum in relax.h . - - Added the fields has_rs_leb128s and layout_pass to the frchain struct in - sections.h . - - Added entry for sleb128 and uleb128 to pseudo_table[] in read.c . - - Added s_leb128(), sizeof_uleb128, emit_leb128_expr() to read.c . - Where emit_leb128_expr() is heavily hacked from the original due to - differences in expressions. In emit_leb128_expr() after the call to - frag_var() for a rs_leb128 frchain_now->has_rs_leb128s is set to TRUE to - mark the section as containing an rs_leb128 frag. - - Added a case label for rs_leb128 in the first loop in relax_section() - in layout.c with a line of code: - address += fragP->fr_offset = 1; - - Also added a case label for rs_leb128 in the second loop in relax_section() - in layout.c to get the value of the symbol's expression and call - sizeof_leb128() to get the current size, adjust the growth and save the new - size in the fr_offset field of the frag. - - Added code in layout_addresses() in layout.c to make three layout passes - over the frags. Doing the debug sections last, ones with containing - rs_leb128 frags before that and all other sections first. - - Added a loop in the layout pass if relax_section() changes things. To do - that the new field last_fr_address to the frag struct in frags.h, then - changed relax_section() in layout.c to return non-zero if the things change - by setting and testing the last_fr_address feild in each of the frags. - - Added a case label for rs_leb128 in layout_addresses() in layout.c and - code to get the value of the symbol's expression, then call output_leb128() - to place that value in the frag and finally convert the frag to an rs_fill - of the size of the bytes put in the frag. - -Changes for the 5.26 release (the cctools-745 release): -- Changed the assembler to not put out a line table if no .loc directives are - used. This was causing a second line table in the output with older compilers - causing bad dSYM files to be created. The fix is in dwarf2_finish() in - dwarf2dbg.c to test to see we have seen any line number segs before calling - out_debug_line(). Radar bug #6589056. - -Changes for the 5.26 release (the cctools-744 release): -- Fixed a problem with the code to support .file/.loc which was incorrectly - putting out a Compile Unit into the debug_info section when it shouldn't. - The code in dwarf2_finish() in dwarf2dbg.c was not ported correctly for - checking if the debug_info section was empty. It was testing the section - size for zero but that is not valid at that point in the code and needed - to look for fragments in the section. So a version of the routine - seg_not_empty_p() was ported and added to sections.[ch] . Radar bug #6573528. - -Changes for the 5.26 release (the cctools-741 release): -- Fixed the encoding of the armv7 thumb2 instructions for where it places Rd in - qadd, qdadd, qsub and qdsub. Added the do_t_rd_rm_rn() routine and changed - the opcode entries for these instructions to use them. Radar bug #6522202. - -Changes for the 5.26 release (the cctools-740 release): -- Removed the last abort() call in the reloc() routine in i386.c so user errors - do not appear like assembler crashes. Radar bug #6516397. - -Changes for the 5.26 release (the cctools-739 release): -- Changed the arm assembler to use 0x46c0 as the thumb1 nop pad for sections - with pure instructions. The change was in s_align() in read.c. Radar bug - #6517544. - -Changes for the 5.26 release (the cctools-738 release): -- Removed the code and files for the old ProjectBuilder interface including the - use of mig(1) in the Makefile. The files make.defs make_defs.h were removed - and the code in as.c and messages.[ch] with the OLD_PROJECTBUILDER_INTERFACE - #ifdef was removed. Radar bug #6457206. -- Changed the arm assembler to put out a relocation entry for 32-bit thumb - branches using the new ARM_THUMB_32BIT_BRANCH relocation type. Radar bug - #6511482. - - Changed arm.c to assign the enum type BFD_RELOC_THUMB_PCREL_BRANCH20 to - the new ARM_THUMB_32BIT_BRANCH relocation type's value. - - Changed nrelocs_for_fix() and fix_to_relocation_entries() in write_object.c - so there is an #ifdef ARM and tests for the new ARM_THUMB_32BIT_BRANCH - relocation type when archflag_cpusubtype == CPU_SUBTYPE_ARM_V7. To count 1 - for the fixes in nrelocs_for_fix() and to put out a relocation entry in - fix_to_relocation_entries() for the type ARM_THUMB_32BIT_BRANCH. The - relocation entry put out is a local relocation entry that is pcrel, length - of long and an symbolnum of R_ABS (0). Also in fix_to_relocation_entries() - it sets fr_type to ARM_THUMB_32BIT_BRANCH so that - BFD_RELOC_THUMB_PCREL_BRANCH20 versions with no symbol gets set correctly. - -Changes for the 5.26 release (the cctools-737 release): -- Changed the logic in fixup_section() in layout.c to correctly not add the - value of the symbol into the item to be relocated if it is an external - coalesced symbol or weak symbol. Radar bug #6505278. -- Changed frag_grow() in frags.c to not reduce the frags.chunk_size if 2 times - the number of bytes needed is less than that. Radar bug #6490903. -- Changed the arm assembler to pad sections with pure instructions with nop's - other than zero bytes. Radar bug #6492867. - - Changed arm.c and made the variable thumb_mode global and not static. - - Changed s_align() and added #ifdef ARM code to use specific nop values. - -Changes for the 5.26 release (the cctools-736 release): -- Fixed misspelling of "can not" to "cannot" in 4 error messages in i386.c . - Radar bug #6447059. -- Fixed bugs in dwarf support: - - Changed layout_addresses() in layout.c to make two loops for calling - relax_section(). The first for non-debug sections so the sizes of their - sections are set before the second loop of the debug sections which might - have line number sections. Radar bug #6460301. - - To get the old .file and dwarf .file to both work the trick is that - dwarf2_directive_file() parse the old .file directive stuff and pass - it to s_app_file() to make this work. - - This requires that dwarf2_directive_file is in md_pseudo_table[]. - - Changed s_file() in read.[ch] to s_app_file(). - - Changed the entry in the pseudo_table[] table from "file" to "appfile" - in read.c - - Changed process_entries() to return a non-zero value if it output something. - - Changed out_debug_line() to check the return value of process_entries() and - if nothing was outputted then output the a DW_LNE_set_address sequence to - set the address to zero and the DW_LNE_end_sequence. - - Changed dwarf2_finish() to also test files_in_use == 0 as part of its check - that there is no line information and no non-empty .debug_info section. Then - also added a check of all_segs == NULL before the check of - all_segs->next == NULL, and added this same set of checks before calling - out_debug_*() routines at the end. This is need so the file table in the - line section is put out for something that has only data and no line - numbers. - - Changed fixup_section() in layout.c for x86_64 in debug sections to actually - set the value of the expression. - - Changed section_new() in sections.c to not set now_seg for section types - of S_ZEROFILL. - - Added the routine add_last_frags_to_sections() to layout.[ch] so that the - hacks in get_frag_fix() will work. As get_frag_fix() will return 0 as the - size of the last frag in a section. - - Changed is_assembly_time_constant_subtraction_expression() in layout.c - to treat expression with symbols from a debug section with FAKE_LABEL_NAMEs - to be constant. - - Changed fixup_section() in layout.c when it has a section difference - relocatable subtraction where a symbol is at the end of a section and - the section it is relocating is a debug section as an assembly time constant - section if both symbols have FAKE_LABEL_NAMEs. - - Changed section_set() in sections.c to simply call section_new() to fix - the problems that it was not correctly setting frag_now and dropping the - the fragments from the sections frag chain. - - Fixed using basename() back to using lbasename() and added an lbasename() - routine just before get_filenum() which returns a pointer into the path - as expected by get_filenum(). - - Fixed section_symbol() in symbols.c that was incorrectly testing - frcP->section_symbol != NULL when it should have been == NULL. - - Fixed the call to frag_align() in out_debug_aranges() in to pass the - fill prameters correctly so it does not crash. - - In read.c changed these routines: - sizeof_sleb128() - sizeof_uleb128() - to be two routines: - sizeof_sleb128_32() and sizeof_sleb128_64() - sizeof_uleb128_32() and sizeof_uleb128_64() - which has parameters of proper 32 and 64 bit signed types so when values of - different types get passed they are correctly converted. Without this it - will cause hangs as a shift of a negative value will be an arithmetic - shift and will never become zero. - - And added new sizeof_leb128() and sizeof_uleb128() routines that are - #ifdef'ed ARCH64 to call the correct sized and typed new routines. - - Changed relax_inc_line_addr() to not use make_expr_symbol() which is - ifdef'ed to abort, and changed it to use symbol_temp_new() and create a - SECT_DIFF expression in that symbol. - - Changed dwarf2dbg_estimate_size_before_relax() to match what - relax_inc_line_addr() creates and evaluate the symbol's expression before - the symbol values are set using their frag values. - - Changed dwarf2dbg_convert_frag() to match what relax_inc_line_addr() creates - and evaluate the symbol's expression after the symbol values are set. -- Hooked up the dwarf support for .loc and .file in the i386, ppc and arm - assemblers. Radar bug #4298593. - - Removed the #ifndef NeXT_MOD in the md_pseudo_table[] in i386.c around the - .file and .loc directives that use dwarf2_directive_file() and - dwarf2_directive_loc() respectively. - - Removed the #ifdef OBJ_ELF in the md_pseudo_table[] in arm.c around the - .file, .loc and .loc_mark_labels directives that use dwarf2_directive_file() - dwarf2_directive_loc() and dwarf2_directive_loc_mark_labels() respectfully. - - Removed the #ifndef NeXT_MOD in output_insn() in i386.c around the call to - dwarf2_emit_insn() at the beginning of the routine. - - Removed the #ifdef OBJ_ELF in output_inst() in arm.c around the call to - dwarf2_emit_insn() at the end of the routine. - - Removed the #ifdef OBJ_ELF in output_relax_insn() in arm.c around the call - to dwarf2_emit_insn() at the beginning of the routine. - - Removed the #ifdef OBJ_ELF in arm_frob_label() in arm.c at the end of the - routine. - - Added a call to dwarf2_emit_insn() in md_assemble() in ppc.c after the - call to md_number_to_chars(). - - Added a call to dwarf2_finish() in main() in as.c after the call to - perform_an_assembly_pass(). - - Added a case label for rs_dwarf2dbg in layout_addresses() in layout.c - with a line of code: - dwarf2dbg_convert_frag(fragP); - - Added a case label for rs_dwarf2dbg in the first loop in relax_section() - in layout.c with a line of code: - address += dwarf2dbg_estimate_size_before_relax(fragP); - - Added a case label for rs_dwarf2dbg in the second loop in relax_section() - in layout.c with a line of code: - growth = dwarf2dbg_relax_frag(fragP); - -Changes for the 5.26 release (the cctools-733 release): -- Changed s_weak_definition() in read.c, colon() in symbols.c and - layout_symbols() in write_object.c to not check for the symbol defined as - not being in a coalesced section. Then changed fix_to_relocation_entries() - in write_object.c to produce an external relocation entry if is is an external - coalesced symbol or weak symbol. And changed fixup_section() in layout.c to - not add the value of the symbol into the item to be relocated if it is an - external coalesced symbol or weak symbol. Radar bug #6422713. - -Changes for the 5.26 release (the cctools-731 release): -- Fixed s_thumb_set() in arm.c to set the N_ARM_THUMB_DEF bit in the sy_desc - field of the symbol. Radar bug #6366869 - -Changes for the 5.26 release (the cctools-729 release): -- Put back in the change below and removed the #ifdef CHANGE_FOR_6233320 in - driver.c . Radar bug #6233320. - -Changes for the 5.26 release (the cctools-728 release): -- Changed arm_force_relocation() in arm.c so the the first if() conditional - includes the check for the relocation type BFD_RELOC_THUMB_PCREL_BRANCH25 to - cause it to generate a relocation entry for thumb2 b.w version of the branch. - Radar bug #6297258. -- Changed md_apply_fix() in arm.c in the BFD_RELOC_ARM_SWI case if conditonal - from this: - if (fixP->tc_fix_data != 0) - to: - if (*((int*)fixP->tc_fix_data) != 0) - Radar bug #6337904. -- Backed out the change below with an #ifdef CHANGE_FOR_6233320 in driver.c - for now. Radar bug #6233320. - -Changes for the 5.26 release (the cctools-727 release): -- Put back in the change below and removed the #ifdef CHANGE_FOR_6233320 in - driver.c . Radar bug #6233320. - -Changes for the 5.26 release (the cctools-724 release): -- Backed out the change below with an #ifdef CHANGE_FOR_6233320 in driver.c - for now. Radar bug #6233320. - -Changes for the 5.26 release (the cctools-723 release): -- Changed the assember driver, /usr/bin/as , when running on an Intel x86_64 - host to default to -arch x86_64 instead of -arch i386. The change was in - driver.c in main() after it finds no arch_name set and calls - get_arch_from_host(). A test for cputype == CPU_TYPE_I386 is made and if - true the arch_flag gets set to the family flag for CPU_TYPE_X86_64. Radar - bug #6233320. -- radr://4545225 assembler should implement all dwarf-related GAS pseudo-ops - This is NOT yet hooked up as of cctools-723, but the code changes are put in - to top of tree to since they build and do not effect the operation of the - assembler's existing functionality. - - Moved now_seg definition from layout.c to sections.c and added the - definition of now_subseg to sections.c. Added their declrations to - sections.h . - - Changed section_new() sections.c to always set now_seg as the value from - the frch_nsect field in the struct frchain for the current section. - now_subseg is always left with a value of zero. - - This is done so now_seg can be used dwarf2dbg.c for the seg field - of the struct line_seg. And letting now_subseg remain zero so there are - just one line_subseg per line_seg. - - Added the new routines get_section_by_nsect(), get_section_by_name() and - section_set() to sections.[ch] . - - Added dwarf2dbg.c from GAS and ported it: - - The routine dwarf2_finish() got a bit of a rewrite to deal with Mach-O - objects. And now uses section_new() and get_section_by_name() to see if - it exists to replace the bfd_get_section_by_name() test. - - Changed the three uses of seg_info() to get_section_by_nsect() and - modified the code to use the returned struct frchain pointer. - - The routines to emit the dwarf sections: out_debug_line(), - out_debug_ranges(), out_debug_aranges(), out_debug_abbrev(), - out_debug_info() were changes to instead take segT parameters to take - struct frchain * parameters and there names changed to XXX_section from - XXX_seg. - - Changed subseg_set() to a new routine section_set() that was added to - change sections. - - Changed the call to resolve_symbol_value() in both - dwarf2dbg_estimate_size_before_relax() and dwarf2dbg_convert_frag() - to use the frag's values to calculate this. - - The use of O_subtract with expressionS and use of the X_op_symbol field for - the symbol value to subtract were change to use SEG_DIFFSECT and - X_subtract_symbol instead. - - Added rs_dwarf2dbg to relax_stateT enum in relax.h . - - Added a definition and declration of debug_type and enum debug_info_type - to as.[ch] and changed main() to set set debug_type to DEBUG_DWARF2 when - the argument --gdwarf2 is specified. - - Added an emit_expr() routine to dwarf2dbg.c based on the functionality of - the one in GAS's read.c but just for the ported uses in dwarf2dbg.c . - - Added to symbols.[ch] the routines: symbol_temp_new(),symbol_temp_new_now(), - symbol_temp_make() and symbol_set_value_now() needed in dwarf2dbg.c . - - Added a section_symbol field to the frchain struct in sections.h . - - Added to sections.[ch] section_symbol() to create and set a symbol at the - start of the section. -- Changed all the routines used in the poc_handler field of a pseudo_typeS to - change its parameter from int to uintptr_t to get rid of warnings. See - Radar bug #6219587 below. - -Changes for the 5.26 release (the cctools-722 release): -- Changed s_fill() in read.c to allow .fill with a size of 8. Radar bug - #5783217. - -Changes for the 5.26 release (the cctools-718 release): -- Fixed a bug in read.h which had an incorrect prameter type for the poc_handler - function pointer field of the pseudo_typeS typedef. The poc_val parameter was - an int type but is used to hold pointers so it needs to be a uintptr_t type. - Radar bug #6219587. - -Changes for the 5.26 release (the cctools-716 release): -- Fixed a bug in s_zerofill() in read.c caused by the change in Radar bug - #6159238 where it needed to change to handle the case of an extra space after - the segment name before a comma in the parsing. Radar bug #6195283. -- Fixed a bug in parse_neon_el_struct_list() in arm.c where it was loosing - the information about the index used for things like "d0[]" and making it - look like "d0". In the loop to parse the argument list, in the is case - "{d0[]-d1[0]}" it called parse_typed_reg_or_scalar() which was passed - pointer to a neon_typed_alias struct, atype, to fill in. Then when it gets to - parsing the "-" it does not look at the atype.defined like the code after - the parsing of "-". So that same bit of code which looks like: - if ((atype.defined & NTA_HASINDEX) != 0) - { - if (lane == -1) - lane = atype.index; - else if (lane != atype.index) - { - first_error (_(type_error)); - return FAIL; - } - } - else if (lane == -1) - ... - to match what is done after the the parsing of "-" so it does not lose the - information about the index of "d0[]". What was happening for example was - this instruction: - vld1.f32 {d0[]-d1[]}, [r0] - was ending up as this instruction: - vld1.32 {d0-d1}, [r0] - Radar bug #6185952. - -Changes for the 5.26 release (the cctools-715 release): -- Fixed the .thumb_set directive fails which was failing to parse its second - operand. The fix was in s_thumb_set() to include the call to pseudo_set() - outside the #ifdef. And to change pseudo_set() in read.[ch] to not be - static. Radar bug #6182961. -- Fixed the handling of -force_cpusubtype_ALL for the arm assembler. The code - near the end of md_begin() that tested for force_cpusubtype_ALL needed to - be changed to set the cpu_variant variable to allow everything and to set - archflag_cpusubtype to CPU_SUBTYPE_ARM_ALL as that is what will get set into - the resulting object file (not md_cpusubtype). Radar bug #6150777. -- Fixed a problem with the change to Radar bug #4141844 where it was trying to - allow a prefix on the same line as the instruction without a separating shash, - '/', character. The original change added a new "substate" variable to app.c. - But there were cases that it did not get set back it its initial value of zero - at the start of each line (state 0). So to make this a bit more robust all - places where the state gets set back to zero the substate is also set to zero. - Radar bug #6159238. - -Changes for the 5.26 release (the cctools-714 release): -- Added the arm instructions vmrs and vmsr to be the same as fmrx and fmxr in - arm.c . Radar bug #6152739. -- Fixed a bug where the field sy_has_been_resolved in the symbol struct was - being used uninitialized. The fix is in symbol_new() in symbols.c . - Radar bug #6163385. - -Changes for the 5.26 release (the cctools-713 release): -- Changed an error message in md_apply_fix() for the BFD_RELOC_ARM_OFFSET_IMM8 - case to use as_bad_where() not as_bad() so a file and line number gets - printed. Radar bug #5890008. - -Changes for the 5.26 release (the cctools-711 release): -- Fixed a problem with getting the correct value of a difference of two symbols - that it was divided by 2 for 32-bit targets. As the resulting value was - being calculated into a 64-bit signed type, signed_expr_t, with a += of an - expression of 2 32-bit unsigned types in fixup_section() in layout.c . - Radar bug #6096697. - -Changes for the 5.26 release (the cctools-709 release): -- Fixed a problem with .quad expression values getting assembled with constants - larger than 32-bits being added to symbols. Two places were using 32-bit - types, the offset field in the fix struct in fixes.h and the local variable - value in fixup_section() in layout.c . Radar bug #5955044. -- Removed the call to abort() in reloc() in i386.c that should not be there - after a call to as_bad() to generate an error message. Radar bug #6029941. - -Changes for the 5.26 release (the cctools-706 release): -- Fixed a problem with the ported to run on 64-bit hosts, where changes to - atof-generic.c had 3 places change to uint32_t which should have been int32_t. - -Changes for the 5.26 release (the cctools-705 release): -- Ported to run on 64-bit hosts. Radar bug #6022298 - -Changes for the 5.26 release (the cctools-703 release): -- Added the .inlineasmstart and .inlineasmend directives to check that only - numeric lables are defined between them. And if not generate an error message - from the arguments of the .inlineasmstart directive. Radar bug #5896375. - - In read.c added the new routine s_inlineasm() and added it to the - pseudo_table[]. For the .inlineasmstart directive, s_inlineasm() is passed - a value of 1 and parses out the optional file_name, line_number and - column_number arguments. When the .inlineasmstart directive is see it sets - the new inlineasm_checks variable and fills in the new variables - inlineasm_file_name, inlineasm_line_number and inlineasm_column_number with - the arguments. And when the .inlineasmend directive is seen it clears - the new variables. The new variables are defined in read.[ch]. - - The routine colon(), in symbols.[ch], was changed to take a new parameter - local_colon that is set when called by local_colon. And a test was added - if inlineasm_checks is set and local_colon() is not to cause an error. - If inlineasm_file_name is set then the new routine, in messages.[ch], - as_warn_where_with_column() is called else as_bad() is called to generate - the error message. - - The two plaves in read.c that call colon() had a 0 second argument added and - the call to colon() from local_colon() in symbols.c had a 1 second argument - added. -- Improved the x86_64 assembly time by caching the value of the linked list - search of x86_64_resolve_local_symbol() in i386.c. Added two fields, - sy_has_been_resolved and sy_prev_resolved, to the symbol structure in - struc-symbol.h. Radar bug #5902686. - -Changes for the 5.26 release (the cctools-701 release): -- Fixed a problem in expr() in expr.c when it is combining a symbol that is a - set to a substract expression, SEG_DIFFSECT, with a constant. In that case - it gets incorrectly combined to a SEG_ABSOLUTE instead of retaining the - SEG_DIFFSECT expression type. Also Changed the x86_64 assembler to allow a - 32-bit displacement operand as a symbol set to the subtraction of two - instructions. Code was added in output_disp() in i386.c to test for this - specific case and create the needed fix for it. Radar bug #5683920. -- Fixed a problem in pseudo_set() in read.c when it is setting a symbol to - another symbol that was already a section difference expression. In that case - expression() returns an expression of just one symbol and a type of - SEG_DIFFSECT. Code at the case for SEG_DIFFSECT needed to be added to handle - this case and copy the expression of the symbol in to the new symbol being - set. Radar bug #5684077. -- Changed the x86_64 assembler to allow a 32-bit displacement operand as a - subtraction of two instructions. Code was added in output_disp() in i386.c - to test for this specific case and create the needed relocation entries for - it. Radar bug #5622258. - -Changes for the 5.25 release (the cctools-697 release): - -Changes for the 5.25 release (the cctools-689 release): -- Fixed a place that needed force_cpusubtype_ALL tested in md_assemble() in - arm.c . Radar bug #5817558. -- Added support for the special assembly time constant expression of the diff- - erence of two symbols defined in the same section then divided by exactly 2. - Radar bug #5819903. - - Added the field X_sectdiff_divide_by_two to the expressionS typedef in - expr.h . - - In expr() in expr.c added code to look for an expression with a SEG_DIFFSECT - and a left side with an SEG_ABSOLUTE X_add_number == 2 and a O_divide right - side and if so set the new X_sectdiff_divide_by_two field. - - Added the field fx_sectdiff_divide_by_two to the struct fix. - - Changed cons() in read.c to save the fix for a SEG_DIFFSECT and to copy the - the new X_sectdiff_divide_by_two field from the expression to the new - fx_sectdiff_divide_by_two field in the fix. - - In fixup_section() in layout.c added code to test the news - fx_sectdiff_divide_by_two field and if so divide the value by 2. And check - to see that the expression is an assembly time constant. - -Changes for the 5.25 release (the cctools-686 release): -- Changed arm_relax_frag() in arm.c to take a section number for the section it - is operating on. That is in turn now passed to relax_branch() in arm.c and - in there if the symbol that is being branched to is not for that section it - returns 4 for the size of the instruction. -- In md_apply_fix() for BFD_RELOC_THUMB_PCREL_BRANCH25 the fx_r_type type is - set to BFD_RELOC_THUMB_PCREL_BRANCH23 so it can be output as a known - relocation type (ARM_THUMB_RELOC_BR22). - -Changes for the 5.25 release (the cctools-685 release): -- Changed relaxed_symbol_addr() in arm.c to also add in - fragp->fr_symbol->sy_nlist.n_value when calculating the addr. Without this - it can some times get "branch out of range" errors since it appears this - to have the address of the symbol from the start of the fragment. -- Changed the check in md_assemble() in arm.c for "width suffixes are invalid - in ARM mode" to allow them with unified syntax. -- Changed the arm APPLE LOCAL trap instruction opcode entry in arm.c from this: - CE(trap, 7ffdefe, 0, (), noargs), - to this: - TUE(trap, 7ffdefe, defe, 0, (), noargs, noargs), - which allows it to work with thumb mode. -- Changed relax_section() in layout.c in two plaves #ifdef'ed ARM. In the first - look it now sets frag's relax_marker field to zero. In the "Do relax" loop - it flips the relax_marker field with an "^= 1". This is to fix a problem in - relaxed_symbol_addr() so it knows to add the stretch amount to the addr it - is returning. -- Added a second call to as_file_and_line() in frag_var() in frags.c which was - #ifdef ARM at the top of the file to set the fr_file and fr_line fields of - the current frag before creating a new frag. This is needed because as the - line number of the last instruction which is the "relaxable" instruction is - the line number that is needed (not the first one). So when relax_section() - calls arm_relax_frag() which calls md_convert_frag() it will call - fix_new_exp() and fix_new_internal() so a new fix may be created after all - code is read for the last instruction in the frag. So md_convert_frag() - copies the fr_file and fr_line fields of the frag into the fx_file and fx_line - fields of the fix so line numbers can be reported. - -Changes for the 5.25 release (the cctools-684 release): -- Changed relaxed_symbol_addr() in arm.c to not use the hack ported - S_GET_VALUE() as at that point the symbol does not have the value set. The - code was #ifdef NOTYET to use fragp->fr_symbol->sy_frag->fr_address to get - the address from the symbol's frag. The hack ported S_GET_VALUE() routine - was removed from symbols.[ch]. -- Changed relax_addsub() where it had a memcpy() hack in place of the - #ifdef NOTYET out call to bfd_get_16() to a call to a call to - md_chars_to_number() to retrive the old thumb opcode into op that - output_relax_insn() put into the frag. -- Added a call to as_file_and_line() in frag_var() in frags.c which was #ifdef - ARM to set the fr_file and fr_line fields of the frag. This is needed because - when relax_section() calls arm_relax_frag() which calls md_convert_frag() - it will call fix_new_exp() and fix_new_internal() so a new fix will be created - after all code is read. So md_convert_frag() copies the fr_file and fr_line - fields of the frag into the fx_file and fx_line fields of the fix so line - numbers can be reported. - -Changes for the 5.25 release (the cctools-683 release): -- Fixed a bug in fix_new_arm() in arm.c after the call to fix_new_exp() before - the default: case label as missing a break; statement. -- Fixed a bug in relax_section() in layout.c for the "Do relax" loop where - the call to arm_relax_frag() should have set the variable growth not - incremented. The "+=" was change to just an assignment, "=". - -Changes for the 5.25 release (the cctools-682 release): -- Changed relax_section() in layout.c for the "Do relax" loop and #ifdef'ed - ARM the rs_machine_dependent case to call arm_relax_frag(). -- Changed md_convert_frag() where it had a memcpy() hack in place of the - #ifdef NOTYET out call to bfd_get_16() to a call to a call to - md_chars_to_number() to retrive the old thumb opcode into old_op that - output_relax_insn() put into the frag. - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in Makefile, notes, as.c, layout.c, - messages.c, symbols.c, write_object.c, frags.h and symbols.h . -- Fixed a bug in the table entries for the pextrq and pinsrq instructions as - they should have had Size64 to force the REX.W byte. -- Fixed a bug in the table entries for the i386 SSE4.1 instruction insertps - where it had the second parameter as a general register not a xmm register. - The change was in i386-opcode.h to change Reg32 and Reg64 to RegXMM. - Radar bug #5650346. -- Changed output_relax_insn() in arm.c to just used the undefined symbol instead - of calling make_expr_symbol() if the expression is a just an undefined symbol - and no subtract symbol. - -Changes for the 5.25 release (the cctools-680 release): +TODO for coalesced symbols: +- Should external relocation entries for defined coalesced symbols only be + created with -dynamic and not -static? + +TODO: +- Add MacOS line termination \r . + +Known bugs: +- The assembly line: + bl ""foo"" + causes the symbol name "" to be used. +- cmpwi seems to be the same as cmpi for PowerPC. diff --git a/cctools/include/mach/machine.h b/cctools/include/mach/machine.h index d9268e4..7b81cc5 100644 --- a/cctools/include/mach/machine.h +++ b/cctools/include/mach/machine.h @@ -306,7 +306,6 @@ extern vm_offset_t interrupt_stack[]; #define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) #define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) #define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) -#define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) /* * MC88000 subtypes diff --git a/cctools/include/notes b/cctools/include/notes dissimilarity index 97% index 9cfb7d1..94588f3 100644 --- a/cctools/include/notes +++ b/cctools/include/notes @@ -1,1437 +1,30 @@ -Changes for the 5.26 release (the cctools-750 release): -- Added lto_get_nlist_64() to stuff/lto.h for use by nm(1) print information - from llvm bit code files. Radar bug #6067110. - -Changes for the 5.25 release (the cctools-737 release): -- Added the new ARM_THUMB_32BIT_BRANCH relocation type to . - Radar bug #6511482. - -Changes for the 5.25 release (the cctools-725 release): -- Added support for new compressed LINKEDIT information. Radar bug #6232822. - - Added dyld_info_command and constants to mach-o/loader.h . - - Added the dyld_info, output_dyld_info and output_dyld_info_size fields to - the object struct in stuff/breakout.h . - - Added the swap_dyld_info_command() prototype to stuff/bytesex.h . - -Changes for the 5.25 release (the cctools-724 release): -- Added the MH_KEXT_BUNDLE and MH_DEAD_STRIPPABLE_DYLIB constants to - . Radar bug #6272534. - -Changes for the 5.25 release (the cctools-718 release): -- Added the header file "coff/debug_directory.h" and added that to the Makefile. - Added swap_debug_directory_entry() and swap_mtoc_debug_info() to - "coff/bytesex.h". Radar bug #6211642. - -Changes for the 5.25 release (the cctools-708 release): -- Picked up the changes to the comments in for - Radar bug #5949622. - -Changes for the 5.25 release (the cctools-705 release): -- Changed the struct ofile in so that the lto* fields are not - #ifdef'ed LTO_SUPPORT. Radar bug #5960471. -- Ported to work on 64-bit hosts: Radar bug #6022298. - - Changed the unsigned long types in to uint32_t - types. Also change the macro REDO_PREBINDING_VERSION from 2 to 3. - - Changed the unsigned long types in to uint32_t types. - - Changed the unsigned long types in to uint32_t types. - - Changed the comments in that referred to sizeof(long) to - sizeof(uint32_t). - - Changed the unsigned long types in to uint32_t types and - changed the long type to an int32_t type. - - Changed the unsigned long type in to a uint32_t type. - - Changed the unsigned long type in to a uint32_t - type. - - Changed the unsigned long type in to a uint32_t type. - - Changed the unsigned long types in to uint32_t types. - - Changed the unsigned long types in to uint32_t types. - - Changed the unsigned long types in to uint32_t types and - changed the long type to an int32_t type. - - Changed the unsigned long types in to - uint32_t types. - - Changed the unsigned long type in to a size_t type. - - Changed the unsigned long types in to uint32_t types. - - Changed the long type in to an int32_t type. - - Changed the long types in to int types. - - Changed the unsigned long type of errors in to a uint32_t - type. - - Changed the unsigned long types in to a uint32_t - types. - - Changed the unsigned long type in to a uint32_t type. - - Changed the unsigned long type and the unsigned int type in - to uint32_t types. - - Changed the unsigned long types in to uint32_t types. - - Changed the unsigned long types in to uint32_t types. - And changed the one long type to a int32_t type. - - Changed the type that cpusubtype_findbestarch() takes in - to a uint32_t from an unsigned long. - - Changed the type that get_stack_direction_from_flag() returns in - to an int from a long. - - Changed the type that allocate() and reallocate() takes in - to a size_t from an unsigned long. - -Changes for the 5.25 release (the cctools-698 release): -- Added support for LLVM bitcode files. Radar bug #5712460. - It was added undef the ifdef LTO_SUPPORT and can be disabled by setting the - LTO Makefile macro to nothing instead of its default -DLTO_SUPPORT . - - Added the enum value OFILE_LLVM_BITCODE to "stuff/ofile.h" - - Added the fields lto, lto_cputype and lto_cpusubtype to the ofile struct in - "stuff/ofile.h". - - Added the header file "stuff/lto.h" and added it to the Makefile. - -Changes for the 5.25 release (the cctools-697 release): - -Changes for the 5.25 release (the cctools-696 release): -- Changed to use _ARM_THREAD_STATUS_H_ and not - _MACH_ARM_THREAD_STATUS_H_. - -Changes for the 5.25 release (the cctools-691 release): -- Added encryption_info_command and LC_ENCRYPTION_INFO to . - Radar bug #5811987 -- Added swap_encryption_command() to "stuff/bytesex.h". Radar bug #5811994. - -Changes for the 5.25 release (the cctools-688 release): -- Added LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS to - . Radar bug #5760930 - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in Makefile, notes, stuff/bytesex.h, - stuff/symbol.h, mach/machine.h, mach-o/nlist.h . -- Added IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER to coff/aouthdr.h . - -Changes for the 5.25 release (the cctools-680 release): -- Added support for ARMv7. Radar bug #5490815. - - Picked up opcode/arm.h from the last GNU binutils v2 source. - - Added CPU_SUBTYPE_ARM_V7 to mach/machine.h -- Added coff/{ms_dos_stub.h,filehdr.h,aouthdr.h,scnhdr.h,syment.h} based on - GNU binutils headers. Radar bug #5536661. -- Added swap_ms_dos_stub(), swap_filehdr(), swap_aouthdr(), swap_scnhdr(), - swap_syment() to coff/bytesex.h . Radar bug #5536661. - -Changes for the 5.25 release (the cctools-676 release): -- Added coff/base_relocs.h and coff/bytesex.h . Radar bug #5218665. - -Changes for the 5.25 release (the cctools-675 release): -- Added extern "C" #if'ed in for __cplusplus to . Radar bug - #5419852. -- Added the new ld_r_ofile field in the struct object in "stuff/breakout.h" - the is set in strip(1) when making an ld -r of an object for stripping DWARF - so free_archs() in libstuff can call ofile_unmap() on it. Radar bug #5343015. - -Changes for the 5.25 release (the cctools-673 release): -- Changed the sources so the arm stuff is not in the open source version. - Radar bug #5326431. - - Changed the Makefile to #ifndef __OPEN_SOURCE__ out the arm files and to - run unifdef on nlist.h - - Added #ifndef __OPEN_SOURCE__ to the following files to bracket arm code: - mach/machine.h, mach-o/nlist.h, stuff/bytesex.h and stuff/symbol.h . - -Changes for the 5.24 release (the cctools-663 release): -- Changed so that it now has a struct - that contains the major, minor and name of the macosx_deployment_target. - And also changed the prototype of get_macosx_deployment_target() to take - just a pointer to the struct. Radar bug #5132019. - -Changes for the 5.24 release (the cctools-660 release): -- Added extern "C" #if'ed in for __cplusplus to and updated - other headers to not have a trailing semicolon after the closing curly brace - for the extern "C". Radar bug #5075908. - -Changes for the 5.24 release (the cctools-656 release): -- Added MH_PIE to . Radar bug #5041291. - -Changes for the 5.24 release (the cctools-653 release): -- Added GMONTYPE_DYLD2_STATE to . Radar bug #4960162. - -Changes for the 5.24 release (the cctools-651 release): -- Added the headers_swapped field to the ofile struct in "stuff/ofile.h". - Radar bug #4970647. - -Changes for the 5.24 release (the cctools-649 release): -- Added S_DTRACE_DOF to to . Radar bug #4918330. - -Changes for the 5.24 release (the cctools-648 release): -- Ported to 64-bit. Radar bug #4601274. - -Changes for the 5.24 release (the cctools-645 release): -- Added support for rpath load command. Radar bug #4822880. - - Added swap_rpath_command() to "stuff/bytesex.h" . -- Added extern "C" #if'ed in for __cplusplus to . - Radar bug #4814441. - -Changes for the 5.24 release (the cctools-644 release): -- Added CPU_SUBTYPE_VEO_3 and CPU_SUBTYPE_VEO_4 to "mach/machine.h". - Radar bug #4799550. -- Changed get_stack_addr_from_flag() in "stuff/arch.c" to return a uint64_t. - Radar bug #4458775. - -Changes for the 5.24 release (the cctools-640 release): -- Added the capability bit macros to . Radar bug #4754462. - -Changes for the 5.24 release (the cctools-638 release): -- Added the input_indirectsym_pad field to the object struct in - to deal with the fact that 64-bit object may or may not - have padding after the indirect symbol table entries if they have an odd - number of entries. Radar bug #4747408. - -Changes for the 5.24 release (the cctools-637 release): -- Added the macros GET_COMM_ALIGN() and SET_COMM_ALIGN() to . - Radar bug #4597166. - -Changes for the 5.24 release (the cctools-634 release): -- Added support for split info load command and data. Radar bug #4695477. - - Added the split_info_cmd, output_split_info_data, and - output_split_info_data_size fields to the object struct in the header - "stuff/breakout.h". - -Changes for the 5.24 release (the cctools-632 release): -- Ported some headers to used when compiled for 64-bit hosts. - Radar bug #4407440. - - Added SWAP_INT() macro to and added an #ifndef __LP64__ - around the SWAP_LONG() macro. - - Changed the parameter types of swap_indirect_symbols() to be a uint32_t * - and a uint32_t in . - - Ported by not using ranlib structs since ran_un.ran_name - can be used when compiling for 64-bit hosts. - - Added the new toc_entry struct to . - - Changed the toc_nranlibs field name in the arch struct to ntocs. - - Added the new toc_entries field to the arch struct. - - Ported and changed ofile_get_word()'s parameter 'word' to - a uint32_t pointer from an unsigned long pointer. - -Changes for the 5.24 release (the cctools-630 release): -- Picked up the changes that got dropped from the the cctools-622.5 release: - - Support the new x86-64 relocation entry types for signed relocations - with offsets. Radar bug #4664658. - Radar bug #4678307. - -Changes for the 5.24 release (the cctools-626 release): -- Added support for code signature load command and data. Radar bug #4588023. - - Added the code_sig_cmd, output_code_sig_data, and output_code_sig_data_size - fields to the object struct in the header "stuff/breakout.h". Also removed - the output_indirect_symtab64 field since it should not be there as all - indirect symbol table entries are 32-bit indexes into the symbol table. - - Added swap_linkedit_data_command() to "stuff/bytesex.h" . - -Changes for the 5.24 release (the cctools-624 release): -- Added Mach-O enhancements for Leopard to . Radar bug - #4614861. - -Changes for the 5.23 release (the cctools-620 release): -- Added the routines swap_x86_state_hdr(), swap_x86_float_state64(), - swap_x86_exception_state64(), swap_x86_thread_state(), swap_x86_float_state(), - swap_x86_exception_state(), swap_x86_debug_state32(), - swap_x86_debug_state64() and swap_x86_debug_state() to . - Radar bug #4491230. -- Added the routines swap_x86_float_state64(), swap_x86_state_hdr(), - swap_x86_exception_state64(), swap_x86_debug_state32(), - swap_x86_debug_state64() to "stuff/bytesex.h" . Radar bug #4491230. - -Changes for the 5.23 release (the cctools-618 release): -- Add S_16BYTE_LITERALS to mach-o/loader.h. Radar bug #4555162. - -Changes for the 5.23 release (the cctools-616 release): -- Added the routines swap_mach_header_64(), swap_segment_command_64(), - swap_section_64(), swap_routines_command_64(), swap_nlist_64() and - swap_dylib_module_64() to . Radar bug #4358209. - -Changes for the 5.23 release (the cctools-614 release): -- Changed "stuff/bytesex.h" to use __darwin_i386_float_state instead of the type - i386_float_state. Radar bug #4508798. -- Changed the Makefile so that GAS_MISSING_SRCS does not have - mach-o/i386/thread_status.h since it has been removed from the project and - causes build problems on Mac OS 10.3.9 . Radar bug #4508798. -- Changed the Makefile so that GAS_MISSING_SRCS does not have - mach-o/x86_64/reloc.h since it is also in FILES and causes build problems on - Mac OS 10.3.9 . Radar bug #4508798. - -Changes for the 5.23 release (the cctools-610 release): -- Added a few ifdef x86_THREAD_STATE64 to a few places to mach-o/i386/swap.h and - stuff/bytesex.h to allow it to build on Tiger. Radar bug #4535019. - -Changes for the 5.22 release (the cctools-590.37.3 release): -- Improve the comments in the x86-64 reloc.h. Radar bug #4488180. - -Changes for the 5.22 release (the cctools-590.37.2 release): -- Add an extern "C" block to redo_prebinding.h. Radar bug #4319807. - -Changes for the 5.22 release (the cctools-590.36.3 release): -- Add support for the new relocation entry types for x86-64. Radar bug #4475165. - -Changes for the 5.22 release (the cctools-590.31.1 release): -- Added . Radar bug #4345090. - -Changes for the 5.21 release (the cctools-590.35 release): -- Added the constant MH_DSYM to for dSYM files. Radar - #4443871. - -Changes for the 5.21 release (the cctools-590.25 release): -- Changed the comment in for debug sections to include that - they must have a section type of S_REGULAR. Radar bug #3415593. - -Changes for the 5.21 release (the cctools-590.24 release): -- Added support for DWARF. Radar bug #4367423. - - Added the constant S_ATTR_DEBUG to for debug sections. - - Added the constant LC_UUID and the uuid_command struct to . - - Added the prototype for swap_uuid_command() to "stuff/bytesex.h" . - - Added the prototype for swap_uuid_command() to for encrypted - segment contents. Radar bug #4298526. - -Changes for the 5.18 release (the cctools-590.12 release): -- Added the MH_ALLOW_STACK_EXECUTION constant to to control - stack execution. Radar bug #4281171. -- Added the new routine get_segprot_from_flag() to "stuff/arch.h". Radar bug - #4281171. - -Changes for the 5.18 release (the cctools-590.10 release): -- Added the SEG_IMPORT and S_ATTR_SELF_MODIFYING_CODE constants to - to support the new i386 code stubs that dyld will write on. - Radar bug #4202415. - -Changes for the 5.19 release (the cctools-590.8 release): -- Changed and "stuff/bytesex.h" to be #if'ed for the new - and old routines that swap the i386 thread states. Radar bug #4200908. - -Changes for the 5.19 release (the cctools-590.7 release): -- Added the new routine put_macosx_deployment_target() to - "stuff/macosx_deployment_target.h" to allow the value of - MACOSX_DEPLOYMENT_TARGET to be set on the argument to the compiler command - line flag -macosx_version_min. Radar bug #4195253. - -Changes for the 5.18 release (the cctools-590.5 release): -- Added the N_OSO stab to for object file name to be created - by ld(1) new -Sp option. Radar bug #4202462. - -Changes for the 5.18 release (the cctools-589 release): -- Added the CPU_SUBTYPE_PENTIUM_4 subtype to - Radar bug #4115802. - -Changes for the 5.18 release (the cctools-583 release): -- Added the MACOSX_DEPLOYMENT_TARGET_10_5 value to the enum - macosx_deployment_target_value list in macosx_deployment_target.h. Radar - bug #4098516. - -Changes for the 5.18 release (the cctools-580 release): -- Changed get_macosx_deployment_target() in "stuff/macosx_deployment_target.h" - to take an additional cpu_type_t parameter. The new cpu_type_t parameter is - used to set the default. For CPU_TYPE_I386 the default is 10.4 otherwise it - is 10.1. Radar bug #4081062. - -Changes for the 5.17 release (the cctools-574 release): -- Added the new force_cpusubtype_ALL_for_cputype() function to "stuff/arch.h" . - Radar bug #4002758. - -Changes for the 5.17 release (the cctools-572 release): -- Changed __private_extern__'s in to just extern so that libkld - will build with gcc-4.0. Radar bug #4008570. - -Changes for the 5.17 release (the cctools-568 release): -- Added the constant S_INTERPOSING to . Radar bug #3965794. -- Changed "stuff/bytesex.h" and "stuff/arch.h" to remove multiply defined - warnings by changing all #import's to #include's. - -Changes for the 5.17 release (the cctools-564 release): -- Changed the Makefile so that it only installs /usr/include/mach-o/dyld_debug.h - for releases Panther and older. Radar bug #3937664. - -Changes for the 5.17 release (the cctools-563 release): -- Added the constants MH_WEAK_DEFINES and MH_BINDS_TO_WEAK to - and the constant N_REF_TO_WEAK to . Radar bug #3799069. -- Changed "stuff/bytesex.h" to remove multiply defined warnings by adding - #undef's for MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT after - including . - -Changes for the 5.17 release (the cctools-562 release): -- Removed mach/ppc/thread_status.h from the project and the Makefile. - Radar bug #3930480. - -Changes for the 5.17 release (the cctools-560 release): -- Changed the constant FAT_CIGAM in to not - use NXSwapInt() but use a real constant. Radar bug #3914142. - -Changes for the 5.17 release (the cctools-557 release): -- Removed support for the INTERIM_PPC64. The changes were to remove the - #ifdef INTERIM_PPC64 source changes in mach/machine.h . Radar bug #3600419. - -Changes for the 5.17 release (the cctools-552 release): -- Added the header file "stuff/unix_standard_mode.h" for the new routine - get_unix_standard_mode() to know when we are running in UNIX standards - conformance mode. Radar bug #3852702. - -Changes for the 5.17 release (the cctools-551 release): -- Added support for the ppc64 thread state. Radar bug #3866755. - - Added ppc_thread_state64 struct and constants to "mach/ppc/thread_status.h" - - Added swap_ppc_thread_state64_t() to "stuff/bytesex.h" - -Changes for the 5.17 release (the cctools-550 release): -- Removed the structure definition selectedSymbolListInfo from cbt/libsyminfo.h - (which was moved to the source file cbtlibs/libsyminfo.c). Radar bug #3854972. -- Changed the constant CPU_IS64BIT in to CPU_ARCH_ABI64. - Radar bug #3806447. - -Changes for the 5.17 release (the cctools-546 release): -- Made changes needed to make libmacho APIs work with for 32-bit & 64-bit. - Radar bug #3780704. - - Changed to deal with 32-bit & 64-bit interfaces. - - Changed the getsectdata() and getsectdatafromFramework() 'size' parameter - back to 'unsigned long *'. - - Changed the return values of get_end(), get_etext() and get_edata() back - to 'unsigned long'. - - Added #ifndef __LP64__ around the existing defintions of getsectbyname() - and getsegbyname() and added #ifdef __LP64__ defintions that have the - 64-bit types. - - Added the new API's getsectdatafromheader_64() and - getsectbynamefromheader_64() for 64-bit Mach-O files. - - Changed to deal with 32-bit & 64-bit mach headers. - - Changed and added an #ifdef __LP64__ version of the - definition of _dyld_get_image_header() as an internal cctools fix to allow - libmacho to build without warnings. - -Changes for the 5.17 release (the cctools-539 release): -- Changed to support 32-bit & 64-bit tools that write binaries. Radar bug - #3812858. - - Changed the struct object in "stuff/breakout" to have both pointers to - 32-bit and 64-bit mach headers, link edit segments, arrays of section - structs, output symbols, output dynamic library modules and indirect symbol - table entries. And added fields for mh_cputype, mh_cpusubtype, and - mh_filetype copied from the mach header. - - Changed the struct symbol_list in "stuff/symbol_list.h" to make the - the sym field to a "void *" from an "nlist_t *". - -Changes for the 5.17 release (the cctools-536 release): -- Added the type signed_target_addr_t as int32_t to "stuff/target_addr.h". As - it being unsigned was causing problem in the i386 assembler's macros. Radar - bug #3813924. - -Changes for the 5.17 release (the cctools-534 release): -- Changed the definition of CPU_TYPE_POWERPC64 in "mach/machine.h" from - #define CPU_TYPE_POWERPC64 ((cpu_type_t) 19) - to - #define CPU_IS64BIT 0x1000000 - #define CPU_TYPE_POWERPC64 ((cpu_type_t)(CPU_TYPE_POWERPC | CPU_IS64BIT)) - Radar bug #3806447. - -Changes for the 5.17 release (the cctools-533 release): -- Changes to support 32-bit & 64-bit tools in the same binary. Radar bug - #3793394. - - Changed the struct ofile in "stuff/ofile.h" to have both a pointer to a - 32-bit and 64-bit mach header. - - Added the fields mh_cputype, mh_cpusubtype, and mh_filetype to the struct - ofile in "stuff/ofile.h" . - - Changed the struct ofile in "stuff/ofile.h" to have both pointers to a - 32-bit and 64-bit dylib_module. - - Changed the way the swap_* routines are declared in "stuff/bytesex.h" to - not use the "stuff/target_arch.h" typedefs but to have a routine for the - 32-bit and 64-bit structs. - - Added new #define's to "stuff/target_arch.h" to deal with the specific - swap_* functions for code to use that is compiled as a 32-bit and a 64-bit - target program. - - Changed swap_object_headers() to take a void * as the mach_header parameter - which can be either a mach_header or a mach_header_64 . - -Changes for the 5.17 release (the cctools-532 release): -- Made more changes to support 64-bit tools. Radar bug #3600431. - - Removed the #if defined(INTERIM_PPC64) || defined(ARCH64) around the - CPU_TYPE_POWERPC64 constant in so that it can be used in - for tools like lipo(1). - - Added swap_mach_header_64(), swap_segment_command_64() and swap_section_64() - routines to . -- Changed the constants MH_CIGAM and MH_CIGAM_64 in to not - use NXSwapInt() but use real constants. Radar bug #3762888. - -Changes for the 5.16 release (the cctools-529 release): -- Made changes to support 64-bit tools. Radar bug #3600431. - - Created the header file "stuff/target_arch.h" for use to compile tools for - 32-bit targets or tools for 64-bit targets. - - Created the header file "stuff/symbol.h" with an nlist_t, char *name and - char *indr_name for the use in the tools. - - Added the include "stuff/target_arch.h" to the following files: - stuff/breakout.h - stuff/bytesex.h - stuff/ofile.h - stuff/symbol_list.h - and changed the uses of structs that are different for 64-bit files to the - typedefs in "stuff/target_arch.h". - - Added SWAP_LONG_LONG() to bytesex.h. - - Changed the #ifdef in mach/machine.c around CPU_TYPE_POWERPC64 to be - #if defined(INTERIM_PPC64) || defined(ARCH64) - -Changes for the 5.16 release (the cctools-528.4 release): -- Changed the filesize and fileoffset fields of the segment_command_64 struct - in to allow core files greater than 4GB. Radar bug - #3781406. - -Changes for the 5.16 release (the cctools-528 release): -- Add GENERIC_RELOC_LOCAL_SECTDIFF to mach-o/reloc.h. - Radar bug #3744821. - -Changes for the 5.16 release (the cctools-527 release): -- Added the 64-bit object file structures to the following files: - - - Radar bug #3746533. -- Add PPC_RELOC_LOCAL_SECTDIFF to mach-o/ppc/reloc.h. - Radar bug #3744821. - -Changes for the 5.16 release (the cctools-526 release): -- Changed the following header files to be 64-bit clean by adding a #include - and changing the interger types to those defined in : - Headers dealing with file formats: - - - - - - Headers for library API: - - - Headers for library API & runtime API: - - Radar bug #3742429. - -Changes for the 5.16 release (the cctools-524 release): -- Fixed a problem in the Makefile where stuff/errors.h and stuff/openstep_mach.h - appeared in both GAS_OTHER_SRCS and OTHER_SRCS causing problems on make - installsrc if the file had more one hard link. -- Changed the Makefile to use OLD_DYLD_STUFF instead of DYLD_STUFF to work - around Radar bug #3675086. - -Changes for the 5.16 release (the cctools-520 release): -- Changed the reference to kmodload(8) in to kextload(8). - Radar bug #3633604. - -Changes for the 5.16 release (the cctools-517 release): -- Changed the Makefile for installsrc to always install all of the files. - -Changes for the 5.16 release (the cctools-515 release): -- Added the installGASsrc Makefile target to install just the needed header - files to build the GAS sources: - stuff/bytesex.h - stuff/bool.h - stuff/round.h - stuff/errors.h - stuff/openstep_mach.h - mach/m68k/thread_status.h - mach/i860/thread_status.h - mach/m88k/thread_status.h - architecture/m88k/fp_regs.h - architecture/m88k/reg_help.h - architecture/nrw/reg_help.h - architecture/nrw/macro_help.h - mach/hppa/thread_status.h - mach/sparc/thread_status.h - architecture/sparc/reg.h - mach/ppc/thread_status.h - and changed the Copyright in these files to the Apple BSD License. - Radar bug #3657295. - -Changes for the 5.16 release (the cctools-514 release): -- Added the new typedef: - typedef integer_t cpu_threadtype_t; - to cctools' copy of "mach/machine.h". - -Changes for the 5.16 release (the cctools-513 release): -- Changed the Makefile so that it only installs the following files for releases - Panther and older: - /usr/include/mach-o/dyld.h - /usr/local/include/mach-o/dyld_gdb.h - /usr/local/include/mach-o/dyld_priv.h - Radar bug #3639836. - -Changes for the 5.16 release (the cctools-512 release): -- Added then new enum bool * seen_archive parameter to writeout_to_mem() to the - header file "stuff/breakout.h". See the notes in libstuff for this, as this - is part of the fix for Radar bug #3645280. - -Changes for the 5.16 release (the cctools-509 release): -- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 - file format in . - -Changes for the 5.16 release (the cctools-501 release): -- Added the MH_SUBSECTIONS_VIA_SYMBOLS mach header flag to to - be used to indicate to the static link editor it is safe to divide up the - sections into sub-sections via symbols for dead code stripping. Radar bug - #2284500. - -Changes for the 5.16 release (the cctools-500 release): -- Added the S_ATTR_LIVE_SUPPORT user section attribute to to - be used to mark C++ exception frame sections contents and references not to - be dead stripped if they reference some live block. Radar bug #2284500. -- Added the S_ATTR_NO_DEAD_STRIP user section attribute to to - be used to mark Objective-C sections contents and references not to be dead - stripped. Radar bug #2284500. -- Added N_NO_DEAD_STRIP to to be used to mark symbols not to - be dead stripped. This is the same value as N_DESC_DISCARDED and the comments - for that were also updated. Radar bug #2284500. - -Changes for the 5.16 release (the cctools-499.4 release): -- Added the comment "3=quad" to the r_length field comments in mach-o/reloc.h - for 8 byte relocable sized items. - -Changes for the 5.16 release (the cctools-499.1 release): -- Added the CPU_TYPE_POWERPC64 cputype and the subtype CPU_SUBTYPE_POWERPC64_ALL - to for the interim ppc64 file format. Radar bug #3562133 - and #3562232. - -Changes for the 5.14 release (the cctools-496 release): -- Added the constant MACOSX_DEPLOYMENT_TARGET_10_4 to the header file - . Radar bug #3445632. -- Changed to include and mark the - following API's added in 10.3:: - extern enum DYLD_BOOL NSHasModInitObjectFileImage - extern struct mach_header * _dyld_get_image_header_containing_address - extern enum DYLD_BOOL _dyld_all_twolevel_modules_prebound - with AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER. Radar bug #3401910. - -Changes for the 5.13.2 release (the cctools-495.3 release): -- Added the prototype for unprebind(3) to . - Radar bug #3176679. -- Added prototypes for the new routine breakout_mem() and writeout_to_mem() - to . Radar bug #3176679. -- Added MH_PREBINDABLE, MH_ALLMODSBOUND, and MH_CANONICAL Mach-O header - flags to . MH_PREBINDABLE indicates that the binary is not - prebound but has enough information in it to be prebound by - redo_prebinding(3) or redo_prebinding(1). MH_ALLMODSBOUND exists - only in binaries with MH_PREBINDABLE also set and indicates that - when this binary is reprebound, all the two-level namespace modules - should be bound. MH_CANONICAL identifies a canonical form of a - binary, in other words, one that has been processed by unprebind(3) or - redo_prebinding(1) -u. Radar bug #3176679. - -Changes for the 5.13 release (the cctools-492 release): -- Added the #define NEXT_DEBUG_ADDRESS_TO_ASSIGN to - so that seg_addr_table(1) can layout debug and profile libraries at a lower - address than the rest of the flat region. Radar bug #3360593. - -Changes for the 5.13 release (the cctools-490 release): -- Added the proto type for the new routine cpusubtype_execute() to the header - file for use by the dynamic linker. Radar bug #3387962. - -Changes for the 5.13 release (the cctools-482 release): -- Added the file that contains the new - NSFindSectionAndOffsetInObjectFileImage() SPI. Radar bug #3318440. -- Updated the Makefile to install the new file . - Radar bug #3318440. - -Changes for the 5.12 release (the cctools-477 release): -- Changed to make kld_load_basefile_from_memory() available for - both __DYNAMIC__ and __STATIC__ and added kld_set_link_options() as well as - the constants to use with it. Radar bug #3270588. - -Changes for the 5.12 release (the cctools-468 release): -- Added some comments to to describe the new use of the - previously unused value 3 for r_length to mean that the conditional branch was - predicted using the Y-bit and the sign of the displacement and opcode. - Radar bug #3223045. - -Changes for the 5.12 release (the cctools-467 release): -- Added the PPC_RELOC_LO14_SECTDIFF relocation type to - to match the PPC_RELOC_LO14 relocation type for load and store double - instructions using a section difference expression. Radar bug #3218027. - -Changes for the 5.12 release (the cctools-466 release): -- Added the DYNAMIC_LOOKUP_ORDINAL to and reduced the value of - MAX_LIBRARY_ORDINAL by one. This is to allow dynamic flat namespace lookups - in twolevel namespace images. Radar bug #3210803. - -Changes for the 5.12 release (the cctools-464 release): -- Fixed a spelling error in where "alwasys" should be "always" - Radar bug #3198288. -- Added the prototype for the SPI NSHasModInitObjectFileImage() to - . Radar bug #3196951. -- Made changes to build cleanly with gcc3.3 - - Change the prototype for round() in "stuff/round.h" to used unsigned long - in the two places it use long. - -Changes for the 5.12 release (the cctools-463 release): -- Changed the prototype of NSGetSectionDataInObjectFileImage() from - /* not yet implemented */ - extern void * NSGetSectionDataInObjectFileImage( - NSObjectFileImage objectFileImage, - const char *segmentName, - const char *sectionName); - to the now implemented prototype: - extern void * NSGetSectionDataInObjectFileImage( - NSObjectFileImage objectFileImage, - const char *segmentName, - unsigned long *size); /* can be NULL */ - Radar bug #3194204. -- Added the constant: - #define MH_DYLIB_STUB 0x9 /* shared library stub for static */ - /* linking only, no section contents */ - to . Radar bug #3193744. - -Changes for the 5.12 release (the cctools-462 release): -- Added the constant: - #define NSLINKMODULE_OPTION_TRAILING_PHYS_NAME 0x10 - to and comments to . Radar bug #3190599. - -Changes for the 5.12 release (the cctools-461 release): -- Added the constant: - #define NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES 0x8 - to . Radar bug #3183011. - -Changes for the 5.12 release (the cctools-460 release): -- Removed the /* not yet implemented */ comment off of the following prototypes - in : - NSSymbolDefinitionCountInObjectFileImage - NSSymbolDefinitionNameInObjectFileImage - NSSymbolReferenceCountInObjectFileImage - NSSymbolReferenceNameInObjectFileImage - NSIsSymbolDefinedInObjectFileImage - As there are now implemented. Radar bug #3179011. - -Changes for the 5.12 release (the cctools-457 release): -- Added ofile_map_from_memory() to "stuff/ofile.h". This is needed so the - NSCreateObjectFileImageFromMemory() api can be implemented. Radar bug - #3131622. - -Changes for the 5.12 release (the cctools-456 release): -- Picked up the header file . Radar bug 3145742. - -Changes for the 5.12 release (the cctools-448 release): -- Added the N_OPT constant to which is emitted with - gcc2_compiled and in gcc source. Radar bug #3104328. -- Added the _dyld_get_image_header_containing_address() SPI prototype to - (also added the missing _dyld_image_containing_address() - prototype). Radar bug #2967928. - -Changes for the 5.12 release (the cctools-447 release): -- Added the _dyld_all_twolevel_modules_prebound() SPI prototype to - . Radar bug #3055372. - -Changes for the 5.11 release (the cctools-444 release): -- Added the file which contains the interface for the - symbol lists code taken from strip.c. Now also used by ld(1)'s - -exported_symbols_list and -unexported_symbols_list options. Radar bug - #3083844. - -Changes for the 5.11 release (the cctools-439 release): -- Added the VEO cputype and its subtypes to . Radar bug - #3068161. -- Added the install_name() API to . - Radar bug #3065586. - -Changes for the 5.11 release (the cctools-440 release): -- Fixed the warnings about extra tokens at end of #endif directive in - , , , - , , - , , - , , , - , , , - and (Radar bug #3072042). - -Changes for the 5.11 release (the cctools-438 release): -- Added the constant MACOSX_DEPLOYMENT_TARGET_10_3 to the header file - . Radar bug #3049974. - -Changes for the 5.11 release (the cctools-437 release): -- Added the new N_PARAMS, N_VERSION and N_OLEVEL defines to . - Radar bug #3000792. - -Changes for the 5.10 release (the cctools-422 release): -- Added the section attribute S_ATTR_STRIP_STATIC_SYMS to . - Radar bug #2945659. - -Changes for the 5.10 release (the cctools-421 release): -- Added the constant MH_NOFIXPREBINDING to so that the - fix_prebinding(1) program can be marked with this. Radar bug #2941669. - -Changes for the 5.10 release (the cctools-420 release): -- Changed the comment on the constant NOT_PREBINDABLE in - to include "or statically linked" to indicate - that it will be returned for statically linked binaries. Radar bug #2934831. - -Changes for the 5.10 release (the cctools-416 release): -- Added the N_WEAK_DEF define to to support weak definitions - and non-weak definitions in the same coalesced section. Radar bug #2919646. -- Removed the section attribute S_ATTR_WEAK_DEFS to . - Radar bug #2919646. -- Added the dont_update_LC_ID_DYLIB_timestamp field to the arch struct in - breakout.h . Radar bug #2914003. - -Changes for the 5.10 release (the cctools-414 release): -- Added the section attribute S_ATTR_WEAK_DEFS to for weak - definitions to be used with coalesced sections for supporting explicit - template instantiation. Radar bug #2898558. - -Changes for the 5.10 release (the cctools-412 release): -- Added the no_error_if_missing parameter to symLocForDylib(), dstLocForDylib() - and LocForDylib() in stuff/SymLoc.h . Radar bug #2882324. -- Added the no_error_if_missing parameter to get_symfile_for_dylib() and - get_dstfile_for_dylib() in stuff/dylib_roots.h. Radar bug #2882324. - -Changes for the 5.10 release (the cctools-411 release): -- Added the header file so that both the - ld(1) code and the seg_addr_table(1) code can use them. - -Changes for the 5.10 release (the cctools-408 release): -- Changed the comments in where it used sizeof(unsigned long) - to 4 bytes. - -Changes for the 5.10 release (the cctools-407 release): -- Added "(obsolete)" to the comment in for the MH_LAZY_INIT - constant. - -Changes for the 5.10 release (the cctools-404 release): -- Changed crc32() in to be a __private_extern__. - Radar bug #2859919. - -Changes for the 5.10 release (the cctools-403 release): -- Changed mach-o/ppc/swap.h and mach-o/i386/swap.h to use #include and not - #import. Radar bug #2778821. - -Changes for the 5.10 release (the cctools-400 release): -- Added a new throttle parameter to redo_prebinding() in - to allow it to be used prebinding on demand to - throttle back its I/O when running in the back ground. Radar bug #2850642. -- Added a new throttle parameter to writeout() in to allow - redo_prebinding(3) used with prebinding on demand to throttle back its - I/O when running in the back ground. Radar bug #2850642. - -Changes for the 5.10 release (the cctools-397 release): -- Added the new allow_missing_architectures parameter to the - needs_redo_prebinding() API in . Radar bug - #2836068 -- Added the macro #define REDO_PREBINDING_VERSION 1 to - . Radar bug #2836572. -- Removed the DYLD_BOOL macro from because ANSI C99 has a - macro bool defined as _Bool which causes problems with this. Radar bug - #2831923. -- Added the _NSGetExecutablePath SPI to . Radar bug #2432816. - -Changes for the 5.10 release (the cctools-396 release): -- Added the new allow_missing_architectures parameter to the redo_prebinding() - API in . Radar bug #2809673. -- Changed the N_WEAK_SYM macro in to N_WEAK_REF so that it is - clear it means weak references not weak defintions. - -Changes for the 5.10 release (the cctools-394 release): -- Added guards to , "stuff/bytesex.h", "stuff/arch.h", - "stuff/ofile.h", - to prevent multiple includes. - -Changes for the 5.10 release (the cctools-393 release): -- Added the N_WEAK_SYM macro to . -- Added the LC_LOAD_WEAK_DYLIB macro for the new weak dylib load command to - . - -Changes for the 5.10 release (the cctools-392 release): -- Added the new parameter use_member_syntax to the ofile_process() prototype - in . Radar bug #2730127. - -Changes for the 5.10 release (the cctools-388 release): -- Changed the use of #import to #include in the mach-o directory files and - added guards to each header to prevent multiple includes. Radar bug #2778821. - -Changes for the 5.10 release (the cctools-387 release): -- Added NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME to - -Changes for the 5.10 release (the cctools-386 release): -- Added the get_prebind_cksums() prototype to . -- Added a header for the crc32() prototype. -- Added the parameter zero_out_prebind_checksum to redo_prebinding() in - -- Added the two fields: - struct prebind_cksum_command *cs; - unsigned long calculated_input_prebind_cksum; - to the object struct. And added the calculate_input_prebind_cksum parameter - to breakout() prototype. -- Added the swap_prebind_cksum_command() to and to - . -- Added the prebind check sum load command to . - -Changes for the 5.10 release (the cctools-385 release): -- Added the routines archive_error(), archive_member_error() and - Mach_O_error() to ofile.h as they were moved out of ofile.c to ofile_error.c - so the redo_prebinding library can override them. -- Changed for the following API changes for - Radar bug #2575205 and #2729976: - - Added the routine object_file_type(). - - Added the only_if_needed boolean parameter to the redo_prebinding(3) library. - - Changed the return type of the redo_prebinding(3) library API to be an enum. - - Removed the comment about the slide_to_address parameter of the - redo_prebinding(3) library API not being supported. - - Added the expected_address parameter to the needs_redo_prebinding(3) library - API. - -Changes for the 5.9 release (the cctools-384 release): -- Removed the semicolon after the closing curly brace in the trailing endif - __cplusplus wrapper in . Radar bug #2748160. - -Changes for the 5.9 release (the cctools-381 release): -- Added the LC_REQ_DYLD constant to as a bit in the load - command that must be understood by the dynamic linker for the image to - execute properly. - -Changes for the 5.9 release (the cctools-378 release): -- Added the extern "C" stuff in #if __cplusplus wrappers for . - Radar bug #2728016. - -Changes for the 5.9 release (the cctools-370 release): -- Added the MH_NOMULTIDEFS flag to . -- Added the hints_cmd and output_hints fields to the object structure in - . - -Changes for the 5.9 release (the cctools-369 release): -- Picked up the changes to so that it has the extern "C" stuff - in #if __cplusplus wrappers. -- Added kld_load_from_memory & kld_load_basefile_from_memory for the dynamic - build variant of libkld. These APIs will be used by the Kernel's dynamic - OSObject patch code. This change is in . - -Changes for the 5.9 release (the cctools-367 release): -- Added swap_sub_library_command to . Added - swap_sub_library_command() to . Added the LC_SUB_LIBRARY - load command and the sub_library_command struct to . - Radar bug #2697458. -- Added swap_twolevel_hint(), swap_twolevel_hints_command() and the missing - swap_routines_command() to . Added - swap_twolevel_hints_command() and swap_twolevel_hint() to . - Added the LC_TWOLEVEL_HINTS load command and the twolevel_hint struct to - . Radar bug #2558069. - -Changes for the 5.9 release (the cctools-365 release): -- Added NSAddImage(), NSLookupSymbolInImage() and NSIsSymbolNameDefinedInImage() - and their options to . Also NSOtherErrorInvalidArgs in the - NSOtherErrorNumbers enum in was added. Radar bug #2689833. - -Changes for the 5.9 release (the cctools-360 release): -- Added the sections field to stuff/breakout.h for support of NO_TOC section - attribute. See notes in libstuff about writeout(). -- Added the header file for the redo_prebinding(3) - API. Radar bug #2604014. -- Changed guess_short_name() to be __private_extern__ in - . - -Changes for the 5.9 release (the cctools-359 release): -- Changed the comments about SELF_LIBRARY_ORDINAL in to - correctly reflect its usage. -- Removed the comment /* not yet implemented */ before - NSDestroyObjectFileImage() in as this was fixed as part of - Radar bug #2500014. - -Changes for the 5.8 release (the cctools-357 release): -- Added CPU_SUBTYPE_POWERPC_7450 to Radar bug #2599869. - -Changes for the 5.8 release (the cctools-354 release): -- Fixed a type in in describing MH_PRELOAD. Radar bug - #2571359. - -Changes for the 5.8 release (the cctools-353 release): -- Moved the header files to /usr/include and /usr/local/include when RC_OS is - macos and RC_RELEASE is not Beaker, Bunsen, Gonzo or Kodiak. Radar bug - #2569880. - -Changes for the 5.8 release (the cctools-350 release): -- Added the prototypes for NSIsSymbolNameDefinedWithHint(), - NSLookupAndBindSymbolWithHint() and _dyld_lookup_and_bind_with_hint() to - . Radar bug #2567184. - -Changes for the 5.8 release (the cctools-349 release): -- Added the file . Radar bug #2559324. - -Changes for the 5.8 release (the cctools-347 release): -- Added _dyld_register_func_for_remove_image() to . -- Added NSAddLibraryWithSearching() to . Radar bug #2535633. - -Changes for the 5.8 release (the cctools-343 release): -- Changed REFERENCED_DYNAMICALLY back to 0x0010 as it was inadverntly changed - to 0x0080 which breaks strip(1) and binary compatiblity. - -Changes for the 5.8 release (the cctools-342 release): -- Added the sub_client_command load command to and swap - routine to . Radar bug 2533649. -- Added MH_TWOLEVEL and MH_FORCE_FLAT to for two-level name - space support. Radar bug #2534043. -- Added comments and macros to for two-level name space - support. Radar bug #2534043. - -Changes for the 5.8 release (the cctools-341 release): -- Added the sub_umbrella_command load command to . Radar bug - #2530028. -- Added the header file and changed the Makefile to install it. -- Changed so that sa_rld_output_addr and sa_rld_output_size - are private_externs and noted in the comment they are not part of the extenal - API. Radar bug #2523649. - -Changes for the 5.7 release (the cctools-336 release): -- Added the section attribute S_ATTR_NO_TOC section contains coalesced symbols - that are not to be in a ranlib table of contents. Radar bug #2494286. - -Changes for the 5.7 release (the cctools-334 release): -- Changed guess_short_name()'s has_suffix argument to return_suffix to a pointer - to the suffix so checksyms could check for "_debug". -- Added NSOtherErrorLazyInit to the NSOtherErrorNumbers enum typedef for the - few errors that can happen setting up the exception handler for lazy inits. - Radar bug #2490396. -- Added MH_LAZY_INIT to for "Lazy initialization of specified - libraries in a prebound launch". Radar bug #2490396. - -Changes for the 5.7 release (the cctools-332 release): -- Changed the following routines to take a disablewarnings flag which was added - to seg_addr_table(1): get_symfile_for_dylib() and get_dstfile_for_dylib() in - the header file "stuff/dylib_roots.h" and dstLocForDylib(), - get_dstfile_for_dylib() and LocForDylib() in the header file "stuff/SymLoc.h" - (Radar bug #2482327). - -Changes for the 5.7 release (the cctools-329 release): -- Change the parameters to the unimplemented NSReplaceModule() api to change - the last two parameters to just one parameter named options to match what - is done in NSLinkModule() and NSUnLinkModule(). Radar bug #2469558. -- Changed the fields names iinit and ninit in struct dylib_module in - to iinit_iterm and ninit_nterm reflect that they now contain - the indexes and counts into the init and term sections. Radar bug #2469527. -- Added the prototype for the new function _dyld_debug_task_from_core() to - . Radar bug #2155790. -- Added the prototype for the new function NSCreateCoreFileImageFromFile() - to . Also added a new enum for other link edit errors and made - some other minor changes. Radar bug #2155790. - -Changes for the 5.7 release (the cctools-327 release): -- Left where the headers get installed in the System Framework. So they will - continue to be installed in /System/Library/Frameworks/System.framework/... - And maybe sometime post-DP4 they will be in - /MacOSX/System/Frameworks/System.framework/... - -Changes for the 5.6 release (the cctools-323 release): -- Changed back where the headers get installed in the System Framework - back to /System/Library/Frameworks/System.framework/... from - /MacOSX/System/Frameworks/System.framework/.... for the Space release. This - won't change till post-DP4. - -Changes for the 5.6 release (the cctools-320 release): -- Changed the Makefile to install "stuff/bool.h" into the local include mach-o - directory as an egregious hack for sampler. See the dyld notes. - (Radar bug #2376135). -- Added the new LC_SUB_FRAMEWORK load command to support "Guarding against - direct linking of non-umbrella frameworks". Various public and private - header files were updated to supply this support, , - (also the missing prototypes for other functions were added), - "stuff/bytesex.h", "stuff/seg_addr_table.h" (the routine guess_short_name() - was broken out and the new header "guess_short_name.h" was added). - Radar bug #2443212. - -Changes for the 5.5 release (the cctools-314 release): -- Added the definition of the struct dyld_debug_error_data and - the API _dyld_debug_set_error_func() to register a function to be called - when one of the dyld debug API's fails to Radar bug - #2421770. -- Added DYLD_IMAGE_REMOVED to the dyld_event_type enum for removal of plugins - in Radar bug #2421760. - -Changes for the 5.5 release (the cctools-308 release): -- Added the following code to dyld.h: - #ifndef __cplusplus - #define DYLD_BOOL bool - #endif - and changed all occurences of "bool" to "DYLD_BOOL". Radar bug #2412898. - -Changes for the 5.5 release (the cctools-307 release): -- Added N_BINCL, N_EINCL and N_EXCL to mach-o/stabs.h for begin/end/exclude - include files. Radar bug #2410704. -- Added N_BNSYM and N_ENSYM to mach-o/stabs.h for begin/end section symbols - for used with coalesced symbols. Radar bug #2411273. -- Added CPU_SUBTYPE_POWERPC_7400 to cctools copy of mach/machine.h. The - Beaker2O6 has this as CPU_SUBTYPE_POWERPC_Max (both have the value 10). - Radar bug #2397523. - -Changes for the 5.4 release (the cctools-300 release): -- Changed the Makefile so headers are not in installed for make install for - RC_OS=macos. Radar Bug #2370826. -- Added the new load command LC_ROUTINES for library initialization routines. -- Added the new section type S_COALESCED for coalesced symbols. - -Changes for the 5.3 release (the cctools-286 release): -- Added the new section type S_MOD_TERM_FUNC_POINTERS for termination function - pointers. - -Changes for the 5.3 release (the cctools-285 release): -- Changed the #ifdef NeXT in to #ifdef NeXT_MOD and to define - NeXT_MOD if not defined. -- Updated again mach/ppc/thread_status.h to the Beaker1E1 MacOS X version. - Also changed the macros - MACHINE_THREAD_STATE - MACHINE_THREAD_STATE_COUNT - THREAD_MACHINE_STATE_MAX - to: - PPC_MACHINE_THREAD_STATE - PPC_MACHINE_THREAD_STATE_COUNT - PPC_THREAD_MACHINE_STATE_MAX - So that mach/{ppc,i386,etc}/thread_status.h can all be included in the same - file without warnings about redefined macros. -- Changed #import in ranlib.h to #include - Radar Bug #2303937. - -Changes for the MacOS X bring up (the cctools-282 release): -- Added the file stuff/openstep_mach.h which has defines to allow cctools - to be built on openstep now that the code has been changed to use Mach 3.0 - names. -- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. -- Chanded standalone/libsa.h to used mach_port_t for port_t, vm_task_t and - host_t. -- Changed all the port_t and task_t to mach_port_t in mach-o/dyld_debug.h . - Also added a hack to typedef msg_header_t and msg_type_t to int for bring up. -- Changed vm_task_t to mach_port_t in vm_flush_cache.c to build for MacOS X. -- Updated mach/ppc/thread_status.h to the MacOS X version. The files in the - architecture/ppc are no longer needed and the Makefile was changed. -- Copied in mach/i386/thread_status.h from Rhapsody Atlas1G1 for porting to - MacOS X since this header file is not yet part of the header set. - -Changes for the 5.2 release (the cctools-278 release): -- Changed where gets installed. It is now a private header as - it uses which is a private header. -- Chanded to not include - -Changes for the 5.2 release (the cctools-274 release): -- Removed the i586SX cpusubtype and added the new intel x86 subtypes and macros - for families and models. Radar bug #2231830. - -Changes for the 5.2 release (the cctools-267 release): -- Added . Radar bug #2227839. -- Added: - #if defined(__MWERKS__) && !defined(__private_extern__) - #define __private_extern__ __declspec(private_extern) - #endif - to many headers to allow compiling with MetroWerks compiler. Radar bug - #2227678. -- Changed architecture/m88k/fp_regs.h line: - #ifdef __GNUC__ - unsigned x[4] __attribute__(( aligned(16) )); - #else - unsigned x[4]; - #endif - to deal with MetroWerks compiler. Radar bug #2227678. -- Removed the #ifded 0 around swap_dysymtab_command() in . - Radar bug #2227474. - -Changes for the 5.1 release (the cctools-260 release): -- Added -c to all the install commands in the Makefile. - -Changes for the 5.1 release (the cctools-253 release): -- Changed where the headers get installed to match the new directory layout for - Preimer. - -Changes for the 5.1 release (the cctools-248 release): -- Changed over to base gmon.h on the 4.4bsd file. For Rhapsody this file is - installed by another project. There is a local copy if the file - here until the modified file makes it into the release. The 4.2 - file is no longer installed for RC_OS teflon. - -Changes for the 5.1 release (the cctools-247 release): -- Added MKDIRS if code to the Makefile to build native on Rhapsody. -- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody - where tar does not. -- Moved m68k and sparc mach-o headers to local headers for install. -- Removed the comment allowing the moduleName parameter of NSLinkModule() in - dyld.h to be NULL (Radar 1670835). - -Changes for the 5.0 release (the cctools-240 release): -- Changed it so gnu/a.out.h and gnu/exec.h are not installed with installGNUsrc - and installMWsrc because they are encumbered. - -Changes for the 5.0 release (the cctools-235 release): -- Added PPC_RELOC_JBSR to ppc/reloc.h . -- Picked up the comments from the OpenBSD headers and replaced the comments in - nlist.h, reloc.h, gmon.h and stab.h. - -Changes for the 5.0 release (the cctools-234 release): -- Ifdef'ed the inline functions using asm()'s in architecture because of the - Teflon use of -fkeep-inlines causing things not to compile. - -Changes for the 5.0 release (the cctools-224 release): -- Added mach-o/ranlib.h from bsd/ranlib.h changing off_t to unsigned long. - This was needed for Teflon as off_t is a long long (64 bits). -- Added a mach-o/sparc/swap.h, mach-o/ppc/swap.h, mach-o/i860/swap.h and a - mach-o/m88k/swap.h . -- Picked up the PowerPC subtypes from unix-42/mach/machine.h . -- Changed the Makefile to install mach-o/ppc/reloc.h in NextDeveloper/Headers. - -Changes for the 5.0 release (the cctools-221 release): -- Picked up correct Rhapsody mach/ppc/thread_status.h and updated - stuff/bytesex.h. - -Changes for the 4.0 release (the cctools-133 release): -- Picked up sparc changes to architecture/sparc/reg.h. -- Picked up sparc changes to mach/sparc/thread_status.h. -- Picked up sparc changes to stuff/bytesex.h for prototype of - swap_sparc_thread_state_fpu(). -- Picked up sparc changes to mach-o/sparc/reloc.h. - -Changes for the 4.0 release (the cctools-132 release): -- Removed the 2.0 compatiblity header files. -- Picked up the files mach/sparc/thread_status.h and architecture/sparc/reg.h - -Changes for the 3.3 release (the cctools-125 release): -- Picked up installing 2.0Compatiblity/sys/loader.h -- Added installing nlist.h stab.h loader.h fat.h (bug #31334). - -Changes for the 3.3 release (the cctools-120 release): -- Added the file - -Changes for the 3.3 release (the cctools-119 release): -- Picked up the first changes for sparc (sparc/reloc.h) the work is not - complete. - -Changes for the 3.3 release (the cctools-104 release): -- Changed the name of the first parameter of swap_ident_command() from id to - id_cmd (in bytesex.h). The compiler is treating this as a reserved word. - -Changes for the 3.3 release (the cctools-102 release): -- Integrated in the hppa support. -different include/Makefile (integrated for cctools-102) - Using cctoolshppa-37. mach-o/hppa/reloc.h is new. -different include/gnu/a.out.h (integrated for cctools-102) - Using cctoolshppa-37. Added: - #ifdef HPPA - #include "mach-o/hppa/reloc.h" - #endif -different include/mach/machine.h (integrated for cctools-102) - Using cctoolshppa-37. New constants for hppa and badly integrated the - existing contants: - #define CPU_TYPE_ANY ((cpu_type_t) -1) - #define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1) - #define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) - #define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) - which were scattered though out the file and moved from their comment. - Email sent to Josh on this one (who forwarded it to Mac). -different include/stuff/bytesex.h (integrated for cctools-102) - Using cctoolshppa-37. New routines for swaping hppa's threads. -Only in cctoolshppa-37/include/mach: hppa (integrated for cctools-102) - Pick up include/mach/hppa/thread_status.h from cctoolshppa-37. -Only in cctoolshppa-37/include/mach-o: hppa (integrated for cctools-102) - Pick up include/mach-o/hppa/reloc.h from cctoolshppa-37. But has - HPPA_RELOC_NORELOC which is used in hppa.c. HPPA_RELOC_NORELOC pulled - from reloc.h and NO_RELOC defined as 0x10 (out side the range of r_type:4) - in hppa.h and NO_RELOC used in hppa.c. - -Changes for the 3.1 release (the cctools-22 release): -- Added to mach/machine.h the following cpp macros (bug #32553): - #define CPU_TYPE_ANY ((cpu_type_t) -1) - #define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) - #define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) - -Changes for the 3.1 release (the cctools-15 release): -- Picked up the proper mach/m98k/thread_status.h and the six included files - to make it compile. - -Changes for the 3.1 release (the cctools-13 release): -- Added the m98k (PowerPC) architecture. This includes a kludged - mach/m98k/thread_status.h with only an entry point. - -Changes for the 3.1 release (the cctools-6 release): -- Changed mach/i386/thread_status.h so the m68k compiler will compile this the - same as the i386 compiler. The change was to change the "unsigned int :0" to - "unsigned short pad_??". - -Changes for the 3.1 release (the cctools-5 release): -- Picked up the lono teams cctools-4_2 mach/i386/thread_status.h as well as - machdep/i386/frame.h machdep/i386/fpregs.h machdep/i386/sel.h . -- Changed "struct i386_thread_state *cpu," to "i386_thread_state_t *cpu," - in bytesex.h for the lono team. - -Changes for the 3.1 release (the cctools-4 release): -- Moved the ix86 directory to i386. - -Changes for the 3.0 release (the -56 compiler release): -- Fixed some typos in mach-o/reloc.h in the __LITTLE_ENDIAN__ code (bug #19639). - -Changes for the 3.0 release (the -53 compiler release): -- Removed the local copy of mach/m88k/thread_status.h . - -Changes for the 3.0 release (the -47 compiler release): -- Split of the reloc.h header file: - part of mach-o/reloc.h -> mach-o/m88k/reloc.h - part of mach-o/reloc.h -> mach-o/i860/reloc.h -- Switch over to the newer header file organization. - m88k/mach/thread_status.h -> mach/m88k/thread_status.h - ix86/mach/thread_status.h -> mach/ix86/thread_status.h - i860/mach/thread_status.h -> mach/i860/thread_status.h - m88k/disasm.h -> mach-o/m88k/disasm.h - m88k/parseinst.h -> mach-o/m88k/parseinst.h - -Changes for the 3.0 release (the -44 compiler release): -- Switch over to the new header file organization. - -Changes for the 3.0 release (the -36 compiler release): -- Added the 88k disassembler header file but these are not installed. - -Changes for the 3.0 release (the -34 compiler release): -- Added installsrc, installIBMsrc and installGNUsrc targets to the Makefile. - -Changes for the 3.0 release (the -33 compiler release): -- sys/machine.h: (this is owned by the OS group and will be given back to them) - * 16-Oct-90 Compiler group (comp) at NeXT. - * Replaced the 88k cpu_subtype CPU_SUBTYPE_MMAX_JPC with - * CPU_SUBTYPE_MC88100 and CPU_SUBTYPE_MC88110 to match 68k types. - - /* - * MC88000 subtypes - */ - #define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1) - #define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2) - - - The I860 CPU type in the NDTools 7 conflicts with the CPU_TYPE_I386 which is - also 7. In talking with Mike Paquette (10/16/90) he said it is ok to change - CPU_TYPE_I860 to whatever and he will recompile NextDimention. - The three I860 additions were as follows: - - * 16-Aug-89 Mike Paquette (mpaque) at NeXT - * Added I860 CPU type and subtypes for big or little-endian data - * implementation. - - #define CPU_TYPE_I860 ((cpu_type_t) 7) <<>> - - /* - * I860 subtypes - */ - #define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) - #define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) - -- machine/thread_status.h: where "machine" is a symbolic link to "next" - (this is owned by the OS group and will be given back to them) - In talking to Mike DeMoney on (10/16/90) he came up with the following - structure to handle the multiple machines specific files. These would - be the directories in /usr/include (or in the kernel's header file area): - - next68k/ was just next/ - next88k/ - next860/ - - A symbolic link from "next to "next" will be added for compatiblity and - the symbolic "machine" will point to the directory the kernel is configured - for. - -- next860/thread_status.h: - This is to be owned by someone like Mike Paquette. It is the file that - discrbes JUST the i860 thread state. - -- next88k/thread_status.h: - This is to be owned by the OS group. The compiler group made a first - cut at it. - -Changes for the Warp ?? release (the -25 compiler release): -- Added the scattered_relocation_info struct to reloc.h - -Changes for the Warp ?? release (the -24 compiler release): -- Added #import to ldsyms.h (bug 6031). -- Added rld.h to be installed in /usr/include. - -Changes for the 2.0 impulse X.X release (the -19 compiler release): -- Updated ldsyms.h to match the new link editor. Basicly removing lots of old - stuff. -- Added one missing ';' in symseg.h to get rid of a warning. -- Removed the temporay copies of and now that the - Impulse 0.02 release has the right versions. -- Added temporary copies of and until the next libc - and mk projects get released and the correct versions are in /usr/include. - -Changes for the 0.93 release (the -12 compiler release): -- No longer install symseg.h -- Now own sys/exec.h as a part of a.out.h - -Changes for the 0.82 release (the -8 compiler release): -- Changed the Makefile to install in /usr/include - -Changes for the 0.82 release (the -7 compiler release): -- Added header_addr to fvmlib load and id commands. -- Added the SEG_PAGEZERO segment name to sys/loader.h for the segment created - to protect page zero for NULL pointers. - -Changes for the 0.81 release (the -6 compiler release): -- The following files to reflect what is contained in a true mach-O object - file (relocatables and other formats): - nlist.h - reloc.h (new) - symseg.h - stab.h - These along with are now the offical files that mach-O object - tools should reference. The file has been updated with the same - changes but will go away in the 1.0 release or renamed to . - - The logical changes are as follows: - - To the nlist structure (also see comments in and ): - - The modifications from the original format were changing n_other (an unused - field) to n_sect and the addition of the N_SECT type. All mach-O symbols - defined a section (for example what use to be N_TEXT, N_DATA and N_BSS) now - have the type N_SECT. - - If the type is N_SECT then the n_sect field contains an ordinal of the - section the symbol is defined in. The sections are numbered from 1 and - refer to sections in order they appear in the load commands for the file - they are in. This means the same ordinal may very well refer to different - sections in different files. - - The n_value field for all symbol table entries (including N_STAB's) gets - updated by the link editor based on the value of it's n_sect field and where - the section n_sect references gets relocated. If the value of the n_sect - field is NO_SECT then it's n_value field is not changed by the link editor. - The comments in have been updated to reflect this. - - Common symbols are represented by undefined (N_UNDF) external (N_EXT) types - who's values (n_value) are non-zero. In which case the value of the n_value - field is the size (in bytes) of the common symbol. - - Absolute, undefined and common symbols are NOT in any section and thus their - n_sect field must be NO_SECT to indicate this and avoid having their n_value - field changed. - - To the relocation_info structure (see the comments in ): - - The modifications from the original format were changing the value - of the r_symbolnum field for "local" (r_extern == 0) relocation entries. - - In 4.3bsd a.out objects if r_extern is zero then r_symbolnum is an ordinal - for the segment the symbol being relocated is in. These ordinals are the - symbol types N_TEXT, N_DATA, N_BSS or N_ABS. In mach-O object files these - ordinals refer to the sections in the object file they are in. The first - section has the ordinal 1, the second 2, and so on. This means that the - same ordinal in two different object files could refer to two different - sections. And further could have still different ordinals when combined - by the link-editor. The value R_ABS is used for relocation entries for - absolute symbols which need no further relocation. - - To the symseg structures (see the comments in ): - - To handle an arbitrary number of segments and sections the symbol_root, - the indirect_root and the shlib_root have new structures in a mach-O - object file. The change to these structures was to replace the fields - relating to where a segment was loaded with a load map. - - The load map describes where the parts the relocatable object have been - loaded in the executable. The enitre address space of the relocatable - is to be covered by all the map entries. There may be multiple map entries - for a single section or one map entry for multiple sections. This allows - the link editor to scatter load a section based on information that improves - performance by increasing the locality of reference. - -- The N_INDR symbol type was added for indirect symbols (to support building - the ANSI C library). - - If the type is N_INDR then the symbol is defined to be the same as another - symbol. In this case the n_value field is an index into the string table - of the other symbol's name. When the other symbol is defined then they both - take on the defined type and value. - -- Changed the loader defined symbol names _etext, _edata, and _end to __etext, - __edata, __end so not to pollute the name space of ANSI C programs. There - are now macros for these symbols. The ANSI C library will have objects with - indirect symbols so that old names will still work if the program is linked - with the ANSI C library. +Changes for the 5.26 release (the cctools-750 release): +- Added lto_get_nlist_64() to stuff/lto.h for use by nm(1) print information + from llvm bit code files. Radar bug #6067110. + +Changes for the 5.25 release (the cctools-737 release): +- Added the new ARM_THUMB_32BIT_BRANCH relocation type to . + Radar bug #6511482. + +Changes for the 5.25 release (the cctools-725 release): +- Added support for new compressed LINKEDIT information. Radar bug #6232822. + - Added dyld_info_command and constants to mach-o/loader.h . + - Added the dyld_info, output_dyld_info and output_dyld_info_size fields to + the object struct in stuff/breakout.h . + - Added the swap_dyld_info_command() prototype to stuff/bytesex.h . + +Changes for the 5.25 release (the cctools-724 release): +- Added the MH_KEXT_BUNDLE and MH_DEAD_STRIPPABLE_DYLIB constants to + . Radar bug #6272534. + +Changes for the 5.25 release (the cctools-718 release): +- Added the header file "coff/debug_directory.h" and added that to the Makefile. + Added swap_debug_directory_entry() and swap_mtoc_debug_info() to + "coff/bytesex.h". Radar bug #6211642. + +Changes for the 5.25 release (the cctools-708 release): +- Picked up the changes to the comments in for + Radar bug #5949622. + +Changes for the 5.25 release (the cctools-705 release): +- Changed the struct ofile in so that the lto* fields are not diff --git a/cctools/ld/notes b/cctools/ld/notes dissimilarity index 98% index bc78f5e..7e51931 100644 --- a/cctools/ld/notes +++ b/cctools/ld/notes @@ -1,5038 +1,105 @@ -TODO: -- Should add a -no_fix_prebinding flag to ld(1) so fix_prebinding can be - built with it. -- MH_BUNDLEs should have a two-level namespace hint table by default or at - least with MACOSX_DEPLOYMENT_TARGET 10.2 (the -twolevel_namespace_hints flag). - Note this is only a problem with 10.0 which is NOT a deployment target. -- Test coalesced symbols with -static code gen and with rld()? -- Might be a bug in search_dynamic_libs() if it is searching an archive then - it does not take into account -all_load or -Objc. -- The sreloc->r_address field is only 24-bits (16 meg) and can overflow - producing bad relocation entries in the output file. To test for this a - handful of checks would need to be added to the *_reloc.c file after - update_reloc and other files that put out relocation entries. -- The LC_PREBOUND_DYLIB commands do not have the modules used via N_INDR - symbols marked in the linked_modules bit vector. -- Add check for undefined dyld_stub_binding_helper and __dyld_func_lookup if - output_for_dyld is set. -- Think about how indirect section would be ordered if allowed. - -Build problems: -- For i386 builds with -dynamic -fomit-frame-pointer produces bad code (bug - #52986) -- For m68k builds -finline-functions crashes the compiler (used in the Makefile - on the ld_build target). - -Changes for the 5.26 release (the cctools-738 release): -- Removed the code and files for the old ProjectBuilder interface including the - use of mig(1) in the Makefile. The files make.defs make_defs.h were removed - and the code in ld.c, pass1.c and symbols.c had the code with these old - interfaces removed. Radar bug #6457206. -- Added support for the arm ARM_THUMB_32BIT_BRANCH relocation entry. Radar bug - #6511482. - -Changes for the 5.26 release (the cctools-721 release): -- Changed the Makefile and removed -force_cpusubtype_ALL from KERN. Radar bug - #6233829. - -Changes for the 5.26 release (the cctools-711 release): -- Changed the Makefile so -D__DARWIN_UNIX03=__arm__ is always added to KERN - Radar bug #6098280. - -Changes for the 5.26 release (the cctools-705 release): -- Code changes for other code to work on 64-bit hosts: Radar bug #6022298. - - Changed the types of the local variables hi21, lo14, w, w1, and w2 in - hppa_reloc in hppa_reloc.c from unsigned long to uint32_t . - - Added a cast to (int *) for the assignment of output_thread_info - entry_point and stack_pointer for the arm thread state. - - Changed the types of dylib_current_version, dylib_compatibility_version, - nremove_symbols and nsave_symbols from unsigned long to uint32_t in ld.[ch]. - Changed the use of %lu to %u for these in ld.c . - -Changes for the 5.26 release (the cctools-699 release): -- Changed uuid.c to directly call uuid_generate_random() without the dynamic - lookup. Radar bug #5620031. - -Changes for the 5.25 release (the cctools-695 release): -- Changed the Makefile to use -iwithsysroot as part of the KERN flags. - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in Makefile, notes, objects.c, - objects.h, sections.c, symbols.c, layout.c, ld.c and arm_reloc . - -Changes for the 5.25 release (the cctools-679.3 release): -- Changed the Makefile to test OLD_LIBKLD pass down from the upper Makefile - so to not build libkld when OLD_LIBKLD is NO. Radar bug #5698612. - -Changes for the 5.25 release (the cctools-677 release): -- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . - Radar bug #5563553. - -Changes for the 5.25 release (the cctools-676 release): -- Changed check_cur_obj() in pass1.c to know about S_DTRACE_DOF section types - enough to not cause an error about unknown section type. - -Changes for the 5.25 release (the cctools-673 release): -- Changed the sources so the arm stuff is not in the open source version. - Radar bug #5326431. - - Changed the Makefile to #ifndef __OPEN_SOURCE__ out the arm files - - Added #ifndef __OPEN_SOURCE__ to the following files to bracket arm code: - layout.c, ld.c, objects.c, objects.h, sections.c, symbols.c and arm_reloc.c. - -Changes for the 5.24 release (the cctools-663 release): -- Changed the code in ld.[ch], pass1.c, symbols.c, layout.c and pass2.c for - the new get_macosx_deployment_target() interface. Radar bug #5132019. - -Changes for the 5.24 release (the cctools-662 release): -- Changed kld so it will propagate the LC_UUID from the last object file being - linked into the output. Radar bug #5137807. - - Changed check_cur_obj() in pass1.c for #ifdef KLD to always clear the - output_uuid_info to zeros and then if the object file being checked has an - LC_UUID command copy that into the output_uuid_info. - - Changed layout() in layout.c for #ifndef KLD so it does not clear the - output_uuid_info and create the uuid load command if the - output_uuid_info.uuid_command.cmdsize is non-zero. - -Changes for the 5.24 release (the cctools-653 release): -- Backed out the change for Radar bug #4930693 in internal_kld_load() in kld.c - to #ifdef KLD so that RLD_DEBUG_OUTPUT_FILENAME_flag is always set to 1. This - was causing problems the way the prelinked kernel is generated. Radar bug - #4930693. -- Updated dylibs.c and pass1.c to handle the LC_REEXPORT_DYLIB load command. - Radar bug #4986624. - -Changes for the 5.24 release (the cctools-651 release): -- Changed pass1() in pass1.c to swap the load command part of load commands - it doen't look at so when the other code in merge_dylib() in dylibs.c steps - over them it does not crash. Radar bug #4953247. - -Changes for the 5.24 release (the cctools-650 release): -- Changed internal_kld_load() in kld.c to #ifdef KLD so that - RLD_DEBUG_OUTPUT_FILENAME_flag is always set to 1. Radar bug #4930693. - -Changes for the 5.24 release (the cctools-649 release): -- Added some checks in generic_reloc.c to cause an error if the r_address field - were to be truncated. Radar bug #4921122. -- Fixed an internal error when using -s and a private external symbol is marked - with REFERENCED_DYNAMICALLY. The change was in output_merged_symbols() in - symbols.c to not save a private external that has REFERENCED_DYNAMICALLY set - so this matches what assign_output_symbol_indexes() did for the -s case and - does not get the internal error when trying to find the string for this - symbol. Radar bug #4885434. - -Changes for the 5.24 release (the cctools-639 release): -- Added support for -install_name, -compatibility_version, -current_version - and -noall_load. Radar bug #4758790 - -Changes for the 5.24 release (the cctools-636 release): -- Fixed the check added below for warning about shared libraries with no table - of contents entries to not issue that warning when the shared library does not - defined any external symbols (which is the case for umbrella's). Radar bug - #4733384. - -Changes for the 5.24 release (the cctools-634 release): -- Changed check_cur_obj() in pass1.c to add a case statement for - LC_SEGMENT_SPLIT_INFO and simply ignore it as it is not looked at for linking. - Also added a warning for shared libraries with no table of contents entries - saying can't resolve symbols from it. Radar bug #4695477. - -Changes for the 5.24 release (the cctools-633 release): -- Changed indirect_sections.c and pass1.c to deal with the change of type for - indirect symbols to uint32_t * when ported to 64-bit. Radar bug #4407440. - -Changes for the 5.24 release (the cctools-631 release): -- Fixed a bug with the symbol align_to_input_mod() not being defined for RLD - builds. The fix was to add #ifdef RLD around it in sections.c. Radar bug - #4685060 - -Changes for the 5.24 release (the cctools-629 release): -- Fixed a bug that did not get the internal alignment correct for fine reloc - blocks in coalesced sections. coalesced_section_merge() in - coalesced_sections.c needed to use the align_to_input_mod() routine that was - in sections.c instead of calling round() in two places. Radar bug #4599790. - -Changes for the 5.24 release (the cctools-626 release): -- Changed check_cur_obj() in pass1.c to add a case statement for - LC_CODE_SIGNATURE and simply ignore it as it is not looked at for linking. - Radar bug #4588023. - -Changes for the 5.24 release (the cctools-623 release): -- Changed the Makefile it installs in /usr/bin/ld_classic . Radar bug #4606627. - -Changes for the 5.23 release (the cctools-619 release): -- Fixed a bug that caused the "internal error: output_local_symbols()' - inconsistent local symbol count" when discarding a weak symbol from an object - file for a symbol in a shared library. The fix was to remove the call to - maybe_remove_dwarf_symbol() in merge_dylib_module_symbols() in symbols.c - and let this call happen when it get to the label - use_symbol_definition_from_this_dylib. The same change was also done in - merge_bundle_loader_symbols() in symbols.c . Radar bug #4570143. -- Fixed a bug in the parsing of the -allow_stack_execute flag. In main() in - ld.c in the second loop over the argv[] to pick up the object files was - missing a test for "allow_stack_execute" and it was incorrectly thinking it - had an argument. Radar bug #4571206. - -Changes for the 5.23 release (the cctools-617 release): -- Changed pass1_archive() in pass1.c to no longer check the timestamp of the - archive against the table of contents archive member. Radar bug #4462449. - -Changes for the 5.23 release (the cctools-613 release): -- Changed layout.c to add macros that rename structure members of the - ppc and i386 thread states for Unix conformance. Radar bug #4508798. - -Changes for the 5.22 release picked up from cctools-590.42 (the cctools-610 -release): -- Fixed another bug in the handling of the -Y undefined symbol tracing. This - is more fall out of Radar bug #3737622. Where the code was changed when - linking two-level, to not search libraries that can't be encode as ordinals. - The code just inside the outer loop needed to have one of its checks changed - so that it ignores any object with cur_obj->dylib set to TRUE no matter if the - if is for a module linked from a dylib or not (cur_obj->dylib_module != NULL). - Radar bug #4521358. - -Changes for the 5.22 release (the cctools-590.40.1 release): -- Ignore multiple -syslibroot flags if they specify the same argument. Radar - bug #4354876. - -Changes for the 5.22 release (the cctools-590.31.1 release): -- Changed to invoke ld64 without any extra arguments when given a 64-bit - object file. - -Changes for the 5.21 release (the cctools-590.41 release): -- Fixed problems with the handling of the ___dso_handle linker defined symbol - when it appears in an object used with -bundle_loader. It needs to not cause - an error when it only appears in the -bundle_loader file and still only be - defined in the output file when it is referenced by the linked objects. To - handle the case when it appears in the -bundle_loader file but is not - referenced by the objects, a test was added for this special case in - setup_link_editor_symbol() in symbols.c to treat it like the symbol was not - present. Then to handle the case when the symbol is referenced an additional - condition was added to the error check in define_link_editor_symbol() in - symbols.c to not cause the error if the symbol was defined in the - -bundle_loader file and also move the return from the function for that case - to only happen when the error happens. Radar bug #4482300. - -Changes for the 5.21 release (the cctools-590.39 release): -- Removed the -I flag for private headers as it would no longer compile with it. -- Fixed a bug in the handling of the -Y undefined symbol tracing. This appears - to be more fall out of Radar bug #3737622. Where the code was changed when - linking two-level, to not search libraries that can't be encode as ordinals. - The fix done is safe, in that merged_symbols with twolevel_reference field set - to TRUE are not ever to be traced with the -Y option. So an extra test was - added to the loop for -Y symbol tracing in process_undefineds() in symbols.c . - Radar bug #4495010. - -Changes for the 5.21 release (the cctools-590.38 release): -- Don't warn about an empty debug_info section. The change was in - read_dwarf_info() in pass1.c to add the extra condtional - "debug_info->size == 0" to the if statement with the comment "No DWARF means - nothing to do". Radar bug #4492686. -- Fixed a bug that caused the "internal error: output_local_symbols() - inconsistent local symbol count" when there were multiply defined symbols and - the -m flag was used. The fix was to add a new local boolean variable, - discarded_multiply_defined_symbol, to merged_symbols() in symbols.c that gets - set to FALSE at the start of merging each symbol and gets set to TRUE if the - symbol is multiply defined. Then in the if conditional before - count_dwarf_symbols() is called the additional test of - ! discarded_multiply_defined_symbol was added. Radar bug #4487503. -- Fixed a bug that caused the "internal error: output_local_symbols()' - inconsistent local symbol count" when converting common to undefined in an - object compiled with DWARF. The fix was to move the call to - maybe_remove_dwarf_symbol() in merge_dylib_module_symbols() in symbols.c - right after the label use_symbol_definition_from_this_dylib. This call needs - to be made BEFORE a merged_symbol has its definition_object changed to the - cur_obj. The same change was also done in merge_bundle_loader_symbols() - in symbols.c . Radar bug #4446605. -- Changed the handling of symbols names listed in the -unexported_symbols_list - file and now no longer check to see of they are seen in the linked objects. - The change is in main() in ld.c and is just the removal of the loop of code - that checks the remove_symbols[] array for seen symbols. Radar bug #4465511. -- Changed the handling of the -Y flag to not cause an error when multiple -Y - flags are specified. When multiple -Y flags are specified the last one is - used. The change is in main() in ld.c and is just the removal of the test - for Yflag != 0 and the error message. Radar bug #4461031. - -Changes for the 5.21 release (the cctools-590.37 release): -- Fixed a problem with causing the link editor defined symbol ___dso_handle to - be made into a private extern with the -exported_symbols_list or - -unexported_symbols_list options. The code in define_link_editor_symbol() in - symbols.c around the call to exports_list_processing() needed to adjust - the private extern symbols count if the symbol was made into a private extern. - And not be called at all if the symbol started out as a private extern. - Radar bug #4461173. -- Fixed problems with -dead_strip removing sections with contents created from - files. Radar bug #4439885. - - In layout_ordered_sections() in sections.c the loop that looks for merged - sections with order files or when -dead_strip is specified had an expression - added to the if() to skip certian sections. If the section was created from - a file it is also skipped so that layout_ordered_section() is not called - which was zeroing out the section size. - - In resize_live_sections() in sections.c the loop that looks for S_REGULAR - section types was changed. An extra condition was added to the if() - expression so it would not call resize_live_section() when the section was - created from a file. - - In flush_scatter_copied_sections() in sections.c the if() test for calling - sections with order files or when dead code stripping was specified was - changed. A test was added when the section was created from a file so - output_flush() in not called in this case. - - Added setting S_ATTR_NO_DEAD_STRIP in process_section_specs() in spec.c for - sections created from files. - -Changes for the 5.21 release (the cctools-590.36 release): -- Changed the link editor defined symbol from __dso_handle to ___dso_handle. - Radar bug #3992244. - -Changes for the 5.21 release (the cctools-590.35 release): -- Added the link editor defined symbol __dso_handle for all images used with - dyld. Radar #3992244. - - Changed setup_link_editor_symbols() in symbols.c to define __dso_handle in - addition to the existing symbol. Broke out most of the existing code into - a new static routine setup_link_editor_symbol() passed a symbol_name. - - The new static routine setup_link_editor_symbol() used most of the code - from the previous setup_link_editor_symbols() but was changed to handle - one or more symbols defined in the link_edit_symbols_object. - - Changed define_link_editor_dylib_symbols() in symbols.c to also set the - value of __dso_handle symbols. Broke out some of the code into the new - static routine define_link_editor_dylib_symbol(). - -Changes for the 5.21 release (the cctools-590.33 release): -- Split maybe_remove_dwarf_symbol out of merge_symbols in symbols.c. Call - maybe_remove_dwarf_symbol from similar code in merge_dylib_module_symbols - and merge_bundle_loader_symbols. Radar bug #4428677. -- Change merge_symbols and output_local_symbols in symbols.c to suppress - compilation directory SO stab when none is provided/necessary and append - '/' to it otherwise. Change read_dwarf_info in pass1.c to set - dwarf_comp_dir to NULL when no compilation directory is provided. - Radar bug #4426731. - -Changes for the 5.21 release (the cctools-590.32 release): -- Added the environment variable LD_LIBRARY_PATH as list of colon separated - paths to be searched just before the standard paths. Radar bug #4314159. - - Added the variables ld_library_paths and nld_library_paths to pass1.[ch] - - Added code to main() in ld.c to look for the environment variable - LD_LIBRARY_PATH and if found parse out the colon separated paths and filling - in the two variables above. - - Changed in search_for_file() and search_paths_for_lname() in pass1.c adding - another loop between the one for search_dirs[] and standard_dirs[] for - ld_library_paths[]. -- Changed to allow LD_PRINT_OPTIONS as an environment variable. This prints - the options to stderr. -- Fixed Bug #4420393 by changing prefix from Build & Integration to XBS. -- Fixed Bug #4214105 by changing allowable environment variables from - RC_TRACE_* to LD_TRACE_*. For now, backwards compatible with RC_TRACE_* -- Fixed Bug #4214101 by allowing LD_TRACE_FILE -- Updated all rc_trace_* variables to use ld_trace_*. -- Make set_obj_resolved_path in objects.c a stub when SA_RLD is defined. - Radar bug #4402489. -- Suppress dwarf map entries for S_ATTR_STRIP_STATIC_SYMS sections. - Radar bug #4419133. - - Change count_dwarf_symbols to ignore symbols in such sections. - - Change add_dwarf_map_for_sym to take a parameter indicating the section - and ignore symbols in such sections. - - Change output_local_symbols to pass the original section to - add_dwarf_map_for_sym. -- Change merge_symbols in symbols.c so that when a weak coalesced - symbol is ignored in favour of a strong coalesced symbol, the debug map - entries relating to that symbol are removed from the count. Radar - bug #4421606. - -Changes for the 5.21 release (the cctools-590.31 release): -- Changed to only emit an LC_UUID command if a debug section is seen on input - or an LC_UUID command is seen on input. Radar bug #4415529. - - Added the suppress and emit boolean field to the uuid_info struct in - layout.[ch] - - Changed main() in ld.c to set output_uuid_info.suppress if -no_uuid is - specified. - - Changed merge_sections() in sections.c to set output_uuid_info.emit to TRUE - if a debug section is seen in the input file. - - Changed check_cur_obj() in pass1.c to set output_uuid_info.emit to TRUE if - an LC_UUID load command is seen in the input file. - - Changed layout_segments() in layout.c to test output_uuid_info.suppress for - != TRUE and output_uuid_info.emit for TRUE before creating the LC_UUID - command. -- Fixed two places in layout_segments() in layout.c that were calling - lookup_symbol() and were not updated with the changes to Radar bug #4299546 on - how the check for an undefined symbol is made. Both the lookup of the entry - point and the shared library init routine name code needed a fix to use - merged_symbol->name_len == 0 not merged_symbol != NULL. Radar bug #4401068. - -Changes for the 5.21 release (the cctools-590.30 release): -- Change output_local_symbols in symbols.c to give the N_OSO stab in the - DWARF map a n_desc of 1. Bug # 4414139. -- DWARF updates now 4383509 is fixed. Bug # 4409967. - - Update debugcompunit.c and debugline.c to latest version; fix - read_sleb128, and have read_comp_unit add the abbrev offset. - - Have read_dwarf_info in pass1.c add the line number information offset - and verify that it's reasonable. - - Remove unused variable 'limit' from add_dwarf_map_for_sym in symbols.c. -- Add support for generating the DWARF debug map. Bug #4370126. - - New files debugcompunit.[ch], debugline.[ch], dwarf2.h. - - Additional fields dwarf_name, dwarf_num_paths and dwarf_comp_dir in - 'struct object' in objects.h. The format of dwarf_source_data is a - sequence of size_t-sized words made up of subsequences. Each - subsequence describes the source files which the debug_line information - says contributed to the code of the entity starting at a particular - symbol. - - The subsequences are sorted by the index of the symbol to which they - refer. The format of a subsequence is a word containing the index - of the symbol, a word giving the end of the entity starting with - that symbol, and then one or more words which are file numbers - with their high bit set. - - A file number is simply an index into cur_obj->dwarf_paths; each - dwarf_paths entry is either NULL (if not used) or the path of the - source file. dwarf_num_paths is the length of dwarf_paths. - - New function read_dwarf_info in pass1.c which looks for DWARF - sections in cur_obj and if found, fills in the dwarf_name and - dwarf_comp_dir fields in cur_obj. - - Change function merge in pass1.c to call read_dwarf_info when debug - symbols are generated. - - New function count_dwarf_symbols in symbols.c which returns the - number of DWARF symbols that would be generated by a symbol, which - must be in the current object. It is the pass1 counterpart of - add_dwarf_map_for_sym. - - Change function merge_symbols in symbols.c to allocate space for - DWARF debug map symbols. - - Change function discard_local_symbols_for_section in symbols.c to - remove space for DWARF debug map symbols associated with local symbols - which will no longer be needed. - - Change function remove_dead_N_GSYM_stabs_for_cur_obj in symbols.c to - remove space for DWARF debug map symbols associated with global symbols - which will no longer be needed. - - New function add_dwarf_map_entry in symbols.c which adds a single - DWARF map symbol to the symbol list. - - New function add_dwarf_map_for_sym in symbols.c which adds the - DWARF symbols for a single object file symbol to the symbol list. - It is the pass2 counterterpart of count_dwarf_symbols. - - Change function output_local_symbols in symbols.c to output the DWARF - debug map: add initial DWARF map symbols, add SOL strings to the - local string table, add debug map entries for global and local symbols - whose definitions in this object were actually output, add a terminal - DWARF map symbol. - -Changes for the 5.21 release (the cctools-590.29 release): -- Removed the check added to the relocation routines for Radar bug #4213478 that - to cause an error if there was a relocation entry for a coalesced symbol plus - a non-zero offset. Turns out this is used in libstdc++ and now it has been - determined that the problem that was trying to detect will not happen. Changes - were in ppc_reloc.c, generic_reloc.c, i860_reloc.c, hppa_reloc.c, m88k_reloc.c - and sparc_reloc.c . Radar bug #4405403. - -Changes for the 5.21 release (the cctools-590.28 release): -- Changed check_cur_obj() in pass1.c so that it byteswaps the LC_UUID load - command. Radar bug #4401375. -- Added a check to the relocation routines to cause an error if there is a - relocation entry for a coalesced symbol plus a non-zero offset. Changes were - in ppc_reloc.c, generic_reloc.c, i860_reloc.c, hppa_reloc.c, m88k_reloc.c and - sparc_reloc.c . Radar bug #4213478. - -Changes for the 5.21 release (the cctools-590.27 release): -- Fixed a warning about unused variable `stat_buf' in - get_stroff_and_mtime_for_N_OSO() in symbols.c for the static KLD case. - -Changes for the 5.21 release (the cctools-590.26 release): -- Added the missing case for the LC_UUID load command to be ignored in - check_cur_obj() in pass1.c . Radar bug # - -Changes for the 5.21 release (the cctools-590.25 release): -- Added support for DWARF. Radar bug #3415593. - - Added the enum bool field debug_only to the merged_segment struct in - sections.h to indicate that the sections in the segment contain the - S_ATTR_DEBUG attribute . - - Changed create_merged_section() in sections.c to set the new debug_only - field when creating a new segment based on the S_ATTR_DEBUG attribute for - the first section placed in the segment. And added a check when the - section is found to make sure the debug_only field in the segment matches - the S_ATTR_DEBUG attribute for the section. - - Changed merge_sections() in sections.c to always set the S_ATTR_DEBUG on - the merged section if the section in the object has it set. And then - simply continue and not account for the section's size, relocs, etc. - - In pass2() in pass2.c in the loop for each non-literal content section - a test for the debug attribute, S_ATTR_DEBUG, was added. And if set then - a continue is done to not cause output_section() to be called on it. - - In relayout_relocs() in sections.c in the first loop for regular sections - a test for the debug attribute, S_ATTR_DEBUG, was added. And if set then - a continue is done to not cause count_relocs() to be called on it. - - Added a new routine, remove_debug_segments() to sections.[ch] to remove - the debug segments from the list of merged_segments. - - Added a call to the new routine, remove_debug_segments(), in layout() in - layout.c to just before layout_order_sections() is called and before the - dead code stripping routines are called. - - Changed layout_segments() in layout.c to move up the saving of - merged_segments into original_merged_segments to the start of the routine. - - Changed RLD routine reset_merged_sections() in sections.c to first add the - debug segments back on the list of merged_segments. - - Added a check to check_cur_obj() in pass1.c to make sure all debug sections - are of type S_REGULAR. - - Added a check at the end of check_symbol() in symbols.c to make sure the - symbol is not in a debug section. - - Added two checks in the *_reloc() routines to test to illegal references to - debug sections from local relocation enties (one for the reloc entry and one - for its pair if it exists). The changes are in: - ppc_reloc() in ppc_reloc.c - generic_reloc() in generic_reloc.c - hppa_reloc() in hppa_reloc.c - i860_reloc() in i860_reloc.c - m88k_reloc() in m88k_reloc.c - sparc_reloc() in sparc_reloc.c - - Added a check to process_section_specs() in specs.c to check for debug - sections that have an order file specified and issue a warning that they - are ignored. - - Added a check in merge_symbols() when -sectobjectsymbols is set to see - the the section is not a debug section and if so issue a warning. - - Changed the way N_OSO stabs were previously handled so now the linker never - adds them but only changes the name in some cases. This requires a matching - compiler change (Radar bug #4386531) even for stabs to always produce the - N_OSO stab in the object file. This is how things are to work: - * The compiler when producing dwarf debug info will produce a N_OSO stab - with: - .debug_note "", 0x66, 0, 1, 0 - That is the the name of "" (that is a one byte string with single '\0' - character) and an n_desc field value of 1. - * The compiler when producing stabs debug info will produce a N_OSO stab - with: - .stabs "", 0x66, 0, 0, 0 - Again with a name of "" but with an n_desc field value of 0. - * When the linker encounters a N_OSO stab with a name of "" and an n_desc - field of 1 it will change the name to the full path of the object and set - the n_value field to the mod time of the object (or archive mod time). - * When the linker encounters an N_OSO stab with a name of "" and an n_desc - field of 0 its behavior depends if -Sp is specified or not. If -Sp is - specified it will change the name to the full path of the object and set - the n_value field to the mod time of the object (or archive mod time). - If -Sp is not specified it will change the N_OSO stabs names to "". - The above is implemented with the following changes: - - Added the new routine set_obj_resolved_path() to objects.[ch] to set the - resolved_path field of an object_file struct for use by N_OSO stabs. - - Changed is_output_local_symbol() in in symbols.[ch] to now be passed the - n_desc field and all changed all the callers to now pass n_desc. Then - code was added for N_OSO stabs to return the size of their names as - outlined above based on the n_name field, n_desc field and if -Sp is - specified. - - Removed the old code in merge_symbols() in symbols.c that tracked where - to add the N_OSO stab and its name. - - In merge_symbols() in symbols.c at the end of the routine that handles - STRIP_DUP_INCLS, the three places that called strlen() on the symbol's - string were replace with calls to is_output_local_symbol() and the use - of output_strlen becase the symbol maybe a N_OSO that we are changing the - name of. - - Added the new routine get_stroff_and_mtime_for_N_OSO() in symbols.c to - be used by output_local_symbols() to help put out N_OSO stabs. - - Removed the old code in output_local_symbols() in symbols.c to put out - an N_OSO stabs in the correct place. And added code in there to set the - name of the N_OSO stabs as outlined above. - - For the strip_level of STRIP_NONE the optimization of just using the - entrire string table to avoid doing a strlen() on all the local strings - had to be removed since we now may have to add strings for N_OSO stabs. - So now this is just delt with by letting is_output_local_symbol() get - called and accounting string sizes normally. - - Removed code in merge_symbols() in symbols.c for strip_level == - STRIP_NONE to increment local_string_size by cur_obj->symtab->strsize. - And the code to always increment cur_obj->nlocalsym and nlocal_symbols. - - Removed a test in discard_local_symbols_for_section() in symbols.c - of strip_level==STRIP_NONE before the call to is_output_local_symbol(). - And removed two later tests before decrementing local_string_size . - - Removed a test in remove_dead_N_GSYM_stabs_for_cur_obj() in symbols.c - of strip_level==STRIP_NONE before the call to is_output_local_symbol(). - And removed a later test before decrementing local_string_size . - - Removed a test in output_local_symbols() in symbols.c of - strip_level == STRIP_NONE || strip_level == STRIP_DUP_INCLS - of strip_level==STRIP_NONE and STRIP_DUP_INCLS before the call to - is_output_local_symbol(). And removed later the code that tests - strip_level == STRIP_NONE and does a memcpy() to copy out the object's - whole symbol table. - - Removed a test in local_symbol_output_index() in symbols.c of - strip_level==STRIP_NONE before the call to is_output_local_symbol(). - - Added support for the uuid load command. - - Added the output_uuid_info variable to layout.[ch] . - - In layout() in layout.c added a call to memset() to zero out - output_uuid_info. - - Added the new routine uuid() in the new files uuid.[ch] used to set the - uuid[] bytes of the uuid_load command. - - In layout_segments() in layout.c added the code to set the values into - uuid load command and call the new uuid() routine. - - In output_headers() in pass2.c added the code to copy out the uuid load - command into the output file. - -Changes for the 5.20 release (the cctools-590.23.2 release): -- Changed the Makefile back so the OFLAG was not commented out. Radar bug - #4371058. - -Changes for the 5.20 release (the cctools-590.23.1 release): -- Fixed a bug that caused a crash in remove_merged_symbols() in symbols.c when - looping through the merged_symbol_list. The fix was really likely with the - missing memset() needed in lookup_symbol() in symbols.c after the allocate() - of the merged_symbol_list struct. The loop in remove_merged_symbols() that - caused the crash was also changed to be more robust by looping backwards over - only the used elements in the array and adding additional checks to avoid - indirection through possible bad pointers. Radar bug #4371058. - -Changes for the 5.20 release (the cctools-590.22 release): -- Fixed a bug in literal_pointer_output() in literal_pointers.c where it was - creating local relocation entries in the output file's memory buffer when it - shouldn't. In doing so it can run off the end of the memory buffer and cause - a crash. If it doesn't crash we get lucky as this just happens to be done - early and later the correct stuff gets placed over this area in the memory - buffer. Radar bug #4348548. - -Changes for the 5.20 release (the cctools-590.21 release): -- Fixed a bug in remove_merged_symbols() in symbols.c that was using - merged_symbol_root->list where merged_symbol_root could be NULL. Radar bug - #4346485. - -Changes for the 5.20 release (the cctools-590.20 release): -- Removed the warnings when building. Radar bug #4340147. - - Added -fno-builtin-round and -fno-builtin-trunc to the Makefile. - - Changed the cast of argument 3 of the call to bootstrap_look_up() to - (unsigned int *) in check_for_ProjectBuilder() in ld.c . - - Set the fields of the local struct r to NULL in setup_reference() in - sections.c . - - Added a cast of (unsigned long *) to argument 5 of is_output_local_symbol() - in remove_dead_N_GSYM_stabs_for_cur_obj() and output_local_symbols() in - symbols.c . - - Added two #undef's, one for THREAD_STATE_NONE and one for - VALID_THREAD_STATE_FLAVOR in layout.c . -- Changed the definition of kld_basefile_name in internal_kld_load() in kld.c - to include const so it matches the header file: - /System/Library/Frameworks/Kernel.framework/PrivateHeaders/libsa/stdlib.h - if it exists on the system. Radar bug #4342523. -- Fixed a bug when both -s and -dead_strip were used and there were dead private - extern symbols. This caused an internal error in - assign_output_symbol_indexes() in symbols.c with inconsistent local symbol - counts. The first problem was that nstripped_merged_private_symbols was being - reset to zero causing the problem with local symbol counts. The second - problem was the count of merged symbols was wrong because - nstripped_merged_symbols was reset to zero not to - nstripped_merged_private_symbols before adding in the live symbols to be - stripped. Radar bug #4286691. -- Fixed a bug where the -w flag to suppress warnings was not suppressing the - list of multiply defined symbols. The fix was in merge_dylib_module_symbols() - in symbols.c where after it calls warning() to print the header a test of - nowarnings == TRUE was added and if so a continue is done to skip tracing of - symbols. Radar bug #4334705. - -Changes for the 5.20 release (the cctools-590.17 release): -- Changed symbol lookup to make it faster. Radar bug #4299546. - - The structures and global variable for storing the merged symbol hash table - and list of merged symbols in symbols.[ch] were changed. The pointer to get - to the merged symbol table is a new global variable merged_symbol_root - replacing the old merged_symbol_lists pointer. - - The contents of merged_symbol_list struct was completely changed and is - now only a list of merged symbols implemented as array of pointers, a - count of the used pointers and a next pointer in a linked list of - merged_symbol_list structs. There is no global variable to get to the - start of the list and instead it is hung off the new merged_symbol_root - struct. As such all code that has loops that to loop over the list of - merged symbols are changed and then after the loop a change is made to - indirect through the pointer in the symbols[] array. - These changes were made in: - in pass1.c - search_dynamic_libs() - prebinding_check_for_dylib_override_symbols() - twolevel_namespace_check_for_unused_dylib_symbols() - in symbols.c - define_common_symbols() (2 loops) - define_undefined_symbols_a_way() - mark_globals_live() - set_fine_relocs_for_merged_symbols() - count_live_symbols() - define_link_editor_dylib_symbols() - reduce_indr_symbols() - layout_merged_symbols() - output_merged_symbols() (2 loops) - output_rld_symfile_merged_symbols() - process_undefineds() (4 loops) - reset_prebound_undefines() - assign_output_symbol_indexes() (3 loops) - output_dylib_tables() (2 loops) - clear_read_only_reloc_flags() - flag_read_only_reloc() - - A new merged_symbol_root struct now stores the hash table and has a - pointer to the merged_symbol_list struct. There is a new global variable - merged_symbol_root which is a pointer to this struct. This is made up of - an array of new merged_symbol_chunk structs. - - The new merged_symbol_chunk structs has an array of merged_symbol structs - of SYMBOL_CHUNK_SIZE and a pointer to the next merged_symbol_chunk struct. - - The routine lookup_symbol() was changed to return a pointer to a - merged_symbol struct instead of a pointer to a pointer. So to see if the - symbol is defined the callers now need to look to see if the name_len field - of the merged_symbol pointer returned is != 0. - These changes were made in: - coalesced_section_merge() in coalesced_sections.c - generic_reloc() in generic_reloc.c - hppa_reloc() in hppa_reloc.c - i860_reloc() in i860_reloc.c - indirect_section_merge() in indirect_sections.c - layout_segments() in layout.c - literal_pointer_merge() in literal_pointers.c - m88k_reloc() in m88k_reloc.c - pass1_archive() in pass1.c - ppc_reloc() in ppc_reloc.c - sparc_reloc() in sparc_reloc.c - in rld.c - kld_lookup()/rld_lookup() - kld_forget_symbol()/rld_forget_symbol() - in sections.c - layout_ordered_section() - count_relocs() - scatter_copy() (2 places) - live_marking() (2 places) - in symbols.c - merge_symbols() - command_line_symbol() - command_line_indr_symbol() - merge_dylib_module_symbols() - merge_bundle_loader_symbols() - enter_indr_symbol() - define_link_editor_execute_symbols() - setup_link_editor_symbols() - define_link_editor_dylib_symbols() - define_link_editor_preload_symbols() (2 places) - define_link_editor_symbol() - remove_dead_N_GSYM_stabs_for_cur_obj() - Since lookup_symbol() now returns a pointer to a merged_symbol struct - to be used by enter_symbol(). So the static variable - merged_symbol_list_for_enter_symbol pointing to the merged_symbol_list has - been removed. - - The new static routine add_to_symbol_list() in symbols.c was added which is - passed merged_symbol and adds it to the merged_symbol_list linked list. - - The routine enter_symbol() was changed so the hash_pointer parameter is now - just a pointer to a merged_symbol struct not a pointer to a pointer. The - code that used the removed merged_symbol_list_for_enter_symbol was removed. - And a call to the new add_to_symbol_list() routine was added. - - The routine enter_indr_symbol() was changed so the hash_pointer variable - is now a pointer to a merged_symbol struct returned from lookup_symbol(). - The code that used the removed merged_symbol_list_for_enter_symbol was - removed. And a call to the the new add_to_symbol_list() routine was added. - - Changed free_pass1_symbol_data() in symbols.c and just removed the code that - has been #ifdef notdef'ed out instead of updating the loop that deallocated - the hash table. - - The routines remove_merged_symbols() and print_symbol_list() in symbols.c - were updated to deal with the new merged symbol table data structures. - - Added the routine hash_instrument() in symbols.[ch] to print out info about - the contents of the hash table. The new flag -hash_instrument in main() in - ld.c causes this to be called. - -Changes for the 5.18 release (the cctools-590.16 release): -- Changed is_output_local_symbol() in symbols.c for the STRIP_MIN_DEBUG (-Sp) - case so we never keep types. Radar bug #4312007. - -Changes for the 5.18 release (the cctools-590.13 release): -- Fixed a bug when -dead_strip was used that caused it to remove local symbols - for coalesced sections. The fix was at the end of coalesced_section_merge() - in coalesced_sections.c to only call discard_local_symbols_for_section() - when dead_strip is FALSE. As this will be called when dead_strip is TRUE as - part of count_live_symbols() calling removed_dead_local_symbols_in_section(). - Radar bug #4293942. - -Changes for the 5.18 release (the cctools-590.12 release): -- Made the changes control stack execution. Radar bug #4281171. - - Added the boolean allow_stack_execute to ld.[ch] which defaults to FALSE and - gets set to TRUE when the new flag -allow_stack_execute is seen in main(). - - Added a check in main() in ld.c to cause an error if -allow_stack_execute is - used and the filetype is not MH_EXECUTE. - - Changed layout_segments() in layout.c : - - To use the new routine get_segprot_from_flag() when setting the default - segment protections of segments (3 places). - - Since the default protection may not include VM_PROT_EXECUTE, if this is - added because there is a section with the S_ATTR_SOME_INSTRUCTIONS - attribute, a test of the initprot of VM_PROT_EXECUTE is done and if set - it is added to maxprot. - - If the protections of the stack are specified to include VM_PROT_EXECUTE - then allow_stack_execute is set to TRUE. - - If allow_stack_execute is set to TRUE then MH_ALLOW_STACK_EXECUTION is set - in the mach_header flags in the output. - -Changes for the 5.18 release (the cctools-590.10 release): -- Added support for new i386 self (dyld) modifiying code stubs. Radar bug - #4202415. - - In scatter_copy() in sections.c the section is checked for and if found and - we are prebinding the entries are turned into JMP instruction. - - In layout() in layout.c if the SEG_IMPORT is present to set it's initial - protection to rwx. -- Changed find_stab_name_end() in symbols.c correctly step over C++ scoped type - stab strings with blah::blah in them. Radar bug #4233860. -- Fixed a problem with ld -r and S_ATTR_STRIP_STATIC_SYMS in - is_output_local_symbol() in symbols.c so it now does not strip these when - save_reloc is TRUE. The problem is that the first symbol in a coalesced - section could get stripped leaving it "malformed". - -Changes for the 5.18 release (the cctools-590.9 release): -- Changed is_output_local_symbol() in symbols.c to not always call strlen() at - the top of the routine. But to call it just before we return TRUE and the - whole string is to be in the output. This speeds things up a bit. Radar bug - #4157062. -- Changed merged_symbols() in symbols.c so that when merging a weak symbol - it will discard a weak symbol in the merged symbol if it comes from a - dylib for a weak symbol in a .o file. Radar bug #4231836. - -Changes for the 5.18 release (the cctools-590.7 release): -- Worked around a problem not having groups for exception frame information and - dead code stripping. The compiler generates a first block for the exception - frame info that is referenced by all other exception blocks. So if this block - becomes live it will cause all the other exception frame blocks to become - live when the dead code stripping phase of seaching live support blocks - touching something that is live. The work around that was added was to not - cause a live support block to become live if it references another live - support that is live. This change is in ref_operation() in sections.c to test - (ref->map->s->flags & S_ATTR_LIVE_SUPPORT) . Radar bug #4213358. -- Changed dead code stripping to make it faster. Radar bug #4228195. - - Added a new routine build_references() in section.c called first in - live_marking() to set up the linked list of refs off the fine_relocs struct - and cause new fine_reloc pointer off the merged_symbol struct to be set. - - Added the new field fine_reloc to the merged_symbol struct in symbols.h to - be a pointer to the fine_reloc for the symbol if any. - - Added a the new struct ref to objects.h which contains two groups of fields. - For external references it has: - a pointer to a merged_symbol - For local refereces it has: - a pointer to a fine_reloc - a pointer to the section map - a pointer to the object - and a next pointer for the linked list. - - Added the new field refs to the fine_reloc struct in objects.h for dead code - stripping for the new ref structures for each fine_reloc block. - - The new routine build_references() in sections.c calls down through the - following new routines to get the references for each section from the - relocation entires for the fine_relocs: - setup_references_in_section() in sections.c - setup_references() in sections.c - setup_reference() in sections.c - To make things faster for ld -r object that have many relocation entries the - code was changed to walk the relocation entries and putting them into the - fine_reloc blocks as a linked list. - - Added an assignment to the new pointer to a fine_reloc struct off of the - merged symbol in layout_ordered_section() in sections.c . - - Added the new routine, set_fine_relocs_for_merged_symbols() in symbols.[ch] - called from build_references() to set the new pointer to a fine_reloc for - merged symbols. - - Changed: - live_marking() in sections.c - mark_globals_live() in symbols.c - count_live_symbols() in symbols.c - in places where it used to call get_fine_reloc_for_merged_symbol() to now - use the fine_reloc pointer off the merged_symbol. - - Removed the checks of errors != 0 in code in sections.c after calls to: - walk_references_in_section() - walk_references() - in the routines: - live_marking() - walk_references_in_section() - since the build_references() code is now the one calling the *_reloc() - routines where errors can occur. - - Changed walk_references() in sections.c to now use the new refs field of the - fine_reloc to walk the references and removed all the code to deal with - relocation entries. - - Changed indirect_live_ref() in indirect_sections.c so it now takes and sets - then new ref struct. It now returns a boolean to indicate if there is a - reference. - - Changed ref_operation() so the second argument is now a pointer to the new - refs structure. Which now has all the info needed for ref_operation() to - process the reference without having to calculate the map or the file_reloc - the live_ref struct was refering to. The routine was change to use the - refs struct and the fields with the values to process the reference. - - Added a new static boolean variable local_NO_DEAD_STRIP_symbols to symbols.c - which starts out as FALSE and set to TRUE in merged_symbols if any local - local section symbol is seen with the N_NO_DEAD_STRIP bit set. Then the - code in mark_N_NO_DEAD_STRIP_local_symbols_live() first checks this to see - if FALSE and then just returns. It saves time as it is expensive to look - through all the local symbols and generally this bit never set on a local - symbol. - - Added a new __private_extern__ boolean variable dead_strip_times to ld.[ch] - which is set with the flag -dead_strip_times in main() in ld.c. Changed - live_marking() in sections.c to check this flag and to record the start and - end times of the various phases of dead code stripping and print them out. - Also added the new static routine calculate_time_used() in sections.c which - is used to print out the times. -- Added the -macosx_version_min flag. Radar bug #4195253. - -Changes for the 5.18 release (the cctools-590.6 release): -- Changed which local symbols get deleted for a block that is coalesced out or - dead code stripped. Previouly all local symbols in the group of local - symbols in a N_BNSYM/N_ENSYM pair were deleted when the block is removed. - Now any type stabs in that block must not be deleted. Radar bug #4205997. - - Added the new static function is_type_stab() to symbols.c to return TRUE if - the symbol passed to it is a type stab. - - Changed discard_local_symbols_for_section() in symbols.c when it was going - to remove a block of N_BNSYM/N_ENSYM symbols to add a new loop and check - to see if the symbol is a type stab. If it is the current localsym_block - is closed and the stab is stepped over. If not it is added to the the - localsym_block creating a new local symbol block if the current block is - closed. -- Fixed problems with the change below with the -Sp option where the code was - not correctly #ifdef'ed out from the RLD version. The added code in symbols.c - for STRIP_MIN_DEBUG was #ifndef RLD. Radar bug #4220100. - -Changes for the 5.18 release (the cctools-590.5 release): -- Added the -Sp striping option to strip some stabs and modify other stab - strings and add N_OSO stabs to allow the debugger to use debug info from .o - files. Radar bug 4202462. - - Added STRIP_MIN_DEBUG to the strip_levels enum in ld.h . - - Added code to main() in ld.c to parse -Sp and check to see it is not used - with -r. - - Changed is_output_local_symbol() in symbols.[ch] to return indirectly the - size of the output string through an new parameter output_strlen. And added - code for the STRIP_MIN_DEBUG case to see if the stab is to be output and its - string size. - - Changed all callers of is_output_local_symbol() to pass the extra parameter - and use the returned string size in their code(). - - Added the new static routines find_stab_name_end() and find_stab_type_end() - to symbols.c to parse out stab strings. - - Added the new fields resolved_path and resolved_path_len to the struct - object_file in objects.h. - - Added code to merge_symbols() in symbols.c where it deals local symbols to - account for the N_OSO stabs and the string that are added with -Sp. - - Added code to output_local_symbols() in symbols.c to deal with putting out - the new N_OSO stabs in the correct places in the output. - -- Fixed a bug when an archive containing only the magic string was used which - incorrectly generated an error that the archive was malformed. The fix was in - check_archive_arch() in pass1.c to see of the filesize was the offset after - the magic string then issue a warning and return. Radar bug #4201492. - -Changes for the 5.18 release (the cctools-590.4 release): -- Fixed a bug when -weak_framework was used that caused an incorrect error - message about mismatching weak references. The fix was in process_undefineds() - in symbols.c to add an extra condtional to the check for merged_symbols that - had the weak_reference_mismatch field TRUE. The extra check was to see if the - where defined in a dylib and that dylib was being forced weak. Radar bug - #4180599. -- Changed the warning message about NEXT_ROOT being ignored if -syslibroot is - specified to only be printed if the two are set to different strings. This - is in main() in ld.c. Radar bug #3593340. -- Changed a warning message that printed out a dynamic library that could not be - found to include the dynamic library that made a reference to it. This was in - in open_dylib() in pass1.c . Radar bug #4106804. - -Changes for the 5.19 release (the cctools-590.2 release): -- Changed ld(1) so every EXCL uses a string allocated for a BINCL. This reduces - the size of final linked images built with -gfull. Modified - output_local_symbols() in symbols.c to call a new static functions - record_bincl() when processing a BINCL and find_bincl() when processing a - EXCL. Radar bug #4151821. - -Changes for the 5.18 release (the cctools-590 release): -- Changed ld(1) to prepend the value of -syslibroot to all absolute paths of the - they exist in main.c in ld.c. Radar bug #4127020. - -Changes for the 5.18 release (the cctools-585 release): -- Added ifdef's around the call to get_macosx_deployment_target() in - check_cur_obj() in pass1.c so it is not compiled in for libkld.a. - Radar bug #4100992. - -Changes for the 5.18 release (the cctools-583 release): -- Changed the Makefile so that when RC_XBS is set to YES then the compiler - options -MD and -dependency-file as well as the md(1) program are not used. - Radar bug #4029936. - -Changes for the 5.18 release (the cctools-581 release): -- Fixed a problem introduced with the changes so the handling of the default - MACOSX_DEPLOYMENT_TARGET. The code for setting this was moved up in main() - in ld.c so it is set in time to be used in checking other command line values. - Also code was added so it is set even if -arch is not specified. Radar bug - #4092246. - -Changes for the 5.18 release (the cctools-580 release): -- Fixed a bug where if a symbol defined in a dylib is first linked in followed - by an undefined weak reference from a .o file it will generate a weak mismatch - error. The fix was to add a new boolean field to the merged symbol, - seen_undef (in symbols.h). Then in merge_symbols() in symbols.c where it - detects weak mismatches, if seen_undef is not set then just set the N_WEAK_REF - bit from the .o file. Else when seen_undef is set then do the checking and - handling of weak mismatches. Then after either are done set seen_undef to - TRUE. Radar bug #4016228. -- Changed it so that the default for MACOSX_DEPLOYMENT_TARGET is 10.4 for i386. - Radar bug #4081062. - - Moved the call to get_macosx_deployment_target() in main() in ld.c to inside - the if() where the -arch flag is known to be specified. Then the cputype is - passed as an additional parameter. - - Added a call to get_macosx_deployment_target() in check_cur_obj() in pass1.c - when the cputype is set from the .o files being linkd. - -Changes for the 5.18 release (the cctools-578 release): -- Changed check_cur_obj() in pass1.c to also ignore SWAP_LONG(MH_MAGIC_64) with - -no_arch_warnings. Radar bug #4014404. - -Changes for the 5.17 release (the cctools-575 release): -- Made a additional change for the original change to "Don't search indirect - libraries when linking two-level" that was made for Radar bug #3737622. - The problem was when building a two-level namespace image that was linking - against flat-namespace images the link could fail with undefined symbol - references. This happened because the undefined references from a - flat-namespace dylib were being looked up but the indirect dylibs that - defined those symbols were removed from the list of libraries to be searched. - The "Architect" of the original change intended that "when linking two-level - only undefines from dylibs should be ignored". So to match that intent - another change is needed when linking in a module from a flat namespace dylib. - - In merge_dylib_module_symbols() in symbols.c, in the second loop where - the symbols referenced by a dylib module are merged as undefined references, - a test was added when resolving with flat namespace semantics. So that if - the output file was being built as a two-level namespace image then - the reference from the dylib is skipped. And that undefined symbol will - not be searched for. - This of course leaves the architectural flaw that error checking is lost and - will allow broken binaries to be built. Radar bug #4022543. - -Changes for the 5.17 release (the cctools-573 release): -- Changed main() in ld.c and check_cur_obj() in pass1.c to call the new function - force_cpusubtype_ALL_for_cputype() with the cputype being linked. And if it - returns TRUE sets force_cpusubtype_ALL. Radar bug #4002756. - -Changes for the 5.17 release (the cctools-572 release): -- Fixed a problem when MallocScribble was on that caused a crash. The problem - was enter_symbol() in symbols.c was assumed to return pointers to - merged_symbol structs that were zero'ed out. A call to memset() was added to - make sure this is done. Radar bug #3980535. - -Changes for the 5.17 release (the cctools-569 release): -- Fixed a problem when determinging the type of relocation entries in a - coalesced section to a symbol that was a weak coalesced symbol in the .o file - but ends up as a non-coalesced symbol in the output. The problem was in - coalesced_section_merge() when it was trying to figure out if it was to force - an external relocation entry because the symbol was a coalesed symbol. It - needed an extra test to look at the merged symbol and not the symbol in the .o - ofile. Radar bug #3934341. - -Changes for the 5.17 release (the cctools-568 release): -- Fixed problems with changes for supporting the new XXX_RELOC_LOCAL_SECTDIFF - relocs from Radar bug #3744821. The problem was the logic around calling - legal_reference() in the cases with sections and fine relocs and sectdiff - relocation entries. The code was changed back to the original code with the - sectdiff parameter to legal_reference() changed from TRUE to - r_type != XXX_RELOC_LOCAL_SECTDIFF. This change was made in ppc_reloc() in - ppc_reloc.c and generic_reloc() in generic_reloc.c . Radar bug #3961903 -- Fixed problems with kld and outputing coalesced sections. The code in - output_section() in sections.c to call scatter_copy() was #ifndef RLD so it - was not there. If'def this back in and the neede parts of scatter_copy() - for RLD. Radar bug #3959886. -- Changed layout.c to remove multiply defined warnings by adding #undef's for - MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT after including - . - -Changes for the 5.17 release (the cctools-563 release): -- Fixed some problems with regard to relocation entries refering to private - extern common symbols. Radar bug #3928792. - - Changed the test for external relocation entries to being for undefined - symbols from checking n_type equal to (N_EXT | N_UNDF) to testing for - N_EXT and the N_TYPE bits equal to N_UNDF in the *_reloc() routines. - Changes made in: - ppc_reloc() in ppc_reloc.c - generic_reloc() in generic_reloc.c - hppa_reloc() in hppa_reloc.c - i860_reloc() in i860_reloc.c - m88k_reloc() in m88k_reloc.c - sparc_reloc() in sparc_reloc.c - - Changed creating and setting the undefined map for symbols from the n_type - equal to (N_EXT | N_UNDF) to testing for N_EXT and the N_TYPE bits equal to - N_UNDF in merge_symbols() in symbols.c (3 places). The first place is the - test before incrementing the object_undefineds variable. The place is the - test before incrementing cur_obj->nprivatesym and nmerged_private_symbols. - The third place is the test before setting the undefined map's, - cur_obj->undefined_maps[], values. - - Changed the test for a merged undefined symbol in merge_symbols() in - symbols.c when checking for an undefined or common from n_type equal to - (N_EXT | N_UNDF) to testing the N_TYPE bits equal to N_UNDF. - - Changed the test for a merged undefined symbol in command_line_indr_symbol() - in symbols.c from the n_type equal to (N_EXT | N_UNDF) to testing the - N_TYPE bits equal to N_UNDF. - - Changed the test for common symbols when merging them in merge_symbols() in - symbols.c from testing n_type equal to (N_EXT | N_UNDF) to testing for - N_EXT and the N_TYPE bits equal to N_UNDF (2 places). The first place is - the test to see if the object's symbol is a common. The second place is - the test of the merged symbol being a common or undefined. - - Changed in merge_symbols() in symbols.c where the larger of the commons are - used, to also "use" the N_PEXT bit from the larger symbol. Also if the same - common from different object has different N_PEXT bits a warning is issued - and the symbols are traced. - - Changed checking for common symbols in define_common_symbols() in symbols.c - from the n_type equal to (N_EXT | N_UNDF) to testing for N_EXT and the - N_TYPE bits equal to N_UNDF (2 places). The first place is in the loop that - is checking if any commons exist. The second place in the in the loop that - defines the commons. - - Also in define_common_symbols() in symbols.c, in the loop that defined the - commons and sets the new n_type, changed that to save the N_PEXT bit of - the merged symbol. - - Changed the check for a defined private extern symbol in - output_merged_symbols() in symbols.c from just checking the N_PEXT bit to - also checking that the N_TYPE != N_UNDF so that symbols that are still - common symbols and private extern are not treated as defined symbols. - So to not clear the N_EXT bit of private extern symbols that are still - common symbols. - - Changed the check for undefined symbols in assign_output_symbol_indexes() - in symbols.c from tesing if the n_type is (N_EXT | N_UNDF) or - (N_EXT | N_PBUD) to testing for N_EXT and the N_TYPE equal to N_UNDF or - N_PBUD so that private extern commons will be treated and undefined symbols - (in two places). The first place, in the loop where the undefined symbols - are counted. And the second place in the loop where the arrays of symbols - are filled in. -- Changed output_merged_symbols() in symbols.c to set the new MH_WEAK_DEFINES - bit in the mach_header if there are any defined external symbol that are - weak defintions. Also now set the new N_REF_TO_WEAK bit is the symbol table - entry if the symbol is a referencing an undefined symbol that is a weak symbol - and set the the new MH_BINDS_TO_WEAK bit in the mach_header. Radar bug - #3799069. -- Changed layout.c to remove multiply defined warnings by adding #undef's for - MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT after including - . - -Changes for the 5.17 release (the cctools-561 release): -- Changed main() in ld.c to use MACOSX_DEPLOYMENT_VERSION >= 10.4 instead of - the environment variable LD_PREBIND_SPLITSEGS_ONLY to turn off prebinding for - non-split libraries. This is the second phase of the change to Radar bug - #3855581. That bug is cloned as Radar bug #3924730 for this change. - -Changes for the 5.17 release (the cctools-559 release): -- Changed libkld.a to link with the new libstuff_kld.a and libmacho_kld.a built - for the kernel's kld use. Radar bug #3906133. - -Changes for the 5.17 release (the cctools-557 release): -- Removed support for the INTERIM_PPC64. The changes were to remove the - #ifdef INTERIM_PPC64 source changes in sections.c, ppc_reloc.c, layout.c and - indirect_sections.c as well as removing the -DINTERIM_PPC64 in the - Makefile. Radar bug #3600419. - -Changes for the 5.17 release (the cctools-556 release): -- Changed the way an MH_DYLINKER output file is laid out so that the headers - are on their own page or pages. This allows the first address of the first - section to remain semi-constant. The change was in layout_segments() in - layout.c to treat MH_DYLINKER outputs much like MH_FVMLIB. Radar bug #3893651. -- Added the -syslibroot option as another way to specifiy NEXT_ROOT. - The change was in ld.c . Radar bug #3886145. - -Changes for the 5.17 release (the cctools-555 release): -- Fixed a problem with the fix below in that the new routine - pass2_nsect_merged_symbol_section_type() in sections.c is needed to not be - ifdef'ed out for RLD. Radar bug #3894721. - -Changes for the 5.17 release (the cctools-554 release): -- Fixed a bug in legal_reference() in indirect_sections.c that cause it to not - correctly catch an illegal reference to a weak coalesced symbol that was - used directly. The problem was when the reference was made from a .o file - to a weak coalesced symbol in that .o file, but the weak coalesced symbol - in that .o file was discarded and the symbol was being used from a different - .o file. The code was trying to figure out what type of section was being - referenced for a merged symbol from the merged symbol's n_sect value. This - routine is used in both the first and second passes. In the second pass the - merged symbol's n_sect was incorrectly being use as an index into the input - .o file's section map. But that was wrong as the merged symbol's n_sect is - the section number in the output file in the second pass. To fix this a new - routine pass2_nsect_merged_symbol_section_type() was added to sections.c to - correctly get the section type of the N_SECT merged symbol in the output. - And to know when the merged symbols have been relocated to second pass values, - the new boolean variable merged_symbols_relocated was added to symbols.[ch] - and set to TRUE in layout_merged_symbols() in symbols.c . Radar bug #3884596. - -Changes for the 5.17 release (the cctools-553 release): -- Added a bunch of logic and features when LD_PREBIND_SPLITSEGS_ONLY is set. - This is in main() in ld.c . Radar bug #3875865. - - Added logic for LD_UNPREBOUND_LIBRARIES file with a list of files not to - be prebound when LD_PREBIND_SPLITSEGS_ONLY is set. - - Added logic for LD_SPLITSEGS_NEW_LIBRARIES to force libraries not listed - in the seg addr table and not in the LD_UNPREBOUND_LIBRARIES file to be - built split. - -Changes for the 5.17 release (the cctools-552 release): -- Changed ld(1) to write its messages to stderr when in UNIX standard - conformance mode (the default) and stdout otherwise. The change was in the - vprint() routine in ld.c . Radar bug #3762151. -- Changed ld(1) to not write over a non-writeable file when in UNIX standard - conformance mode (the default) and produce an error instead. The change was - in pass2() in pass2.c call the new libstuff routine get_unix_standard_mode() - and if TRUE call access(2) to see if the file exists and if not writeable - generate an error. Radar bug #3762029. -- Changed pass2() in pass2.c to not turn on only execute bits allowed by the - umask(2) call. Radar bug #3761943. - -Changes for the 5.17 release (the cctools-551 release): -- Changed lookup_symbol() in symbols.c to reduce the number of failed strcmp()'s - by comparing the name size first. Radar bug #3836837. - - Added the name_len field to the merged_symbol struct in symbols.h . - - Changed hash_string() in hash_string.h to take an extra pointer to return - the size of the string being hashed if not passed as NULL. Then changed - the callers of hash_string() in symbols.c, sections.c and - cstring_literals.c . - - Changed enter_string() in symbols.c to also take an extra pointer to return - the size of the string being entered if not passed as NULL. Then changed - the callers of enter_string() in symbols.c . - - Changed lookup_symbol() in symbols.c to first test the size of the name_len - before doing the strcmp(). - - Changed enter_symbol()'s call to enter_string() to pass the address of the - new name_len field to the merged_symbol struct so it is set. -- Changed indirect_section_merge() in indirect_sections.c to always set the - indirect_defined field of a fine_reloc for a symbol in a coalesced sections - to TRUE if the output filetype is MH_DYLINKER. Radar bug #3863439. - -Changes for the 5.17 release (the cctools-549 release): -- Changed main() in ld.c to turn off prebinding for non-split libraries if - the environment variable LD_PREBIND_SPLITSEGS_ONLY is set. Radar bug #3855581. -- Changed discard_local_symbols_for_section() in symbols.c to change N_SO stabs - that are kept but in a block that is not in the output to have an n_value of - zero and an n_sect of NO_SECT. This is needed to make the debugger work with - files linked with -dead_strip. Radar bug #3854890. - -Changes for the 5.17 release (the cctools-538 release): -- When -arch ppc64 is seen on the command line, invoke /usr/bin/ld64 - instead and pass all the arguments to it verbatim. Radar bug #3823359. - -Changes for the 5.17 release (the cctools-537 release): -- Changed check_cur_obj() in pass1.c to ignore MH_MAGIC_64 with - -no_arch_warnings. Radar bug #3815344. - -Changes for the 5.17 release (the cctools-533 release): -- When indirect libraries are removed from dynamic_libs list, a count is kept of - how many were removed. This is later used when computing the header padding - to use. Radar bug #3784597. - -Changes for the 5.16 release (the cctools-528.5 release): -- Fixed a crash in process_undefineds() in symbols.c when the -Y flag is used - that is caused by the change to 3737622 to not search indirect dylibs. This - change causes the cur_obj->undefined_maps[] not to be set up up in for - indirect dylibs. The patch is to test to make sure the merged_symbol in the - map is not NULL before using it. Radar bug #3797052. -- Changed discard_local_symbols_for_section() in symbols.c to always keep N_SO - stabs if they are in a block that is not in the output. This is needed to - make the debugger work with file linked with -dead_strip. Radar bug #3739451. - -Changes for the 5.16 release (the cctools-528.4 release): -- Added -I flags for building the static libkld to include PrivateHeaders - because of the changes made in the Tiger kernel header file layout. Radar bug - #3782212. - -Changes for the 5.16 release (the cctools-528.3 release): -- Don't search indirect libraries when linking two-level. Radar bug #3737622. - - In search_dynamic_libs() in pass1.c after the library ordinals for libraries - are set up, a loop was added to remove some dynamic libraries from the - dynamic_libs list. The logic that triggers this seems flawed in cases - involving linking against flat-namespace libraries or the use of - -force_flat_namespace. The loop removes indirectly referenced dylibs. - - Also in search_dynamic_libs() in pass1.c in the case of searching an - MH_DYLIB on the dynamic_libs list, when looping through the dylib's - sub_images a test is made to see of the sub_image dylib does not have - a library_ordinal assigned to it, and if not it is not searched. - - In merge_dylib_module_symbols() in symbols.c, in the second loop where - the symbols referenced by a dylib module are merged as undefined references, - code was added when resolving a two-level reference from a dylib such that - if the dependent_image does not have an library ordinal it is skipped. And - that undefined symbol will not be searched for. - -Changes for the 5.16 release (the cctools-528.2 release): -- Let kld accept duplicate symbols silently if they are absolute and - have the same value. Radar bug #3633627. - -Changes for the 5.16 release (the cctools-528 release): -- Support the new GENERIC_RELOC_LOCAL_SECTDIFF reloc. Radar bug #3744821. - -Changes for the 5.16 release (the cctools-527 release): -- Support the new PPC_RELOC_LOCAL_SECTDIFF reloc. Radar bug #3744821. - -Changes for the 5.16 release (the cctools-526 release): -- Fixed two error messages in ld.c where it used "-flatname_space" not - "-flat_namespace". Radar bug #3743186. -- Fixed warnings for the changes in mach-o headers for types changing from - unsigned long to uint32_t and from long to int32_t. Radar bug #3744082. - - Changed a number of uses of "%lu" to "%u" and "%ld to "%d" in pass1.c, - sections.c, cstring_literals.c, symbols.c, fvmlibs.c, layout.c, - 4byte_literals.c, 8byte_literals.c and literal_pointers.c . - -Changes for the 5.16 release (the cctools-525 release): -- Sped up clear_read_only_reloc_flags() in symbols.c in the normal case. Radar - bug #3728427. - - Added static enum bool some_read_only_reloc_flags_set to symbols.c . - - In flag_read_only_reloc() in symbols.c some_read_only_reloc_flags_set is - set to TRUE if any merged_symbol's field flagged_read_only_reloc is set - to TRUE. - - In clear_read_only_reloc_flags() in symbols.c added code to test - some_read_only_reloc_flags_set. If not set then it returns. If set it - does its normal work then clears some_read_only_reloc_flags_set. - -Changes for the 5.16 release (the cctools-524 release): -- Made work around fixes to the problem with the 24-bit r_address field of a - scattered relocation entry overflowing when used in a binary for dyld. Radar - bug #3451378. - - Changed the relocation routines: - ppc_reloc() in ppc_reloc.c - generic_reloc() in generic_reloc.c - hppa_reloc() in hppa_reloc.c - m88k_reloc() in m88k_reloc.c - sparc_reloc() in sparc_reloc.c - when output_for_dyld is TRUE to not create a scattered relocation entry for - external relocation entries with a non-zero offset and to change scattered - relocation entries into local relocation entries. - - Changed layout() in layout.c to call the new static routine - check_for_lazy_pointer_relocs_too_far() which checks to see that the lazy - pointer's will not be too far away to overflow the the 24-bit r_address - field of a scattered relocation entry. If so then prebinding is disabled. - -Changes for the 5.16 release (the cctools-520 release): -- Fixed a bug in the handling of PPC_RELOC_JBSR's when the output is a - multi-module MH_DYLIB. The code in ppc_reloc() was avoiding relocating the - branch to the true target in this case when it should have. Radar bug - #3545578. -- Added the -v flag to print the version like as(1) does. The Makefile - changed how it creates ld_vers.c and ld.c had code added to it to handle the - -v flag with and without other flags. Radar bug #3557760. -- Changed the reference to kmodload(8) in rld.c to kextload(8). Radar bug - #3633604. -- Fixed a bug when -dead_strip was used and there were static symbols in - indirect sections that was causing all of these symbols to be stripped. - The fix was in indirect_section_merge() at the end of the routine to add - a conditional around the call to discard_local_symbols_for_section() so that - it is called when -dead_strip is specified on the second pass when redo_live - is true. Radar bug #3669400. -- Changed it so that lines in an order file starting with '#' are ignored. - The change was in layout_ordered_section() in sections.c to add check for - the line starting with '#' and to skip that line. Radar bug #3360823. -- Changed it so that when an order file is used the unordered symbols are placed - in what would have been the natural link order. The change was in - layout_ordered_section() in sections.c to move the sort of the load_order - structure based on the input_offset up from where it was done only - when -dead_strip. Radar bug #3382272. -- Fixed a bug when -x was used on a bundle that had a symbol stub for a private - coalesced symbol. The symbol stub should have been removed but was not, but - the symbol was removed resulting in the indirect table entry for the stub - being for symbol index zero which was wrong. The fix was in - indirect_section_merge() in indirect_sections.c to add a test for - filetype == MH_BUNDLE so fine_relocs[i].indirect_defined will get set to TRUE - and cause the stub to be correctly removed. Radar bug #3464004. -- Removed the warning when -dead_strip is used about objects not being compiled - with -gfull. As the assumption that the only way this could happen was if it - was compiled with -gused was incorrect. The change was in - remove_dead_N_GSYM_stabs_for_cur_obj() in symbols.c . Radar bug #3663248. -- Fixed a bug when the -s flag was used and a symbol is stripped that is also - used in an indirect entry. In this case the indirect entry was not being - set to INDIRECT_SYMBOL_LOCAL as it should be. The fix is in - assign_output_symbol_indexes() in symbols.c to assign the - merged_symbol->output_index to INDIRECT_SYMBOL_LOCAL for stripped symbols. - So later when output_indirect_symbols() in indirect_sections.c calls - merged_symbol_output_index() it will get INDIRECT_SYMBOL_LOCAL. Radar bug - #3534709. -- Removed the following warning message: - warning("table of contents of library: %s not sorted slower link " - "editing will result (use the ranlib(1) -s option)", - file_name); - from pass1_archive() in pass1.c to allow multiple archive members with the - same coalesced symbol to be placed in the table of contents without getting - a warning. Radar bug #3653845. - -Changes for the 5.16 release (the cctools-513 release): -- Changed layout_segments() in layout.c and moved the declarations of some local - variables with #ifdef's for SA_RLD and RLD to the top of the routine so that - it will compile with older compilers. - -Changes for the 5.16 release (the cctools-512 release): -- Fixed a bug when -dead_strip was used when the output was specified as - -preload and referenced a link editor defined symbol. The code in - mark_globals_live() in symbols.c was crashing as the section_maps were not yet - set up for the link editor defined preload symbols when it was called. The - fix was in define_link_editor_preload_symbols() in symbols.c to change two - tests of the boolean parameter setup from testing for FALSE to TRUE to cause - the section_maps and sections to be allocated when the symbols are set up - rather than waiting for them to be defined. Radar bug #3649317. -- Fixed a bug that was causing the internal error: - output_section() count of external relocation entries does not match - when a undefined reference from a coalesced section turned out to be a global - coalesced symbol defined in another .o file. The code in - coalesced_section_merge() in coalesced_sections.c that was counting the - relocation entries needed to have code to set force_extern_reloc when it found - an external relocation entry that was defined as a global coalesced symbol - in another .o file. Radar bug #3644011. -- Removed this debugging code that was left in output_dylib_tables() in - symbols.c: - if(mod->iinit_iterm != 0) - printf("got it\n"); - Radar bug #3643349. -- Fixed a bug when -dead_strip or -sectorder is used on an object file that has - more than one section with the same name. This resulted in an internal error - when fine_reloc_for_input_offset() was called with a section_map where the - nfine_relocs was zero when counting relocation entries. This can't be handled - in the code in layout_ordered_section() in sections.c so a test to check for - an object that has more than one section with the same name was added to cause - an error. Also a check for errors != 0 was added to layout_ordered_sections() - in sections.c and it returns in that case. Radar bug #3643111. -- Fixed a bug when -dead_strip and -s was used that did not correctly count - number of undefined symbols and cause the internal error: more than one block - in final list. The fix was in assign_output_symbol_indexes() in symbols.c - that needed for undefined symbol to check to see if -dead_strip was specified - and the symbol was not live, and if so increment nstripped_merged_symbols. - Radar bug #3639490. - -Changes for the 5.16 release (the cctools-511 release): -- Fixed a bug that did not get the internal alignment correct for fine reloc - blocks. This showed up with compiler generated altivec constants who bytes - get associated with the previous symbol since they have an assembler temporary - label. The fix is to align fine reloc blocks on the modulus of the alignment - of the input offset. To do this the new static routine align_to_input_mod() - was added to sections.c . And it is used instead of just rounding the - next output offset the section alignment. It is now called in two places in - layout_ordered_section() in sections.c and one place in resize_live_section() - in sections.c. Radar bug #3625632. - -Changes for the 5.16 release (the cctools-509 release): -- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 - file format. And added -DINTERIM_PPC64 to the Makefile. -- Changed layout_segments() in layout.c where it created a PPC_THREAD when the - arch_flag.cputype == CPU_TYPE_POWERPC64 to simply add a conditional when - creating a ppc thread for CPU_TYPE_POWERPC and CPU_TYPE_VEO instead of - copying the code. - -Changes for the 5.16 release (the cctools-507 release): -- Fixed a bug in qsort_load_order_input_offset() in sections.c that caused - -dead_strip when used on objects that have more than one symbol at the same - address to not copy out the sections contents to the correct offsets in the - output file. Radar bug #3625582. - -Changes for the 5.16 release (the cctools-506 release): -- Fixed a bug in get_fine_reloc_for_merged_symbol() in sections.c if their are - more than one merged_symbol at the same address it could return the wrong - fine_reloc. The fix was to check the merge_symbol field of the fine_reloc - that the binary search in fine_reloc_for_input_offset() found. And if it is - not the same then do a linear search for the fine_reloc looking for the - merge_symbol. Radar bug #3625582. - -Changes for the 5.16 release (the cctools-505 release): -- Fixed a bug in ref_operation() in sections.c when the operation was - SEARCH_FOR_LIVE and the ref_type was LIVE_REF_SYMBOL and the merged symbol - was not live. In this case the call to walk_references() was passed the - wrong object_file struct pointer. It was being passed obj not - ref->merged_symbol->definition_object. Radar bug #3625527. -- Fixed a bug in walk_references() in sections.c when it tried to mark the - indirect symbol live. The crash was caused for fine_relocs for - INDIRECT_SYMBOL_LOCAL and INDIRECT_SYMBOL_ABS indirect symbols. This code was - not correctly tracking references through indirect sections. Radar bug - #3625527. This was fixed by the following: - - Added the field indirect_symbol_local to the fine_reloc struct in objects.h. - - In indirect_section_merge() in indirect_sections.c when creating a - fine_reloc for INDIRECT_SYMBOL_LOCAL and INDIRECT_SYMBOL_ABS if it is - INDIRECT_SYMBOL_LOCAL then indirect_symbol_local is set to TRUE. - - Added the new routine indirect_live_ref() to indirect_sections.[ch] to - return a live_ref for a fine_reloc, section map, and object file. This is - used by walk_references() in sections.c to track a reference through an - indirect section. - - Changed the code in walk_references() in sections.c to now use the new - routine indirect_live_ref() in indirect_sections.c to track a reference - through an indirect section. - -Changes for the 5.16 release (the cctools-504 release): -- Added code in main() in ld.c to set -dead_strip when -dylib is used when the - environment variable LD_DEAD_STRIP_DYLIB is set to aid in testing. - -Changes for the 5.16 release (the cctools-503 release): -- Fixed problems with the kld code not having the dead code stripping code - ifdef'ed out and causing undefined symbol errors. The function - is_literal_output_offset_live() was being called from the *_reset_live() - routines. Also the variables ninit and nterm were being used in - mod_section_reset_live() in mod_sections.c. The bodies of the *_reset_live() - routines and the *_order() routines were ifndef'ed RLD. These changes were - made in 4byte_literals.c, 8byte_literals.c, cstring_literals.c, - literal_pointers.c and mod_sections.c . Radar bug #3625471. - -Changes for the 5.16 release (the cctools-502 release): -- Fixed a bug in mod_section_reset_live() in mod_sections.c where it was not - setting the counts inits and terms back to zero. -- Fixed a problem where output_dylib_tables() in symbols.c was setting the - module table fields which are indexes into the symbol table to values larger - then the number of symbols when -dead_strip was specified for fields that - an zero counts. Tools like strip(1) detected this as an error. The fix is - to set the indexes to zero when the count is zero. -- Fixed a bug where a -sectorder file for a section with the - S_ATTR_NO_DEAD_STRIP attribute when -dead_strip is specified was ignored. - The fix was in layout_ordered_section() in section.c when it goes to create - the fine relocation entries it need a test for ms->order_filename == NULL - if it was going to create just one fine reloc for the section. -- Fixed a bug where the load map for zerofill symbols was not printing which - symbols were dead stripped. The fix was in print_load_map() in layout.c - where the loop for zerofill sections needed the same code for content - sections with reguard to testing dead_strip and the live field of the - fine_reloc and print "(dead stripped)" as needed. -- Fixed a bug where common symbols would not be stripped when no -sectorder - file was used and when the flag MH_SUBSECTIONS_VIA_SYMBOLS was introduced - in cctools-501. The fixes are in define_common_symbols() in symbols.c . - - In the first loop to determine if commons exist where the number of symbols - the size of the strings are when there is a sectorder file this is also - now done when dead_strip == TRUE. - - Where a symbol table and string table are created when there is a sectorder - file, it is also created when dead_strip == TRUE. - - When creating the link_edit_common_object file it is now created with - a mach_header and the flags have the MH_SUBSECTIONS_VIA_SYMBOLS bit set. - - Where the entries in the symbol table and string table are set when - there is a sectorder file, they are also set when dead_strip == TRUE. -- Fixed the error handling when the *_reloc() routines produce an error when - called via the live marking pass. - - Added a check of error != 0 in walk_references() in sections.c after it - calls a *_reloc() routine and returns if error is non-zero. - - Added a check of error != 0 in walk_references_in_section() in sections.c - after it calls walk_references() and returns if error is non-zero. - - Added checks of error != 0 in live_marking() in sections.c after each call - to walk_references_in_section() and return if error is non-zero. - - Added a check of error != 0 in layout() in layout.c after live_marking() - is called and returns if error is non-zero. -- Added support -dead_strip with i386 and m68k architecures. - - In walk_references() in sections.c the code to test for arch_flag.cputype - was changed to call generic_reloc() for CPU_TYPE_I386 and CPU_TYPE_MC680x0 - and not print a fatal error that -dead_strip is not supported for that - architecure. - - Because walk_references() in sections.c needs to directly use the - relocation entries when calling the *_reloc() routines and they need to - be swapped if needed. So to only swap them once in the places they are - needed a new boolean field, input_relocs_already_swapped, was added to the - section_map struct in objects.h. Then code was added to test this field - and swap the relocs if not already swapped in: - walk_references(), count_relocs() and output_section() in sections.c, - coalesced_section_merge() in coalesced_section.c, - indirect_section_merge() in indirect_sections.c, - literal_pointer_merge() in literal_pointers.c and - mod_section_merge() in mod_sections.c . - - Changed generic_reloc() in generic_reloc.[ch] to take the additional - parameters refs and reloc_index. And added code to set the refs when not - NULL. - - Changed the other callers of generic_reloc() to pass NULL and 0 for the - the two new parameters in count_relocs() and output_section() in sections.c. -- Fixed problems with -dead_strip and -prebind where it was failing to get - the relocation entries correct for prebound lazy pointers. - - In reloc_output_for_dyld() in sections.c the code that was calling - fine_reloc_offset_in_output() when dead_strip was TRUE was removed. - The setting of the boolean partial_section was changed so it is now set when - dead_strip == TRUE so the later call to - fine_reloc_offset_in_output_for_output_offset() will occur and - correctly ignored relocation entries that are not in the output. - - The code in fine_reloc_offset_in_output_for_output_offset() in objects.c was - changed to not check the section type since it is now called from - from reloc_output_for_dyld() in sections.c when dead_strip == TRUE for - all section types. - - The code in fine_reloc_output_offset() in objects.c was changed so that - when dead_strip == TRUE and fine_reloc->live == FALSE it returns an address - that is past the end of the section. This is so - fine_reloc_offset_in_output_for_output_offset() can be called from - reloc_output_for_dyld() when dead_strip == TRUE and figure out this reloc - is not in the output. - - In fine_reloc_offset_in_output() in objects.c added a needed check for - fine_reloc->use_contents == FALSE after in the case of dead_strip == TRUE. - Since it is possible for an indirect entry to be marked live via the - live code marking pass and use_contents == FALSE. - - Added the debugging routine print_fine_relocs() to objects.[ch] . -- Fixed it so that the warning message in - create_load_symbol_hash_table_for_object() about "symbol appears more than - once in the same file" is not generated when -dead_strip is specified without - the -sectorder option. The change was to pass a pointer to the merged_section - struct through from layout_ordered_section() to - create_load_symbol_hash_table() and then to - create_load_symbol_hash_table_for_object() in sections.c so that the warning - message is only created if ms->order_filename is not NULL. - -Changes for the 5.16 release (the cctools-501 release): -- Fixed it so that if a .section_all is specified in an order file and - -dead_strip is specified, only one fine_reloc is created for that object and - if anything in that fine_reloc is live it makes all the symbols in that - fine reloc live. This is also done if the object is not marked with the new - MH_SUBSECTIONS_VIA_SYMBOLS bit in the mach_header. Radar bug #2284500. - - Added the order field to the section_map stucture in objects.h to hold - the order of sections in objects with no_load_order == TRUE, .section_all - orders in the order file. - - Added code in layout_ordered_section() in sections.c when it parse out an - order line that contains a .section_all it sets the new order field in the - section_map stucture to the current order and then increments the current - order being assigned. - - Changed the conditonal in the code in the middle of layout_ordered_section() - when it forces no_load_order to TRUE. So now it does that if a .section_all - for the object was specified or the no dead strip attribute is on the - section and -dead_strip was specified. It also now does this when the new - MH_SUBSECTIONS_VIA_SYMBOLS bit in the mach_header is not set. - - Then in this conditonal if the new order field in the section_map stucture - is not set, it sets it and increments the current order being assigned. - - The code to create the single load_order was moved to the end of the loop. - - At the end of this loop if the no_load_order field in the section map is - TRUE and we are creating a load map or dead stripping then it creates a - single load_order. And sets the values in the single load_order, it now - sets the order field of the load_order struct from the new order field of - the section_map struct. - - In count_live_symbols() in symbols.c added code to check symbols that are - not live to see if they are in a fine_reloc that is live. And if so force - them to be live. - - Added the variable some_non_subsection_via_symbols_objects to sections.[ch] - as a boolean to indicate if any linked in object does not have the - new MH_SUBSECTIONS_VIA_SYMBOLS bit in the mach_header. - - In layout_segments() in layout.c added code to test the variable - some_non_subsection_via_symbols_objects and if FALSE to or in the - new MH_SUBSECTIONS_VIA_SYMBOLS bit in the output mach_header. -- Fixed a bug in live_marking() in sections.c that did not mark the - merged_symbol for the entry point live when no -e was specified. -- Added code in main() in ld.c to set the dead_strip if the environment variable - LD_DEAD_STRIP is set and no_dead_strip_inits_and_terms if - LD_NO_DEAD_STRIP_INITS_AND_TERMS is set to aid testing. - -Changes for the 5.16 release (the cctools-500 release): -- Added the -dead_strip option. Radar bug #2284500. - - Added the boolean private_extern variable dead_strip to ld.[ch] and code to - main() to parse out -dead_strip and set dead_strip to TRUE. - - Added a check to make sure -r was not being used with -dead_strip and - generate an error message. - - Added a warning to suggest the use of -dead_strip instead of - "-undefined define_a_way". - - Added the live field to the fine_reloc struct in objects.h and - changed input_offset to an unsigned long and not part of the bit fields. - - Added the live field to the merged_symbol struct in symbols.h and - changed output_index to an unsigned long and not part of the bit fields. - - Changed layout_ordered_sections() in sections.c to always call - layout_ordered_section() if -dead_strip is specified so that fine_relocs - are created. Also changed it so that the summary warnings for - specifications are only printed if there was an order file since this can - now be called without one. - - Changed layout_ordered_section() in sections.c when -dead_strip is specified - to not treat any object that had no orders as if it had a .section_all so - that fine_relocs for all blocks get created. Two tests of dead_strip were - added to handle this. In the first case the load_orders are re-sorted by - input_offset so it is less likely to break assembly code by reording the - blocks by symbol name. - - Added the index field to the struct load_order in objects.h to record the - symbol index of the symbol in layout_ordered_section(). So later if it is - external the merged symbol can be looked up and the merged_symbol field of - the file_reloc can be set. This is needed so later ref_operation() can mark - the merged symbol live if referenced via a local relocation entry. Which - is needed to know to keep the symbol. - - As part of the setting of the merged_symbol field of the file_reloc above - a test for the start_section symbol is needed. So the new field - start_section was added to the section_map in objects.h and is set in - layout_ordered_section() so it can be used later. - - Changed flush_scatter_copied_sections() to also check dead_strip == TRUE - as well as if the section has an order file so that output_flush() gets - called. - - Changed all places that a pointer to a merged_symbol was stored in the - output_offset field of a fine_reloc struct and now store it in the - merged_symbol field. In cctools-312 for Radar bug #2417690 the - merged_symbol field was added to the fine_reloc struct so that for non-lazy - symbol pointers both the output_offset and merged_symbol can be stored (see - notes for cctools-312 and Radar bug #2417690 for details). - - Changed 2 places in coalesced_section_merge() in coalesced_sections.c . - - In one place in indirect_section_merge() in indirect_sections.c removed - the store of merged_symbol into output_offset. - - Changed 1 place in legal_reference() in indirect_sections.c . - - Changed 3 places in fine_reloc_output_address() in objects.c . - - Changed 1 place in fine_reloc_output_sectnum() in objects.c . - - Changed mod_sections.[ch] and added a struct mod_term_data to be used to - set the output_offsets in the fine relocs that are now created in - mod_section_merge() when -dead_strip is specified. - - This is now allocated in create_merged_section() in sections.c . - - The new routine mod_section_free() was added to reset the output_offset - in this data. And a pointer to this functions is set in - create_merged_section() in sections.c . - - Changed flush_scatter_copied_sections() to allow call output_flush() - when dead_strip == TRUE and it is a mod init or term section. - - Added a call to the new routine, live_marking(), in layout() in layout.c - if dead_strip == TRUE just after the call to layout_ordered_sections(). - - Added the new routine, live_marking(), to sections.[ch] . - - it marks the initial live symbols: - - it marks the entry point and fine_reloc or the first non-zero sized - fine_reloc in the first content section. To do this the load_map - structures are needed. - - in layout_ordered_section() in sections.c the load maps are not - free()'ed and create_order_load_maps() is called when dead_strip - is TRUE. - - The new static routine get_fine_reloc_for_merged_symbol() was added - and is used here for getting the fine_reloc if the entry point was - specified by symbol name and for the -init symbol (see next item) - as well as ref_operation() (see below). - - it marks the -init symbol for MH_DYLIB outputs. - - it calls the new routine mark_globals_live() added to symbols.[ch] - to mark the exported and no_dead_strip symbols live. - - it calls the new routine mark_N_NO_DEAD_STRIP_local_symbols_live() - added to symbols.[ch] to mark the fine_relocs for no_dead_strip local - symbols live. - - mark_N_NO_DEAD_STRIP_local_symbols_live() loops over the merged - sections and calls - mark_N_NO_DEAD_STRIP_local_symbols_in_section_live() for each merged - section. - - mark_N_NO_DEAD_STRIP_local_symbols_in_section_live() loops over - the objects and if it contains the merged section loops over the - local symbols looking for symbols defined in the section with the - N_NO_DEAD_STRIP bit set. And if set, gets the fine_reloc for it - and marked it live. - - it then loops over the merged sections and calls the new static - routine walk_references_in_section() with the operation MARK_LIVE to - cause the live fine relocs to get marked live. - - walk_references_in_section() with the operation MARK_LIVE looks for - live fine_relocs in the specified section and causes their references - to be marked live by calling the new static routine walk_references() - with the operation MARK_LIVE. - - walk_references() with the operation MARK_LIVE walks the relocation - enties of the passed fine_reloc marking its references live. It - calls the relocation routines passing it two new parameters, a - pointer to the new live_refs struct and the index of the relocation - entry. Then calls new static routine ref_operation() with the - operation MARK_LIVE to mark the reference live and cause its - reference's to be marked live. - - The new header file live_refs.h was added with the declaration - of the struct live_refs, live_ref, and the live_ref_type enum. - - Two new parameters to ppc_reloc() were added, refs and - reloc_index. If refs is not NULL then ppc_reloc() just fills - in the live_refs struct for the reloc_index. - - A test for refs == NULL was added in the if statement that was - checking if the merged_symbol was a coalesced symbol that is - using get_output_section() on the merged_symbol n_sect. This - is needed as the output_sectnum field is not set when this is - called to just get the references. - - The new routine fine_reloc_output_ref() was added to objects.c - to take an offset into a section and a section map and determine - what it will reference in the output and fill in a live_ref - struct. It handles symbols stubs and is like - fine_reloc_output_address() but get references. - - The new static routine ref_operation() with the operation - MARK_LIVE takes a live_ref struct and determines the fine_reloc - if any for it and marks it live. Then causes its reference's to - be marked live by recursively calling walk_references() with the - operation MARK_LIVE if needed. - - The new boolean field refs_marked_live was added to the - fine_reloc structure to indicate if the reference's have been - walked and marked live and is tested and set by ref_operation() - with the operation MARK_LIVE. - - The new static routine r_symbolnum_from_r_value() was added to - sections.c which is used by ref_operation() to help get the - fine_reloc from a live_ref which is a LIVE_REF_VALUE. - - Added the -no_dead_strip_inits_and_terms option. - - Added the boolean private_extern variable - no_dead_strip_inits_and_terms to ld.[ch] and code to - main() to parse it out and set the variable to TRUE. - - live_marking() then causes the needed mod init and term routines to be - marked live. When -no_dead_strip_inits_and_terms is set is marks all - of them live, if not this is done by looping over the merged sections and - calling the new static routine walk_references_in_section() for mod - init and term sections with the operation SEARCH_FOR_LIVE. - - walk_references_in_section() with the operation SEARCH_FOR_LIVE for - each fine_reloc calls the new routine walk_references() with the - operation SEARCH_FOR_LIVE to see it it touches something live. - If so marks it live and calls walk_references() with the MARK_LIVE - operation to get what it refererences marked live. - - The new boolean field searched_for_live_refs was added to the - fine_reloc structure to indicate if the reference's have been - walked and searched for live references it is tested and set by - the new routine walk_references() when the operation is - SEARCH_FOR_LIVE. - - walk_references() with the operation SEARCH_FOR_LIVE is passed a - fine_reloc searches for any referenced fine_reloc that is marked - live. If it finds one it returns TRUE else FALSE. - - live_marking() then causes the needed fine_reloc's in sections with the - live_support attribute to be marked live. This gets done my looping - over the merged sections for sections marked with the S_ATTR_LIVE_SUPPORT - section attribute and calling the new static routine - walk_references_in_section() with the operation CHECK_FOR_LIVE_TOUCH. - - This follows a similar path as above for SEARCH_FOR_LIVE through - walk_references_in_section(), walk_references() and ref_operation() - but only looks at the direct references for the fine_reloc. And if - a direct reference is live then it causes all references to be marked - live. - - the new routine, live_marking(), then does the bookkeeping to reset - the symbol counts, section sizes, relocation counts: - - The existing global varable, nstripped_merged_symbols, in symbols.c - is used to hold the count of dead symbols to be stripped. Then later - if assign_output_symbol_indexes() sets STRIP_DYNAMIC_EXECUTABLE it is - reset to zero and the counts of stripped symbol are again added up. - This works as any symbol that would be saved when both -dead_strip - and -s are used on a dynamic executable would be live since they - are REFERENCED_DYNAMICALLY. - - the new routine count_live_symbols() was added to symbols.[ch] and - called from layout(). When creating a multi-module dylib it - updates the number of reference and reference map counts and reassigns - the indexes in to the reference table. It also increments the new file - level static variable nstripped_merged_private_symbols for merged - private symbols that get stripped to be used later by - assign_output_symbol_indexes() to do its consistency check. - - The new static routine removed_dead_local_symbols_in_section() was - added to symbols.c and is called from count_live_symbols() to - call discard_local_symbols_for_section() for each object that - contains the merged section it is passed. - - Updated fine_reloc_offset_in_output() in objects.c to return at - fine_reloc->live when dead_strip == TRUE. - - Updated discard_local_symbols_for_section() in symbols.c to now - also scan forward when it sees a N_BNSYM that well be kept to the - next N_ENSYM so the stabs between them are kept. - - The new static routine remove_dead_N_GSYM_stabs() was added to - symbols.c and is called from count_live_symbols() to call another - new static routine remove_dead_N_GSYM_stabs_for_cur_obj() to get rid - of dead N_GSYM stabs. For common symbols this has to be done as they - are not defined or in a section and so they can't be bracked by - N_BNSYM/N_ENSYM stabs. - - The new routine resize_live_sections() was added to sections.[ch] - and called from layout() to do the bookkeeping to reset the section - sizes and relocation entry counts. - - The new field fine_reloc was added to the load_order struct in - objects.h to point to the fine_reloc that was created for it. This is - then set to the fine_reloc in layout_ordered_section() when - -dead_strip is specified. - - The new field load_order was added to the struct order_load_map in - sections.h to point to the fine_reloc that corresponds to it. This is - then set in create_order_load_maps() in sections.c which is always - called when -dead_strip is specified. - - The new static routine resize_live_section() was added to sections.c - to walk the load order map and resize each regular section and called - by resize_live_sections() for regular sections. - - The new field line_number was added to the load_order structure - defined in objects.h. And set to the line number the symbol was - specified on in the order file in layout_ordered_section() or left - as zero. Then in resize_live_sections() if the section had an order - file and the flag -sectorder_detail was specified and the symbol was - dead stripped a warning is issued if order_specified is non-zero. - - Changed the name of layout_relocs_for_dyld() to relayout_relocs() in - sections.[ch] . Changed the call to it in layout() so it is called - if output_for_dyld is TRUE or dead_strip is TRUE. - - After layout_relocs_for_dyld() has broken everything out a test of - the dead_strip flag for TRUE is made and if so a call - fine_reloc_offset_in_output() with the broken out r_address is done - to see if it will be in the output. If - fine_reloc_offset_in_output() returns FALSE the reloc is skiped. - - Changed count_relocs() in sections.c now that is also called when - dead_strip is specified: - - After it has broken everything out a test of the dead_strip flag for - TRUE is made and if so a call fine_reloc_offset_in_output() with - the broken out r_address is done to see if it will be in the output. - If fine_reloc_offset_in_output() returns FALSE the reloc is skiped. - - Right after the above a test for output_for_dyld == FALSE is done - and if so the reloc is counted based only on if the reloc is extern - and the symbol is defined. - - The routine merge_literal_sections() in sections.c was changed to take - a new parameter redo_live parameter. Then in the exisiting call from - layout() in layout.c it is pass as FALSE. Then it is called again after - resize_live_sections() in layout.c passed as TRUE to drive the - re-merging only live literals. When merge_literal_sections() is passed - redo_live as TRUE it calls the new (*literal_reset_live)() routines - instead of the (*ms->literal_order)() routines. It was also changed to - pass the redo_live parameter to the (*ms->literal_merge)() routines. - - Changes to the existing (*ms->literal_order)() routines were made to - support ordering when -dead_strip is specified. The routines were - changed as follows: - - cstring_order() in cstring_literals.c and - - literal4_order() in 4byte_literals.c and - - literal8_order() in 8byte_literals.c and - - In literal_pointer_order() in literal_pointers.c - These now allocates a new *_load_order_data struct when -dead_strip - is specified and the needed new struct *_order_line's. For - cstring_order() and literal_pointer_order() they do not free the - line buffer or the order file memory. These new structs are used in - *_reset_live() routines and the needed memory is cleaned up in - there. - - In literal_pointer_order() in literal_pointers.c the body of code - that parses out a literal pointer order line was broken out into a - static function literal_pointer_order_line() so it can be used both - by literal_pointer_order() and literal_pointer_reset_live(). - - The new routine is_literal_output_offset_live() in sections.[ch] was - added and used in the (*ms->literal_reset_live)() functions to - determine if a literal from an order file with a given output_offset - is live. - - The new field literal_reset_live as added to the merged_section - struct in sections.c as a pointer to the routine that resets the - literal section before only the live literals are re-merged. - - A new routine for the (*ms->literal_reset_live)() field was added - to the files that handle each type of literal and they do the - following: - - cstring_reset_live() added to cstring_literals.[ch] and - - literal4_reset_live() added to 4byte_literals.[ch] and - - literal8_reset_live() added to 8byte_literals.[ch] - They reset the section size back to zero and clear out the - previously merged data. Then if there is an order file it - re-merges the live literals and frees up the order data - structures. - - literal_pointer_reset_live() added to literal_pointers.[ch] and - - mod_section_reset_live() added to mod_sections.[ch] - Same as the new routines above but also resets the relocation - counts. - - indirect_section_reset_live() added to indirect_sections.[ch] - Same as the new routines above but also in additiona to reseting - the relocation counts it resets nindirectsyms. - - In create_merged_section() in sections.c the literal_reset_live - field is set to the above new routines. - - The new redo_live parameter was added to the (*ms->literal_merge)() - call in merge_literal_sections(). - - A new redo_live parameter was then added the existing literal merge - routines and updated to use it as follows: - - cstring_merge() in cstring_literals.[ch] and - - literal4_merge() in 4byte_literals.[ch] and - - literal8_merge() in 8byte_literals.[ch] and - - literal_pointer_merge() in literal_pointers.[ch] and - - mod_section_merge() in mod_sections.[ch] and - - indirect_section_merge() in indirect_sections.[ch] - - coalesced_section_merge() in coalesced_sections.[ch] - When redo_live == FALSE these merges items as it did before. - When redo_live == TRUE it uses the previouly allocated fine_relocs - and re-merges the items for fine_relocs that are live. - - The new boolean field global_coalesced_symbol was added to the - load_order struct in object.c. - - It is set and examined in coalesced_section_merge() now - instead of using the hack to store this information in the - order field. - - Changed scatter_copy() in sections.c to look at the "live" field if - -dead_strip specified. - - Removed the unused local variable prev_output_offset from - layout_ordered_section() in sections.c . - - Changed print_load_map() in layout.c to print "(dead stripped)" for symbols - that are not live when -dead_strip is specified. - - Changed print_load_map_for_objects() in layout.c to print "(dead stripped)" - for the output address of a fine_reloc block that is not live when - -dead_strip is specified. Also fixed it for indirect and coalesced sections - to print "(eliminated)" if the fine_reloc block is not used from that object - file. - - Changed layout() in layout.c after the call to process_undefineds() to add - a check of errors for non-zero and return. - - Changed process_undefineds() in symbols.c to ignore undefined symbols if - -dead_strip is specified and the undefined symbol is not live. - - Changed assign_output_symbol_indexes() to used the new file level static - variable nstripped_merged_private_symbols set by count_live_symbols() for - its consistency check of the number of local symbols it assigns indexes to. - Also changed the loop that counts the number of undefined symbols and - defined external symbols to skip symbols that are not live when -dead_strip - is specified. As well as the loop that fills the arrays in. And the loop - that assigns the symbol indexes to the private extern symbols if they are - turned into local symbols. - - Changed output_merged_symbols() in symbols.c so that the second loop to put - out private extern symbols that are turned into local symbols test that the - symbol is live when -dead_strip is specified. - - Changed output_merged_symbols() in symbols.c so that the three loops to put - symbols clear the N_NO_DEAD_STRIP bit if the output file is not a - relocatable object. - - Changed output_local_symbols() in symbols.c so that it clears the - N_NO_DEAD_STRIP bit if the output file is not a relocatable object and the - symbol is a non-stab N_SECT symbol. - - Changed output_dylib_tables() in symbols.c in putting out the reference - table in the single-module dylib case. In the loop over the merged symbols - to a test was added to check the symbol is live when -dead_strip is - specified. -- Fixed a bug in check_symbol() in symbols.c that was incorrectly causing an - error when a common symbol was also a private extern symbol as it was not - checking that the n_value field was also zero before causing the error for - undefined symbols. Radar bug #3518234. -- Fixed a bug in print_load_map() in layout.c that did not correctly limit the - segment name and section names to 16 characters when printed. -- Fixed a bug in layout_segments() in layout.c where it was causing a thread to - be created in bundle. -- Fixed a bug printing the load maps when some objects have no symbols in the - order file. In this case the code in layout_ordered_section() in section.c - creates just one fine_reloc for the whole section in the object. This is not - accounted for in the creation of the order_load_maps by - create_order_load_maps() in sections.c. To fix this layout_ordered_section() - when load_map == TRUE now free()'s the load_orders for these and allocates - just one load_order with a NULL symbol_name to represent this. The code in - create_order_load_maps() and print_load_map() in layout.c was changed to - handle the NULL symbol_name; -- Fixed a bug in merge_sections() in sections.c that was not correctly or'ing in - the SECTION_ATTRIBUTES from object's section into the merged section. Two - places were changed when dynamic == TRUE. - -Changes for the 5.16 release (the cctools-499.3 release): -- Make symbol reference checking in legal_reference() of indirect_symbols.c - understand that ppc64 indirect symbol table entries are 8 bytes. Radar bug - #3594978. - -Changes for the 5.16 release (the cctools-499.1 release): -- Added support for the ppc64 architecture, using the interim file format - for -static compiled objects only. Radar bug #3562133. - - Changed indirect_section_merge() in ld/indirect_sections.c so the stride - for symbol pointers is set 8 when arch_flag.cputype == CPU_TYPE_POWERPC64 - and 4 otherwise. Also changed the test of r_length in the relocation - entries to be 3 for CPU_TYPE_POWERPC64 and 2 otherwise. - - Changed layout_segments() in layout.c to create a PPC_THREAD when the - arch_flag.cputype == CPU_TYPE_POWERPC64 . - - Changed ppc_reloc() in ppc_reloc.c to include cases for r_length being 3 - and relocating the second long and setting the first long to zero. - - In output_section() in sections.c the conditional to call ppc_reloc() was - changed to include arch_flag.cputype == CPU_TYPE_POWERPC64. - -Changes for the 5.15 release (the cctools-499 release): -- Fixed a bug with linking .o files containing PPC_RELOC_JBSR relocation entries - in a coalesced section into a dynamic library. The code in - coalesced_section_merge() in coalesed_sections.c did not exclude these in the - output. Which resulted in a internal error in output_section() where the - count of local relocation did not match. Radar bug #3518096. - -Changes for the 5.14 release (the cctools-497 release): -- Fixed a bug with linking .o files containing PPC_RELOC_JBSR relocation entries - into a dynamic library. The code in count_relocs() and reloc_output_for_dyld() - in sections.c did not exclude these in the output. Which resulted in a read - only reloc error. Radar bug #3452964. - -Changes for the 5.14 release (the cctools-496 release): -- Change in a number of places in pass1.c that printed "Logging for Build & - Integration] Used static library" to print the realpath() name of the file - name. Radar bug #3443289. - -Changes for the 5.13 release (the cctools-495 release): -- Changed the header pad for prebound executables to be 3 times instead of 6 - times the size of the initial LC_PREBOUND_DYLIB commands. This change is in - layout_segments() in layout.c . Radar bug #3410151. - -Changes for the 5.13 release (the cctools-494 release): -- Changed the header pad for prebound executables to include 6 times the size - of the initial LC_PREBOUND_DYLIB commands. This change is in - layout_segments() in layout.c . Radar bug #3410151. - -Changes for the 5.13 release (the cctools-490 release): -- Fixed a bug in check_cur_obj() in pass1.c that was incorrectly causing the - output cpusubtype to be set when linking against a dylib or a bundle_loader - with a specific cpusubtype. Radar bug #3387962. - -Changes for the 5.13 release (the cctools-485 release): -- Fixed some bugs in the use of flags that force the weak linking of dynamic - libraries when an umbrella is force weak linked and their are only references - to symbols in its sub-frameworks. Two fixes were in setup_sub_images() in - pass1.c to check the force_weak_dylib of the umbrella library being set up and - if TRUE set force_weak_dylib in the sub-frameworks and sub-umbrellas. - The other fix was in output_headers() in pass2.c to test for the library - having force_weak_dylib set and then using LC_LOAD_WEAK_DYLIB even it no - symbols are referenced. Radar bug #3337262. - -Changes for the 5.13 release (the cctools-484 release): -- Fixed a bug in that was causing an error message when a -bundle_loader - executable had a __UNIXSTACK segment. The fix was in check_cur_obj() in - pass1.c where it needed to check for a segment name of SEG_UNIXSTACK and not - issue an error about the segment having no sections. Radar bug #3329902. - -Changes for the 5.13 release (the cctools-483 release): -- Fixed a bug in the handling of -lx when the string x contained a dot character - like -ltcl8.4 . In pass1() in pass1.c the code to parse out things like - -lcrt0.o used the same char * variable p as the code that follows it to then - parse out and search for the library. Because the string ended in a ".4" this - caused the broken logic to free the variable p when it was not malloc'ed - leading to a warning message printed by malloc(). Radar bug #3285575. - -Changes for the 5.13 release (the cctools-480 release): -- Changed zero_merged_sections_sizes() in sections.c (which is used only for - kld_load()) to also zero out the section alignment of existing sections. - Radar bug #3261751. - -Changes for the 5.13 release (the cctools-479 release): -- Added the -executable_path option where is is used to - replace @executable_path for dependent libraries. The change was in - open_dylib() in pass1.c as well in ld.[ch] . Radar bug #3278995. - -Changes for the 5.12 release (the cctools-477 release): -- Picked up changes to kld interfaces. Changes in rld.c and layout.c . - Radar bug #3270588. - -Changes for the 5.12 release (the cctools-473 release): -- Fixed a bug with the use of a modulus operator on a signed value which caused - a crash. The fix was to cast to unsigned long not long. The problem was in - lookup_indirect_item() in indirect_sections.c when it used the modulus - operator to come up with a hash value. Radar bug #3255992. - -Changes for the 5.12 release (the cctools-472 release): -- Moved the #ifndef RLD in output_local_symbols() in symbols.c down so that - the call to swap_nlist() is not ifdef'ed out. This allows cross building of - a kernel's symbol file with kld. Radar bug #3251273. - -Changes for the 5.12 release (the cctools-471 release): -- Backed out the change to call to _exit() in ld_exit() in ld.c in Radar bug - #3237013 as it does not flush the stdio buffers. Then changed the handler() - routine in ld.c used for signals to not call ld_exit() and instead unlink(2) - the output file if one was created and call _exit(1). Radar bug #3245341. -- Fixed a problem in the kld libraries where the code that was not ignoring the - alignment of non-regular non-zerofill sections from the base file. A missing - #ifdef KLD and test of the base file was needed on one more place in - merge_sections() in sections.c . Radar bug #3245534. - -Changes for the 5.12 release (the cctools-470 release): -- Changed the call to exit() in ld_exit() in ld.c to _exit as it was causing a - hang in dyld when used with signal handlers. Radar bug #3237013. -- Added the flag -search_paths_first to cause -lx flags to search each path - for .dylib then .a before searching next path. Radar bug #3176974. - - Added the enum bool variable search_paths_first to pass1.c and pass1.h and - code to parse out the option and set variable in main() in ld.c . - - The new static routines search_paths_for_lname() and search_path_for_lname() - were added to pass1.c . - - In pass1() in pass1.c a test of the new search_paths_first variable is done - and if TRUE then search_paths_for_lname() is called. - -Changes for the 5.12 release (the cctools-468 release): -- Added support to force a dynamic library to be marked weak in the output. - This can be done using these three flags: - -weak_framework Foo - -weak-lx - -weak_library library_filename - Radar bug #3069758. - - Added parsing out "-weak_framework", "-weak-lx"and "-weak_library" to - ld.c and calling pass1() with the force_weak parameter as TRUE. - - Added the new boolean parameter force_weak to pass1() in pass1.c and - pass1.h . Changed the existing calls to pass1() in ld.c to pass the new - boolean parameter force_weak as FALSE. - - Added the new boolean parameter force_weak to pass1_fat(), pass1_archive() - and pass1_object() in pass1.c . Propagated the passing of this new - parameter down through the calls. And passed it as FALSE in call to - pass1_fat() and pass1_object() from open_dylib(). - - Added the new boolean parameter force_weak to merge() in pass1.c . And - passed this as the parameter force_weak parameter or FALSE in the existing - calls. - - Added the new boolean parameter force_weak to merge_dylibs() in dylibs.c and - dylibs.h . After the call to add_dynamic_lib() the parameter force_weak is - set into the field force_weak_dylib in the dynamic_library struct. - - Added the boolean field force_weak_dylib to the dynamic_library structure - in pass1.h . - - Changed merge_dylib_module_symbols() in symbols.c to test the - force_weak_dylib field of the dynamic_library structure and if TRUE set the - N_WEAK_REF bit on the merged symbol to mark the symbol as a weak reference. - -Changes for the 5.12 release (the cctools-468 release): -- Added support for the new use of the previously unused value 3 for r_length - to mean that the conditional branch was predicted using the Y-bit and the - sign of the displacement and opcode. Radar bug #3223045. - - Changed ppc_reloc() in ppc_reloc.c to correctly flip the Y-bit for - PPC_RELOC_BR14 r_types with an r_length value of 3 for branch conditions - that are not branch always and the sign of the displacement is different - after relocation. -- Fixed a problem when linking against stub libraries that the dependencies of - the stub libraries were getting recored in the output file. This caused them - to have LC_LOAD_DYLIB load commands which inturn messed up the recorded - library ordinals. The fix is in merge_dylibs() in dylibs.c to add a check - that the object's file type was not MH_DYLIB_STUB. Radar bug #3220772. - -Changes for the 5.12 release (the cctools-467 release): -- Added support for the PPC_RELOC_LO14_SECTDIFF relocation type used with - double word load/store instructions. Radar bug #3218027. - - Changed ppc_reloc() in ppc_reloc.c treat a PPC_RELOC_LO14_SECTDIFF as it - other PowerPC section difference relocation entries and expect it to have - a pair. And added cases for PPC_RELOC_LO14_SECTDIFF to relocate it as it - would for PPC_RELOC_LO14. - -Changes for the 5.12 release (the cctools-466 release): -- Added the new treatment of "-undefined define_a_way" to define all undefined - symbols as private extern symbols. This is a temporary work around to not - having dead-code stripping that also strips the undefined references from - dead code. Radar bug 3216770. - - Added the undefined_check_level enum UNDEFINED_DEFINE_A_WAY to ld.h . - - Added parsing out "-undefined define_a_way" in main() in ld.c and modified - checks to allow its use with -twolevel_namespace. - - Added the define_a_way bit field in the merged_symbol struct in symbols.h . - - Added the define_undefined_symbols_a_way() routine to symbols.c and - symbols.h . This routines sets up the undefined symbols to be defined and - sets the define_a_way bit field in the merged_symbol. - - Added code at the end of define_link_editor_dylib_symbols() in symbols.c to - loop through the symbol table and set the address of the symbols with the - define_a_way bit field set. - - In layout() in layout.c after it sets up the link editor defined symbols - a check of the undefined_flag for UNDEFINED_DEFINE_A_WAY is made and if so - a call to define_undefined_symbols_a_way() is made. -- Fixed the incorrect casts on the comparison of the nlist struct's n_strx field - where the value being compared to was casted to a long. The correct fix was - to cast n_strx to an unsigned long. -- Added the "-undefined dynamic_lookup" option for use in two-level namespace - images to all undefined symbols to be looked up dynamically with flat - namespace semantics. Radar bug #3210803. - - Added the undefined_check_level enum UNDEFINED_DYNAMIC_LOOKUP to ld.h . - - Added parsing out "-undefined dynamic_lookup" in main() in ld.c and modified - checks to allow its use with -twolevel_namespace. Also added checks when - "-undefined dynamic_lookup" is not allowed for -static and when - MACOSX_DEPLOYMENT_TARGET is less than 10.3 . - - Changed process_undefineds() in symbols.c to changed its check of - undefined_flag != UNDEFINED_SUPPRESS - to - (undefined_flag == UNDEFINED_ERROR || - undefined_flag == UNDEFINED_WARNING) - and added an else cause to that if to check if undefined_flag is - UNDEFINED_DYNAMIC_LOOKUP and then set the library ordinal to - DYNAMIC_LOOKUP_ORDINAL if -r is not used and two-level namespace is in - effect. - - Changed check_symbol() in symbols.c to not treat a symbol with the library - ordinal DYNAMIC_LOOKUP_ORDINAL as an error. - - Changed merge_dylib_module_symbols() in symbols.c in the second loop that - loops through the symbols referenced by the dylib module when it is doing - symbol tracing to check the library_ordinal for DYNAMIC_LOOKUP_ORDINAL. - And if it is DYNAMIC_LOOKUP_ORDINAL not use it as a library ordinal and - let it just get printed as an unbounded reference. - - Changed merge_dylib_module_symbols() in symbols.c in the second loop where - it resolves the undefined references and changed the logic where it selects - how to resolve the symbol. It now sets a new boolean, resolve_flat, based - on the old logic plus looking at library_ordinal for DYNAMIC_LOOKUP_ORDINAL. - - Changed search_dynamic_libs() in pass1.c when it is has an undefined symbol - from a two-level namespace image to check the library ordinal for - DYNAMIC_LOOKUP_ORDINAL and if so treat it an internal error. Since the - above change to merge_dylib_module_symbols() should never let this happen. - - Also added this same check as above and internal error message to - process_undefineds() in symbols.c in two places. Also added a missing - check in the loop looking for previous undefined two-level namespace symbols - that did not check the twolevel_reference field before using the - library_ordinal. And added a check for DYNAMIC_LOOKUP_ORDINAL in the - loop the prints the references in the -Y loop. - -Changes for the 5.12 release (the cctools-464 release): -- Changed the they way N_BINCL stabs with non-zero n_value fields are handled so - the n_value is not changed. Radar bug #3201935. - - Added field input_N_BINCL_n_value to the struct localsym_block in symbols.h - - In merged_symbols() in symbols.c when a new N_BINCL is found the n_value - of the N_BINCL nlist is saved in the input_N_BINCL_n_value field. And if - not zero the variable sum is set to that value. Later when a new symbol in - the group in encountered if input_N_BINCL_n_value is not zero then the - string for that symbol is not sum'ed. - -Changes for the 5.12 release (the cctools-464 release): -- Made changes to build cleanly with gcc3.3 - - Removed -Wno-precomp from the Makefile - - Fixed warnings for "comparison between signed and unsigned" in ld.c, - layout.c, pass2.c, literal_pointers.c, pass1.c, rld.c and sets.c . - -Changes for the 5.12 release (the cctools-463 release): -- Added support for linking against MH_DYLIB_STUB libraries. Radar bug #3193744. - - Added a check for the MH_DYLIB_STUB filetype along with MH_DYLIB in - merge_symbols() in symbols.c . - - Added the testing of the filetype not being MH_DYLIB_STUB along with - testing of the section type not being S_ZEROFILL before checking the size - and offset of the section contents in check_cur_obj() in pass1.c . - - Added the testing for MH_DYLIB_STUB along with MH_DYLIB in a few places - in check_cur_obj() in pass1.c for various error checks. - - Changed the setting of cur_obj->dylib in check_cur_obj() in pass1.c to - include the MH_DYLIB_STUB filetype. - -Changes for the 5.12 release (the cctools-462 release): -- Fixed a bug in the displacement overflow checking of a PPC_RELOC_BR14 - relocation entry. The mask that was used was 0xfffe0000 which should - have been 0xffff8000 in the PPC_RELOC_BR14 cases in ppc_reloc.c . - Radar bug #3190434. - -Changes for the 5.12 release (the cctools-457 release): -- For the -single_module dylib case the symbol stubs for coalesced private - extern symbols were not being removed when they could be. The change is in - indirect_section_merge() in indirect_sections.c after the test if the - merged symbol is a coalesced symbol the if statement on line 373. An - additional case was added to the if expression such that if the output file - is a dylib and not multi-module and the symbol is private extern then the - expression is TRUE and indirect_defined is set to TRUE. Radar bug #3163714. - -Changes for the 5.12 release (the cctools-456 release): -- Changed XBS_TRACE_BUNDLE_LOADER to LD_TRACE_BUNDLE_LOADER in ld.c. Radar bug - #3152604. - -Changes for the 5.12 release (the cctools-454 release): -- Fixed a bug when using the -m flag and having a multiple definition of a - private extern symbol. The problem was in merge_symbols the counts of - private exterals are first incremented. Then after multiply_defined() is - called a check was needed to see if allow_multiply_defined_symbols is TRUE - (the -m flag specified) and the counts for private exterals needed to be - decremented. Radar bug #3143764. -- Fixed a bug when creating an indirect symbol when the referenced symbol is - a private extern symbol that causes an internal overlap error. Radar bug - #3134759. - - Added code in reduce_indr_symbols() in symbols.c so the N_PEXT bit is - checked and then the counts of private exterals (nmerged_private_symbols) - and the object's count (nprivatesym) are incremented. - - Changed assign_output_symbol_indexes() in symbols.c to check the N_PEXT - bit of the indirect symbol if the symbol is N_INDR to correctly determine - if the symbol is a private extern symbol in the two places it checks this - bit. - -Changes for the 5.12 release (the cctools-450 release): -- Added some double quotes in the Makefile around uses of `pwd` to be "`pwd`" so - if this were in a directory with a space it would work. Radar bug #3114622. -- Changed is_output_local_symbol() in symbols.c to strip symbols in sections - with the S_ATTR_STRIP_STATIC_SYMS attribute. To do this n_ssect and the - object struct that the symbol came from is passed to is_output_local_symbol(). - Radar bug #3114458. -- Changed the -x flag to strip private externs that will be local symbols in the - output file. Radar bug #3114182. - - Changed is_output_local_symbol() in symbols.c for the STRIP_NONGLOBALS case - (the -x flag) to return FALSE causing all local symbols to be stripped. - This strips private externs that were local symbols in the input object - files. - - Changed assign_output_symbol_indexes() in symbols.c to rebuild the merged - string table if we are stripping non-globals and we are not keeping private - externs and we have some private externs in the merged symbol table, and the - output is not a multi-module dylib. Then if this is the case the number of - private externs in each object is added to nstripped_merged_symbols so those - symbols are not counted. - - Changed output_merged_symbols() in symbols.c to check the strip_level for - STRIP_NONGLOBALS, and the output is not a multi-module dylib and not put ou - private externs in this case. - -Changes for the 5.12 release (the cctools-447 release): -- Fixed a problem with -x not stripping STABS with the P_EXT bit on them. The - odd stab: - 00000000 - 00 0000 3c gcc2_compiled. - was not stripped because of a bug in is_output_local_symbol() in symbols.c in - the STRIP_NONGLOBALS because it did not first check for N_STAB bits in n_type. - Radar bug #3104019. -- Added the -noprebind_all_twolevel_modules flag that overrides the setting - of the environment variable LD_PREBIND_ALL_TWOLEVEL_MODULES. The changes are - in ld.c . Radar bug #3055372. -- Fixed a bug that was causing dynamic libraries that had nothing referenced in - them that also were used indirectly that did have symbols indirectly - referenced in them to be LC_LOAD_WEAK_DYLIB. The problem was that references - from dylibs that were were causing the some_symbols_referenced field to be - set for the dylib. The fix was to merge_dylib_module_symbols() symbols.c - where it sets some_symbols_referenced. Radar bug #3094497. -- Removed the const off of link_edit_common_object in symbols.[ch] to get rid - of warnings and since it is now written on. - -Changes for the 5.11 release (the cctools-446 release): -- Changed it so that when -s is used on a dynamic dynamic executable it rebuilds - the string table in assign_output_symbol_indexes() in symbols.c so that the - symbol names for the discarded symbols don't end up in the string table. - Radar bug #3089997. -- Fixed a bug when using an export list and not listing a common symbol would - cause an internal overlap error. Radar bug #3088916. - - Changed define_common_symbols() in symbols.c right after - exports_list_processing() is called to check the N_PEXT bit and increment - the counts of private exterals. Both the object's count (nprivatesym) and - the global count (nmerged_private_symbols). - - Changed assign_output_symbol_indexes() in symbols.c to add the - link_edit_common_object object to the list of objects before counting - and assigning indexes to private extern symbols. Then at the end of the - loop copying back the updated object and taking it back off the list. - -Changes for the 5.11 release (the cctools-445 release): -- Changed the semantics of -s on dynamic executables to do the same stripping - as strip(1) with no arguments. That is only save undefined symbols and - global symbols marked referenced dynamically. Radar bug #2545288. - - Added the STRIP_DYNAMIC_EXECUTABLE enum value to strip_levels in ld.h . - - Added the variable nstripped_merged_symbols to symbols.c and symbols.h to - set to the number of merged symbol being stripped out. This is non-zero - when the strip_level is STRIP_DYNAMIC_EXECUTABLE. - - Changed assign_output_symbol_indexes() in symbols.c so that if strip_level - is STRIP_ALL and has_dynamic_linker_command is set to change strip_level - to STRIP_DYNAMIC_EXECUTABLE; - - Changed assign_output_symbol_indexes() to assign indexes to only undefined - symbols and global symbols marked referenced dynamically and add up the - number of merged symbol being stripped out into nstripped_merged_symbols. - - Added the case label for STRIP_DYNAMIC_EXECUTABLE in - is_output_local_symbol() in symbols.c to also return FALSE. - - Changed output_merged_symbols() in symbols.c to check the strip_level for - STRIP_DYNAMIC_EXECUTABLE and the REFERENCED_DYNAMICALLY of the symbol - and not put out those symbols in that case. - - Changed layout_segments() in layout.c when setting the - linkedit_segment.sg.filesize and output_symtab_info.symtab_command.nsyms - to subtract nstripped_merged_symbols. - - Fixed a typo in an error message in output_indirect_symbols() in - indirect_sections.c (changed "containg" to "containing"). - -Changes for the 5.11 release (the cctools-444 release): -- Added the -exported_symbols_list and -unexported_symbols_list flags. Radar - bug #3083844. - - Changes in ld.c and ld.h for adding the save_symbols and remove_symbols - variables and parsing and checking the flags. As well as checking to see - that the symbols were seen after pass1. - - Changed merge_symbol() in symbols.c to check if the symbol is on the - save_symbols or remove_symbols list and set the N_PEXT bit as needed. -- Fixed a problem with ppc JSR's and doing an ld -r where the JBSR has an - external relocation entry and the symbol is not defined in the output. - The code in ppc_reloc.c was: - if(r_extern){ - value += offset; - other_half = value; - } - else{ - value += other_half; - other_half = value; - } - And in the case of an external relocation entry where the symbol was - undefined 'offset' was not set. For JBSR external relocation entries the - offset part of "symbol+offset" is stored in the PAIR relocation entry in - 'other_half'. This is because the displacement of the bl instruction is for - the branch island. So the correct code works out to be the same as the - non-extern case and was changed to just this: - value += other_half; - other_half = value; - Radar bug #3054747. - -Changes for the 5.11 release (the cctools-443 release): -- Added the -single_module and -multi_module flags. Radar bug #3080780. - - Changes in ld.c and ld.h for adding the boolean multi_module_dylib and - parsing and checking the flags. - - Changed one place in coalesced_sections.c in coalesced_section_merge() - where the number of relocation is determined. The MH_DYLIB case was changed - to include multi_module_dylib == TRUE. - - Changed two places in the relocation routines in generic_reloc.c, - i860_reloc.c, m88k_reloc.c, sparc_reloc.c, hppa_reloc.c and ppc_reloc.c. - For external relocation entries where the symbol is defined, if the output - file is a multi_module dylib no relocation is done unless the symbol is a - private extern or we are prebinding. In this case the relocation entry is - left as extern. For single_module dylibs the relocation is done and the - relocation entry turned into a local relocation entry. - - Changed two places in the relocation routines in hppa_reloc.c and - ppc_reloc.c for JBSR relocations. The JBSR relocation code does not do - relocation if multi_module dylib. but will do it for a single_module dylib. - - Changed indirect_sections.c in indirect_section_merge() in three places: - - The fine relocation entry for defined external symbols are kept in dylibs - if it is a multi_module dylib (not kept for single_module dylibs). - - The check external relocation entries resolving to private extern being is - flagged as an error is only done for multi_module dylibs. - - The code that counts up the relocation entries, was changed in the dylib - case to include multi_module_dylib == TRUE. - - Changed literal_pointers.c in two places: - - In literal_pointer_merge() the check external relocation entries resolving - to private extern being is flagged as an error is only done for - multi_module dylibs. - - In the static count_reloc() routine where the number of relocation is - determined, the MH_DYLIB case was changed to include - multi_module_dylib == TRUE. - - Changed objects.c in three places: - - In object_index() zero is returned when multi_module_dylib == FALSE. - - In fine_reloc_output_address() if the reloc is in a symbol stub section - and the symbol is defined and it is not in a multi_module dylib then - the merge symbol value from the fine_reloc is used. - - In fine_reloc_output_sectnum() if the reloc is in a symbol stub section - and the symbol is defined and it is not in a multi_module dylib then - the merge symbol section number from the fine_reloc is used. - - Changed sections.c in three places: - - In layout_relocs_for_dyld() the check that merged sections don't have - any external relocation entries in dylibs had multi_module_dylib == TRUE - added to it. - - In count_relocs() the dylib case for the code counting the number of - relocation entries had multi_module_dylib == TRUE added to it. - - In reloc_output_for_dyld() a matching change for the above change to - count_relocs() was made for the dylib case addin multi_module_dylib ==TRUE - to it. - - Changed many places in symbols.c: - - In the routine merge_symbols() - - The number of defined externals is now only counted in the multi - module dylib case (need to be able allocate the reference maps). - - For a merged symbol that is a weak definition that is discarded, the - symbol counts for the reference map are adjusted and the reference - flags are updated only in the multi_module dylib case. - - The reference map flags are only set in the multi_module dylib case. - - In the routine command_line_symbol() and command_line_indr_symbol() the - reference map flags are set only in the multi_module dylib case. - - In the routine merge_dylib_module_symbols() and - merge_bundle_loader_symbols() for a merged symbol that is a weak - definition that is discarded, the symbol counts for the reference map are - adjusted and the reference flags are updated only in the multi_module - dylib case. - - In define_common_symbols() a check for multi_module dylib is made and - it is an error if there is a common symbol to define. Also the traceing - of commons is not done in dylib if multi_module_dylib == TRUE. - - In setup_link_editor_symbols() the code is not changed for the one place - that MH_DYLIB is used. As the reference table will be ignored and - output_dysymtab_info.dysymtab_command.nextrefsyms will be reset - layout_dylib_tables() for single module dylibs. - - In output_merged_symbols() the N_INDR symbols are set to the defining - symbol if it is a multi_module dylib and defined in the same object or - in a single module dylib. - - In layout_dylib_tables() the existing code for the reference table and - module table where placed in if statements with multi_module_dylib == TRUE - and new code was added for the single module case. For the reference - table its size is reset based on the defined and undefined merged symbols. - The module table size is one and a variable, dylib_single_module_name, was - added to save the pointer to the module name in the merged symbol table. - - In output_dylib_tables() the existing code for the reference table and - module table where placed in if statements with multi_module_dylib == TRUE - and new code was added for the single module case. For the reference - table its is built from the merged symbol table's defined and undefined - symbols. The one module table entry is built from the a variable, - dylib_single_module_name, which is a pointer to the module name in the - merged symbol table and the values in output_dysymtab_info. - -Changed mod_sections.c and mod_sections.h so that ninit and nterm were - __private_extern__ so that output_dylib_tables() in symbols.c could use - them for the single module dylib module table entry. - -Changes for the 5.11 release (the cctools-440 release): -- Fixed the warnings about extra tokens at end of #endif directive in - 4byte_literals.c, 8byte_literals.c, coalesced_sections.c, cstring_literals.c, - fvmlibs.c, generic_reloc.c, hppa_reloc.c, i860_reloc.c, indirect_sections.c, - layout.c, ld.c, literal_pointers.c, m88k_reloc.c, mod_sections.c, objects.c, - pass1.c, pass2.c, ppc_reloc.c, rld.c, sections.c, sets.c, sparc_reloc.c, - specs.c, symbols.c, 4byte_literals.h, cstring_literals.h, fvmlibs.h, - indirect_sections.h, layout.h, literal_pointers.h, make_defs.h, objects.h, - pass1.h, sections.h, sets.h, specs.h, symbols.h, ld.h and 8byte_literals.h - (Radar bug #3072042). - -Changes for the 5.11 release (the cctools-439 release): -- Made the needed changes to sections.c and layout.c for VEO support. Radar - bug #3068161. -- Added setting up a signal handler for SIGBUG and SIGSEGV. Radar bug #3062745. -- Changed the fix for Radar bug #3037279 for the bug in indirect_section_merge() - in indirect_section.c when the symbol was a weak coalesced symbol. A check - was added to make sure the symbol was not also a private extern that would - become a static symbol. Radar bug #3054990. -- Fixed a bug that was not allowing dynamic libraries to be set to - LC_LOAD_WEAK_DYLIB. The problem was that references from dylibs that were - non-weak were causing the some_non_weak_refs to be set for the dylib. The - fix was to merge_dylib_module_symbols() symbols.c where it sets - some_non_weak_refs. Radar bug #3051119. - -Changes for the 5.11 release (the cctools-437 release): -- Fixed many bugs in the handling of PPC_RELOC_JBSR in ppc_reloc() in - ppc_reloc.c . Radar bug #3046962. -- Fixed a bug in check_archive_arch() in pass1.c if the -no_arch_warnings flag - is used. The code should have returned FALSE without printing the error - message not TRUE. Radar bug #2986587. -- Fixes a bug in open_dylib() in pass1.c where if an error occured in - pass1_object() it did not check the error count and could return TRUE. - Radar bug #2999466. - -Changes for the 5.11 release (the cctools-436 release): -- Fixed a bug in indirect_section_merge() in indirect_section.c where - fine_relocs[i].indirect_defined was being set to TRUE when the symbol was - a weak coalesced symbol when it shouldn't have been. This caused the stub - in an executable to be removed for a weak coalesced symbol and thus call the - wrong symbol. A global weak coalesced symbol is used by the C++ compiler - when the -fexport-coalesced option is used. The problem resulted in an - uncaught exception. This is because the exception info correctly used a - non-lazy symbol pointer which was pointing to a different weak coalesced - symbol for the one that was actually being used by the program. - Radar bug #3037279. - -Changes for the 5.10 release (the cctools-432 release): -- Fixed a bug in merge_dylib_module_symbols() and merge_bundle_loader_symbols() - in symbols.c in the change introduced in the change to cctools-425. The loop - variable j was used in this code but should not have been as j was still live - from the outer loop. Radar bug #2969353. -- Fixed a bug where an undefined symbol was being put out with the "weak - definition bit set". This is an error if seen again by ld(1) as an undefined - symbol is not a definition and can't have the "weak definition bit set". - This can happen when a weak definition is first seen then a non-weak - definition is seen from a dynamic library. The fix was in - output_merged_symbols() in symbols.c to clear this bit for all undefined - symbols. Radar bug #2969501. -- Fixed a bug where the error message about "illegal reference to indirectly - referenced symbol defined in a dynamic library" should not have been printed - in the case -r was used. The fix was in both merge_dylib_module_symbols() - and process_undefineds() in symbols.c to add "save_reloc == FALSE" to the - if expression for this error message. Radar bug #2969437. - -Changes for the 5.10 release (the cctools-431 release): -- Fixed a bug in the reloc routines that resulted in the error: - - ld:internal error: output_section() count of external relocation entries - does not match - - This happened when the object had an undefined reference to a symbol defined - in another object file as a coalesed symbol (and -bundle was used and so - -prebind was not used). The logic to forced to be an external relocation - entry needed to be moved down in the routine outside of the undefined - map lookup. This change was made in all the *_reloc.c files. - Radar bug #2963045. - -Changes for the 5.10 release (the cctools-427 release): -- Fixed a bug where a bad two-level namespace linked image was produced when - a symbol from an object was discared and became an illegal reference to an - indirectly referenced dylib. Changes were in both symbols.h and symbols.c . - The new fields definition_library and non_dylib_referenced_obj were added to - the merged_symbol struct. Then code to set these was added in merge_symbol*() - routines. The code to produce the error message was added in - process_undefineds(). Radar bug #2956332. - -Changes for the 5.10 release (the cctools-426 release): -- The fix below was still incomplete. A final pass over the reference table - was needed in layout_dylib_tables() in symbols.c to set the reference type - correctly. This was needed when multiple weak private externs were seen - then a non-weak global symbol was seen. In this case the "private" reference - needs to be changed when the final merged symbol is not a private extern. - -Changes for the 5.10 release (the cctools-425 release): -- The fix below was only done in merge_symbols() but it also needed to be done - in merge_dylib_module_symbols() and merge_bundle_loader_symbols(). - Radar bug #2952209. - -Changes for the 5.10 release (the cctools-424 release): -- Fixed a bug when creating a dynamic library where a merged symbol that was a - weak private extern that was later discarded for a non-weak symbol had the - wrong reference type. The reference type was incorrectly based on the merged - symbol that was being discared not the object symbol that was to be used. - Radar bug #2952209. - -Changes for the 5.10 release (the cctools-421 release): -- Ifdef'ed out reset_prebound_undefines() in symbols.c and the call to it in - layout.c with #ifndef RLD in hope to fix Radar bug #2931331. -- Added the -nofixprebinding flag to mark the binary with MH_NOFIXPREBINDING - in the mach header flags. Changes in ld.c, ld.h and layout.c. Radar bug - #2941669. - -Changes for the 5.10 release (the cctools-420 release): -- Changed the #ifdef's around get_output_section in symbols.c for the fix below - in cctools-419. The libkld libraries were missing this symbol. Radar bug - #2936244. - -Changes for the 5.10 release (the cctools-419 release): -- Fixed a bug in the reloc routines when the object that contains a coalesed - that is a weak definition that was discared for a non-coalesed symbol. In - this case relocation entry on output should not be forced to be an external - relocation entry. The logic that sets force_extern_reloc had one more - expression added to it to check if the merged symbol to see if it was N_SECT - and if the output section was a coalesced section. This change was made in - all the *_reloc.c files. Radar bug #2931708. - -Changes for the 5.10 release (the cctools-417 release): -- Fixed a bug legal_reference() in indirect_sections.c that did not correctly - allow references to coalesced symbols that were local. Radar bug #2925564. - -Changes for the 5.10 release (the cctools-416 release): -- Changed merge_dylib_module_symbols() in symbols.c to not generate any multiply - defined errors or warning about symbols coming from indirectly referenced - dynamic libraries. Radar bug #2921080. -- Changed one of the checks in legal_reference() in indirect_sections.c to not - use the S_ATTR_WEAK_DEFS attribute and assume any coalesced section could - contain blocks which are not used because they were for weak_definition - symbols. Radar bug #2919646. -- Changed the checking for a weak definition in merge_symbols() in symbols.c - (three places) to now test the N_WEAK_DEF bit rather than N_SECT type and - S_ATTR_WEAK_DEFS section attribute. Made this same change in - merge_dylib_module_symbols() in symbols.c in (4 places). Made this same - change in merge_bundle_loader_symbols() in symbols.c (4 places). And also - made this same change in trace_symbol() in symbols.c (1 place). Radar bug - #2919646. -- Added checks in check_symbol() in symbols.c to check that weak definitions, - the N_WEAK_DEF bit, are only in global symbols in a coalesced sections. - Radar bug #2919646. -- Removed the internal N_WEAK_DEF constant from symbols.c since this in now - part of . Radar bug #2919646. -- Removed the check in check_cur_obj() in pass1.c for the S_ATTR_WEAK_DEFS - attribute. Radar bug #2919646. -- Changed the last warnings in check_archive_arch() in pass1.c for archive's - cputype not matching should not be printed if -no_arch_warnings is specified. - Radar bug #2918296. - -Changes for the 5.10 release (the cctools-415 release): -- Changed legal_reference() in indirect_sections.c to deal correctly with - coalesced sections with the S_ATTR_WEAK_DEFS attribute. Radar bug #2911339. - -Changes for the 5.10 release (the cctools-414 release): -- Changed trace_symbol() and process_undefineds() to print "weak reference" for - symbols with the N_WEAK_REF bit set. And changed trace_symbol() to print - "weak definition" for symbols in a section with the S_ATTR_WEAK_DEFS - attribute. Also added a internal N_WEAK_DEF constant used in the n_desc field - that trace_symbol() uses to print "weak definition". This is used with the - new pbud_weak_def_symbol struct. And the pbud_weak_def_symbol is used in - merge_dylib_module_symbols() for symbols in sections with the S_ATTR_WEAK_DEFS - attribute for tracing. Radar bug #2898558. -- Added code in merge_symbol(), merge_dylib_module_symbols() and - merge_bundle_loader_symbols() to handle global weak coalesced symbols defined - in objects or dylibs. Radar bug #2898558. -- Added code in merge_symbol() to keep the N_WEAK_REF bit of merged symbols for - undefined symbols that are getting resolved to S_ATTR_WEAK_DEFS symbols, so - that later if a non-weak definition from a dylib is used the weak reference is - retained. Changes were also needed in two places in output_merged_symbols() - to make sure the N_WEAK_REF bit is cleared on symbol definitions. Radar bug - #2898558 -- Added weak_def_in_dylib bit in a merged_symbol struct in symbols.h . Radar - bug #2898558 -- Added support for private_extern weak_definitions in coalesced sections. The - only really supported form is private extern symbols from a coalesced section - with the weak_definitions attribute in the .o files being linked. And - optionally one true definition (also a private extern) from any section also - from the .o files being linked. The changes were a couple of added if cases - in merge_symbols.c in symbols.c just before it handles two coalesced symbols. - Radar bug #2898558. -- Added a check in check_cur_obj() in pass1.c to make sure the weak_definitions - attribute, S_ATTR_WEAK_DEFS, is only used with a coalesced section type. - Radar bug #2898558. -- Added a check in merge_dylibs() in merge_dylibs.c to make sure the libraries - being linked against don't have the same install_name as the output. Radar - bug #2890446. - -Changes for the 5.10 release (the cctools-412 release): -- Added a check in layout_segments() in layout.c that checks to make sure the - total number of sections in the output is less than MAX_SECT so to not produce - bad object files. Radar bug #2882553. -- Added the -sect_diff_relocs flag which takes the arguments suppress, warning, - and error. As well as the LD_SECT_DIFF_RELOCS environment variable which can - be set to the same suppress, warning, and error values. Note these are only - used when both -dynamic and -execute are in effect. This causes the code in - reloc_output_for_dyld() in sections.c to flag objects being linked that have - section difference relocation entries in them. The default is suppress. - Radar bug #2870529. - -Changes for the 5.10 release (the cctools-411 release): -- Moved some of the macosx_deployment_target code into libstuff and changed - the code in here to use the libstuff code. Radar bug #2848945. - -Changes for the 5.10 release (the cctools-407 release): -- Made -run_init_lazily obsolete and removed all support execpt printing a - warning when the flag is used. Changes in ld.c and layout.c . - -Changes for the 5.10 release (the cctools-403 release): -- Changed the all target in the makefile to not depend on $(RC_OS)_lib_ofiles - but rather lib_ofiles and added the kld_build to the all target so that the - default make all builds everything. -- Changed the macos_lib_ofiles_install target in the Makefile to work when - $SYMROOT is not set. So the top level Makefile can do a make install and - work by default. - -Changes for the 5.10 release (the cctools-402 release): -- Removed the hack in the Makefile to use cc when $(CC) is gcc3 when linking - prehack_libkld.a to work around Radar bug #2814731. - -Changes for the 5.10 release (the cctools-400 release): -- Changed the Makefile back to again use the -dependency-file with gcc. -- Changed the hack in the Makefile to use cc when $(CC) is gcc3 when linking - prehack_libkld.a to work around Radar bug #2814731. - -Changes for the 5.10 release (the cctools-397 release): -- Added the -multiply_defined_unused flag with the default being suppress. - Changes in ld.c, ld.h, layout.c where - twolevel_namespace_check_for_unused_dylib_symbols() is called and in - pass1.c in twolevel_namespace_check_for_unused_dylib_symbols(). Radar bug - #2835152. -- Changed ppc_reloc() in ppc_reloc.c to not change the Y-bit of PPC_RELOC_BR14 - relocation types. -- Added the support for the MACOSX_DEPLOYMENT_TARGET environment variable. - Changed the code to switch LC_PREBIND and weak references off this value and - removed the POST_MACOSX_10_1 macro from the Makefile. Changes in symbols.c - layout.c and pass2.c. Radar bug #2830042. -- One more change in search_dynamic_libs() in pass1.c the "Logging for Build & - Integration] Used dynamic library" to print the realpath() name of the file - open(2)'ed and not the install name. Radar bug #2826775. - -Changes for the 5.10 release (the cctools-396 release): -- Change in search_dynamic_libs() in pass1.c the "Logging for Build & - Integration] Used dynamic library" to print the name of the file open(2)'ed - and not the install name. Radar bug #2826775. -- Added support for the -weak_reference_mismatches flag in ld.c and ld.h. -- Added the bit field - weak_reference_mismatch:1, /* seen both a weak and non-weak reference */ - to the merged_symbol struct in symbols.h -- Added code to merge_symbols() in symbols.c to set the weak_reference_mismatch - field in the merged_symbol struct based on the symbols being merged and the - setting of the -weak_reference_mismatches flag. -- Added a loop in process_undefineds() in symbols.c to print the symbols that - had weak reference mismatches. -- Changed the use of N_WEAK_SYM to N_WEAK_REF in symbols.c . -- Added a hack in the Makefile to use cc when $(CC) is gcc when linking - prehack_libkld.a to work around Radar bug #2814731. -- Changed the Makefile to not use the -dependency-file with gcc as well as - mwccppc. - -Changes for the 5.10 release (the cctools-394 release): -- Added LD_FORCE_NO_PREBIND environment variable to override the command line - and the LD_PREBIND environment variable. Radar bug #2814402. -- Changed it so that the LC_PREBIND_CKSUM and the LC_LOAD_WEAK_DYLIB commands - are not used unless RC_RELEASE is Proton or Jaguar. Changes were in Makefile, - layout.c and pass2.c using the POST_MACOSX_10_1 cpp macro. - -- To avoid creating LC_LOAD_WEAK_DYLIB for umbrella libraries that generally - have no symbols referenced from them, LC_LOAD_WEAK_DYLIB are only created - if some symbols are referenced and all of them are referenced weak. - - Added the some_symbols_referenced field to the dynamic_library struct in - pass1.h. - - Added setting the some_symbols_referenced field to TRUE in - merge_dylib_module_symbols() in symbols.c when a symbol is used from a dylib. - - Changed the code output_headers() in pass2.c to check the both the - some_symbols_referenced field and the some_non_weak_refs of the corresponding - dynamic_library to if to put out a command for the dylib of either - LC_LOAD_DYLIB or LC_LOAD_WEAK_DYLIB. - -Changes for the 5.10 release (the cctools-393 release): -- Added code to support weak dynamic shared libraries. - - Changed the merged_dylib struct in dylibs.h to have a pointer to the - corresponding dynamic_library library struct. This is then filled in by - merged_dylibs() in dylibs.c. - - Added the some_non_weak_refs field to the dynamic_library struct in pass1.h. - - Added a test of the N_WEAK_SYM bit in merge_dylib_module_symbols() in - symbols.c and if not set then set the new some_non_weak_refs field in the - dynamic_library struct to TRUE. - - Changed the code output_headers() in pass2.c to check the some_non_weak_refs - of the corresponding dynamic_library to see it is TRUE to put out a load - command for the dylib of either LC_LOAD_DYLIB or LC_LOAD_WEAK_DYLIB. - - Added the testing for LC_LOAD_WEAK_DYLIB where LC_LOAD_DYLIB in other places - in dylibs.c and pass1.c . - -- Fixed a bug in the code for the prebind_all_twolevel_modules option at the - end of search_dynamic_libs() in pass1.c that was setting mh too earily that - caused it to crash when p pointed to a dynamic_lib that was an archive. - -Changes for the 5.10 release (the cctools-390 release): -- Fixed a bug in parsing the -headerpad_max_install_names in ld.c that caused - it to eat the next parameter in the second parsing loop. - -Changes for the 5.10 release (the cctools-389 release): -- Added the -headerpad_max_install_names option. Changes in ld.c and layout.c. -- Fixed a bug that occured when prebinding was disabled becaused of overlapps - that produced the output with a bad load command (zero size). This was the - LC_PREBIND_CKSUM that the the code in layout.c accounted for but was not put - out in pass2.c becuse prebinding was disabled. The code in pass2.c was - changed to put out the LC_PREBIND_CKSUM load command if it was set up in - layout.c and not if prebinding was still enabled. -- Added the -prebind_all_twolevel_modules flag and the environment variable - LD_PREBIND_ALL_TWOLEVEL_MODULES which causes all modules in a two-level name - space prebound library to be marked as used in the linked_modules bit vector - in the LC_PREBOUND_DYLIB load command. The changes were in ld.c, ld.h and - pass1.c at the end of search_dynamic_libs(). Radar bug #2784627. -- Changed layout_segments() in layout.c to not set the bits in the mach header - for dyld outputs unless output_for_dyld is set. Radar bug #2787764. - -Changes for the 5.10 release (the cctools-387 release): -- Added the -seg_addr_table_filename option. -- Fixed a bug in ppc_reloc.c where it was not picking up the sign of the - original displacement of a BR14 instruction and then incorrectly flipping the - Y-bit. Radar bug #2765281. - -Changes for the 5.10 release (the cctools-386 release): -- Added the code to copy the checksum load command into the output buffer in - output_headers() in pass2.c . -- Added creating the prebind checksum load command in layout_segments() in - layout.c . -- Added the output_cksum_info struct for the prebind checksum load command to - layout.h . -- In check_cur_obj() in pass1.c added code to check a LC_PREBIND_CKSUM command. - -Changes for the 5.10 release (the cctools-385 release): -- Changed libkld.a and libkld.dylib from object files to archives. - -Changes for the 5.9 release (the cctools-382 release): -- Fixed the change below for cctools-381. The ifndef RLD should only have been - around twolevel_namespace_hints_specified not twolevel_namespace_hints. -- Fixed the building of static_kld when $(SRCROOT) = . which needed otmp_obj - after libmacho/otmp_obj in the Makefile. - -Changes for the 5.9 release (the cctools-381 release): -- Added an ifndef RLD around the definition of twolevel_namespace_hints so that - it would not get a warning when the ofiles_install target is built. - -Changes for the 5.9 release (the cctools-380 release): -- Added the -twolevel_namespace_hints option which is off by default for bundles - and on otherwise. The changes are in ld.c, layout.c, symbols.c and pass2.c. - Radar bug #2735266. - -Changes for the 5.9 release (the cctools-377 release): -- Fixed a problem with the change below in cctools-376 to process_undefineds() - in symbols.c that would not build when RLD was defined. - -Changes for the 5.9 release (the cctools-376 release): -- Fixed a bug in search_dynamic_libs() in pass1.c that should not have free()'ed - the "fake" merged_symbol when -Y was used. This caused the code in - process_undefineds() in symbols.c to crash. -- Fixed a bug in process_undefineds() in symbols.c that was not correctly - reporting undefined symbols for the -Y flag correctly. It should not have - had the expression - merged_symbol->twolevel_reference == TRUE - when testing for undefined symbols. - -Changes for the 5.9 release (the cctools-375 release): -- Fixed a bug in fine_reloc_output_sectnum() in objects.c where it should do - the same thing for lazy pointer sections as well as non-lazy pointer - sections. This case showed up when a non-pic symbol stub was used for a local - symbol. In this case the relocation entry to the lazy pointer was not a - scattered relocation entry so fine_reloc_output_sectnum() was being called - by ppc_reloc.c. In the case for a local symbol the lazy pointer will not be - in the output so it does not even matter what the section number being - returned is. -- Fixed ld(1) to correctly support the semantics of two-level namespace library - references. Radar bug #2716249. - - The basic approach is was to "fake" up a merged_symbol with the new - twolevel_reference bit set and add it to the undefined list in - merge_dylib_module_symbols() in symbols.c when it was merging a dylib module - from a two-level namespace dylib. - - Then search_dynamic_libs() would look for these entries in the undefined list - and search for the dylib module that defines them name call - merge_dylib_module_symbols() to load the specified dynamic library. - - Changes to process_undefineds() in symbols.c were also needed to check for - remaining two-level references and report them correctly. - - Changed search_dynamic_libs() in pass1.c to always set up the sub_images even - if -twolevel_namespace is not in effect as it is needed when a two-level - namespace library is used to resolve its references with the correct - semantics. - - Added the twolevel_reference bit and the referencing_library field to the - merged symbol struct in symbols.h. - -- Removed a number of #ifndef RLD #endif pairs from symbols.c that were already - inside an outer #ifndef RLD #endif pair. These were inside the functions - command_line_indr_symbol(), merge_dylib_module_symbols() and - merge_bundle_loader_symbols() and all around the calls to - tell_ProjectBuilder(). - -Changes for the 5.9 release (the cctools-373 release): -- Changed the default to -twolevel_namespace in ld.c. Also adding setting - twolevel_namespace to FALSE for -force_flat_namespace and -static. Also - removed some #ifdef notdef code after the testing of LD_TWOLEVEL_NAMESPACE. - -Changes for the 5.9 release (the cctools-371 release): -- Added a log message ""[Logging for XBS] Referenced bundle loader: " when - the environment variable XBS_TRACE_BUNDLE_LOADER is set where is the - argument of -bundle_loader if set. Radar bug #2710229. - -Changes for the 5.9 release (the cctools-370 release): -- Added the -nomultidefs flag to ld(1) to set the MH_NOMULTIDEFS flag in the - mach header. -- Added support in ld(1) for the two-level namespace hints optimization. Radar - bug #2558069. - - The following field was added to the struct merged_symbol in symbols.h: - /* - * For two-level namespace hints this is the index into the table of - * contents for the definition symbol in the dylib it is defined in, - */ - unsigned long itoc; - - In search_dynamic_libs() in pass1.c code was added to set the itoc field in - the merged symbol after it was found in a DYLIB. - if(twolevel_namespace == TRUE) - undefined->merged_symbol->itoc = toc - q->tocs; - - Also in merge_dylib_module_symbols() in symbols.c the itoc of a merged - symbol is set if not zero as the symbol in the merged symbol table could be - a common or undefined. This changed required the function dylib_bsearch() in - pass1.c to now be __private_extern__ rather than static. Also with this the - variable strings and symbols were changed to bsearch_strings and - bsearch_symbols in pass1.c and made __private_extern__ rather than static. - - The following new struct was added to layout.[ch] to hold info about the - hints: - /* - * The output file's two level hints load command. - */ - struct hints_info { - struct twolevel_hints_command twolevel_hints_command; - }; - __private_extern__ struct hints_info output_hints_info; - - In assign_output_symbol_indexes() in symbols.c number of hints was set based - on the value of nundefsym. - - In layout_segments() in layout.c accounting for the size of the hints in the - linkedit segment was done. - - Also in layout_segments() in layout.c code was added to account for the hints - command and its size. - - Also in layout_segments() in layout.c the offsets to the hints table are set - as to be just after the symbol table. - - In output_headers() in pass2.c the hints command is placed in the output. - - In setup_output_flush() in pass2.c the space between the end of the symbol - table and the start of the hints is flushed and the offset is moved to the - end of the hints table. - - In output_merged_symbols() in symbols.c at the end of the routine it outputs - the two-level namespace hints. - - In check_cur_obj() in pass1.c added code to check a LC_TWOLEVEL_HINTS - command. - -Changes for the 5.9 release (the cctools-369 release): -- Added kld_load_from_memory & kld_load_basefile_from_memory for the dynamic - build variant of libkld. These APIs will be used by the Kernel's dynamic - OSObject patch code. Changes in rld.c . - -Changes for the 5.9 release (the cctools-368 release): -- Fixed a bug with -bundle_loader and cross bytesex links. Code to swap the - symbol table of a BUNDLE_LOADER was added to search_dynamic_libs() in pass1.c. -- Also needed a test in merge() in pass1.c before add_dynamic_lib() was called - for a BUNDLE_LOADER to make sure it has symbols as it could be of the wrong - architecture and will cause later code in search_dynamic_libs() to crash. - -Changes for the 5.9 release (the cctools-367 release): -- Added support for the -sub_library option. Radar bug #2697458. - - The following field was added to the struct dynamic_library in pass1.h: - char *library_name; - - Added code in check_cur_obj() in pass1.c to check LC_SUB_LIBRARY command. - - Changed search_dynamic_libs() in pass1.c in the third major block of code that - sets the library_ordinals to set the library_name field like the umbrella_name - field of the dynamic_library struct. - - Added code to setup_sub_images() in pass1.c to handle sub_librarys as it - handles sub_umbrellas. - - Changed set_sub_umbrella_ordinal() to set_sub_umbrella_sub_library_ordinal() - to do both sub_umbrellas and sub_libraries. And factor out the code that - sets the index into the sub_images into the routine set_isub_image(). - -- Added support in ld(1) to build the two-level namespace sub images arrays for - each dynamic library when -twolevel_namespace is in effect. This is for the - two-level namespace hints optimization. Radar bug #2558069. - - The following fields were added to the struct dynamic_library in pass1.h: - /* following are used when -twolevel_namespace is in effect */ - unsigned long ndependent_images; - struct dynamic_library **dependent_images; - enum bool sub_images_setup; - unsigned long nsub_images; - struct dynamic_library **sub_images; - enum bool twolevel_searched; - - The following fields were added to the struct object_file in objects.h: - unsigned long isub_image; /* when -twolevel_name space is in effect */ - /* this the sub_image index for recording */ - unsigned long nload_dylibs; /* Number of LC_LOAD_DYLIB commands */ - - TODO: need to add code in check_cur_obj() to check LC_TWOLEVEL_HINTS command - then the hints. - - Changed check_cur_obj() in pass1.c to increment nload_dylibs in the cur_obj - for each LC_LOAD_DYLIB commands. - - Changed search_dynamic_libs() in pass1.c in the first major loop in - to allocate the dependent_images as well as the second major loop for - dependent libraries when -twolevel_namespace is in effect. - - Changed search_dynamic_libs() in pass1.c in the second major loop in - to fill in the dependent_images from the return value of add_dynamic_lib() - when -twolevel_namespace is in effect. - - Changed search_dynamic_libs() in pass1.c in the third major block of code that - sets the library_ordinals added a loop that calls the new routine - setup_sub_images() that has the same logic as in dyld's images.c. - - Added code in both set_sub_frameworks_ordinals() and - set_sub_umbrella_ordinal() to set the isub_image for the libraries. - - Added code in search_dynamic_libs() when the debug 22 bit is set and - -twolevel_namespace is in effect to printout the dependent and sub images. - - After the sub_images arrays are set up the main loop to search for undefined - symbol in search_dynamic_libs() was changed to search all the sub_images of - each DYLIB as it is encountered. The new twolevel_searched field is first - set to FALSE in all the dynamic_libray structs in the list and if a symbol is - not found in a DYLIB then all the sub_images are searched in turn. This same - bit of logic is also done in the last loop that checks merged symbols coming - from dynamic libraries. - -- Fixed a bug where if only the -stack_size was set then the default stack - address value used was not put into the thread state. This change was in - layout_segments() in layout.c where it now simply sets stack_addr_specified - to TRUE after calling get_stack_addr_from_flag(). - -Changes for the 5.9 release (the cctools-361 release): -- Added the -prebind_allow_overlap flag as well as the LD_PREBIND_ALLOW_OVERLAP - environment variable which allow prebinding to still be done even if some of - the libraries overlap. Changes in ld.c, ld.h and layout.c in check_overlap(). -- Added the case for LC_PREBOUND_DYLIB in check_cur_obj() in pass1.c as it was - missing and -bundle_loader arguments can have these load commands. -- Fixed a bug add_dynamic_lib() in pass1.c that changed the definition_obj of a - dynamic_library struct when it was a sub-umbrella. This was old code from - the first attempt (cctools-344) to get the primary library stuff for - two-level namespace working. This bug caused a cross bytesex link to fail - because when the symbolic info for each dylib was set up in - search_dynamic_libs() it swapped the nlist structs more than once because - more than one dynamic_library struct pointed to the same info. - -Changes for the 5.9 release (the cctools-360 release): -- Ifdef'ed out the code that turns off -twolevel_namespace when the environment - variable LD_TWOLEVEL_NAMESPACE is set and -undefined is specified that is not - "error" or any -U flags are specified to cause hard errors for now. This may - have to be put back in at some point. But we want things to fail at first to - find projects that use these flags. -- Added savestr() to ld.c to avoid a multiply defineds for allocate() and - reallocate(). -- Changed the Makefile so that static_kld build will use libmacho from the - the $(SYMROOT) not from /usr/local/lib/system. -- Added a definition of savestr() to rld.c to avoid pulling in allocate.o from - libstuff. -- Changed the Makefile so that the rld stuff does not get built for RC_OS being - macos and RC_RELEASE being after Cheetah. - -Changes for the 5.9 release (the cctools-359 release): -- Added the -multiply_defined flag for the treatment of two-level namespace - multiply defined symbols. It takes error, warning and suppress as arguments - with warning being the default. -- Added the LD_TWOLEVEL_NAMESPACE environment variable to turn on - -twolevel_namespace when -flat_namespace and -static are not specified. It - is also not turned on when -undefined is specified that is not "error" or any - -U flags are specified but prints a warning that LD_TWOLEVEL_NAMESPACE is - ignored. -- Changed check_overlap() in layout.c for the check that does not disable - prebinding when there is an overlap with a split library's __LINKEDIT segment - such that an executable can be linked where some it the libraries it links - with split libraries that are not stripped it does not disable prebinding. -- Added checking force_flat_namespace when checking for MH_TWOLEVEL so that if - forcing a flat name space the checking for multiply defined symbol is treated - as an error even if a two-level namespace library is used. -- Changed check_dylibs_for_reference() in pass1.c to only check for references - in flat libraries so that two-level namespace libaries can be used with - different references and the resulting item being linked can be prebound - except when -force_flat_namespace is also being used. -- Added the check and printing a message about unused multiply defined symbols - when -twolevel_namespace is in effect. This is done with the new routine - twolevel_namespace_check_for_unused_dylib_symbols() defined in pass1.c and - called from layout() in layout.c . To implement it the routine - check_dylibs_for_definition() in pass1.c was change to take two flags so it - can be used for prebinding and two-level name space checks. -- Added the -bundle_loader and -private_bundle flags. Along with - many other changes this allows -bundle outputs to have their undefined symbols - to be checked against the executable. This is required for -bundle outputs - and -twolevel_namespace when the bundle references symbols from the executable - and EXECUTABLE_ORDINAL gets recorded for the library ordinal. -- Added -Wno-long-double to shutup the compiler for - . -- Added a check to make sure -U flags are not used when twolevel_namespace is - in effect. -- Fixed a bug with or'ing in of REFERENCED_DYNAMICALLY in - merge_dylib_module_symbols() in symbols.c on line 1965 which should not - be or'ed in when the dynamic library is a MH_TWOLEVEL. -- Fixed a bug in merge_dylib_module_symbols() that incorrectly flagged a - multiply defined symbol as an error not a warning when one symbol came from - a flat library and one came from a two-level library and we were building an - executable. - -Changes for the 5.8 release (the cctools-355 release): -- Changed the include file to in rld.c and - sets.c . Radar bug #2579488. -- Changed the way -twolevel_namespace sets the primary ordinal and reports - errors for illegally referenced indirect libraries from the cctools-344 - original implementation: - - In search_dynamic_libs() in pass1.c after all the dependents are added a - set of loops were added to propagrate the library ordinals to the - sub-frameworks and sub-umbrellas. The new routines - set_sub_frameworks_ordinals() and set_sub_umbrella_ordinal() are called - from these loops. These new routines are also defined in pass1.c. - The new field umbrella_name was added to the dynamic_library struct in - pass1.h . - - Then in merge_dylib_module_symbols() before the merged_symbol - is updated to the definition of the symbol in the dylib a check - is made to see if the symbol is referenced from an object going - into the image and will need the library ordinal recorded. If so - a check to see if the library ordinal was assigned is done and - if not an error for an illegal reference to a symbol defined - in a indirectly referenced dynamic library is issued. - The new field indirect_twolevel_ref_flagged was added to the - dynamic_library struct in pass1.h . - - All the code added to the open_dylib() in pass1.c in the cctools-344 - implementation for twolevel-namespace was removed. - -Changes for the 5.8 release (the cctools-353 release): -- Change ld(1) to allow section difference references to coalesced symbols where - the symbol being referenced is private extern or local. This is needed so - that the zero overhead exception tables can make pic references to the - private extern symbols that the compiler creates for template functions. - To do this the fine relocs created for coalesced symbols that are private - externs are marked with local_symbol == TRUE in coalesced_section_merge() in - coalesced_sections.c. Then in legal_reference() in indirect_sections.c the - first test had the additional conditional check to allow the reference when - the reference was to a block that local_symbol == TRUE. Then a change to - fine_reloc_output_address() in objects.c to deal with a coalesced section - where local_symbol == TRUE and use_contents == FALSE was made to pick out the - merged_symbol pointer from the output_offset field. Radar bug #2573679. -- Changed prebinding_check_for_dylib_override_symbols() in pass1.c to not - continue when - merged_symbol->defined_in_dylib == TRUE - and go head and call check_dylibs_for_definition(). Then a change was made - to check_dylibs_for_definition() that skipped merged symbols defined in a - dylib for the current dylib being checked. This allow catching symbols being - overridden in a dylib from a different dylib. This happens when both System - and System_profile are linked (and have different prebound addresses). - Radar bug #2564555. - -Changes for the 5.8 release (the cctools-350 release): -- Added a call to vm_msync() in pass1() in pass1.c and pass2() in pass2.c under - the #ifdef VM_SYNC_DEACTIVATE conditional. Radar bug #2567196. - -Changes for the 5.8 release (the cctools-349 release): -- Added code in pass2() in pass2.c to use fcntl() with the F_NOCACHE option to - not cache the blocks of the output file. -- Fixed a bug in compiling the without -DDEBUG in count_relocs() in sections.c - where the setting of map->nextrel and map->nlocrel where in ifdef DEBUG code - that should not have been. - -Changes for the 5.8 release (the cctools-347 release): -- Changed merge_dylib_module_symbols() in symbols.c for handling multiply - defined symbols to treat them as warnings when building images when - -twolevel_namespace is in effect and the symbol does not come from a dylib - or if the symbol is coming from a dylib with MH_TWOLEVEL. - -Changes for the 5.8 release (the cctools-346 release): -- Added the printing of why prebinding was disabled when environment variable - RC_TRACE_PREBINDIND_DISABLED is set. This also uses the new -final_output - flag which the driver can pass as the actual name of the output file being - created which is used in the message: - [Logging for Build & Integration] prebinding disabled for <<-final_output - argument>> because REASON - Radar bug #2550094. -- Fixed a bug in coalesced_section_merge() in coalesced_sections.c where it - did not take into account the private extern bit of a merged symbol of an - external relocation entry when the output is MH_BUNDLE. Radar bug #2548925. - -Changes for the 5.8 release (the cctools-345 release): -- Changed the setting of -segs_read_write_addr if picking zeros up both the - -segs_read_only_addr and -segs_read_write_addr then the value 0x10000000 is - used for the -segs_read_write_addr. Radar bug #2544818. -- Changed the segment overlap checking to not disable prebinding when building - a split library and a segment overlaps a linkedit segment of any split - library. Radar bug #2543932. -- Fixed a bug in main() in ld.c where this line: - if(client_name != NULL != 0) - should have been: - if(client_name != NULL) - -Changes for the 5.8 release (the cctools-344 release): -- Added code for tracking and setting the library ordinal when - -twolevel_namespace is in effect. Radar bug #2538835. - - The ordinal for the "primary" library is assigned in - search_dynamic_libs() in pass1.c for the libraries on the list - before any dependents are added. This is stored in the - object_file struct in the library_ordinal field. - - The routine search_dynamic_libs() in in pass1.c calls - open_dylib() in pass1.c for the dependent dylibs which returns - TRUE or FALSE as whether to keep the dependent lib on the list - of dylibs to be searched. The routine open_dylib() does the - work of determing if a dependent dylib is to be kept when - -twolevel_namespace is in effect. It has the code to deal - with sub-frameworks of umbrella frameworks and sub-umbrellas. - It is the one that sets the library_ordinal from the primary - library into the dependent dylib. - - The setting of the library ordinal in the n_desc field of a - symbol is done in the routine merge_dylib_module_symbols() in - symbols.c which is passed the struct dynamic_library for the - library that the module comes from. And is done with this - code: - if(twolevel_namespace == TRUE){ - SET_LIBRARY_ORDINAL(merged_symbol->nlist.n_desc - dynamic_library->definition_obj->library_ordinal); - } - -- Added a check to make sure -undefined error is used when -twolevel_namespace - is in effect. Radar bug #2538835. -- Added building kld_build for cctoolslib when RC_OS is macos and RC_RELASE is - not Bunsen, Beaker, Gonzo or Kodiak. The kernel Radar that install the libsa - headers is 2537868. The Radar for this change is 2538829. -- Fixed a bug with -keep_private_extern logic and coalesced symbols that did not - generate an external relocation entry when it should. The change was this: - if((merged_symbol->nlist.n_type & N_PEXT) == N_PEXT || - keep_private_externs == TRUE || ... - to this: - if(((merged_symbol->nlist.n_type & N_PEXT) == N_PEXT && - keep_private_externs == FALSE) || ... - in ppc_reloc.c, coalesced_sections.c, generic_reloc.c, hppa_reloc.c, - i860_reloc.c, indirect_sections.c, m88k_reloc.c, and sparc_reloc.c. Radar - bug #2536788. -- Fixed a bug with checking the LC_SUB_UMBRELLA that caused it to crash as it - was using the 'sub' variable for LC_SUB_FRAMEWORK load commands not the 'usub' - variable. This is in check_cur_obj() in pass1.c. Radar bug #2538825. - -Changes for the 5.8 release (the cctools-342 release): -- Fixed a problem with the change for Radar bug #2503688 that was in cctools-341 - that was in merged_symbol() that should have not changed to using the - merged_symbol instead of the object_symbols for the setting of the reference - type in a dynamic library. -- Fixed a bug with -keep_private_externs that was setting of the indirect table - to INDIRECT_SYMBOL_LOCAL (or INDIRECT_SYMBOL_ABS) when it should not. This - shows up as a problem when the indirect table entry is for a private_extern - symbol. The change is in output_indirect_symbols() in indirect_sections.c to - add a check for keep_private_externs == FALSE. Radar bug #2534011. -- Fixed the another bug with a coalesced symbol that is a private extern (when - -keep_private_externs is NOT in effect) in that the value of the non-lazy - symbol pointer is not set to the value of the symbol (though the index is set - to INDIRECT_SYMBOL_LOCAL). The setting of the non-lazy symbol pointer is - done in scatter_copy() in sections.c based on the fine_relocs indirect_defined - field that is always FALSE for coalesced symbols (to keep indirection). - The function is_pass2_merged_symbol_coalesced() was added and logic was added - to scatter_copy() to use it and set the non-lazy symbol pointer. Radar bug - #2534011. -- Added support for -allowable_client and -client_name flags. Radar bug - #2533649. -- Added first bit of support for the -flatname_space, -twolevel_namespace, - and -force_flat_namespace options. Parsing the options and setting - MH_TWOLEVEL and MH_FORCE_FLAT in the header's flags. Radar bug #2534043. - -Changes for the 5.8 release (the cctools-341 release): -- Added the -sub_umbrella option Radar bug #2530028. -- Changed the Makefile to build libkld.a and libkld.dylib for cctoolslib builds. - Many ifdefs were added and changed in rld.c to implement the kld APIs and - many ifdefs were added all the other files to build with the Kernel framework. - Radar bug #2523649. -- Changed ld.c to initalize the value of arch_flag when KLD and __STATIC__ are - defined so that code in pass1.c can avoid using host_info via - get_arch_from_host() which is also ifdef'ed out when KLD and __STATIC__ are - defined (see pass1_fat() in pass1.c). -- Changed merge_sections() in sections.c to not merge the section alignment - from the base file for KLD. -- Changed the ifdef's in rld.c to make only sa_rld() and sa_rld_with_symtab() - are left as externals for libsarld.a. Also changed sa_rld_output_addr and - sa_rld_output_size to private_externs. -- Removed the test to make sure -init is also specified when -run_init_lazily - is specified as now module initialization routines can also be run lazily. - Radar bug #2502941. -- Changed the final loops in search_dynamic_libs() in pass1.c that checks "all - merged symbols coming from dynamic libraries from the first one defining the - symbol" to ignore symbols with coalesced_defined_in_dylib as TRUE. - Radar bug #2503703. -- Fixed a bug in merge_symbols() where the first symbol merged was a coalesced - global symbol from a dynamic library and the next was from an object - (libcc_dynamic.a) which was causing it to be a multiply defined - symbol. The field coalesced_defined_in_dylib also needed to be checked if - defined_in_dylib is TRUE. Radar bug #2503694. -- Fixed a yet another bug in merge_symbols() in symbol.c when a private - extern coalesced symbol gets discarded. The counts for cur_obj->nextdefsym - was decremented in all cases when it should have only been decremented in - the case the symbol was not a private extern. Radar bug #2503688. - -Changes for the 5.7 release (the cctools-337 release): -- Fixed two bugs in the handling of lower level error later causing an internal - error. The fix was to test errors for non-zero and return from the routine. - this was added to output_section() in sections.c after the relocs routines - and pass2 in pass2.c after output_section() call. -- Fixed a bug in print_whatsloaded() in objects.c where it did not print the - archive name for extended format #1. -- Fixed a bug in coalesced_section_merge() in coalesced_sections.c where it - did not take into account the private extern bit of a merged symbol of an - external relocation entry when the output is MH_DYLIB. Radar bug #2497954. - -Changes for the 5.7 release (the cctools-335 release): -- Fixed a bug in merge_symbols() in symbol.c when a private extern coalesced - symbol gets discarded. The counts for cur_obj->nprivatesym and - nmerged_private_symbols need to be decremented in the case the coalesced - symbol gets discarded. Radar bug #2493452. -- Fixed a bug in literal_pointer_output() in literal_pointers.c for split - libraries that did not correctly set the r_address field for literal pointer - relocation entries. Radar bug #2493445. - -Changes for the 5.7 release (the cctools-334 release): -- Changed guess_short_name()'s has_suffix argument to return a pointer - to the suffix so checksyms could check for "_debug". This effected - ld(1)'s guess_short_name() two calls. -- Added the -run_init_lazily flag and the variable lazy_init so to mark the - dynamic library with MH_LAZY_INIT. Changes in ld.c, ld.h and layout.c. - Radar bug #2490396. - -Changes for the 5.7 release (the cctools-330 release): -- Changed merge_dylib_module_symbols() in symbols.c to have a last pass that - looks for private undefined references and links them in. To do this the - dynamic_library struct needed to be passed to it. This causes pass1.h to - be needed before including symbols.h so many other files also have this - change. The change to merge_dylib_module_symbols() is needed so that dynamic - libraries that have had nmedit run on them will get the proper semantics and - detect multiply defined symbols at link time. This also gets the - LC_PREBOUND_DYLIB commands do have the modules used via private externs - symbols marked in the linked_modules bit vector. This is part of Radar bug - #2420307. - -Changes for the 5.7 release (the cctools-330 release): -- Changed the ifdef's for the standard_framework_dirs in pass1.c s - that moving forward /Library/Frameworks is part of the default and - /Local/Library/Frameworks is only used instead if __GONZO_BUNSEN_BEAKER__ - is defined for older DP4, DP3 & PR2 builds. Radar bug #2477862. -- Changed the call to netname_look_up() in check_for_ProjectBuilder() to - bootstrap_look_up() when __OPENSTEP__ and __GONZO_BUNSEN_BEAKER__ is not - defined (Radar bug #2473864). -- Fixes the error message about only using -umbrella when -dylib is used to use - "-umbrella" where it was using "-sub_framework". Radar bug #2477866. - -Changes for the 5.7 release (the cctools-329 release): -- Changed iinit and ninit fields of the struct dylib_module in - mod_section_merge() in mod_sections.c to iinit_iterm and ninit_nterm and added - checks for overflow in there. Also added in the code to handle setting the - module table entries in output_dylib_tables() in symbols.c and is nolonger - #ifdef'ed DYLIB_TERM. Radar bug #2469527. - -Changes for the 5.7 release (the cctools-328 release): -- Changed where the libraries get installed by default. So going forward things - get install in /usr/local/lib/system and /Local/Developer/System - is only used for RC_OS=macos when RC_RELEASE is Gonzo, Bunsen, or Beaker. - -Changes for the 5.7 release (the cctools-327 release): -- Changed back where ld(1) picks up its the System Framework's private headers. - It will continue to look in - /System/Library/Frameworks/System.framework/PrivateHeaders and may someday - will lookin in - /MacOSX/System/Frameworks/System.framework/PrivateHeaders in some post-DP4 - release. -- Changed where the libraries get installed by default. So going forward things - get install in /AppleInternal/Developer/System and /Local/Developer/System - is only used for RC_OS=macos when RC_RELEASE is Gonzo, Bunsen, or Beaker. -- Changed the ifdef's for the standard_framework_dirs in pass1.c s - that moving forward /MacOSX/Library/Frameworks is part of the default and - /Local/Library/Frameworks is only used instead if __GONZO_BUNSEN_BEAKER__ - is defined for older DP4, DP3 & PR2 builds. - -Changes for the 5.6 release (the cctools-325 release): -- Fixes a bug in merge_dylib_module_symbols() in symbols.c where it was using - [i] as an index into the symbol table where it should have been using [j] in - two places. This was causing Gonzo1I10 ld's to crash via libtool with the - message "/usr/bin/libtool: fatal error in ld". - -Changes for the 5.6 release (the cctools-324 release): -- Fixed a bug in merge_symbols() in symbols.c in the BINCL/EINCL logic. In the - case where the there is a missing EINCL the logic will run into the global - symbols and mistakenly count them as local symbols. Thus causing an internal - error: "output_local_symbols() inconsistent local symbol count". -- Fixed a bug in merge_dylib_module_symbols() where if a coalesced symbol only - appears in dylibs then a multiply defined error resulted. To make this fix - a new bit, coalesced_defined_in_dylib, in the merged_symbol struct in - symbols.h was also added. - -Changes for the 5.6 release (the cctools-323 release): -- Changed where the libraries get installed for the Space release in preparation - of this "Half Plan" becoming the default for DP4 (Gonzo). This directory - /Local/Developer/System is changing to /AppleInternal/Developer/System. -- Changed the ifdef __SPACE__ for the standard_framework_dirs in pass1.c as the - directory changes have been scaled back and changed. In preparation of this - "Half Plan" /Local/Library/Frameworks was changed to - /MacOSX/Library/Frameworks and ifdef'ed __SPACE__. In the second half of the - plan (post-DP4) /System/Library/Frameworks will change to - /MacOSX/System/Frameworks and this is ifdef'ed __SPACE2__. -- Changed back where ld picks up its the System Framework's private - headers back to /System/Library/Frameworks/System.framework/PrivateHeaders - from /MacOSX/System/Frameworks/System.framework/PrivateHeaders for the Space - release. This won't change till post-DP4. - -Changes for the 5.6 release (the cctools-322 release): -- Added ifdef'ed for __SPACE__ to the standard_framework_dirs in pass1.c in - preparation for the directory changes. /System/Library changing to - /MacOSX/System. - -Changes for the 5.6 release (the cctools-320 release): -- Fixed a bug in open_dylib() in pass1.c where if more than one -dylib_file - arguments were used and more than one dylib was linked and a dylib was then - found in the -dylib_file the next call to open_dylib() would crash because - the ':' was not restored after the first one was found. -- Added the -umbrella framework_name option to guarding against direct linking - of non-umbrella frameworks. Radar bug 2443212. - -Changes for the 5.6 release (the cctools-319 release): -- Added the -seg_addr_table option and the LD_SEG_ADDR_TABLE environment - variables as alternate ways to set the addresses of dynamic shared libraries. -- For MH_SPLIT_SEGS format the r_address field of relocation entries is to be - relitive to the first read-write segment. This is to deal with the fact that - the r_address field in scattered relocation entries is 24 bits and this format - is used for prebound lazy pointers. So the changed for this was changing - what the addr_adjust gets set to in reloc_output_for_dyld() in sections.c . - This is possible as it is not legal to have relocation entries in read-only - segements in this format. So to enforce this main() in ld.c checks to make - sure -read_only_relocs is set to error when -segs_read_only_addr is used. -- Removed a few unneeded tests for r_scattered after tests for r_extern in - reloc_output_for_dyld() in sections.c as scattered relocation entries are - alwasys local. - -Changes for the 5.6 release (the cctools-318 release): -- Fixed a bug in the Makefile that installed the archive libraries without the - -p option. This caused their table of contents to be out of date. And is - needed as the kern loader is linking with librld.a . Also changed the - Makefile to install librld's into /usr/local/lib . (Radar bug #2436955). - -Changes for the 5.6 release (the cctools-316 release): -- Changed a check in indirect_sections.c in indirect_section_merge() where it - was checking the relocation entries of lazy symbol pointer sections to make - sure r_symbolnum was not R_ABS. The change was to first check that r_extern - is 0 and it is a local relocation entry before checking r_symbolnum == R_ABS - as external relocation entries are legal with PowerPC code. Was a problem - when the r_symbolnum was 0 as that is the save value as R_ABS for local - relocation entries. (Radar bug #2431435). -- Added the -segs_read_only_addr and -segs_read_write_addr options for - MH_SPLIT_SEGS. Radar bug #2415906. - -Changes for the 5.5 release (the cctools-312 release): -- Changed fine_reloc_output_address() in object.c to return the address of the - merged_symbol for a S_SYMBOL_STUBS section when the merged symbol is defined - in the cur_obj making the reference. To do this a merged_symbol field was - added to the fine_reloc structure and filled in in indirect_section_merge() - in indirect_sections.c. This is all needed to clean up after the compiler - that generates calls through lazy stubs for symbols forward defined in - the compliation unit. This is needed so that the dynamic linker can fully - bind library init routines without such references being called back into - dyld and then causing the init calls to be interleaved. Radar bug #2417690. - -Changes for the 5.5 release (the cctools-311 release): -- Fixed a bug in merge_symbols() dealing with N_EXCL's seen as created by a - previous ld -r pass. This caused gdb to print . Radar bug - 2415697. - -Changes for the 5.5 release (the cctools-310 release): -- Fixed a bug in search_dynamic_libs() in pass1.c where it was generating the - warning message for use of -bind_at_load incorrectly. Radar bug 2378121. -- Changed the order of the undefined symbols to not be sorted if -bind_at_load - is used to correct for a case when -bind_at_load was used and the dynamic - linker resolved the undefined symbols in a different order as to cause - multiply defined symbols. Radar bug 2378121. -- Fixed a bug in ld.c where it had a missing else so the -Sn ended up getting - an error as an unknown flag. Radar bug #2415456. - -Changes for the 5.5 release (the cctools-308 release): -- Fixed a bug in lookup_and_enter_include() in symbols.c at the end where it - was not correctly inserting the new hash bucket in the chain. Also made - -Si the default stripping. Radar bug #2410704. -- Also fixed a warning in coalesced_symbols.c when compiling for sparc on - Openstep 4.2. - -Changes for the 5.5 release (the cctools-307 release): -- Added the -Si option for stripping duplicate include stab groups (N_BINCL and - N_EINCL pairs). Also added the -Sn option to get the STRIP_NONE option when - the -Si option becomes the default. Added the code at the end of - merge_symbols() in symbols.c to determine which groups get excluded. Also - code was added in output_local_symbols() in symbols.c after the loop for - looping over the symbols to update N_BINCL's and create N_EXCL's. Radar bug - #2410704. -- Support for coalesced symbols has been added. Radar bug #2411273. -- Add a warning suggesting the use of -bind_at_load in search_dynamic_libs() in - pass1.c when lazy binding might produce different results when a definition of - a symbol is used from a dynamic library and there is an earilier dynamic - library that defines the same symbol. Radar bug #2378121. -- Added printing a line like "[Logging for Build & Integration] Used dynamic " - "library: dylib_name", where dylib_name is a dynamic library being used in - the link. This is done when the environment variable RC_TRACE_DYLIBS is set - and done in search_dynamic_libs() in pass1.c. Radar bug #2389955. - -Changes for the 5.4 release (the cctools-305 release): -- Fixed a bug when -U flags were used and LD_PREBIND was set the code in - process_undefineds() in symbols.c was setting errors and causing ld to exit - non-zero. - -Changes for the 5.4 release (the cctools-302 release): -- Fixed a bug in assign_output_symbol_indexes() in symbols.c for assigning the - output indexes of private extern symbols. This cause calls to private_extern - symbols through stubs to reference the wrong stub and thus call the wrong - routine. This showed up for calls to routines in libcc_dynamic.a when the - call was in a dynamic library (Radar bug #2374465). This resulted in throw() - and dynamic_cast() to crash when in a shared library. The Finder was the one - having these problems (Radar bugs 2369470 and 2364994). - -Changes for the 5.4 release (the cctools-301 release): -- Changed sections.c so that qsort_load_order_values() is not #ifdef'ed RLD - because it is used by coalesced_section_merge(). - -Changes for the 5.4 release (the cctools-300 release): -- Added the -init option for a dynamic shared library - initialization routine. This creates a new LC_ROUTINES load command to store - this information. -- The initial work for coalesced symbols has been added. This reads, deals - with duplicate coalesced symbols and writes out the sections. It does not - yet deal with relocation in a coalesced section or relocation to a coalesced - section. - -Changes for the 5.4 release (the cctools-296 release): -- For RC_OS=macos no longer build librld_static.a, the librld_pg.a version is - now copied as librld_profile.a and a link to librld_debug.a is made from - librld.a. - -Changes for the 5.3 release (the cctools-294 release): -- Fixed two bugs in scatter_copy() in sections.c that was trying to update the - values for INDIRECT_SYMBOL_LOCAL entries. There was a missing SWAP_LONG after - the value was read. Also after the call to error_with_cur_obj() it did not - return and the program then crashed. - -Changes for the 5.3 release (the cctools-292 release): -- Changed setting the default segment alignment to call get_segalign_from_flag() - in layout.c in layout() to allow setting the default segment alignment - to 4K for PowerPC and 8K for everything else. Radar bug #2277625. -- Added some braces to get rid of the warning message from the egcs compiler - "warning: suggest explicit braces to avoid ambiguous `else'". This was done - to pass1.c, sections.c and 8byte_literals.c . -- Changed the return type of main() in ld.c from void to int to remove a - warning from the egcs compiler. Also added a dummy return(0) to make the - compiler happy. -- Added -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders - to the Makefile as the egcs compiler's cpp no longer searches this by default. - This is needed to pick up for use with the rld interface. - -Changes for the 5.3 release (the cctools-291 release): -- Made a fix to the ld -r change in cctools-288. The indirect entries should - have only been changed for non-lazy sections. This change is in - output_indirect_symbols() in indirect_sections.c . This problem would show - up when executing a binary with the error from dyld: - dyld: /System/Applications/MailViewer.app/MailViewer Undefined symbols: - dyld_lazy_symbol_binding_entry_point - The problem in this case was the Message framework built with the ld(1) that - had the bug. This also has been seen in Carbon apps, with the problem the - libbase. - -Changes for the 5.3 release (the cctools-288 release): -- Changed ld(1) when doing an ld -r with an indirect entry for a private_extern - to change the indirect symbol to INDIRECT_SYMBOL_LOCAL or INDIRECT_SYMBOL_ABS. - This problem showed up when building the Message framework and would get the - error from ld: "ld: indirect symbol:_y can not be a private extern". - And also showed up in building Carbon when using strip which would produce the - error message from ld: "ld: x.o indirect symbol table entry 0 past the end of - the symbol table". -- Fixed ld(1) so it would handle INDIRECT_SYMBOL_ABS and relocate the values - of symbol pointers with INDIRECT_SYMBOL_LOCAL indirect table entries. - Changes to sections.c and indirect_sections.c . This problem could be run - into in one of three ways when a global symbol is changed to a non-global, - via private_extern and ld -r, via nmedit and via strip. -- Changed the message printed when the environment variable RC_TRACE_ARCHIVES - is set from: "RC_TRACE_ARCHIVES archive_name" to: "[Logging for Build & - Integration] Used static archive: archive_name". Radar bug #2310273. - -Changes for the 5.3 release (the cctools-286 release): -- Change the use of the i386 cpp macro to __i386__ and ppc to __ppc__ -- Added the support for the module termination section. This effected the files - sections.c, pass1.c, mod_sections.c (renamed from modinit_sections.c), - mod_sections.h (renamed from modinit_sections.h), pass2.c, and objects.h. - The code to handle setting the module table entries in output_dylib_tables() - in symbols.c is #ifdef'ed DYLIB_TERM and not compiled in yet. - -Changes for the 5.3 release (the cctools-285 release): -- Removed a warning in ld.c that stated -keep_private_externs must be used with - -dynamic. -- Fixed a bug in check_cur_obj() in pass1.c that was printing an error: - "indirect symbol table entry 353 past the end of the symbol table" - if an indirect symbol table entry had the value INDIRECT_SYMBOL_LOCAL or - INDIRECT_SYMBOL_ABS which can get created by strip(1). Found when the - CoreGraphics framework was stripped removing two globals and then the - resulting framework was linked against. -- Added printing a line like "RC_TRACE_ARCHIVES archive_name", where - archive_name is a archive being used in the output of the link. - This is done when the environment variable RC_TRACE_ARCHIVES is set. - Radar bug #2303376. -- Changed the Makefile to build librld.a, librld_pg.a and librld_static.a in - $(DSTROOT)/Local/Developer/System for MacOS X, that is when $(RC_OS) is macos. - This to allow System framework to be built without using SUBLIBROOTS. - Radar bug #2268413. - -Changes for the 5.3 release, MacOS X bring up (the cctools-282 release): -- Changed task_self() to mach_task_self() for MacOS X. Also included - "stuff/openstep_mach.h" for macros to allow it to still build on Openstep. - Also changed ifdef's __SLICK__ to __OPENSTEP__. -- Ifdef'ed __MACH30__ make.defs for mach_port_t vs mach_port. Also ifdef'ed out - netname_look_up() call and #include for __MACH30__ in - ld.c (these are not yet in the SDK). -- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. -- Changed ld.c to #ifndef'ed __MACH30__ out #include -- Changed make.defs to use mach_port_t instead of port_t . -- Changed the Makefile to use MIG = $(NEXT_ROOT)/usr/bin/mig and $(MIG). -- Chanded the Makefile to have mwcc use the -dependency-file option now that - it does not cause build problems. -- Changed the line rld_unload_all(FALSE, 1); to rld_unload_all(NULL, 1); in - sa_rld_internal() so it would compile with the MetroWerks compiler. - -Changes for the 5.2 release (the cctools-275 release): -- Fixed a bug in layout_dylib_tables() in symbols.c that was still using the - ar_name from the archive header when creating a dylib module name. Now it - uses the ar_name and ar_name_size fields from cur_obj. Radar bug #2239283. - -Changes for the 5.2 release (the cctools-274 release): -- Changed the way segment addresses for segments without specified addresses are - set. In layout_segments() in layout.c the first segment is set to zero. - Except in the MH_EXECUTE case with a pagezero segment in which it follows the - pagezero segment. Then for all other unassigned segments the addresses of - is set to the next available address after the first segment that the vmsize - if the segment will fit. This is done in the new routine next_vmaddr(). - Radar bug #2237029. -- Added a test in reloc_output_for_dyld() in sections.c to detect the case when - the r_address of a prebound lazy pointer relocation entry overflows because - the first segment is too far away from the item to be relocated. Radar bug - #2237029. - -Changes for the 5.2 release (the cctools-272 release): -- Added sa_rld_with_symtab() like sa_rld() but also passes the symbol table and - string table in. Radar bug #2231758. - -Changes for the 5.2 release (the cctools-267 release): -- Made the source code compile with MetroWerks compiler. Radar bug #2227678. -- Changed the default for -read_only_reloc to error from warning. Radar bug - #2227470. -- Fixed a bug in layout_ordered_section() in sections.c on line 1143 and removed - the code that was dealing specially with zero sized blocks. Radar bug - #2226458. -- Added all the suport needed for the 4.4BSD extended format #1. Radar bug - #1670513. - -Changes for the 5.1 release (the cctools-265 release): -- Changed the headerpad to the sizeof two section headers so objcunique will - work. Radar bug #2224571. - -Changes for the 5.1 release (the cctools-260 release): -- Added -c to all the install commands in the Makefile. - -Changes for the 5.1 release (the cctools-254 release): -- Added the rld function rld_write_symfile() to be used by the kern loader. - -Changes for the 5.1 release (the cctools-253 release): -- Changed the Makefile so /bin is not created for Rhapsody builds. -- Changed the default Framework search path to match the new directory - layout for Preimer. - -Changes for the 5.1 release (the cctools-251 release): -- Corrected the cctools-249 fix to add_dynamic_lib() in pass1.c . Both the - fields dylib_file and file_name needed to be set and only dylib_file was - being set. - -Changes for the 5.1 release (the cctools-249 release): -- Fixed a bug in layout_segments() in layout.c where MH_PREBOUND was getting - set into the output mach header before check_for_overlapping_segments() was - called which could turn off prebinding. -- Fixed a bug in add_dynamic_lib() in pass1.c when $NEXT_ROOT was set and - prebinding was enabled. The bug caused the library name with $NEXT_ROOT - appended to be recorded in the LC_PREBOUND_DYLIB commands. The fix was not - to change dylib_name in add_dynamic_lib() but to set dylib_file with the - prepended $NEXT_ROOT if set. -- Fixed a bug in output_merged_symbols() in symbols.c when indirect symbols are - readied for output when prebinding is enabled. Indirect symbols were - incorrectly being turned in to prebound undefined symbols. This would cause - redo_prebinding to later fail because of undefined symbols (provided strip - was run on the output and regrouped the symbol with the undefined symbols). - This was causing the WindowServer to fail redo_prebinding with undefined - symbols. - -Changes for the 5.1 release (the cctools-247 release): -- Added MKDIRS if code to the Makefile to build native on Rhapsody. -- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody - where tar does not. -- Changed the Makefile so profiled objects get built for RC_OS teflon. -- Changed the Makefile to install the ld only in /usr/bin for RC_OS teflon - and in /bin for RC_OS nextstep. Removed the creation of symbolic links - (Radar 1672088). -- Changed the code ifdef __TEFLON__ to ifndef __SLICK__ (where __TEFLON__ will - nolonger be defined for Rhapsody builds) so the default builds will be native - Rhapsody builds. The changes were to ld.c, pass1.c, rld.c and ld.h . - -Changes for the 5.0 release (the cctools-246 release): -- Changed in ppc_reloc.c other_half from unsigned short to unsigned long so - PPC_RELOC_JBSR can store 32 bit values there and target address are no longer - truncated to 16 bits. - -Changes for the 5.0 release (the cctools-245 release): -- Fixed the symbolic link from /usr/bin/ld to ../../bin/ld (Radar 1672088). - -Changes for the 5.0 release (the cctools-243 release): -- Added a symbolic link from /usr/bin/ld to $(DSTROOT)/bin/ld (Radar 1672088). - -Changes for the 5.0 release (the cctools-240 release): -- Fixed a bug in indirect_section_merge() in indirect_sections.c when prebinding - PowerPC -dynamic code gen. PowerPC relocation entries for lazy symbol - pointers have external relocation entries. This was not taken into account - when counting the relocation entries in the case of prebinding. - -Changes for the 5.0 release (the cctools-236 release): -- Added the sarld_build target to the lib_ofiles target. - -Changes for the 5.0 release (the cctools-235 release): -- Added handling of PPC_RELOC_JBSR to ppc_reloc.c . -- Fixed the PPC_RELOC_BR24 to correctly check for overflow. It now checks - the top 7 (not 6) bits are the same. -- Removed two warnings in pass1.c checking ran_off for less than zero (it is - unsigned). - -Changes for the 5.0 release (the cctools-234 release): -- Removed the last check in legal_reference() in indirect_sections.c which made - sure a lazy symbol pointer pointed into a stub. This is because for ppc lazy - symbol pointers point to dyld_stub_binding_helper directly and there is no - second half of the stub used (Radar #1661985). - -Changes for the 5.0 release (the cctools-233 release): -- Removed the hack in layout_segments to ignore -seg1addr's greater than - 0x4000000 for dynamic libraries for PowerPC. - -Changes for the 5.0 release (the cctools-225 release): -- Fixes a bug left from the NRW linker where executables did not have a - __PAGEZERO segment. -- Added a hack in layout_segments to ignore -seg1addr's greater than 0x4000000 - for dynamic libraries for PowerPC. - -Changes for the 5.0 release (the cctools-224 release): -- Fixed a bug in define_common_symbols() in symbols.c which when defining common - symbols when a common section exists in the input .o files which has an - alignment less than the alignment needed for the common symbols being defined - by the link editor. -- Changed including to which uses unsigned long - instead of off_t (64 bits on Teflon). -- Fixed a warning in pass1.c. - -Changes for the 5.0 release (the cctools-223 release): -- Put back the changes to rld.c ifdef __TEFLON__. - -Changes for the 5.0 release (the cctools-222 release): -- Fixed a bug in ppc_reloc where it was not correctly calculating the immediate - of a HA16 reloc by checking the 0x8000 bit of the other half and and sign - extending it and adding it to form the correct immediate. -- Added -stack_size option to set the stack size. This creates a __UNIXSTACK - section. The bulk of the work in in layout_segments() in layout.c with new - functions added to arch.c in libstuff to support stack direction, default - size and address. -- Added -stack_addr option to set the stack pointer. Added a second state to - the struct thread_info because the hppa's stack pointer is in another flavor - of thread state. -- Removed a check in indirect_section_merge() in indirect_sections.c which was - checking to make sure a local relocation entry for a lazy symbol pointer was - pointing into a symbol stub section. With the change to allow lazy symbol - pointers to have external relocations (for PowerPC pointers using - dyld_stub_binding_helper) after an object has been "ld -r" (in this case - crt1.o) the lazy symbol pointer is a local relocation entry. - -Changes for the 5.0 release (the cctools-221.6 and cctools-222 releases): -- Picked up changes to rld.c for use of _NXArgv and __mh_execute_header to use - _NSGetArgv() and _NSGetMachExecuteHeader(). - -Changes for the 5.0 release (the cctools-221.2 and cctools-222 releases): -- Picked up changed layout.c to which changed the variable ppc to powerpc - because the PowerPC compiler defines the cpp macro ppc to 1. - -Changes for the 5.0 release (the cctools-221.1 and cctools-222 releases): -- Picked up changed to the Makefile to not build profile objects for teflon. - This is because the PowerPC compiler core dumps with -pg. - -Changes for the 5.0 release (the cctools-221 release): -- Picked up the changes for the correct Rhapsody thread state changes into - layout.c. - -Changes for the 5.0 release (the cctools-220 release): -- Fixed a bug in add_dynamic_lib() in pass1.c that was not prepending $NEXT_ROOT - to the paths of dependent dynamic libraries. - -Changes for the 5.0 release (the cctools-218 release): -- Added hacks to pad pure instruction sections of i386 outputs with nop's - (opcode 0x90) to clean up dissassembly. This is done in output_section() - secions.c and in the new function nop_pure_instruction_scattered_sections() - (bug #77806). -- Added .section_align to like .section_offset . - This causes the next item to be placed on the power of 2 alignment of - align_value (bug #77807). - -Changes for the 5.0 release (the cctools-218 release): -- Fixed a warning with "static jmp_buf rld_env's initializer" in rld.c which - needed an ifdef for i386. - -Changes for the 5.0 release (the cctools-216 release): -- Made changes to allow external relocation entries for lazy symbol pointer - sections. First had to remove a test in indirect_section_merge() in - indirect_sections.c which checked that relocation entries in lazy pointers - sections must not have external relocation entries. Just below that I added - the checks needed for external relocation entries. Second in each of the - relocation routines I added just after the update_reloc: label the changing - of an extern relocation to a prebound lazy pointer if needed. -- Changed ld.c to just include libc.h for Teflon. - -Changes for the 5.0 release (the cctools-215 release): -- Added the $(RC_OS) trick to the all target as well as the lib_ofiles target so - this will build on the Teflon SDK. -- Added #include in ld.c on the #ifdef __TEFLON__ side so O_RDONLY - does not come up undefined with the Teflon SDK. -- Added support for the PowerPC section difference HI16, LO16 and HA16 - relocation types. - -Changes for the 4.2 & 5.0 releases (the cctools-213 & cctools-209.3 releases): -- Fixed a bug in check_dylibs_for_definition() where it was printing the module - name of the dynamic library wrong because it was using strings where it should - have been using p->strings. -- Fixed a typo in an error message in open_dylib() in pass1.c where "effected" - should have been "affected" (bug #77070). -- Fixed a bug where prebinding was not getting done when a private extern was - overridding a symbol in a dependent library. The fix was not to check - private externs in prebinding_check_for_dylib_override_symbols() in pass1.c - -Changes for the 5.0 release (the cctools-212 release): -- Fixed a bug where $NEXT_ROOT did not prefix standard framework paths. Also - fixed -Z to not use standard framework paths. - -Changes for the 5.0 release (the cctools-211 release): -- Integrated changes to allow teflon builds (RC_OS=teflon or RC_OS=nextstep) to - not build shlib_ofiles in the Makefile. Also changes in the sources to not - include for __TEFLON__ builds. - -Changes for the 5.0 release (the cctools-210 release): -- Changed the default starting address for ppc to 0 (layout.c). -- Changed m98k to ppc. - -Changes for the 4.2 release (the cctools-209.1 release): -- Added -image_base as the same as -seg1addr. - -Changes for the 5.0 release (the cctools-208 release): -- Added code to prepend the value of the environment variable NEXT_ROOT to the - standard paths if it is set. This is to support the TEFLON cross build - environment. All changes are in ld.c - -Changes for the 4.2 and 4.1 patch release (the cctools-207 release): -- Ifdef'ed out the warning about an archive library following a dynamic shared - library. This is so that libcc_dynamic.a will not produce this warning when - it is linked into all images. - -Changes for the 4.2 release (the cctools-205 release): -- Added telling PB "Architecture Mismatch" when a error for -arch_errors_fatal - gets printed. (bug #74032) - -Changes for the 4.2 release (the cctools-204 release): -- Fixed a typo in an error message in pass1.c. "prebinding disabled because of - symbols overridded in dependent dynamic shared libraries" where "overridded" - was changed to "overridden" (bug #71334). - -Changes for the 4.0 release (the cctools-201 release): -- Changed internal_rld_load() to call the constructors (and profiling stuff) - only if the base file is the executable. This was causing the debugger to - crash when debugging a bundle with C++ constructors (bug #66200). - -Changes for the 4.0 release (the cctools-200 release): -- Changed fine_reloc_output_address() to not cause an internal error when you - have a fine reloc for a non-lazy symbol pointer section. This can result with - private externs and doing an ld -r first and then doing an ld on the result - (bug #65823). - -Changes for the 4.0 release (the cctools-199 release): -- Fix to bug fix 65292 in cctools-197 which was still wrong and causing all - programs with these warnings to be fatal because error() was called and not - warning(). More logic was added to fix this (bug #65633). - -Changes for the 4.0 release (the cctools-198 release): -- Fix to ld that bug fix 65292 introduced in cctools-197 which was causing - -fvmlibs to fail to build because of prebinding warnings (bug #65451). - -Changes for the 4.0 release (the cctools-197 release): -- Changed ld so that when prebinding is being done and -U's are used for allowed - undefined symbols these symbols are printed if prebinding is being disabled - because of undefined symbols (bug #65292). -- Changed ld so that the warning message "ld: warning using file: x for - reference to dynamic shared library from: y because no -dylib_file specified" - because it is felt to be distracting (bug #65276). - -Changes for the 4.0 release (the cctools-195 release): -- Fixed a bug reset_prebound_undefines() when dealing with indirect symbols that - are defined when prebinding. The desc field should not have been changed as - it changes the type of reference (lazy or non-lazy) as well as the - REFERENCED_DYNAMICALLY bit (bug #64885). - -Changes for the 4.0 release (the cctools-192 release): -- Changed the default header pad from 0 to the sizeof a section struct so that - /bin/objcunique can always add a section header (bug #63516). - -Changes for the 4.0 release (the cctools-176 release): -- Change the default protection to not include execute unless the segment - contains sections with instructions. Also don't set execute on the linkedit - segment (bug #58445). - -Changes for the 4.0 release (the cctools-175 release): -- Disabled prebinding if -dynamic not set. Also don't use LD_PREBIND if -r - is set to avoid warnings. - -Changes for the 4.0 release (the cctools-174 release): -- Added building dynamic_ofiles for the lib_ofiles (RC bootstrap) target in - the Makefile. - -Changes for the 4.0 release (the cctools-173 release): -- Disallowed -prebind with -bundle. -- Added the setting of -prebind via the environment variable LD_PREBIND. -- Added the LC_PREBOUND_DYLIB load command to record which modules were linked - from a dynamic library that was prebound. -- Fixed a bug when an N_INDR symbol chain had symbols from both dylibs and - non-dylibs. The specific problem was when -i_os_fcvt:_fcvt was on the - command line and there was an object in the dynamic libsys that defined _fcvt - as an indirect for __fcvt. Then both the indirect symbol table entry for - _os_fcvt and the symbol table entry for _os_fcvt were bad because the symbol - _fcvt from the dylib does not appear in the output file. To fix this a - structure of pairs of merged_symbols and indr_symbols was created in - reduce_indr_symbols() and used in output_merged_symbols() and - merge_indirect_sections(). - -Changes for the 4.0 release (the cctools-172 release): -- Fixed a bug in count_relocs() where it should not have reduced the N_INDR - symbol if it was defined in a dylib (line 2720 in sections.c). -- Changed it so that when prebinding an executable the local relocation entries - for lazy symbol pointers are saved. This must be done even if prebinding - fails after indirect_section_merge() has been call so that the number of - relocation entries does not change after layout. This effected layout.c - by setting the new boolean save_lazy_symbol_pointer_relocs to the value of - prebinding just before merge_literal_sections() is called. Then this boolean - is used in indirect_section_merge() and reloc_output_for_dyld() to count and - put out the relocation entries. -- Fixed a bug in all the *_reloc.c relocation routines when updating the - relocation entry. The problem was when the relocation entry was an external - and the merged symbol was a prebound undefined (N_PBUD) the relocation entry - should not have been turned into a local relocation entry. -- Changed the checking that prebinding_check_for_dylib_override_symbols() does - to only fail if the symbol is overridden and the the symbols is referenced in - a dylib. To do this the routine check_dylibs_for_reference() was added and - called from check_dylibs_for_definition() in pass1.c. - -Changes for the 4.0 release (the cctools-171 release): -- Fixed a in indirect_section_merge() in indirect_sections.c at line 277 where - if the symbol is an N_INDR and not defined in a dylib the indirection needed - to be reduced so the setting of indirect_defined is done correctly - (bug #57113). - -Changes for the 4.0 release (the cctools-170 release): -- Picked up a bug fix to sparc_reloc.c for SPARC_RELOC_HI22_SECTDIFF where - immediate did not have value added to it but rather an incorrect expression. -- Added prebinding_check_for_dylib_override_symbols() to check when prebinding - that no symbols in dependendent dylibs are overridden and if so disable - prebinding and print a warning. The call in made in layout.c and the routine - is in pass1.c (since the searching stuff for dylibs in in there). -- Overlap checking of dylibs and the program being linked was added by first - changing check_overlap() to take the bool argument prebind_check and if it is - FALSE to do as it did and if TRUE print the over lap as a warning why - prebinding is being disabled. Second check_for_overlapping_segments() adding - the dylib segments to the list if prebinding and adding a loop to check the - segments with check_overlap() and prebind_check == TRUE. -- To allow prepare for overlap checking of dylibs and the program being linked: - add_dylib_segment() was added to dylibs.c. Then search_dynamic_libs() a had - loop added to it to collect dylib segments. -- To allow prepare for overlap checking of dylibs and the program being linked - process_undefineds() was broken up so the the reseting of prebound undefineds - is now done in reset_prebound_undefines(). So reset_prebound_undefines() is - called after layout_segments() where overlap checking will be done and may - disable prebinding if there is overlap. This turned up three problems. - The first in assign_output_symbol_indexes() which needed to treat N_INDR - from a defined in a dylib as an undefined symbol (this same problem was in - count_relocs() and in one missed place in indirect_section_merge(). The - second in count_relocs() which needed to treat an N_PBUD as an undefined - symbol. -- Fix the problem with "link order" object for dyld output file being "loaded" - twice warning when scattered loading. This was a result of the common object - and the module for the dylibs having the same name. The change was to add - quotes around the name "\"link order\"" for the common object so they would - have different names. -- Changed scatter_copy() in sections.c to do the same for lazy symbol pointer - sections as for non-lazy symbol pointer section if prebinding. That is use - the value of the indirect symbol. This also required an if prebinding == - TRUE to be or'ed with indirect_defined test. This also gets the value's - of non-lazy symbol pointer set when prebinding. -- Changed the *_reloc.c routines for external relocation entries to use the - n_value of the symbol for MH_DYLIB's when prebinding. When updating the - non-scattered local relocation entries if prebinding and it is a lazy symbol - pointer section the relocation entry is turned into a _PB_LA_PTR relocation - type with the non-prebound value of the lazy symbol pointer saved in r_value. -- Turned off prebinding in process_undefineds() in symbols.c when there are - undefined symbols and print a warning. Then if prebinding is still in effect - the undefined symbols are not turned back into undefined symbols but left - as prebound undefined symbols. -- Turned off prebinding when in search_dynamic_libs() when open_dylib() fails - to open a dependent dynamic library and print a warning. Also turned off - if a dependent dynamic library is not prebound and print a warning. -- Turned off prebinding when -undefined suppress is set in ld.c and print a - warning. -- Added -prebind and -noprebind options to ld.c and the global prebinding. - -Changes for the 4.0 release (the cctools-169.2 release): -- Fixed a bug in the hppa relocation for JBSR's with fine relocation. The fine - reloc case was missing the check for r_extern == 1 in the case of MH_DYLIB - which the non fine reloc case had (line 735). - -Changes for the 4.0 release (the cctools-168 release): -- Added creating a symbolic link to dynamic_profile_obj from profile_obj. -- Added an optional suffix to "-framework Foo,suffix" which first searches for - the framework with the suffix and then without. -- Change the version numbers of dynamic library to the form X[.Y[.Z]] to match - how next does versioning of it's projects. This effected libtool(1), ld(1), - otool(1), dyld, libstuff(version_number.c) and man pages for ld and libtool - bug #55627). In here the changes were in ld.c . - -Changes for the 4.0 PR1 release (the cctools-166.3 and cctools-167 releases): -- Changed the merge_symbols() routine to propagate the REFERENCED_DYNAMICALLY - bit from undefined symbols in to the merged symbol table. This is used to - solve the problem with the symbols in crt1.o (and __mh_execute_header) in - a dynamicly linked program where they are used by libsys via _dyld_lookup_ - and_bind() but get stripped by strip(1) because they don't have the - REFERENCED_DYNAMICALLY bit set. This also requires crt1.o to have this - bit set for the symbols it defineds and for __mh_execute_header. Which is - done with the .desc assembler directive (bug #54660). - -Changes for the 4.0 PR1 release (the cctools-166.1 and cctools-167 releases): -- Fixed a bug in lookup_symbol where the test case for the internal error of - the lookup failing was off by one (bug #53390). - -Changes for the 4.0 release (the cctools-166 release): -- Changed the reference to NXArgv and _mh_execute_header in rld.c to use - _dyld_lookup_and_bind() in the case of __DYNAMIC__ . -- Changed the use of the cpp macro DYNAMIC (set by the Makefile) to __DYNAMIC__ - (set by the compiler when -dynamic is in effect). -- Removed -fomit-frame-pointer because of compiler bug with -dynamic (bug - #52986). - -Changes for the 4.0 release (the cctools-164 release): -- Fixed a bug in output_flush() in pass2.c that was causing the internal error - "first block written_offset not 0" in final_output_flush(). The fix to - output_flush() was to not set written_offset to the rounded offset, but rather - zero, when the offset is less than the pagesize and nothing got written from - the block. This happens only for the first page. -- Added the -arch_errors_fatal flag to make mis-matching architectures errors - fatal. - -Changes for the 4.0 release (the cctools-163 release): -- Changed the default to -dynamic. This is done in ld.c with: - enum bool dynamic = TRUE; - -Changes for the 4.0 release (the cctools-161 release): -- Added in the Makefile passing -DDYNAMIC for things built with -dynamic - Then ifdef'ed out some const's in section.[ch] and symbols.c with DYNAMIC so - that when this is put in a dynamic shared library it does not have relocation - entries in a read-only section. -- Fixed a bug that caused the error message that an indirect symbol could not be - a private_extern symbol when -keep_private_externs was on with -r. The fix - was in indirect_sections.c where the if condition for the error checked for - private extern bit this "(...nlist.n_type & N_EXT) != N_EXT" condition was - also added. -- Added checking for relocation entries in read only sections when the output - is for the dynamic linker. This is controled by the flag -read_only_relocs - which takes arguments {error,warning,suppress} where warning is the default. - This checking is done in reloc_output_for_dyld() in sections.c and has some - functions in symbols.c to clear and flag symbols based on a bit in the merged - symbol structure. - -Changes for the 4.0 release (the cctools-157 release): -- Fixed a bug in ld that caused dynamic libraries built with dependent dynamic - librarys to have bad table of contents. - -Changes for the 4.0 release (the cctools-154 release): -- Added marking symbols defined in the output file referenced from a dylib with - REFERENCED_DYNAMICALLY in the n_desc field. - -Changes for the 4.0 release (the cctools-153 release): -- Fix a problem with the cctools-151 change that showed up in - indirect_section_merge() because it was checking the section's flags for - correctness and the "link editor" created object did not copy the flags. - So the quick fix was to add if s->size == 0 then return. - -Changes for the 4.0 release (the cctools-152 release): -- Fixed an error check in check_cur_obj() in pass1.c() that was checking the - irefsym field of a module table entry against size of the symbol table - instead of the size of the reference table. - -Changes for the 4.0 release (the cctools-151 release): -- Fixed a bug in setting the value of non-lazy pointers for link editor defined - symbols. The problem was that indirect sections were merged before the - link editor defined symbols were set up so the appeared to not be defined and - their value was never set in the non-lazy pointer. The fix was in layout.c - to just reorder the calls setup of these symbols before the merge of literal - sections. - -Changes for the 4.0 release (the cctools-150 release): -- Changed the profiled objects to be compiled with -dynamic. -- Changed everything to use __private_extern__ . -- Changed to allow private externs without the -dynamic flag. -- Added a check in indirect_section_merge() to treat an indirect symbol that - turns out to be a private extern as an error. -- Added a vm_protect() call for the rld memory to turn on execute protection. - This is needed as the kernel has changed to not include VM_PROT_EXECUTE on - vm_allocate()'ed memory. Without this it fails on the hppa which uses this - in it's hardware (bug #50860) - -Changes for the 4.0 release (the cctools-149 release): -- Fixed a problem with standard_framework_dirs[] that the strings did not - contain a trailing /. -- Added the -filelist list[,dirname] option to ld (bug #50779). -- Added the -bind_at_load option that marks the output with MH_BINDATLOAD in - the mach header. This is not allowed for dynamic libraries. - -Changes for the 4.0 release (the cctools-148 release): -- Changed how the librld builds. It now builds 4 objects. One for the - following uses: static, dynamic, profiled and shlib. Also added the -static - flag to sarld building. -- Fixed a bug in fine_reloc_output_sectnum() in objects.c returned the wrong - section number where if an indirect section's relocation entry refered to an - merged_symbol who's n_type was N_INDR and the indirection was not removed. - This resulted on getting an internal error in output_section() for the count - of local relocation entries. This was found when linking dyld when it was - compiled with -dynamic. - -Changes for the 4.0 release (the cctools-147 release): -- Changed -framework Foo and removed the .dylib at the end of the name to be - search for. -- Fixed yet another problem with not getting the local relocation entrys right - when output_for_dyld. The problem was that code that was added in - count_reloc() to fake the relocation to get the correct resulting r_symbolnum - was not working. In merge_section() only S_SYMBOL_STUBS sections were - getting ms->output_sectnum set to 1 (a non-NO_SECT value) when all sections - needed this. So this is now done for all sections. - -Changes for the 4.0 release (the cctools-146 release): -- Fixed a bug in linking dylibs across byte sex. The symbol table was not - swapped before it was used in searching in pass1. This was added and a check - for MH_DYLIB was added in symbols.c to not swap it again. -- Fixed a problem where creating sparc binaries on a little endian machine - did not get the 6 reserved bits of the psw correct. The fix was in libstuff - swap_sparc_thread_state_regs() (bug #49685). This was CCC approved for - 3.3risc and a cctools-142.1 clone with just this fix was submitted. - -Changes for the 4.0 release (the cctools-144 release): -- Fixed a bug in in -preload introduced in cctools-143 when support for - undefined checking against dylibs was added. - -Changes for the 4.0 release (the cctools-143 release): -- Added support for undefined checking against dylibs. -- Made a change to parse_order_line() in sections.c to parse out an objective-C - symbol name differently to handle the problem with 3.2 C++ compiler where the - symbol name (McCaw's problem). This should not really be in 4.0 as the 3.3 - and later C++ compilers do not have this problem. -- Fixed a bug in rld code in remove_objects() in objects.c where cur_obj was - being used instead of object_file to test for the undefined_list and free - it. - -Changes for the 4.0 release (the cctools-142 release): -- Fixed the call to pass1() in rld.c to added the extra argument for frameworks. - -Changes for the 4.0 release (the cctools-141 release): -- Made ld search all frameworks specified with -framework (e.g. -framework Foo) - in the framework search path as Foo.framework/Foo.dylib. Default path is - /LocalLibrary/Frameworks, /NextLibrary/Frameworks . Additional search - directories can be specified with -Fdir . -- Added the -no_arch_warnings for libtool to use which prevents warnings - for file which don't have the correct architecture for the -arch flag. -- Fixed an edge case in all relocation routines for scattered relocation entries - where the last address past then end of the last section is referenced. In - this case it was getting an out of range error when infact an address could be - referenced as the last address of all of the sections if a lable exist with no - data following it. -- Fixed the spelling of "compatibility" in the compatibility_version for dylibs. -- Fixed a bug in hppa_reloc() for MH_DYLIB files where a check on line 914 was - checking merged_symbol's type without checking r_extern == 1 to see if - merged_symbol was valid (bug #48008). - -Changes for the 4.0 release (the cctools-140 release): -- Picked up sparc changes to sparc_reloc.c which fixes scattered relocation - problems. - -Changes for the 4.0 release (the cctools-138 release): -- Added the MH_BUNDLE object file type to be used with NSLinkModule(). -- Fixed a bug in reporting common symbols for -dylib where the wrong object file - was referenced. The fix was in merge_symbol() when an merged symbol changes - from an undefined to a common the definition_object needed to be assigned to - the current object. -- Fixed a bunch of bugs in getting the right relocation entries out for ld -r - with indirect sections. The approach now taken is to relocate all things - who's contents are not used in the output to past the end of the section and - then the r_address after relocation can be used to determine if the relocation - entry is to be saved. - -Changes for the 4.0 release (the cctools-137 release): -- Picked up sparc_reloc.c. -- Added the -Y n flag to print n references to undefined symbols (bug #46166). -- Fixed a problem with parsing -dynamic which ate the next argument (crt1.o in - the case used by the driver). -- Fixed a bug when using -output_for_dyld and libsys local relocation entrys - were not correct because a local relocation entry to a symbol stub that is - eliminated because the symbol is defined as an N_ABS symbol causes the - relocation entry to be need to be saved even though it started out as a local - r_pcrel but now refers to an N_ABS symbol. The fix was in count_reloc() in - sections.c to fake doing the relocation on such an item to get the correct - resulting r_symbolnum (which in this case is N_ABS) which will then be used - to determine if the relocation entry is pic. -- Fixed a bug in sparc_reloc() for the SPARC_RELOC_WDISP30 relocation type for - scattered loading which was a copy and paste error that did not set "value" - but rather "offset" when picking up the item to be relocated for a local - relocation entry with fine relocation. - -Changes for the 4.0 release (the cctools-134 release): -- Fixed a bug in ld -M in printing the map that core dumps. There was a use of - cur_obj in a couple of places that should have been object_file in layout.c - when testing the dylib and dylinker fields (bug #44619). - -Changes for the 4.0 release (the cctools-133 release): -- Picked up sparc changes to layout.c for the name changes of the sparc thread. -- Fixed a bug in fine_reloc_output_address() in object.c that was testing for - non-lazy not lazy section pointers and cause a fatal internal error when a - defined symbol had a symbol stub entry and a lazy symbol. -- Changed it so that undefined symbols are not allowed if the output is a - dynamic linker. -- Fixed a bug in rld that didn't get the alignment right because the header_size - was not rounded to the maximium section alignment which was used as the - starting address (bug #44241). -- Added three Project builder messages, "Link errors", "Undefined symbols" and - "Multiply defined symbols" to ld (bug #40745). -- Fixed a bug for hppa in the relocation for JBSR's in MH_DYLIBS for external - relocation entries. This should not have relocated a JBSR to the defined - external for MH_DYLIBS if the symbol was not a private_extern. - -Changes for the 4.0 release (the cctools-132 release): -- Picked up sparc changes to sections.c for sparc relocation. -- Picked up sparc changes to layout.c for sparc thread. -- Picked up new sparc files sparc_reloc.h and sparc_reloc.c and change the - Makefile. -- Added -dynamic to eventually replace -NEXTSTEP-deployment-target 3.3 and - -static to eventually replace -NEXTSTEP-deployment-target 3.2. Changed all - the incompatiblity error messages to use -dynamic. -- Removed the private externs from the toc for dylibs and desided to leave them - in the reference table. They could be pulled from the reference table but - then it would be harder to size and construct it as it would take another - pass to determine if an undefined symbol mached up with a private extern. - This still could be done later if space is an issue. It also could be an - issue if a library module with private externs wants to be unloaded or - replaced which may not be possible. -- Changed the way private externs are handled. Now the N_PEXT is never turned - off and symbols with this bit are always saved with the -x flag. This - effected a number of places. Also changed was the handling of non-lazy - pointers to allow private externs as the indirect symbol. This allowed - a non-external symbol (that was previouly a private extern) to be an indirect - symbol. This caused all sorts of changes to indirect symbols and the handling - of fine relocs. -- Changed hppa_reloc()'s handling of JBSR relocs for output_for_dyld for JBSR - undefined symbols. In this case the bl instruction is not changed so that - it will continue to point at the long branch stub (which in the case of - output_for_dyld should be targeted at symbol stub). -- Fixed a bug in hppa_reloc() for ld -r of JBSR reloc types for external - relocation entries turning into local when the symbol was defined as a - private extern with the N_SECT type. The problem was that n_type & N_TYPE - was not used but rather n_type == (N_EXT | N_SECT) when testing to determine - if the other_half needed to be adjusted. This same problem shows up in many - other places which have been corrected. -- For the hppa corrected the output when the output is for dyld so JBSR relocs - are never in the output. - This effected count_relocs() and reloc_output_for_dyld() in sections.c . - -Changes for the 3.3 release (the cctools-130 release): -- Fixed a problem with the CATS bug fix. In remove_set() in sets.c it was doing - a free() of the data structures not a memset() back to zero. - -Changes for the 3.3 release (the cctools-128 release): -- Removed the make app stuff (bug #40745) effected ld.c. -- Fixed an rld bug that CATS software found when loading more than 10 objects - with commons. The bug was that the sets data structure was being realloced - after 10 rld_load()'s and the merged_symbol structure for previous loaded - common symbols had a definition_object pointer pointing to the old memory. - The fix was to change the sets data structure and change the three structs - in there to pointers to pointers to structs and allocate each of those - structs. Effects sets.c sets.h symbols.c (bug #42703). -- Fixed a bug in rld where in set_merged_string_block_indexes() in pass2() was - not being called because it got if'ndefed RLD out (bug #42283) introduced in - cctools-122. - -Changes for the 3.3 release (the cctools-127 release): -- Changed the order of the symbol information to optimize dyld's memory use. - strip(1) has been changed to handle this new order. -- Fixed a bug where ld -r for indirect sections would not get the relocation - entries put out. The bug was in scatter_copy_relocs() that was calling - fine_reloc_offset_in_output() which should have been calling - fine_reloc_offset_in_output_for_output_offset(). Then the problem was that - fine_reloc_offset_in_output_for_output_offset() was not mapping to the correct - fine_reloc for use_contents == 0 because the output_offset was relocated using - a fine_reloc that it's output_offset did matter and was zero. This caused - fine_reloc_offset_in_output_for_output_offset() not to map the relocated - output_offset back to the correct fine_reloc. The fix to this problem was to - set output_offset in all the fine_relocs with use_contents == 0 before - relocation to the output_section's size so later the correct fine_reloc would - be mapped to and use_contents will have 0 for these. This is done in - output_section() in sections.c if the output is relocatable and it is for - an indirect section. -- Changed the thread command of a MH_DYLINKER from a LC_UNIXTHREAD to an - LC_THREAD (bug #42338). -- Fixed a bug where for MH_FVMLIB and MH_DYLIB formats commons were not traced - when found in define_common_symbols(). I removed the if test that caused - this routine to return for these formats I mistakenly added and not to drop - in to the loop to define them and also to trace the symbols. - -Changes for the 3.3 release (the cctools-125 release): -- Changed the temporary warning "current limitation: dynmaic linker used so - undefined symbols not reported" in layout_merged_symbols() in symbols.c to - not dependend on using a dylib but just rather having a dynamic linker - command and being output for dyld. - -Changes for the 3.3 release (the cctools-124 release): -- Temporarily added a the warning "current limitation: dynmaic linker used so - undefined symbols not reported" in layout_merged_symbols() in symbols.c. -- Added allowing fat object files in archives when -all_load is specified. This - was done in pass1_archive() in pass1.c. This was added to allow libtool to - use it when creating libs with -dynamic. -- Added a check for private externs if the deployment target is 3.2 to flag it - as incompatable. -- Changed define_common_symbols() in symbols.c to defined commons for when - output_for_dyld is TRUE. - -Changes for the 3.3 release (the cctools-122 release): -- Fixed a bug where the module names of a dylib did not have the right indexes. - The assignment of merged string blocks index's was moved from the function - output_merged_symbols() into a new function set_merged_string_block_indexes() - and called in pass2.c before output_dylib_tables(). -- Fixed a bug in reloc_output_for_dyld() for indirect sections where the call to - fine_reloc_offset_in_output() did not work because the r_address had been - relocated to the output address. So a new function that takes an - output_offset, fine_reloc_offset_in_output_for_output_offset(), was written - and is now used. This caused local relocation entries to be missing and the - link editor to get an internal error. -- Fixed a bug in merged_symbol_string_index() for rld which was crashing when - things got unloaded because the static var saved a pointer to a deallocated - string block (bug #41376). -- Added the -NEXTSTEP-deployment-target flag. Also added -k that implys 3.3. -- Added a bunch of checks based on the deployment target in the area of what - flags could be used (-dylib, etc) and checks for new sections in the input - files. Also added for deployment on 3.2 the removal of section attributes - so PURE_INSTRUCTION objects just work. -- Added searching for libx.dylib for -lx if deployment is not 3.2. - -Changes for the 3.3 release (the cctools-120 release): -- Fixed a bug in fine_reloc_output_address() in objects.c when a symbol stub's - indirect symbol table is for an N_INDR symbol the chain through the n_value - being a (struct merged_symbol *) was not followed. -- Fixed a bug when building MH_DYLINKER format where setup_link_editor_symbols() - should not have incremented dysymtab_command.nextrefsyms for MH_DYLINKER but - only for MH_DYLIB. This causes a flush overlap error. This fix is needed to - build the dynamic linker. -- Fixed a bug where the indirect symbol table was not swapped on cross links for - differing bytesex. The swaping was added in check_cur_obj() in pass1.c as - well as checking each entry that it is in range. -- Fixed a in all the *_reloc() routines with respect to relocating a sectdiff - entry where one of the values has fine relocation. The bug was that the value - that didn't have the fine relocation did not have it's *_map->offset (the - offset into the output section where this object file's section starts) added - in to calculate it's value. This effected all *_reloc.c routines (except - i860_reloc.c which has no fine relocs). -- Fixed a bug in generic_reloc() when pcrel_at_end_of_disp is TRUE (the i386 - case) for a pcrel external relocation entries in calculating the offset in the - item to relocated. Which is used to decide to create a scattered or local - reloc. This caused a flush overlap error when the relocation entry was tried - to be created that was not to be there for output_for_dyld. - -Changes for the 3.3 release (the cctools-119 release): -- Fixed the rld bug where C++ constructors/destructors were not called. The - fix is at the end of the internal_rld_load() where the it loops through the - section and does the call or registers it with atexit() (bug #40616). -- Added the S_ATTR_EXT_RELOC and S_ATTR_LOC_RELOC attributes to sections so the - dynamic linker can determine if it needs to vm_protect() it's segments. This - Was added in count_relocs() and layout_relocs_for_dyld() in sections.c. - -Changes for the 3.3 release (the cctools-118 release): -- Fixed a bug that when an "ld -arch xx -ifoo:bar" was done the target byte - sex was picked as the host bytesex not based on the -arch flag. The fix was - in ld.c to set target_byte_sex when a -arch flag was seen and later to not set - it to the host_byte_sex if a -arch flag was specified. - -Changes for the 3.3 release (the cctools-117 release): -- Fixes a bug in assign_output_symbol_indexes() in symbols.c for RLD which got - the internal error "internal error: assign_output_symbol_indexes() - inconsistent local symbol counts" because the loop that sets the indexes for - the local symbols did not have an ifdef RLD for skiping the objects not in the - current set. - -Changes for the 3.3 release (the cctools-116 release): -- Fixed a bug in layout() that did not allow an entry point if the first segment - did not have any non-zerofill segments and a -e option was specified. - -Changes for the 3.3 release (the cctools-115 release): -- Fixed what was included for the SA_RLD code so the the time() and qsort() - functions are not needed. Dis-allow all indirect sections for SA_RLD code - which allows merged_symbol_output_index() not to be needed and the symbol - table not to be ordered so qsort() in not needed. The need for time() was - because of time stamp for creating dylibs which was ifdef'ed SA_RLD out. -- Fixed a bug in legal_reference() in indirect_sections.c to allow references - to a symbol stub section not at the start of the stub by the symbol stub - itself which is what happens in pic symbol stubs. -- Made a change to what is allowed for indirect symbols. Previously only - undefined external symbols were allowed. Now - 1) Any external symbol is allowed as an indirect symbol (even if defined) - 2) A local symbol is allowed as an indirect symbol for a symbol stub and lazy - pointer section (which the stub and pointer will then always get removed). - -Changes for the 3.3 release (the cctools-114 release): -- Fixed a bug introduce in cctools-112 with command line created symbols, -i - options, that produce warnings when scatter loaded because the object file - "command line" was multiply loaded. -- Fifth major round of changes for the new shlib stuff. - 1) Added the code to produce and link with the dylinker format. - 2) Added the code to link with the dylib format (for now only the load command - is copied to the output file). - 3) Added the optimization to the link editor to use the value of the symbol - for a non-lazy pointer section if it is defined. This will allow the - compiler code generation to be developed and tested without the dynamic - linker). - -Changes for the 3.3 release (the cctools-113 release): -- Fixed a bug introduced in cctools-112 in outputing the relocatation entries - for S_LITERAL_POINTERS sections. Both ld -r and ld -output_for_dylib were - broken. The problem for ld -r was the counting of the relocation entries for - literal pointers was wrong. A new routine, count_relocs, was added in - literal_pointers.c based on if the literal pointer as newly seen. - -Changes for the 3.3 release (the cctools-112 release): -- Fixed a bug in the hppa reloc for scatter loading BL17 relocation types that - was always 8 past the target. "value -= 8;" was added in the local reloc case - with fine relocs. -- Forth major round of changes for the new shlib stuff. - 1) Added the code to produce the dylib format. New tables and relocation - info changes. - -Changes for the 3.3 release (the cctools-108 release): -- Third major round of changes for the new shlib stuff. - 1) Added the code to order the symbol table and string table. - -Changes for the 3.3 release (the cctools-104 release): -- Second major round of changes for the new shlib stuff. - 1) Added support for indirect sections and relocation to them when indirect - symbols get defined. -- Fixed a bug with the hppa JBSR reloc types (mostly when saving relocation - entries, scattered loading and non-zero based sections). -- Found and fixed a bug in the 3.2 released link editor. This bug happens when - relocation entries are saved and there are scattered relocation entries which - reference a section with fine relocation the r_value field is not updated - correctly. The code was: - sreloc->r_value = fine_reloc_output_offset(local_map, - r_value - local_map->s->addr) + - local_map->output_section->s.addr + local_map->offset; - which was corrected to: - sreloc->r_value = fine_reloc_output_offset(local_map, - r_value - local_map->s->addr) + - local_map->output_section->s.addr; - as the value of local_map->offset should not have been added. - -Changes for the 3.3 release (the cctools-103 release): -- Removed the "__attribute__ ((format (printf, 1, 2))" from vprint in ld.h as - it was incorrect and the new compiler treats this as an error. - -Changes for the 3.3 release (the cctools-102 release): -- Integrated in the hppa support. - * Added the SECTDIFF support for the hppa with the HI21 and LO14 SECTDIFF - relocation types. - * Fixed the use of calc_hppa_HILO() in hppa_reloc() in hppa_reloc.c to - correctly pass the symbol value and offset value as the two first - parameters. -different ld/Makefile (integrated for cctools-102) - Using cctoolshppa-37. New hppa files. -different ld/layout.c (integrated for cctools-102) - Using cctoolshppa-37. hppa thread stuff. -different ld/ld.h (NOT picked up for cctools-102) - Using cctoolshppa-37. The define CHECK_PRINTFS is ifndef'ed out hppa - with the comment /* va_list defined differently for hppa. Check this */ -different ld/notes - Using cctools-29. Late 3.2 fixes the hppa base did not have. -different ld/pass1.c - Using cctools-29. Late 3.2 fixes the hppa base did not have. -different ld/rld.c - Using cctools-29. Late 3.2 fixes the hppa base did not have. -different ld/sections.c (integrated for cctools-102) - Using cctoolshppa-37. hppa reloc call based on cpu type. -Only in cctoolshppa-37/ld: hppa_bitfuncs.c (NOT picked up for cctools-102) - Pickup cctoolshppa-37/ld/hppa_bitfuncs.c from cctoolshppa-37. -Only in cctoolshppa-37/ld: hppa_bitfuncs.h (NOT picked up for cctools-102) - Pickup cctoolshppa-37/ld/hppa_bitfuncs.h from cctoolshppa-37. -Only in cctoolshppa-37/ld: hppa_reloc.c (integrated for cctools-102) - Pickup cctoolshppa-37/ld/hppa_reloc.c from cctoolshppa-37. -Only in cctoolshppa-37/ld: hppa_reloc.h (integrated for cctools-102) - Pickup cctoolshppa-37/ld/hppa_reloc.h from cctoolshppa-37. - -Changes for the 3.3 release (the cctools-101 release): -- Added code in the reloc routines to check that byte and short relocation - fits. - -Changes for the 3.3 release (the cctools-100 release): -- First major round of changes for the new shlib stuff. - 1) Support for spliting the sections flags field in to types and attributes. - Lots of places that used flags now use (flags & SECTION_TYPE). - 2) Support for possition-independent code through the SECTDIFF relocataion - type. This effected all the *reloc.c sources. - 3) Support for .private_extern directive with -keep_private_externs. Where - the change from external to static happens in in layout_merged_symbols() - in symbols.c. - -Changes for the 3.1 release (the cctools-28 release): -- Fixed a bug where pass1_fat() cleared the error variable and caused multiple - defined errors not to cause the link editor to exit and instead produce an - output file (bug #37043). - -Changes for the 3.1 release (the cctools-27 release): -- Fixed a bug in sarld's vprint() which did not advance the error buffer - correctly. - -Changes for the 3.1 release (the cctools-25 release): -- Fixed bug #36216 which did not issue a warning when -Ldir's don't exist. -- Added stand alone rld as libsarld.a which is supported by the ifdef SA_RLD. - -Changes for the 3.1 release (the cctools-20 release): -- Changed the m98k seg1addr to 0x13a00000 for the m98k (-object too). - -Changes for the 3.1 release (the cctools-19 release): -- Fixed a bug in output_literal_pointers() that was not swapping correctly. - The problem was it was using set_long() which used cur_obj->swapped but at - this point in the code cur_obj is not set. So the change was to do the - swaping based on host_byte_sex != target_byte_sex. - -Changes for the 3.1 release (the cctools-16 release): -- Fixed a bug in the checking of BR24 relocation where a mask was 0xf8000000 - which should have been 0xfc000000. Thus when a displacement of 0x04000000 - or greater was generated the relocation overflow was not caught. -- Changed the default seg1addr used for the m98k to 0x10000000 (which should be - VM_MAX_ADDRESS in mach/m98k/vm_param.h but would require files to include - that file). This change was made in layout_segments() in layout.c. - -Changes for the 3.1 release (the cctools-15 release): -- Changed not finding an arch in a fat file to a warning from an error and not - finding an arch from a thin archive to a warning from an error (bug #30659). -- Fixed a bug in m98k_reloc() where HA16 was not relocated correctly because a - constant was written 0x000080000 not 0x00008000 (has an extra 0 on the end). - -Changes for the 3.1 release (the cctools-13 release): -- Added the m98k (PowerPC) architecture. This includes a kludged - mach/m98k/thread_status.h with only an entry point. - -Changes for the 3.1 release (the cctools-10 release): -- Changed the handling of the cpusubtypes to support this design: - The design allows each architecture family (m68k, m88k, i386) to have a - cpusubtype that will run on all implementations of that architecture and - have cpusubtypes that will run only on specific implementations of an - architecture. The design also gives the programmer the option to force the - cpusubtype indicating all implementations (at build time with a flag) when - using instructions that are implementation specific leaving it up to the - program to runtime select the correct code to execute. - - The link editor operation in this design: - By default the link editor will change it's operation (starting with - cctools-10) as specified on the ld(1) man page from: - If no -arch arch_type is specified and the first object file encountered - on the link line is a "fat" file the output architecture is as follows: - if the fat file contains only one architecture then that architecture is - used else if the ``fat'' file contains the host architecture then the - host architecture is used otherwise it is an error and an -arch - arch_type must be specified. - to: - If no -arch arch_type is specified and the first object file encountered - on the link line is a "fat" file the output architecture is as follows: - if the fat file contains only one architecture then that architecture is - used else if the ``fat'' file contains the an architecture that would - execute on the host then the "best" architecture as defined by what the - kernel exec(2) would select is used otherwise it is an error and an - -arch arch_type must be specified. - In addition the cpusubtype will be promoted from an ALL subtype to a - specific cpusubtype if an object file with a specific cpusubtype is linked - in and the resulting linked object file will have that specific cpusubtype. - As this promotion occurs during the linking this effects the selection of - which component of a fat file will be selected for linking for subsequent - fat files encountered on the link line. - - When a -arch arch_type flag for an architecture family (m68k, i386, etc) is - specified it has the effect as if the link editor is linking for that host - architecture and the cpusubtype will be promoted as described above. If a - -arch arch_type flag for a specific implementation of an architecture - (m68040, i486, etc.) is specified the result is an object file with that - specific cpusubtype and any object that has a cpusubtype which will not - promote to the cpusubtype for that -arch flag is an error. - - The link editor will also accept the optional -force_cpusubtype_ALL flag - causing the cpusubtype to remain ALL an not be promoted. This flag has - precedence over any -arch arch_type flag for a specific implementation. - Use of this flag has an effect on the selection of which component of a - fat file will be selected for linking and the cpusubtype always remains - the _ALL type. - - The link editor will change it's operation in this area (starting with - cctools-10): - Previously when a fat file was encountered during linking and there was - no architecture in the fat file for the current architecture being - linked the fat file is ignored without any error or message. - This will change to: - If a fat file is encountered during linking and there is no "best" - architecture in the fat file for the current architecture being linked - this is treated as an error. - The selection of the "best" architecture will be the same as the kernel's - exec(2) and is defined by the library function cpusubtype_findbestarch(). - - During linking a "current cpusubtype" will be maintained and objects being - linked will be combined with it based on the library function - cpusubtype_combine() and will produce a new "current cpusubtype" or an - error if the cpusubtypes can't be combined. If the -force_cpusubtype_ALL - flag is specified the above routine will not be used and the cpusubtypes - will always be combined and the "current cpusubtype" will always remain the - _ALL cpusubtype. - The rld(3) operation in this design: - For reasons of compatiblity and existing bugs in the the cpusubtype handling - the rld(3) package will function as if -force_cpusubtype_ALL were specified. - As of the 3.0 release the rld(3) package does not do the same checking as - exec(2) does with reguard to the handling of the cpusubtype. Specificly for - the m68k if on an 030 an object file with the 040 cpusubtype is used with - the rld(3) package no error is generated. This "bug" has the effect of the - functionality of the -force_cpusubtype_ALL flag but lacts the error - detection supported by exec(2). Since adding the error detection could - break existing uses of rld(3) the rld(3) package will function as if - -force_cpusubtype_ALL were specified. - This effected ld.c, ld.h, pass1.c and rld.c. - -Changes for the 3.1 release (the cctools-9 release): -- Fixed a bug introduced by adding the -pagezero_size option where -p was not - recognized the same as -preload. - -Changes for the 3.1 release (the cctools-8 release): -- Added a "-pagezero_size hex_value" argument at the request of the Lono team. -- Changed the default segment alignment to 0x2000 for the I386. This effects - check_cur_obj() in pass1.c. - -Changes for the 3.1 release (the cctools-7 release): -- Fixed a bug in cross linking on a risc machine in generic_reloc.h in the - {get,set}_{long,short} routines where the compiler was taking the 'long *' - and the memcpy() and assuming it could do the copy in line and it was - correctly aligned. The change was to make the type a 'void *'. -- Changed the way the messages for -sectorder_detail is printed in the case a - symbol is not specified in the load file so the output of ld can be cut and - pasted into an order file (bug #26204). -- Allow multiple -arch flags of the same name (bug #26197). - -Changes for the 3.1 release (the cctools-6 release): -- Added the -arch_multiple flag that will cause one line to printed before all - error messages which will contain the architecture name. -- Added checks for m88k relocation overflows in m88k_reloc.c for PC16 and PC26. -- Maded the changes to handle cross bytesex linking. -- Changed the way the non-zero values of the i386 thread_state registers get set - from an initialized struct to direct assignment. This was also added to the - ifdef RLD code. These are the asignments: - intel386.es = UDS_SEL; - intel386.ds = UDS_SEL; - intel386.ss = UDS_SEL; - intel386.cs = UCS_SEL; -- Fixed a bug introduce in cctools-5 item: - Changed the default order when all the symbols in an object file are not - listed in an order file to caused that object to be loaded as it had a - .section_all specification (nrw team request). - The bug was that if object had a .section_all this new code would reassign the - order. Another condition was added to the if that trigers this new code to - test for this case. -- Fixed a bug in the Makefile when more than on RC_ARCHS was set. The change - of "$(RC_ARCHS)" in the for loop to `cat $(RC_ARCHS)` was done to fix it. - -Changes for the 3.1 release (the cctools-5 release): -- Picked up a change from the lono team where the variable named "i386" was - changed to "intel386" so that it wouldn't collide with the CPP macro named - "i386" in layout.c . -- Picked up a fix from the lono team where calculating the output_pc was done - incorrectly when doing pc relative offsets for the i386 in generic_reloc.c . -- Changed the default order when all the symbols in an object file are not - listed in an order file to caused that object to be loaded as it had a - .section_all specification (nrw team request). -- Fixed a bug where the relocation references in rld to sections with fine - relocation entries was wrong because the fine relocation entries were free'ed - too soon in pass2() in pass2.c (bug #22046). - -Changes for the 3.1 release (the cctools-3 release): -- Changed the way the default segalign gets set. It is now set when the - output cputype is set in check_cur_obj() in pass1.c based on the cputype and - not initialized to the cpp macro TARGET_PAGESIZE set via the Makefile but - initialized to zero in ld.c. This was done because it is different for the - i386 architecture. -- Fixed a bug with generic_reloc where the a pcrel relocation entry on the i386 - is relative to the end of the displacement not the beginning. This involved - adding an extra argument to generic_reloc() and passing the correct argument - in sections.c where this is called. -- Fixed a bug with librld.o needing to be linked with libstuff.a (Makefile - change). - -Changes for the 3.1 release (the cctools-3 release): -- Removed the M88K_TIME_HACK code in pass1.c -- Changed CPU_TYPE_I80x86 to CPU_TYPE_I386 in lipo.c - -Changes for the 3.1 release (the cctool-2 release): -- Added support for fat files. The -arch flag was added to help support this. - The changes are in pass1.c for the fat stuff. The global variables cputype - and cpusubtype are now used out of the global struct arch_flag this effected - a hand full of files. -- Removed the obsolete flags: -a, -T, -Ttext, -Tdata, -ident, -v, -g, -G, -D. - -Changes for the 3.0 release (the -57 compiler release): -- Corrected the -whyload message in pass1.c for -all_load that printed -all - (bug #20024). - -Changes for the 3.0 release (the -56 compiler release): -- Added the -all_load flag that causes all of the members of archives to be - loaded. This effected ld.c, ld.h and pass1.c (bug #19644). -- Added the -ObjC flag that causes the members of archives that defined - objective-C classes or categories to be loaded. This effected ld.c, ld.h - and pass1.c (bug #19643). -- Added the feature of ".section_offset " in the load order file. This - as in layout_ordered_section() in sections.c . -- Fixed a bug in in lookup_load_order() in sections.c if the same named symbol - appears more than once in the loaded objects (in the case of static symbols) - and the sectorder file has that symbol listed more times than it appears in - the objects being loaded. So when lookup_load_order() is handed one of the - lines for this symbol and all orders for those symbols have been assigned it - failed to test for this and incorrectly dropped into the code that was - assuming that there was multiple matches for this symbol and tried to return - the first non-ordered match. But since all the symbols were assigned there - was non first non-ordered match and this caused an indirection through a NULL - pointer. So the fix was to add the following code: - if(number_of_matches == 0) - return(NULL); - after the first loop that determined the number of non-ordered matches were - left. (found by Stone Design in the 2.1 release) (bug #19640) - -Changes for the 3.0 release (the -55 compiler release): -- Fixed a bug when ordering a section where two symbols had the same value. - The problem caused a the block to not be written to the correct output - offset leaving a hole of zeros. The fix is to make sure that zero sized - blocks get the output_offset size of the previous block. The fix is in - sections.c in layout_ordered_section() (see the use of prev_output_offset). -- Fixed the spelling of ambiguous in places it appeared abiguous and ambigious - (bug #19353) in sections.c. -- Added a test to see if an archive member name could have been truncated before - printing the warning saying it could be ambigious when used with -sectorder - (bug #19352). - -Changes for the 3.0 release (the -53 compiler release): -- For RLD internal_rld_load() in rld.c if the output_file is - RLD_DEBUG_OUTPUT_FILENAME (used by the debugger for automatic debugging of - rld using the rld_state stuff) the flag RLD_DEBUG_OUTPUT_FILENAME_flag is set - so the code in layout_segments() in layout.c will know to pass address_func() - the allocate_size (including the symbol table) so the debugger can save this - and deallocate the memory correctly. -- For RLD in rld.c if the object file name is not a full path the fullpath is - created and saved as the object file name. This is so that the debugger can - find the object when using the automatic debugging is done using the rld_state - stuff. -- For RLD changed the enter_symbol() routines to use the string from the object - if it is in the base file. -- For RLD allocate from an NXZone for all allocations. - -Changes for the 3.0 release (the -52 compiler release): -- Added ignoring the new LC_PREPAGE load command (two places in pass1.c). -- Added the Make.app stuff (new files make.defs, make_defs.h, and notifyMake.c) - This effected the Makefile and ld.c. - -Changes for the 3.0 release (the -51 compiler release): -- Fixed a bug that did not pad out the string table to a multiple of 4 bytes. - A output_strpad field was added to the symtab_info struct which was filled - in layout_segments() and the size of the string table was changed to be - rounded to 4 byte size. Then the strpad was flushed in setup_output_flush(). - This effected layout.c, layout.h and pass2.c. -- Changed the m88k thread status to match the kernel struct (layout.c). - -Changes for the 3.0 release (the -49 compiler release): -- Changed where ld3.1 gets installed it now gets installed in - /usr/local/bin3.1/ld . -- Added LC_FVMFILE to pass1.c to be ignored. -- Changed the strip line for librld.o because it strips the rld_state the - debugger needs and messes up the debugger when the debugging symbols are - saved and some globals are stripped. It now uses nmedit. -- Changed the Makefile to meet the RC api. - -Changes for the 3.0 release (the -47 compiler release): -- ld sources split in to ld and ld3.1 and all m88k and ix86 stuff removed. -- Added rld_forget_symbol() for Franz Inc. to use with Lisp. -- Changed shlib_ofiles and profile_ofiles to build one librld.o object using - strip to limit the number of globals to only the api listed on the man page - (bug #15808). -- Changed the alignment of .section_all blocks from using the merge section's - alignment to using the original section's alignment. (sections.c - layout_ordered_section() second use of function round()). This allows shlib's - to stay compatible when the alignment of an ordered section increases. -- Added #include to ld.c to match header file changes. -- Changed the includes in layout.c to match the header file changes: - m68k/mach/thread_status.h -> mach/m68k/thread_status.h - m88k/mach/thread_status.h -> mach/m88k/thread_status.h - ix86/mach/thread_status.h -> mach/ix86/thread_status.h - i860/mach/thread_status.h -> mach/i860/thread_status.h - -Changes for the 3.0 release (the -44 compiler release): -- Switch over to the new header file organization. This also involed changing - thread_status structure names and constants. - -Changes for the 3.0 release (the -43 compiler release): -- Added support for the i386. -- Changed rld_load to fail if the output file for the debug file can't be - created (bug #14799). -- Added rld_loaded_state for the debugger so it can automaticly debug things - that use rld (the interface in in the header file rld_state.h) (bug #15163). -- Fixed all new warnings with the cc-37 compiler and added the __attribute__ - format stuff for all error messages. This involved touching every file and - all long declrations to be unsigned long. This also involved touching most - error strings for fix up. This did find 6 or so real bugs. - -Changes for the 3.0 release (the -37 compiler release): -- Added a check in pass1.c to check for old 88k objects based on the date this - is installed internally to NeXT (Wed Jun 12 16:00:00 PST 1991 (676681200)). - This is ifdef'ed M88K_TIME_HACK. -- Changed the RLD ifdefs in sections.c and m88k_reloc.c to allow 88k objects - to be used with the RLD package. -- Removed all #error's and most uses of mc68000 in all the code. The relocation - routines now have static inline routines to get/set longs, shorts, and bytes - reguardless of the alignment (see generic_reloc.h). Other checking code in - pass1.c has also been updated. This effected pass1.c, *_reloc.c and - literal_pointers.c -- Changed m88k_reloc() to handle scattered relocation and the change of storing - the other half in pair relocation entries in the r_address field. -- Changed i860_reloc() to handle the change of storing the other half in pair - relocation entries in the r_address field. -- Fixed a bug in generic_reloc() where if a pc-relative external relocation - entry had an offset equal to it's pc and that symbol was defined (in another - object being loaded) and relocation entries were saved a local relocation - entry would be created where a scattered relocation entry should have been. - For this bug to show up an 'ld -r' would be needed and then a scattered load - where the symbol+offset did not end up in the same block. The fix was to - adjust the offset by the input_pc if the entry was pc-relative. (very obscure - bug, found by reading the code). - -Changes for the 3.0 release (the -36 compiler release): -- Fixed an obscure bug when ordering a section where two symbols have - the same value. The fix is in qsort_load_order_values() in sections.c . - This fix makes the load_orders and the fine_relocs - sorted by value end up in the same order even though the load_order - sorted by name between their sorts by value. Without this the - blocks for the symbols at the same address get placed in the file - in the wrong place because the subtraction of their input offsets - does not yeild the size of the block in this case. This is kinda - a funky fix to avoid adding a size field to the fine reloc struct - which would be very expensive in space. -- Fixed a bug in create_order_load_maps() in sections.c which used more - order_load_maps than it allocated. It used maps for sections that had - no_load_order == TRUE. - -Changes for the 3.0 release (the -34 compiler release): -- Fixed a bug where multiple pass1 errors were not processed because the code - in merge() in pass1.c always returned if there had been any previous errors. - The fix was to have merge() save and restore the previous errors and only - return if an error happened while processing that file. (second bug in first - released version). -- Added the -m flag to allow multiply defined symbols with a warning instead of - treating them as a hard error. In this case the first symbol is used for - linking and is the value of the symbol. -- Added installsrc, installIBMsrc and installGNUsrc targets to the Makefile. -- Fixed a bug that would cause the output flush stuff to fail. The problem was - when a section in an object file had a size that was not a multiple of its - alignment and the next object file loaded with that section had a size of - zero the section would be padded to get the alignment but the routine out - output the section returned when the size of the section was zero and thus - the area was not flushed and ld got an internal error. This was fixed in - merge_section() in sections.c where the test for the section size being zero - is made and the merged section size (ms->s.size) is not changed if the size - of the section being merged is zero. (first bug in first released version) - -Changes for the 3.0 release (the -33 compiler release): -- Added the support needed for the 88k and the i860 processors. -- Changed the use of r_reserved field of the relocation_info to match the - change to r_type. This effected only generic_reloc.c and literal_pointers.c . - -Release 2.0 -Changes for the Warp ?? release (the -30 compiler release): -- Allowed using -sectorder on zero fill sections (including the section for - common symbols) and for all literal sections (each type of literal section - has it's own format of the sectorder file) (bug #9404). -- Improved handling of sectorder file where the specifications don't exactly - match the object names of what's loaded. A hash table of symbol names is used - to attempt to match up symbol names in the specifications to the symbol names - in the object files loaded. Also removed the requirement of a separating ':' - between the object name and symbol name which allows just a symbol name to be - specified. Also removed the fatal error of the same object file loaded more - than once with -sectorder and the same symbol in the same object file. This - introduces ambiguity but that exist anyway when the requirement of exact - matches was removed. Also improved the allocation of the name arrays data - structure for better performance (bug #9403). -- Fixed a bug in clean_archives that indexed the sets array with cur_set when - cur_set was equal to -1 (bug #9402) -- Fixed a bug if any section specification was given for the (__DATA,__common) - section it caused the common symbols not to be defined (bug #9401). -- Fixed a bug that caused ld to hang if processing an old library and a member - had an error in the object file. The fix was to add the expresion errors == 0 - to the while loop to terminate the algorithm in the case of an error. The - error was that an object contained an LC_SYMSEG which was handled as an error. - This is now a warning and the message was changed to include "object produced - by pre-1.0 compiler, please recompile" (bug #9141). - -Changes for the Warp ?? release (the -29 compiler release): -- Fixed a bug in new_sets that did not zero out the entire structure when - reallocating it (bug #8037). -- Replaced the buggy literal pointer code (literal_ptrs.[ch] got - literal_pointers.[ch]) (bug #7994). -- Changed the sizes of the literal 4 and 8 tables from 20 to 60 which seems to - be about the right number of literals so that a large program will have only - one table. -- Changed the calls to map_fd again to match the current prototype in libc.h - which now matches the NeXT documentation. Casts for all the parameters were - added. Hopefully this will now remain correct. - -Changes for the Warp ?? release (the -28 compiler release): -- Fixed bug #7770 where the logic around free() in the literal 8,4,pointers - free code was wrong. - -Changes for the Warp ?? release (the -27 compiler release): -- The first version of the literal pointers code was added. -- Fixed a bug that caused floating-point constants to be relocated wrong. The - output_offset for the fine relocation map for the first table entry of all - second and larger tables got set wrong. -- Fixed a bug where if symbols were being traced with -y and common symbols - were being allocated then some of the common symbols might not be allocated. - The problem was in defined_common_symbols() where the loop that looped through - the trace symbols and the loop that looped through the merged symbol list were - using the same variable. -- Fixed a bug where the contents of a section was not placed in the output file - at the right address. This was caused by an zero sized section that had an - alignment that caused it's address to be greater than its previous section. - Then when the offsets were assigned to the sections a test for zero sized - sections prevented the running "offset" to be incremented if the size of the - section was zero even though the difference of the address of the section and - the next section in this case was not zero. This showed up with a zero sized - literal8 section with rld because the section came from the basefile and was - not in the loaded objects. - -Changes for the Warp 3H release (the -26 compiler release): -- Fixed a bug in generic_reloc that produced scattered relocation entries for - absolute symbols. -- Fixed a bug in the rld package and ld -A where the common section did not have - the correct alignment. The problem was in merge_sections if the base file was - being merged the alignment was not propagated into the merged section. -- Fixed a bug in layout_sections that did not assign addresses to zerofill - sections correctly aligned (it was fixed for content sections but not for - zerofill sections). -- Fixed a bug in output_cstrings() when freeing up the data the loop was using - a pointer to a free()'ed item. -- Changed the checks in check_symbol() to allow stabs to have any of the N_TYPE - bits on and treated like N_SECT (their n_sect feild checked). -- Added 4 byte and 8 byte literals. -- Added a test in allocate() so that if a size of zero is asked for then NULL - is returned and malloc is not called. This allows malloc() to return NULL - if a zero size is requested and not to be flagged as an error. -- Added a comma between the perror string and the printing of errno = x in the - error routines. - -Changes for the Warp 3 (OS update) release (the -25 compiler release): -- Added rld_load_from_memory() and fixed a vm_allocate leak for the input object - file when an error ocurred. -- Added scattered relocation entries to generic_reloc() in generic_reloc.c. - See the comments in . This allows scattered loading to work - relibly. -- Fixed bug 6264 which produced a error with an archive that had zero ranlib - structures in it. It now prints a warning. -- Fixed bug 6261 which printed the linkedit segment has zero size when using -s - and the no seglinkedit flag was specified. It is no longer printed in this - case but is printed when the -seglinkedit flag is specified. - -Changes for the Warp 3 release (the -24 compiler release): -- Fixed a bug in lookup_fvmlib() which did not bzero the memory it allocated - for a merged_fvmlib structure causing a bogus next pointer in that struct. -- Fixed a bug in rld_load_basefile() that is not set the host_pagesize which - caused enter_string to allocate each string in it's own string block. -- Fixed a bug where the __end symbols did not get the correct value - because their section number was set to the last section in their segment - and not their first as they should have been. -- Removed all compiler "might be" warning messages for -DDEBUG and -DRLD. -- Implemented scattered loading vi -sectorder - (and added the -sectorder_detail option along with this). This has NOT been - put on the man page because of the relocation limititations it can't detect. -- Removed "mach_missing.h" (mach_error_string from and map_fd - from libc.h (brain damaged but there)). -- Added one argument (headers_size) to the function passed to rld_address_func. -- Moved rld.h to ../include and it will be installed in /usr/include. -- Added a -w flag to suppress warnings. -- Added saving away errno in the system_{error,fatal} routines before doing any - thing that could cause a system call (like a print). This is in hope to get - rid of the wrong error string (Inapropate ioctl for device) when it can't open - a file (the value of errno is also printed). - -Changes for the Warp 1 release (the -23 compiler release): -- Added the -headerpad option to pad the header for MH_EXECUTE - files. The header is allways padded for MH_EXECUTE by the greater of this or - the round off due to the segment rounding. -- Fixed a bug in clean_archives() when an rld_load_basefile() was called there - are no sets so the the loop in clean_archives() was wrapped with an - if(sets != NULL) . -- Fixed a bug that merge_literal_sections() merged the sections contents from - the base file. -- Now is linked with libsys. -- Made created seglinkedit by default for object formats that can have it and - set the default init protect to r-x. Also added the -noseglinkedit option - to turn this off. -- Added a message to the rld() calls when they return failure because of - previous fatal errors (otherwise they print nothing and it fails). - -Changes for the 2.0 impulse X.X release (the -22 compiler release): -- Added the ablity to link from archives with rld_load(). -- Fixed a memory leak in the rld package when an rld_load() failed before - pass2() and it was never called then the undefined_maps for that object set - were not free()'ed. Remove object now also frees these maps if they are not - already free. - -Changes for the 2.0 impulse X.X release (the -21 compiler release): -- Changed the default format if -A is specified and no filetype is specified, - it now is MH_OBJECT. -- Added the following functions to the rld package: rld_unload_all, - rld_load_basefile, rld_address_func and added another argument to rld_load - which is the output name of the debugging file for gdb. -- Fixed -X to not strip stab symbols that start with 'L'. -- Added the -b flag to strip the base symbols from the output file when doing - an ld -A. This results in a much smaller output file which should still be - useful for gdb(1)'s addfile command. -- Added coded in pass1() and rld_load() to handle the bug in the kernel that - will not allow map_fd() to map a file with zero length. - -Changes for the 2.0 impulse X.X release (the -20 compiler release): -- Added the -sectobjectsymbols option to produce the - file.o symbols. -- Fixed some nits in pass1() in some error cases printing the member name with - out trimming the trailing blanks. -- Fixed two bugs in generic_reloc() in the error case when an external - relocation entry's r_symbolnum is not found in the undefined_map and then - the wrong index (i) was used instead of (symbolnum) to index the symbol table - and determine the error in the object file. - -Changes for the 2.0 impulse X.X release (the -19 compiler release): -- Fixed a bug in the rld package to correctly unload common symbols allocated - in a set of objects loaded. -- Fixed a bug in the rld package to not enter undefined, common and indirect - symbols from the base program (this causes the hash table to be in an - incorrect state if a dymnamicly loaded object defines one of these symbols - and it is unloaded). -- Added a check to make sure the string table ends with a '\0'. -- ld is no longer installed as ld- to match the rest of the - project. -- Changed so that no longer allow two absolute symbols with the same value to - not cause a multiply defined symbol. -- Updated for the changes to CPU_TYPE and CPU_SUBTYPE with the changes to - -- Fixed a bug in layout() that didn't get the addresses of sections right (and - then possibly the filesizes of segments right). This was cause by setting - the section address to the rounded +TODO: +- Should add a -no_fix_prebinding flag to ld(1) so fix_prebinding can be + built with it. +- MH_BUNDLEs should have a two-level namespace hint table by default or at + least with MACOSX_DEPLOYMENT_TARGET 10.2 (the -twolevel_namespace_hints flag). + Note this is only a problem with 10.0 which is NOT a deployment target. +- Test coalesced symbols with -static code gen and with rld()? +- Might be a bug in search_dynamic_libs() if it is searching an archive then + it does not take into account -all_load or -Objc. +- The sreloc->r_address field is only 24-bits (16 meg) and can overflow + producing bad relocation entries in the output file. To test for this a + handful of checks would need to be added to the *_reloc.c file after + update_reloc and other files that put out relocation entries. +- The LC_PREBOUND_DYLIB commands do not have the modules used via N_INDR + symbols marked in the linked_modules bit vector. +- Add check for undefined dyld_stub_binding_helper and __dyld_func_lookup if + output_for_dyld is set. +- Think about how indirect section would be ordered if allowed. + +Build problems: +- For i386 builds with -dynamic -fomit-frame-pointer produces bad code (bug + #52986) +- For m68k builds -finline-functions crashes the compiler (used in the Makefile + on the ld_build target). + +Changes for the 5.26 release (the cctools-738 release): +- Removed the code and files for the old ProjectBuilder interface including the + use of mig(1) in the Makefile. The files make.defs make_defs.h were removed + and the code in ld.c, pass1.c and symbols.c had the code with these old + interfaces removed. Radar bug #6457206. +- Added support for the arm ARM_THUMB_32BIT_BRANCH relocation entry. Radar bug + #6511482. + +Changes for the 5.26 release (the cctools-721 release): +- Changed the Makefile and removed -force_cpusubtype_ALL from KERN. Radar bug + #6233829. + +Changes for the 5.26 release (the cctools-711 release): +- Changed the Makefile so -D__DARWIN_UNIX03=__arm__ is always added to KERN + Radar bug #6098280. + +Changes for the 5.26 release (the cctools-705 release): +- Code changes for other code to work on 64-bit hosts: Radar bug #6022298. + - Changed the types of the local variables hi21, lo14, w, w1, and w2 in + hppa_reloc in hppa_reloc.c from unsigned long to uint32_t . + - Added a cast to (int *) for the assignment of output_thread_info + entry_point and stack_pointer for the arm thread state. + - Changed the types of dylib_current_version, dylib_compatibility_version, + nremove_symbols and nsave_symbols from unsigned long to uint32_t in ld.[ch]. + Changed the use of %lu to %u for these in ld.c . + +Changes for the 5.26 release (the cctools-699 release): +- Changed uuid.c to directly call uuid_generate_random() without the dynamic + lookup. Radar bug #5620031. + +Changes for the 5.25 release (the cctools-695 release): +- Changed the Makefile to use -iwithsysroot as part of the KERN flags. + +Changes for the 5.25 release (the cctools-681 release): +- Removed all __OPEN_SOURCE__ references in Makefile, notes, objects.c, + objects.h, sections.c, symbols.c, layout.c, ld.c and arm_reloc . + +Changes for the 5.25 release (the cctools-679.3 release): +- Changed the Makefile to test OLD_LIBKLD pass down from the upper Makefile + so to not build libkld when OLD_LIBKLD is NO. Radar bug #5698612. + +Changes for the 5.25 release (the cctools-677 release): +- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . + Radar bug #5563553. + +Changes for the 5.25 release (the cctools-676 release): +- Changed check_cur_obj() in pass1.c to know about S_DTRACE_DOF section types + enough to not cause an error about unknown section type. + +Changes for the 5.25 release (the cctools-673 release): +- Changed the sources so the arm stuff is not in the open source version. + Radar bug #5326431. + - Changed the Makefile to #ifndef __OPEN_SOURCE__ out the arm files + - Added #ifndef __OPEN_SOURCE__ to the following files to bracket arm code: + layout.c, ld.c, objects.c, objects.h, sections.c, symbols.c and arm_reloc.c. + +Changes for the 5.24 release (the cctools-663 release): +- Changed the code in ld.[ch], pass1.c, symbols.c, layout.c and pass2.c for + the new get_macosx_deployment_target() interface. Radar bug #5132019. + +Changes for the 5.24 release (the cctools-662 release): +- Changed kld so it will propagate the LC_UUID from the last object file being + linked into the output. Radar bug #5137807. + - Changed check_cur_obj() in pass1.c for #ifdef KLD to always clear the + output_uuid_info to zeros and then if the object file being checked has an + LC_UUID command copy that into the output_uuid_info. + - Changed layout() in layout.c for #ifndef KLD so it does not clear the + output_uuid_info and create the uuid load command if the + output_uuid_info.uuid_command.cmdsize is non-zero. + +Changes for the 5.24 release (the cctools-653 release): +- Backed out the change for Radar bug #4930693 in internal_kld_load() in kld.c + to #ifdef KLD so that RLD_DEBUG_OUTPUT_FILENAME_flag is always set to 1. This + was causing problems the way the prelinked kernel is generated. Radar bug + #4930693. +- Updated dylibs.c and pass1.c to handle the LC_REEXPORT_DYLIB load command. + Radar bug #4986624. + +Changes for the 5.24 release (the cctools-651 release): +- Changed pass1() in pass1.c to swap the load command part of load commands diff --git a/cctools/libmacho/notes b/cctools/libmacho/notes dissimilarity index 88% index b235c53..c366fc3 100644 --- a/cctools/libmacho/notes +++ b/cctools/libmacho/notes @@ -1,438 +1,52 @@ -Changes for the 5.26 release (the cctools-721 release): -- Changed the Makefile and removed -force_cpusubtype_ALL from KERN. Radar bug - #6233829. - -Changes for the 5.26 release (the cctools-705 release): -- Ported to run on 64-bit hosts. Radar bug #6022298. - -Changes for the 5.26 release (the cctools-700 release): -- Fixed a problem with swap_relocation_info() in swap.c where it was incorrectly - using "long" which should be "uint32_t" in two places, the fields r_address - and r_value fields of the swapped_relocation_info and the - swapped_scattered_relocation_info structures. Radar bug #5904383. - -Changes for the 5.25 release (the cctools-697 release): - -Changes for the 5.25 release (the cctools-696 release): -- Changed the Makefile to use -iwithsysroot as part of the KERN flags. - -Changes for the 5.25 release (the cctools-679.4 and cctools-686 releases): -- Changed the Makefile to test OLD_LIBKLD passed down from the upper Makefile - so to not build libmacho_kld.a when OLD_LIBKLD is not YES. Radar bug #5780592. - -Changes for the 5.25 release (the cctools-682 release): -- Updated NXCombineCpuSubtypes() in arch.c to include arm. - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in: Makefile, notes and arch.c . - -Changes for the 5.25 release (the cctools-677 release): -- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . - Radar bug #5563553. - -Changes for the 5.25 release (the cctools-676 release): -- Changed get_end.c, getsecbyname.c and getsegbyname.c to stop defining - _NSGetMachExecuteHeader and just use it out of . - Radar bug #4696889. - -Changes for the 5.25 release (the cctools-673 release): -- Changed the sources so the arm stuff is not in the open source version. - Radar bug #5326431. - - Changed the Makefile to build with -D__OPEN_SOURCE__ with $(OPEN) - - Added #ifndef __OPEN_SOURCE__ to arch.c to bracket arm code. - -Changes for the 5.24 release (the cctools-652 release): -- Added creating a vers.c file and linking in the vers.o into the libmacho - archives. Radar bug #4980378. - -Changes for the 5.24 release (the cctools-642 release, - picked up from cctools-640.1): -- Fixed a problem in NXGetArchInfoFromCpuType() with the use of - CPU_SUBTYPE_MULTIPLE and the changes to use CPU_SUBTYPE_MASK to mask out the - capability bits. Since the value of CPU_SUBTYPE_MULTIPLE is -1, the - capability bits can't be masked out of the passed cpusubtype when comparing - to this constant. Radar bug #4787007. - -Changes for the 5.24 release (the cctools-640 release): -- Changed arch.c to use CPU_SUBTYPE_MASK to mask out the capability bits from - the cpusubtype on comparisons. Radar bug #4754462. - -Changes for the 5.23 release (the cctools-616 release): -- Added the routines swap_x86_state_hdr(), swap_x86_float_state64(), - swap_x86_exception_state64(), swap_x86_thread_state(), swap_x86_float_state(), - swap_x86_exception_state(), swap_x86_debug_state32(), - swap_x86_debug_state64() and swap_x86_debug_state() to i386_swap.c . - Radar bug #4491230. - -Changes for the 5.23 release (the cctools-616 release): -- Added the routines swap_mach_header_64(), swap_segment_command_64(), - swap_section_64(), swap_routines_command_64(), swap_nlist_64() and - swap_dylib_module_64() to swap.c . Also fixed a bug in swap_dylib_module() - that did not have the swap of the objc_module_info_size and - objc_module_info_addr fields. Radar bug #4358209. - -Changes for the 5.23 release (the cctools-610 release): -- Added a few ifdef x86_THREAD_STATE64 to a few places in i386_swap.c to allow - it to build on Tiger. Radar bug #4535019. - -Changes for the 5.22 release (the cctools-590.37.3 release): -- Correctly swap x86_THREAD_STATE64 states when running on PowerPC. Also, - update to the current definition of the x86-64 thread state. Radar bug - #4491228. - -Changes for the 5.22 release (the cctools-590.36.2 release): -- Add #defines to ensure that libmacho builds on systems with POSIX - conformant headers. Radar bug #4471574. - -Changes for the 5.22 release (the cctools-590.31.1 release): -- Added support for the x86_64 architecture. Radar bug #4345090. - -Changes for the 5.20.1 release (the cctools-590.38 relase) Picked up from the -cctools-590.23.5 release: -- Changed i386_swap.c to add macros that rename structure members of the - i386_thread_state_t for Unix conformance. Radar bug #4438650. - -Changes for the 5.21 release (the cctools-590.32 release): -- Changed ppc_swap.c to add macros that rename structure members of the - ppc_thread_state_t for Unix conformance. Picked up from cctools-590.23.4 . - Radar bug #4340681. - -Changes for the 5.21 release (the cctools-590.24 release): -- Added support for DWARF. Radar bug #4367423. - - Added swap_uuid_command() to swap.h . - -Changes for the 5.20 release (the cctools-590.23 release): -- Changed swap_i386_float_state() in i386_swap.c for the current floating point - i386 thread state (#if i386_THREAD_STATE == 1 case) so that it does swap - the struct fields if i386_EXCEPTION_STATE_COUNT is defined. Radar bug - #4350771. - -Changes for the 5.19 release (the cctools-590.11 release): -- Changed swap_i386_float_state() in i386_swap.c for the current i386 thread - states (#if i386_THREAD_STATE == 1 case) so that it does not swap any fields. - Removed the three added #defined's from the change below now that they are - no longer needed. Radar bug #4282026. - -Changes for the 5.19 release (the cctools-590.10 release): -- Added three #defined's to i386_swap.c - #define obsolete1 fpkind - #define obsolete2 initialized - #define obsolete3 exc_status - allow the source to build on Leopard with different fields in the struct - i386_float_state in . Radar bug #4279472. - -Changes for the 5.19 release (the cctools-590.8 release): -- Changed i386_swap.c to #if the old swap_i386_thread_fpstate(), - swap_i386_thread_exceptstate() and swap_i386_thread_cthreadstate() routines - and added the new swap_i386_float_state() and swap_i386_exception_state() - routines. Radar bug #4200908. - -Changes for the 5.18 release (the cctools-589 release): -- Added support for the CPU_SUBTYPE_PENTIUM_4 cpusubtype. Radar bug #4115802 - - Added an entry in the ArchInfoTable[] array in arch.c for pentium4 as: - {"pentium4", CPU_TYPE_I386, CPU_SUBTYPE_PENTIUM_4, NX_LittleEndian, - "Intel Pentium 4" }, -- Changed the Makefile and added a LEGACY macro with two defines to allow - the code to use the old field name "environ" from the i386 structs. - Radar bug #4113580. - -Changes for the 5.18 release (the cctools-583 release): -- Changed the Makefile so that when RC_XBS is set to YES then the compiler - options -MD and -dependency-file as well as the md(1) program are not used. - Radar bug #4029936. - -Changes for the 5.18 release (the cctools-580 release): -- Changed the Makefile to set CC to gcc-3.5 when RC_USE_GCC35_FOR_PPC64 is YES. - Radar bug #4066237. - -Changes for the 5.18 release (the cctools-579 release): -- Changed the Makefile to set CC to gcc-3.5 when RC_RELEASE is Saffron. - Radar bug #4064324. - -Changes for the 5.17 release (the cctools-574 release): -- Changed the routine NXCombineCpuSubtypes() in arch.c to combine any i386 - subtype to the ALL subtype. Radar 4002756. - -Changes for the 5.17 release (the cctools-562 release): -- Changed swap_ppc_thread_state_t() in ppc_swap.c to use cpu->vrsave and not - cpu->pad. Radar bug #3930480. - -Changes for the 5.17 release (the cctools-559 release): -- Added building libmacho_kld.a built for the kernel's kld use. Radar bug - #3906133. - - Changed the code to only compile the needed routines when RLD is defined: - - getsegbyname.c only compile getsegbyname() for RLD - - Changed the following files and ifndef RLD their entire contents: - arch.c, get_end.c, getsecbyname.c, hppa_swap.c,i386_swap.c, i860_swap.c, - m68k_swap.c, m88k_swap.c, ppc_swap.c,sparc_swap.c and swap.c . - - -Changes for the 5.16 release (the cctools-546 release): -- Changed the code to support 32-bit & 64-bit Mach-O files. Radar bug #3780704. - - Changed the Makefile to no longer pass -DINTERIM_PPC64 and to set CC to - gcc-3.5 when RC_RELEASE is Tiger or Gordian. Also the upper level Makefile - was change to edit out "-arch ppc64" from the RC_CFLAGS for the - ofiles_install for all builds except libmacho. - - Removed the INTERIM_PPC64 ifdefs in arch.c - - Updated the case code for CPU_TYPE_POWERPC64 in NXFindBestFatArch() in - arch.c to handle CPU_SUBTYPE_POWERPC_970. Also Radar bug #3825281. - - Updated and added routines to getsecbyname.c, getsegbyname.c and get_end.c - to compile for -arch ppc64 and new tool routines to deal with 64-bit APIs. - The new routines are: - In getsecbyname.c - getsectbynamefromheader_64(), getsectdatafromheader_64() - -Changes for the 5.16 release (the cctools-526 release): -- Changed the types of parameters of various routines and some of their local - variables from unsigned long to uint32_t to match the change in the header - files to make 32-bit Mach-O structures 32-bit clean. Radar bug #3744082. - - Changed the type of NXFindBestFatArch()'s nfat_archs argument to an uint32_t - and added an include of to arch.c . - - Changed all the unsigned long parameters in swap.c routines to uint32_t and - many local variables. - -Changes for the 5.16 release (the cctools-524 release): -- Fixed a bug in NXFindBestFatArch() in arch.c when trying to pick the lowest - model i386 fat arch. The variable lowest_model was initialized to ULONG_MAX - when it should have been LONG_MAX as it was a signed value. - Radar bug #3694812. - -Changes for the 5.16 release (the cctools-509 release): -- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 - file format. And added -DINTERIM_PPC64 to the Makefile. - -Changes for the 5.16 release (the cctools-499.1 release): -- Made changes to support the interim ppc64 file format. Radar bug #3562133 - and #3562232. - - Added an entry in the ArchInfoTable[] array in arch.c for ppc64 as: - {"ppc64", CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC64_ALL, NX_BigEndian, - "PowerPC 64-bit"}, - - In NXFindBestFatArch() in arch.c added a case statement for - CPU_TYPE_POWERPC64 and the code to look for CPU_SUBTYPE_POWERPC64_ALL. - -Changes for the 5.12 release (the cctools-464 release): -- Made changes to build cleanly with gcc3.3 - - Removed -Wno-precomp from the Makefile and setting RC_OS = macos - - Fixed warnings for "comparison between signed and unsigned" in arch.c, - getsecbyname.c and getsegbyname.c. - -Changes for the 5.12 release (the cctools-490 release): -- Fixed NXFindBestFatArch() in arch.c to not select a PowerPC 970 if not on a - PowerPC 970. And fixed it when passed the family ALL type and there is not - an exact match to select the cpusubtype's from the "top" of the list going - all possible subtypes. Radar bug #3387962. - -Changes for the 5.12 release (the cctools-449 release): -- Added the arch flag i686 to be the same as pentpro in arch.c. Radar bug - #3111977. - -Changes for the 5.12 release (the cctools-447 release): -- Added the VEO entries in the ArchInfoTable[] in arch.c so - NXGetArchInfoFromName() will work for VEO binaries. No changes where made - to NXFindBestFatArch() or NXCombineCpuSubtypes(). Radar bug #3096745. - -Changes for the 5.11 release (the cctools-440 release): -- Fixed the warnings about extra tokens at end of #endif directive in - getsecbyname.c (Radar bug #3072042). - -Changes for the 5.10 release (the cctools-414 release): -- Changed the calls to mach_host_self() in NXGetLocalArchInfo() in arch.c to - call mach_port_deallocate() on the port after the call. Radar bug #2895931. - -Changes for the 5.10 release (the cctools-403 release): -- Changed the macos_lib_ofiles_install target in the Makefile to work when - $SYMROOT is not set. So the top level Makefile can do a make install and - work by default. - -Changes for the 5.10 release (the cctools-400 release): -- Changed the Makefile back to again use the -dependency-file with gcc. - -Changes for the 5.10 release (the cctools-396 release): -- Changed the Makefile to not use the -dependency-file with gcc as well as - mwccppc. -- Added an include to i386_swap.c, sparc_swap.c and m88k_swap.c to - pick up the prototype for memcpy(). - -Changes for the 5.10 release (the cctools-386 release): -- Added the swap_prebind_cksum_command() to to swap.c. - -Changes for the 5.9 release (the cctools-367 release): -- Added swap_sub_library_command() to swap.c. Radar bug #2697458. -- Added swap_twolevel_hint(), swap_twolevel_hints_command() and the missing - swap_routines_command() to swap.c. Radar bug #2558069. - -Changes for the 5.9 release (the cctools-364 release): -- Changed NXCombineCpuSubtypes() in arch.c (as well as cpusubtype_combine() - in libstuff) for the ppc to select the highest subtype when there is not - an exact match and neither is a 601. -- Changed NXFindBestFatArch() in arch.c (as well as cpusubtype_findbestarch() - in libstuff) which had a problem with selecting the ppc cpusubtype when an - exact match could not be found. See Radar bug #2678019 against exec(2). - -Changes for the 5.9 release (the cctools-359 release): -- Added -Wno-long-double to shutup the compiler for - . - -Changes for the 5.8 release (the cctools-357 release): -- Added support for the CPU_SUBTYPE_POWERPC_7450 in arch.c . Radar bug #2599869. - -Changes for the 5.8 release (the cctools-344 release): -- Changed NXFindBestFatArch() in arch.c in the loop looking for the - lowest_model to save the current lowest_model so it finds the lowest_model. - -Changes for the the 5.8 release (the cctools-342 release): -- Added support for swapping the LC_SUB_CLIENT load command (Radar bug 2533649). - -Changes for the the 5.8 release (the cctools-341 release): -- Added support for swapping the LC_SUB_UMBRELLA load command (Radar bug - #2530028). -- Added back the building of optimized_ofiles and the installing of - libmacho_static.a to the Makefile for RC_OS=macos so that the static KLD - can be linked with it. Radar bug #2523649. - -Changes for the the 5.7 release (the cctools-329 release): -- Changed iinit and ninit fields of the struct dylib_module in - swap_dylib_module() in swap.c to iinit_iterm and ninit_nterm. - -Changes for the the 5.7 release (the cctools-328 release): -- Changed where the libraries get installed by default. So going forward things - get install in /usr/local/lib/system and /Local/Developer/System - is only used for RC_OS=macos when RC_RELEASE is Gonzo, Bunsen or Beaker. - Radar bug #2469527. - -Changes for the the 5.7 release (the cctools-327 release): -- Changed where the libraries get installed by default. So going forward things - get install in /AppleInternal/Developer/System and /Local/Developer/System - is only used for RC_OS=macos when RC_RELEASE is Gonzo, Bunsen or Beaker. - -Changes for the the 5.6 release (the cctools-323 release): -- Changed where the libraries get installed for the Space release in preparation - of this "Half Plan" becoming the default for DP4 (Gonzo). This directory - /Local/Developer/System is changing to /AppleInternal/Developer/System. - -Changes for the 5.6 release (the cctools-320 release): -- Added support for the new LC_SUB_FRAMEWORK load command to support "Guarding - against direct linking of non-umbrella frameworks". The file that swaps - load commands, swap.c, was updated. The public header file in - was also updated and the missing prototypes for other functions were also - added. Radar bug 2443212. - -Changes for the 5.5 release (the cctools-307 release): -- Added support for the CPU_SUBTYPE_POWERPC_7400 in arch.c. Radar bug #2397523. - -Changes for the 5.4 release (the cctools-296 release): -- For RC_OS=macos no longer build the _static versions, the libmacho_pg.a - version is now copied as libmacho_profile.a and a link to libmacho_debug.a is - made from libmacho.a. - -Changes for the 5.3 release (the cctools-285 release): -- Changed the Makefile to build libmacho.a, libmacho_pg.a and libmacho_static.a - in $(DSTROOT)/Local/Developer/System for MacOS X, that is when $(RC_OS) is - macos. This to allow System framework to be built without using SUBLIBROOTS. - Radar bug #2268413. - -Changes for the 5.3 release, MacOS X bring up (the cctools-282 release): -- Changed swap_ppc_thread_state_t() to not use bit fields for srr1, cr and exr - to match the ppc_thread_state for Rhapsody/MacOS X. -- Changed host_self() to mach_host_self() for MacOS X. Also included - "stuff/openstep_mach.h" for macros to allow it to still build on Openstep. - Also changed ifdef's __SLICK__ to __OPENSTEP__. -- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. -- Added a few casts in places to get it to compile with the MetroWerks compiler - without -relax_pointers. - -Changes for the 5.2 release (the cctools-277 release): -- Added code in NXGetArchInfoFromCpuType() for i386 and ppc to create an - NXArchInfo struct with strings for unknown subtypes. Radar bug #2241690. - -Changes for the 5.2 release (the cctools-274 release): -- Removed uses of CPU_SUBTYPE_586SX from arch.c and added new intel subtypes. - Updates NXFindBestFatArch() and NXCombineCpuSubtypes() from libstuff's - version. Radar bug #2231830. - -Changes for the 5.2 release (the cctools-268 release): -- Removed getmachhead.o from dylib.ofileList. - -Changes for the 5.2 release (the cctools-267 release): -- Removed the -DDYLD_PROFILING flag from the Makefile which was left over when - copying libdyld's Makefile. Radar bug #2227782. -- Fixed some warnings from getsectdatafromFramework() code added. Included - "mach-o/dyld.h" in all DYNAMIC cases. Also changed getsectbynamefromheader() - to use const for segname and sectname. Radar bug #2227839. -- Added getsectdatafromFramework() as per Radar 2151720. - -Changes for the 5.1 release (the cctools-261 release): -- Added the PowerPC subtypes 603e, 603ev and 750 to the table of arch types. - (Radar 2213821) -- Changed NXFindBestFatArch() in arch.c for PowerPC subtypes. If an - exact match is not found the subtype will be picked from the following order: - 750, 604e, 604, 603ev, 603e, 603, ALL - Note the 601 is NOT in the list above. It is only picked via an exact match. - (Radar 2213821) -- Changed NXCombineCpuSubtypes() in arch.c for for PowerPC subtypes. - Combining with the ALL type becomes the other type. Combining anything with - the 601 becomes 601. All other non exact matches combine to the ALL type. - (Radar 2213821) - -Changes for the 5.1 release (the cctools-247 release): -- Fixed bugs in getsegbyname.c and getsecbyname.c on the ifdef __SLICK__ side - where the mach header pointer was not set. The missing line of code was: - mhp = (struct mach_header *)(& USE_VAR(_mh_execute_header)); - This is the 4.2 Openstep side so these bugs don't really matter. -- Added MKDIRS if code to the Makefile to build native on Rhapsody. -- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody - where tar does not. -- Changed the Makefile so profiled objects get built for RC_OS teflon. -- Changed the code ifdef __TEFLON__ to ifndef __SLICK__ (where __TEFLON__ will - nolonger be defined for Rhapsody builds) so the default builds will be native - Rhapsody builds. The changes were to get_end.c, getmachhead.c, - getsecbyname.c and getsegbyname.c . - -Changes for the 5.0 release (the cctools-241 release): -- Added ppc604e to the arch table (Radar 1669413). - -Changes for the 5.0 release (the cctools-226 release): -- Added ppc604 to the arch table and to get_arch_from_host(). This is what - the kernel on the Power Mac 8500 is returning. - -Changes for the 5.0 release (the cctools-224 release): -- Added a sparc_swap.c and a ppc_swap.c. - Added them to the Makefile and dylib.ofileList (but not the shlib.ofileList). -- Added i860_swap.c and a m88k_swap.c but did NOT add them to any ofileList. -- Pulled in hppa_swap.c, i386_swap.c, and m68k_swap.c from the libc_gen - project. Added them to the Makefile and dylib.ofileList (except hppa_swap.c) - but not the shlib.ofileList. Updated these files with the code from - libstuff's bytesex.c. -- Updated swap.c from libstuff's bytesex.c adding the following routines: - swap_dysymtab_command() - swap_dylib_command() - swap_prebound_dylib_command() - swap_dylinker_command() - swap_indirect_symbols() - swap_dylib_reference() - swap_dylib_module() - swap_dylib_table_of_contents() -- Updated arch.c by changing m98k to ppc and removed the never supported - architectures (mips,and vax). Also copied in the implementation of - cpusubtype_findbestarch() from libstuff's best_arch.c into - NXFindBestFatArch() and likewise for cpusubtype_combine() into - NXCombineCpuSubtypes(). -- Fixed the type of headers in getmachheaders() in getmachhead.c to fix a - warning. -- Fixed a warning in getsectdatafromlib() in getsecbyname.c. - -Changes for the 5.0 release (the cctools-223 release): -- Put back changes ifndef'ed __TEFLON__ . - -Changes for the 5.0 release (the cctools-221.6 and cctools-222 releases): -- Picked up changes to get_end() in get_end.c to use _NSGetMachExecuteHeader(). -- Picked up changes to getmachheaders() in getmachhead.c to use - _NSGetMachExecuteHeader(). -- Picked up changes to getsectbyname() and getsectdatafromlib() in - getsecbyname.c to use _NSGetMachExecuteHeader(). -- Picked up changes to getsegbyname() in getsegbyname.c to use - _NSGetMachExecuteHeader(). - -Changes for the 5.0 release (the cctools-221.1 and cctools-222 releases): -- Picked up changed to the Makefile to not build profile objects for teflon. - This is because the PowerPC compiler core dumps with -pg. +Changes for the 5.26 release (the cctools-721 release): +- Changed the Makefile and removed -force_cpusubtype_ALL from KERN. Radar bug + #6233829. + +Changes for the 5.26 release (the cctools-705 release): +- Ported to run on 64-bit hosts. Radar bug #6022298. + +Changes for the 5.26 release (the cctools-700 release): +- Fixed a problem with swap_relocation_info() in swap.c where it was incorrectly + using "long" which should be "uint32_t" in two places, the fields r_address + and r_value fields of the swapped_relocation_info and the + swapped_scattered_relocation_info structures. Radar bug #5904383. + +Changes for the 5.25 release (the cctools-697 release): + +Changes for the 5.25 release (the cctools-696 release): +- Changed the Makefile to use -iwithsysroot as part of the KERN flags. + +Changes for the 5.25 release (the cctools-679.4 and cctools-686 releases): +- Changed the Makefile to test OLD_LIBKLD passed down from the upper Makefile + so to not build libmacho_kld.a when OLD_LIBKLD is not YES. Radar bug #5780592. + +Changes for the 5.25 release (the cctools-682 release): +- Updated NXCombineCpuSubtypes() in arch.c to include arm. + +Changes for the 5.25 release (the cctools-681 release): +- Removed all __OPEN_SOURCE__ references in: Makefile, notes and arch.c . + +Changes for the 5.25 release (the cctools-677 release): +- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . + Radar bug #5563553. + +Changes for the 5.25 release (the cctools-676 release): +- Changed get_end.c, getsecbyname.c and getsegbyname.c to stop defining + _NSGetMachExecuteHeader and just use it out of . + Radar bug #4696889. + +Changes for the 5.25 release (the cctools-673 release): +- Changed the sources so the arm stuff is not in the open source version. + Radar bug #5326431. + - Changed the Makefile to build with -D__OPEN_SOURCE__ with $(OPEN) + - Added #ifndef __OPEN_SOURCE__ to arch.c to bracket arm code. + +Changes for the 5.24 release (the cctools-652 release): +- Added creating a vers.c file and linking in the vers.o into the libmacho + archives. Radar bug #4980378. + +Changes for the 5.24 release (the cctools-642 release, + picked up from cctools-640.1): +- Fixed a problem in NXGetArchInfoFromCpuType() with the use of + CPU_SUBTYPE_MULTIPLE and the changes to use CPU_SUBTYPE_MASK to mask out the + capability bits. Since the value of CPU_SUBTYPE_MULTIPLE is -1, the diff --git a/cctools/libstuff/notes b/cctools/libstuff/notes dissimilarity index 99% index eb930b6..d953471 100644 --- a/cctools/libstuff/notes +++ b/cctools/libstuff/notes @@ -1,1494 +1,5 @@ -- cpusubtype_findbestarch() in best_arch.c when passed CPU_SUBTYPE_POWERPC_ALL - as the cpusubtype and only 7440 and 750 were in the fat file nothing was - selected. Is this right? - -TODO: -- Deal with LC_PREPAGE and unknown load commands that don't need to be swapped. - -Changes for the 5.26 release (the cctools-750 release): -- Added lto_get_nlist_64() to lto.c for use by nm(1) print information from - llvm bit code files. Radar bug #6067110. -- Updated set_lto_cputype() in lto.c for the arm target_triples. Radar bug - #6654890. - -Changes for the 5.26 release (the cctools-748 release): -- Fixed a bug in swap_object_headers() where it was missing a second case for - LC_DYLD_INFO_ONLY which caused that load command to not actually get swapped. - Radar bug #6591303. - -Changes for the 5.26 release (the cctools-733 release): -- Changed check_Mach_O() in ofile.c to allow 64-bit Mach-O core files to have - LC_THREAD commands that are only a multiple of 4 and not 8 since the kernel - produces them. Radar bug #6379874. - -Changes for the 5.26 release (the cctools-730 release): -- Changed set_lto_cputype() in lto.c to also check for "i386" as well as "i686" - when determining the target_triple string is for a CPU_TYPE_I386. Radar bug - #6331191. - -Changes for the 5.26 release (the cctools-726 release): -- Changed lto_toc_symbol() in lto.c to return 0 for symbols with the - LTO_SYMBOL_SCOPE_MASK bits being LTO_SYMBOL_SCOPE_INTERNAL. - Radar bug #6092587. - -Changes for the 5.26 release (the cctools-725 release): -- Added support for new compressed LINKEDIT information. Radar bug #6232822. - - Implemented swap_dyld_info_command() in bytesex.c . - - Handle LC_DYLD_INFO in check_object() and dyld_order() in checkout.c . - - Check for malformed dyld_info in check_Mach_O() in ofile.c . - - Handle dyld_info in swap_object_headers() in swap_headers.c . - - Handle dyld_info in copy_new_symbol_info() in writeout.c . - -Changes for the 5.26 release (the cctools-721 release): -- Changed the Makefile and removed -force_cpusubtype_ALL from KERN. Radar bug - #6233829. - -Changes for the 5.25 release (the cctools-718 release): -- Added swap_debug_directory_entry() and swap_mtoc_debug_info() to - coff_bytesex.c. Radar bug #6211642. - -Changes for the 5.26 release (the cctools-709 release): -- Fixed the integer overflows bugs in ofile.c: - - In check_Mach_O() in ofile.c changed the check for inconsistent cmdsize in - an LC_SEGMENT to calculate the size into a 64-bit value from the 32-bit - values and used a 64-bit compare so it can't overflow. Radar bug #5749756. - - In check_Mach_O() in ofile.c changed the check for load command that extend - past the commands to calculate the end of the current load command into - a 64-bit value from the 32-bit value and use a 64-bit compare against the - sizeofcmds so it can't overflow. Radar bug #5749890. - - In check_Mach_O() in ofile.c change all the remaining checks to calculate - the size or count into a 64-bit value from the 32-bit values and use a - 64-bit compare so it can't overflow. Radar bug #5750382. - -Changes for the 5.26 release (the cctools-708 release): -- Changed writeout.c to use use the ar long string format for the __.SYMDEF - table of contents member so it will produce archive member offsets after - that that are 8 byte aligned. -- Updated the #ifdef around ALIGNMENT_CHECKS_ARCHIVE_64_BIT to not do it when - __x86_64__ is defined. - -Changes for the 5.26 release (the cctools-707 release): -- Added -I/Developer/usr/local/include to the lto.o build line in the Makefile. - -Changes for the 5.26 release (the cctools-705 release): -- Ported to work on 64-bit hosts. Radar bug #6022298. - - Changed the unsigned long types in coff_bytesex.c to a uint32_t types. - - Changed the unsigned long types in version_number.c to a uint32_t types. - - Changed the unsigned long types in symbol_list.c to a uint32_t types. - - Changed the unsigned long types in round.c to a uint32_t types. - - Changed the unsigned long types in reloc.c to a uint32_t types. - - Changed the unsigned long types in ofile.c to a uint32_t types and changed - the long types to int32_t types. Except for the sizeof(long) used for - thread states it was changed to sizeof(uint32_t). Also change all the %lu - formats to %u and one %ld to %u. Also changed uses of ULONG_MAX to - UINT_MAX. - - Changed the unsigned long type in ofile_get_word.c to a uint32_t type and - changed the long type to an int32_t type. - - Changed the unsigned long types in macosx_deployment_target.c to uint32_t - types and %lu to %u in a sprintf format string. - - Changed the unsigned long types in lto.c to size_t types. - - Changed the unsigned long types in hppa.c to uint32_t types. - - Changed the long types in hash_string.c to int32_t types. - - Changed the long types in execute.c to int types. - - Changed the unsigned long types in seg_addr_table.c to uint32_t types and - changed %lu to %u in an error string formats. Also changed uses of - ULONG_MAX to UINT_MAX. And changed to use mmap() instead of map_fd(). - - Changed the type of errors in errors.c from an unsigned long type to a - uint32_t type. - - Changed the unsigned long types in dylib_table.c to uint32_t types and - changed 3 %lu to %u in an error string formats. - - Changed the one unsigned long type in dylib_roots.c to a uint32_t type. - - Changed the unsigned long type and the unsigned int type in crc32.c to - uint32_t types. - - Changed the unsigned long types in bytesex.c and get_toc_byte_sex.c to - uint32_t types. - - Changed the unsigned long types in checkout.c to uint32_t types. And changed - one %lu to %u in an error string format. - - Changed the unsigned long types in writeout.c to uint32_t types. Except for - the time variables which were changed to the time_t type from unsigned long. - Also changed the remaining long types to int32_t types. And changed one - %lu to %u in an error string format. Also changed uses of ULONG_MAX to - UINT_MAX. - - Changed the unsigned long types in breakout.c to uint32_t types. And added - two (long unsigned int) casts before two printf() parameters. - - Changed the type that cpusubtype_findbestarch() takes in best_arch.c to a - uint32_t from an unsigned long. And changed the remaining use of - unsigned long to uint32_t in best_arch.c . - - Changed the type that get_stack_size_from_flag(), get_segalign_from_flag() - and get_shared_region_size_from_flag() returns in arch.c to a uint32_t from - an unsigned long. Changed the type that get_stack_direction_from_flag() - returns in arch.c to an int from a long. Changed the remaining uses of - unsigned long to uint32_t in arch.c . - - Changed the type that allocate() and reallocate() takes in allocate.c to a - size_t from an unsigned long. - -Changes for the 5.26 release (the cctools-703 release): -- Fixed an incorrect usage of the unsigned long type that should have been - uint32_t in swap_object_headers() in swap_headers.c and in check_Mach_O() in - ofile.c used in arm threads . -- Fixed a warning in swap_object_headers() in swap_headers.c that was using the - wrong pointer type in the first LC_ENCRYPTION_INFO case. - -Changes for the 5.26 release (the cctools-701 release): -- Changed ofile_first_member() in ofile.c to test the archive member name for - "__.SYMDEF SORTED" or "__.SYMDEF" and not call is_llvm_bitcode() if the - member name is either of those two table of contents member names. - Radar bug #5919409. - -Changes for the 5.25 release (the cctools-698 release): -- Added support for LLVM bitcode files. Radar bug #5712460. - It was added undef the ifdef LTO_SUPPORT and can be disabled by setting the - LTO Makefile macro to nothing instead of its default -DLTO_SUPPORT . - - Added lto.c with new routines to support llvm bitcode files. - - Added lto.c to the Makefile and the LTO macro defined to -DLTO_SUPPORT to - enable it. - - Added support for llvm bitcode files to ofile.c . - - ofile_map_from_memory() now calls is_llvm_bitcode() when it has an - unknown ofile type to see if it is a llvm bitcode file and make - the error checks against any arch_flag and object_name. - - ofile_first_member(), ofile_next_member() and ofile_specific_member() now - call is_llvm_bitcode() when it has an unknown member and sets it up the - ofile . They also clear the new lto* fields in the ofile. - -Changes for the 5.25 release (the cctools-697 release): - -Changes for the 5.25 release (the cctools-696 release): -- Changed the Makefile to use -iwithsysroot as part of the KERN flags. - -Changes for the 5.25 release (the cctools-691 release): -- Added support for the LC_ENCRYPTION_INFO load command. Radar bug #5811994. - - Added swap_encryption_command() to bytesex.c . - - Added support for the LC_ENCRYPTION_INFO command in check_Mach_O() in - ofile.c and in swap_object_headers() in swap_headers.c . - -Changes for the 5.25 release (the cctools-690 release): -- Changed the Makefile to not build coff_bytesex.c if EFITOOLS is not set via - the top level Makefile. Radar bug #5826370. - -Changes for the 5.25 release (the cctools-688 release): -- Added a case label for LC_LAZY_LOAD_DYLIB in check_Mach_O() in ofile.c and - in swap_object_headers() in swap_headers.c . Radar bug #5760930. - -Changes for the 5.25 release (the cctools-679.4 and cctools-686 releases): -- Changed the Makefile to test OLD_LIBKLD passed down from the upper Makefile - so to not build libmacho_kld.a when OLD_LIBKLD is not YES. Radar bug #5780592. - -Changes for the 5.25 release (the cctools-682 release): -- Changed get_macosx_deployment_target() in macosx_deployment_target.c under the - label bad_system_value to use 10.6 as the highest know shipping version. - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in: Makefile, notes, arch.c, - best_arch.c, bytesex.c, get_arch_from_host.c, ofile.c, reloc.c and - swap_headers.c . - -Changes for the 5.25 release (the cctools-680 release): - -Changes for the 5.25 release (the cctools-678 release): -- Added swap_ms_dos_stub(), swap_filehdr(), swap_aouthdr(), swap_scnhdr() and - swap_syment() to coff_bytesex.c . Radar bug #5536661. - -Changes for the 5.25 release (the cctools-677 release): -- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . - Radar bug #5563553. - -Changes for the 5.25 release (the cctools-676 release): -- Changed ofile_process() in ofile.c when dealing with a fat file where -arch - flags are specified on when to treat the -arch flag as a family flag. Now - the check for the family flag is done even if there is more than one -arch - flag. Radar bug #5205751. -- Changed ofile_process() in ofile.c to call ofile_unmap() before returning. - Radar bug #5156499. -- Added coff_bytesex.c to swap structs in PECOFF base relocation table. - Radar bug #5218665. -- Change swap_base_relocation_block_header() in coff_bytesex.c to use SWAP_INT - in place of SWAP_LONG so it would not be undefined when __LP64__ is defined. - -Changes for the 5.25 release (the cctools-675 release): -- Changed free_archs() in breakout.c to call ofile_unmap() on the new ld_r_ofile - field in the struct object if it is not NULL. It is set in strip(1) when - making an ld -r of an object for stripping DWARF. Radar bug #5343015. - -Changes for the 5.25 release (the cctools-673 release): -- Changed the sources so the arm stuff is not in the open source version. - Radar bug #5326431. - - Changed the Makefile to build with -D__OPEN_SOURCE__ with $(OPEN) - - Added #ifndef __OPEN_SOURCE__ to the following files to bracket arm code: - arch.c, best_arch.c, bytesex.c, get_arch_from_host.c, ofile.c, reloc.c and - swap_headers.c . - -Changes for the 5.24 release (the cctools-669 release): -- Change swap_arm_thread_state_t() in bytesex.c, check_Mach_O() in ofile.c and - swap_object_headers() in swap_headers.c to use SWAP_INT in place of SWAP_LONG - so it would not be undefined when __LP64__ is defined. - -Changes for the 5.24 release (the cctools-667.2 release): -- Changed get_segalign_from_flag() in arch.c so that if returns 4K for - CPU_TYPE_POWERPC64 and CPU_TYPE_X86_64 so that the __LINKEDIT segment after - codesign_allocate(1) does not end up with zerofill (and writeable) pages at - the end. Radar bug #5363873. - -Changes for the 5.24 release (the cctools-663 release): -- Changed get_macosx_deployment_target() in macosx_deployment_target.c so that - it now takes a pointer to a struct that it fills in with the major, minor and - name of the macosx_deployment_target. Also changed the default to be the - current version of the machine it is running on. Radar bug #5132019. - -Changes for the 5.24 release (the cctools-658 release): -- Changed symbol_string_at_end() in checkout.c to also set the - input_indirectsym_pad field in the object structure for relocatable objects - just as dyld_order() does for fully linked objects. To deal correctly with - the fact that 64-bit files may or may not have padding after the indirect - symbol table entries. Radar bug #5054452. - -Changes for the 5.24 release (the cctools-657 release): -- Fixed a problem with the fix below. Basically what was needed was to swap - back the headers of a fat file when ever only some parts were processed or - stepped over and other parts could be processed. The fix is the same as below - but in more places. This is now done by testing headers_swapped field in the - ofile struct can calling the new routine swap_back_Mach_O(). Radar bug - #5055223. - -Changes for the 5.24 release (the cctools-656 release): -- Fixed a problem with the fix to Radar bug #4970647. That fix missed the - case when an architecture was swap a first time and used then stepped over a - second time. The fix was in ofile_process() in ofile.c to also check - the headers_swapped field in the case the architecture was used to also swap - it back. Radar bug #5047924. - -Changes for the 5.24 release (the cctools-653 release): -- Updated ofile.c and swap_headers.c to handle the LC_REEXPORT_DYLIB load - command. Radar bug #4986624. - -Changes for the 5.24 release (the cctools-651 release): -- Changed check_Mach_O() in ofile.c to set the new headers_swapped field in the - ofile struct. Then in ofile_process() for looping through a fat file this - is checked and if TRUE, cleared and the headers are swapped back. - Radar bug #4970647. - -Changes for the 5.24 release (the cctools-645 release): -- Added support for rpath load command. Radar bug #4822880. - - Added swap_rpath_command() to bytesex.c . - - Updated swap_object_headers() in swap_headers.c to support the LC_RPATH - load command. - - Added checks in check_Mach_O() in ofile.c to all the LC_RPATH load command. - -Changes for the 5.24 release (the cctools-648 release): -- Changed the check in ofile_map_memory(1) for the nfat_arch being too large - so the check does not overflow and later cause a crash. Then changed the - #ifdef'ed OTOOL code to simply allocate the size of the file minus the fat - header for swapping and printing. Radar bug #4860769. - -Changes for the 5.24 release (the cctools-644 release): -- Changed ofile_map() in ofile.c to test if the size of the file attempted to - be mmap(2)'ed is zero and not call mmap(2). Radar bug #4795458. -- Added entries in arch_flags[] in arch.c for veo3 & veo4. Added code for - CPU_SUBTYPE_VEO_3 and CPU_SUBTYPE_VEO_4 to cpusubtype_findbestarch() and - cpusubtype_combine() in best_arch.c and to get_arch_from_host() in - get_arch_from_host.c . Radar bug #4799550. -- Changed get_stack_addr_from_flag() in arch.c to return a uint64_t and added - case values for CPU_TYPE_POWERPC64 and CPU_TYPE_X86_64. Radar bug #4458775. - -Changes for the 5.24 release (the cctools-640 release): -- Changed arch.c, best_arch.c, ofile.c, and set_arch_flag_name.c to use - CPU_SUBTYPE_MASK to mask out the capability bits from the cpusubtype on - comparisons. Radar bug #4754462. - -Changes for the 5.24 release (the cctools-639 release): -- Changed copy_new_symbol_info() in writeout.c to use the input_indirectsym_pad - from the object struct instead of trying to pad based on the number of - indirect symbol table entries. Radar bug #4759112. - -Changes for the 5.24 release (the cctools-638 release): -- Changed dyld_order() in checkout.c to deal with the fact that 64-bit files may - or may not have padding after the indirect symbol table entries. The padding - in the input file is determined and saved in the new input_indirectsym_pad - field in the object struct. Also changed copy_new_symbol_info() in writeout.c - to pad the indirect symbol table if it has an odd number of entries for 64-bit - files. Radar bug #4747408. - -Changes for the 5.24 release (the cctools-637 release): -- Changed dyld_order() in checkout.c to round the offset after the in indirect - symbol table entries to a multiple of 8 if it is a 64-bit Mach-O file and - their are an odd number of indirect symbol table entries. Radar bug #4737991. - -Changes for the 5.24 release (the cctools-626 release): -- Made the needed changes to support the split info. Radar bug #4695477. - - Changed check_object() in checkout.c to pick up the LC_SEGMENT_SPLIT_INFO - command and check for duplicates. - - Added checks in dyld_order() in checkout.c to check the order of the split - info data if it is there. - - Changed copy_new_symbol_info() in writeout.c to copy out and or increment - the *size passed in for the output_split_info_data_size . - - Added checks in check_Mach_O() in ofile.c to check the LC_SEGMENT_SPLIT_INFO - command and check for duplicates. - - Updated swap_object_headers() in swap_headers.c to support the - LC_SEGMENT_SPLIT_INFO load command. - -Changes for the 5.24 release (the cctools-632 release): -- Ported code the code used by libredo_prebinding.a and libsyminfo.a to be - compiled for 64-bit hosts. Radar bug #4407440. - - Changed the Makefile and added the lib_ofiles and lib_ofiles_install targets - to build just the dynamic target for use with libredo_prebinding.a and - libsyminfo.a to be built for all architectures in RC_CFLAGS. - - Ported writeout.c to by not using ranlib structs since ran_un.ran_name - can be used when compiling for 64-bit hosts. - - Changed the code to use the new toc_entry struct added to - . and changed the uses of toc_nranlibs field name to - ntocs. - - Also changed the use of SWAP_LONG to SWAP_INT for the size of ranlib - structs and strings in the table of contents and changed the used of - sizeof(long) to sizeof(uint32_t). - - Change the size of an indirect symbol table entries to sizeof(uint32_t) - from sizeof(unsigned long). - - Ported bytesex.c by changing SWAP_LONG to SWAP_INT and a number of local - struct definitions using fields to union with uint32_t instead of unsigned - long. Change the type of the pointer to indirect symbol table entries - from unsigned long * to uint32_t in swap_indirect_symbols() and changed - the count to a uint32_t. - - Ported get_toc_byte_sex.c, ofile_get_word.c, swap_headers.c and ofile.c by - changing SWAP_LONG to SWAP_INT and a number unsigned long uses to uint32_t. - - Also changed ofile.c so temporary_archive_member_warning() in also defined - when ALIGNMENT_CHECKS_ARCHIVE_64_BIT is defined. - - Also changed ofile_map() in ofile.c to use mmap() instead of map_fd(). - - Ported dyld_order() and symbol_string_at_end() in checkout.c to change - a use of unsigned long to uint32_t for the size of indirect symbol table - entries. - -Changes for the 5.24 release (the cctools-627 release): -- As part of the port to unify otool(1) and otool64(1) finished the port of - libstuff and removed the no longer needed libstuff64 libraries. Radar bug - #3903136. -- Fixed a number of place in ofile.c that was not setting ofile->mh64 to NULL - when it was setting ofile->mh to NULL. Radar bug #4593267. - -Changes for the 5.24 release (the cctools-627 release): -- Changed check_object() in checkout.c so the test for not having an LC_ID_DYLIB - load command if it is a MH_DYLIB_STUB and has a non-zero number of load - commands. Radar bug #4511628. - -Changes for the 5.24 release (the cctools-626 release): -- Made the needed changes to support the code signature. Radar bug #4588023. - - Changed check_object() in checkout.c to pick up the LC_CODE_SIGNATURE - command and check for duplicates. - - Added checks in dyld_order() in checkout.c to check the order of the code - signature data if it is there. - - Changed copy_new_symbol_info() in writeout.c to copy out and or increment - the *size passed in for the output_code_sig_data_size . - - Added checks in check_Mach_O() in ofile.c to check the LC_CODE_SIGNATURE - command and check for duplicates. - - Added swap_linkedit_data_command() to bytesex.c . - - Updated swap_object_headers() in swap_headers.c to support the - LC_CODE_SIGNATURE load command. - -Changes for the 5.23 release (the cctools-620 release): -- Added the routines swap_x86_float_state64(), swap_x86_state_hdr(), - swap_x86_exception_state64(), swap_x86_debug_state32(), - swap_x86_debug_state64() to bytesex.c . Radar bug #4491230. - -Changes for the 5.23 release (the cctools-614 release): -- Changed bytesex.c to add macros that rename structure members of the - ppc and i386 thread states for Unix conformance. Radar bug #4508798. -- Changed swap_headers.c to add macros that rename i386 thread states for - Unix conformance. Radar bug #4508798. - -Changes for the 5.23 release (the cctools-610 release): -- Added a few ifdef x86_THREAD_STATE64 to a few places in bytesex.c and - swap_headers.c to allow it to build on Tiger. Radar bug #4535019. - -Changes for the 5.22 release (the cctools-590.38.3 release): -- Don't consider X86_64_RELOC_SUBTRACTOR relocations to be paired. Radar bug - #4504190. - -Changes for the 5.22 release (the cctools-590.37.3 release): -- When swap_object_headers sees a thread state flavor that it doesn't know - about, print the flavor number itself in the error message in addition to the - other information that was already being printed. Radar bug #4491140. -- Correctly swap x86_THREAD_STATE64 states when running on PowerPC. Also, - update to the current definition of the x86-64 thread state. Radar bug - #4491228. - -Changes for the 5.22 release (the cctools-590.36.3 release): -- Swap the LC_ROUTINES_64 load command correctly. Radar bug #4451600. - -Changes for the 5.22 release (the cctools-590.31.1 release): -- Added support for the x86_64 architecture. Radar bug #4345090. - -Changes for the 5.21 release (the cctools-590.25 release): -- Added more support for DWARF. Radar bug #4367423. - - Updated check_Mach_O() in ofile.c to deal with LC_UUID load commands. - -Changes for the 5.21 release (the cctools-590.24 release): -- Added support for DWARF. Radar bug #4367423. - - Added swap_uuid_command() to bytesex.c . - - Updated swap_object_headers() in swap_headers.c to deal with LC_UUID load - commands. - -Changes for the 5.20 release (the cctools-590.23 release): -- Changed swap_i386_float_state() in bytesex.c for the current floating point - i386 thread state (#if i386_THREAD_STATE == 1 case) so that it does swap - the struct fields if i386_EXCEPTION_STATE_COUNT is defined. Radar bug - #4350771. - -Changes for the 5.20 release (the cctools-590.21 release): -- Fixed a bug in writeout_to_mem() in writeout.c for the code that was - staggering the timestamps of dylibs with muliple cpusubtypes. It needed to - have code to be able byteswap the load commands because the archs it was - walking through may have been byte swapped for output. Radar bug #4265381. -- Fixed a bug in ofile_process() for the #ifdef OTOOL case that needed to have - code that checked the non-swapped case since the checking code is not called - to set up the ofile->mh_cputype fields. Radar bug #4337271. - -Changes for the 5.20 release (the cctools-590.20 release): -- Removed the warnings when building. Radar bug #4340147. - - Added -fno-builtin-round to the Makefile. - - Removed the const from command_line_macosx_deployment_target in and - put_macosx_deployment_target() in macosx_deployment_target.c . - - Added two #undef THREAD_STATE_NONE and two #undef VALID_THREAD_STATE_FLAVOR - to bytesex.c and swap_headers.c . - -Changes for the 5.19 release (the cctools-590.12 release): -- Added the new routine get_segprot_from_flag() to arch.c that is passed an - arch flag and returns the default segment protection. Radar bug #4281171. - -Changes for the 5.19 release (the cctools-590.11 release): -- Changed swap_i386_float_state() in bytesex.c for the current i386 thread - states (#if i386_THREAD_STATE == 1 case) so that it does not swap any fields. - Removed the three added #defined's from the change below now that they are - no longer needed. Radar bug #4282026. - -Changes for the 5.19 release (the cctools-590.10 release): -- Added three #defined's to bytesex.c: - #define obsolete1 fpkind - #define obsolete2 initialized - #define obsolete3 exc_status - allow the source to build on Leopard with different fields in the struct - i386_float_state in . Radar bug #4279472. - -Changes for the 5.19 release (the cctools-590.8 release): -- Changed check_Mach_O() in ofile.c as well as swap_object_headers() in - swap_headers.c and added an #if to allow the older i386_THREAD_STATE value of - -1. Radar bug #4240450. -- Changed the needed code to for the new i386 thread states. Radar bug #4200908. - - Changed bytesex.c to #if the old swap_i386_thread_fpstate(), - swap_i386_thread_exceptstate() and swap_i386_thread_cthreadstate() routines - and added the new swap_i386_float_state() and swap_i386_exception_state() - routines. - - Changed swap_object_headers() in swap_headers.c and check_Mach_O() in - ofile.c to #if the code for the new and old i386 thread states and adding - code for the new thread states. - -Changes for the 5.19 release (the cctools-590.7 release): -- Added the new routine put_macosx_deployment_target() to - macosx_deployment_target.c to allow the value of MACOSX_DEPLOYMENT_TARGET to - be set on the argument to the compiler command line flag -macosx_version_min. - Radar bug #4195253. - -Changes for the 5.19 release (the cctools-590.1 release): -- Fixed a bug in setup_symbol_list() in symbol_list.c where if there are more - than two duplicates in the list only the first duplicate is removed. - Radar bug #4139106. - -Changes for the 5.18 release (the cctools-589 release): -- Added support for the CPU_SUBTYPE_PENTIUM_4 cpusubtype. Radar bug #4115802 - - Added an entry in the arch_flags[] array in arch.c for pentium4 as: - { "pentium4",CPU_TYPE_I386, CPU_SUBTYPE_PENTIUM_4 }, - - Added code in get_arch_from_host() in get_arch_from_host.c for the - CPU_SUBTYPE_PENTIUM_4 cpusubtype. - - Added a case for CPU_SUBTYPE_PENTIUM_4 in cpusubtype_execute() in - best_arch.c . -- Changed the Makefile and added a LEGACY macro with two defines to allow - the code to use the old field name "environ" from the i386 structs. - Radar bug #4113580. - -Changes for the 5.18 release (the cctools-583 release): -- Added the following entry to the table in macosx_deployment_target.c : - { "10.5", MACOSX_DEPLOYMENT_TARGET_10_5 }, - Radar bug #4098516. -- Changed the Makefile so that when RC_XBS is set to YES then the compiler - options -MD and -dependency-file as well as the md(1) program are not used. - Radar bug #4029936. - -Changes for the 5.18 release (the cctools-580 release): -- Changed get_macosx_deployment_target() in macosx_deployment_target.c to take - an additional cpu_type_t parameter. Then if new cpu_type_t parameter is - CPU_TYPE_I386 the default is set to 10.4 otherwise it is set to 10.1. - Radar bug #4081062. - -Changes for the 5.17 release (the cctools-574 release): -- Changed the routine cpusubtype_combine() in best_arch.c to combine any i386 - subtype to the ALL subtype. Radar 4002756. -- Added the routine force_cpusubtype_ALL_for_cputype() to arch.c that is passed - a cputype and returns TRUE if the that architecture is to force its - cpusubtypes to be the ALL type. And the implementation returns TRUE for - CPU_TYPE_I386 and FALSE for all others. Radar bug #4002758. - -Changes for the 5.17 release (the cctools-572 release): -- Fixed a bug in swap_object_headers() in swap_headers.c which was missing some - code to handle the ppc64 thread state. Radar bug #4010859. -- Fixed a bug in check_Mach_O() in ofile.c which was missing the code to handle - the ppc64 thread state. Radar bug #3987993. - -Changes for the 5.17 release (the cctools-568 release): -- Changed bytesex.c and swap_headers.c to remove multiply defined warnings by - changing all #import's to #include's and adding #undef's - for MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT after including - and . - -Changes for the 5.17 release (the cctools-562 release): -- Changed swap_ppc_thread_state_t() in bytesex.c to use cpu->vrsave and not - cpu->pad. Radar bug #3930480. - -Changes for the 5.17 release (the cctools-559 release): -- Change ofile_process() to simply treat a dynamic library without modules as - if the flat_dylib parameter were set. Radar bug #3883039. -- Added building libstuff_kld.a built for the kernel's kld use. Radar bug - #3906133. - - Changed the code to only compile the needed routines when RLD is defined: - - best_arch.c only compile cpusubtype_combine() for RLD - - arch.c to only compile arch_flags[], get_arch_name_from_types(), - get_arch_family_from_cputype(), get_byte_sex_from_flag() and - get_segalign_from_flag(). - - Changed the following files and ifndef RLD their entire contents: - errors.c, execute.c, fatals.c, arch_usage.c, ofile.c, print.c, - set_arch_flag_name.c, seg_addr_table.c, dylib_table.c, breakout.c, - writeout.c, checkout.c, fatal_arch.c, dylib_roots.c, SymLoc.c, - get_arch_from_host.c, symbol_list.c, unix_standard_mode.c, - vm_flush_cache.c, macosx_deployment_target.c, guess_short_name.c . - -Changes for the 5.17 release (the cctools-557 release): -- Removed support for the INTERIM_PPC64. The changes were to remove the - #ifdef INTERIM_PPC64 source changes in reloc.c, ofile.c, best_arch.c and - arch.c. Radar bug #3600419. - -Changes for the 5.17 release (the cctools-554 release): -- Fixed a bug in the swap_segment_64() routine in bytesex.c that was using - SWAP_LONG for the fileoff and filesize fields when it should have been using - SWAP_LONG_LONG. Radar bug #3891223. - -Changes for the 5.17 release (the cctools-552 release): -- Changed print.c to include stdarg.h . Radar bug #3640701. -- Added the source file unix_standard_mode.h for the new routine - get_unix_standard_mode() to know when we are running in UNIX standards - conformance mode. Radar bug #3852702. -- Picked up the changes to check_for_dylib() in dylib_roots.c to deal with - both 32-bit and 64-bit Mach-O files. Radar bug #3861276. - -Changes for the 5.17 release (the cctools-551 release): -- Added support for the ppc64 thread state. Radar bug #3866755. - - Added swap_ppc_thread_state64_t() to bytesex.c . - - Added a case statement for swapping a PPC_THREAD_STATE64 to - swap_headers() in swap_headers.c . -- Changed ofile.c to not produce a warning for archives that have 64-bit Mach-O - archive members that are 8 byte boundaries. Radar bug #3818951. - -Changes for the 5.17 release (the cctools-549 release): -- Fixed a bug in cpusubtype_combine() in best_arch.c that was missing the case - for CPU_TYPE_POWERPC64. Radar bug #3856997. -- Fixed the error handling in the breakout code. In breakout_internal() at the - end when it detects an error it calls free_archs() it needed to clear the - values in *archs and *narchs before returning. Also in both breakout_mem() - and breakout() a check for errors != 0 was added and if so the ofile was - free'ed() and NULL was returned. Radar bug #3839049. - -Changes for the 5.17 release (the cctools-544 release): -- Fixed a bug in ofile_map_from_memory() in ofile.c that was missing an "else" - before the if statement to check for 64-bit Mach-O files. Radar bug #3837563. - -Changes for the 5.17 release (the cctools-541 release): -- Fixed a bug in reloc_has_pair() in reloc.c that needed a case statement for - CPU_TYPE_POWERPC64 in all cases. Radar bug #3829545. -- Fixed a bug in make_table_of_contents() in writeout.c that did not correctly - set up the sections arrays for both 32-bit and 64-bit Mach-O files. Radar - bug #3829545. - -Changes for the 5.17 release (the cctools-540 release): -- Fixed a bug in dyld_order() in checkout.c that was not checking which type - Mach-O file before using the seg_linkedit field. Radar bug #3829149. - -Changes for the 5.17 release (the cctools-539 release): -- Changed to support 32-bit & 64-bit tools that write binaries. Radar bug - #3812858. - - Changed breakout_internal() in breakout.c to set both the mh and the mh64 - fields of the struct object. - - Changed cksum_object() and dyld_order() in breakout.c to use and set either - the 32-bit fields or the 64-bit fields. - - Changed the code in writeout.c to to test the mach header field, mh for - NULL, to see which type of object it has and then added/modified the code - to deal with both. Also changed all rounding to 8 from 4 so members end up - on a 8-byte boundary. -- Changed symbol_string_at_end() in checkout.c to allow any object with its - string table not at the end but rounded to 8 bytes. To deal with archive - members that are extracted from archives and end up padded. -- Fixed a warning about temporary_archive_member_warning() in ofile.c being - defined but not used when ALIGNMENT_CHECKS is not defined. - -Changes for the 5.17 release (the cctools-535 release): -- Changed symbol_string_at_end() in checkout.c to deal with archive members that - are rounded up to 8 bytes. Since the object file maybe smaller than that the - check needs to check the rounded size of the string table end. Then it - changes the object_size to where the string table ends so tools like strip(1) - that expect the string table at the end of the object will work. Radar bug - #3811489. - -Changes for the 5.17 release (the cctools-533 release): -- Fixed bugs in ofile_map_from_memory() and ofile_first_member() that was still - incorrectly using mach_header_t when it should have been using struct - mach_header. That was not correctly changed as part of the changes to - cctools-533. -- Temporarily changed the alignment errors of 64-bit objects in archives to be - a warning not an error in ofile.c in many places. Added the file level static - boolean, archive_64_bit_align_warning, to be used to cause the warning to be - printed only once. Also added temporarily the routine - temporary_archive_member_warning() to ofile.c . - -Changes for the 5.17 release (the cctools-533 release): -- Changes to support 32-bit & 64-bit tools in the same binary. Radar bug - #3793394. - - Changed the code in ofile.c to fill in and deal with the changed struct - ofile in "stuff/ofile.h" to have both a pointer to a 32-bit and 64-bit - mach header. Also to fill in and use the fields mh_cputype, mh_cpusubtype, - and mh_filetype in the ofile structure. - - Added new swap_* routines in bytesex.h to have a routine for the - 32-bit and 64-bit structs. - - Changed the breakout() code and added an ifdef ARCH64 and some code to use - the ofile->mh64 field to assign to the mh mach_header_t field of the arch - struct. - - Changed the writeout() code to use the new macro swap_nlist_t from - "stuff/target_arch.h" in 4 places. - - Changed swap_object_headers() in swap_headers.c to take a void * for the - mach_header and work with both 64-bit and 32-bit Mach-O files. -- Fixed a problem in check_Mach_O() in ofile.c for the INTERIM_PPC64 format that - was missing a check for CPU_TYPE_POWERPC64 when dealing with 32-bit thread - commands. Radar bug #3792737. - -Changes for the 5.16 release (the cctools-532 release): -- Made more changes to support 64-bit tools. Radar bug #3600431. - - Changed arch.c to not ifdef the 64-bit arch types and the 32-bit arch types. - This is done to allow lipo(1) to use the table of values. - - Added swap_mach_header_64(), swap_segment_command_64() and swap_section_64() - routines to byteswap.c . - -Changes for the 5.16 release (the cctools-529 release): -- Made changes to support 64-bit tools. Radar bug #3600431. - - Changed the Makefile to build libstuff64 versions to be linked with - 64-bit tools. The sources are compiled with -DARCH64 . - - Changed the Makefile to no longer build with -DINTERIM_PPC64 . - - Added the include "stuff/target_arch.h" to the following files: - breakout.c - bytesex.c - checkout.c - get_toc_byte_sex.c - ofile.c - ofile_get_word.c - swap_headers.c - writeout.c - and changed the uses of structs, constants and names that are different for - 64-bit files to the typedefs in "stuff/target_arch.h". - - Added SWAP_LONG_LONG() to bytesex.c. - - Added bits of ifdef ARCH64 code to bytesex.c to swap the new fields and the - different sized fields. - - Added ifdef ARCH64 to arch.c and added two 64-bit arch types, ppc64 and - ppc970-64 to the arch_flags[] array. - - Changed the #ifdefs in: - get_byte_sex_from_flag() in arch.c - reloc_pair_r_type() in reloc.c - reloc_has_pair() in reloc.c - to be #if defined(INTERIM_PPC64) || defined(ARCH64) for CPU_TYPE_POWERPC64. - - Added ifdef ARCH64 to cpusubtype_findbestarch() in best_arch.c for - 64-bit architectures. - -Changes for the 5.16 release (the cctools-528 release): -- Support the new GENERIC_RELOC_LOCAL_SECTDIFF reloc. - -Changes for the 5.16 release (the cctools-527 release): -- Support the new PPC_RELOC_LOCAL_SECTDIFF reloc. - -Changes for the 5.16 release (the cctools-526 release): -- Changed a few places in ofile.c from %lu to %u to remove warnings for the - fields that changed in from unsigned long to uint32_t. - Radar bug #3744082. - -Changes for the 5.16 release (the cctools-524 release): -- Fixed a bug in check_sort_ranlibs() in writeout.c that caused a crash if - there are 0 ranlib structs to sort. Reported in Radar bug #3451378. -- Fixed a bug in cpusubtype_findbestarch() in best_arch.c when trying to pick - the lowest model i386 fat arch. The variable lowest_model was initialized to - ULONG_MAX when it should have been LONG_MAX as it was a signed value. Radar - bug #3694812. - -Changes for the 5.16 release (the cctools-520 release): -- Fixed a bug that caused otool(1) to crash when it was called with a bad fat - file (a java class file). The calls to ofile_first_arch() in ofile.c was not - checking its return value and later causing the code to crash when it should - have returned in case of an error. Radar bug #3670740. - -Changes for the 5.16 release (the cctools-515 release): -- Added the installGASsrc and fromGASsrc Makefile targets to install and build - just the need sources to build the PowerPC assembler from the GAS sources: - bytesex.c - round.c - and changed the Copyright in this file to the Apple BSD License. - Radar bug #3657295. - -Changes for the 5.16 release (the cctools-513 release): -- Changed writeout_to_mem() in writeout.c to move the local declrations of: - long toc_time, timestamp, index; - to the start of the routine so it would compile on older systems. Also fixed - the intenting of the first bit of code in that routine. - -Changes for the 5.16 release (the cctools-512 release): -- Fixed a bug in the change made for Radar bug #3176679 in cctools-495.3 where - the new writeout_to_mem() routine did not pass up the value of the boolean - seen_archive to the outer routine writeout(). So the outer routine never made - the call utime() to reset the mod time as the value of seen_archive was always - FALSE in the outer routine. The change was add the parameter seen_archive - as a enum bool * to writeout_to_mem() in writeout.c and set the value - indirectly. Then the outer routine writeout() was changed to pass the address - of its seen_archive variable to writeout_to_mem(). Radar bug #3645280. - -Changes for the 5.16 release (the cctools-509 release): -- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 - file format. And added -DINTERIM_PPC64 to the Makefile. - -Changes for the 5.16 release (the cctools-499.1 release): -- Made changes to support the interim ppc64 file format. Radar bug #3562133 - and #3562232. - - Added an entry in the arch_flags[] array in arch.c for ppc64 as: - { "ppc64", CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC64_ALL }, - - Updated get_byte_sex_from_flag() in arch.c to return BIG_ENDIAN_BYTE_SEX - for CPU_TYPE_POWERPC64. - - Updated cpusubtype_findbestarch() in best_arch.c for CPU_TYPE_POWERPC64 - and its cpusubtype. - -Changes for the 5.13.2 release (the cctools-495.3 release): -- Modified breakout.c to include a breakout_mem() function which will perform - the breakout on a memory buffer, rather than reading from a file. The - internals of breakout() were moved to breakout_internal() so they could - be shared by both breakout() and breakout_mem(). Radar bug #3176679. -- Modified writeout.c to include a writeout_to_mem() function which will - return a vm_allocate'd buffer of the contents of the output file. The - interanls of writeout() were moved to writeout_to_mem() so that writeout() - calls writeout_to_mem(), which produces the contents of the file, and - writeout() writes it to the output file. Radar bug #3176679. - -Changes for the 5.14 release (the cctools-496 release): -- Added the following entry to the table in macosx_deployment_target.c : - { "10.4", MACOSX_DEPLOYMENT_TARGET_10_4 }, - Radar bug #3445632. - -Changes for the 5.12 release (the cctools-490 release): -- Fixed cpusubtype_findbestarch() in best_arch.c to not select a PowerPC 970 - if not on a PowerPC 970. And fixed it when passed the family ALL type and - there is not an exact match to select the cpusubtype's from the "top" of the - list going all possible subtypes. Also added the new routine - cpusubtype_execute() to best_arch.c for use by the dynamic linker. - Radar bug #3387962. - -Changes for the 5.12 release (the cctools-469 release): -- Fixed a problem with the added checks of the of the dylib_module struct in - ofile.c made in cctools-466 for Radar bug #3208399 where it did not work if - the file was not in host byte sex. The fix was to copy the struct and byte - swap it if needed before doing the checks on the copy of the struct in - check_dylib_module() in ofile.c . Radar bug #3228664. - -Changes for the 5.12 release (the cctools-467 release): -- Added support for the PPC_RELOC_LO14_SECTDIFF relocation type used with - double word load/store instructions. Radar bug #3218027. - - Added tests for PPC_RELOC_LO14_SECTDIFF in both reloc_has_pair() and - reloc_is_sectdiff() in reloc.c . - -Changes for the 5.12 release (the cctools-466 release): -- Fixed the incorrect casts on the comparison of the nlist struct's n_strx field - where the value being compared to was casted to a long. The correct fix was - to cast n_strx to an unsigned long. -- Added the missing checking of the dylib_module struct in ofile.c so that it - would not return an ofile struct with a bad dylib_module. Also fixed a number - of places the routine Mach_O_error() was called to print an error message but - the code failed to return a failure status. Radar bug #3208399. - -Changes for the 5.12 release (the cctools-464 release): -- Made changes to build cleanly with gcc3.3 - - Removed -Wno-precomp from the Makefile - - Fixed warnings for "comparison between signed and unsigned" in writeout.c, - symbol_list.c, ofile_get_word.c, round.c, ofile.c, and best_arch.c . - -Changes for the 5.12 release (the cctools-462 release): -- Added support for MH_DYLIB_STUB libraries. Radar bug #3193744. - - Did NOT change writeout() in writeout.c to handle the timestamp in - MH_DYLIB_STUB filetypes like MH_DYLIB filetypes as the timestamp should - not be changed or else this would mess up building prebound. - - Changed the routines in ofile.c to handle MH_DYLIB_STUB filetypes like - MH_DYLIB filetypes. - - Changed check_object() in checkout.c to handle MH_DYLIB_STUB filetypes like - MH_DYLIB filetypes. - -Changes for the 5.12 release (the cctools-457 release): -- Changed ofile_map() added ofile_map_from_memory() which is everything from - the original ofile_map() except mapping the file. This is needed so the - NSCreateObjectFileImageFromMemory() api can be implemented. Radar bug - #3131622. - -Changes for the 5.12 release (the cctools-455 release): -- Changed the code in dylib_roots.c to remove the check that the actual path of - a binary equals the install name of the dynamic library. Radar bug #3147668. - -Changes for the 5.12 release (the cctools-450 release): -- Changed get_segalign_from_flag() in arch.c to have 4K returned for i386 also. - Radar bug #3120579. - -Changes for the 5.12 release (the cctools-449 release): -- Added the arch flag i686 to be the same as pentpro in arch.c. Radar bug - #3111977. - -Changes for the 5.11 release (the cctools-444 release): -- Added the file symbol_list.c which contains the code from strip.c for the - symbol lists. Now also used by ld(1)'s -exported_symbols_list and - -unexported_symbols_list options. Radar bug #3083844. -- Picked up fix to LocForDylib() in SymLoc.c that was crashing when the - DylibProjects directory was empty. Radar bug #3079374. - -Changes for the 5.11 release (the cctools-440 release): -- Fixed the warnings about extra tokens at end of #endif directive in ofile.c - (Radar bug #3072042). - -Changes for the 5.11 release (the cctools-439 release): -- Made the needed changes to arch.c, get_arch_from_host.c, ofile.c, reloc.c, - swap_headers.c & best_arch.c for VEO support. Radar bug #3068161. - -Changes for the 5.11 release (the cctools-438 release): -- Added the following entry to the table in macosx_deployment_target.c : - { "10.3", MACOSX_DEPLOYMENT_TARGET_10_3 }, - Radar bug #3049974. - -Changes for the 5.10 release (the cctools-416 release): -- Changed writeout() in writeout.c to not update the LC_ID_DYLIB timestamp if - the new dont_update_LC_ID_DYLIB_timestamp is TRUE. Radar bug #2914003. - -Changes for the 5.10 release (the cctools-414 release): -- Changed the two calls to mach_host_self() in get_arch_from_host.c and - writeout.c to call mach_port_deallocate() on the port after the calls. Radar - bug #2895931. - -Changes for the 5.10 release (the cctools-412 release): -- Added the no_error_if_missing parameter to symLocForDylib(), dstLocForDylib() - and LocForDylib() in SymLoc.c . In LocForDylib() no call to error() is made - if the installName can't be found. Radar bug #2882324. -- Added the no_error_if_missing parameter to get_symfile_for_dylib() and - get_dstfile_for_dylib() in dylib_roots.c which is pass through to - symLocForDylib() or dstLocForDylib(). Radar bug #2882324. - -Changes for the 5.10 release (the cctools-411 release): -- Added the file macosx_deployment_target.c to libstuff so that both the - ld(1) code and the seg_addr_table(1) code can use the same code. Radar bug - #2848945. - -Changes for the 5.10 release (the cctools-404 release): -- Changed crc32() in crc32.c to be a __private_extern__. Radar bug #2859919. - -Changes for the 5.10 release (the cctools-400 release): -- Changed the Makefile back to again use the -dependency-file with gcc. -- Added a new throttle parameter to writeout() in writeout.c to allow - redo_prebinding(3) used with prebinding on demand to throttle back its - I/O when running in the back ground. Radar bug #2850642. -- Added code in writeout() in writeout.c to use fcntl() with the F_NOCACHE - option to not cache the blocks of the output file. - -Changes for the 5.10 release (the cctools-397 release): -- Changed where "stuff/bool.h" was included in ofile.c -Radar bug #2831923. - -Changes for the 5.10 release (the cctools-394 release): -- Changed the Makefile to not use the -dependency-file with gcc as well as - mwccppc. -- Added an include for in bytesex.c, ofile_get_word.c to remove the - warning: implicit declaration of function `memcpy'. - -Changes for the 5.10 release (the cctools-393 release): -- Added the code needed in check_Mach_O() in ofile.c for the LC_LOAD_WEAK_DYLIB - variant of the LC_LOAD_DYLIB load command. -- Added the code needed in swap_object_headers() in swap_object_headers.c for - the LC_LOAD_WEAK_DYLIB variant of the LC_LOAD_DYLIB load command. - -Changes for the 5.10 release (the cctools-392 release): -- Added the new parameter use_member_syntax to the ofile_process() in ofile.c. - Changed the two calls to ofile_process() in dylib_roots.c to pass FALSE for - use_member_syntax. Radar bug #2730127. - -Changes for the 5.10 release (the cctools-389 release): -- Changed writeout() in writeout.c to not set the modification time back by - 5 seconds if the file does not contain an archive. Radar bug #2788034. - -Changes for the 5.10 release (the cctools-388 release): -- Changed check_for_install_name() in dylib_roots.c used in seg_addr_table(1) - so that if the install name starts with @executable_path it is considered ok. - This will also be a problem for libhotspot/libjvm also, since libhotspot.dylib - will have a libjvm install_name. - -Changes for the 5.10 release (the cctools-387 release): -- Changed writeout() in writeout.c to stagger the time stamps of dynamic - libraires with multiple cpusubtypes. This avoids problems with prebinding. - Radar bug #2676444. - -Changes for the 5.10 release (the cctools-386 release): -- Picked up the crc32.c file from the freeBSD code. -- Added the calculate_input_prebind_cksum parameter to breakout() in breakout.c - and the new routine cksum_object() to calculate the input's check sum for the - cases that the redo_prebinding code needs it. -- Added logic to check_Mach_O() in ofile.c for checking the new LC_PREBIND_CKSUM - load command. -- Added swap_prebind_cksum_command() for the new LC_PREBIND_CKSUM command and - also updated swap_headers(). - -Changes for the 5.10 release (the cctools-385 release): -- Moved the routines archive_error(), archive_member_error() and - Mach_O_error() from ofile.c to ofile_error.c so the redo_prebinding library - can override them. -- Fixed a bug in breakout.c that called realloc() on *archs which could not - be NULL the first time. So set *archs to NULL and *narchs to zero in - breakout.c. -- Added __private_extern__ to free_archs() in breakout.c. -- Added some checks to checkout() in checkout.c to make sure an MH_DYLIB has - a LC_ID_DYLIB command and the name.offset is valid. - -Changes for the 5.9 release (the cctools-381 release): -- Changed check_Mach_O() in ofile.c and ifdef'ed out the check for unknown - load commands when OFI is defined. This is needed so that new load commands - do not cause NSCreateObjectFileImageFromFile() and the like API's to fail - when a new load command is seen in the image. The dynamic linker has also - been changed to look for the new LC_REQ_DYLD bit and cause dyld to refuse to - use an image if it contains something that dyld must understand to execute - properly. - -Changes for the 5.9 release (the cctools-370 release): -- Added checks in check_object() checkout.c to check that if there is a hints - command there is a dysymtab command and if the nhints is non-zero it matches - the nundefsym value. Also added check in dyld_order() in checkout.c to - check the order of the local, external and undefined symbol indexes in - the dysymtab command. -- Fixed bugs in breakout() in breakout.c where if one of the ofile routines - set errors to non-zero the breakout code continued on and used - ofile.arch_flag.name which could be NULL when it called savestr() and caused - a crash. This happened when an new load command was added and the old code - did not know about it, printed a message but later crashed. - -Changes for the 5.9 release (the cctools-369 release): -- Added code in check_object() in checkout.c to deal with the two-level hints - command. Also added code in dyld_order() in checkout.c to deal with the - hints table itself. -- Changed copy_new_symbol_info() in writeout.c to take a the old and new hints - command and writeout the hints. - -Changes for the 5.9 release (the cctools-367 release): -- Added code in check_Mach_O() in ofile.c to check an LC_SUB_LIBRARY command. - Added code in swap_object_headers() in swap_headers.c to call - swap_sub_library_command(). Added swap_sub_library_command() to bytesex.c . - Radar bug #2697458. -- Added code in check_Mach_O() in ofile.c to check an LC_TWOLEVEL_HINTS command. - Added code in swap_object_headers() in swap_headers.c to call - swap_twolevel_hints_command(). Added swap_twolevel_hints_command() and - swap_twolevel_hint() to bytesex.c . Radar bug #2558069. -- Fixed a problem with writeout() in writeout.c not deallocating the memory if - the write() fails. This is an issue with the redo_prebinding(3) API so it can - effect update_prebinding(1). Radar bug #2691920. - -Changes for the 5.9 release (the cctools-364 release): -- Changed cpusubtype_combine() in best_arch.c (as well as NXCombineCpuSubtypes() - in libmacho) for the ppc to select the highest subtype when there is not - an exact match and neither is a 601. -- Changed cpusubtype_findbestarch() in best_arch.c (as well as - NXFindBestFatArch() in libmacho) which had a problem with selecting the ppc - cpusubtype when an exact match could not be found. See Radar bug #2678019 - against exec(2). - -Changes for the 5.9 release (the cctools-360 release): -- Fixed a bug in writeout() that showed up in strip(1) not correctly excluding - N_SECT symbols marked with the attribute NO_TOC from the the table of - contents. Radar bug #2663483. The old libtool/ranlib Radar bug was #2494286. -- Changed the two calls to malloc() in get_arch_from_host.c to savestr() and - changed the one call to malloc() in arch.c to savestr(). These were - changed to allocate() because libdyld/ofi.c needs this and overrides - savestr() so using allocate() would end up getting multiple definitions of - _savestr (one from ofi.o and one from libstuff(allocate.o)). -- Changed breakout() in breakout.c to allocate and return its ofile struct for - the arch it returns. This will allow the redo_prebinding library API to - call ofile_unmap() on this. -- Changed guess_short_name() to be __private_extern__ in guess_short_name.c . - -Changes for the 5.9 release (the cctools-359 release): -- Fixed two places in ofile.c, three in fatal_arch.c and one in writeout.c that - was using size_ar_name() and not using the member_name_size and member_name - fields of the ofile struct for printing error messages. -- Added -Wno-long-double to shutup the compiler for - . - -Changes for the 5.8 release (the cctools-357 release): -- Added support for the CPU_SUBTYPE_POWERPC_7450 in arch.c, best_arch.c and - get_arch_from_host.c. Radar bug #2599869. - -Changes for the 5.8 release (the cctools-356 release): -- Changed execute.c and ofile.c to include instead of - -Changes for the 5.8 release (the cctools-345 release): -- Fixed a bug in guess_short_name() that showed up in seg_addr_table(1) that - caused it to crash as it was doing a strcpy for the suffix when it should - have been doing a strncpy() (Radar bug #2540744). - -Changes for the 5.8 release (the cctools-344 release): -- Fixed a bug in swap_object_headers() which was missing the calls to swap - the swap_sub_umbrella_command() and swap_sub_client_command(). -- Changed cpusubtype_findbestarch() in best_arch.c in the loop looking for the - lowest_model to save the current lowest_model so it finds the lowest_model. - -Changes for the 5.8 release (the cctools-342 release): -- Added support for swapping the LC_SUB_CLIENT load command (Radar bug - #2533649). - -Changes for the 5.8 release (the cctools-341 release): -- Added support for swapping the LC_SUB_UMBRELLA load command (Radar bug - #2530028). -- Pulled get_arch_from_host() out of arch.c and put it into get_arch_from_host.c - so kld could avoid referencing host_info and mach_host_self. - -Changes for the 5.7 release (the cctools-334 release): -- Changed guess_short_name()'s has_suffix argument to return_suffix to a pointer - to the suffix so checksyms could check for "_debug". - -Changes for the 5.7 release (the cctools-332 release): -- Changed the following routines to take a disablewarnings flag which was added - to seg_addr_table(1): get_symfile_for_dylib() and get_dstfile_for_dylib() in - dylib_roots.c and dstLocForDylib(), get_dstfile_for_dylib() and LocForDylib() - in SymLoc.c (Radar bug #2482327). - -Changes for the 5.7 release (the cctools-329 release): -- Changed iinit and ninit fields of the struct dylib_module in - swap_dylib_module() in bytesex.c to iinit_iterm and ninit_nterm. - Radar bug #2469527. - -Changes for the 5.7 release (the cctools-327 release): -- ifdef'ed __GONZO_BUNSEN_BEAKER__ the code in seg_addr_table.c for its use of - /Local to use /AppleInternal by default. -- ifdef'ed __GONZO_BUNSEN_BEAKER__ the code in and dylib_table.c for its use of - /Local to use /MacOSX by default. And added code ifndef'ed - __GONZO_BUNSEN_BEAKER__ to use /AppleInternal/... - -Changes for the 5.6 release (the cctools-324 release): -- Picked up the mods to SymLoc.c from Doug Wiebe in B&I which no longer does - a chdir(). This allows the -seg_addr_table option to seg_addr_table not to - be an absolute path. - -Changes for the 5.6 release (the cctools-323 release): -- Found the bug in find_dylib_in_root() in dylib_roots.c which was not doing - an fts_close() and causing "Too many open files" later. - -Changes for the 5.6 release (the cctools-322 release): -- Added ifdef'ed for __SPACE__ and created a macro SYSTEM_LIBRARY in - dylib_table.c in preparation for the directory changes. /System/Library - changing to /MacOSX/System. - -Changes for the 5.6 release (the cctools-321 release): -- Moved SymLoc.m to SymLoc.c as it contains only 'C' code and the debugger was - crashing when it was an Objective-C file. - -Changes for the 5.6 release (the cctools-320 release): -- Added support for the new LC_SUB_FRAMEWORK load command to support "Guarding - against direct linking of non-umbrella frameworks". The files that swap - load commands, bytesex.c and swap_headers.c, were update. As part of this - work the routine guess_short_name() was broken out of seg_addr_table.c into - guess_short_name.c so it could be used by the static linker. - Radar bug 2443212. - -Changes for the 5.6 release (the cctools-319 release): -- Added the file seg_addr_table.c with the support routines for segment address - tables. -- Added the file dylib_table.c which broke out some of the code that was used - in checksyms(l) in to support routines used by it and the new - seg_addr_table(l) tool. -- Picked up the file SymLoc.m from Doug Wiebe in B&I which returns the SYMROOT - for a given release (used by the seg_addr_table(l) tool). It currently uses - Foundation which would cause build dependencies problems so this can't be - used in a submission. Doug is planning to do a version that does not use - Foundation. -- Added the file dylib_roots.c which looks for a dynamic library in a given - root (used by the seg_addr_table(l) tool). - -Changes for the 5.5 release (the cctools-307 release): -- Added support for the CPU_SUBTYPE_POWERPC_7400 in arch.c and best_arch.c. - Radar bug #2397523. - -Changes for the 5.4 release (the cctools-300 release): -- Added logic to check_Mach_O() in ofile.c for checking the new LC_ROUTINES - load command. -- Added swap_routines_command() for the new LC_ROUTINES command and also updated - swap_headers(). - -Changes for the 5.3 release (the cctools-292 release): -- Added get_segalign_from_flag() to allow setting the default segment alignment - to 4K for PowerPC and 8K for everything else. Used by ld(1) in layout.c in - layout() to fix Radar bug #2277625. - -Changes for the 5.3 release (the cctools-286 release): -- Change the use of the i386 cpp macro to __i386__ and ppc to __ppc__ - -Changes for the 5.3 release, MacOS X bring up (the cctools-282 release): -- Added the source files arch_usage.c ofile.c print.c set_arch_flag_name.c - to be shipped so that libtool can be built from the source given to MetroWerks -- Changed swap_ppc_thread_state_t() to not use bit fields for srr1, cr and exr - to match the ppc_thread_state for Rhapsody/MacOS X. -- Changed host_self() and task_self() to mach_host_self() and mach_task_self() - for MacOS X. Also included "stuff/openstep_mach.h" for macros to allow it - to still build on Openstep. Also changed ifdef's __SLICK__ to __OPENSTEP__. -- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. -- Changed vm_task_t to mach_port_t in vm_flush_cache.c to build for MacOS X. - -Changes for the 5.2 release (the cctools-277 release): -- Added default cases for i386 and ppc subtypes to get_arch_from_host() which - does a sprintf() for the unknown subtypes. Also added code for unknown - types to get_arch_name_from_types() insteading of returning "unknown". - Radar bug #2241690. - -Changes for the 5.2 release (the cctools-274 release): -- Removed all uses of CPU_SUBTYPE_586SX. Added the pentium, pentiumpro, - pentiumIImodel3 and pentiumIImodel5 subtypes. Updated cpusubtype_combine() and - cpusubtype_findbestarch() deal with the new intel cpusubtypes. Radar bug - #2231830. - -Changes for the 5.2 release (the cctools-270 release): -- Fixed a bug in get_toc_byte_sex() which did not have code to deal with the - extended format #1. - -Changes for the 5.2 release (the cctools-267 release): -- Added many casts and dummy variables to deal with MetroWerks compiler - warnings (the ones with out -Wall). Radar bug #2227678. -- Added support for the 4.4BSD extend format #1 feature where the size of the - name is in the ar_name field and the name follow the archive header before the - contents of the member. A member_name and member_name_size field have been - added to the ofile struct to support this. Radar bug #1670513. - -Changes for the 5.1 release (the cctools-261 release): -- Added the 603e, 603ev, and 750 to the table of arch types. -- Added the case for CPU_SUBTYPE_POWERPC_750 in get_arch_from_host() in arch.c - (it had support for CPU_SUBTYPE_POWERPC_603e and CPU_SUBTYPE_POWERPC_603ev). - (Radar 2213821) -- Changed cpusubtype_findbestarch() in best_arch.c for PowerPC subtypes. If an - exact match is not found the subtype will be picked from the following order: - 750, 604e, 604, 603ev, 603e, 603, ALL - Note the 601 is NOT in the list above. It is only picked via an exact match. - (Radar 2213821) -- Changed cpusubtype_combine() in best_arch.c for for PowerPC subtypes. - Combining with the ALL type becomes the other type. Combining anything with - the 601 becomes 601. All other non exact matches combine to the ALL type. - (Radar 2213821) - -Changes for the 5.1 release (the cctools-254 release): -- Fixed a bug in swap_dylib_module() where it did not swap the two objc fields. - -Changes for the 5.1 release (the cctools-252 release): -- Removed the m98k arch entry from arch.c and reorder the table to put the - Rhapsody archs first. - -Changes for the 5.1 release (the cctools-247 release): -- Added MKDIRS if code to the Makefile to build native on Rhapsody. -- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody - where tar does not. -- Changed the Makefile so profiled objects get built for RC_OS teflon. -- Changed the code ifdef __TEFLON__ to ifndef __SLICK__ (where __TEFLON__ will - nolonger be defined for Rhapsody builds) so the default builds will be native - Rhapsody builds. The changes were to execute.c, ofile.c and writeout.c . - -Changes for the 5.0 release (the cctools-240 release): -- Moved fatals.c in the Makefile from CFILES2 to CFILES1 so it can be used by - the GNU assembler source. - -Changes for the 5.0 release (the cctools-239 release): -- Fixed a bug in get_arch_from_host() for the family cpusubtype not getting - set correctly for 603, 604 and 604e - -Changes for the 5.0 release (the cctools-235 release): -- Added PPC_RELOC_JBSR to reloc_has_pair() in reloc.c . -- Fixed a warning about testing an unsigned value for less than zero in - writeout.c - -Changes for the 5.0 release (the cctools-230 release): -- Added ppc604e to the arch table and to get_arch_from_host(). This is what - some kernels on some of Power Mac 8500 is returning today. -- Added a cast to writeout.c to get rid of a warning and fix a bug where it - was testing ran_off < 0 which is now unsigned. - -Changes for the 5.0 release (the cctools-226 release): -- Added ppc604 to the arch table and to get_arch_from_host(). This is what - the kernel on the Power Mac 8500 is returning. - -Changes for the 5.0 release (the cctools-224 release): -- Changed including to which uses unsigned long - instead of off_t (64 bits on Teflon). -- Fixed a bug in the __TEFLON__ execute code that was not testing the return - status for 0. -- Added the routines swap_ppc_float_state_t() and swap_ppc_exception_state_t() - to swap the other ppc flavors to byteswap.c and swap_headers.c . -- Changed cpusubtype_findbestarch() for PowerPC to deal with the 603 and 604 - types the best I can. -- Changed cpusubtype_combine() for PowerPC to combine any specific cpusubtype - with the CPU_SUBTYPE_POWERPC_ALL and return the specific cpusubtype. Made - a cut at combining the 603 and 604 types. - -Changes for the 5.0 release (the cctools-222 release): -- Added get_stack_direction_from_flag(), get_stack_addr_from_flag() and - get_stack_size_from_flag() routines to arch.c. - -Changes for the 5.0 release (the cctools-221.1 and cctools-222 releases): -- Picked up changed to the Makefile to not build profile objects for teflon. - This is because the PowerPC compiler core dumps with -pg. - -Changes for the 5.0 release (the cctools-221 release): -- Picked up the changes for the correct Rhapsody thread state changes into - ofile.c, bytesex.c and swap_headers.c. - -Changes for the 5.0 release (the cctools-215 release): -- Updated reloc_is_sectdiff() and reloc_has_pair() in reloc.c for the PowerPC - relocation types PPC_RELOC_HI16_SECTDIFF, PPC_RELOC_LO16_SECTDIFF and - PPC_RELOC_HA16_SECTDIFF. - -Changes for the 5.0 release (the cctools-212 release): -- Added the ppc601 and ppc603 specific arch types. The specific types at this - point are treated as mutually exclusive and can't combine with each other and - only can combine with the ALL type. - -Changes for the 5.0 release (the cctools-211 release): -- Integrated changes to allow teflon builds (RC_OS=teflon or RC_OS=nextstep) to - not build shlib in the Makefile. Also changes in the sources to not - include for __TEFLON__ builds. - -Changes for the 5.0 release (the cctools-210 release): -- Changed everything from using m98k to ppc. - -Changes for the 4.0 release (the cctools-193 release): -- Changed the way what appears to be a malformed fat file for files that start - with the FAT_MAGIC to treat them as unknown files rather than malformed fat - files. This fixes the problem checksyms(l) was having with java applets which - use the same magic number (bug #63886). - -Changes for the 4.0 release (the cctools-185 release): -- Changed checkout.c to deal with ld -r files vs. .o files from the assember - which differ as the indirect symbol table is between the symbol table and - string table in the ld -r case. This was to fix redo_prebinding(1) but also - fixes strip. -- Changed checkout.c to deal with segments marked SG_FVMLIB so not to complain - about them. This was to fix redo_prebinding(1). -- Changed ofile.c for i860 thread status on non-m68k machines to not check or - swap the thread status which the struct has different layout on non-m68k - machines. This was to fix redo_prebinding(1). - -Changes for the 4.0 release (the cctools-168 release): -- Change the version numbers of dynamic library to the form X[.Y[.Z]] to match - how next does versioning of it's projects. This effected libtool(1), ld(1), - otool(1), dyld, libstuff(version_number.c) and man pages for ld and libtool - bug #55627). The change here is the new file version_number.c. - -Changes for the 4.0 release (the cctools-166 release): -- Changed the use of the cpp macro DYNAMIC (set by the Makefile) to __DYNAMIC__ - (set by the compiler when -dynamic is in effect). - -Changes for the 4.0 release (the cctools-161 release): -- Added in the Makefile passing -DDYNAMIC for things built with -dynamic - Then ifdef'ed out the const in arch.c for arch_flags[] with DYNAMIC so that - when this is put in a dynamic shared library it does not have relocation - entries in a read-only section. - -Changes for the 4.0 release (the cctools-154 release): -- To fix a bug in stripping .o files compiled dynamic the routine - copy_new_symbol_info() needed to base it's copy output on if there was an - dynamic symbol table command in the object not on if it had MH_DYLDLINK in - the mach header. So a pointer to the old dynamic symbol table command is now - passed and if not null the full dynamic symbol table is copied out. - -Changes for the 4.0 release (the cctools-150 release): -- Fixed some problems in ofile_process() with passing the correct arch_name - argument to processor() for fat files. -- Changed the profiled objects to be compiled with -dynamic. -- Changed everything to use __private_extern__ . - -Changes for the 4.0 release (the cctools-149 release): -- Fixed a bug in ofile_process() in ofile.c for #ifdef OTOOL when an arch was - specified as for cross bytesex. The problem was the #ifdef OTOOL does not - swap the mach header and it was being used in ofile_process() to select the - arch. Some ifdef'ed OTOOL was added (bug #50350). - -Changes for the 4.0 release (the cctools-148 release): -- Changed how the libstuff directory builds. It now builds 4 libraries. One - for the following uses: static, dynamic, profiled and shlib. - -Changes for the 4.0 release (the cctools-146 release): -- Fixed a bug in swap_sparc_thread_state_regs() where the reserved field of - the psw was not included in the swap code (bug #49685). This was CCC - approved for 3.3risc and a cctools-142.1 clone with just this fix was - submitted. - -Changes for the 4.0 release (the cctools-145 release): -- Changed writeout() to update the time stamp for dylibs. - -Changes for the 4.0 release (the cctools-143 release): -- Added support to loop through the modules of a dylib in ofile_process() when - the new prameter dylib_flat == FALSE. This is use in nm(1) to print the - symbol tables of a dylib. - -Changes for the 4.0 release (the cctools-140 release): -- Changed vm_flush_cache() to define __3_3_User_with_hppa__ so it will build - for 4.0. - -Changes for the 4.0 release (the cctools-133 release): -- Picked up the sparc changes to byte_sex.c and swap_headers.c that swaps the - floating-point sparc thread state. -- Picked up the sparc changes to check_Mach_O() in ofile.c for checking and - swaping the floating-point thread. -- Fixed a problem in strip for cross byte sex striping when the dynamic - symbol table info is present. In strip.c the problem was the new symbolic - tables were not swapped to the target byte sex. And in writeout.c in libstuff - the problem was that parts of the headers were used after they were swapped. - -Changes for the 4.0 release (the cctools-132 release): -- Picked up the sparc changes to reloc.c for the sparc relocs. -- Picked up the sparc changes to byte_sex.c and swap_headers.c that swaps the - sparc thread state. -- Picked up the sparc changes to check_Mach_O() in ofile.c for checking the - sparc thread state. -- Fixed a logic bug in cpusubtype_findbestarch() where the loops after the - cases on the cputype were not checking to make sure the cputype of the fat - arch struct was right before checking the subtype. - -Changes for the 3.3 release (the cctools-128 release): -- Fixed a bug in symbol_string_at_end() in checkout.c which was not using the - object->object_size to test if the LINKEDIT segment covered the end of the - file. - -Changes for the 3.3 release (the cctools-125 release): -- Fixed a bug in get_arch_from_host() in arch.c for the hppa where the family - cpu_subtype was getting set to a specific subtype CPU_SUBTYPE_HPPA_7100 for - that host. - -Changes for the 3.3 release (the cctools-124 release): -- Added a temporary error message to check_object() in checkout.c to print the - error "current limitation, can't process files with LC_DYSYMTAB load command" - so the strip(1), nmedit(1) and indr(l) for now print a reasonable message - when such a file is used. - -Changes for the 3.3 release (the cctools-119 release): -- Picked up first set of changes for sparc target. - -Changes for the 3.3 release (the cctools-118 release): -- Fixed a bug that crashed strip when doing a strip -S on a library and a member - had no symbol table command. The bug was in writeout.c in libstuff at line - 490 where it indirected thought the pointer to the symbol table command - without checking if it was NULL. - -Changes for the 3.3 release (the cctools-104 release): -- Changed the name of the first parameter of swap_ident_command() from id to - id_cmd (in bytesex.c). The compiler is treating this as a reserved word. - -Changes for the 3.3 release (the cctools-102 release): -- Integrated in the hppa support. - Changed the rounding in calc_hppa_HILO() in hppa.h to round to nearest (add - half then round) from round up. -created libstuff/hppa.c and include/stuff/hppa.h for cctools-102 - Contains the definition of: - calc_hppa_HILO() -different libstuff/arch.c (integrated for cctools-102) - Using cctoolshppa-37. New stuff for hppa cputype. -different libstuff/best_arch.c (integrated for cctools-102) - Using cctoolshppa-37. New stuff for hppa cputype. -different libstuff/bytesex.c (integrated for cctools-102) - Using cctoolshppa-37. New stuff for hppa cputype. -different libstuff/ofile.c (integrated for cctools-102) - Using cctoolshppa-37. New stuff for hppa cputype. -different libstuff/swap_headers.c (integrated for cctools-102) - Using cctoolshppa-37. New stuff for hppa cputype. - -Changes for the 3.2 release (the cctools-25 release): -- Added Makefile support for installGNUsrc and fromGNUsrc. - -Changes for the 3.1 release (the cctools-22 release): -- Changed ofile_map() when one architecture is specified to first look for that - specific cpusubtype then the family. This caused gprof(1) to fail to open - a fat file (or fat shlibs) that had an i486 subtype (bug #31857). -- Added to arch.c (bug #32553): - { "any", CPU_TYPE_ANY, CPU_SUBTYPE_MULTIPLE }, - { "little", CPU_TYPE_ANY, CPU_SUBTYPE_LITTLE_ENDIAN }, - { "big", CPU_TYPE_ANY, CPU_SUBTYPE_BIG_ENDIAN }, - -Changes for the 3.1 release (the cctools-15 release): -- Fixed a bug where cpusubtype_findbestarch() would fail to select an i486 - object from a fat file when a starting with a CPU_SUBTYPE_I386_ALL. - The fix was that cpusubtype_findbestarch() was changed such that - previously when it failed it would pick something (architecture dependent) - that will work for the cputype and will successfully combine when - cpusubtype_combine() is applied to the two cpusubtypes. - - For the i386 architecture the selection is the lowest in order of - CPU_SUBTYPE_I386_ALL, CPU_SUBTYPE_486, CPU_SUBTYPE_486SX, CPU_SUBTYPE_586 - and CPU_SUBTYPE_586SX starting with the given cpusubtype. - - For the m68k architecture (where the cpusubtypes do NOT run on anything - other than that implementation) the selection favors the - CPU_SUBTYPE_MC68040 over the CPU_SUBTYPE_MC68030_ONLY when starting - with the cpusubtype of CPU_SUBTYPE_MC680x0_ALL. - Bug #30765. -- Removed the kludged mach/m98k/thread_status.h with only an entry point and - added the code to swap the grf thread with the real entry point. - -Changes for the 3.1 release (the cctools-13 release): -- Added the m98k (PowerPC) architecture. This includes a kludged - mach/m98k/thread_status.h with only an entry point. - -Changes for the 3.1 release (the cctools-10 release): -- Changed the cpusubtypes to use the correct #defines from in - arch.c, ofile.c and swap_headers.c . Also added the i486, i486SX, i586, and - i586SX arch flags and code to back them up. - -Changes for the 3.1 release (the cctools-8 release): -- Changed the checking in check_archive to only look at the cputype and not at - both the cputype and cpusubtype (this will change as the correct handling of - the cpusubtype is implemented). - -Changes for the 3.1 release (the cctools-6 release): -- Fixed a bug in get_arch_from_host() where it did not recognize the 486 cpu - subtype. -- Hacked in a fix for a basic algorthim flaw in ofile_process() in ofile.c as - it makes a second pass over the mapped ofile it looses the information as - to which bytesex the objects were because it swaps the memory in place. - So a call to ofile_unmap() and ofile_map() were placed after the first - loop. (this still needs a better fix). - -Changes for the 3.1 release (the cctools-5 release): -- Picked up the lono team mods to ofile.c and swap_headers for the change to - the i386 thread_status.h. -- Picked up the lono team mods to bytesex.c for some new code to swap 16-bit - address segments. -- Fixed a bug in ofile_next_member() in ofile.c where if the next member was not - an object file the fields (object_*, mh, load_commands) were not zeroed out. - This caused libtool(1) to think an archive member was an object file when it - was not. - -Changes for the 3.1 release (the cctools-4 release): -- Changed the arch name of ix86 to i386. -- Fixed a bug in get_arch_from_host() in arch.c that set the cpusubtype for the - family arch_flags wrong. This needed to be set based on the cputype and - hard coded for each cputype. The problem was that the 040 cpusubtype was - being set for the family arch_flags when the 030 cpusubtype was needed. - -Changes for the 3.0 release (the -56 compiler release): -- Added hash_string.c from the mkshlib directory to libstuff. - -Changes for the 3.0 release (the -56 compiler release): -- Picked up some fixes for ofile.c where host_byte_sex was not set early enough - in some of the functions. - -Changes for the 3.0 release (the -53 compiler release): -- Added SWAP_FLOAT(). - -Changes for the 3.0 release (the -49 compiler release): -- Changed {BIG,LITTLE}_ENDIAN to __{BIG,LITTEL}_ENDIAN__ as the cc-49 cc driver - will define them. -- Changed the Makefile to meet the RC api. - -Changes for the 3.0 release (the -44 compiler release): -- Created the libstuff directory. +- cpusubtype_findbestarch() in best_arch.c when passed CPU_SUBTYPE_POWERPC_ALL + as the cpusubtype and only 7440 and 750 were in the fat file nothing was + selected. Is this right? + +TODO: diff --git a/cctools/man/arch.3 b/cctools/man/arch.3 index 1968c02..8aefe78 100644 --- a/cctools/man/arch.3 +++ b/cctools/man/arch.3 @@ -1,4 +1,4 @@ -.Dd July 28, 2005 +.Dd March 16, 2009 .Dt ARCH 3 .Sh NAME .Nm NXGetAllArchInfos , @@ -19,7 +19,7 @@ .Ft extern const NXArchInfo * .Fn NXGetArchInfoFromCpuType "cpu_type_t cputype" "cpu_subtype_t cpusubtype" .Ft extern struct fat_arch * -.Fn NXFindBestFatArch "cpu_type_t cputype" "cpu_subtype_t cpusubtype" "struct fat_arch *fat_archs" "unsigned long nfat_archs" +.Fn NXFindBestFatArch "cpu_type_t cputype" "cpu_subtype_t cpusubtype" "struct fat_arch *fat_archs" "uint32_t nfat_archs" .Ft extern cpu_subtype_t .Fn NXCombineCpuSubtypes "cpu_type_t cputype" "cpu_subtype_t cpusubtype1" "cpu_subtype_t cpusubtype2" .Sh DESCRIPTION diff --git a/cctools/man/codesign_allocate.1 b/cctools/man/codesign_allocate.1 index 7407c6c..78bdea0 100644 --- a/cctools/man/codesign_allocate.1 +++ b/cctools/man/codesign_allocate.1 @@ -1,4 +1,4 @@ -.TH CODESIGN_ALLOCATE 1 "January 11, 2008" "Apple, Inc." +.TH CODESIGN_ALLOCATE 1 "March 16, 2009" "Apple, Inc." .SH NAME codesign_allocate \- add code signing data to a Mach-O file .SH SYNOPSIS @@ -7,7 +7,7 @@ codesign_allocate \- add code signing data to a Mach-O file .SH DESCRIPTION .I codesign_allocate sets up a Mach-O file used by the dynamic linker so space for code signing data -of the specified size for the specified architecture is embed in the Mach-O +of the specified size for the specified architecture is embedded in the Mach-O file. The program must be passed one \-a argument or one \-A argument for each architecture in a universal file, or exactly one \-a or \-A for a thin file. .TP diff --git a/cctools/man/notes b/cctools/man/notes index b6c30bc..0f1538f 100644 --- a/cctools/man/notes +++ b/cctools/man/notes @@ -2,6 +2,13 @@ TODO: - Add -v description to checksyms. - The 4.4bsd a.out(5) man page is wrong for Rhapsody. +Changes for the 5.27 release (the cctools-751 release): +- Fixed the typo of embed -> embedded in the codesign_allocate(1) manpage. + Radar bug #5859182. +- Fixed the arch(3) man page for the prototype for NXFindBestFatArch() where + it incorrectly had unsigned long where it should have been uint32_t. + Radar bug #4717379. + Changes for the 5.26 release (the cctools-750 release): - Added the -rpath, -add_rpath and -delete_rpath options to install_name_tool(1). Radar bug #5684850. diff --git a/cctools/misc/install_name_tool.c b/cctools/misc/install_name_tool.c index 81ef4b2..92e9639 100644 --- a/cctools/misc/install_name_tool.c +++ b/cctools/misc/install_name_tool.c @@ -351,7 +351,7 @@ void usage( void) { - fprintf(stderr, "Usage: %s [-change old new] ... [-rpaths old new] ... " + fprintf(stderr, "Usage: %s [-change old new] ... [-rpath old new] ... " "[-add_rpath new] ... [-delete_rpath old] ... " "[-id name] input" #ifdef OUTPUT_OPTION diff --git a/cctools/misc/notes b/cctools/misc/notes dissimilarity index 99% index 3ac8606..81b4d3d 100644 --- a/cctools/misc/notes +++ b/cctools/misc/notes @@ -1,2796 +1,3 @@ -To Do: -- Add the -prebind_allow_overlap and -prebind_all_two_level_modules to libtool - see Radar bug 3417137. -- Change to Doug's approach to relayout, namely something like reserving the - last 10% of the load region for new dylibs and then evenly spacing the - existing dylibs in the other 90% (for split libs). See email of 11/6/2000. -- Have cmpdylib check Objc info Tracker bug #78124. -- Fix a bug in strip on line 1105 where it uses missing_reloc_symbols when it - could have been set otherwise and does not print the next line. -- Maybe add fat support for segedit(1) - -Changes for the 5.26 release (the cctools-750 release): -- Fixed problems with libtool(1) if it is run on an archive with llvm bit code - files. Radar bug #6654890. -- Changed nm(1) to print information from llvm bit code files. Radar bug - #6067110. -- Changed strip(1) to produce an error when attempted to be run on an MH_DSYM - file. Radar bug #6569909. -- Added the -rpath, -add_rpath and -delete_rpath options to install_name_tool(1) - to change, and and delete the paths in LC_RPATH load commands. Radar bug - #5684850. -- Changed install_name_tool(1)'s error message when the program needs to be - relinked to suggest the use of -headerpad or -headerpad_max_install_names . - Rdar bug #6632968. - -Changes for the 5.26 release (the cctools-748 release): -- Fixed a problem in codesign_allocate(1) where it could produce a value for - the filesize field of the LC_SEGMENT_64 for the __LINKEDIT segment that was - too large. The problem was in setup_code_signature() in codesign_allocate.c - where it was using and expression of "X += Y - Z" where X was a 64 bit - unsigned value and Y and Z were 32 bit unsigned values and Z was greater than - Y. This casued the expressing become a large positive number rather than a - small negative number. The fix was to simply change it to two statements, - X += Y and X -= Z; Radar bug #6591303. -- Fixed a problem in segedit(1) that caused it to crash when replacing a section - in a 64-bit Mach-O file. The routne replace_sections() in segedit.c was - incorrectly using mhp->ncmds in two place when it should have been using - mh_ncmds . - -Changes for the 5.26 release (the cctools-743 release): -- Fixed the handling of LC_REEXPORT_DYLIB in redo_prebinding.c so that libraries - with this load command are treated as sub images. The change was in - setup_sub_images() to add a two case lables for LC_REEXPORT_DYLIB and the - code to match up the dylib_name in the dependents list and add them to the - sub_images if not already there. Radar bug #6555215. - -Changes for the 5.26 release (the cctools-738 release): -- Removed the code and files for the old ProjectBuilder interface including the - use of mig(1) in the Makefile. The files make.defs make_defs.h were removed - and the code in libtool.c had the code with these old interfaces removed. - Radar bug #6457206. - -Changes for the 5.26 release (the cctools-735 release): -- Changed strip(1) so it only calls prune_trie() when we are removing global - symbols as is done with default stripping of a dyld executable or with the - -s or -R options. Radar bug #6476423. - -Changes for the 5.26 release (the cctools-734 release): -- Fixed a problem in strip_LC_UUID_commands() routine that was not updating the - object->dyld_info pointer. Radar bug #6478235. - -Changes for the 5.26 release (the cctools-733 release): -- Added support in strip(1) to update the exports in the compressed LINKEDIT - information (trie data structure) when stripping a file that contains the - info. Radar bug #6257854. - -Changes for the 5.26 release (the cctools-725 release): -- Added support for new compressed LINKEDIT information. Radar bug #6232822. - - Changed strip(1), codesign_allocate(1) and install_name_tool(1) to copy - dyld_info in the input to the output. -- Changed check_dynamic_binary() in checksyms.c to allow read-only relocs in - CPU_TYPE_I386 files in any segment with a section name of "__symbol_stub" or - "__stub_helper". - -Changes for the 5.26 release (the cctools-714 release): -- Changed lipo(1) to handle zero sized regular files specially since mmap(2) - will not. Radar bug #6169510. -- Changed libtool(1) to create separate fat archs for all ARM cpusubtypes. The - Changes were in add_member() two places. One for matching the existing - archs[] and one for adding a new archs[]. Radar bug #6155212. - -Changes for the 5.26 release (the cctools-713 release): -- Changed lipo(1) so when the call to mmap() fails in process_input_file() it - now calls system_fatal(). Radar bug #6147708. - -Changes for the 5.26 release (the cctools-712 release): -- Fixed a bug in codesign_allocate(1) if is used on a fat file with - LC_CODE_SIGNATURE load commands and not all fat archs are specified with the - -a options. The bug was in setup_code_signature() where when it did not find - a matching -a option it attempted to adjust the object->input_sym_info_size - which already had been done. Radar bug #6128288. - -Changes for the 5.26 release (the cctools-710 release): - -Changes for the 5.26 release (the cctools-709 release): -- Added support for CPU_SUBTYPE_ARM_ALL to lipo -info command. Radar bug 6025863 -- Fixed a bug in libtool(1)'s producing a table of contents for LTO. The loop - to size the table of contents was using the same outer loop variable in - make_table_of_contents(). Radar bug #6064634. - -Changes for the 5.26 release (the cctools-708 release): -- Changed libtool(1) to use use the ar long string format for the __.SYMDEF - table of contents member so it will produce archive member offsets after - that that are 8 byte aligned. -- Changed strip(1) to not produce an empty string table (but still include the - pad) for 64-bit objects to work around Radar bug 6048484. - -Changes for the 5.26 release (the cctools-707 release): -- Fixed a bug it the change to strip(1) to always run ld -r on 64-bit - MH_OBJECT files. The second place where it was calling make_ld_r_object() was - missing a test for object->mh_filetype == MH_OBJECT. - -Changes for the 5.26 release (the cctools-706 release): -- Fixed a bug in checksyms(1) that an MH_DYLIB_STUB filetype would incorrectly - get a "malformed dynamic library (no LC_ID_DYLIB command)" error. Radar bug - #6035486. -- Changed strip(1) to always run ld -r on 64-bit MH_OBJECT files and then - always keep all the resulting symbols. This still has problems because - the unified linker does not strip symbols not in its -exported_symbols_list - file. Radar bug #5829662. -- Fixed a bug in codesign_allocate(1) for 64-bit objects it did not correctly - extend the __LINKEDIT segment. Radar bug #6000731. - -Changes for the 5.26 release (the cctools-705 release): -- Removed the old ar.c, file.c, atom.c, check_hints.c, dylib_pcsampler.c, - kern_tool.c and main.c sources and references to them in the Makefile. -- Added the private -l flag to strip(1) to do the "ld -r" even with the known - bugs in the unified linker. -- Ported checksyms(1) and segedit(1) to work with 64-bit binaries. -- Ported all programs to run on 64-bit hosts. Radar bug #6022298. - - Changed the unsigned long type of nremove_symbols and nsave_symbols in - strip.c to a uint32_t . And narchs in strip_file(), ld_r_narchs in - make_ld_r_object. - - Changed the unsigned long type of narchs in main() in indr.c to a uint32_t . - - Changed the unsigned long type of table_size in main() in checksyms.c to a - uint32_t . - - Changed the unsigned long type of temp in main() in libtool.c to a - uint32_t . - - Changed seg_addr_table.c use of unsigned long types to uint32_t types and - its use of long types to int32_t types. And changed %lu format strings to - %u. - -Changes for the 5.26 release (the cctools-704 release): -- Changed redo_prebinding(1) so the zeroing out the UUID and the code signature - data only happens with -u. Radar bug #5984993. - -Changes for the 5.26 release (the cctools-703 release): -- Ported libtool(1) to build as a 64-bit program. Radar bug #5780008. - - Changed two places that used SWAP_LONG to SWAP_INT. - - Changed so the table of contents in now built with a new toc struct and - tocs field in the arch struct. And the toc_ranlibs field is now only used - for writing to the file. - - Changed all uses of unsigned long to uint32_t and updated printf format - characters as needed. - - Also changed to use mmap() instead of map_fd(). - -Changes for the 5.26 release (the cctools-702 release): -- Changed checksyms(1) to allow the local symbol created by strip(1) for the - fix to 5614542. The fix was in checksyms() in checksyms.c to test for the - symbol name "radr://5614542" and not count that as a local symbol or stab. - Radar bug #5938033. - -Changes for the 5.26 release (the cctools-701 release): -- Fixed a bug in install_name_tool(1) that was crashing when trying to print - an error as it did not test for which mach header to use. The fix was in - update_load_commands() to add a test of the 32-bit mach header pointer and if - NULL use the 64-bit mach header pointer. Radar bug 5932327. -- Changed the needs_redo_prebinding() API to use the allow_missing_architecture - parameter so the check only applys to the slice requested isn't prebound. - The change was in process_archs() in redo_prebinding.c to test the - cputype of the file being processed against arch_cant_be_missing and if not - the same just continue. Radar bug #4701556. -- Changed strip(1) to avoid creating a file with an indirect symbol table entry - with an index of zero into the symbol table. This is due to a work around in - the dynamic linker for a bug it is working around that was in the old classic - static linker. The change was in strip_symtab() in strip.c add a local symbol - if there are no local symbols and there are indirect symbols. Radar bug - #5614542. - -Changes for the 5.26 release (the cctools-700 release): -- Removed the #include from redo_prebinding.c. Radar bug #5911680. -- Changed redo_prebinding(1) -u to zero out the UUID and the code signature - data. Radar bug #5631467. -- Rewrote the -arch_blank implementation in lipo(1) so it handles all known - arch flags. Radar bug #5547634. - -Changes for the 5.26 release (the cctools-699 release): -- Backed out the changes for radar bug #3751608 which added code to - redo_prebinding.c which sets a default value for __dyld section contents. - Radar bug #5902653. -- Changed codesign_allocate(1) work with MH_OBJECT file types. Radar bug - #5545465. - - Changed setup_code_signature(): - - Changed the check for the flags having MH_DYLDLINK to also allow a - file type of MH_OBJECT and updated the error message for that check. - - Added a check for MH_OBJECT and in that case used the object file size - for the "link edit end" to be used for the code sign data offset. - - Changed two places where to check for object->seg_linkedit64 != NULL is - now needed because the code can't assume the object has a link edit - segment. - - Also fixed a warning in main() where it needed a cast to (char *) for the - assignment of the value returned by get_arch_name_from_types(). - -Changes for the 5.25 release (the cctools-698 release): -- Added support for LLVM bitcode files to libtool(1). Radar bug #5712460. - It was added undef the ifdef LTO_SUPPORT and can be disabled by setting the - LTO Makefile macro to nothing instead of its default -DLTO_SUPPORT . - - Changed the Makefile and added the LTO macro defined to -DLTO_SUPPORT to - enable LLVM bitcode file support. - - Added support for LLVM bitcode files to libtool.c : - - Added the lto field to the member struct. - - Changed process(): - - To check the ofile->lto field for archives and if not NULL also call - add_member(). - - Added a check for the ofile's file_type being OFILE_LLVM_BITCODE and so - call add_member(). Added error if the program is ranlib(1). - - Changed add_member(): - - to set the size of OFILE_LLVM_BITCODE files. - - added checks when ofile->lto is not NULL and when -arch_only is - specified and the arch does not match to return - - added code when ofile->lto is not NULL and to select the matching - archs[] if any. - - added code when ofile->lto is not NULL to set the archs[].arch_flag of - a newly allocated archs[] - - added code when ofile->lto is not NULL to set the arch->arch_flag of - and existing arch if not set. - - added code when file->file_type is OFILE_LLVM_BITCODE to set the - member fields. - - added code when ofile->lto is not NULL to copy the lto field to the - member struct and set the object_byte_sex field. - - Changed make_table_of_contents(): - - Added code when member->lto != NULL to count the toc symbols from - the lto module then add them to the table of contents. - -Changes for the 5.25 release (the cctools-694 release): -- Fixed a bug in strip(1) where it was crashing when stripping an MH_PRELOAD - filetype because the code is dereferencing a pointer to the dynamic symbol - table in get_starting_syminfo_offset() in strip.c. The fix was to test - object->dyst for not being NULL before using it. Radar bug #5834516. - -Changes for the 5.25 release (the cctools-692 release): -- Updated strip(1) to support binaries that use lazy dylibs. Radar bug #5828589. - -Changes for the 5.25 release (the cctools-688 release): -- Maded changes for the new LC_LAZY_LOAD_DYLIB load command. Radar bug #5760930. - - Added case labels for LC_LAZY_LOAD_DYLIB in update_load_commands() in - install_name_tool.c in two places. - - Added testing for LC_LAZY_LOAD_DYLIB in lc->cmd in two places in nm() in - nm.c . - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in Makefile, notes, lipo.c, nm.c, - redo_prebinding.c and strip.c . -- Added the -A option to codesign_allocate(1) to accept numeric architecture - specifications. Radar bug #5681427. -- Changed codesign_allocate to be a member of com.apple.tool.codesign_allocate . - This is done by adding the new Info.plist file into the binary as part of the - (__TEXT,__info_plist) section with a -sectcreate option on the link line - in the Makefile. Radar bug #5681503. - -Changes for the 5.25 release (the cctools-679.1 release): -- Because of the bugs in ld(1), 5675774 and 5658046, the change to strip - dwarf for 5343015 has to be backed out. The change is to simply #ifdef - NOTDEF the test of has_dwarf and the call to make_ld_r_object() in - strip_symtab(). Radar bug #5660086. - -Changes for the 5.25 release (the cctools-679 release): -- Fixed a problem with the change made for Radar bug #5008421 where it would - crash if doing a full strip on a file without a dynamic symbol table. - The new code in strip_object() to account for the input symbolic info - size needed to test that the dynamic symbol table pointer load command was - not NULL. Radar bug #5588769. - -Changes for the 5.25 release (the cctools-677 release): -- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . - Radar bug #5563553. - -Changes for the 5.25 release (the cctools-676 release): -- Changed it so ranlib(1) would not overwrite a file that is not writable when - running in UNIX standard conformance mode (the default). The change was to - libtool.c in create_library() to add a check before it calls unlink(2). - Radar bug #4242330. -- Added -fno-builtin-trunc to the Makefile to removed a warning when compiling - libtool.c . -- Fixed a problem in lipo(1)'s -extract_family when used on a fat file with - multiple cpusubtypes. The fix was in an if() statement in create_fat() at the - end where the if() before the seek() needed to also check nthin_files > 1 or - extract_family_flag == FALSE. Radar bug #4695968. -- Fixed the spelling of 'malformed' in redo_prebinding error messages. - Radar bug #5188349. - -Changes for the 5.25 release (the cctools-675 release): -- Fixed strip(1) to correctly do a full symbol strip and set the offsets to the - indirect symbol table and local relocation enties. The changes were to factor - out finding the starting offset of the symbolic info from strip_object() into - a new routine get_starting_syminfo_offset() and fixed the code in - strip_object() for the full symbol strip case to correctly account for the - symbolic info size and set the output offset to the local relocation enties - and indirect symbol table. Radar bug #5008421. -- Changed strip(1) to strip DWARF debugging info from object files. Radar bug - #5343015. - - Added a new routine make_ld_r_object() that is passed the info for the - current object file, writes that to a temporary file, runs "ld -r" plus the - specified stripping option creating a second temporary file, reads that file - in and replaces the object file contents with that and resets the variables - pointing to the symbol, string and indirect tables. The new ld_r_ofile - field in the struct object from "stuff/breakout.h" is set in - make_ld_r_object() so later free_archs() can call ofile_unmap() on it. - - Changed strip_symtab() to see if the current object is an MH_OBJECT filetype - and -S or -x is specified and the object has DWARF debugging sections to - strip and if so calls the new routine make_ld_r_object(). - - Moved the local variables from strip_object for the symbol, string and - indirect tables to file level statics so that the can be reset by the new - routine make_ld_r_object(). And removed them as parameters to - strip_symtab(). - - Changed the call to breakout() in strip_file() to save its ofile struct - pointer return value so ofile_unmap() can later be called to clean up the - space for the mapped object. -- Changed redo_prebinding to not put LC_PREBOUND_DYLIB commands in prebound - images if MACOSX_DEPLOYMENT_TARGET is 10.4 or later. The change was in - update_load_commands() in redo_prebinding.c to test that if it is not - not unprebinding and the target greater than 10.4 it returns before finishing - up and updateing the LC_PREBOUND_DYLIB commands. - -Changes for the 5.25 release (the cctools-673 release): -- Changed the sources so the arm stuff is not in the open source version. - Radar bug #5326431. - - Changed the Makefile to build with -D__OPEN_SOURCE__ with $(OPEN) - - Added #ifndef __OPEN_SOURCE__ to the following files to bracket arm code: - lipo.c, nm.c, redo_prebinding.c and strip.c - -Changes for the 5.25 release (the cctools-667.3 release): -- Changed codesign_allocate(1) to never update the LC_ID_DYLIB timestamp. - The change is in process() in codesign_allocate.c to set the - dont_update_LC_ID_DYLIB_timestamp field in the arch struct to TRUE. - Radar bug #5374218. - -Changes for the 5.25 release (the cctools-667 release): -- Fixed two problems with the change below to strip(1) for Radar bug #5207629. - - The new routine strip_LC_CODE_SIGNATURE_commands() should have tested the - object's mh field to know which of seg_linkedit or seg_linkedit64 to use - to reset the fileoff. - - The object's output_code_sig_data field should not have been set when the - cflags was specified. - -Changes for the 5.25 release (the cctools-666 release): -- Changed strip(1) with the -c option to always remove any LC_CODE_SIGNATURE - load command and signature data from the output. The new routine - strip_LC_CODE_SIGNATURE_commands() was added and it is called just after - accounting for the signature data size in the input file and not accounting - for it in the output file when the -c flag is specified. Radar bug #5207629. - -Changes for the 5.25 release (the cctools-664 release): -- Fixed a problem with the changes below to libtool(1) for Radar bug #5132019. - When used in ranlib(1) on more than one file it would get an internal error - in final_output_flush() on the second file as the last block from the first - file was not cleared from the list. The fix was to set output_blocks to NULL. - Radar bug #5169741. - -Changes for the 5.25 release (the cctools-663 release): -- Changed the code in checksyms.c, seg_addr_table.c and redo_prebinding.c for - the new get_macosx_deployment_target() interface. Radar bug #5132019. -- Changed libtool(1) to make it not make the machine unresponsive when building - large static libraries. Radar bug #5052598. - 1) Added the output_flush() and supporting code from ld_classic(1) and - modified create_library() to use it. - 2) Added a call to fcntl() with the flag F_NOCACHE on the output file. - 3) Added a call to vm_msync() with the flag VM_SYNC_DEACTIVATE on the - input object file's memory after copying to output buffer. - -Changes for the 5.24 release (the cctools-661 release): -- Changed strip(1) to change LC_ID_DYLIB timestamp in unprebound dylibs. - The change was in strip_object() in strip.c . Radar bug #5093170. - -Changes for the 5.24 release (the cctools-656 release): -- Fixed codesign_allocate(l) as it was not updated to deal with 64-bit Mach-O - files that may or may not have padding after the indirect symbol table. This - was the same change that was made to strip in Radar bug #4759112 but that - same change did not make it into codesign_allocate(1). The approach that is - used is to use the input_indirectsym_pad field in the object struct as the - amount to pad in the output file instead of trying to round the offset. - Radar bug #5047066. - -Changes for the 5.24 release (the cctools-655 release) -- Fixed a bug in strip(1) with the -no_uuid option when it is used on a file - that has a LC_SEGMENT_SPLIT_INFO load command. In the routine - strip_LC_UUID_commands() it was not resetting the pointer to the - split_info_cmd. Radar bug #5033393. - -Changes for the 5.24 release (the cctools-654 release) -- Changed libtool(1) to prepend the value of -syslibroot to all absolute paths - of the -L flags if they exist in main() in libtool.c. Radar bug #5029099. - -Changes for the 5.24 release (the cctools-653 release): -- Updated install_name_tool(1), nm(1), redo_prebinding(1) and segedit(1) to - handle the LC_REEXPORT_DYLIB load command. Radar bug #4986624. - -Changes for the 5.24 release (the cctools-648 release): -- Changed the check in lipo(1) for the nfat_arch being too large so the check - does not overflow and later cause a crash. Radar bug #4860769. - -Changes for the 5.24 release (the cctools-647 release): -- Changed codesign_allocate.c to use CPU_SUBTYPE_MASK to mask out the capability - bits from the cpusubtype on comparisons. Radar bug #4849153. - -Changes for the 5.24 release (the cctools-644 release): -- Fixed problems with the error handling code of the libredo_prebinding API. - The local varaibles used in the error handling needed to be declared volatile - so that there were not trashed by the longjmp(). The ofile variable was - getting set to NULL so the call to ofile_unmap() was not getting done and - leaking memory (which in turn caused the file descriptor to not actually get - closed leaking a file descriptor as well). Radar bug #4800981. -- Changed lipo(1) adding code for the CPU_SUBTYPE_VEO_3 and CPU_SUBTYPE_VEO_4 - cpusubtypes. Radar bug #4799550. - -Changes for the 5.24 release (the cctools-643 release): -- Changed strip(1) so strip -X on an x86_64 .o file should do nothing. - The change was in strip_symtab() for local symbols to check if the file is - CPU_TYPE_X86_64 and the -X flag is used and if so keep all the local symbols. - Radar bug #4800628. -- Ported cmpdylib(1) to work with 64-bit Mach-O dylibs including ones without - a table of contents. Radar bug #4040804. - -Changes for the 5.24 release (the cctools-642 release): -- Changed needs_redo_prebinding() in redo_prebinding.c to return NOT_PREBOUND - instead of PREBINDING_UPTODATE when the Mach-O file only contains 64-bit - Mach-O files. A new boolean variable, seen_a_non_64_bit, was added and - initialized to FALSE. Then in process_arch() if a 32-bit Mach-O is seen it - set to true. Then in needs_redo_prebinding() if PREBINDING_UPTODATE would - have been returned and seen_a_non_64_bit is FALSE, NOT_PREBOUND is returned - instead. Radar bug #4788385. -- Fixed a problem with unprebind(3) in libredo_prebinding.a where it was calling - update_external_relocs() even when the binary was marked with MH_CANONICAL. - Radar bug #4786099. - -Changes for the 5.24 release (the cctools-640 release): -- Changed lipo.c, strip.c, libtool.c, and indr.c to use CPU_SUBTYPE_MASK to - mask out the capability bits from the cpusubtype on comparisons. Radar bug - #4754462. - -Changes for the 5.24 release (the cctools-639 release): -- Changed how strip(1) deals with 64-bit Mach-O files that may or may not have - padding after the indirect symbol table. The approach now is to use the - input_indirectsym_pad field in the object struct as the amount to pad in the - output file instead of trying to round the offset. Radar bug #4759112. - -Changes for the 5.24 release (the cctools-637 release): -- Changed strip(1), inout(1), and codesign_allocate(1) to deal with the 64-bit - Mach-O files that may or may not have padding after the indirect symbol table. - The change was to use the new input_indirectsym_pad field instead of always - rounding the size of the input indirect symbol table to 8 bytes. And then - adjust the output_sym_info_size and everything else to deal with padding the - indirect symbol table on output if needed. Radar bug #4747408. - -Changes for the 5.24 release (the cctools-637 release): -- Changed strip(1), inout(1), codesign_allocate(1), and redo_prebinding(3) to - deal with 64-bit Mach-O files with an odd number of indirect symbol table - entries. The code was changed to round the size or offset as needed in a - number of places. Radar bug #4737991. -- Fixed a bug in strip(1) when creating a shared library stub and not saving - all the symbols used by the indirect symbol table entries. In - check_indirect_symtab() in symbols.c it was trying to update the non-lazy - symbol pointers to the value of the symbol causing a memory smasher. This - happened because the offset to the section was set to 0 since its contents - are to be stripped. This casused the pointer to the contents to point to the - beginning of the object file. The fix is to not update the contents if we - are creating a shared library stub since it is to be stripped. Radar bug - #4742051. -- Changed strip(1) to deal with N_SECT symbols with the N_WEAK_DEF the same for - both 32-bit and 64-bit Mach-O files. The change was to remove a test of - object->mh64 != NULL in strip_symtab() in strip.c. Radar bug #4732639. -- Fixed libtool(1) to check n_sect values of N_SECT symbols and issue an error - if they are NO_SECT or out of range. Radar bug #4739572. -- Added the printing of the alignment of common symbols to nm(1) when the -m - option is used. Radar bug #4597166. - -Changes for the 5.24 release (the cctools-635 release): -- Added the -verify_arch ... option to lipo(1). Radar bug #4496521. -- Changed strings(1) so that if it is used with a filename with parenthesis in - the name it first checks to see if there's a filename that's an exact match. - And if so it uses that, otherwise falls back to the member syntax. The change - was in main() in strings.c to stat(2) argv[i] and set a new boolean - use_member_syntax when calling ofile_process(). Radar bug #4172811. - -Changes for the 5.24 release (the cctools-634 release): -- Updated programs to handle the LC_SEGMENT_SPLIT_INFO command and its block of - data. Radar bug #4695477. - - Updated pagestuff(1) to include a new Mach-O part, MP_SPLIT_INFO, and the - code and do the needed printing. Also updated it to deal with code - signature data. - - Updated the inout.c to work with objects with split info data. Also fixed - it to work with code signature data and fixed a cast for the indirect - symbol table now needing to be a uint32_t *. - - Updated codesign_allocate(1) to work with objects with split info data. - - Changed strip_object() in strip.c to set the output_split_info_data and - output_split_info_data_size fields and account for the size of the split - info data in the object's input_sym_info_size and output_sym_info_size - fields. Also set the data offset of the split info command for output. - - Changed build_new_symbol_table() in redo_prebinding.c to account for the - size of the split info data in its local variable sym_info_size and - set output_split_info_data and output_split_info_data_size fields. And - changed update_load_commands() in redo_prebinding.c to update the pointer - to the split info load command. - - Changed translate_dylib() in indr.c to account for the size of the split - info data, and to reset the offset to it at the end of the routine. Also - changed the code to use the mh_cputype, mh_cpusubtype and mh_filetype - fields of the object struct. - - Changed setup_object_symbolic_info() in install_name_tool.c to account for - the size of the split info data. And changed update_load_commands() in - install_name_tool.c to update the pointer to the split info load command. - Also fixed update_load_commands() and added the missing break statements. - - Fixed inout.c, strip.c, redo_prebinding.c, indr.c and install_name_tool.c - to set the output_code_sig_data and output_code_sig_data_size fields. - -Changes for the 5.24 release (the cctools-633 release): -- Ported the code for libredo_prebinding.a in redo_prebinding.c to be compiled - for 64-bit hosts. Note that the code only has been changed to work on 64-bit - hosts and the operation on 64-bit binaries is unchanged (which is they are - left untouched). Radar bug #4407440. - - Changed the macro U_ABS to use int32_t and uint32_t types. - - Changed get_arch_long() and set_arch_long() to use int32_t and uint32_t - types and SWAP_INT(). - - Changed the types of the static variables new_dylib_address and - old_dylib_address to uint32_t. - - Changed strip.c, indr.c and codesign_allocate.c to deal with the change of - type for indirect symbols to uint32_t * when ported to 64-bit. -- Fixed a typo in seg_addr_table.c . Radar bug #4677855. - -Changes for the 5.24 release (the cctools-631 release): -- Changed libtool(1) to only execute ld(1) and execute ld64(1) based on the - -arch flag. The change was to create_dynamic_shared_library() in libtool.c - Radar bug #4682470. - -Changes for the 5.24 release (the cctools-629 release): -- Fixed a bug in the codesign_allocate(1) tool that was not updating the vmsize - of the __LINKEDIT segment. The fix was in setup_code_signature() in - codesign_allocate.c . Radar bug #4666308. -- Changed strip(1) so strip -R on an x86_64 .o file should do nothing. - The change was in strip_symtab() after checking the Rflag to check if the - file is CPU_TYPE_X86_64 and if so don't remove the symbols in the - remove_symbols list. Then at the end of the routine the check to missing - symbols in the remove_symbols is not done if the file is CPU_TYPE_X86_64. - Radar bug #4568747. - -Changes for the 5.24 release (the cctools-628 release): -- Changed strip_object() in strip.c to not do anything to stub dylibs which have - no load commands. Radar bug #4511628. - -Changes for the 5.24 release (the cctools-626 release): -- Made changes to support code signature data in Mach-O files. Radar bug - #4588023. - - Updated the inout.c example tool to work with 64-bit object files and - objects with code signature data. - - Created the codesign_allocate(1) tool and updated the Makefile to build and - install it. - - Changed strip_object() in strip.c to set account for the size of the code - signature data in the object's input_sym_info_size and output_sym_info_size - fields. And update the data offset of the code signature data. And at the - end of the routine a warning is printed if the object has a code signature - saying the operation will invalidate it. - - Changed build_new_symbol_table() in redo_prebinding.c to account for the - size of the code signature data in its local variable sym_info_size. And - changed update_load_commands() in redo_prebinding.c to update the pointer - to the code signature load command. - - Changed translate_dylib() in indr.c to account for the size of the code - signature data, and to reset the offset to it at the end of the routine. - - Changed setup_object_symbolic_info() in install_name_tool.c to account for - the size of the code signature data. And changed update_load_commands() in - install_name_tool.c to update the pointer to the code signature load - command. - -Changes for the 5.23 release (the cctools-618 release) -- Changed checksyms(1) to not check for prebound files when - MACOSX_DEPLOYMENT_TARGET >= 10.4 . The change was in check_dynamic_binary() - in checksym.c to test the value returned by get_macosx_deployment_target(). - Radar bug #4110782. - -Changes for the 5.23 release (the cctools-617 release) -- Changed create_fat() in lipo(1) to not set the timestamp of the output file - if it contains archives. Radar bug #4492604. - -Changes for the 5.23 release (the cctools-616 release) -- Changed lipo(1) to special case ppc, ppc64, i386 and x86_64 architectures and - to assume a segment alignment of 12. Changes were made in get_align() and - get_align_64() in lipo.c . Radar bug #4178258. -- Ported pagestuff(1) to work with 64-bit Mach-O's. Radar bug #4375624. -- Added the needed code in for nmedit(1) in strip.c in check_object_relocs() to - handle making global coalesced symbol in 64-bit Mach-O's private. Basically - it is the same as the 32-bit case but with quad sized relocation entries and - 64-bit values. Radar bug #4414533. - -Changes for the 5.23 release (the cctools-612 release) -- Changed strip(1) so strip -x on an x86_64 .o file should do nothing. - The change was in strip_symtab() for local symbols to check if the file is - CPU_TYPE_X86_64 and the -x flag is used and if so keep all the local symbols. - Radar bug #4541291. - -Changes for the 5.23 release taken from cctools-590.23.6 (the cctools-610 -release): -- Fixed a bug in the redo_prebinding code where it would call chmod(2) and - chown(2) unnecessarily when no output_file is specified. The fix was in - unprebind() in redo_prebinding.c to remove the else clause of the - if(output_file != NULL && outbuf == NULL) so the chmod() and chown() are not - called on the file_name parameter. Radar bug #4503724. -- Fixed a leak in the redo_prebinding code where error_message_buffer is not - freed when system_error() is called. The fix is in unprebind() in - redo_prebinding.c after the first call to cleanup(). It checks to see if - error_message_buffer is not NULL and if so calls free() on it. Radar Bug - #4503576. - -Changes for the 5.22 release (the cctools-590.41.4 release): -- Change the previous fix to not reference the reserved1 field when fixing up - indirect symbols in the non-lazy symbol pointer section. Radar bug #4522347. - -Changes for the 5.22 release (the cctools-590.41.3 release): -- Fixed nmedit(1) so that it sets the value of symbol pointers when it changes - the indirect symbol table entries for them into INDIRECT_SYMBOL_LOCAL. The - change was in check_indirect_symtab() in symbols.c and a bit of code was added - to take the n_value from the symbol table entry swap it if needed and write - into the section contents for that symbol pointer. The additional parameters - contents and host_byte_sex were added to the routine and pass from the two - places it was called. Radar bug #4514531. - -Changes for the 5.22 release (the cctools-590.41.2 release): -- When stripping coalesced symbols from 64-bit files, only save symbols which - are used as weak definitions. Radar bug #4487972. - -Changes for the 5.22 release (the cctools-590.40.1 release): -- Ignore multiple -syslibroot flags if they specify the same argument. Radar - bug #4354876. - -Changes for the 5.22 release (the cctools-590.38.3 release): -- Fix a typo for 64-bit code in an error case in strip(1) which would cause it - to crash. Radar bug #4502835. -- Add a new -arch_blank option to lipo(1). Radar bug #4473483. - -Changes for the 5.22 release (the cctools-590.38.2 release): -- Don't convert external relocation entries to internal ones when looking at - x86-64 relocation entries in nmedit(1). Radar bug #4497429. - -Changes for the 5.22 release (the cctools-590.34.1 release): -- Revert the 4-byte alignment change in lipo from the previous release. Radar - bug #4428605. - -Changes for the 5.22 release (the cctools-590.31.4 release): -- Modified lipo to only require 4-byte alignment for load commands. Radar bug - #4428605. -- Added x86_64 support to the relocation entry functions in misc/reloc.c, used - by strip and other tools. Radar bug #4430570. -- Fix a typo in mach-o/reloc.h. Radar bug #3754196. - -Changes for the 5.21 release (the cctools-590.40 release): -- Fixed a bug in pagestuff(1) where it would crash if it was processing a Mach-O - file with no LC_SYMTAB command. It crashed in print_symbols() because it - lacked a check for fp->st not being NULL. The fix was to add a check for - fp->st being NULL and just returning in that case. Radar bug #4495141. - -Changes for the 5.21 release (the cctools-590.37 release): -- Changed check_indirect_symtab() in strip.c so that nmedit(1) and strip(1) - would allow an indirect symbol table entry to just have INDIRECT_SYMBOL_ABS - as well as (INDIRECT_SYMBOL_LOCAL | INDIRECT_SYMBOL_ABS). This is because - ld(1) puts this out in some cases. Radar bug #4461173. -- Added passing ld(1)'s -t flag through libtool(1). Radar bug #4213190. - -Changes for the 5.21 release (the cctools-590.35 release): -- Added a warning to nmedit(1) when it sees a global coalesced symbol to say it - can't make global coalesced symbols into a static symbols and suggest the use - of ld(1)'s -exported_symbols_list option for a final linked images. The - change was in strip.c in edit_symtab() to add the warning an a boolean to - only print it once. Radar bug #4269492. -- Changed seg_hack so it doesn't affect debug sections. Radar bug #4421656. - -Changes for the 5.21 release (the cctools-590.34 release): -- Make 'nm: no name list' a warning, not an error. Radar bug #4421611. - -Changes for the 5.21 release (the cctools-590.32 release): -- Change edit_symtab in strip.c to handle the different format - of the DWARF debug map. Add new functions cmp_bsearch_global and - cmp_bsearch_global_64. Radar bug #4421583. - -Changes for the 5.21 release (the cctools-590.31 release): -- Added the -no_uuid flag to strip(1) to remove LC_UUID load commands. Radar - bug #4415536. -- Added the -no_uuid flag to libtool(1) to pass on to ld(1). Radar bug - #4415529. - -Changes for the 5.20 release (the cctools-590.20 release): -- Removed the warnings when building. Radar bug #4340147. - - Added -fno-builtin-round to the Makefile. - - Changed the local variable p to a char * in print_symbols() in nm.c . - - Changed the cast of argument 3 of the call to bootstrap_look_up() to - (unsigned int *) in tellProjectBuilder() in libtool.c . -- Fixed a bug in redo_prebinding in the support for new i386 self (dyld) - modifiying code stubs. The problem was with calculation for the new - displacement of the jmp instruction for non-prebound undefined symbols not - taking in to account that the symbol is also being slid. The fix was in - update_self_modifying_stubs() in redo_prebinding.c code. Radar bug #4335281. - -Changes for the 5.19 release (the cctools-590.18 release): -- Fixed a bug in nmedit(1) when it tried to change a global coalesced symbol - into a static and did not get the r_symbolnum for relocation entries set - correctly. The fix is in check_object_relocs() in strip.c where an extra - check was needed of relocs[k].r_extern == 1 before updating the r_symbolnum - field with the new symbol index. Radar bug #4318688. - -Changes for the 5.19 release (the cctools-590.17 release): -- Fixed a bug in strip(1) if there is more than one non-lazy pointer section - with the same indirect symbol that is being stripped. The fix was in - check_indirect_symtab() in strip.c that needed to have a new made_local - boolean and not always set saves[index] = -1 because that would cause the - sections after the first one with this symbol not to be updated. Radar bug - #4316021. - -Changes for the 5.19 release (the cctools-590.10 release): -- Added support for new i386 self (dyld) modifiying code stubs in the - redo_prebinding.c code. Radar bug #4202415. - - Added the new routine update_self_modifying_stubs() to set the JMP - instruction values. - - Changed process_arch() to call the new update_self_modifying_stubs(). - - Added the new routine reset_self_modifying_stubs() to set the self modifying - stubs section back to halt instructions. - - Changed unprebind_arch() to call the new reset_self_modifying_stubs(). - -Changes for the 5.19 release (the cctools-590.7 release): -- Changed libtool(1) to pass the new -macosx_version_min flag to ld. Radar - bug #4195253 - -Changes for the 5.18 release (the cctools-590.5 release): -- Added the N_OSO stab entry to stabnames[] array in nm.c to print the new - stab. Radar bug #4202462. -- Added passing the -Sp flag from libtool(1) to ld(1). Radar bug #4202462. - -Changes for the 5.18 release (and SUTiCambridge) (the cctools-590 release): -- Added a call to update_dyld_section() in unprebind_arch() in - redo_prebinding.c to set the (__DATA,__dyld) section contents to a - canonical value. Radar bug #4126660. -- In reset_symbol_pointers() in redo_prebinding.c added a conditional resetting - symbol pointers defined in the image. The conditional is if either the - MH_WEAK_DEFINES or MH_BINDS_TO_WEAK flags are present then the symbol pointer - is set back to zero or to the value for lazy binding and assumed that if - the symbol is defined it is being used from the image. This is because the - Tiger dyld when prebinding may set the symbol pointer to an address in another - image even if the symbol is defined in the image being prebound. Radar bug - #4126666. - -Changes for the 5.18 release (and SUTiAtlanta) (the cctools-588 release): -- Added more code in build_new_symbol_table() in redo_prebinding.c for fix up - the FCS Tiger dyld prebinding problem with stabs that are in the AppKit well - enough to allow the Software Update patching that uses the undo prebinding - operation to work. Radar bug #4113681. - - If the module table gets updated when unprebinding with the change below and - that adjustment is not the same as the vmslide then the N_STSYM and N_SO - stabs are corrected. - -Changes for the 5.18 release (and in SUTiAtlanta) (the cctools-587 release): -- Added code build_new_symbol_table() in redo_prebinding.c to fix up the FCS - Tiger dyld prebinding problems well enough to allow the Software Update - patching that uses the undo prebinding operation to work. Radar bug #4108651. - - When updating the module table when unprebinding code was added to calculate - the value to adjust the objc_module_info_addr entries from the difference - between the the address of the (__OBJC,__module_info) section and the module - table entry with the lowest objc_module_info_addr value. - - Code was added at the end of the routine to set the n_value of absolute - global symbols that start with ".objc" or end with ".eh" to zero. -- Changed process_archs() in redo_prebinding.c to set - arch->dont_update_LC_ID_DYLIB_timestamp to TRUE for 64-bit archs so their - time stamps don't get changed. Radar bug #4105452. - -Changes for the 5.18 release (the cctools-583 release): -- Changed the Makefile so that when RC_XBS is set to YES then the compiler - options -MD and -dependency-file as well as the md(1) program are not used. - Radar bug #4029936. - -Changes for the 5.18 release (the cctools-580 release): -- Changed it so that the default for MACOSX_DEPLOYMENT_TARGET is 10.4 for i386. - Radar bug #4081062. - - Changed the call to get_macosx_deployment_target() in unprebind_arch() in - redo_prebinding.c to pass the additional cputype parameter from the arch's - cputype. - - Changed the call to get_macosx_deployment_target() in main() in - seg_addr_table.c to pass the additional cputype parameter as CPU_TYPE_ANY. - -Changes for the 5.17 release (the cctools-577 release): -- Fixed a bug in the libredo_prebinding code that caused it to report an error - when there was a relocation entry at the very end of a segment. The problem - was in contents_pointer_for_vmaddr() in redo_prebinding.c where it was using - < when it should have been using <= in checking to see which segment a vmaddr - is in. Radar bug #4054854. - -Changes for the 5.17 release (the cctools-572 release): -- Changed nm(1) when the -P option is used to print a 0 for the size. Radar - bug #3652346. - -Changes for the 5.17 release (the cctools-566 release): -- Ported strings(1) to work with 64-bit object files. Radar bug #3943477. -- Fixed another problem with nmedit(1) and fat files with 64-bit Mach-O dylibs - that have no modules. The variable new_nextrefsyms was not being reset for - the next arch being processed if it had no modules. This is now done in - edit_symtab() just after new_ntoc is reset. Radar bug #3949527. - -Changes for the 5.17 release (the cctools-565 release): -- Fixed a problem with nmedit(1) with -p option and 64-bit Mach-O object files - that caused it to crash. The problem was in edit_symtab() in strip.c where - it was incorrectly using the variable changed_globals not changed_globals64. - Radar bug #3945219. - -Changes for the 5.17 release (the cctools-564 release): -- Fixed a problem with nmedit(1) and fat files with 64-bit Mach-O dylibs that - have no modules. The variable new_ntocs was not being reset for the next arch - being processed if it had no modules. This is now done in edit_symtab() just - after new_nmodtab is reset. Radar bug #3940965. - -Changes for the 5.17 release (the cctools-563 release): -- Changed the code in redo_prebinding.c which sets a default values for the - first two pointers in the (__DATA,__dyld) section, the routine - update_dyld_section() was changed to use constant values. Also a missing - error check was added and calls to set_arch_long() to correctly deal with - cross bytesex and alignment issues. Radar bug #3828403. - -Changes for the 5.17 release (the cctools-562 release): -- Ported the install_name_tool(1) to work with 64-bit Mach-O files. Radar bug - #3930775. - -Changes for the 5.17 release (the cctools-561 release): -- Fixed a problem with the code for nmedit(1) that could not deal with a dylib - without a module table. The fix was in edit_symtab() in strip.c to test for - the number of modules being zero as well as it being a dylib. Radar bug - #3926028. - -Changes for the 5.17 release (the cctools-560 release): -- Changed strip(1) to call realpath(3) on arguments to allow it to work with - symlinks. Radar bug #3889109. - -Changes for the 5.17 release (the cctools-559 release): -- Changed the printing in nm(1) with the -A option to add a space after the ':' - is printed for the file name. Radar bug #3652346. -- Fixed a problem with strip(1) -c which was not correctingly setting the - filetype to MH_DYLIB_STUB. This was caused by the changes to the 64-bit - port and the fix was in strip_object() to set object->mh->filetype or - object->mh64->filetype as well as object->mh_filetype. Radar bug #3909472. -- Fixed a problem with the change for Radar bug #3766901 that was causing extra - newlines in strings(1) output to be printed. The fix was in ofile_find() in - strings.c by only printing the +1 size of the string when it was at the end - of the buffer and the last character was not a '\n' . Radar bug #3907726. - -Changes for the 5.17 release (the cctools-558 release): -- Changed seg_addr_table(1) avoid outputing libraries when they are built - nonsplit but are listed as split in the table. This situation happens when - B&I moves libraries to the split region from the nonsplit region, but then - they fail to build. Radar bug #3903547. - -Changes for the 5.17 release (the cctools-557 release): -- Removed support for the INTERIM_PPC64. The changes were to remove the - #ifdef INTERIM_PPC64 source changes in lipo.c and strip.c . Radar bug - #3600419. -- Ported the size(1) command to work with 64-bit Mach-O files. Radar bug - #3900014. - -Changes for the 5.17 release (the cctools-556 release): -- For ranlib(1) with the -q option, used by ar(1) for UNIX standard conformance, - a warning about an "empty library: XXX (no table of contents added)" must not - be printed. Again the change was in create_library() in libtool.c . Radar - bug #3893339. -- For ranlib(1) with the -q option, used by ar(1) for UNIX standard conformance, - changed it not to change the file if there are no table of contents entries. - The change was in create_library() in libtool.c . Radar bug #3893392. -- Added the -syslibroot option as another way to specifiy NEXT_ROOT - in libtool(1). Radar bug #3886145. - -Changes for the 5.17 release (the cctools-554 release): -- Fixed a bug with the strings(1) -a option printing the last string at the end - of a section. The fix was in ofile_find() in strings.c by adding "+1" to the - argument of printf()'s string size format. Radar bug #3766901. -- Changed strip(1) to handled filenames with paths lengths near PATH_MAX. - Radar bug #3878381. -- Made more changes to nm(1) for UNIX standard conformance. Radar bug #3878451. - - Added "--" to be the same as "-" and treat all remaining arguments as - file names. Change in main() in nm.c. - - Changed nm(1) to print the file name before the output with -A just like - the -o option. - - Changed nm(1) with the -P option to use hex as the default. Change in - main() to the initialization of cmd_flags.format . -- For ranlib(1) with the -q option, used by ar(1) for UNIX standard conformance, - changed it to not print the warning about creating a library with no symbols - in the table of contents. The change was in create_library() in libtool.c . - Radar bug #3878332. - -Changes for the 5.17 release (the cctools-553 release): -- Fixed a bug in nmedit(1) for 64-bit Mach-O files that was causing it to - incorrectly produce an error about bad n_sect values. The fix was in - edit_symtab() in strip.c where LC_SEGMENT was used when LC_SEGMENT_64 should - have been used. Radar bug #3880780. -- Changed seg_addr_table(1) for enhancements for 10.4 prebinding. Radar bug - #3871826 - - Only round addresses to the nearest page. - - Only output split addresses. - - Refrain from outputting the next debug and the next flat address to assign. - - Allow addresses to be in the full 256 mb range (0x90000000 - 0x0x9fffffff). -- Changed redo_prebinding.c to ignore 64-bit Mach-O files and leave them - unchanged. Radar bug #3877703. - -Changes for the 5.17 release (the cctools-552 release): -- Added the 'q' option to ranlib(1) to do nothing if a fat file would be - created as the output file. This is used by ar(1) for UNIX standard - conformance. Radar bug #3762136. -- Added the 'f' option to the usage line for nm(1). Radar bug #3856321. -- Added the UNIX standard conformance flags -P, -A and -t to nm(1). Radar - bug #3652346. -- Added the -n number and -t format options to strings(1). Radar bug #3644256. -- Added the "--" option to strings(1) to treat all argument after this as file - names. Radar bug #3571788. -- Changed strip(1) to not write over a non-writeable file when in UNIX standard - conformance mode and produce an error instead. The change was in strip_file() - in strip.c to call the new libstuff routine get_unix_standard_mode() and if - TRUE call access(2) for W_OK to see if we can write on the file. Radar bug - #3852702. - -Changes for the 5.17 release (the cctools-551 release): -- Fixed a bug in the -u option for redo_prebinding(1) that cause it to not set - the MH_ALLMODSBOUND flag. The fix was in unprebind_arch() after the call to - update_load_commands() to re-read the value of the mach header flags it had - in the local variable mh_flags. Radar bug #3851599. -- Fixed a bug in print_mach_symbols() in nm.c that was causing a crash when the - -m option was used because it was using ofile->mh64 when ofile->mh was not - NULL. - -Changes for the 5.17 release (the cctools-550 release): -- Changed nm.c to handle both 64-bit and 32-bit binaries. Changed the Makefile - back to the cctools-528 Makefile since there are no longer any *64(1) tools - built in this directory. Radar bug #3859090. -- Changed seg_addr_table(1) to ignore 64-bit files. The changes were in - sizes_and_addresses() and get_seg1addr() in seg_addr_table.c to simply return - if ofile->mh is NULL. Radar bug #3861276. -- Changed the constant CPU_IS64BIT in libtool.c to CPU_ARCH_ABI64. - Radar bug #3806447. -- Fixed a warning in build_new_symbol_table() in redo_prebinding.c that the - variables new_symbols64 and new_symbols may be used uninitialized. - -Changes for the 5.17 release (the cctools-548 release): -- Fixed a bug in strip(1) in strip_object() for 64-bit Mach-O binaries that - caused it to not correctly update the indirect symbol table entries. There - was an incorrect cast in setting up the pointer to the section_64 struct where - it was using "struct segment_command" where it should have been - "struct segment_command_64". Also there was an incorrect check of - object->seg_linkedit that should have been object->seg_linkedit64. - Radar bug #3848104. - -Changes for the 5.17 release (the cctools-547 release): -- Changed the code in redo_prebinding.c to not crash when presented with a - 64-bit Mach-O binary. The APIs except redo_prebinding(3) should now handle - binaries with 64-bit Mach-O binaries. There is not yet support for actually - redoing the prebinding on a 64-bit Mach-O binary. Radar bug #3851599. - -Changes for the 5.17 release (the cctools-545 release): -- Fixed a bug in strip_object() in strip.c for 64-bit Mach-O files that - incorrectly had the size on the indirect symbol table entries as 8 byte - sizeof(long long) in two places. This is an index into the symbol table and - is 4 bytes in both 64-bit Mach-O files and 32-bit Mach-O files. - Radar bug #3836060. - -Changes for the 5.17 release (the cctools-542 release): -- Fixed 64-bit math bug in strip when computing the size of the __LINKEDIT - segment. Radar bug #3831401. - -Changes for the 5.17 release (the cctools-541 release): -- Fixed a bug in strip_symtab() in strip.c that was not correctly copying the - undefined symbols out for both 32-bit and 64-bit Mach-O files. Radar bug - #3829545. - -Changes for the 5.17 release (the cctools-540 release): -- Fixed a bug in strip_symtab() in strip.c that was using the value of a - symbol's n_sect value before checking that it was in the valid range. - Radar bug #3829149. - -Changes for the 5.17 release (the cctools-539 release): -- Changed strip(1) to support 32-bit & 64-bit binaries. Radar bug #3812858. - - Changed the code in strip.c to to test the mach header field, mh for - NULL, to see which type of object it has and then added/modified the code - to deal with both. - -Changes for the 5.17 release (the cctools-537 release): -- Changed the redo_prebinding(3) API to return REDO_PREBINDING_SUCCESS any time - a new file is created. Radar bug #3818477. -- Fixed a problem with libtool/ranlib that was causing it to increase the size - of archive member's long names each time it was run. The fix was in - add_member() to first trim the long name size to not include any trailing '\0' - before rounding the size up. Radar bug #3817546. - -Changes for the 5.17 release (the cctools-534 release): -- Changed libtool to call ld64 for CPU_IS64BIT architectures. Radar - bug #3807911 -- Fixed lipo(1)'s -info and -detailed_info options to handle 64-bit Mach-O - files. Radar bug #3793539. -- Changed libtool.c to force using long archive names and pad them with the - rounding needed to get members on 8 byte offsets. This is needed because the - struct ar_hdr is not a multiple of 8 bytes. Radar bug #3808740. - -Changes for the 5.17 release (the cctools-533 release): -- Changes to support 32-bit & 64-bit tools in the same binary. Radar bug - #3793394. - - Changed the Makefile to only build libtool and no longer build libtool64 . - - In libtool.c, changed the struct member, to have both 32-bit and 64-bit - mach header pointers and array section pointers. And changed all the code - to test the mach header field, mh for NULL, to see which type of object - it has and then added/modified the code to deal with both. Also changed - all rounding to 8 from 4 so members end up on a 8-byte boundary. - - Changed the code in nm.c to use the swap_nlist_t and the swap_dylib_module_t - new macros from "stuff/target_arch.h". And added one ifdef ARCH64 to use - the ofile->dylib_module64 . Also added an - - In process() and in print_mach_symbols() in nm.c added a new ofile_mh local - variable and added a new ifdef ARCH64 to set it to ofile->mh64 or ofile->mh. - And changed places where it used ofile->mh to ofile_mh. -- Changed strip.c and segedit.c to initialize the variable progname and declare - it to be a __private_extern__ to avoid having a common private extern be - created when built with gcc-3.5. -- Changed the used of NXZone* APIs to malloc_zone* APIs in redo_prebinding.c. - Radar bug #3461591. - -Changes for the 5.17 release (the cctools-532 release): -- Fixed some problems with the Makefile and building libredo_prebinding.a when - the support for 64-bit tools was first added. - -Changes for the 5.17 release (the cctools-531 release): -- Made more changes to support 64-bit tools. Radar bug #3600431. - - Changed the Makefile to build a libtool64 command and create a link to - it for ranlib64. - - Changed the libtool.c sources to build a libtool64 by changeing the uses - of structs and constants that are different for 64-bit files to the - typedefs in "stuff/target_arch.h". -- Made some changes to the changes in redo_prebinding.c in cctools-530 so that - it does not compile with warnings. And changed some of the comments to me - more accurate. - -Changes for the 5.17 release (the cctools-530 release): -- Added code to redo_prebinding.c which sets a default value for - __dyld section contents. Radar bug #3751608. - -Changes for the 5.17 release (the cctools-529 release): -- Made changes to support 64-bit tools. Radar bug #3600431. - - Changed the Makefile to build the tools using a sub-directory for the - objects and building both 32-bit and 64-bit tools. Things are no longer - built with -DINTERIM_PPC64 and the 64-bit tools are built with -DARCH64 and - linked with libstuff64 . - - Made changes to build an nm64 by changing the uses of structs, constants - and names that are different for 64-bit files to the typedefs in - "stuff/target_arch.h". - - In some places that used nlist symbols this was changed to the new type - in "stuff/symbol.h" to struct symbol. Which contains a name, an indr_name - and an nlist_t. - -Changes for the 5.17 release (the cctools-528.6 release): -- Change the code in nmedit that checks for relocation entries of - global coalesced symbols to allow pcrel being 0 or 1. This works as - we are not moving the instruction and the pc value added in does not - change. Needed for x86 compilers after -1800 (3.3-based), and - eventually necessary for 3.5-based x86 compilers. Radar bug #3806356. - -Changes for the 5.17 release (the cctools-528.5 release): -- Fixed a problem with seg_addr_table(1) when it detects overlaps in both the - read write and read only portions of a split address. However it only will - zero out the portion that has the overlap. Later in seg_addr_table there is - a check to determine if the address has been zeroed out and should have a new - address assigned. This check only looks at the read only portion of the - address to decide if it should assign a new address. The result of this bug - is a library with a read only address that is non zero and a read write - address that is non zero. The fix is in main.c in the update and - update_overlaps code. Radar bug #3767036. -- Fixed unprebind's processing of nonprebound dylibs to allow it to - properly handle relocation entries. Radar bug #3652989. - -Changes for the 5.17 release (the cctools-527 release): -- Fixed a problem with the change for Radar #3738616 in that the checksyms(l) - needs to have a what(1) string. The Makefile was changed to put both the - what(1) string and the apple_version[] info in vers.c . Radar bug #3746707. - -Changes for the 5.17 release (the cctools-526 release): -- Added the -V flag to libtool(1) to print the version. Changed the Makefile - to produce the same version info in vers.c as is done for ld(1). Radar bug - #3738616. -- Fixed warnings for the changes in mach-o headers for types changing from - unsigned long to uint32_t and from long to int32_t. Radar bug #3744082. - - Changed a number of uses of "%lu" to "%u" and "%ld to "%d" in lipo.c, - size.c, nm.c, checksyms.c, cmpdylib.c and redo_prebinding.c . - -Changes for the 5.16 release (the cctools-524 release): -- Fixed a bug in strip(1) that when used on the dynamic linker with no options, - to strip all symbols, it crashed. The fix was in strip_object() in strip.c to - change it to make it call strip_symtab() when the file is an MH_DYLINKER. - Radar bug #3697374. - -Changes for the 5.16 release (the cctools-520 release): -- Fixed a bug in strip(1) that when used on a dynamic library with no options, - to strip all symbols, it produced a malformed file that had bad offsets - to various tables. The fix was in strip_object() in strip.c to change it to - make it call strip_symtab() when the file is an MH_DYLIB. Radar bug #3641669. -- Changed libtool(1) that printed "Logging for Build & Integration] Used static - library" to print the realpath() name of the file name. Radar bug #3585834. -- Changed libtool(1) to take -executable_path as a linker flag. Radar bug - #3489733. -- Changed libtool(1) and ranlib(1) to not generate warnings about multiple - archive members defining the same symbol. This is was done by adding the - boolean parameter library_warnings to the function check_sort_ranlibs() in - libtool.c and always passing this a FALSE. This matches the way it is done - in writeout() in libstuff. Radar bug #3653845 . - -Changes for the 5.16 release (the cctools-512 release): -- Changed the two calls to writeout_to_mem() in redo_prebinding.c to pass the - new enum bool * seen_archive parameter (it is not used in this code however). - See the notes in libstuff for this, as it is part of the fix for Radar bug - #3645280. - -Changes for the 5.16 release (the cctools-509 release): -- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 - file format. And added -DINTERIM_PPC64 to the Makefile. - -Changes for the 5.16 release (the cctools-500 release): -- Added in nm(1) when -m is specified printing "[no dead strip] " for symbols - with the N_NO_DEAD_STRIP bit set. This change is in print_mach_symbols() in - nm.c . Radar bug #2284500. -- Changed libtool(1) to take -dead_strip and -no_dead_strip_inits_and_terms - as linker flags. Radar bug #2284500. - -Changes for the 5.16 release (the cctools-499.1 release): -- Added support for the interim ppc64 file format. Radar bug #3562133 and - #3562232. - - Updated lipo.c to know about CPU_TYPE_POWERPC64 in print_arch() and - print_cputype(). - - Updated strip_object() in strip.c so the stride for symbol pointers is set - 8 when arch_flag.cputype == CPU_TYPE_POWERPC64 and 4 otherwise. - -Changes for the 5.14 release (the cctools-497 release): -- Added passing the -prebind_allow_overlap from libtool(1) to ld(1). Radar bug - #3452484. - -Changes for the 5.14 release (the cctools-496 release): -- Fixed a bug that caused the seg_addr_table(1) tool to reserves more space - than necessary for flat dylibs. Radar bug #3440884. - -Changes for the 5.13.2 release (the cctools-495.3 release): -- Added a -u option to redo_prebinding(1) and the unprebind(3) API to allow - binaries to be "unprebound". Unprebound binaries are identified by the - MH_PREBINDABLE flag. The unprebind operation will remove all - LC_PREBOUND_DYLIB load commands, set LC_LOAD_DYLIB load command's timestamps - to zero, slide dynamic libraries to address 0x0, set prebound symbols' symtab - entries to be of type N_UNDF and address zero, resets lazy symbol pointers to - their original values as specified in their corresponding relocation entries, - sets non-lazy symbol pointers to zero, and sets two-level hints to zero. If - a dynamic library has all two-level namespace modules bound, the unprebound - binary will also have the MH_ALLMODSBOUND flag set (because this fact is lost - when the LC_PREBOUND_DYLIB commands are removed). It is also - possible to unprebind non-prebound dylibs, executables, and bundles. - These files do not gain the MH_PREBINDABLE flag, however they will have - their dependent library timestamps and versions zeroed, and their hints - table will be zeroed as well. As unprebind is intended to produce a - canonical Mach-O, all unprebound binaries are identified with the - MH_CANONICAL flag. Radar bug #3176679. -- Added a -s option to redo_prebinding(1). If -s is specified, the resulting - output file will be written to standard output, rather than to an output file. - Radar bug #3176679. -- Added a -seg1addr option to redo_prebinding(1). If -seg1addr is specified, - the next command-line argument should be a valid hexadecimal address. - redo_prebinding(1) will then slide the input dynamic library to this address. - This option does not apply when -u, -seg_addr_table or - -seg_addr_table_filename are specified. -- Modified the redo_prebinding code to support reprebinding of unprebound - binaries. This included recognizing binaries with MH_PREBINDABLE as opposed - to MH_PREBOUND as binaries acceptable for reprebinding, using the - MH_ALLMODSBOUND flag (or lack thereof) to determine if all two-level namespace - modules should be bound for input binaries with MH_PREBINDABLE, and changing - the type of the input symbols to N_PBUD if the type was read in as N_UNDF and - the file has MH_PREBINDABLE set in setup_initial_undefined_list() (this is - because these symbols can be assumed to have been prebound symbols prior to - the file being unprebound, and these symbols must be treated as prebound - during the reprebinding process). Radar bug #3176679. - -Changes for the 5.13 release (the cctools-493 release): -- Fixed a bug in the redo_prebinding code that was incorrectly checking that an - executable does not have any extra LC_PREBOUND_DYLIB load commands for - libraries that don't exist. This can cause an error if an indirectly - referenced dylib's install name changes. This is not needed since - update_load_commands() will recreate the LC_PREBOUND_DYLIB load commands for - the indirectly referenced dynamic libraries. Including both adding and - removing ones as needed to match the libraries on the system. Radar bug - #3408696. - -Changes for the 5.13 release (the cctools-492 release): -- Changed the seg_addr_table(1) tool to assign addresses for _debug and _profile - libraries addresses to start at 0x40000000 through lower addresses. Radar - bug #3360593. -- Fixed a bug in the seg_addr_table(1) tool where the bounds checking in - next_flat_seg1addr was not entirely correct. The fix is two places in - next_flat_seg1addr() in seg_addr_table.c . Radar bug #3359505. - -Changes for the 5.13 release (the cctools-483 release): -- Fixed a bug in libtool(1)'s handling of -weak_framework and -weak_library - flags. The code in the routine process() in libtool.c needed the same check - for -framework to avoid thinking the flag as a file name and trying to open - it. Radar bug #3318491. -- Changed libtool(1) to pass the -m flag on to the linker. Radar bug #3305123. - -Changes for the 5.12 release (the cctools-474 release): -- Fixed a bug in redo_prebinding that was leaking memory if the - allow_missing_architectures parameter was used and the fat file did not - contain an architecture. The fix was in load_library() in 4 places it - checks to see if the missing architecure is allowed to be missing and it now - unmap's the ofile before returning. Radar bug #3144803. - -Changes for the 5.12 release (the cctools-472 release): -- Fixed a bug in seg_addr_table(1) when run with -relayout the <<< Next split - address to assign >>> isn't getting set properly. The fix in in main() to add - relayout == FALSE to the if() condition for the code that loops and updates - the NEXT_SPLIT_ADDRESS_TO_ASSIGN. Radar bug #3245958. - -Changes for the 5.12 release (the cctools-470 release): -- Added the -c option to strip(1) to strip the section contents of a dynamic - shared library and create a stub library. Radar bug #3235093. -- Changed install_name_tool(1) to not change MH_DYLIB_STUB filetypes. - Radar bug #3235093. -- Added the flag -search_paths_first to cause -lx flags to search each path - for .dylib then .a before searching next path to libtool(1). Radar bug - #3176974. - - Added the enum bool variable search_paths_first to the cmd_flags struct and - code to parse out the option, set variable and add it to the ldflags[] in - main() . - - The new static routines search_paths_for_lname() and search_path_for_lname() - were added. - - In file_name_from_l_flag() a test of the new search_paths_first variable is - done and if TRUE then search_paths_for_lname() is called. - -Changes for the 5.12 release (the cctools-469 release): -- Added support for the -weak-lx, -weak_library and -weak_framework flags to - libtool(1). Radar bug #3069758. -- Fixed a bug seg_addr_table(1) in next_flat_seg1addr() where the variable i - was previously changed to unsigned. The second loop uses this varaiable as - signed and thus this change was causing the loop to never terminate. Radar - bug 3225931. - -Changes for the 5.12 release (the cctools-466 release): -- Fixed a bug in libtool(1) for the -static option that caused it to crash if - the objects contained no symbols to put in the table of contents. Radar bug - #3217471. -- Fixed the incorrect casts on the comparison of the nlist struct's n_strx field - where the value being compared to was casted to a long. The correct fix was - to cast n_strx to an unsigned long. -- Changed print_mach_symbols() in nm.c to print "(dynamically looked up)" for - the library ordinal DYNAMIC_LOOKUP_ORDINAL which are looked up dynamically - with flat namespace semantics in two-level namespace images. Radar bug - #3210803. -- Changed get_primary_lib() in redo_prebinding.c to check for the library - ordinal DYNAMIC_LOOKUP_ORDINAL and return NULL. Radar bug #3210803. - -Changes for the 5.12 release (the cctools-464 release): -- Made changes to build cleanly with gcc3.3 - - Removed -Wno-precomp from the Makefile - - Fixed warnings for "comparison between signed and unsigned" in lipo.c, - size.c, strings.c, nm.c, libtool.c, checksyms.c, indr.c, strip.c, segedit.c, - kern_tool.c, cmpdylib.c, dylib_pcsampler.c, pagestuff.c, redo_prebinding.c, - seg_addr_table.c, check_dylib.c, seg_hack.c and install_name_tool.c. - -Changes for the 5.12 release (the cctools-463 release): -- Added support for MH_DYLIB_STUB libraries. Radar bug #3193744. - - Added the testing for MH_DYLIB_STUB along with MH_DYLIB in add_member() - in libtool.c . - - Added the testing for MH_DYLIB_STUB along with MH_DYLIB in - translate_object() in indr.c in the error check. - - Added a case for MH_DYLIB_STUB in type_buf() in file.c (note this is the - old file(1) command and is no longer used). - - Added the testing for MH_DYLIB_STUB along with MH_DYLIB in check_dylib() - in cmpdylib.c in 2 places. - - Added the testing for MH_DYLIB_STUB along with MH_DYLIB in checksyms() and - in check_dynamic_binary() in checksyms.c in 3 places in all. - - Added the testing for MH_DYLIB_STUB along with MH_DYLIB in check_hints.c . - -Changes for the 5.12 release (the cctools-461 release): -- Fixed a bug in install_name_tool(1) that caused it to crash when the new - load commands were smaller than the old load commands. Radar bug #3161586. - -Changes for the 5.12 release (the cctools-456 release): -- Fixed a bug in the redo_prebinding code when the allow_missing_architectures - parameter to the redo_prebinding() API is non-zero. In the routine - load_library() an extra check is needed to not cause an error if we are - allowing missing architectures. The case where this happens is when there - is a fat file that the architecture we don't care about depends on a library - in another fat file but the time stamps for the libraries don't match. - Radar bug #3144552. - -Changes for the 5.12 release (the cctools-455 release): -- Fixed a bug in the redo_prebinding code in the routine link_library_module() - in redo_prebinding.c. The problem was that when a reference to a private - extern was found only the module containing it was marked linked. A call - to link_library_module() for that module was needed to pull in its - dependencies and get those modules marked as LINKED. Radar bug #3126383. - -Changes for the 5.12 release (the cctools-454 release): -- Fixed a bug where seg_addr_table doesn't catch when an address is assigned in - the "alternate" area. seg_addr_table(1) was using the wrong constant to - check the validity of newly assigned addresses, the fix is to use the correct - constant. Radar bug #3138181. - -Changes for the 5.12 release (the cctools-452 release): -- Fixed the bug fix done for Radar bug #3124262 below in the redo_prebinding - code. The copied code from the above loop was wrong as it changed this: - if(libs[i].module_states[j] == LINKED) - to this: - if(libs[j].module_states[k] == LINKED || - (prebind_all_twolevel_modules == TRUE && - (libs[j].ofile->mh->flags & MH_TWOLEVEL) == - MH_TWOLEVEL)) - which should have been this: - if(libs[i].module_states[j] == LINKED || - (prebind_all_twolevel_modules == TRUE && - (libs[i].ofile->mh->flags & MH_TWOLEVEL) == - MH_TWOLEVEL)) - which used the correct index variables. Radar bug #3133589. - -Changes for the 5.12 release (the cctools-451 release): -- Fixed a bug in the redo_prebinding code that did not set the all the bits - in the linked_modules bit vector for any new LC_PREBOUND_DYLIB load commands - when prebind_all_twolevel_modules was TRUE. Radar bug #3124262. - -Changes for the 5.12 release (the cctools-448 release): -- Added an entry stabnames[] array in nm.c for N_OPT that is emitted with - gcc2_compiled and in gcc source. Radar bug #3104328. - -Changes for the 5.12 release (the cctools-447 release): -- Fixed a bug in add_member() in libtool.c when get_arch_family_from_cputype() - returns NULL. - -Changes for the 5.11 release (the cctools-446 release): -- Added passing -x from libtool to ld. Radar bug #3088301. - -Changes for the 5.11 release (the cctools-444 release): -- Added passing -exported_symbols_list & -unexported_symbols_list from libtool - to ld. Radar bug #3083844. -- Factored out some of the symbol list stuff out of strip.c into libstuff so - ld(1)'s -exported_symbols_list and -unexported_symbols_list options can use - it. Radar bug #3083844. - -Changes for the 5.11 release (the cctools-443 release): -- Added passing -single_module & -multi_module from libtool to ld. Also added - passing -u flags. Radar #3080780. - -Changes for the 5.11 release (the cctools-440 release): -- Fixed the warnings about extra tokens at end of #endif directive in - check_hints.c, strip.c and make_defs.h (Radar bug #3072042). - -Changes for the 5.11 release (the cctools-439 release): -- Made the needed changes to lipo.c for VEO support. Radar bug #3068161. -- Added the install_name() API to redo_prebinding.c . Radar bug #3065586. -- Changed needs_redo_prebinding() in redo_prebinding.c to check all archs if - allow_missing_archs is zero. Radar bug #3065577. -- Added parsing out -no_arch_warnings to libtool(1), which is then ignored, - so it can be passed to it. Radar bug #3064819. - -Changes for the 5.11 release (the cctools-437 release): -- Backed out Radar bug #2922145 and changed the Makefile back to only create - only -dynamic compiled libredo_prebinding.a. Radar bug #3000895. -- Add support in nm(1) for printing the new stab entries for Radar bug #2940311 - which should be: - N_PARAMS 0x86 - N_VERSION 0x88 - N_OLEVEL 0x8A - Also needed to fix a couple of places that did not check the N_STAB being zero - before checking the N_TYPE bits to be N_INDR (which N_OLEVEL has). - Radar bug #3000792. -- Fixed a bug in setup_symbol_list() in strip.c in the code that removes - duplicates from the list. The second loop limit needed to loop for one - less. Radar bug #2962899. - -Changes for the 5.10 release (the cctools-435 release): -- Fixed bugs in the libredo_prebinding API's of object_file_type() and - get_prebind_cksums() that were not calling setjmp() to set up for handling - of errors. Radar bug #2992414. -- Changed redo_prebinding to not attempt to redo the prebinding on any file - that has a resource fork. The test is made deep in the code just before it - would actually do the work. It is done this way to not mess up the other - options like -i that is trying to ignore non-Mach-O files, etc. Radar bug - #2987656. - -Changes for the 5.10 release (the cctools-434 release): -- Changed nmedit -p to not change the indirect table entries to - INDIRECT_SYMBOL_LOCAL since the symbols are still global. Radar bug 2986703. - -Changes for the 5.10 release (the cctools-432 release): -- Changed libtool(1) when the -static option is in effect to not put a dynamic - library file into the static library it is creating. This can happen if a - libx.a file is really a dynamic library and someone is using -lx when creating - a static library. The change is in add_member() in libtool.c. Radar bug - #2970223. - -Changes for the 5.10 release (the cctools-430 release): -- Changed the experimental code in nmedit that changes global coalesced symbols - into statics to do very limited relocation. It can do VANILLA long sized - non-pcrel relocation. It does not correctly convert it to a scattered - relocation entry when it should. - -Changes for the 5.10 release (the cctools-429 release): -- Fixes a bug with the experiment in cctools-428 that was changing global - coalesced symbols into statics. A static symbol can't be a weak_definition - and ld(1) catches this as an error. So in edit_symtab() just after it cleared - the N_EXT bit it also clears the N_WEAK_DEF bit. - -Changes for the 5.10 release (the cctools-428 release): -- As an experiment changed nmedit(1) when using the -s option on an MH_OBJECT - file change change global coalesced symbols into statics. Then if there are - external relocation entries to just turn them into local entries without - knowing if they should be scattered relocation entries. Radar bug #2957909. - -Changes for the 5.10 release (the cctools-427 release): -- Changed nmedit(1) -p to also change global coalesced symbols into private - externs. The change was in edit_symtab() in strip.c. Radar bug #2956057. - -Changes for the 5.10 release (the cctools-422 release): -- Changed strip_symtab() in strip.c to strip local symbols in sections that have - the S_ATTR_STRIP_SYMS section attribute in files linked for dyld. Radar bug - #2945659. - -Changes for the 5.10 release (the cctools-421 release): -- Fixed a bug in the redo_prebinding(3) API where the internal static variable - check_if_needed was not reset in reset_statics(). Radar bug #2933102. -- Picked up the changes to seg_addr_table(1) for the new -relayout_nonsplit - option. Radar bug #2935630. - -Changes for the 5.10 release (the cctools-420 release): -- Added the -M flag to libtool to passing through to ld(1). Radar bug #2935497. -- Changed what the needs_redo_prebinding() API and the redo_prebinding() API - (when the only_if_needed parameter is non-zero) returns for statically linked - executables. In this case needs_redo_prebinding() now returns NOT_PREBINDABLE - and redo_prebinding() returns REDO_PREBINDING_NOT_NEEDED. Radar bug #2934831. - -Changes for the 5.10 release (the cctools-417 release): -- Changed the Makefile to create both a -static compiled and a -dynamic - compiled libredo_prebinding.{dylib,a} pair. Radar bug #2922145. - -Changes for the 5.10 release (the cctools-416 release): -- Changed print_mach_symbols() in nm.c to also print "weak" for symbols with - the N_WEAK_DEF bit set. Removed the code to test for sections with the - S_ATTR_WEAK_DEFS attribute. Radar bug #2919646. -- Fixed a problem with redo_prebinding updating the LC_ID_DYLIB time_stamp for - archs that were missing. This is done in build_new_symbol_table() by setting - the new dont_update_LC_ID_DYLIB_time_stamp field. Radar bug #2914003. - -Changes for the 5.10 release (the cctools-415 release): -- Changed redo_prebinding(1) to detect when an executable was built with the - -prebind_all_twolevel_modules and then bind all twolevel modules on output. - Radar bug #2909518. -- Added pass the -ObjC flag from libtool to ld. - -Changes for the 5.10 release (the cctools-414 release): -- Changed print_mach_symbols() in nm.c to also print "weak" for symbols in a - section with the S_ATTR_WEAK_DEFS attribute. Radar bug #2898558. -- Changed seg_addr_table(1)'s default adresses for Mac OS X 10.2 to be - 0x8fe00000 not 0x7fe00000. Radar bug #2897418. -- Added the new routine check_for_extra_LC_PREBOUND_DYLIB() in redo_prebinding.c - and a call to it in process_arch(). This is done to match dyld's checking - for extra LC_PREBOUND_DYLIB commands an not use the prebinding. Radar bug - #2894021. -- Fixed the arguments to the fprintf() call on line 762 in redo_prebinding.c . - -Changes for the 5.10 release (the cctools-413 release): -- Changed seg_addr_table(1)'s default adresses for Mac OS X 10.2 to be - 0x7fe00000 not 0x7ffc0000. - -Changes for the 5.10 release (the cctools-412 release): -- Fixed a problem with the redo_prebinding(3) library routine when it is passed - zero for the slide_to_address parameter. The static variable dylib_vmslide - did not get reset in reset_statics() like it should. Radar bug #2882844. -- Changed seg_addr_table() to not cause an error when the project that builds - a library can't be found in the -update or -update_overlaps mode. This was - done by passing a new no_error_if_missing parameter to get_image_file_name() - which pass it down to get_symfile_for_dylib() and get_dstfile_for_dylib(). - Radar bug #2882324. -- Fixed a bug in strings(1) that was passing the process_non_objects to - ofile_process() as FALSE when it should have been TRUE. Radar bug #2868578. - -Changes for the 5.10 release (the cctools-411 release): -- Changed seg_addr_table(1)'s default adresses for Mac OS X 10.2 to be based on - the value MACOSX_DEPLOYMENT_TARGET. Also added the flag -allocate_flat - with the increasing or decreasing argument to allow the flat libraries to be - allocated in decreasing addresses. Radar bug #2848945. - -Changes for the 5.10 release (the cctools-406 release): -- Changed dependent_libs(3) to work for MH_BUNDLE type objects. Radar bug - #2862297. - -Changes for the 5.10 release (the cctools-405 release): -- Changed the implementation of the fix to strip below slightly. The code to - check if a local private extern was on the save list was moved ahead of - other checks in strip_symtab(). This is needed to avoid an error saying the - symbols names listed in save file was not in the object file. - -Changes for the 5.10 release (the cctools-404 release): -- Changed strip(1) to fix the problem with the fix to strip private externs - that were turned into statics which was Radar bug #2853161. This change - caused some private extern coalesced symbols used through indirect symbols - not to be saved. The fix was to copy the code to check for coalesced symbols - used by indirect symbols into the local symbol if case. Then as it turned out - some other non-coalesced local symbols were being used via indirect symbols - so the test for the symbol being coalesced was removed and only the test for - using it through an indirect symbol remains. The new Radar bug is 2860291. -- Changed weak_module to be static in redo_prebinding.c. Radar bug #2859919. - -Changes for the 5.10 release (the cctools-403 release): -- Changed the all target in the Makefile to also depend on lib_ofiles so - everything gets built by default. - -Changes for the 5.10 release (the cctools-402 release): -- Changed strip(1) to strip private externs that were turned into statics that - are in a dynamic library that are not referenced by a module other than where - the symbols is defined. Radar bug #2853161. - -Changes for the 5.10 release (the cctools-400 release): -- Changed the Makefile back to again use the -dependency-file with gcc. -- Changed seg_addr_table to not generate errors about table entries that do not - exist when -update or -update_overlapps are specified. Radar bug #2848667. -- Changed check_syms to not check dynamic shared library addresses. The code - in check_dylib() was ifdef'ed out. Radar bug #2847857. -- Fixed a bug in the change to strip that stripped coalesced symbols that are - not used with an indirect symbol table entry by default. Radar bug #2689894. - The problem is that the setting of output_indirect_symtab was not done for the - strip (not NMEDIT case) when it was moved up. Radar bug #2851013. -- Added the new throttle parameter to the redo_prebinding() API to allow it to - be used used for prebinding on demand to throttle back its I/O when running - in the back ground. Radar bug #2850642. -- Changed indr.c, strip.c, seg_hack and install_name_tool to add the new - throttle parameter to writeout(). Radar bug #2850642. - -Changes for the 5.10 release (the cctools-399 release): -- Changed seg_addr_table(1) in the -update or -update_overlapps case to not - check that non-zero addresses in the table match the addresses in the dynamic - library file. Radar bug #2841199. - -Changes for the 5.10 release (the cctools-398 release): -- Changed redo_prebinding to check if the library has already been loaded via - the dev,ino pair from stat(2). This change is in load_library() and the - fields dev,ino have been added to the lib struct. - -Changes for the 5.10 release (the cctools-397 release): -- Added the new allow_missing_architectures parameter to the - needs_redo_prebinding() API. Radar bug #2836068. -- Added the -multiply_defined_unused flag to libtool. Radar bug #2835152. - -Changes for the 5.10 release (the cctools-396 release): -- Changed seg_addr_table(1) to not use the SYMROOT file when -update is used. - Radar bug #2826945. -- Added passing the -weak_reference_mismatches flag from libtool to ld. -- Added the new allow_missing_architectures parameter to the redo_prebinding() - API in . Radar bug #2809673. - - In API redo_prebinding() the new allow_missing_architectures parameter gets - set into the static variable arch_cant_be_missing. - - In load_library() where it checks for missing architectures it tests the - static variable arch_cant_be_missing for non-zero and compares it to the - arch_flag.cputype. If set and it does not match load_library() was changed - to return FALSE (previously void) else it returns TRUE. - - In load_archs_libraries() and load_dependent_libraries() which calls - load_library() if load_library() returns FALSE these two calls also return - FALSE. - - Then in process_archs() if load_archs_libraries() and - load_dependent_libraries() return FALSE it calls to setup the symbolic info, - build a new symbol table and swap the symbol table for output before - returning. - - The routines setup_symbolic_info() and build_new_symbol_table() both had a - new boolean prameter missing_arch. And if missing_arch is passed as TRUE it - just setups up the info or builds the new symbol table without updating the - prebinding info. - -- Added the -f flag to ranlib so that it warns when it creates a fat archive - that ar(1) will not be able to operate on. This is used by ar(1) with the - -s option when it runs ranlib. Radar bug #2814831. -- Changed the use of N_WEAK_SYM to N_WEAK_REF in nm.c and redo_prebinding.c. -- Changed the Makefile to not use the -dependency-file with gcc as well as - mwccppc. - -Changes for the 5.10 release (the cctools-395 release): -- Fixed a bug in redo_prebinding that was checking for symbols being overridden - where it should have ignored two-level namespace libraries. Added checks in - check_dylibs_for_definition() and check_dylibs_for_reference(). - -Changes for the 5.10 release (the cctools-394 release): -- Fixed a bug in redo_prebinding that should not have been checking for symbols - being overridden in two-level namespace images. The change was in - process_arch() adding a check before the call to - check_for_dylib_override_symbols(). -- Changed strip to strip coalesced symbols that are not used with an indirect - symbol table entry by default. Radar bug #2689894. -- Updated redo_prebinding to support weak linking. Radar bug #2803414. - -Changes for the 5.10 release (the cctools-393 release): -- Changed nm(1)'s -m option to print "weak external" for symbols with the - N_WEAK_SYM bit set. -- Made the changes to support the LC_LOAD_WEAK_DYLIB varient of the - LC_LOAD_DYLIB load command. The following files were effected check_hints.c, - install_name_tool.c, nm.c, redo_prebinding.c and segedit.c. - - Note: the changes to redo_prebinding.c to support redoing the prebinding when - a weak library is missing or a weak symbol is missing is not done yet. - -Changes for the 5.10 release (the cctools-392 release): -- Changed the calls to ofile_process() in size.c, strings.c, nm.c and - kern_tool.c to pass TRUE for the new use_member_syntax parameter. Radar bug - #2730127. -- Changed the calls to ofile_process() in checksyms.c, cmpdylib.c, - seg_addr_table.c and check_dylib.c to pass FALSE for the new use_member_syntax - parameter. Radar bug #2730127. - -Changes for the 5.10 release (the cctools-390 release): -- Added the command install_name_tool(1). -- Fixed some bugs in the update_load_commands() routine of redo_prebinding.c . - The first was the missing check of the section flags against S_ZEROFILL when - determining the low_fileoff. The others where in not resetting all of the - pointers into the load_commands at the end of the routine. - -Changes for the 5.10 release (the cctools-389 release): -- Updated the inout.c example tool to work correctly with all the tables of - a dynamic library. -- Added the -prebind_all_twolevel_modules and the -headerpad_max_install_names - options to libtool. -- Fixed a bug with the checking of the LIBRARY_ORDINAL in redo_prebinding that - was causing a crash when SELF_LIBRARY_ORDINAL (0) was used in a malformed - executable. Radar bug #2787021. - -Changes for the 5.10 release (the cctools-387 release): -- Changed check_dylib to not check the -install_name argument of the dylib if - the dylib starts with @executable_path. -- Added the -seg_addr_table_filename option to libtool, - redo_prebinding, checksyms and check_dylib. For check_dylib this flag is - required. -- Fixed a grammatical error in redo_prebinding.c where "overridden" should have - been used where "overridded" was used. Radar bug #2764926. - -Changes for the 5.10 release (the cctools-386 release): -- Changed the breakout() calls in strip.c, indr.c and seg_hack.c to pass FALSE - as the value for the new calculate_input_prebind_cksum parameter and always - set the prebind checksum to zero (if any) on output. -- Added the -z option to redo_prebinding(1) to zero out the prebind check sum. -- Changed all the breakout() calls in redo_prebinding.c to pass the appropate - value for the new calculate_input_prebind_cksum parameter. - -Changes for the 5.10 release (the cctools-385 release): -- Fixed a bug in the parsing of the -segs_read_only_addr and - -segs_read_write_addr options to seg_addr_table.c that was missing a leading - '-'. -- Changed redo_prebinding(1) to add the -seg_addr_table option to allow it to - relocate a dynamic library to a new prefered address. Many changes to the - code were made to support this. Radar bug #2575205 and #2729976. - - Added the routine object_file_type(). - - Added the only_if_needed boolean parameter to the redo_prebinding(3) library. - - Changed the return type of the redo_prebinding(3) library API to be an enum. - - Removed the comment about the slide_to_address parameter of the - redo_prebinding(3) library API not being supported. - - Added the expected_address parameter to the needs_redo_prebinding(3) library - API. - - Changed libredo_prebinding.a from an object file to an archive. - -Changes for the 5.9 release (the cctools-380 release): -- Added the -twolevel_namespace_hints option to libtool. Radar bug #2735266. - -Changes for the 5.9 release (the cctools-379 release): -- Fixed pagestuff(1) to know about the hints table. - -Changes for the 5.9 release (the cctools-372 release): -- Picked up the changes to seg_addr_table(1) for the new -update_overlaps - option. - -Changes for the 5.9 release (the cctools-371 release): -- Fixed "uptodate" to be "up to date" in redo_prebinding.c. Radar bug #2711451. -- Fixed a bug in redo_prebinding(1) that was not testing the value of arch_hints - for NULL before using it in build_new_symbol_table() in redo_prebinding.c - before using it. So for images without hints it would crash. - -Changes for the 5.9 release (the cctools-370 release): -- Added support for updating the hints table to redo_prebinding. - - Changed swap_arch_for_output() for swapping hints on output. - - Change build_new_symbol_table() in redo_prebinding.c to also update - the hints table with its call to lookup_symbol(). Changed the various - lookup_symbol*() routines to take a pointer to a isub_image and itoc to - fill in if not NULL. - - Changed build_new_symbol_table() to account for hints in the sym_info_size. - - Added variables arch_hints and arch_nhints to redo_prebinding.c and cleared - them in reset_statics() and set and swapped them in setup_symbolic_info(). - -- Changed strip_object() in strip.c to set the object's output_hints field and - to reset the object's hints_cmd->offset field. Also to adjust the - input_sym_info_size and output_sym_info_size fields with the size of the - hints. -- Changed build_new_symbol_table() in redo_prebinding.c to know about the - hints table as in strip above. -- Changed translate_dylib() in indr.c to know about INDIRECT_SYMBOL_LOCAL and - INDIRECT_SYMBOL_ABS. And to know about prebound undefined symbols (N_PBUD). - Also made the same changes as in strip noted above for hints. - -Changes for the 5.9 release (the cctools-369.3 release): -- Fixed a bug in check_symbolic_info_tables() in redo_prebinding.c in its - checking for bad LIBRARY_ORDINAL that needed to make sure the symbol was not - a N_STAB before checking it. - -Changes for the 5.9 release (the cctools-369 release): -- Fixed redo_prebinding which had the same problem as dyld that was fixed in - cctools-366 with undefined symbol references from two-level images where - the definition of the symbol is in a sub-framework of a flat namespace - umbrella framework that would come up undefined. The fixes were in - load_archs_libraries() and load_dependent_libraries() for counting the - dependent libraries no longer being conditional on the image being - MH_TWOLEVEL. And in load_dependent_libraries() so the call to - setup_sub_images() is also longer conditional on if the image is MH_TWOLEVEL. - -Changes for the 5.9 release (the cctools-367 release): -- Added support for sub-libraries like sub-umbrellas to redo_prebinding. - Radar bug #2697458. - - Added the following field to the lib struct: - char *library_name; - and changed the of the following field from umbrella_name_size to: - unsigned long name_size; - for use both by umbrella_name and library_name. The code was changed to use - the new field name. - - Changed load_archs_libraries() and load_library() to set the library_name - field from the return value of guess_short_name(). - - Changed print_two_level_info() to print the library_name in the various lists. - - Changed setup_sub_images()'s header comments to include sub-libraries and - added code to deal with sub-libraries like sub-umbrellas. -- Added the -sub_library flag to libtool. Radar bug #2697458. - -Changes for the 5.9 release (the cctools-363 release): -- Changed libtool so that if -arch_only is specified with a specific cpusubtype - other than the family cpusubtype it does not use -force_cpusubtype_ALL and - passes the -arch_only argument to ld(1) as the -arch flag so that the output - is to be tagged with that cpusubtype. - -Changes for the 5.9 release (the cctools-362 release): -- Fixed a bug in redo_prebinding.c in main() where the mask it uses to get - the mode from the stat mode should be 07777 not 06777 so the sticky bit - gets set. -- Added progname to file.c as the changes to libstuff needs it (this is the - Openstep version of file). -- Fixed the same bug in load_dependent_libraries() as in dyld in - redo_prebinding.c that was only calling setup_umbrella_images() if the library - was a MH_TWOLEVEL. This needed to call setup_umbrella_images() for all - libraries as it is possible that a sub-framework of an umbrella library is - flat and the umbrella library is two-level. In that case other images could - have two-level namespace references recorded to the umbrella library for - symbols defined in the flat sub-framework. - -Changes for the 5.9 release (the cctools-360 release): -- Added the -e option to redo_prebinding(1) to take the executable_path. -- Changed the code in redo_prebinding to be ifdef'ed with LIBRARY_API for the - API in Radar bug #2604014. - -Changes for the 5.9 release (the cctools-359 release): -- Changed libtool(1) to pass -multiply_defined to the linker. -- Made a great number of changes to redo_prebinding(1) so it would support - two-level namespace images. -- Fixed a bug in redo_prebinding(1) that would overwrite the output_file with - a partially written file if the filesystem fills up. Radar bug #2639352. -- Added code in nm.c to deal with the library ordinal being EXECUTABLE_ORDINAL. -- Changed checksyms(1) to open the default segment address table if none is - specified via a -seg_addr_table argument. -- Added -Wno-long-double to shutup the compiler for - . - -Changes for the 5.8 release (the cctools-357 release): -- Added support for the CPU_SUBTYPE_POWERPC_7450 in lipo.c. Radar bug #2599869. -- Fixed a bug in seg_addr_table(1) when the -update option was used that it - did not preserve the non-zero addresses in the table. Instead it changed the - non-zero entries to the values in the libraries were built with. Radar bug - #2575214. - -Changes for the 5.8 release (the cctools-356 release): -- Changed the algorithm in seg_addr_table(1) for split libraries to add in the - rounding factor (0x10000) before calling round(). - -Changes for the 5.8 release (the cctools-355 release): -- Fixed a bug in strip that needed to save local symbols that were private - extern symbols that were in COALESCED sections. Radar bug #2584111. - -Changes for the 5.8 release (the cctools-354 release): -- Fixed a bug in libtool(1) when using -filelist that did not allocate the - correct amount of memory due to a '*' needing to be a '+' on lines 388 and - on 390. - -Changes for the 5.8 release (the cctools-352 release): -- Fixed yet another bug with nmedit(1) that did not set the fields nlocalsym and - nextdefsym to zero before incrementing them. - -Changes for the 5.8 release (the cctools-351 release): -- Fixed a bug in nmedit(1) that did not swap the correct module table. -- Fixed a bug with nm(1) dealing with a dynamic library that had bad iextdefsym - or nextdefsym fields of a dylib_module which caused it to crash. - -Changes for the 5.8 release (the cctools-350 release): -- Fixed a bug in seg_addr_table(1) where the -disablewarnings flag did not - disable the split overlap messages. - -Changes for the 5.8 release (the cctools-349 release): -- Added passing -Y through from libtool to ld. - -Changes for the 5.8 release (the cctools-348 release): -- Changed nmedit to remove duplicate names in the -s file so it does not - later complain that a symbol did not appear in the input file. - -Changes for the 5.8 release (the cctools-347 release): -- Fixed a bug in the handing of -final_output on the command line of libtool. - -Changes for the 5.8 release (the cctools-346 release): -- Added the -final_output flag to libtool to pass along to ld(1). - -Changes for the 5.8 release (the cctools-345 release): -- Changed redo_prebinding -c so that it also checks the installed dynamic - library against the file it is running against for the correct time - stamp. Radar bug #2541232. -- Fixed a bug in redo_prebinding that did not correctly exit when an - executable's dependent libraries were out of date. Radar bug #2544407. -- Fixed a bug in redo_prebinding that did not correctly redo the relocation - for split libraries as it was not based on the -seg_read_write_address as it - should have been for split libraries. Radar bug #2544599. -- Fixed a bug in seg_addr_table(1) that caused it to crash as it was doing - a memset on a malloc()'ed memory larger than was allocated. Also fixed - a bug that was not allocating enough layout_info structs. Radar bug #2540744. - -Changes for the 5.8 release (the cctools-344 release): -- Changed nm(1) -m to print the name of the libraries undefined symbols are - bound from when MH_TWOLEVEL is in the header. Radar bug #2538835. - -Changes for the 5.8 release (the cctools-342 release): -- Added parsing the -flatname_space and -twolevel_namespace options and - -allowable_client option to libtool(1). Radar bug #2533649. -- Changed seg_addr_table(1) in its checking of sorted flat libraries for - overlaps so that when checking the next flat address to be assigned it checks - that the next address is also greater than the start of the as well as less - than the end of the region and that the region is not a fixed region. - Radar bug #2531831. - -Changes for the 5.8 release (the cctools-341 release): -- Changed setup_symbol_list() in strip.c to allocate and stuff in an extra - newline in the symbol list file so that files that end without a new line - work. Radar bug #2520711. -- Added the tool seg_hack to change the names of Mach-O segments for use by KLD. - Radar bug #2523649. -- Changed nmedit to not change global coalesced symbols into statics and changed - strip not not strip global coalesced symbols. Radar bug #2503670. - Also made a fix to this to because if a coalesced symbol were listed in the - -s file it complained that the symbol was not in the input. - -Changes for the 5.7 release (the cctools-337 release): -- Changed seg_addr_table(1) to use 0x70000000 as the default segs_read_only_addr - and 0x80000000 as the seg_read_write_addr. Also added two entries in - sorted_flat_layout_info so that next_flat_seg1addr() will step over these - areas. Radar bug #2496843. -- Added a check in edit_symtab() in strip.c (for nmedit) that checks to see - that the N_FUN name is not NULL. This prevents a error message about a - missing ':' in the stab name of a N_FUN when the name is NULL. The compiler - emits this as the end of the function stab. Radar bug #2495413. - -Changes for the 5.7 release (the cctools-336 release): -- Added code in libtool.c that did not place N_SECT symbols marked with the - attribute NO_TOC into the table of contents. Radar bug #2494286. - -Changes for the 5.7 release (the cctools-334 release): -- Changed checksyms(l) to not generate an error if a segment address table is - used and the library is not found in it. As the B&I tools will add it - automaticly. Also removed all checks for paths and use guess_short_name(). - Also changed guess_short_name()'s has_suffix argument to return a pointer - to the suffix so checksyms could check for "_debug". This effected - seg_addr_table(l)'s and ld(1)'s guess_short_name() call too. Radar bug - #2490411. -- Changed seg_addr_table(l) to not use the factor for allocating the size of - split libraries. Also added some checking so that only the first 128meg of - a 256meg split segment is allocated. Radar bug #2490413. -- Added the -run_init_lazily flag to libtool. Radar bug #2490396. - -Changes for the 5.7 release (the cctools-333 release): -- Fixed a bug introduced with the changes to strip.c to allow nmedit to work - on shared libraries. It produced bad output files for fat files as it was - free()'ing data structures to be written out. Radar bug #2484851. - -Changes for the 5.7 release (the cctools-332 release): -- Added the -disablewarnings flag to seg_addr_table(1). This flag is also - passed to the various routines used in libstuff (Radar bug #2482327). -- Fixed a bug in seg_addr_table(1) where -update did not ignore the fixed and - next entries which caused address assigned for -update to be very messed up - (Radar bug #2482327). -- Major changes to strip.c to allow nmedit to work on dynamic shared libraries. - Also fixes to nmedit so that the symbol table was in the right order after - symbols were change to statics. Other changes in dyld and ld are also needed - for this change (Radar bug #2420307). - -Changes for the 5.7 release (the cctools-330 release): -- Changed the call to netname_look_up() in check_for_ProjectBuilder() in - libtool.c to bootstrap_look_up() when __OPENSTEP__ and - __GONZO_BUNSEN_BEAKER__ is not defined (Radar bug #2473864). - -Changes for the 5.7 release (the cctools-329 release): -- Fixed a bug in the command line parsing of the strings command where if you - gave it any argument it would think there were also files listed on the - command line so it would never parse standard input if "strings -4 < file" - was used (Radar bug #2459126). -- Added code in seg_addr_table.c to not assign addresses over the maximum - intel user space address. Radar bug #2418080. -- Removed the core.c file from this directory since the new API to create a - task from a core file was added. Radar bug #2155790. -- Changed libtool to pass -whatsloaded to ld(1). Radar bug #2469803. -- Fixed a bug in seg_addr_table when in update mode an new flat entry with a - zero address in the table (and a non-matching address in the file) is to be - updated and there are existing entries with the same short name. To solve - this a new field current_entry was added to the layout_info struct for - sizes_and_addresses() to use. It is set to the current seg_addr_table entry - before calling ofile_process() which will call sizes_and_addresses(). Then - sizes_and_addresses() can tell if the current entry has a zero address not to - generate the warning message about the ofile not having the correct seg1addr. - Radar bug #2469876. -- Fixed a bug in seg_addr_table in sizes_and_addresses() where it was updating - the layout_info->seg1addr after it printed an error message that the seg1addr - did not match. That error message also did not print the architecture. This - problem then caused a later error message to think that the original file had - the wrong address. Radar bug #2469876. -- Fixed a bug in libtool/ranlib that did not deal with zero length archive - members that had long names and used 4.4BSD extended format #1. The code in - libtool in two places was subtracting the size of the name from the member - size which had already been done by the ofile routines. Radar bug #2460604. -- Changed checksyms(l) to allow debug symbols in libraries and frameworks with - _debug suffixes. Radar bug #2469760. -- Changed strip.c to allow '\r' as well as '\n' in the strip list file. Radar - bug #2458346. - -Changes for the 5.7 release (the cctools-327 release): -- Changed checksyms(l) to used "/AppleInternal" going forward and only use - "/Local" when __GONZO_BUNSEN_BEAKER__ is defined for older builds (DP3, PR2, - etc). - -Changes for the 5.6 release (the cctools-324 release): -- Fixed a bug in seg_addr_table(l) so that it checks all entries in the table - against all other entries for overlaps. -- Fixed a bug in seg_addr_table(l) so that -checkonly does not check entries - with 0 addresses. -- Fixed a bug in seg_addr_table(l) in its next_flat_seg1addr() not correctly - stepping over the fixed regions. -- Fixed a bug in seg_addr_table(l) in reporting the correct line in checking - for overlap with fixes regions (the have the same "install_name") so the new - routine search_seg_addr_table_for_fixed() was added. - -Changes for the 5.6 release (the cctools-323 release): -- Fixed a bug in redo_prebinding(1) that did not correctly mark the module with - the shared library initialization routine as linked in cases where the module - was not directly referenced. This could cause the shared library - initialization routine not to be called. Radar bug #2450931. -- Added passing -arch_errors_fatal from libtool(1) to ld(1). -- Changed the check_install_name(l) tool to be check_dylib(l) to preform - a series of checks on a dynamic library as per B&I's request. -- Changed seg_addr_table(1) to not fall back an try to open the install_name - if a -release option was specified. As this is the way B&I intends to use - the tool. Also added the -checkonly option. -- Removed the ifdef's that avoided calling find_dylib_in_root() as the bug - in there that was missing an fts_close() is fixed. - -Changes for the 5.6 release (the cctools-322 release): -- Added ifdef'ed for __SPACE__ and created a macro SYSTEM_LIBRARY in checksyms.c - in preparation for the directory changes. /System/Library changing to - /MacOSX/System. -- Created the check_install_name(l) tool for B&I to check the a dynamic library - is installed in its $(DSTROOT) in its -install_name. - -Changes for the 5.6 release (the cctools-321 release): -- Picked up Chris Kane's changes to checksyms(l) to not check for objcunique - sections. Radar bug #2448096. -- Added overlap checking to seg_addr_table(l) and support for fixed regions. - Currently there are bugs in fts(3) so its used is ifdef'ed out with - ifdef NO_BUGS_IN_FTS which means that the DSTROOT file is searched for but - not the SYMROOT file. - -Changes for the 5.6 release (the cctools-320 release): -- Fixed a bug in libtool to not passing -arch_multiple when fat files are in the - input files to ld when -arch_only is passed to libtool. -- Added the -dylib_file option to libtool. -- Added the -umbrella option to libtool. Radar bug #2443212. - -Changes for the 5.6 release (the cctools-319 release): -- Removed the check for execute bits in a dynamic library in checksyms(l). -- Added the -seg_addr_table option and the LD_SEG_ADDR_TABLE environment - variables as alternate ways to check the address of shared libraries in - checksyms(l). -- Created the seg_addr_table(1) program to layout and update a segment address - table for use when building dynamic libraries. - -Changes for the 5.5 release (the cctools-315 release): -- Removed the installing of the bom file as this has not been used since - NeXTstep 2.1. - -Changes for the 5.5 release (the cctools-314 release): -- Changed where nmedit gets installed from /usr/local/bin to /usr/bin. Radar - bug #2396595. - -Changes for the 5.5 release (the cctools-310 release): -- Added passing the -Sn, -Si, -S, -X flags from libtool to ld. - -Changes for the 5.5 release (the cctools-307 release): -- Added two private options for nm. -b name and -iN to print the N_BINCL symbols - from the 'name' include file starting at index N not printing the file#'s. - This was used to track down differences in stabs. Radar bug #2410704. -- Fixed a bug in nmedit(l) (and strip(1)) that did not process the -arch flags - as arch family flags. Radar bug #2405763. -- Added the the STAB types: N_BNSYM, N_ENSYM, N_BINCL, N_EINCL and N_EXCL to - the table in nm for printing. Radar bug #2410704. -- Added support for the CPU_SUBTYPE_POWERPC_7400 in lipo.c. Radar bug #2397523. - -Changes for the 5.4 release (the cctools-303 release): -- Changed libtool so that the message that about creating a library with an - empty table of contents is calling warning() not error() as it is a warning - message. Also added "define global symbols" to the end of the message "(no - object file members in the library define global symbols)". -- Changed a message in checksyms(l) to use "Build & Integration" and not - "release control". Radar bug #2377929. - -Changes the 5.4 release (the cctools-300 release): -- Fixed a bug in nmedit(1) when using -R and processing more than one - architecture it printed an error stating "more than one symbol" for a symbol - listed in the -R file appeared in the input file. Radar bug #2367598. -- Changed nmedit(l) to strip all arch's when no -arch flags are specified to - match the behavoir of strip(1). Radar bug #2367598. -- Added the "-init " argument to libtool to be passed through to - ld(1) for the dynamic shared library initialization routine symbol - -Changes the 5.4 release (the cctools-296 release): -- Added the -v (verification flag) to checksyms to print out a single line for - each type of error checksyms finds. Also added hacks #ifdef'ed - ALLOW_MACOSX_PR1_PATHS to allow all MacOS X PR1 paths. - -Changes the 5.3 release (the cctools-292 release): -- Added some braces to get rid of the warning message from the egcs compiler - "warning: suggest explicit braces to avoid ambiguous `else'". This was done - to cmpdylib.c . -- Changed the return type of main() in redo_prebinding.c, pagestuff.c, - dylib_pcsampler.c, cmpdylib.c, kern_tool.c, segedit.c, strip.c, indr.c, - checksyms.c, libtool.c, nm.c, strings.c, size.c and lipo.c from void to int to - remove a warning from the egcs compiler. Also changed the exit() calls at the - end to return()'s. - -Changes the 5.3 release (the cctools-290 release): -- Fixed a bug in nmedit in the code that was added to support the -p flag. - -Changes the 5.3 release (the cctools-289 release): -- Added the -p flag to nmedit to change symbols into private externs rather - than static. - -Changes the 5.3 release (the cctools-288 release): -- Changed nmedit(l) to change the indirect symbol table entries for global - symbols it makes static. The indirect symbols are changed to - INDIRECT_SYMBOL_LOCAL or INDIRECT_SYMBOL_ABS. This problem showed up in - using nmedit for the work around with the egcs compiler and C++ RTTI common - data in a dynamic shared library. -- Added passing -whyload through libtool to ld. -- Changed some type and casts to make strip.c compile with the MetroWerks - compiler. -- Changed the message printed when the environment variable RC_TRACE_ARCHIVES - is set from: "RC_TRACE_ARCHIVES archive_name" to: "[Logging for Build & - Integration] Used static archive: archive_name". Radar bug #2310273. - -Changes for the the 5.3 release (the cctools-285 release): -- Fixed a bug in libtool(1) that was not using NEXT_ROOT when set to expand - -l flags. -- Added printing a line like "RC_TRACE_ARCHIVES archive_name", where - archive_name is a archive being put into the output of libtool(1) -static. - This is done when the environment variable RC_TRACE_ARCHIVES is set. - Radar bug #2303376. -- Removed the #ifdef NeXT from atom.c . -- Fixed a bug in ranlib (aka libtool) where when dealing with multiple symbols - defined in the same members, it trys to only print each table of contents - entry once by marking the symbol by changing the sign on the ran_off field. - There were two missing casts on two comparisons because the ran_off is - unsigned. -- Fixed a bug in strip in strip_symtab() where when it was walking the reference - table looking for symbols not yet listed as saved it would added them to the - changes[] array without testing to see it it already added them to the - changes[] array. This happens because a symbol may be referenced by more the - one module in dynamic shared library. This showed up when the CoreGraphics - framework was stripped with the -s option and undefined symbols were not - expicitedly listed. This caused the code in strip to allocate more new - undefined symbols maps than it filled it. The extra maps were garbage and - caused the module table in the CoreGraphics to be updated wrong which caused - the static linker to generate the malformed object error: - ilocalsym field plus nlocalsym field of module table entry 1 past the - end of the symbol table - -Changes for the 5.3 release, MacOS X bring up (the cctools-282 release): -- Added libtool to the Metrowerks source target. -- Changed host_self() and task_self() to mach_host_self() and mach_task_self() - for MacOS X. Also included "stuff/openstep_mach.h" for macros to allow it - to still build on Openstep. Also changed ifdef's __SLICK__ to __OPENSTEP__. -- Ifdef'ed __MACH30__ make.defs for mach_port_t vs mach_port. Also ifdef'ed out - netname_look_up() call and #include for __MACH30__ in - libtool.c (these are not yet in the SDK). -- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. -- Added a few casts in places to get it to compile with the MetroWerks compiler - without -relax_pointers. -- Changed the Makefile to nolonger compile checksyms with -static. When linking - with -static the MetroWerks compiler uses -framework System which is not - leagal with ld(1) and -static. -- Changed arch_flag_processed = FALSE; to arch_flag_processed = NULL; in - translate_input() in indr.c so it would compile with the MetroWerks compiler. - -Changes for the 5.2 release (the cctools-281 release): -- Changed redo_prebinding to exit with a error code of 3 if the dependent - libraries are out of date. Radar bug #2259447. - -Changes for the 5.2 release (the cctools-280 release): -- Changed libtool to pass the -F and -L flags to objcunique. Radar bug #2257931. - -Changes for the 5.2 release (the cctools-276 release): -- The fix in cctools-275 was using the variable "changes" after it was free'ed. - Move the free() past the last use. - -Changes for the 5.2 release (the cctools-275 release): -- Made a fix to strip when stripping a dynamic shared library. If a symbol is - to be stripped and it was defined in a module and also referenced in another - module, it was correctly changed to an undefined symbol but incorrecly left - in the table of contents. Radar bug #2239280. - -Changes for the 5.2 release (the cctools-274 release): -- Added the -R option to nmedit to provide a list of symbols to turn into - static symbols. If -R is specified and no -s is specified all symbols except - those in the -R file are "saved" and not turned into static symbols. - Radar bug #2235926. -- Added the -R option to strip to provide a list of symbols to strip. Also - changed the list of symbols to allow comment lines starting with '#' and to - trim leading and trailing blanks. Radar bug #2235926. -- Removed uses of CPU_SUBTYPE_586SX in lipo.c and added support for the new - intel subtypes. Radar bug #2231830. - -Changes for the 5.2 release (the cctools-271 release): -- Fixed it so libtool -static would not warn about -L and -l flags as these - are valid flags with -static. - -Changes for the 5.2 release (the cctools-269 release): -- Backed off checking libtool -dynamic and -static flags as hard errors to - allow builds to work. - -Changes for the 5.2 release (the cctools-267 release): -- The -b flag for checksyms(l) is now the default to check for prebinding and - read_only_relocs. Radar bug #2227469. -- Fixed a bug in nm(1) with -o that did not print a ':' after the module name - and before the symbol name. Radar bug #2227852. -- Fixed a bug in libtool that incorrectly put -framework flags in ld flags and - not treat it like a file. This caused -l and -framework to get out of order. - Radar bug #2227863. -- Added the core program to test dyld debug intefaces from a core file. This - program is not built as part of the install target. It requires a - libdyld/debug.c compiled with -DCORE. -- Added code to checksyms to allow blank lines in the dylib table. Radar bug - #2227872. -- Added all the suport needed for the 4.4BSD extended format #1 to nm, size, - strip, indr, inout, redo_prebinding, checksyms and lipo. Radar bug #1670513. -- Added the -L and -T flags to libtools and ranlib to support or truncate long - archive names. Added all the suport needed for the 4.4BSD extended format #1 - for long names. The default is now -L (use long names). Radar bug #1670513. -- Make libtool -static treat flags for -dynamic as errors. Also cleaned up - and corrected other flag checking. Radar bug #2227885. - -Changes for the 5.1 release (the cctools-261 release): -- Updated lipo's printing of supported POWERPC subtypes. Radar bug #2213821. -- Fixed a bug in link_library_module() in redo_prebinding.c that did not check - if the symbol found that might be multiply defined was in a module that was - not in the UNLINKED state before saying it was multiply defined. - Radar bug #2213249. - -Changes for the 5.1 release (the cctools-260 release): -- Added -c to all the install commands in the Makefile. -- Added /Local/Library/Frameworks as a conventional path for frameworks. -- Changed "it's" to "its" in checksyms messages. - -Changes for the 5.1 release (the cctools-258 release): -- Changed checksyms to know about /usr/lib/java again. There are two sets of - java dylibs and this path should have not been removed. - -Changes for the 5.1 release (the cctools-257 release): -- Changed checksyms to reflect the new Java paths. Previously was /usr/lib/java - now is /System/Library/Frameworks/JavaVM.framework/Libraries . - -Changes for the 5.1 release (the cctools-256 release): -- Added /usr/lib/java as a conventional path for libraries in checksyms. - Radar bug #2005914. - -Changes for the 5.1 release (the cctools-253 release): -- Made checksyms check prebinding, read-only relocs and objcunique. Currently - enabled only when -b is specified. -- Fixed a bug in checksyms that was not correctly checking for N_FUN stabs. -- Changed the Makefile to only create the needed dst directories. -- Changed checksyms to match the new directory layout for Preimer. - -Changes for the 5.1 release (the cctools-249 release): -- Added the ppc relocation to redo_prebinding. -- Fixed a bug in redo_prebinding in update_load_commands() when an executable - had LC_PREBOUND_DYLIB commands for dylibs that it did not have LC_LOAD_DYLIB - commands (this was run into because of a bug in ld with $NEXT_ROOT set). The - fix is to toss all LC_PREBOUND_DYLIB except the ones that have matching - LC_LOAD_DYLIB commands. -- Changed redo_prebinding and libtool to look for objcunique in /usr/bin rather - in /bin. -- Fixed a bug where nm -n on Rhapsody did not sort correctly. The bug was in - the compare function that was returning 1 or 0 for less and greater when it - should have been 1 or -1. - -Changes for the 5.1 release (the cctools-247 release): -- Fixed a bug in libtool.c in check_sort_ranlibs() where the unsigned value - on lin 1952 was being checked for < 0. A cast to int was added. -- Added MKDIRS if code to the Makefile to build native on Rhapsody. -- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody - where tar does not. -- Changed the Makefile to install non-local binaries in /usr/bin for RC_OS - teflon and in /bin for RC_OS nextstep (Radar 1673496). -- Changed the code ifdef __TEFLON__ to ifndef __SLICK__ (where __TEFLON__ will - nolonger be defined for Rhapsody builds) so the default builds will be native - Rhapsody builds. The changes were to file.c, libtool.c, lipo.c and segedit.c. - -Changes for the 5.0 release (the cctools-245 release): -- Fixed symbolic links from /usr/bin/strip to ../../bin/strip - from /usr/bin/strings to ../../bin/strings - from /usr/bin/size to ../../bin/size - from /usr/bin/nm to ../../bin/nm - (Radar 1672088). - -Changes for the 5.0 release (the cctools-243 release): -- Added symbolic links from /usr/bin/strip to $(DSTROOT)/bin/strip - from /usr/bin/strings to $(DSTROOT)/bin/strings - from /usr/bin/size to $(DSTROOT)/bin/size - from /usr/bin/nm to $(DSTROOT)/bin/nm - (Radar 1672088). - -Changes for the 5.0 release (the cctools-240 release): -- Changed so that atom only gets installed for OS=nextstep because it used the - encumbered . - -Changes for the 5.0 release (the cctools-235 release): -- Added an ifdef(ppc) in four places to atom.c to remove some warnings. -- Replace the comments with the OpenBSD comments in nm.c, size.c and strings.c. -- Removed building ar and file when $(RC_OS) is "teflon". These commands will - are in there own directories one level up based on the OpenBSD versions. - -Changes for the 5.0 release (the cctools-224 release): -- Changed including to which uses unsigned long - instead of off_t (64 bits on Teflon). - -Changes for the 5.0 release (cctools-216 release): -- Changed building checksyms to link staticly. Still does not build in Teflon - as it needs -lc_static which is currently missing. - -Changes for the 5.0 release (cctools-215 release): -- Made a hack in the Makefile to not build checksyms for teflon because it needs - -lsys because RC wants it built to run on 3.3 machines. - -Changes for the 4.2 and 5.0 releases (cctools-213 and cctools-209.4 release): -- Added ignoring -pg to libtool. - -Changes for the 5.0 release (cctools-210 release): -- Changed m98k to ppc. - -Changes for the 4.2 and 4.1 patch releases (cctools-207 release): -- Added -noall_load and -all_load to libtool. The compiler driver with the - option -dynamiclib will call libtool with the -noall_load option by default. - This is to avoid pulling all of libcc_dynamic.a in which can't be done in - all cases as it could produce a undefined reference to __DTOR_LIST__. - -Changes for the 4.0 release (cctools-202 release): -- Changed libtool to ignore -g[gdb,codeview,stab][number] flags (bug #67597). - -Changes for the 4.0 release (cctools-199 release): -- Fixed a problem in redo_prebinding(1) with setting the file's owner and group - introduced in cctools-196 (bug #65646). - -Changes for the 4.0 release (cctools-197 release): -- Added -image_base flag to libtool as synonym for -seg1addr (bug #65273). - -Changes for the 4.0 release (cctools-196 release): -- Fixed a problem in redo_prebinding(1) which was not setting the file's owner - and group (bug #65137). - -Changes for the 4.0 release (cctools-192 release): -- Changed redo_prebinding(1) to only run /bin/objcunique when it redoes the - prebinding. This was causing /bin/objcunique to fail when run on non-Mach-O - files in checking modes (bug #63509). -- Changed redo_prebinding(1) to call chmod(2) to set back the original modes so - setuid and setgid bits get set (bug #63448). - -Changes for the 4.0 release (cctools-188 release): -- Fixed a bug in redo_prebinding where it did not correctly swap the fat files - it created. The call to swap_arch_for_output() was done only once and not - once per architecture in the fat file (bug #62267). -- Fixed a bug in lipo -extract where it would not extract anything except the - first architecture in the fat file (bug #62145). - -Changes for the 4.0 release (cctools-187 release): -- Added a check to checksyms to make sure dynamic libraries have some execute - bits set (bug #61511). -- Fixed a bug in redo_prebinding in the function update_load_commands() when - the load commands had to be rewritten the pointers to the load commands for - the symtab and dysymtab commands needed to be reset (bug #61735). -- Fixed the spelling of "compatibility" (was "compaiblity") in cmpdylib error - message (bug #61697). -- Fixed a bug in redo_prebinding in the function build_new_symbol_table() where - arch_nmodtab * sizeof(struct dylib_module *) + - should have been: - arch_nmodtab * sizeof(struct dylib_module) + - That is the size of the struct not the size of a pointer (bug #61735). -- Changed calling /bin/objcunique to always pass -prebind in redo_prebinding - and libtool (bug #61735). - -Changes for the 4.0 release (cctools-186 release): -- Added passing "-r root_dir" to /bin/objcunique in redo_prebinding. -- Removed the built in table to checksyms and use ~rc/Data/DylibTable by default - (bug #61427). -- Fixed a bug in nm(1) with the undocumented value difference option (-v) which - has to be used with -n and -s. The problem was the test for no selected - symbols needed to be moved to the outer if statement (bug #61341). - -Changes for the 4.0 release (cctools-185 release): -- Added running /bin/objcunique if -prebind or LD_PREBIND is set in libtool - (bug #61230). -- Fixed a bug in checksyms as it parsed out "/usr/lib" before - "/usr/lib/NextPrinter" so it thought the name of the libFaxD library was - "NextPrinter/libFaxD" not "libFaxD" as it should have been (bug #61231). -- Added table entries to checksyms for (bug #61231): - { 0x1f000000, "InterfaceBuilder" }, - { 0x20000000, "AppTest" }, - { 0x21000000, "libRK" }, - { 0x22000000, "libRKC" }, - { 0x23000000, "libcanna" }, -- Added the directory "/usr/canna/dylib" for libRK, libRKC, and libcanna - to checksyms (bug #61231). -- Made a hack to checksyms(l) that allows MH_DYLIB's and MH_FVMLIB's to have - stabs as long as it does not have N_FUN symbols (stabs for functions) - (bug #61231). -- Fixed a bug in redo_prebinding(1) which did not deal with indrect symbols - INDIRECT_SYMBOL_LOCAL which were local symbols that were striped (bug #61232). -- Fixed a bug in redo_prebinding(1) which did not return the correct status - if an input file was mallformed and fatal_arch() was called from checkout() - or breakout(). The fix was to copy in the fatal_arch.c code and change - the exit() call in fatal_arch to switch off check_for_non_prebound (-p) and - exit(0) or exit(2) otherwise (bug #61232). - -Changes for the 4.0 release (cctools-183 release): -- Added the -dylib_table argument to checksyms. -- Changed checksyms to default to arch all if no -arch's are specified. -- Finished the redo_prebinding command and added it to cctools (bug #60110). -- Added an entry in the checksyms table for EOControl at address 0x1e000000. - -Changes for the 4.0 release (cctools-182 release): -- Added an entry in the checksyms table for libFaxD at address 0x1d000000. - Added the directory /usr/lib/NextPrinter/ to be an allowed path. -- Added an entry in the checksyms table for libMallocDebug at address 0. - -Changes for the 4.0 release (cctools-181 release): -- Fixed a typo in the Makefile that made pagestuff from lipo.private.o - (bug #59715). - -Changes for the 4.0 release (cctools-176 release): -- Fixed a bug in checksyms that did not deal with profile suffixed dylibs. - Also added entries in the table for Message and libkeymap (bug #) -- Fixed a bug in strip in stripping objects with prebound undefined symbols - (bug #58405). - -Changes for the 4.0 release (cctools-175 release): -- Changed the Makefile to ld -r builds because private externs were causing - prebinding to fail because of overlap. - -Changes for the 4.0 release (cctools-173 release): -- Added passing -arch_multiple to ld from libtool when running for more than - one architecture. Also always pass -arch flag because even if the objects - are thin dylib1.o maybe fat or of a different architecture. -- Updated strip to know about prebound undefined symbols so it would strip - objects with such symbols correctly. - -Changes for the 4.0 release (cctools-172 release): -- Fixed a bug in nm that was not selecting prebound undefined symbols as - undefined symbols when -u was used. - -Changes for the 4.0 release (cctools-168 release): -- Wrote the program pagestuff to replace pageSymbols. -- Fixed a typo in lipo "architecure" changed to "architecture" (bug #55959). -- Change the version numbers of dynamic library to the form X[.Y[.Z]] to match - how next does versioning of it's projects. This effected libtool(1), ld(1), - otool(1), dyld, libstuff(version_number.c) and man pages for ld and libtool - bug #55627). In here the changes were in libtool.c . - -Changes for the 4.0 PR1 release (the cctools-166.9 and cctools-168 releases): -- Checksyms by default should have been non-verbose. The errors messages in - check_dylib() should have only been produced when the -d (detail) flag was - on (bug #55648). - -Changes for the 4.0 PR1 release (the cctools-166.8 and cctools-168 releases): -- Updated checksyms to know about NIInterface, EOAccess, EOInterface, NeXTApps - and NIAccess. As well as changed the /LocalLibrary/Frameworks/ path to - /NextLibrary/PrivateFrameworks/ (bug #55414). Also now build this -static. -- Fixed bug #55337 in libtool(1) that parsed -read_only_relocs as - -read-only-relocs. -- Fixed bug #55334 in checksyms(l) which did not check for the Versions - directory correctly because of a copy and paste error. Also all dylib errors - are now fatal. - -Changes for the 4.0 release (cctools-167 release): -- Fixed bug #53766 in file(1) which incorrectly reported some fat files - malformed. The bug was in type_buf() where it was looping the load commands - checking for non-stripped and the test to end the loop if looking past the - end of the buffer was in the wrong place. This caused the varaible ifile to - get trashed when the symbol_table command was swapped and then the reads on - that file descriptor failed. - -Changes for the 4.0 PR1 release (the cctools-166.1 and cctools-167 releases): -- Fixed a bug in libtool for creating static libraries that did not set the - toc time and mod time based on the time of the file system that the library - was created on. To do this it involved changing create_library() to record - where the ar_date's of the toc archive headers were and rewriting them after - the file was closed when it is first created using the mod time from the file - system (bug #52612). - -Changes for the 4.0 release (the cctools-165 release): -- Added passing -read-only-relocs through from libtool to ld. - -Changes for the 4.0 release (the cctools-164 release): -- Fixed a bug in nm when -o is used on a dynamic library it did not print the - name of the module on the line. - -Changes for the 4.0 release (the cctools-161 release): -- Added an undocumented -v flag to nm(1) to be used with -n and -s to print the - difference of the values of symbols. -- Changed Foundation's address in checksyms to 0x18000000. - -Changes for the 4.0 release (the cctools-160 release): -- Update checksyms for dylib checking: - checks names for these forms: - /NextLibrary/Frameworks/AppKit.framework/Versions/A/Appkit - /LocalLibrary/Frameworks/AppKit.framework/Versions/A/Appkit - /lib/libsys_s.A.dylib - checks for correct addresses - checks for compatibility and current version being set - Currently the error condition is commented out but the checking and printing - of the error is done. This is waiting on the corresponding changes in the - app Makefiles. - -Changes for the 4.0 release (the cctools-158 release): -- Changed the spelling of dynamicly to dynamically in file(1) (bug #51635). - -Changes for the 4.0 release (the cctools-156 release): -- Fixed a bug in indr introduced by fixing the bug in stripping objects compiled - with -dynamic. The indr code did not deal with -dynamic objects either and - had to be updated with what writeout() was doing when it had an object with - a dynamic symbol table command. - -Changes for the 4.0 release (the cctools-154 release): -- Fixed a bug in checksyms that did not ignore non-object files. The call to - ofile_process() had process_non_objects FALSE when it should have been TRUE. -- To fixed a bug in stripping .o files compiled dynamic. The test in - strip_object() needed to be changed to based on if there was a dynamic symbol - table command in the object not on if it had MH_DYLDLINK in the mach header. - Then the starting offset of the link edit info need to be based on the lowest - offset if there wasn't a seg link edit command. Also a change was made in - libstuff's writeout.c -- Wrote a first cut at cmpdylib that compares global symbols and version - numbers. -- Added support for stripping defined externals that appear as indirect symbol - table entries in non-lazy pointer sections. Strip uses the values - INDIRECT_SYMBOL_LOCAL and INDIRECT_SYMBOL_ABS to represent the symbols that - are defined that were stripped. The static link editor marks defined external - symbols in the n_desc field with REFERENCED_DYNAMICALLY and the new -r flag - saves these symbols. For executables that use the dynamic linker and are - stripped with no options the default is the same as -u -r. - saves these symbols. For executables that use the dynamic linker -- Picked up kern_tool. -- Added to nm(1) printing of [referenced dynamically] for REFERENCED_DYNAMICALLY - marked external symbols with -m. - -Changes for the 4.0 release (the cctools-152 release): -- Fixed a problem with indr for dylibs with symbols listed in the indr list - that are undefined in the library. In this case the undefined symbol does - not get it's name changed to include an '_'. -- Added -arch_only to libtool. - -Changes for the 4.0 release (the cctools-150 release): -- Added the -i option to strip(1) to ignore symbols in the -s file that are not - in the objects being stripped. -- Added -arch_indr to indr(l). -- Added passing -F and -framework ld(1) options through for libtool -dynamic. -- Changed how libtool -dynamic handles dependent dynamic shared libraries and - does not use the architectures contained in them to determine which - architectures are part of output. -- Changed checksyms to allow non-stab symbols in MH_DYLDLINK files. - -Changes for the 4.0 release (the cctools-149 release): -- Added passing the -filelist list[,dirname] option through to ld (bug #50779). - -Changes for the 4.0 release (the cctools-148 release): -- Added -extract_family to lipo to extract all architectures in that family. - It creates a thin or fat file (bug #47499). -- Removed the hack in checksyms to not check dylinker files now that the - dynamic linker can be installed stripped. - -Changes for the 4.0 release (the cctools-147 release): -- Fixed a bug strip -x -S when a private extern was present it was not treated - as a global. This worked with -x but not with both -S and -x. -- Fixed a bug in nm that did not print dylibs symbol tables of the a different - byte sex correctly. select_symbols() was causing double swapping if called - more than once. - -Changes for the 4.0 release (the cctools-146 release): -- Fixed a problem with the bug fix in strip that did not update relocation - entries correctly if there are paired relocation entries. The bug fix did - not acount for the relocation entry being a scattered relocation entry. This - problem was also in indr. - -Changes for the 4.0 release (the cctools-145 release): -- Fixed bugs in size, strings and checksyms when the dylib "flat" argument was - added it was switch. -- Fixed a bug in strip when striping a dylib and a defined symbol is being - stripped and changed into an undefined symbol the undefined symbols were not - sorted by name. -- Fixed a TODO in strip when attempting to strip a private extern symbol in a - dylib that had reference table entries to it. This is treated as an error as - the static link editor relocated to these symbols and they can't be stripped. -- Added support in indr(l) for dylibs. -- Fixed a bug in strip that did not update relocation entries correctly if there - are paired relocation entries. - -Changes for the 4.0 release (the cctools-143 release): -- Added support in nm for printing the symbols of dylib modules and a -f (flat) - switch for getting symbols as one Mach-O file. -- Added passing the "-U symbol", "-i_defined:_indr", "-undefined warning" flags - through libtool to ld. Also allowed no files if flags for sections from files - or indirect symbols are present. - -Changes for the 4.0 release (the cctools-141 release): -- Added the ld flag -no_arch_warnings for libtool -dynamic which prevents - warnings for files which don't have the correct architecture for the -arch - flag. -- Fixed the spelling of "compatibility" in the compatibility_version for dylibs. - -Changes for the 4.0 release (the cctools-140 release): -- Added MH_BUNDLE to file(1). - -Changes for the 4.0 release (the cctools-136 release): -- Fixed a bug in strip where with no options on dyld causes it to core dump. - The change was to strip_object() in the case of no options if the input file - has dynamic symbol table and local relocation entries keep those relocation - entries on output. - -Changes for the 4.0 release (the cctools-134 release): -- Fixed a bug in strip that showed up when striping a 3.2 object that did not - have the symbols in the 3.3 order. The problem was the relocation entries - did not get updated correctly because the saves[] array was not updated with - the output symbol index after the symbols were ordered. -- Fixed a bug in strip that did not update N_INDR symbols correctly because it - did not account for the string of the indirect symbol indexed by n_value. - This bug was introduced in cctools-127 when strip was changed to handle - objects with the dynamic symbol table information. So it is not in the - cctool-119 strip that is in the 3.2hp release (bug #44817). - -Changes for the 4.0 release (the cctools-133 release): -- Fixed Makefile to do the mig stuff for libtool in a read-only SRCROOT. -- Fixed a problem in strip for cross byte sex striping when the dynamic - symbol table info is present. In strip.c the problem was the new symbolic - tables were not swapped to the target byte sex. And in writeout.c in libstuff - the problem was that parts of the headers were used after they were swapped. - -Changes for the 4.0 release (the cctools-132 release): -- Made libtool(1) with -dynamic ProjectBuilder aware and send it doing - messages (part of bug #40745). - -Changes for the 4.0 release (the cctools-131 release): -- Changed strip to treat non-external private externs as global symbols and - save them with -x or in the -s list file. -- Added "(was a private external)" to nm -m's printing non-external private - externs. - -Changes for the 3.3 release (the cctools-129 release): -- Fixed a bug in strip where it was free()'ing the new_* data structures it - created. - -Changes for the 3.3 release (the cctools-128 release): -- Fixed a bug strip in strip_object() where it was using object->dyst->nextrel - without checking that object->dyst could be NULL. - -Changes for the 3.3 release (the cctools-127 release): -- Major changes to strip.c to allow it to operate on objects with the dynamic - symbol table layouts. strip(1) now operates on MH_DYLIB files. -- nmedit(l) works with objects with the dynamic symbol table layouts but does - not re-group globals turned into statics with local symbols. It also does - not operate on MH_DYLIB files. -- Fixed checksyms -r to not exit non-zero if there are no stabs. - -Changes for the 3.3 release (the cctools-126 release): -- Changed strip -s when processing an archive report errors in symbols - not in for each member but rather for the whole archive. - -Changes for the 3.3 release (the cctools-125 release): -- Added -force_cpusubtype_ALL for libtool's -dynamic execution of ld(1). - -Changes for the 3.3 release (the cctools-124 release): -- Added a temporary hack to checksyms(1) to not check MH_DYLINKER files. -- Added a temporary error message in segedit.c: "current limitation, can't - process files with LC_DYSYMTAB load command". -- Added a temporary error message in libstuff to check_object() in checkout.c - to print the error "current limitation, can't process files with LC_DYSYMTAB - load command" so that strip(1), nmedit(1) and indr(l) for now print a - reasonable message when such a file is used. -- Added -dynamic to libtool to allow building dynamic shared libraries. - -Changes for the 3.3 release (the cctools-119 release): -- Picked up the changes for lipo with respect to the sparc target. - -Changes for the 3.3 release (the cctools-118 release): -- Fixed a bug that crashed strip when doing a strip -S on a library and a member - had no symbol table command. The bug was in writeout.c in libstuff at line - 490 where it indirected thought the pointer to the symbol table command - without checking if it was NULL. - -Changes for the 3.3 release (the cctools-116 release): -- Fixed a bug in nmedit that cleared the N_EXT bit from N_INDR symbols which it - shouldn't have. - -Changes for the 3.3 release (the cctools-115 release): -- Fixed a bug in lipo(1) that did not preserve set uid, set gid and sticky text - file premision bits (bug #40266). - -Changes for the 3.3 release (the cctools-109 release): -- Fixed a bug in strip(1) when multiple files were listed to strip it would - fail with "can't create output file:**** (File exists)" where **** was blank - or it cored dumped. This was because the variable output_file was not - correcly reset to NULL after it was free'ed. The fix was to move the - free(output_file) into the else clause that also did the makestr() call and - also set output_file to NULL after the free(). This is in strip.c in - strip_file() at the end of the routine. - -Changes for the 3.3 release (the cctools-102 release): -- Integrated in the hppa support. -different misc/lipo.c (integrated for cctools-102) - Using cctoolshppa-37. Has hppa cpu stuff in it. -different misc/nm.c (integrated for cctools-102) - Using cctoolshppa-37. Only comment typo change. - -Changes for the 3.3 release (the cctools-100 release): -- First major round of changes for the new shlib stuff. - 1) In nm support for .private_extern directive with -m to print - "private external". -- Fixed a bug where strip with the -S and -x ignored -x (bug #36206) -- Added the "-o output" option to strip (bug #36252) - -Changes for the 3.1 release (the cctools-22 release): -- Changed file to print out architecture for Mach-O file that were not fat and - changed lipo -i to print architectures on one line (bug #31882). -- Added printing for these (bug #32553): - { "any", CPU_TYPE_ANY, CPU_SUBTYPE_MULTIPLE }, - { "little", CPU_TYPE_ANY, CPU_SUBTYPE_LITTLE_ENDIAN }, - { "big", CPU_TYPE_ANY, CPU_SUBTYPE_BIG_ENDIAN }, - -Changes for the 3.1 release (the cctools-21 release): -- Changed in lipo when "-arch i386 a.out" was used by the compiler and a.out - turns out to be an i486 subtype lipo treated this as a hard error. A safe - fix to this was made to remove the cpusubtype compare in check_arch() which - matches what it does for archives. - -Changes for the 3.1 release (the cctools-20 release): -- Put back -O in the Makefile (previously was removed because of m88k builds -O - could't be used on lipo.c because of a bug, this is now a non-issue). -- Added cross bytesex support for segedit(1) (still no fat support). - -Changes for the 3.1 release (the cctools-17 release): -- Change made to strip to only generate a warning message when it encounters a - non-object file an not stop processing other files (bug #23144). - -Changes for the 3.1 release (the cctools-16 release): -- Fixed a bug in libtool when stat_buf.st_gid is a negitive value it was casted - to an unsigned int and sprintf()'ed with %o into a field that was expected to - have only enough characters for a short (not a sign extended short). The fix - was to cast to a unsigned short (bug #30995). - -Changes for the 3.1 release (the cctools-14 release): -- Removed the archive checking of subtype in check_archive() for lipo. - -Changes for the 3.1 release (the cctools-13 release): -- Added the m98k (PowerPC) architecture (lipo only change). - -Changes for the 3.1 release (the cctools-10 release): -- Changed the way the date is set on the output file when creating the output - file with -c to only set the it to the oldest input date when an input file - has an archive in it. -- Changed the handling of the cpusubtypes to support this design: - The design allows each architecture family (m68k, m88k, i386) to have a - cpusubtype that will run on all implementations of that architecture and - have cpusubtypes that will run only on specific implementations of an - architecture. The design also gives the programmer the option to force the - cpusubtype indicating all implementations (at build time with a flag) when - using instructions that are implementation specific leaving it up to the - program to runtime select the correct code to execute. - The library creation tools (libtool and ranlib) operation in this design: - When a library creation tool creates libraries objects of the same - cputype and differing cpusubtypes it will create at most one library for - each cputype and not a separate library in a fat file for each of the unique - cputype and cpusubtype pairs. The resulting cpusubtype for each library - will be the _ALL cpusubtype for that cputype. The goal is the library - implementor should be strongly encouraged to create one library that - chooses optimum code to run at run time rather than at link time. - -Changes for the 3.1 release (the cctools-9 release): -- Added to lipo when the -info or -detailed_info is specified printing of - architecture type for non-fat files (bug #29465). - -Changes for the 3.1 release (the cctools-8 release): -- Changed the default for strip when no -arch flag is present to strip all - archs (demanded by the NRW group). -- Removed ebadexec as the OS group has taken it over. -- Changed the checking in add_member() to only look at the cputype and not at - both the cputype and cpusubtype (this will change as the correct handling of - the cpusubtype is implemented). - -Changes for the 3.1 release (the cctools-6 release): -- Moved segedit(1) from misc3.0 directory to here (misc) and added error - recognition for fat files and cross bytesex Mach-O files (and cleaned up - -Wall warning messages). -- Moved ebadexec(1) from misc3.0 directory to here (misc) and added error - recognition for fat files (and cleaned up -Wall warning messages). -- Moved atom(1) from misc3.0 directory to here (misc) and cleaned up -Wall - warning messages. -- Moved ar(1) from misc3.0 directory to here (misc) and added error recognition - for fat files (and cleaned up -Wall warning messages). -- Added fat and cross bytesex support for file(1). -- Fixed a bug in strip(l) that did not round the size of the string table to - a multiple of 4 bytes. This caused the object file to have odd sizes in some - cases and produce trashed archives. - -Changes for the 3.1 release (the cctools-5 release): -- Created a new version of indr(l), strip(1) and nmedit(l) that handles fat - files and cross byte sex. The new strip(1) handles libraries and does not - treat already stripped objects as errors. -- Fixed a bug in libtool/ranlib that caused it to create the library even when - there were errors. This is no longer done. If there is an error then the - library is not created (or the table of contents is not recreated). -- Fixed a bug that caused problems in ranlib when an archive with a that - contained both fat objects with multiple archives and non-object files was - given as input. The "correct" thing to do in this case in not known (which - architecture archive the non-object file is to reside in in the output). So - this case is flagged as an error. - -Changes for the 3.1 release (the cctools-4 release): -- Changed the arch name of ix86 to i386 in lipo.c -- Fixed a bug in libtool that caused it to crash when sprintf() was used and - placed it's trailing '\0' past the end of the buffer. - -Changes for the 3.1 release (the cctools-3 release): -- Changed CPU_TYPE_I80x86 to CPU_TYPE_I386 in lipo.c - -Changes for the 3.0 release (the -56 compiler release): -- Changed print_argstrings() in otool.c to handle a core files that have more - than just one '\0' after the long 0 on the top of the stack (bug #19645). - -Changes for the 3.0 release (the -52 compiler release): -- Added LC_PREPAGE. Just the string "LC_PREPAGE" and the cmdsize printed in - otool. -- Fixed a bug where libtool was not setting the S_IFREG bits in the toc_mode. - -Changes for the 3.0 release (the -53 compiler release): -- Changed STACK_ADDR to USRSTACK from . - -Changes for the 3.0 release (the -51 compiler release): -- Changed otool to print the m88k thread flavors for te new thread_status.h. -- Changed otool when looping through archives so not to complain when getting - a short read on an archive header when an archive was passed to 4 bytes and - the extra 2 bytes of padding was read as an archive header. - -Changes for the 3.0 release (the -50 compiler release): -- Changed the instructions f[sd]sqrtx for operands FPm,FPn and FPm to f[sd]sqrt - (without the trailing 'x'). This was just wrong (but the moto opcode is - inconsistant with all others in this case). -- Added an nm(1) that knows about fat files. - -Changes for the 3.0 release (the -49 compiler release): -- Changed where the 3.1 tools get installed, they now get installed in - /usr/local/bin3.1 with there usual names (no 3.1 suffix). -- Fixed the printing of operands for the i860 to use external relocation - entries correctly. -- Added the LC_FVMFILE to otool. -- Changed the Makefile to meet the RC api. -- Set this directory up for the 3.1 release (fat tools and 88k and ix86 tools). +To Do: +- Add the -prebind_allow_overlap and -prebind_all_two_level_modules to libtool + see Radar bug 3417137. diff --git a/cctools/otool/notes b/cctools/otool/notes dissimilarity index 97% index c3ccfd1..d556e5a 100644 --- a/cctools/otool/notes +++ b/cctools/otool/notes @@ -1,1295 +1,34 @@ -TODO: -- Change pad in PPC_THREAD_STATE to vrsave. Print the altivec state. -- HPPA, bring the private version of mach/hppa/thread_status.h in sync with - the kernel header and change ofile_print.c to recognize new thread states. - -Changes for the 5.26 release (the cctools-750 release): -- Changed so that armv7 defaults to printing in thumb mode. Moved in_thumb - boolean to a global in arm_disasm.[ch] and set it to TRUE in main.c if the - binary is armv7. Radar bug 6651124. -- Fixed a problem with print_objc_segment() in print_objc.c that was incorrectly - using sizeof(void *) when it should have been using sizeof(uint32_t). - Radar bug #6652270. -- Updated ofile_print.c for the places it was missing code for - S_16BYTE_LITERALS. Radar bug #5947957. -- Fixed the x86_64 disassembly of with and SIB byte when mode is 0 and base is 5 - and ss is not zero so that it does not print a base register. Radar bug - #6533811 - -Changes for the 5.26 release (the cctools-749 release): -- Fixed the printing of Objective-C meta data from 64-bit object files. So that - every "dereference" of a pointer looks for a relocation entry. Also added - the -V option to print the symbol names from the relocation entries. - Radar bug #6549235. - -Changes for the 5.26 release (the cctools-737 release): -- Changed arm_r_types[] for entry 7 to T_BR32 in ofile_print.c for the new - ARM_THUMB_32BIT_BRANCH relocation type. Radar bug #6511482. -- In print_insn() in arm_disasm.c removed the code at the end to check for - status of running into the end of the section's memory and returning a -1 - for the size of bytes it disassembled (as that caused it to loop). Radar - bug #6504790. - -Changes for the 5.26 release (the cctools-733 release): -- In arm_dis.c, updated thumb ldmia instruction to handle the case where Rn is - in the register list and thus shouldn't be updated. Radar bug #6394340. - -Changes for the 5.26 release (the cctools-725 release): -- Changed print_library_toc() in ofile_print.c to set toc_byte_sex to the - host_byte_sex if it is passed as UNKNOWN_BYTE_SEX as a better guess. - Radar bug #6303685. -- Added support for new compressed LINKEDIT information. Radar bug #6232822. - - Changed otool -lv to print out dyld_info command in ofile_print.[ch] . - -Changes for the 5.26 release (the cctools-724 release): -- Updated print_mach_header() in ofile_print.c to print the MH_KEXT_BUNDLE - file type and the MH_DEAD_STRIPPABLE_DYLIB flag. Radar bug #6272534. - -Changes for the 5.26 release (the cctools-722 release): -- Changed print_ivar_list_t() in both print_objc2_32bit.c and - print_objc2_64bit.c to print the pointer value for ivar offsets in hex and - dereference that pointer and print the real offset as well. Radar bug - #5733291. - -Changes for the 5.26 release (the cctools-715 release): -- Fixed problems with the printing of the Objective-C meta data in print_objc.c - where if an object file has a non-zero sized section from the __OBJC segment - at address zero it will think NULL pointer feilds point to valid data. - The fixes were to the get_* routines to check the addr parameter to see it it - has the value of zero and if so return FALSE. Also a few checks for lists - like ivars being past the end of a section needed a break not a continue to - terminate the loop. Radar bug #6164922. - -Changes for the 5.26 release (the cctools-714 release): -- Added the missing stuff for arm in print_arch() and print_cputype() in - ofile_print.c. Radar bug #6155212. - -Changes for the 5.26 release (the cctools-712 release): -- Picked up fix to otool(1) -Lv when running on 64-bit hosts and calling - ctime() in print_libraries(). Radar bug #6107717. -- Picked up fix to otool(1) -ov when running on 64-bit hosts in - print_objc_segment() in print_objc.c when trying to print the Category - Definition count where it was using sizeof(void *) which should have been - sizeof(uint32_t). Radar bug #6107717. -- Fixed another integer overflow problems in print_reloc() in ofile_print.c - Radar bug #5796857. - -Changes for the 5.26 release (the cctools-708 release): -- Fixed integer overflows problems in ofile_print.c . Radar bug #5796857. - -Changes for the 5.26 release (the cctools-705 release): -- Ported to work on 64-bit hosts. Radar bug #6022298. - -Changes for the 5.26 release (the cctools-701 release): -- Added printing the meta class for Objective-C 2 to both 32bit and 64bit - printing. Radar bug #5909952. - -Changes for the 5.26 release (the cctools-700 release): -- Fix section printf format strings in print_objc2_64bit.c to limit segment - and section string lengths at 16 characters. Radar bug #5912294. - -Changes for the 5.26 release (the cctools-699 release): -- Added support for armv7 disassembly. Radar bug #5874064. - - Removed the old arm-opc.h header and from the Makefile. - - Ported the GNU binutils version of src/opcodes/arm-dis.c into arm_disasm.c - that supports armv7. - -Changes for the 5.25 release (the cctools-693 release): -- Added support for printing the objc 2.0 metadata in 32-bit Mach-O files. - Radar bug #5739542. - - Moved print_objc2.c to print_objc2_64bit.c and changed print_objc2() to - print_objc2_64bit() - - Copied print_objc2_64bit.c to print_objc2_32bit.c and changed every where - a 64-bit, pointer, name or value was used to used a 32-bit version. - - In print_objc2_32bit.c removed the reserved field from the class_ro_t - as it is a 64-bit only padding field. -- Made a change in print_indirect_symbols() in ofile_print.c so it does not get - spurious error about a load command extending past the end of the load - commands. Radar bug #5728302. -- Made a change in print_indirect_symbols() in ofile_print.c to print ABSOLUTE - for cputype CPU_TYPE_I386 and S_SYMBOL_STUBS sections marked with just - INDIRECT_SYMBOL_ABS. Radar bug #5829053. - -Changes for the 5.25 release (the cctools-691 release): -- Added support for the LC_ENCRYPTION_INFO load command. Radar bug #5811994. - - Added print_encryption_info_command() in ofile_print.[ch] . - - Added code in print_loadcmds() in ofile_print.c for LC_ENCRYPTION_INFO. - -Changes for the 5.25 release (the cctools-690 release): -- Changed the Makefile to added -DEFI_SUPPORT if EFITOOLS is not via the top - level Makefile. And #ifdef'ed EFI_SUPPORT the call to - print_coff_reloc_section() in main.c .Radar bug #5826370. - -Changes for the 5.25 release (the cctools-688 release): -- Maded changes for the new LC_LAZY_LOAD_DYLIB load command. Radar bug #5760930. - - Added an test for the S_LAZY_DYLIB_SYMBOL_POINTERS section type in - processor() in main.c . - - In ofile_print.c these changes were made: - - print_loadcmds() had a case for LC_LAZY_LOAD_DYLIB added. - - print_loadcmds() had a case for LC_LAZY_LOAD_DYLIB added and a test of - LC_LAZY_LOAD_DYLIB to print the string "LC_LAZY_LOAD_DYLIB". - - print_section() had a test for S_LAZY_DYLIB_SYMBOL_POINTERS to print that - as a string and a test for printing "(index into indirect symbol table)" - after the reserved1 field. - - print_dylib_command() had a test for LC_LAZY_LOAD_DYLIB to print that as - a string. - - print_indirect_symbols() had a test for the S_NON_LAZY_SYMBOL_POINTERS - section type added. - - print_hints() had a case for LC_LAZY_LOAD_DYLIB added. - - guess_indirect_symbol() had a test for the S_NON_LAZY_SYMBOL_POINTERS - section type added in two places. - -Changes for the 5.25 release (the cctools-683 release): -- Changed the Makefile to use OBJC_ABI for -fobjc-abi-version=1 since this is - not supported on Tiger. - -Changes for the 5.25 release (the cctools-682 release): -- Added -fobjc-abi-version=1 to the Makefile rule for building print_objc.o - Since we're trying to get the objective-C 1.0 definitions and not the 2.0 - definitions, this avoids problems with platforms where 2.0 is the default. - Radar bug #5725807. - -Changes for the 5.25 release (the cctools-681 release): -- Removed all __OPEN_SOURCE__ references in Makefile, notes, arm_disasm.c, - main.c, ofile_print.c and otool.h . -- Fixed a bug in disassembly for the i386 SSE4.1 instruction insertps - where it had the second parameter as a general register not a xmm register. - The change was in i386_disam.c in the table entry for insertps to use - SSE4i not SSE4ifm. Radar bug #5650346. - -Changes for the 5.25 release (the cctools-677 release): -- Changed the Makefile to not use -Wno-long-double and -no-cpp-precomp . - Radar bug #5563553. - -Changes for the 5.25 release (the cctools-676 release): -- Added printing S_DTRACE_DOF section type to print_section() in ofile_print.c. -- Fixed a problem with not all the i386 bad opcode bytes being printed. The - fix was at the end of i386_disassemble() in i386_disasm.c for printing the - bad opcode byte to loop through all the length bytes it tried to disassemble - before it ran into the bad opcode. Radar bug #4760658. -- Fixed a problem with warning message being printed for zero length sections - appearing at the end of object files that should have not been printed. The - test in get_sect_info() in main.c was testing for >= and not > against the - object size. Radar bug #4455994. -- Fixed the problems with x86_64 disassembly in printing the displacements or - their target symbols. The problem was the code in displacement() in - i386_disasm.c did not take into account that instructions with and without - relocation entries are assembled differently than all other Mach-O files. - For x86_64 if it has a relocation entry the then displacement is an offset - even if the symbol is defined. If not the displacement plus the pc is the - target address. As part of the fix for this the addr and sect_addr needed - to be passed as 64-bit value to i386_disassemble() and displacement(). Then - the fix in displacement() was to construct a 64-bit target guess_addr if there - was no relocation entry found for the x86_64 case. Radar bug #5122861. -- Added support to print the PECOFF base relocation table. Radar bug #5218665. - - The new routine print_coff_reloc_section() was added to the files - coff_print.[ch]. - - Added code in main.c to test for the (__RELOC,__reloc) section being - passed as the -s arguments and call print_coff_reloc_section(). - - The routine get_sect_info() was made extern in main.c and added to - ofile_print.h so it could be called by print_coff_reloc_section(). -- Fixed a bug in print_label() where the addr argument was a unsigned long not - a uint64_t. Changes in ofile_print.[ch] and print_objc.c. Radar bug #5186450. - -Changes for the 5.25 release (the cctools-675 release): -- Changed print_indirect_symbols() so it would not crash if given a malformed - object file that had a segment command with a very large number of sections. - The fix was to add some size checking calculating the expected size in a - 64 bit value compare that to see if it too large. Radar bug #5405675. - -Changes for the 5.25 release (the cctools-673 release): -- Changed the sources so the arm stuff is not in the open source version. - Radar bug #5326431. - - Changed the Makefile to #ifndef __OPEN_SOURCE__ out the arm files - - Added #ifndef __OPEN_SOURCE__ to the following files to bracket arm code: - main.c, ofile_print.c, otool.h and arm_disasm.c . - -Changes for the 5.24 release (the cctools-665 release): -- Added the SSE4 instructions to the i386 disassembler. The changes are in - i386_disasm.c . Radar bug #4943015. - -Changes for the 5.24 release (the cctools-659 release): -- Fixed a bug in the i386 disassembler to correctly assume 64-bit immediates - for 64-bit object files with the MOV accumulator from memory operand (the to - memory operand was already fixed in cctools-646 for this radar). - The fix was for the OA case in i386_disassemble() in i386_disasm.c to - test if it was a 64-bit object and pass the last argument to OPSIZE as 1 in - that case. Also changed for both the OA and AO case was to change the - mnemonic to "movabsl". Radar bug 4693534. -- Changed print_objc2() in print_objc2.c to handle the move all metadata for - objc-abi-version=2 out of segments __OBJC and __OBJC into the __DATA segment. - The section mappings that applied were as follows: - __DATA,__objc_classlist was __OBJC2,__class_list - __DATA,__objc_catlist was __OBJC2,__category_list - __DATA,__objc_protolist was __OBJC2,__protocol_list - __DATA,__objc_msgrefs was __OBJC2,__message_refs - __DATA,__objc_classrefs was __OBJC2,__class_refs - __DATA,__objc_superrefs was __OBJC2,__super_refs - __DATA,__objc_imageinfo was __OBJC,__image_info - otool -ov for LP64 examines the sections named above, and looks for both names - (to avoid compiler revision lock). Radar bug #5066149. - -Changes for the 5.24 release (the cctools-656 release): -- Updated ofile_print.c to print the MH_PIE and MH_NO_REEXPORTED_DYLIBS flags. - Radar bug #5041291. - -Changes for the 5.24 release (the cctools-653 release): -- Updated ofile_print.c to handle the LC_REEXPORT_DYLIB load command. Radar - bug #4986624. -- Added printing the (__OBJC,__image_info) section info for 32-bit Mach-O files. - Radar bug #4983418. - -Changes for the 5.24 release (the cctools-649 release): -- Added support for printing the objc 2.0 metadata in 64-bit Mach-O files. - Radar bug #4560930. - -Changes for the 5.24 release (the cctools-648 release): -- Added the print_init_term_pointer_section() routine to ofile_print.[ch] and - code to call in process() in main.c. This is called when the section - specified with -s is a of the type S_MOD_{INIT,TERM}_FUNC_POINTERS. Radar bug - #4880624. -- Changed the check in get_symbol_table_info() in main.c to for the size of - the symbol table extending past the end of the file so the check does not - overflow and later cause problems. Also changed the check in get_toc_info() - get_indirect_symbol_table_info(), get_module_table_info(), get_ref_info() and - get_hints_table_info in main.c so it does not have the same problems. - Radar bug #4868234. -- Changed the check in print_fat_headers() in ofile_print.c for the nfat_arch - being too large so the check does not overflow and later cause a crash. - Then changed the loop printing the fat_arch structs to break out if it gets - past the size of the file. Radar bug #4860769. - -Changes for the 5.24 release (the cctools-646 release): -- Fixed a bug in the i386 disassembler to correctly assume 64-bit immediates - for 64-bit object files with the MOV accumulator to memory operand. - The fix was for the AO case in i386_disassemble() in i386_disasm.c to - test if it was a 64-bit object and pass the last argument to OPSIZE as 1 in - that case. Radar bug 4693534. -- Fixed a bug in the i386 disassembler to print the prefix rep not repz with the - ins, outs, movs, lods, and stos instructions. The change was to check the - delayed prefix being printed to see if it was repz and the opcode was for - one of the instruction then print rep instead. The change was in in - i386_disassemble() in i386_disasm.c . Radar bug #4467453. -- Fixed a bug in the i386 disassembler for opcodes with an SIB byte and with - mod = 0 which means disp32 with no base. Also changed the 32-bit disassembly - to not print the scale if ss = 0. These changes were in get_operand() in - i386_disasm.c . Also changed print_text() in main.c to print the raw bytes - for CPU_TYPE_X86_64 objects as bytes not 32-bit values. Radar bug #4523901. - -Changes for the 5.24 release (the cctools-645 release): -- Added code in print_loadcmds() in ofile_print.[ch] to parse and print - an LC_RPATH load command. Radar bug #4822880. - -Changes for the 5.24 release (the cctools-644 release): -- Changed print_argstrings() in main.c to work with 64-bit Mach-O core files. - Radar bug #4458775. - -Changes for the 5.24 release (the cctools-642 release): -- Changed i386_disassemble() in i386_disasm.c to understand x86 branch - prediction. Radar bug #4474395. - -Changes for the 5.24 release (the cctools-640 release): -- Changed the code in ofile_print.c use CPU_SUBTYPE_MASK to mask out the - capability bits from the cpusubtype on comparisons. Also added printing the - capability bits. Radar bug #4754462. - -Changes for the 5.24 release (the cctools-634 release): -- Changed print_loadcmds() and print_linkedit_data_command() in ofile_print.c to - handle LC_SEGMENT_SPLIT_INFO the same as LC_CODE_SIGNATURE. Radar bug - #4695477. - -Changes for the 5.24 release (the cctools-633 release): -- Changed main.c, i386_disasm.[ch], ppc_disasm.[ch], m68k_disasm.[ch], - sparc_disasm.[ch] and ofile_print.[ch] to deal with the change of type for - indirect symbols to uint32_t * when ported to 64-bit. Radar bug #4407440. - -Changes for the 5.24 release (the cctools-630 release): -- Picked up a change that got dropped from the cctools-622.5 release which was: - - Support the new x86-64 relocation entry types for signed relocations - with offsets. Radar bug #4664658. - Radar bug #4678307. - -Changes for the 5.24 release (the cctools-629 release): -- Changed print_mach_header() to print MH_DSYM symbolically. Radar bug #4511760. -- Added the i386 memory nop to the i386 disassembler. Radar bug #4096964. - -Changes for the 5.24 release (the cctools-627 release): -- Ported the code to unify otool(1) and otool64(1). Radar bug #3903136. - - Eliminated the #include "stuff/target_arch.h" and all the *_t typedefs that - were used from the header, the *_VALUE and *_NAME from the source files. - - Eliminated the use of #ifdefs and ARCH64 from the source files. - - Made many many changes passing extra parameters and adding test of the - CPU_ARCH_ABI64 bit in the cputype to determine if it is 64-bit ofile. - - Changed the Makefile to only build otool(1). - -Changes for the 5.24 release (the cctools-626 release): -- Added code in print_loadcmds() in ofile_print.[ch] to parse and print - an LC_CODE_SIGNATURE load command. Radar bug #4588023. -- Changed the Makefile to not build otool(1) -static. Radar bug #4624240 and - fix to that in Radar bug #4633942. - -Changes for the 5.23 release (the cctools-620 release): -- Added code in print_thread_states() in ofile_print.c to print the new and - missing x86 thread states. Radar bug #4491230. -- Changed main.c to use target_addr_t instead of unsigned long for section - addresses, which causes 64-bit section addresses to be displayed correctly. - Radar bug #4591066. - -Changes for the 5.23 release (the cctools-619 release): -- Changed displacement() in i386_disasm.c and #ifdef'ed out for ARCH64 so to - not add the addr and lenght. Also changed get_symbol() in i386_disasm.c and - #ifdef'ed out for ARCH64 then handling of scattered_relocation_info . - Radar bug #4483416. - -Changes for the 5.23 release (the cctools-618 release): -- Added support for displaying S_16BYTE_LITERALS sections. Radar bug #4555162. - -Changes for the 5.23 release (the cctools-617 release): -- Don't display a suffix when diassembling setCC instructions for i386. Radar - bug #3873844. -- Disassemble x86-64 MOV instructions which take 8, 16, and 32-bit immediates - properly. Radar bug #4555277. -- Changed i386_disasm.c to allow us to mark various instructions as being - implicitly pointer-sized and marked those instructions like that. Radar bug - #4563547. - -Changes for the 5.23 release (the cctools-614 release): -- Changed ofile_print.c to add macros that rename structure members of the - ppc and i386 thread states for Unix conformance. Radar bug #4508798. - -Changes for the 5.23 release (the cctools-610 release): -- Added a few ifdef x86_THREAD_STATE64 to a few places to ofile_print.c - to allow it to build on Tiger. Radar bug #4535019. - -Changes for the 5.23 release taken from cctools-590.43 (the cctools-610 -release): -- Added support for disassembling the Vanderpool instructions to the i386 - disassembler. Was radar bug #4427573 in cctools-590.43. Radar bug #4534436. - -Changes for the 5.22 release (the cctools-590.37.3 release): -- Add back support for the E9 form of the jmp instruction for x86-64 - disassembly. Radar bug #4489937. -- Use a 'q' suffix rather than an 'l' suffix when disassembling call and jmp - instructions for x86-64. Radar bug #4483621. - -Changes for the 5.22 release (the cctools-590.36.3 release): -- Add support for the new relocation entry types for x86-64. Radar bug - #4475165. -- Print %cs, %fs, and %gs as 64-bit values in x86_64 thread states in otool. - Radar bug #4468148. -- Disassemble pushq instructions with extended x86_64 registers correctly. - Radar bug #4476218. - -Changes for the 5.22 release (the cctools-590.36.1 release): -- Fix suffixes in x86-64 disassembly for push, pop, and moves to and from - control and debug registers, as well as disassembly of short jumps. Radar - bug #4467441. - -Changes for the 5.22 release (the cctools-590.34.1 release): -- Disassemble x86-64 instructions with SIB bytes correctly. Radar bug - #4436608. -- Disassemble x86-64-specific instructions properly and don't recognize - i386-specific instructions when disassembling x86-64 code. Radar bug - #4437391. -- Disassemble the movslq instruction correctly for x86-64. Radar bug #4437197. -- Eliminated extraneous suffixes from disassembly of some i386 and - x86-64 instructions. Radar bug #4441526. -- Fixed x86-64 disassembly for moves to and from control and debug registers. - Radar bug #4439907. - -Changes for the 5.22 release (the cctools-590.31.2 release): -- Added printing x86_THREAD_STATE64 in otool64. Radar bug #4424303. - -Changes for the 5.22 release (the cctools-590.31.1 release): -- Added support for the x86_64 architecture. Radar bug #4345090. -- Added support for the Merom New Instructions. Radar bug #4407298. -- Improved otool's output for a number of i386 instructions. - -Changes for the 5.20 release (the cctools-590.25 release): -- Changed print_uuid_command() in ofile_print.c to use two line for the uuid[] - values. Radar bug #3415593. - -Changes for the 5.20 release (the cctools-590.24 release): -- Added support for DWARF. Radar bug #4367423. - - Added printing S_ATTR_DEBUG to print_section() in ofile_print.c. - - Added print_uuid_command() to ofile_print.[ch] - -Changes for the 5.20 release (the cctools-590.23 release): -- Changed print_thread_states() in ofile_print.c for the current i386 thread - states (#if i386_THREAD_STATE == 1 case) so that it does use the fields - of the i386_float_state struct when i386_EXCEPTION_STATE_COUNT is defined. - Radar bug #4350771. - -Changes for the 5.20 release (the cctools-590.20 release): -- Removed the warnings when building. Radar bug #4340147. - - Added -fno-builtin-round to the Makefile. - -Changes for the 5.19 release (the cctools-590.15 release): -- Adding printing SG_PROTECTED_VERSION_1 in print_segment_command() in - ofile_print.c . Radar bug #4298526. - -Changes for the 5.19 release (the cctools-590.14 release): -- Changed print_thread_states() in ofile_print.c for the current i386 thread - states (#if i386_THREAD_STATE == 1 case) so that it does not use the fields - of the i386_float_state struct. Radar bug #4303606. - -Changes for the 5.19 release (the cctools-590.12 release): -- Added printing MH_ALLOW_STACK_EXECUTION print_mach_header() in ofile_print.c . - Radar bug #4281171. - -Changes for the 5.19 release (the cctools-590.11 release): -- Changed print_thread_states() in ofile_print.c for the current i386 thread - states (#if i386_THREAD_STATE == 1 case) so that it does not print the - obsolete1, obsolete2 or obsolete3 fields (or the same fields with the names - fpkind, initialized, exc_status via the #defines). Removed the three added - #defined's from the change below now that they are no longer needed. Radar - bug #4282026. - -Changes for the 5.19 release (the cctools-590.10 release): -- Added three #defined's to ofile_print.c: - #define obsolete1 fpkind - #define obsolete2 initialized - #define obsolete3 exc_status - allow the source to build on Leopard with different fields in the struct - i386_float_state in . Radar bug #4279472. -- Added printing S_ATTR_SELF_MODIFYING_CODE to print_section() in ofile_print.c. - Radar bug #4202415. - -Changes for the 5.19 release (the cctools-590.8 release): -- Changed print_thread_states() in ofile_print.c adding a #if for the new and - old i386 thread states. And added code to print the new thread states. - Radar bug #4200908. - -Changes for the 5.18 release (the cctools-589 release): -- Changed the Makefile and added a LEGACY macro with two defines to allow - the code to use the old field name "environ" from the i386 structs. - Radar bug #4113580. - -Changes for the 5.18 release (the cctools-583 release): -- Changed the Makefile so that when RC_XBS is set to YES then the compiler - options -MD and -dependency-file as well as the md(1) program are not used. - Radar bug #4029936. - -Changes for the 5.18 release (the cctools-580 release): -- Fixed the i386 opcode for the ud2 instruction. It was disassembled from - 0x0f 0xff. And should be disassembled from 0x0f 0x0b according to the Intel - manual. The change was in i386_disasm.c . Radar bug #4085845. -- Changed the PowerPC disassembler to use "mtocrf" instead of "mtcrf" when bit - 11 is set and likewise "mfocrf" instead "mfcr" in ppc_disasm.c. Radar bug # - 4034280. -- Changed the i386 disassembler to print constants so they would assemble - with the same width as they were in the object file. The change was in - print_operand() in i386_disasm.c. To see if the the value_size is smaller - than 32-bits and signed, then sign extend it and force the size to be 32-bits. - Radar bug #4079507. - -Changes for the 5.18 release (the cctools-578 release): -- Added support for sse3 instructions. Changes were in i386_disasm.c . - Radar bug #4014327. - -Changes for the 5.17 release (the cctools-571 release): -- Changed the Makefile to treat SUPanWheat the same as Panther to build for - a Mac OS X 10.3 (Panther) system. Radar bug #3979451. - -Changes for the 5.17 release (the cctools-568 release): -- Changed print_section() in ofile_print.c to print the section type - S_INTERPOSING. Radar bug #3965794. - -Changes for the 5.17 release (the cctools-563 release): -- Changed print_mach_header() in ofile_print.c to print the new flags - MH_WEAK_DEFINES and MH_BINDS_TO_WEAK. Radar bug #3799069. - -Changes for the 5.17 release (the cctools-562 release): -- Changed print_thread_states() in ofile_print.c to use cpu.vrsave instead of - cpu.pad. Radar bug #3930480. - -Changes for the 5.17 release (the cctools-558 release): -- Fixed a problem in print_hints() in ofile_print.c that would always cause the - check about Inconsistent mh_sizeofcmds to be printed if the verbose option - was not used. Radar bug #3902811. - -Changes for the 5.17 release (the cctools-557 release): -- Removed support for the INTERIM_PPC64. The changes were to remove the - #ifdef INTERIM_PPC64 source changes in main.c and ofile_print.c . Radar bug - #3600419. - -Changes for the 5.17 release (the cctools-554 release): -- Fixed a problem with the sorted_symbols not being correctly sorted causing - symbol names not to be printed. The problem was the sym_compare() routine - in main() used for the qsort() routine did not have its parameters updated - to struct symbol * from nlist_t * for the 64-bit port work. Radar bug - #3889188. - -Changes for the 5.17 release (the cctools-551 release): -- Changed print_thread_states() in ofile_print.c to handle printing a - PPC_THREAD_STATE64. Radar bug #3866755. - -Changes for the 5.17 release (the cctools-546 release): -- Fixed a bug in print_mach_header() in ofile_print.c that was missing a case - statement for CPU_SUBTYPE_POWERPC_970 and printing "ppc970". Radar bug - #3825281. - -Changes for the 5.17 release (the cctools-533 release): -- Changes to support 32-bit & 64-bit tools in the same binary. Radar bug - #3793394. - - Changed the code in main.c, ofile_print.c and objc_print.c to use the - swap_*_t new macros from "stuff/target_arch.h". - - In process() in main.c added a new ofile_mh local variable and added a few - ifdef ARCH64 to set it to ofile->mh64 or ofile->mh. And changed places - where it used ofile->mh to ofile_mh. - -Changes for the 5.17 release (the cctools-531 release): -- Changed print_segment_command() in ofile_print.c to print the fileoff and - filesize fields with the correct format depending on the field with for - ARCH64. Radar bug #3781406. - -Changes for the 5.17 release (the cctools-529 release): -- Made changes to support 64-bit tools. Radar bug #3600431. - - Changed the Makefile to build otool in a sub-directory and building of - otool64 in a different sub-directory. Things are no longer built with - -DINTERIM_PPC64 and otool64 is built with -DARCH64 and linked with - libstuff64 . - - Added the include "stuff/target_arch.h" to the following files: - i386_disasm.c - m68k_disasm.c - main.c - ofile_print.c - ppc_disasm.c - print_objc.c - sparc_disasm.c - i386_disasm.h - m68k_disasm.h - ofile_print.h - ppc_disasm.h - sparc_disasm.h - hppa_disasm.c - i860_disasm.c - m88k_disasm.c - hppa_disasm.h - i860_disasm.h - m88k_disasm.h - and changed the uses of structs, constants and names that are different for - 64-bit files to the typedefs in "stuff/target_arch.h". - - In all places that used sorted_symbols this was changed to the new type - in "stuff/symbol.h" to struct symbol. Which contains a name and an nlist_t. - - Changed the places in main.c and ofile_print.c with #ifdef DINTERIM_PPC64 - to have code for 64-bit architectures. - -Changes for the 5.16 release (the cctools-528.5 release): -- Changed the Makefile to treat MuonSeed the same as MuonPrime to build for - a Mac OS X 10.3 (Panther) system. - -Changes for the 5.16 release (the cctools-528 release): -- Print the new GENERIC_RELOC_LOCAL_SECTDIFF reloc, handle it in - i386_disasm.c. - -Changes for the 5.16 release (the cctools-527 release): -- Print the new PPC_RELOC_LOCAL_SECTDIFF reloc. - -Changes for the 5.16 release (the cctools-526 release): -- Fixed warnings for the changes in mach-o headers for types changing from - unsigned long to uint32_t and from long to int32_t. Radar bug #3744082. - - Changed a number of uses of "%lu" to "%u" and "%ld to "%d" in ofile_print.c. -- Added support for 3DNow! instructions. Changes were in i386_disasm.c . - Radar bug #3737535. - -Changes for the 5.16 release (the cctools-524 release): -- Fixed a bug in print_fat_headers() in ofile_print.c in the loop that was - looking for illegal duplicate architectures. The loop was using unsigned - indexes and testing for j < i - 1 without checkin that i could be zero. - Radar bug #3709358. - -Changes for the 5.16 release (the cctools-522 release): -- Fixed the problem with the changes to libc in Radar bug #3535291 causing the - symbols ___fegetfltrounds and ___fpclassifyd to be undefined. - Changed the Makefile to cause -lm_static to be used for releases after - Panther. And changed main.c to remove the ifdef's around the stubs - __fpclassifyd() and __fpclassify(). Radar bug #3685865. - -Changes for the 5.16 release (the cctools-520 release): -- Fixed a bug in the disassembly of the i386 movdq2q instruction. Radar bug - #3488840. -- Fixed a bug in the disassembly of the i386 move word to accumulator - instructions. It was incorrectly using the data-size attribute to determines - the size of the offset. For move to accumulator instructions the - address-size attribute of the instruction determines the size of the offset. - Radar bug #3515794. - -Changes for the 5.16 release (the cctools-509 release): -- Added #ifdef INTERIM_PPC64 to the source changes to support the interim ppc64 - file format. And added -DINTERIM_PPC64 to the Makefile. -- Changed print_thread_states() in ofile_print.c to treat CPU_TYPE_POWERPC64 the - same as CPU_TYPE_POWERPC and CPU_TYPE_VEO. - -Changes for the 5.16 release (the cctools-501 release): -- Added the printing of MH_SUBSECTIONS_VIA_SYMBOLS to print_mach_header() in - ofile_print.c . Radar bug #2284500. - -Changes for the 5.16 release (the cctools-500 release): -- Added printing S_ATTR_LIVE_SUPPORT and S_ATTR_NO_DEAD_STRIP to print_section() - in ofile_print.c . Radar bug #2284500. - -Changes for the 5.16 release (the cctools-499.1 release): -- Made changes to support the interim ppc64 file format. Radar bug #3562133 - and #3562232. - - Changed print_text() in main.c to treat CPU_TYPE_POWERPC64 the same as - CPU_TYPE_POWERPC and CPU_TYPE_VEO. - - Changed print_relocs() in ofile_print.c to print "quad" for an - r_length == 3 and cputype == CPU_TYPE_POWERPC64 and r_type == - PPC_RELOC_VANILLA in 2 places. - - Changed print_indirect_symbols() and guess_indirect_symbol() in - ofile_print.c to set the stride to 8 for CPU_TYPE_POWERPC64 otherwise 4. - - Updated print_arch(), print_cputype(), print_mach_header(), print_relocs() - and print_r_type() in ofile_print.c for CPU_TYPE_POWERPC64 to be the same - as CPU_TYPE_POWERPC. - -Changes for the 5.14 release (the cctools-498 release): -- Added code to disassemble the PowerPC pseudo-instruction 'jmp' as the - non-linking form of 'jbsr' in ppc_disasm.c . Radar bug #3458928. - -Changes for the 5.13.2 release (the cctools-495.3 release): -- Updated print_mach_header() in ofile_print.c to print the new mach_header - flags MH_PREBINDABLE, MH_ALLMODSBOUND and MH_CANONICAL. Radar bug #3176679. - -Changes for the 5.12 release (the cctools-489 release): -- Added stub functions for the notify API in the new file notify.c and picked - up notify.h to allow otool to build on Panther7B40. Radar bug #3378781. - -Changes for the 5.12 release (the cctools-477 release): -- Added stub functions for __fpclassifyd(), for ppc, and __fpclassify() for i386 - to the end of main.c to allow otool to link with just libc.a given the new - code in __ldtoa(). Radar bug #3271830. - -Changes for the 5.12 release (the cctools-476 release): -- Fixed a bug in the i386 disassembly of movd instructions with the 0x7e sub - opcode. Radar bug #3268255. - -Changes for the 5.12 release (the cctools-472 release): -- Fixed a bug in disassembling the movq SSE2 instruction opcodes. The operands - for register to memory and memory to register were switch. - Radar bug #3250086. - -Changes for the 5.12 release (the cctools-468 release): -- Added support for the new use of the previously unused value 3 for r_length - to mean that the conditional branch was predicted using the Y-bit and the - sign of the displacement and opcode. Radar bug #3223045. - - Changed in print_r_type() in ofile_print.c to take a new boolean parameter - predicted to tell it to print "+/-" after the r_type. - - Changed print_relocs() in ofile_print.c to set a local boolean predicted - to TRUE when r_length is 3 and pass it to print_r_type(). - - Added the new routine get_reloc_r_length() to ppc_disasm.c . - - Changed the routine get_reloc() to get_reloc_r_type() in ppc_disasm.c . - - Change bc() in ppc_disasm.c to take 3 new parameters sect_offset, relocs and - nrelos so it can look for a relocation entry with a r_length value of 3 to - know to always print the prediction in this case. - -Changes for the 5.12 release (the cctools-467 release): -- Added support for the PPC_RELOC_LO14_SECTDIFF relocation type used with - double word load/store instructions. Radar bug #3218027. - - Changed print_relocs() and in ofile_print.c to expect and print a pair - relocation entry for PPC_RELOC_LO14_SECTDIFF relocation type. - - Changed the 14th entry in ppc_r_types[] from " 14 (?) " to "LO14DIF " in - ofile_print.c that print_r_type() uses. - - Changed print_immediate() in ppc_disasm.c to handle PPC_RELOC_LO14_SECTDIFF. - -Changes for the 5.12 release (the cctools-466 release): -- Fixed the incorrect cast on the comparison of the nlist struct's n_strx field - where the value being compared to was casted to a long. The correct fix was - to cast n_strx to an unsigned long. This is because the test is: - - if(something.n_un.n_strx >= string_size) - error(...) - - And the incorrect cast like this: - - if(something.n_un.n_strx >= (long)string_size) - error(...) - - will not catch the case when n_strx is negative. So the correct cast is: - - if((unsigned long)something.n_un.n_strx >= string_size) - error(...) - - which was made in print_indirect_symbols() in ofile_print.c and a number of - other places. - -Changes for the 5.12 release (the cctools-465 release): -- Fixed the disassembly of "movd -12(%ebp),%mm0" which incorrectly disassembled - without the displacement. Radar bug #3206331. - -Changes for the 5.12 release (the cctools-464 release): -- Made changes to build cleanly with gcc3.3 - - Removed -Wno-precomp from the Makefile - - Fixed warnings for "comparison between signed and unsigned" in main.c, - ofile_print.c, m68k_disasm.c, i860_disasm.c, m88k_disasm.c, i386_disasm.c, - ppc_disasm.c, hppa_disasm.c, sparc_disasm.c, and print_objc.c . - -Changes for the 5.11 release (the cctools-463 release): -- Added support for the MH_DYLIB_STUB filetype. Radar bug #3193744. - - Changed processor() in main.c when printing the section contents from - an MH_DYLIB_STUB that has indirect symbol table entries to force the section - size to zero and not try to print the contents that were stripped. - - Added the printing of the MH_DYLIB_STUB filetype to print_mach_header() in - ofile_print.c . - -Changes for the 5.11 release (the cctools-450 release): -- Fixed the disassembly of movd instructions that used GPR registers so things - like: - movd %edx, %xmm0 - movd %xmm0, %edx - disassembled correctly. Radar bug #3117176. - -Changes for the 5.11 release (the cctools-454 release): -- Fixed a bug in disassembling a bad i386 instruction that had a value for a - segment register greater than 6. The array SEGREG[] was changed to add two - more entries to cover all 8 possible values with the last two values being - "%?6" and "%?7" for the illegal values. Radar bug #3144846. - -Changes for the 5.11 release (the cctools-439 release): -- Made the needed changes to main.c and ofile_print.c for VEO support. Radar - bug #3068161. -- Added the disassembly of the SSE2 instructions. Radar bug #2972491. -- Changed the disassembly of i386 opcode "fildl" and "fistpl" to not use the - 'l' suffix because of the added i386 opcode "fildll" to be the same as "fildq" - and "fistpll" to be the same as "fistpq" (done for Radar bug #2909568). - -Changes for the 5.11 release (the cctools-437 release): -- Fixed the disassembly of jbsr ppc instruction's (those with JBSR relocation - entries) so the "true target address" is correctly printed. This fix is in - print_immediate() in ppc_disasm.c where the value should just be other_half - not "other_half + value". Radar bug #3046962. -- Fixed the printing of the pair JBSR relocation when it is a scattered - relocation to point at the r_value as the other half "<- other_half". This - fix is in print_relocs() in ofile_print.c. Radar bug #3046962. -- Added the disassembly of the fxsave instruction in i386_disasm.c. Radar bug - #2972491. - -Changes for the 5.10 release (the cctools-422 release): -- Added the disassembly of some pentium pro instructions in i386_disasm.c. - Radar bug #2928507. -- Added printing S_ATTR_STRIP_STATIC_SYMS to print_section() in ofile_print.c . - Radar bug #2945659. - -Changes for the 5.10 release (the cctools-421 release): -- Added printing MH_NOFIXPREBINDING in print_mach_header() in ofile_print.c . - Radar bug #2941669. - -Changes for the 5.10 release (the cctools-416 release): -- Removed the printing S_ATTR_WEAK_DEFS to print_section() in ofile_print.c. - Radar bug #2919646. -- Added the -m option to not use the archive(member_syntax) for file names. - Radar bug #2904708. - -Changes for the 5.10 release (the cctools-414 release): -- Added printing S_ATTR_WEAK_DEFS to print_section() in ofile_print.c. - Radar bug #2898558. - -Changes for the 5.10 release (the cctools-409.1 release): -- Changed print_literal8() in ofile_print.c to use: - /* l0 is the high word, so this is equivalent to if(isfinite(d)) */ - if((l0 & 0x7ff00000) != 0x7ff00000) - instead of: - if(finite(d)) - so otool will not have to link with libm. The Makefile was also changed. - -Changes for the 5.10 release (the cctools-403 release): -- Removed the hack in the Makefile to use cc when $(CC) is gcc3 when linking - to work that was working around Radar bug #2814731 now that gcc-1009 fixes it. - -Changes for the 5.10 release (the cctools-400 release): -- Changed the Makefile back to again use the -dependency-file with gcc. -- Changed the hack in the Makefile to use cc when $(CC) is gcc3 when linking - to work around Radar bug #2814731. - -Changes for the 5.10 release (the cctools-396 release): -- Added a hack in the Makefile to use cc when $(CC) is gcc when linking - to work around Radar bug #2814731. -- Changed the Makefile to not use the -dependency-file with gcc as well as - mwccppc. -- Added an include to m68k_disasm.c, i860_disasm.c, m88k_disasm.c, - and ppc_disasm.c to pick up the prototype for memcpy(). - -Changes for the 5.10 release (the cctools-393 release): -- Added code to ofile_print.c to deal with the new LC_LOAD_WEAK_DYLIB command. - -Changes for the 5.10 release (the cctools-392 release): -- Changed the call to ofile_process() in main.c to pass TRUE for the new - use_member_syntax parameter. Radar bug #2730127. - -Changes for the 5.10 release (the cctools-389 release): -- Added the -D option to print just the LC_ID_DYLIB name. - -Changes for the 5.10 release (the cctools-388 release): -- Fixed the spelling of Inconsistant to be Inconsistent in main.c and - ofile_print.c. Radar bug #2783706. - -Changes for the 5.10 release (the cctools-386 release): -- Added code in print_loadcmds() in ofile_print.c to parse and print - LC_PREBIND_CKSUM load commands. - -Changes for the 5.9 release (the cctools-370 release): -- Added printing MH_NOMULTIDEFS in print_mach_header() in ofile_print.c . -- Added code in main() in main.c and the routine print_hints() to ofile_print.c - to print the two-level namespace hints. - -Changes for the 5.9 release (the cctools-367 release): -- Added code in print_loadcmds() in ofile_print.c to parse and print - LC_SUB_LIBRARY load commands. Radar bug #2697458 -- Added code in print_loadcmds() in ofile_print.c to parse and print - LC_TWOLEVEL_HINTS load commands. Radar bug #2558069. - -Changes for the 5.9 release (the cctools-360 release): -- Picked up the changes to print_objc.c from Radar bug #2660421 (open source - submittion). - -Changes for the 5.9 release (the cctools-359 release): -- Added -Wno-long-double to shutup the compiler for - . - -Changes for the 5.8 release (the cctools-357 release): -- Added support for the CPU_SUBTYPE_POWERPC_7450 in ofile_print.c . Radar bug - #2599869. - -Changes for the 5.8 release (the cctools-355 release): -- Changed the printing of sections marked with S_ATTR_SOME_INSTRUCTIONS so that - they are disassembled. This is to aid coalesced sections created by the - compiler that are not marked with S_ATTR_PURE_INSTRUCTIONS as they contain - jump tables (Radar bug #2580311). - -Changes for the 5.8 release (the cctools-342 release): -- Added a print_sub_client_command() to ofile_print.c . Radar bug #2533649. -- Added printing MH_TWOLEVEL and MH_FORCE_FLAT to print_mach_header() in - ofile_print.c. Radar bug #2534043. - -Changes for the 5.8 release (the cctools-341 release): -- Changed print_immediate() in ppc_disasm.c to also check for PPC_RELOC_SECTDIFF - as it is incorrectly printing out "Stray PPC_RELOC_PAIR relocation entry". - This is happening because switch tables for (__TEXT,__coalesced_text) sections - are placed in line. This is done because ld(1) complains about illegal - references to coalesced symbols being used with section difference relocation - entries. - -Changes for the 5.7 release (the cctools-336 release): -- Added printing NO_TOC to print_section(). Radar bug #2494286. - -Changes for the 5.7 release (the cctools-334 release): -- Added printing LAZY_INIT to print_mach_header() in ofile_print.c. Radar bug - #2490396. - -Changes for the 5.7 release (the cctools-329 release): -- Changed iinit and ninit fields of the struct dylib_module in - print_module_table() in ofile_print.c to iinit_iterm and ninit_nterm and - printed them as 2 numbers each. Radar bug #2469527. - -Changes for the 5.7 release (the cctools-328 release): -- Changed the Makefile so that it would use -L/usr/local/lib/system - moving forward and -L/Local/Developer/System when RC_RELEASE is Gonzo, Bunsen - or Beaker. - -Changes for the 5.7 release (the cctools-327 release): -- Changed the Makefile so that it would use -L/AppleInternal/Developer/System - moving forward and -L/Local/Developer/System when RC_RELEASE is Gonzo, Bunsen - or Beaker. - -Changes the 5.6 release (the cctools-320 release): -- Added support for the new LC_SUB_FRAMEWORK load command to support "Guarding - against direct linking of non-umbrella frameworks". The files ofile_print.c - and ofile_print.h were updated. Radar bug 2443212. - -Changes the 5.6 release (the cctools-316 release): -- Added printing the mach header flag MH_SPLIT_SEGS to ofile_print.c. - -Changes the 5.5 release (the cctools-307 release): -- Fixed some bugs in print_relocs() in ofile_print.c for ppc section difference - relocations. It was incorrectly printing "half = 0x????\n" some times which - lead to an extra "\n" and difficulty in determining which relocation entry an - error message was refering to due to the extra lines in the output. -- Added support for the CPU_SUBTYPE_POWERPC_7400 in ofile_print.c . - Radar bug #2397523. -- Fixed a bug in get_sect_info() where it was not comparing the segment name - in an object file. This caused it to pick the first section if their were - segments with the same section names. - -Changes the 5.4 release (the cctools-300 release): -- Added printing the new LC_ROUTINES load command. -- Added the S_COALESCED section type in section structures. - -Changes the 5.3 release (the cctools-292 release): -- Added some braces to get rid of the warning message from the egcs compiler - "warning: suggest explicit braces to avoid ambiguous `else'". This was done - to m68k_disasm.c, i860_disasm.c and sparc_disasm.c . -- Changed the return type of main() in main.c from void to int to remove a - warning from the egcs compiler. Also changed the exit()'s calls at the end to - return()'s. - -Changes for the 5.3 release, (the cctools-286 release): -- Added support for printing S_MOD_TERM_FUNC_POINTERS in print_section() in - ofile_print.c . - -Changes for the 5.3 release, (the cctools-285 release): -- Fixed the i386 opcode of cmpxchg from 0x0fa6 (as it is in the i486 manual) to - 0x0fb0 which is correct (as it is in the Pentium manual). - -Changes for the 5.3 release, MacOS X bring up (the cctools-282 release): -- Changed the printing of the ppc_thread_state to not use bit fields for srr1, - cr and exr to match the ppc_thread_state for Rhapsody/MacOS X. -- Changed the Makefile to allow for RC_OS=macos for MacOS X builds. -- Added a few casts in places to get it to compile with the MetroWerks compiler - without -relax_pointers. -- To get around the problem with the MetroWerks compiler using -framework - System when -static is used the Makefile was changed to if out the -static - flag and -static link for mwcc. - -Changes for the 5.2 release (the cctools-274 release): -- Removed the uses of CPU_SUBTYPE_586SX in ofile_print.c and added support for - new intel subtypes. Radar bug #2231830. - -Changes for the 5.2 release (the cctools-272 release): -- Removed the reference to the header file "objc/NXString.h" in print_objc.c as - this file is going away. print_objc.c now just defines the layout of struct - objc_string_object directly. Radar bug #2231010. - -Changes for the 5.2 release (the cctools-267 release): -- Added all the suport needed for the 4.4BSD extended format #1 for long names. - Radar bug #1670513. - -Changes for the 5.1 release (the cctools-261 release): -- Added disassembling dcba to ppc_disasm.c. -- Updated print_special_register_name() in ppc_disasm.c to add the special - register names to match the assembler. -- Changed otool's use of CPU_SUBTYPE_POWERPC_740 to CPU_SUBTYPE_POWERPC_750. -- Fixed a bug that in processor() in main.c where indirect_symbols and - nindirect_symbols were not initialized. This caused printing of symbol - stub sections to to call guess_indirect_symbol() with bad results (print - incorrect stuff or crash). -- Fixed a bug in the ppc disasembler where it was printing the prediction of - branch conditionals which had the BO 1z1zz (20 decimal) encoding. See page - 4-53 of the PowerPC green book. - -Changes for the 5.1 release (the cctools-260 release): -- Added -c to all the install commands in the Makefile. - -Changes for the 5.1 release (the cctools-255 release): -- Added disassembling the VMX opcodes. Radar bug 2004760. - -Changes for the 5.1 release (the cctools-253 release): -- Changed the Makefile to only create the needed dst directories. - -Changes for the 5.1 release (the cctools-252 release): -- Changed the ppc dissassembly of "addis rX,0,immed" to "lis rX,immed" and - "addi rX,0,immed" to "li rX,immed". -- Added guess_indirect_symbol() to be used by the disassemblers to print as a - comment the stub name. Changed the ppc, i386, m68k and sparc disassemblers - to use this. - -Changes for the 5.1 release (the cctools-247 release): -- Added MKDIRS if code to the Makefile to build native on Rhapsody. -- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody - where tar does not. -- Changed the Makefile to install otool in /usr/bin for RC_OS - teflon and in /bin for RC_OS nextstep (Radar 1673496). - -Changes for the 5.0 release (the cctools-242 release): -- Removed the non-existant instructions "stmd", "mtpmr" and "mfpmr". - -Changes for the 5.0 release (the cctools-240 release): -- Changed printing the first agrument of fcmpo and fcmpu to crX not just a - number. -- Changed ldu, lfdu, lfsu, lhau, lwzu, stbu, stdu, stfdu, stfsu, sthu and stwu - to print the RA parameter r0 not 0 when it is zero. Note these are an invalid - forms. -- Changed lbzx, ldx, lfdx, lfsx, lhax, lhbrx, lhzx, lwax, lwbrx, lwzx, stbx, - stdx, stfdx, stfiwx, stfsx, sthbrx, sthx, stwbrx, stwx, dcbi, eciwx, ecowx, - icbi to print the RA parameter as 0 not r0 when it is zero. -- Removed the non-existant instruction "lmd". - -Changes for the 5.0 release (the cctools-236 release): -- Added disassembling mulld[o][.] . -- Changed printing the first operand of mcrfs and mcrxr to print it as a cr - register name not just a number. -- Changed printing the operands of mcrf to print them as cr register names not - just numbers. -- Added the -Z to don't use simplified ppc mnemonics in disassembly. Code was - added for "cmp", "bc", "cmpi", "cmpl" and "cmpli". -- Added disassembling the "mttbl rS" for "mtspr 284,rS" and "mttbu rS" for - "mtspr 285,rS". -- Removed the incorrect PowerPC disassembly of mttb and mttbu. - -Changes for the 5.0 release (the cctools-235 release): -- Added printing the PPC_RELOC_JBSR and disassembling with it. -- Removed the #if 0 code that was replaced by print_relocs(). -- Fixed a bug with otool -s __TEXT __text core dumping. Line 365 in main.c - needs an else (bug #79050). -- Added the PowerPC disassembly of the eciwx, ecowx, fres[.], fsqrts[.], - frsqrte[.], fsel[.], fsqrt[.], stfiwx and tlbsync instructions. - -Changes for the 5.0 release (the cctools-227 release): -- Changed print_argstrings() used for -c to use get_stack_addr_from_flag() - from libstuff and removed all the *_usrstack.c files. -- Made otool -c work for PowerPC core files. - -Changes for the 5.0 release (the cctools-224 release): -- Changed including to which uses unsigned long - instead of off_t (64 bits on Teflon). -- Added printing of the ppc_float_state_t and ppc_exception_states. -- Updated ofile_print.c with the updated PowerPC subtypes. - -Changes for the 5.0 release (the cctools-221 release): -- Picked up the changes for the correct Rhapsody thread state changes into - ofile_print.c. - -Changes for the 5.0 release (the cctools-215 release): -- Fixed disassembly for the PowerPC instructions mftb and mftbu. - -Changes for the 5.0 release (the cctools-214 release): -- Added support for PowerPC disassembly using SECTDIFF relocation types. -- Added support for printing PPC_RELOC_HI16_SECTDIFF, PPC_RELOC_LO16_SECTDIFF, - and PPC_RELOC_HA16_SECTDIFF relocation types. - -Changes for the 5.0 release (the cctools-212 release): -- Changed tlbiex to tlbie and slbiex to slbie (also corrected the opcodes). -- Added the ppc specific cpu subtypes to be printed. - -Changes for the 5.0 release (the cctools-210 release): -- Changed mulwd to mulhw . -- Changed mull to mullw and mullo to mullwo . -- Changed m98k to ppc. - -Changes for the 4.0 release (the cctools-189 release): -- Updated objc_print.c to reflect changes in Objc-C runtime structures. - -Changes for the 4.0 release (the cctools-188 release): -- Added printing the __cstring_object section like the __string_object section - (bug #61840). - -Changes for the 4.0 release (the cctools-185 release): -- Printed the time stamp for -Lv for dynamic libraries. - -Changes for the 4.0 release (the cctools-173 release): -- Added printing the LC_PREBOUND_DYLIB load command. - -Changes for the 4.0 release (the cctools-170 release): -- Added printing MH_PREBOUND. - -Changes for the 4.0 release (the cctools-168 release): -- Picked up the sparc changes to sparc_disasm.c . -- Picked up the sparc changes to sparc_r_types[] in ofile_print.c . -- Change the version numbers of dynamic library to the form X[.Y[.Z]] to match - how next does versioning of it's projects. This effected libtool(1), ld(1), - otool(1), dyld, libstuff(version_number.c) and man pages for ld and libtool - bug #55627). In here the changes were in ofile_print.c . -- Added -T, -M, -R and -I to the usage print out. - -Changes for the 4.0 release (the cctools-156 release): -- Fixed a that caused sections with S_ATTR_PURE_INSTRUCTIONS set not to be - disassembled. This was casued by S_ATTR_SOME_INSTRUCTIONS also being set and - the code in main.c checking the SECTION_ATTRIBUTES equal to - S_ATTR_PURE_INSTRUCTIONS and not just checking for that bit. - -Changes for the 4.0 release (the cctools-158 release): -- Fixed a bug that caused printing of shlib and dyld names to be wrong. Basicly - the part of the structure that needed to be swapped was copied but the - original pointer needed to be passed to the routine to print the name part of - the structure. This was introduced with the change for cctools-150 below. - -Changes for the 4.0 release (the cctools-154 release): -- Added support for printing indirect symbol table entries for stripped defined - externals. Strip uses the values INDIRECT_SYMBOL_LOCAL and - INDIRECT_SYMBOL_ABS to represent the symbols that are defined that were - stripped otool prints these as LOCAL and ABSOLUTE. - -Changes for the 4.0 release (the cctools-150 release): -- Fixed a bug in printing load commands that caused the thread commands on - hppa to be printed swapped. This was the same bug as the otool -L bug - below where the wrong size to memcpy was used to copy the load command. - -Changes for the 4.0 release (the cctools-149 release): -- Added printing the section attribute SOME_INSTRUCTIONS. -- Removed printing the section attribute RELOC_AT_LAUNCH. -- Added printing the mach header flag BINDATLOAD. -- Fixed a bug in print_libraries for otool -L with dynamic libraries that - memcpy'ed the wrong size into the dylib_command (bug #50440). - -Changes for the 4.0 release (the cctools-148 release): -- Changed how otool gets built. It how gets built with -static. - -Changes for the 4.0 release (the cctools-140 release): -- Picked up sparc changes to sparc_disasm.c. -- Added printing MH_BUNDLE filetype. - -Changes for the 4.0 release (the cctools-138 release): -- Picked up a change to sparc_disass.c. It was getting the targets for - branches with negative displacements wrong. - -Changes for the 4.0 release (the cctools-135 release): -- Fixed a bug in otool for sparc disassembly in the routine print_symbolic() - which printed the wrong value for branch instructions when relocation entries - were not present. The problem was it was adding in the pc to the target - value which already had the pc added to it. -- Fix for Tracker 41317 [as(hppa) : does not support cache control hints.] - otool/hppa-dissasm.c changed to disassemble the new parsing rule changes. - -Changes for the 4.0 release (the cctools-133 release): -- Picked up the sparc changes to sparc_disasm.c. -- Picked up the sparc changes for printing the floating-point sparc thread. - -Changes for the 4.0 release (the cctools-132 release): -- Picked up the sparc changes for sparc_disasm.c and m88k_disasm.c. -- Picked up the sparc changes for printing the sparc thread. - -Changes for the 3.3 release (the cctools-128 release): -- Fixed otool -c for the hppa. Had to add special code in print_argstrings() - in main.c to deal with the different stack layout (bug #40373). -- Removed the spaces printed before the register names for the hppa disassembler - in 4 places. - -Changes for the 3.3 release (the cctools-127 release): -- Fixed a bug when the a zero fill section was attempted to be printed without - -v which caused otool to core dump (bug #42127). - -Changes for the 3.3 release (the cctools-122 release): -- Fixed a bug in printed byte swapped tocs for a dylib. The code in main.c - had some copy and paste errors in it's allocate() and memcpy() before the - call to swap_dylib_table_of_contents(). - -Changes for the 3.3 release (the cctools-119 release): -- Picked up first round of changes for the sparc target. This work is - incomplete. -- HPPA, changed main.c, otool.h, ofile_print.c and Makefile to fix bug # 39398 - (otool does not understand certain thread states for hppa). Added - hppa_usrstack.c for the same. - -Changes for the 3.3 release (the cctools-115 release): -- Changed print_symbol() in ofile_print.c to take an extra parameter, dot_value, - the value of the address being dissassembled which is only used for the value - of the -symbol in a SECTDIFF relocation entry if their is no symbol that - matches that value. - -Changes for the 3.3 release (the cctools-104 release): -- Made a quick but incorrect fix for jbsr disassembly in hppa_disasm.c by - passing the sect_addr as the first parameter to print_immediate() in the - jbsr case '@' this will not work if a jbsr to a different section is used. - -Changes for the 3.3 release (the cctools-103 release): -- Fixed a bug in hppa_r_types[] array which has only 15 (not 16 enties). - -Changes for the 3.3 release (the cctools-102 release): -- Integrated in the hppa support. -different otool/Makefile (integrated for cctools-102) - Using cctoolshppa-37. New hppa files. Changed to remove hppa-opcode.h. -different otool/i386_usrstack.c (no changes for cctools-102) - Using cctools-29. Late 3.2 fixes the hppa base did not have. -different otool/m68k_usrstack.c (no changes for cctools-102) - Using cctools-29. Late 3.2 fixes the hppa base did not have. -different otool/main.c (integrated for cctools-102) - Using cctoolshppa-37. Call to hppa_disassemble() added. -different otool/ofile_print.c (integrated for cctools-102) - Using cctoolshppa-37. Printing hppa cputypes and relocs added. - Fixed some print space problems in the master clone ~comp/cctools-29. -Only in cctoolshppa-37/otool: hppa_disasm.c (integrated for cctools-102) - Pickup cctoolshppa-37/otool/hppa_disasm.c from cctoolshppa-37 and - Changed line 9 from: - #include "hppa-opcode.h" - to - #include "../as/hppa-opcode.h" - Changed line 412 from: - struct scattered_relocation_info *srp, *spairp; - to - struct scattered_relocation_info *srp; - to remove a warning. - Changed line 630 from: - return HPPA_RELOC_NORELOC; - to - return 0xffffffff; - since HPPA_RELOC_NORELOC was removed from mach-o/hppa/reloc.h - Changes for cctools-102: - moved some functions into libstuff/hppa.c as suggested by the comments. -Only in cctoolshppa-37/otool: hppa_disasm.h (integrated for cctools-102) - Pickup cctoolshppa-37/otool/hppa_disasm.h from cctoolshppa-37. -Only in cctoolshppa-37/otool: hppa-opcode.h (also NOT pick up for cctools-102) - This is simmilar but different to hppa-opcode.h in ../as . This was not - picked up but hppa_disasm.c was changed to include ../as/hppa-opcode.h - -Changes for the 3.3 release (the cctools-101 release): -- Made sections with the attribute S_ATTR_PURE_INSTRUCTIONS disassemble with - the -v flag. Also had to fix the disassemblers to add sect_addr parameter to - subract from the address when looking for relocation entries. -- Added -I to print the indirect symbol tables. -- Added code to print the dysymtab. - -Changes for the 3.3 release (the cctools-100 release): -- First major round of changes for the new shlib stuff. - 1) In otool's disassemblers (m68k and i386) support for possition-independent - code through the SECTDIFF relocataion type. -- Fixed a bug in the m68k disassembler for mulsl where the 2 register form did - not disassemble the Dl register correctly (bug #38530). -- Fixed a bug in the m68k disassembler for bcc branches of 16-bit and 8-bit - displacements not getting their target calculated correctly (bug #38531). -- Fixed a bug in the m68k disassembler for dbcc instructions where the 16-bit - displacements were not getting their target calculated correctly. - -Changes for the 3.2 release (the cctools-24 release): -- Fixed a bug in print_argstrings() which was using printf(%s) and that could - not correctly deal with a string that did not end in a '\0' before the memory - that contained the string ended (bug #33672). - -Changes for the 3.1 release (the cctools-22 release): -- Added printing for these (bug #32553): - { "any", CPU_TYPE_ANY, CPU_SUBTYPE_MULTIPLE }, - { "little", CPU_TYPE_ANY, CPU_SUBTYPE_LITTLE_ENDIAN }, - { "big", CPU_TYPE_ANY, CPU_SUBTYPE_BIG_ENDIAN }, - -Changes for the 3.1 release (the cctools-21 release): -- Fixed a few bugs in print_objc.c the had arguments reversed so things got - swapped when they shouldn't have. - -Changes for the 3.1 release (the cctools-15 release): -- Flushed out the swap_* stubs in print_objc.c. -- Updated the printing of the m98k cpu flavor to use it's correct definition. - -Changes for the 3.1 release (the cctools-14 release): -- Added the opcodes for tlbiex (31,338) and tlbia (31,370). -- Changed the m98k instructions: lwarx, ldarx, stwcx. and stdcx. second arg from - just a greg to 0 or a greg (r1-r31). -- For the m98k disassembler removed "mr" for "ori Rx,Ry,0" because the 0 could - have a relocation entry and it really could be an "ori" not a "mr" (move - register). - -Changes for the 3.1 release (the cctools-13 release): -- Added the m98k (PowerPC) architecture. This includes a kludged - mach/m98k/thread_status.h with only an entry point. - -Changes for the 3.1 release (the cctools-10 release): -- Fixed two bugs in the i386 disassembler. First the displacement routine - needed to sign extend it's value if it was a byte or short before doing the - addition. Second for the 8-bit jumps the operand size needs to be printed - as a long not a byte (bug #29789). - -Changes for the 3.1 release (the cctools-9 release): -- Fixed otool -c for the m88k and i386 architectures (bug #29639). This - required a file for each arch that included so the value - of USRSTACK could be returned. - -Changes for the 3.1 release (the cctools-8 release): -- Added symbolic disassembly for the i386 arch. This involved a major clean up - of i386_disasm.c . - -Changes for the 3.1 release (the cctools-7 release): -- Added the i485 and i586 instructions to the dissembler for the i386 arch. -- Added a comment character '#' before in the sprintf lines - "#***** Error - bad opcode" in _bits.c for disassembling the i386. - -Changes for the 3.1 release (the cctools-5 release): -- Picked up the lono team's mods to ofile_print.c for changes to the i386 - thread_status.h. - -Changes for the 3.1 release (the cctools-4 release): -- Changed the arch name from ix86 to i386. -- Changed CPU_TYPE_I80x86 to CPU_TYPE_I386 in main.c that was missed. - -Changes for the 3.1 release (the cctools-3 release): -- Changed CPU_TYPE_I80x86 to CPU_TYPE_I386 and removed CPU_SUBTYPE_AT386 - CPU_SUBTYPE_EXL . - -Changes for the 3.1 release (the cctools-1 release) -- Created the otool directory with the 3.1 otool. +TODO: +- Change pad in PPC_THREAD_STATE to vrsave. Print the altivec state. +- HPPA, bring the private version of mach/hppa/thread_status.h in sync with + the kernel header and change ofile_print.c to recognize new thread states. + +Changes for the 5.27 release (the cctools-751 release): +- Changed the printing of Objective-C data so that strings from protected + sections are printed as "some string from a protected section" instead of + what looks like junk when the protected string is printed as characters. + Radar bug #5578032. + +Changes for the 5.26 release (the cctools-750 release): +- Changed so that armv7 defaults to printing in thumb mode. Moved in_thumb + boolean to a global in arm_disasm.[ch] and set it to TRUE in main.c if the + binary is armv7. Radar bug 6651124. +- Fixed a problem with print_objc_segment() in print_objc.c that was incorrectly + using sizeof(void *) when it should have been using sizeof(uint32_t). + Radar bug #6652270. +- Updated ofile_print.c for the places it was missing code for + S_16BYTE_LITERALS. Radar bug #5947957. +- Fixed the x86_64 disassembly of with and SIB byte when mode is 0 and base is 5 + and ss is not zero so that it does not print a base register. Radar bug + #6533811 + +Changes for the 5.26 release (the cctools-749 release): +- Fixed the printing of Objective-C meta data from 64-bit object files. So that + every "dereference" of a pointer looks for a relocation entry. Also added + the -V option to print the symbol names from the relocation entries. + Radar bug #6549235. + +Changes for the 5.26 release (the cctools-737 release): +- Changed arm_r_types[] for entry 7 to T_BR32 in ofile_print.c for the new + ARM_THUMB_32BIT_BRANCH relocation type. Radar bug #6511482. +- In print_insn() in arm_disasm.c removed the code at the end to check for diff --git a/cctools/otool/print_objc.c b/cctools/otool/print_objc.c index 0ed3c79..4944a66 100644 --- a/cctools/otool/print_objc.c +++ b/cctools/otool/print_objc.c @@ -311,6 +311,7 @@ struct section_info { char *contents; uint32_t addr; uint32_t size; + enum bool protected; }; static void get_objc_sections( @@ -1183,6 +1184,10 @@ uint32_t *sect_size) *sect_addr = s.addr; } } + if(sg.flags & SG_PROTECTED_VERSION_1) + (*objc_sections)[*nobjc_sections].protected = TRUE; + else + (*objc_sections)[*nobjc_sections].protected = FALSE; (*nobjc_sections)++; } @@ -1284,6 +1289,10 @@ struct section_info *cstring_section) } else cstring_section->size = s.size; + if(sg.flags & SG_PROTECTED_VERSION_1) + cstring_section->protected = TRUE; + else + cstring_section->protected = FALSE; return; } @@ -1664,8 +1673,11 @@ struct section_info *cstring_section_ptr) addr < cstring_section_ptr->addr + cstring_section_ptr->size){ *left = cstring_section_ptr->size - (addr - cstring_section_ptr->addr); - returnValue = (cstring_section_ptr->contents + - (addr - cstring_section_ptr->addr)); + if(cstring_section_ptr->protected == TRUE) + returnValue = "some string from a protected section"; + else + returnValue = (cstring_section_ptr->contents + + (addr - cstring_section_ptr->addr)); } for(i = 0; returnValue != NULL && i < nobjc_sections; i++){ if(addr >= objc_sections[i].addr && diff --git a/cctools/otool/print_objc2_32bit.c b/cctools/otool/print_objc2_32bit.c index 9947746..0a89afc 100644 --- a/cctools/otool/print_objc2_32bit.c +++ b/cctools/otool/print_objc2_32bit.c @@ -307,6 +307,7 @@ struct section_info_32 { uint32_t size; struct relocation_info *relocs; uint32_t nrelocs; + enum bool protected; }; static void walk_pointer_list( @@ -1269,6 +1270,10 @@ uint32_t *database) (*sections)[*nsections].nrelocs, host_byte_sex); } + if(sg.flags & SG_PROTECTED_VERSION_1) + (*sections)[*nsections].protected = TRUE; + else + (*sections)[*nsections].protected = FALSE; (*nsections)++; if(p + sizeof(struct section) > @@ -1334,7 +1339,10 @@ uint32_t nsections) *offset = addr - sections[i].addr; if(left != NULL) *left = sections[i].size - (addr - sections[i].addr); - r = sections[i].contents + (addr - sections[i].addr); + if(sections[i].protected == TRUE) + r = "some string from a protected section"; + else + r = sections[i].contents + (addr - sections[i].addr); return(r); } } diff --git a/cctools/otool/print_objc2_64bit.c b/cctools/otool/print_objc2_64bit.c index a9fe87b..fa86e23 100644 --- a/cctools/otool/print_objc2_64bit.c +++ b/cctools/otool/print_objc2_64bit.c @@ -330,6 +330,8 @@ struct section_info_64 { uint64_t size; struct relocation_info *relocs; uint32_t nrelocs; + enum bool cstring; + enum bool protected; }; static void walk_pointer_list( @@ -1788,6 +1790,14 @@ uint64_t *database) (*sections)[*nsections].nrelocs, host_byte_sex); } + if(sg64.flags & SG_PROTECTED_VERSION_1) + (*sections)[*nsections].protected = TRUE; + else + (*sections)[*nsections].protected = FALSE; + if((s64.flags & SECTION_TYPE) == S_CSTRING_LITERALS) + (*sections)[*nsections].cstring = TRUE; + else + (*sections)[*nsections].cstring = FALSE; (*nsections)++; if(p + sizeof(struct section_64) > @@ -1907,6 +1917,11 @@ struct section_info_64 *cstring_section) } else cstring_section->size = s64.size; + if(sg64.flags & SG_PROTECTED_VERSION_1) + cstring_section->protected = TRUE; + else + cstring_section->protected = FALSE; + cstring_section->cstring = TRUE; return; } @@ -1952,7 +1967,10 @@ uint32_t nsections) *offset = addr - sections[i].addr; if(left != NULL) *left = sections[i].size - (addr - sections[i].addr); - r = sections[i].contents + (addr - sections[i].addr); + if(sections[i].protected == TRUE && sections[i].cstring == TRUE) + r = "some string from a protected section"; + else + r = sections[i].contents + (addr - sections[i].addr); return(r); } } -- 2.11.4.GIT