[odcctools-changes] [151] trunk
source_changes at macosforge.org
source_changes at macosforge.org
Sat Jun 13 22:07:11 PDT 2009
Revision: 151
http://trac.macosforge.org/projects/odcctools/changeset/151
Author: peter at pogma.com
Date: 2009-06-13 22:07:11 -0700 (Sat, 13 Jun 2009)
Log Message:
-----------
Import cctools-698.1 and ld64-85.2.1
Not yet well tested.
Modified Paths:
--------------
trunk/ChangeLog.odcctools
trunk/extract.sh
trunk/files/ar/Makefile.in
trunk/files/as/ppc64/Makefile.in
trunk/files/as/x86_64/Makefile.in
trunk/files/configure.ac
trunk/files/include/Makefile.in
trunk/files/include/foreign/mach/host_info.h
trunk/files/include/foreign/mach/mach_init.h
trunk/files/ld/Makefile.in
trunk/files/ld64/Makefile.in
trunk/files/libmacho/Makefile.in
trunk/files/libstuff/Makefile.in
trunk/files/libstuff/apple_version.c
trunk/files/libstuff/emulated.c
trunk/files/misc/Makefile.in
trunk/files/otool/Makefile.in
trunk/patches/ar/ar-printf.diff
trunk/patches/ar/ar-ranlibpath.diff
trunk/patches/ar/contents.diff
trunk/patches/ar/errno.diff
trunk/patches/as/bignum.diff
trunk/patches/as/driver.c
trunk/patches/as/getc_unlocked.diff
trunk/patches/as/input-scrub.diff
trunk/patches/as/messages.diff
trunk/patches/as/relax.diff
trunk/patches/ld/ld-pb.diff
trunk/patches/ld-sysroot.diff
trunk/patches/ld64/Options-defcross.diff
trunk/patches/misc/libtool-ldpath.diff
trunk/patches/misc/libtool-pb.diff
trunk/patches/misc/ranlibname.diff
trunk/patches/misc/redo_prebinding.nomalloc.diff
trunk/patches/otool/nolibmstub.diff
trunk/patches/otool/noobjc.diff
Added Paths:
-----------
trunk/cctools-698.1.tar.gz
trunk/files/as/arm/
trunk/files/as/arm/Makefile.in
trunk/files/include/foreign/CommonCrypto/
trunk/files/include/foreign/CommonCrypto/CommonDigest.h
trunk/files/include/foreign/mach/mach_time.h
trunk/files/include/foreign/mach/vm_statistics.h
trunk/ld64-85.2.1.tar.gz
trunk/patches/ar/archive.diff
trunk/patches/ar/declare_localtime.diff
trunk/patches/as/arm.c.diff
trunk/patches/as/use_PRI_macros.diff
trunk/patches/include/mach-o/
trunk/patches/ld64/Options-config_h.diff
trunk/patches/ld64/Options_h_includes.diff
trunk/patches/ld64/Thread64_MachOWriterExecutable.diff
trunk/patches/ld64/ld_cpp_signal.diff
trunk/patches/ld64/remove_tmp_math_hack.diff
trunk/patches/libstuff/macosx_deployment_target_default_105.diff
trunk/patches/libstuff/sys_types.diff
Removed Paths:
-------------
trunk/cctools-622.3.tar.bz2
trunk/ld64-59.2.tar.bz2
trunk/patches/ld/relocate-ld64.diff
trunk/patches/ld-Bstatic.diff
trunk/patches/ld64/MachOReaderRelocatable-ctz.diff
trunk/patches/ld64/ld64-case-variables.diff
trunk/patches/misc/libtool-relocate-ld64.diff
Modified: trunk/ChangeLog.odcctools
===================================================================
--- trunk/ChangeLog.odcctools 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/ChangeLog.odcctools 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,3 +1,7 @@
+2009-06-14 Peter O'Gorman <peter at pogma.com>
+
+ * Import cctools-698.1 and ld64-85.2.1
+
2006-09-11 Shantonu Sen <ssen at opendarwin.org>
* Import cctools-622.3 and ld64-59.2
Deleted: trunk/cctools-622.3.tar.bz2
===================================================================
(Binary files differ)
Added: trunk/cctools-698.1.tar.gz
===================================================================
(Binary files differ)
Property changes on: trunk/cctools-698.1.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/extract.sh
===================================================================
--- trunk/extract.sh 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/extract.sh 2009-06-14 05:07:11 UTC (rev 151)
@@ -3,12 +3,12 @@
set -e
CCTOOLSNAME=cctools
-CCTOOLSVERS=622.3
-CCTOOLSDISTFILE=${CCTOOLSNAME}-${CCTOOLSVERS}.tar.bz2
+CCTOOLSVERS=698.1
+CCTOOLSDISTFILE=${CCTOOLSNAME}-${CCTOOLSVERS}.tar.gz
LD64NAME=ld64
-LD64VERS=59.2
-LD64DISTFILE=${LD64NAME}-${LD64VERS}.tar.bz2
+LD64VERS=85.2.1
+LD64DISTFILE=${LD64NAME}-${LD64VERS}.tar.gz
DISTDIR=odcctools
@@ -52,7 +52,7 @@
PATCHFILESDIR=${TOPSRCDIR}/patches
-PATCHFILES=`cd "${PATCHFILESDIR}" && find * -type f \! -path \*/.svn\*`
+PATCHFILES=`cd "${PATCHFILESDIR}" && find * -type f \! -path \*/.svn\* | sort`
ADDEDFILESDIR=${TOPSRCDIR}/files
@@ -62,17 +62,17 @@
fi
mkdir -p ${DISTDIR}
-tar ${TARSTRIP}=1 -jxf ${CCTOOLSDISTFILE} -C ${DISTDIR}
+tar ${TARSTRIP}=1 -zxf ${CCTOOLSDISTFILE} -C ${DISTDIR}
mkdir -p ${DISTDIR}/ld64
-tar ${TARSTRIP}=1 -jxf ${LD64DISTFILE} -C ${DISTDIR}/ld64
+tar ${TARSTRIP}=1 -zxf ${LD64DISTFILE} -C ${DISTDIR}/ld64
find ${DISTDIR}/ld64/doc/ -type f -exec cp "{}" ${DISTDIR}/man \;
# Clean the source a bit
find ${DISTDIR} -name \*.orig -exec rm -f "{}" \;
rm -rf ${DISTDIR}/{cbtlibs,dyld,file,gprof,libdyld,mkshlib,profileServer}
-if [ $USESDK -eq 1 ]; then
- SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk
+if [ $USESDK -eq 999 ]; then
+ SDKROOT=/Developer/SDKs/MacOSX10.5.sdk
echo "Merging content from $SDKROOT"
if [ ! -d "$SDKROOT" ]; then
echo "$SDKROOT must be present" 1>&2
Modified: trunk/files/ar/Makefile.in
===================================================================
--- trunk/files/ar/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/ar/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -7,6 +7,7 @@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
+datarootdir = @datarootdir@
VPATH = @srcdir@
Added: trunk/files/as/arm/Makefile.in
===================================================================
--- trunk/files/as/arm/Makefile.in (rev 0)
+++ trunk/files/as/arm/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,5 @@
+ARCH = arm
+
+CFILES_arm = arm.c
+MYDEFS_arm = -DARM
+MYLIBS_arm = -lstuff
Modified: trunk/files/as/ppc64/Makefile.in
===================================================================
--- trunk/files/as/ppc64/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/as/ppc64/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -2,4 +2,4 @@
CFILES_ppc64 = ppc.c
MYDEFS_ppc64 = -DPPC -DARCH64
-MYLIBS_ppc64 = -lstuff64
+MYLIBS_ppc64 = -lstuff
Modified: trunk/files/as/x86_64/Makefile.in
===================================================================
--- trunk/files/as/x86_64/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/as/x86_64/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -2,5 +2,5 @@
CFILES_x86_64 = i386.c
MYDEFS_x86_64 = -DI386 -Di486 -Di586 -Di686 -DARCH64
-MYLIBS_x86_64 = -lstuff64
+MYLIBS_x86_64 = -lstuff
Modified: trunk/files/configure.ac
===================================================================
--- trunk/files/configure.ac 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/configure.ac 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,6 +1,6 @@
-AC_INIT([odcctools], [622.3od16], [odcctools at opendarwin.org])
+AC_INIT([odcctools], [698.1od9], [peter at pogma.com])
AC_PREREQ([2.57])
-AC_REVISION([$Revision: 1.45 $])
+AC_REVISION([$Revision: 1.37 $])
AC_CONFIG_SRCDIR([APPLE_LICENSE])
AC_CONFIG_HEADERS([include/config.h])
@@ -22,21 +22,25 @@
case $target_cpu in
powerpc)
- AC_DEFINE(EMULATED_HOST_CPU_TYPE, 18, [Emulated CPU type])
- AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 100, [Emulated CPU subtype])
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 18, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 100, [Emulated CPU subtype])
;;
powerpc64)
- AC_DEFINE(EMULATED_HOST_CPU_TYPE, 16777234, [Emulated CPU type])
- AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 0, [Emulated CPU subtype])
- ;;
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 16777234, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 0, [Emulated CPU subtype])
+ ;;
i?86)
- AC_DEFINE(EMULATED_HOST_CPU_TYPE, 7, [Emulated CPU type])
- AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 3, [Emulated CPU subtype])
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 7, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 10, [Emulated CPU subtype])
;;
x86_64)
- AC_DEFINE(EMULATED_HOST_CPU_TYPE, 16777223, [Emulated CPU type])
- AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 3, [Emulated CPU subtype])
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 16777223, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 3, [Emulated CPU subtype])
;;
+ arm)
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 12, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 0, [Emulated CPU subtype])
+ ;;
*)
AC_MSG_ERROR([Unsupported target $target_cpu])
;;
@@ -56,16 +60,16 @@
AC_MSG_CHECKING([for configured assembler targets])
AC_ARG_ENABLE([as-targets],
AC_HELP_STRING([--enable-as-targets],
- [space-separated list ("ppc", "ppc64", "i386", "x86_64", "all")]),
+ [space-separated list ("ppc", "ppc64", "i386", "x86_64", "arm", "all")]),
[conftargets="$enableval"],
[conftargets="default"])
case "$conftargets" in
all)
- ASTARGETS="ppc ppc64 i386 x86_64"
+ ASTARGETS="ppc ppc64 i386 z86_64 arm"
;;
default)
- ASTARGETS="ppc ppc64 i386 x86_64"
+ ASTARGETS="ppc ppc64 i386 x86_64 arm"
;;
yes)
AC_MSG_ERROR([no assembler targets configured])
@@ -204,7 +208,6 @@
AC_SUBST([OBJC], [$OBJC])
CFLAGS=$ORIGCFLAGS
-
AC_MSG_CHECKING([if __private_extern__ is supported])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[__private_extern__ int foo;]])],
@@ -222,7 +225,35 @@
[LDFLAGS="$ORIGLDFLAGS"
AC_MSG_RESULT([no])]
)
+AC_LANG_PUSH([C++])
+ORIGCXXFLAGS=$CXXFLAGS
+CXXFLAGS="-Wno-trigraphs"
+AC_MSG_CHECKING([if -Wno-trigraphs is supported])
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [AC_MSG_RESULT([yes])],
+ [CXXFLAGS="$ORIGCXXFLAGS"
+ AC_MSG_RESULT([no])]
+)
+ORIGCXXFLAGS=$CXXFLAGS
+CXXFLAGS="-Wno-deprecated"
+AC_MSG_CHECKING([if -Wno-deprecated is supported])
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [AC_MSG_RESULT([yes])],
+ [CXXFLAGS="$ORIGCXXFLAGS"
+ AC_MSG_RESULT([no])]
+)
+
+ORIGCXXFLAGS=$CXXFLAGS
+CXXFLAGS="-Wno-strict-aliasing"
+AC_MSG_CHECKING([if -Wno-strict-aliasing is supported])
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [AC_MSG_RESULT([yes])],
+ [CXXFLAGS="$ORIGCXXFLAGS"
+ AC_MSG_RESULT([no])]
+)
+
+AC_LANG_POP
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h errno.h limits.h])
if [[ "x$OBJC" != "x" ]]; then
@@ -251,17 +282,27 @@
]
)
-AC_CHECK_FUNCS([strmode qsort_r qsort getattrlist NSIsSymbolNameDefined])
+AC_CHECK_FUNCS([strmode qsort_r qsort getattrlist NSIsSymbolNameDefined strlcpy])
+AC_CHECK_HEADERS([CommonCrypto/CommonDigest.h],[],[SSL_LIBS=-lssl])
+AC_SUBST(SSL_LIBS)
-AC_CHECK_DECLS([getc_unlocked])
+AC_CHECK_DECLS([getc_unlocked, strlcpy])
AH_VERBATIM([HAVE_DECL_GETC_UNLOCKED_REPLACEMENT],
[/* For systems that don't have getc_unlocked, use getc */
#if !HAVE_DECL_GETC_UNLOCKED
# define getc_unlocked(a) getc(a)
#endif])
+AH_VERBATIM([X_DECLS],
+[/* Declare functions that are missing declarations */
+#if !HAVE_DECL_STRLCPY
+#include <sys/types.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+size_t strlcpy(char *dst, const char *src, size_t size);
+#endif])
-
case $host_os in
darwin*)
AC_SUBST([HAVE_FOREIGN_HEADERS],[NO])
@@ -271,12 +312,20 @@
AC_SUBST([EMULATED_OBJ], [emulated.c])
AC_C_BIGENDIAN([AC_SUBST([ENDIAN_FLAG],[-D__BIG_ENDIAN__=1])],
[AC_SUBST([ENDIAN_FLAG],[-D__LITTLE_ENDIAN__=1])])
+ CPPFLAGS="-DNON_NATIVE ${CPPFLAGS}"
;;
esac
COMPONENTS="ar as include libstuff libmacho ld ld64 man misc otool"
AC_SUBST([COMPONENTS], [$COMPONENTS])
+AC_CHECK_FUNC([uuid_generate_random],[],
+ [AC_CHECK_LIB([uuid],[uuid_generate_random],
+ [UUID_LIBS="-luuid"],
+ [AC_MSG_ERROR(
+ [No uuid_generate_random function found])])])
+AC_SUBST([UUID_LIBS])
+
AC_CONFIG_FILES([Makefile include/Makefile libstuff/Makefile libmacho/Makefile])
AC_CONFIG_FILES([ar/Makefile])
AC_CONFIG_FILES([as/Makefile])
@@ -294,6 +343,9 @@
x86_64)
AC_CONFIG_FILES([as/x86_64/Makefile:as/x86_64/Makefile.in:as/Makefile.arch.in])
;;
+ arm)
+ AC_CONFIG_FILES([as/arm/Makefile:as/arm/Makefile.in:as/Makefile.arch.in])
+ ;;
*)
AC_MSG_ERROR([Unrecognized assembler target $ast])
;;
Modified: trunk/files/include/Makefile.in
===================================================================
--- trunk/files/include/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/include/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -7,7 +7,7 @@
exec_prefix = @exec_prefix@
mandir = @mandir@
includedir = @includedir@
-
+datarootdir = @datarootdir@
VPATH = @srcdir@
INSTALL = @INSTALL@
Added: trunk/files/include/foreign/CommonCrypto/CommonDigest.h
===================================================================
--- trunk/files/include/foreign/CommonCrypto/CommonDigest.h (rev 0)
+++ trunk/files/include/foreign/CommonCrypto/CommonDigest.h 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,9 @@
+#include <openssl/md5.h>
+
+#define CC_MD5_DIGEST_LENGTH MD5_DIGEST_LENGTH
+#define CC_MD5_Init MD5_Init
+#define CC_MD5_Update MD5_Update
+#define CC_MD5_Final MD5_Final
+#define CC_MD5 MD5
+#define CC_MD5_Transform MD5_Transform
+#define CC_MD5_CTX MD5_CTX
Modified: trunk/files/include/foreign/mach/host_info.h
===================================================================
--- trunk/files/include/foreign/mach/host_info.h 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/include/foreign/mach/host_info.h 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,6 @@
#ifndef _MACH_HOST_INFO_H_
#define _MACH_HOST_INFO_H_
+#include <mach/mach_types.h>
typedef integer_t *host_info_t; /* varying array of int. */
@@ -10,6 +11,7 @@
#define HOST_PRIORITY_INFO 5 /* priority information */
#define HOST_SEMAPHORE_TRAPS 7 /* Has semaphore traps */
#define HOST_MACH_MSG_TRAP 8 /* Has mach_msg_trap */
+#define HOST_VM_INFO 2 /* Virtual memory stats */
struct host_basic_info {
integer_t max_cpus; /* max number of CPUs possible */
@@ -41,5 +43,13 @@
#define HOST_SCHED_INFO_COUNT \
(sizeof(host_sched_info_data_t)/sizeof(integer_t))
+/* Routine host_statistics */
+#ifdef __cplusplus
+extern "C" {
+#endif
+kern_return_t host_statistics ( host_t host_priv, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt);
+#ifdef __cplusplus
+}
#endif
+#endif
Modified: trunk/files/include/foreign/mach/mach_init.h
===================================================================
--- trunk/files/include/foreign/mach/mach_init.h 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/include/foreign/mach/mach_init.h 2009-06-14 05:07:11 UTC (rev 151)
@@ -2,13 +2,15 @@
#define _MACH_INIT_
#include <mach/mach_types.h>
-
+#ifdef __cplusplus
+extern "C" {
+#endif
extern mach_port_t mach_task_self_;
extern mach_port_t mach_task_self(void);
extern mach_port_t mach_host_self(void);
extern mach_port_t mach_thread_self(void);
-
+extern mach_port_t mach_host_self(void);
#define mach_task_self() mach_task_self_
#define current_task() mach_task_self()
@@ -21,5 +23,8 @@
mach_port_name_t name
);
+#ifdef __cplusplus
+}
+#endif
#endif
Added: trunk/files/include/foreign/mach/mach_time.h
===================================================================
--- trunk/files/include/foreign/mach/mach_time.h (rev 0)
+++ trunk/files/include/foreign/mach/mach_time.h 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,20 @@
+#ifndef _MACH_TIME_H
+#define _MACH_TIME_H
+#include <mach/mach.h>
+#include <stdint.h>
+struct mach_timebase_info {
+ uint32_t numer;
+ uint32_t denom;
+};
+typedef struct mach_timebase_info *mach_timebase_info_t;
+typedef struct mach_timebase_info mach_timebase_info_data_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+kern_return_t mach_timebase_info( mach_timebase_info_t info);
+uint64_t mach_absolute_time(void);
+#ifdef __cplusplus
+}
+#endif
+#endif
Added: trunk/files/include/foreign/mach/vm_statistics.h
===================================================================
--- trunk/files/include/foreign/mach/vm_statistics.h (rev 0)
+++ trunk/files/include/foreign/mach/vm_statistics.h 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution at CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ */
+/*
+ * File: mach/vm_statistics.h
+ * Author: Avadis Tevanian, Jr., Michael Wayne Young, David Golub
+ *
+ * Virtual memory statistics structure.
+ *
+ */
+
+
+#ifndef _MACH_VM_STATISTICS_H_
+#define _MACH_VM_STATISTICS_H_
+#include <mach/machine/vm_types.h>
+
+struct vm_statistics {
+ natural_t free_count; /* # of pages free */
+ natural_t active_count; /* # of pages active */
+ natural_t inactive_count; /* # of pages inactive */
+ natural_t wire_count; /* # of pages wired down */
+ natural_t zero_fill_count; /* # of zero fill pages */
+ natural_t reactivations; /* # of pages reactivated */
+ natural_t pageins; /* # of pageins */
+ natural_t pageouts; /* # of pageouts */
+ natural_t faults; /* # of faults */
+ natural_t cow_faults; /* # of copy-on-writes */
+ natural_t lookups; /* object cache lookups */
+ natural_t hits; /* object cache hits */
+
+ /* added for rev1 */
+ natural_t purgeable_count; /* # of pages purgeable */
+ natural_t purges; /* # of pages purged */
+
+ /* added for rev2 */
+ /*
+ * NB: speculative pages are already accounted for in "free_count",
+ * so "speculative_count" is the number of "free" pages that are
+ * used to hold data that was read speculatively from disk but
+ * haven't actually been used by anyone so far.
+ */
+ natural_t speculative_count; /* # of pages speculative */
+};
+
+typedef struct vm_statistics *vm_statistics_t;
+typedef struct vm_statistics vm_statistics_data_t;
+
+
+/* included for the vm_map_page_query call */
+
+#define VM_PAGE_QUERY_PAGE_PRESENT 0x1
+#define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2
+#define VM_PAGE_QUERY_PAGE_REF 0x4
+#define VM_PAGE_QUERY_PAGE_DIRTY 0x8
+#define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10
+#define VM_PAGE_QUERY_PAGE_COPIED 0x20
+#define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40
+
+
+#endif
Modified: trunk/files/ld/Makefile.in
===================================================================
--- trunk/files/ld/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/ld/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -19,6 +19,8 @@
HAVE_PRIVEXT = @HAVE_PRIVEXT@
HAVE_FOREIGN_HEADERS = @HAVE_FOREIGN_HEADERS@
+UUID_LIBS = @UUID_LIBS@
+SSL_LIBS = @SSL_LIBS@
ifeq ($(HAVE_PRIVEXT),NO)
INCPRIVEXT = -include $(top_srcdir)/include/extern.h
endif
@@ -42,30 +44,31 @@
MYCOMPILEFLAGS = $(WARNINGS) $(MYWARNINGS) $(DEFS) $(MYDEFS) \
$(CPPFLAGS) $(MYINCLUDES) $(CFLAGS) $(MDYNAMICNOPIC)
-MYLINKFLAGS = $(LDFLAGS) $(MYLDFLAGS) $(MYLIBS)
+MYLINKFLAGS = $(LDFLAGS) $(MYLDFLAGS) $(MYLIBS) $(SSL_LIBS) $(UUID_LIBS)
CFILES = ld.c pass1.c objects.c sections.c cstring_literals.c symbols.c \
fvmlibs.c layout.c specs.c pass2.c generic_reloc.c rld.c sets.c \
4byte_literals.c 8byte_literals.c literal_pointers.c dylibs.c \
indirect_sections.c mod_sections.c i860_reloc.c ppc_reloc.c \
m88k_reloc.c hppa_reloc.c sparc_reloc.c coalesced_sections.c uuid.c \
- debugcompunit.c debugline.c
+ debugcompunit.c debugline.c arm_reloc.c
OBJS = $(CFILES:.c=.o)
+
.c.o:
$(CC) $(MYCOMPILEFLAGS) -c -o $@ $<
.PHONY: default clean distclean install
-default: ld
+default: ld_classic
-ld: $(OBJS)
+ld_classic: $(OBJS)
$(CC) -o $@ $^ $(MYLINKFLAGS)
-install: ld
+install: ld_classic
mkdir -p $(DESTDIR)/$(bindir)
- $(INSTALL_PROGRAM) ld \
- $(DESTDIR)/$(bindir)/`echo ld | sed '$(transform)'`
+ $(INSTALL_PROGRAM) ld_classic \
+ $(DESTDIR)/$(bindir)/`echo ld_classic | sed '$(transform)'`
clean:
rm -r -f *.o
Modified: trunk/files/ld64/Makefile.in
===================================================================
--- trunk/files/ld64/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/ld64/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -9,9 +9,10 @@
VPATH = @srcdir@:@srcdir@/src
-CC = @CC@
+CC = @CC@
CXX = @CXX@
-CFLAGS = @CFLAGS@ @CXXFLAGS@
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
WARNINGS = @WARNINGS@
MDYNAMICNOPIC = @MDYNAMICNOPIC@
CPPFLAGS = @CPPFLAGS@
@@ -19,6 +20,8 @@
LDFLAGS = @LDFLAGS@
HAVE_PRIVEXT = @HAVE_PRIVEXT@
HAVE_FOREIGN_HEADERS = @HAVE_FOREIGN_HEADERS@
+UUID_LIBS = @UUID_LIBS@
+SSL_LIBS = @SSL_LIBS@
ifeq ($(HAVE_PRIVEXT),NO)
INCPRIVEXT = -include $(top_srcdir)/include/extern.h
@@ -31,40 +34,46 @@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
transform = @program_transform_name@
+LDPROG = $(shell echo ld_classic | sed '$(transform)')
-MYINCLUDES = -I$(builddir) -I$(srcdir) -I$(srcdir)/src -I$(top_builddir)/include \
+
+MYINCLUDES = -I$(builddir) -I$(srcdir) -I$(srcdir) -I$(srcdir)/Readers \
+ -I$(srcdir)/Writers -I$(top_builddir)/include \
-I$(top_srcdir)/include $(INCPRIVEXT) $(FORHDRS)
MYWARNINGS =
-MYDEFS = -DDEBUG
+MYDEFS = -DDEBUG -DBINDIR="\"$(bindir)\"" -DLDPROG="\"$(LDPROG)\""
MYLDFLAGS = -L$(top_builddir)/libstuff
-MYLIBS = -lstuff
+MYLIBS = -lstuff $(SSL_LIBS) $(UUID_LIBS)
MYCOMPILEFLAGS = $(WARNINGS) $(MYWARNINGS) $(DEFS) $(MYDEFS) \
$(CPPFLAGS) $(MYINCLUDES) $(CFLAGS) $(MDYNAMICNOPIC)
MYLINKFLAGS = $(LDFLAGS) $(MYLDFLAGS) $(MYLIBS)
-CXXFILES = ld.cpp Options.cpp SectCreate.cpp
+CXXFILES = ld.cpp Options.cpp
CFILES = debugline.c
-OBJS = $(CXXFILES:.cpp=.o) $(CFILES:.c=.o)
+OBJS = $(CXXFILES:.cpp=.o)
+OBJS += $(CFILES:.c=.o)
+
.cpp.o:
- $(CXX) $(MYCOMPILEFLAGS) -c -o $@ $<
+ $(CXX) $(MYCOMPILEFLAGS) $(CXXFLAGS) -c -o $@ $<
+
.c.o:
- $(CC) $(MYCOMPILEFLAGS) -c -o $@ $<
+ $(CC) $(MYCOMPILEFLAGS) -c -o $@ $<
.PHONY: default clean distclean install
-default: ld64
+default: ld
-ld64: $(OBJS)
+ld: $(OBJS)
$(CXX) -o $@ $^ $(MYLINKFLAGS)
-install: ld64
+install: ld
mkdir -p $(DESTDIR)/$(bindir)
- $(INSTALL_PROGRAM) ld64 \
- $(DESTDIR)/$(bindir)/`echo ld64 | sed '$(transform)'`
+ $(INSTALL_PROGRAM) ld \
+ $(DESTDIR)/$(bindir)/`echo ld | sed '$(transform)'`
clean:
rm -r -f *.o */*.o
- rm -f ld64
+ rm -f ld
Modified: trunk/files/libmacho/Makefile.in
===================================================================
--- trunk/files/libmacho/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/libmacho/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -34,7 +34,7 @@
MYINCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(INCPRIVEXT) $(FORHDRS)
MYWARNINGS =
-MYDEFS =
+MYDEFS =
MYCOMPILEFLAGS = $(WARNINGS) $(MYWARNINGS) $(DEFS) $(MYDEFS) \
$(CPPFLAGS) $(MYINCLUDES) $(CFLAGS)
Modified: trunk/files/libstuff/Makefile.in
===================================================================
--- trunk/files/libstuff/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/libstuff/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -25,10 +25,11 @@
FORHDRS = -I$(top_srcdir)/include/foreign
endif
+
MYINCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(INCPRIVEXT) $(FORHDRS)
MYWARNINGS =
-MYDEFS =
+MYDEFS =
MYCOMPILEFLAGS = $(WARNINGS) $(MYWARNINGS) $(DEFS) $(MYDEFS) \
$(CPPFLAGS) $(MYINCLUDES) $(CFLAGS) $(MDYNAMICNOPIC)
@@ -40,7 +41,7 @@
breakout.c writeout.c checkout.c fatal_arch.c ofile_get_word.c \
hash_string.c dylib_roots.c guess_short_name.c \
SymLoc.c get_arch_from_host.c crc32.c macosx_deployment_target.c \
- symbol_list.c unix_standard_mode.c @EMULATED_OBJ@ apple_version.c
+ symbol_list.c unix_standard_mode.c lto.c @EMULATED_OBJ@ apple_version.c
OBJS = $(CFILES:.c=.o)
OBJS64 = $(CFILES:.c=.64o)
@@ -48,24 +49,17 @@
.PHONY: default install clean distclean
-default: libstuff.a libstuff64.a
+default: libstuff.a
libstuff.a: $(OBJS)
$(AR) cru $@ $^
$(RANLIB) $@
-libstuff64.a: $(OBJS64)
- $(AR) cru $@ $^
- $(RANLIB) $@
-
$(OBJS): %.o: %.c
$(CC) $(MYCOMPILEFLAGS) -c -o $@ $<
-$(OBJS64): %.64o: %.c
- $(CC) $(MYCOMPILEFLAGS) -DARCH64 -c -o $@ $<
-
clean:
- rm -r -f *.o *.64o
- rm -f libstuff.a libstuff64.a
+ rm -r -f *.o
+ rm -f libstuff.a
install:
Modified: trunk/files/libstuff/apple_version.c
===================================================================
--- trunk/files/libstuff/apple_version.c 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/libstuff/apple_version.c 2009-06-14 05:07:11 UTC (rev 151)
@@ -3,5 +3,4 @@
#endif
const char apple_version[]= PACKAGE_NAME "-" PACKAGE_VERSION;
-const double ld64VersionNumber = 59.2;
-const char ld64VersionString[]= "@(#)PROGRAM:ld64 PROJECT:" PACKAGE_NAME "-" PACKAGE_VERSION "\n";
+const char ldVersionString[]= "@(#)PROGRAM:ld PROJECT:" PACKAGE_NAME "-" PACKAGE_VERSION "\n";
Modified: trunk/files/libstuff/emulated.c
===================================================================
--- trunk/files/libstuff/emulated.c 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/libstuff/emulated.c 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,7 +1,6 @@
#include <config.h>
#include <mach/mach.h>
#include <mach/mach_error.h>
-#include <mach-o/dyld.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@@ -9,9 +8,18 @@
#include <sys/mman.h>
#include <sys/attr.h>
#include <errno.h>
+#include <inttypes.h>
+#include <mach/mach_time.h>
+#include <mach/mach_host.h>
+#include <mach/host_info.h>
+#include <sys/time.h>
+kern_return_t mach_timebase_info( mach_timebase_info_t info) {
+ info->numer = 1;
+ info->denom = 1;
+ return 0;
+}
-
char *mach_error_string(mach_error_t error_value)
{
return "Unknown mach error";
@@ -84,7 +92,10 @@
return 0;
}
-
+kern_return_t host_statistics ( host_t host_priv, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt)
+{
+ return ENOTSUP;
+}
kern_return_t map_fd(
int fd,
vm_offset_t offset,
@@ -107,6 +118,16 @@
return 0;
}
+
+uint64_t mach_absolute_time(void) {
+ uint64_t t = 0;
+ struct timeval tv;
+ if (gettimeofday(&tv,NULL)) return t;
+ t = ((uint64_t)tv.tv_sec << 32) | tv.tv_usec;
+ return t;
+}
+
+
#ifndef HAVE_STRMODE
void strmode(mode_t mode, char *bp)
{
@@ -137,4 +158,69 @@
#endif
+
+int getattrlist(const char* a,void* b,void* c,size_t d,unsigned int e)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+
vm_size_t vm_page_size = 4096; // hardcoded to match expectations of darwin
+
+
+#ifndef HAVE_STRLCPY
+
+/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller at courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <string.h>
+
+
+/*
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+size_t
+strlcpy(char *dst, const char *src, size_t siz)
+{
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
+
+ /* Copy as many bytes as will fit */
+ if (n != 0) {
+ while (--n != 0) {
+ if ((*d++ = *s++) == '\0')
+ break;
+ }
+ }
+
+ /* Not enough room in dst, add NUL and traverse rest of src */
+ if (n == 0) {
+ if (siz != 0)
+ *d = '\0'; /* NUL-terminate dst */
+ while (*s++)
+ ;
+ }
+
+ return(s - src - 1); /* count does not include NUL */
+}
+
+#endif
Modified: trunk/files/misc/Makefile.in
===================================================================
--- trunk/files/misc/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/misc/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -31,13 +31,11 @@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
transform = @program_transform_name@
LDPROG = $(shell echo ld | sed '$(transform)')
-LD64PROG = $(shell echo ld64 | sed '$(transform)')
MYINCLUDES = -I$(builddir) -I$(srcdir) -I$(top_builddir)/include \
-I$(top_srcdir)/include $(INCPRIVEXT) $(FORHDRS)
MYWARNINGS =
-MYDEFS = -DBINDIR="\"$(bindir)\"" -DLDPROG="\"$(LDPROG)\"" \
- -DLD64PROG="\"$(LD64PROG)\""
+MYDEFS = -DBINDIR="\"$(bindir)\"" -DLDPROG="\"$(LDPROG)\""
MYLDFLAGS = -L$(top_builddir)/libstuff
MYLIBS = -lstuff
Modified: trunk/files/otool/Makefile.in
===================================================================
--- trunk/files/otool/Makefile.in 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/files/otool/Makefile.in 2009-06-14 05:07:11 UTC (rev 151)
@@ -35,7 +35,7 @@
MYINCLUDES = -I$(builddir) -I$(srcdir) -I$(top_builddir)/include \
-I$(top_srcdir)/include $(INCPRIVEXT) $(FORHDRS)
MYWARNINGS =
-MYDEFS =
+MYDEFS =
MYLDFLAGS = -L$(top_builddir)/libstuff
MYLIBS =
@@ -46,45 +46,41 @@
CFILES = 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
-CFILES_extra = print_objc.c ofile.c
+ sparc_disasm.c arm_disasm.c
+ifneq ($(OBJC),)
+CFILES += print_objc.c print_objc2_32bit.c print_objc2_64bit.c
+endif
OBJS = $(CFILES:.c=.o)
-OBJS64 = $(CFILES:.c=.64o)
.PHONY: default clean distclean install
-default: otool otool64
+default: otool
$(OBJS): %.o: %.c
$(CC) $(MYCOMPILEFLAGS) -c -o $@ $<
-$(OBJS64): %.64o: %.c
- $(CC) $(MYCOMPILEFLAGS) -DARCH64 -c -o $@ $<
-otool: $(OBJS) print_objc.o ofile.o
+otool: $(OBJS) ofile.o
$(CC) -o $@ $^ $(MYLINKFLAGS) -lstuff
-otool64: $(OBJS64) print_objc.64o ofile.64o
- $(CC) -o $@ $^ $(MYLINKFLAGS) -lstuff64
ofile.o: $(top_srcdir)/libstuff/ofile.c
$(CC) -DOTOOL $(MYCOMPILEFLAGS) -c -o $@ $<
-ofile.64o: $(top_srcdir)/libstuff/ofile.c
- $(CC) -DOTOOL $(MYCOMPILEFLAGS) -DARCH64 -c -o $@ $<
+print_objc2_32bit.o: print_objc2_32bit.c
+ $(CC) $(OBJC) $(MYCOMPILEFLAGS) -c -o $@ $<
+
+print_objc2_64bit.o: print_objc2_64bit.c
+ $(CC) $(OBJC) $(MYCOMPILEFLAGS) -c -o $@ $<
+
print_objc.o: print_objc.c
$(CC) $(OBJC) $(MYCOMPILEFLAGS) -c -o $@ $<
-print_objc.64o: print_objc.c
- $(CC) $(OBJC) $(MYCOMPILEFLAGS) -DARCH64 -c -o $@ $<
-install: otool otool64
+install: otool
mkdir -p $(DESTDIR)/$(bindir)
$(INSTALL_PROGRAM) otool \
$(DESTDIR)/$(bindir)/`echo otool | sed '$(transform)'`
- $(INSTALL_PROGRAM) otool64 \
- $(DESTDIR)/$(bindir)/`echo otool64 | sed '$(transform)'`
-
clean:
- rm -r -f *.o *.64o
- rm -f otool otool64
+ rm -r -f *.o
+ rm -f otool
Deleted: trunk/ld64-59.2.tar.bz2
===================================================================
(Binary files differ)
Added: trunk/ld64-85.2.1.tar.gz
===================================================================
(Binary files differ)
Property changes on: trunk/ld64-85.2.1.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/patches/ar/ar-printf.diff
===================================================================
--- trunk/patches/ar/ar-printf.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ar/ar-printf.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,44 +1,38 @@
---- ./archive.c.orig 2006-09-09 13:44:16.000000000 -0700
-+++ ./archive.c 2006-09-09 13:44:25.000000000 -0700
-@@ -310,24 +310,24 @@
- name, OLDARMAXNAME, name);
- (void)fflush(stderr);
- }
-- (void)sprintf(hb, HDR3, name, (long int)sb->st_mtimespec.tv_sec,
-+ (void)sprintf(hb, HDR3, name, (long int)sb->st_mtime,
+--- ./contents.c.orig 2009-06-11 12:30:55.000000000 -0500
++++ ./contents.c 2009-06-11 12:30:59.000000000 -0500
+@@ -104,7 +104,7 @@
+ if (options & AR_V) {
+ (void)strmode(chdr.mode, buf);
+ (void)printf("%s %6d/%-6d %8qd ",
+- buf + 1, chdr.uid, chdr.gid, chdr.size);
++ buf + 1, chdr.uid, chdr.gid, (int64_t)chdr.size);
+ tp = localtime(&chdr.date);
+ (void)strftime(buf, sizeof(buf), "%b %e %H:%M %Y", tp);
+ (void)printf("%s %s\n", buf, file);
+--- ./archive.c.orig 2009-06-11 12:30:57.000000000 -0500
++++ ./archive.c 2009-06-11 12:30:59.000000000 -0500
+@@ -313,21 +313,21 @@
+ (void)sprintf(hb, HDR3, name, (long int)sb->st_mtime,
(unsigned int)(u_short)sb->st_uid,
(unsigned int)(u_short)sb->st_gid,
- sb->st_mode, sb->st_size, ARFMAG);
-+ sb->st_mode, (int64_t)sb->st_size, ARFMAG);
++ sb->st_mode, (int64_t)sb->st_size, ARFMAG);
lname = 0;
} else if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
(void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3,
-- (long int)sb->st_mtimespec.tv_sec,
-+ (long int)sb->st_mtime,
+ (long int)sb->st_mtime,
(unsigned int)(u_short)sb->st_uid,
(unsigned int)(u_short)sb->st_gid,
- sb->st_mode, sb->st_size + ((lname + 3) & ~3),
-+ sb->st_mode, (int64_t)sb->st_size + ((lname + 3) & ~3),
++ sb->st_mode, (int64_t)sb->st_size + ((lname + 3) & ~3),
ARFMAG);
else {
lname = 0;
-- (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec,
-+ (void)sprintf(hb, HDR2, name, (long int)sb->st_mtime,
+ (void)sprintf(hb, HDR2, name, (long int)sb->st_mtime,
(unsigned int)(u_short)sb->st_uid,
(unsigned int)(u_short)sb->st_gid,
- sb->st_mode, sb->st_size, ARFMAG);
-+ sb->st_mode, (int64_t)sb->st_size, ARFMAG);
++ sb->st_mode, (int64_t)sb->st_size, ARFMAG);
}
size = sb->st_size;
} else {
---- ./contents.c.orig 2006-09-09 13:44:16.000000000 -0700
-+++ ./contents.c 2006-09-09 13:44:22.000000000 -0700
-@@ -104,7 +104,7 @@
- if (options & AR_V) {
- (void)strmode(chdr.mode, buf);
- (void)printf("%s %6d/%-6d %8qd ",
-- buf + 1, chdr.uid, chdr.gid, chdr.size);
-+ buf + 1, chdr.uid, chdr.gid, (int64_t)chdr.size);
- tp = localtime(&chdr.date);
- (void)strftime(buf, sizeof(buf), "%b %e %H:%M %Y", tp);
- (void)printf("%s %s\n", buf, file);
Modified: trunk/patches/ar/ar-ranlibpath.diff
===================================================================
--- trunk/patches/ar/ar-ranlibpath.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ar/ar-ranlibpath.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./ar.c.orig 2005-07-28 17:37:45.000000000 -0700
-+++ ./ar.c 2006-03-15 20:35:29.000000000 -0800
+--- ./ar.c.orig 2006-04-28 18:41:59.000000000 -0500
++++ ./ar.c 2009-06-11 12:30:42.000000000 -0500
@@ -84,7 +84,7 @@
#include "extern.h"
#include "stuff/execute.h"
Added: trunk/patches/ar/archive.diff
===================================================================
--- trunk/patches/ar/archive.diff (rev 0)
+++ trunk/patches/ar/archive.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,27 @@
+--- ./archive.c.orig 2009-06-11 12:30:56.000000000 -0500
++++ ./archive.c 2009-06-11 12:30:57.000000000 -0500
+@@ -310,21 +310,21 @@
+ name, OLDARMAXNAME, name);
+ (void)fflush(stderr);
+ }
+- (void)sprintf(hb, HDR3, name, (long int)sb->st_mtimespec.tv_sec,
++ (void)sprintf(hb, HDR3, name, (long int)sb->st_mtime,
+ (unsigned int)(u_short)sb->st_uid,
+ (unsigned int)(u_short)sb->st_gid,
+ sb->st_mode, sb->st_size, ARFMAG);
+ lname = 0;
+ } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
+ (void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3,
+- (long int)sb->st_mtimespec.tv_sec,
++ (long int)sb->st_mtime,
+ (unsigned int)(u_short)sb->st_uid,
+ (unsigned int)(u_short)sb->st_gid,
+ sb->st_mode, sb->st_size + ((lname + 3) & ~3),
+ ARFMAG);
+ else {
+ lname = 0;
+- (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec,
++ (void)sprintf(hb, HDR2, name, (long int)sb->st_mtime,
+ (unsigned int)(u_short)sb->st_uid,
+ (unsigned int)(u_short)sb->st_gid,
+ sb->st_mode, sb->st_size, ARFMAG);
Modified: trunk/patches/ar/contents.diff
===================================================================
--- trunk/patches/ar/contents.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ar/contents.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./contents.c.orig 2003-08-12 17:02:29.000000000 -0700
-+++ ./contents.c 2006-03-15 20:35:29.000000000 -0800
+--- ./contents.c.orig 2003-08-12 19:02:29.000000000 -0500
++++ ./contents.c 2009-06-11 12:30:55.000000000 -0500
@@ -75,7 +75,7 @@
#include <fcntl.h>
#include <stdio.h>
Added: trunk/patches/ar/declare_localtime.diff
===================================================================
--- trunk/patches/ar/declare_localtime.diff (rev 0)
+++ trunk/patches/ar/declare_localtime.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,10 @@
+--- ./contents.c.orig 2009-06-11 12:30:59.000000000 -0500
++++ ./contents.c 2009-06-11 12:31:09.000000000 -0500
+@@ -68,6 +68,7 @@
+
+ #include <sys/param.h>
+ #include <sys/stat.h>
++#include <time.h>
+ #include <sys/time.h>
+
+ #include <ar.h>
Modified: trunk/patches/ar/errno.diff
===================================================================
--- trunk/patches/ar/errno.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ar/errno.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,16 @@
---- ./archive.c.orig 2004-11-12 12:16:56.000000000 -0800
-+++ ./archive.c 2006-03-15 20:35:29.000000000 -0800
+--- ./misc.c.orig 2003-08-12 19:02:39.000000000 -0500
++++ ./misc.c 2009-06-11 12:30:56.000000000 -0500
+@@ -164,7 +164,7 @@
+ badfmt()
+ {
+
+- errno = EFTYPE;
++ errno = EINVAL;
+ err(1, "%s", archive);
+ }
+
+--- ./archive.c.orig 2004-11-12 14:16:56.000000000 -0600
++++ ./archive.c 2009-06-11 12:30:56.000000000 -0500
@@ -151,7 +151,7 @@
/* Locking seems to not be working */
case ENOTSUP:
@@ -9,14 +20,3 @@
default:
/* Filesystem does not support locking */
break;
---- ./misc.c.orig 2003-08-12 17:02:39.000000000 -0700
-+++ ./misc.c 2006-03-15 20:35:29.000000000 -0800
-@@ -164,7 +164,7 @@
- badfmt()
- {
-
-- errno = EFTYPE;
-+ errno = EINVAL;
- err(1, "%s", archive);
- }
-
Added: trunk/patches/as/arm.c.diff
===================================================================
--- trunk/patches/as/arm.c.diff (rev 0)
+++ trunk/patches/as/arm.c.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,21 @@
+--- ./arm.c.orig 2008-03-25 19:37:24.000000000 -0500
++++ ./arm.c 2009-06-11 12:30:39.000000000 -0500
+@@ -16,6 +16,18 @@
+ #include "opcode/arm.h"
+
+ #define ISALNUM(xXx) (isalnum(xXx))
++#ifndef CPU_SUBTYPE_ARM_V5TEJ
++ #define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7)
++#endif
++#ifndef CPU_SUBTYPE_ARM_XSCALE
++ #define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8)
++#endif
++#ifndef CPU_SUBTYPE_ARM_V7
++ #define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9)
++#endif
++#ifndef N_ARM_THUMB_DEF
++ #define N_ARM_THUMB_DEF 0x0008
++#endif
+
+ /*
+ * These are the default cputype and cpusubtype for the arm architecture.
Modified: trunk/patches/as/bignum.diff
===================================================================
--- trunk/patches/as/bignum.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/as/bignum.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./bignum.h.orig 1993-09-09 12:57:03.000000000 -0700
-+++ ./bignum.h 2006-03-15 20:35:30.000000000 -0800
+--- ./bignum.h.orig 1993-09-09 14:57:03.000000000 -0500
++++ ./bignum.h 2009-06-11 12:31:04.000000000 -0500
@@ -29,6 +29,9 @@
* *
\***********************************************************************/
Modified: trunk/patches/as/driver.c
===================================================================
--- trunk/patches/as/driver.c 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/as/driver.c 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,53 +1,98 @@
---- ./driver.c.orig 2003-03-14 18:18:25.000000000 -0800
-+++ ./driver.c 2006-03-15 20:35:27.000000000 -0800
-@@ -27,6 +27,8 @@
+--- driver.c.orig 2009-06-11 12:41:08.000000000 -0500
++++ driver.c 2009-06-11 12:44:22.000000000 -0500
+@@ -27,26 +27,13 @@
+ char **argv,
char **envp)
{
- const char *LIB =
-+ ASLIBEXECDIR;
-+#if 0
- #if defined(__OPENSTEP__) || defined(__HERA__) || \
- defined(__GONZO_BUNSEN_BEAKER__) || defined(__KODIAK__)
- "/usr/libexec/";
-@@ -40,6 +42,7 @@
- #else
- "/usr/local/libexec/gcc/darwin/";
- #endif
-+#endif
+- const char *LIB =
+-#if defined(__OPENSTEP__) || defined(__HERA__) || \
+- defined(__GONZO_BUNSEN_BEAKER__) || defined(__KODIAK__)
+- "../libexec/";
+-#else
+- "../libexec/gcc/darwin/";
+-#endif
+- const char *LOCALLIB =
+-#if defined(__OPENSTEP__) || defined(__HERA__) || \
+- defined(__GONZO_BUNSEN_BEAKER__) || defined(__KODIAK__)
+- "../local/libexec/";
+-#else
+- "../local/libexec/gcc/darwin/";
+-#endif
++ const char *LIB = ASLIBEXECDIR ;
const char *AS = "/as";
int i;
-@@ -162,6 +165,8 @@
+ unsigned long count, verbose;
+ char *p, c, *arch_name, *as, *as_local;
+- char *prefix, buf[MAXPATHLEN], resolved_name[PATH_MAX];
++ char buf[MAXPATHLEN], resolved_name[PATH_MAX];
+ uint32_t bufsize;
+ struct arch_flag arch_flag;
+ const struct arch_flag *arch_flags, *family_arch_flag;
+@@ -57,17 +44,6 @@
+ /*
+ * Construct the prefix to the assembler driver.
+ */
+- bufsize = MAXPATHLEN;
+- p = buf;
+- i = _NSGetExecutablePath(p, &bufsize);
+- if(i == -1){
+- p = allocate(bufsize);
+- _NSGetExecutablePath(p, &bufsize);
+- }
+- prefix = realpath(p, resolved_name);
+- p = rindex(prefix, '/');
+- if(p != NULL)
+- p[1] = '\0';
+ /*
+ * Process the assembler flags exactly like the assembler would (except
+ * let the assembler complain about multiple flags, bad combinations of
+@@ -167,7 +143,7 @@
+ }
+
+ }
+- as = makestr(prefix, LIB, arch_name, AS, NULL);
++ as = makestr("", LIB, arch_name, AS, NULL);
+
+ /*
+ * If this assembler exist try to run it else print an error message.
+@@ -179,38 +155,19 @@
else
exit(1);
}
-+ as_local = "";
-+#if 0
- as_local = makestr(LOCALLIB, arch_name, AS, NULL);
- if(access(as_local, F_OK) == 0){
- argv[0] = as_local;
-@@ -171,6 +176,8 @@
- exit(1);
- }
+- as_local = makestr(prefix, LOCALLIB, arch_name, AS, NULL);
+- if(access(as_local, F_OK) == 0){
+- argv[0] = as_local;
+- if(execute(argv, verbose))
+- exit(0);
+- else
+- exit(1);
+- }
else{
-+#endif
-+ {
printf("%s: assembler (%s or %s) for architecture %s not "
"installed\n", progname, as, as_local, arch_name);
arch_flags = get_arch_flags();
-@@ -183,6 +190,7 @@
+ count = 0;
+ for(i = 0; arch_flags[i].name != NULL; i++){
+- as = makestr(prefix, LIB, arch_flags[i].name, AS, NULL);
++ as = makestr("", LIB, arch_flags[i].name, AS, NULL);
+ if(access(as, F_OK) == 0){
+ if(count == 0)
+ printf("Installed assemblers are:\n");
printf("%s for architecture %s\n", as, arch_flags[i].name);
count++;
}
-+#if 0
- else{
- as_local = makestr(LOCALLIB, arch_flags[i].name, AS, NULL);
- if(access(as_local, F_OK) == 0){
-@@ -193,6 +201,7 @@
- count++;
- }
- }
-+#endif
+- else{
+- as_local = makestr(prefix, LOCALLIB, arch_flags[i].name,
+- AS, NULL);
+- if(access(as_local, F_OK) == 0){
+- if(count == 0)
+- printf("Installed assemblers are:\n");
+- printf("%s for architecture %s\n", as_local,
+- arch_flags[i].name);
+- count++;
+- }
+- }
}
if(count == 0)
printf("%s: no assemblers installed\n", progname);
Modified: trunk/patches/as/getc_unlocked.diff
===================================================================
--- trunk/patches/as/getc_unlocked.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/as/getc_unlocked.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,18 @@
---- ./app.c.orig 2004-07-29 08:46:41.000000000 -0700
-+++ ./app.c 2006-03-15 20:35:28.000000000 -0800
+--- ./read.c.orig 2008-03-25 19:37:24.000000000 -0500
++++ ./read.c 2009-06-11 12:30:36.000000000 -0500
+@@ -60,6 +60,10 @@
+ #include "i386.h"
+ #endif
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ /*
+ * Parsing of input is done off of this pointer which points to the next char
+ * of source file to parse.
+--- ./app.c.orig 2007-09-07 19:50:38.000000000 -0500
++++ ./app.c 2009-06-11 12:30:36.000000000 -0500
@@ -29,6 +29,10 @@
#include "app.h"
#include "messages.h"
@@ -11,8 +24,8 @@
FILE *scrub_file = NULL;
char *scrub_string = NULL;
char *scrub_last_string = NULL;
---- ./input-file.c.orig 2004-07-29 08:47:06.000000000 -0700
-+++ ./input-file.c 2006-03-15 20:35:28.000000000 -0800
+--- ./input-file.c.orig 2004-07-29 10:47:06.000000000 -0500
++++ ./input-file.c 2009-06-11 12:30:36.000000000 -0500
@@ -37,6 +37,10 @@
#include "app.h"
#include "as.h"
@@ -24,16 +37,3 @@
/*
* This variable is non-zero if the file currently being read should be
* preprocessed by app. It is zero if the file can be read straight in.
---- ./read.c.orig 2006-02-10 14:04:41.000000000 -0800
-+++ ./read.c 2006-03-15 20:35:28.000000000 -0800
-@@ -57,6 +57,10 @@
- #include "xmalloc.h"
- #include "app.h"
-
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
- /*
- * Parsing of input is done off of this pointer which points to the next char
- * of source file to parse.
Modified: trunk/patches/as/input-scrub.diff
===================================================================
--- trunk/patches/as/input-scrub.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/as/input-scrub.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./input-scrub.c.orig 2003-01-13 16:54:43.000000000 -0800
-+++ ./input-scrub.c 2006-03-15 20:35:29.000000000 -0800
+--- ./input-scrub.c.orig 2006-04-28 18:51:56.000000000 -0500
++++ ./input-scrub.c 2009-06-11 12:30:54.000000000 -0500
@@ -372,14 +372,7 @@
fprintf (stderr,"as:file(%s) %s! ",
filename, gripe
Modified: trunk/patches/as/messages.diff
===================================================================
--- trunk/patches/as/messages.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/as/messages.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./messages.c.orig 2001-07-09 18:14:08.000000000 -0700
-+++ ./messages.c 2006-03-15 20:35:29.000000000 -0800
+--- ./messages.c.orig 2008-02-04 16:27:50.000000000 -0600
++++ ./messages.c 2009-06-11 12:30:54.000000000 -0500
@@ -22,7 +22,6 @@
#ifdef OLD_PROJECTBUILDER_INTERFACE
#include <streams/streams.h>
Modified: trunk/patches/as/relax.diff
===================================================================
--- trunk/patches/as/relax.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/as/relax.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./relax.h.orig 1993-09-09 13:09:18.000000000 -0700
-+++ ./relax.h 2006-03-15 20:35:30.000000000 -0800
+--- ./relax.h.orig 2006-04-28 18:51:56.000000000 -0500
++++ ./relax.h 2009-06-11 12:31:03.000000000 -0500
@@ -1,3 +1,6 @@
+#ifndef _RELAX_H_
+#define _RELAX_H_
Added: trunk/patches/as/use_PRI_macros.diff
===================================================================
--- trunk/patches/as/use_PRI_macros.diff (rev 0)
+++ trunk/patches/as/use_PRI_macros.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,46 @@
+--- ./read.c.orig 2009-06-11 12:30:36.000000000 -0500
++++ ./read.c 2009-06-11 12:31:10.000000000 -0500
+@@ -37,6 +37,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <inttypes.h>
+ #include "stuff/round.h"
+ #include "stuff/arch.h"
+ #include "stuff/best_arch.h"
+@@ -2505,7 +2506,7 @@
+
+ *p = 0;
+ if(strlen(segname) > sizeof(s.segname)){
+- as_bad("segment-name: %s too long (maximum %ld characters)",
++ as_bad("segment-name: %s too long (maximum %" PRIdPTR " characters)",
+ segname, sizeof(s.segname));
+ ignore_rest_of_line();
+ *p = c;
+@@ -2514,7 +2515,7 @@
+
+ *q = 0;
+ if(strlen(sectname) > sizeof(s.sectname)){
+- as_bad("section-name: %s too long (maximum %ld characters)",
++ as_bad("section-name: %s too long (maximum %" PRIdPTR " characters)",
+ sectname, sizeof(s.sectname));
+ ignore_rest_of_line();
+ return;
+@@ -2664,7 +2665,7 @@
+
+ *p = 0;
+ if(strlen(segname) > sizeof(s.segname)){
+- as_bad("segment-name: %s too long (maximum %ld characters)",
++ as_bad("segment-name: %s too long (maximum %" PRIdPTR " characters)",
+ segname, sizeof(s.segname));
+ ignore_rest_of_line();
+ *p = c;
+@@ -2673,7 +2674,7 @@
+
+ *q = 0;
+ if(strlen(sectname) > sizeof(s.sectname)){
+- as_bad("section-name: %s too long (maximum %ld characters)",
++ as_bad("section-name: %s too long (maximum %" PRIdPTR " characters)",
+ sectname, sizeof(s.sectname));
+ ignore_rest_of_line();
+ *p = c;
Modified: trunk/patches/ld/ld-pb.diff
===================================================================
--- trunk/patches/ld/ld-pb.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld/ld-pb.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,5 @@
---- ./ld.c.orig 2006-06-03 11:45:07.000000000 -0700
-+++ ./ld.c 2006-06-03 11:45:08.000000000 -0700
+--- ./ld.c.orig 2008-02-04 16:28:55.000000000 -0600
++++ ./ld.c 2009-06-11 12:31:01.000000000 -0500
@@ -55,12 +55,10 @@
#ifndef RLD
#include "stuff/symbol_list.h"
@@ -13,7 +13,7 @@
#endif
#else /* defined(KLD) && defined(__STATIC__) */
#include <mach/mach.h>
-@@ -3282,6 +3280,7 @@
+@@ -3330,6 +3328,7 @@
void
check_for_ProjectBuilder(void)
{
@@ -21,7 +21,7 @@
char *portName;
#if defined(__OPENSTEP__) || defined(__GONZO_BUNSEN_BEAKER__)
char *hostName;
-@@ -3305,6 +3304,7 @@
+@@ -3353,6 +3352,7 @@
if(ProjectBuilder_port == MACH_PORT_NULL)
return;
talking_to_ProjectBuilder = 1;
@@ -29,7 +29,7 @@
}
/*
-@@ -3316,6 +3316,7 @@
+@@ -3364,6 +3364,7 @@
tell_ProjectBuilder(
char *message)
{
@@ -37,7 +37,7 @@
make_alert(ProjectBuilder_port,
2, /* eventType */
NULL, 0, /* functionName, not used by ProjectBuilder */
-@@ -3323,6 +3324,7 @@
+@@ -3371,6 +3372,7 @@
NULL, 0, /* directory */
0, /* line */
message, strlen(message)+1 > 1024 ? 1024 : strlen(message)+1);
Deleted: trunk/patches/ld/relocate-ld64.diff
===================================================================
--- trunk/patches/ld/relocate-ld64.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld/relocate-ld64.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,20 +0,0 @@
---- ./ld.c.orig 2006-09-11 20:51:23.000000000 -0700
-+++ ./ld.c 2006-09-11 20:51:33.000000000 -0700
-@@ -2024,7 +2024,7 @@
- * 64-bit architectures are handled by ld64
- */
- if(arch_flag.cputype & CPU_ARCH_ABI64) {
-- argv[0] = "/usr/bin/ld64";
-+ argv[0] = BINDIR "/" LD64PROG;
- ld_exit(!execute(argv, 0));
- }
-
-@@ -2913,7 +2913,7 @@
- */
- if(arch_flag.cputype != 0 &&
- arch_flag.cputype & CPU_ARCH_ABI64){
-- argv[0] = "/usr/bin/ld64";
-+ argv[0] = BINDIR "/" LD64PROG;
- ld_exit(!execute(argv, 0));
- }
-
Deleted: trunk/patches/ld-Bstatic.diff
===================================================================
--- trunk/patches/ld-Bstatic.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld-Bstatic.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,177 +0,0 @@
---- ./ld/ld.c.orig 2006-03-28 18:04:08.000000000 -0800
-+++ ./ld/ld.c 2006-06-03 11:45:07.000000000 -0700
-@@ -583,6 +583,9 @@
-
- p = &(argv[i][1]);
- switch(*p){
-+ case 'B':
-+ if(strcmp(p, "Bstatic") && strcmp(p, "Bdynamic")) goto unknown_flag;
-+ break;
- case 'l':
- if(p[1] == '\0')
- fatal("-l: argument missing");
-@@ -2693,6 +2696,16 @@
- else{
- p = &(argv[i][1]);
- switch(*p){
-+ case 'B':
-+ if(strcmp(p, "Bstatic") == 0){
-+ search_lib_extensions[0]=".a";
-+ search_lib_extensions[1]=".dylib";
-+ break;
-+ } else if (strcmp(p, "Bdynamic") == 0){
-+ search_lib_extensions[0]=".dylib";
-+ search_lib_extensions[1]=".a";
-+ break;
-+ }
- case 'b':
- if(strcmp(p, "bundle_loader") == 0){
- /*
---- ./ld/pass1.c.orig 2006-03-28 18:04:16.000000000 -0800
-+++ ./ld/pass1.c 2006-06-03 11:45:07.000000000 -0700
-@@ -128,6 +128,13 @@
-
- /* the pointer to the head of the base object file's segments */
- __private_extern__ struct merged_segment *base_obj_segments = NULL;
-+
-+__private_extern__ char *search_lib_extensions[] = {
-+ ".dylib",
-+ ".a",
-+ NULL
-+};
-+
- #endif /* !defined(RLD) */
-
- #if !defined(SA_RLD) && !(defined(KLD) && defined(__STATIC__))
-@@ -344,6 +351,7 @@
- char *file_name;
- #ifndef RLD
- char *p, *type;
-+ int search_lib_index = 0;
- #endif /* !defined(RLD) */
- kern_return_t r;
- unsigned long file_size;
-@@ -361,7 +369,6 @@
- /* this function" can safely be ignored */
- file_name = NULL;
- #endif /* DEBUG */
--
- fd = -1;
- #ifndef RLD
- if(lname){
-@@ -383,12 +390,11 @@
- search_paths_for_lname(&name[2], &file_name, &fd);
- }
- else{
-- p = mkstr("lib", &name[2], ".dylib", NULL);
-- search_for_file(p, &file_name, &fd);
-- if(fd == -1){
-- p = mkstr("lib", &name[2], ".a", NULL);
-- search_for_file(p, &file_name, &fd);
-- }
-+ while (search_lib_extensions[search_lib_index] && (fd == -1)) {
-+ p = mkstr("lib", &name[2], search_lib_extensions[search_lib_index], NULL);
-+ search_for_file(p, &file_name, &fd);
-+ search_lib_index++;
-+ }
- }
- }
- else{
-@@ -641,15 +647,16 @@
- char **file_name,
- int *fd)
- {
-- *file_name = mkstr(dir, "/", "lib", lname_argument, ".dylib", NULL);
-- if((*fd = open(*file_name, O_RDONLY)) != -1)
-- return;
-- free(*file_name);
--
-- *file_name = mkstr(dir, "/", "lib", lname_argument, ".a", NULL);
-- if((*fd = open(*file_name, O_RDONLY)) != -1)
-- return;
-- free(*file_name);
-+ int search_lib_index=0;
-+ *fd = -1;
-+ while (search_lib_extensions[search_lib_index] && (*fd == -1)) {
-+ *file_name = mkstr(dir, "/", "lib", lname_argument, search_lib_extensions[search_lib_index], NULL);
-+ if((*fd = open(*file_name, O_RDONLY)) != -1)
-+ break;
-+ search_lib_index++;
-+ }
-+ if (*fd == -1)
-+ free(*file_name);
- }
- #endif /* !defined(RLD) */
-
---- ./ld/pass1.h.orig 2006-01-27 15:20:21.000000000 -0800
-+++ ./ld/pass1.h 2006-06-03 11:45:07.000000000 -0700
-@@ -63,6 +63,8 @@
- /* the pointer to the head of the base object file's segments */
- __private_extern__ struct merged_segment *base_obj_segments;
-
-+__private_extern__ char *search_lib_extensions[];
-+
- /*
- * These are pointers to strings and symbols used to search of the table of
- * contents of a library. These have to be can not be local so that routines
---- ./man/ld.1.orig 2006-01-27 15:20:31.000000000 -0800
-+++ ./man/ld.1 2006-06-03 11:45:07.000000000 -0700
-@@ -1738,6 +1738,18 @@
- For dynamic link editor files, specifies the name of the file
- the dynamic link editor will be installed in for programs that use it.
- .TP
-+.BI \-Bstatic
-+Search for static archives before dynamic shared libraries. Both
-+.BI \-Bstatic
-+and
-+.BI \-Bdynamic
-+can be specified multiple times, and affect only the following
-+.BI \-l
-+arguments.
-+.TP
-+.BI \-Bdynamic
-+This is the default. Search for dynamic shared libraries first, then static.
-+.TP
- .BI \-macosx_version_min " version"
- This overrides the
- .B MACOSX_DEPLOYMENT_TARGET
---- ./man/libtool.1.orig 2006-03-14 14:17:42.000000000 -0800
-+++ ./man/libtool.1 2006-06-03 11:45:07.000000000 -0700
-@@ -308,6 +308,8 @@
- .B \-m,
- .B \-dead_strip,
- .B \-no_dead_strip_inits_and_terms,
-+.B \-Bstatic,
-+.B \-Bdynamic,
- .B \-executable_path,
- .B \-syslibroot,
- .B \-no_uuid.
---- ./misc/libtool.c.orig 2006-03-14 14:17:47.000000000 -0800
-+++ ./misc/libtool.c 2006-06-03 11:45:07.000000000 -0700
-@@ -812,6 +812,15 @@
- cmd_flags.files[cmd_flags.nfiles++] = argv[i];
- lflags_seen = TRUE;
- }
-+ else if(strncmp(argv[i], "-Bstatic", 8) == 0 ||
-+ strncmp(argv[i], "-Bdynamic",9) == 0){
-+ if(cmd_flags.ranlib == TRUE){
-+ error("unknown option: %s", argv[i]);
-+ usage();
-+ }
-+ cmd_flags.files[cmd_flags.nfiles++] = argv[i];
-+ lflags_seen = TRUE;
-+ }
- else if(strncmp(argv[i], "-weak-l", 7) == 0){
- if(cmd_flags.ranlib == TRUE){
- error("unknown option: %s", argv[i]);
-@@ -1204,6 +1213,10 @@
- i++;
- continue;
- }
-+ else if(strncmp(cmd_flags.files[i], "-Bstatic",8) == 0 ||
-+ strncmp(cmd_flags.files[i], "-Bdynamic",9) == 0){
-+ continue;
-+ }
- else{
- if(ofile_map(cmd_flags.files[i], NULL, NULL, ofiles + i,
- TRUE) == FALSE)
Modified: trunk/patches/ld-sysroot.diff
===================================================================
--- trunk/patches/ld-sysroot.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld-sysroot.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,5 +1,28 @@
---- ./ld/ld.c.orig 2006-06-03 11:45:08.000000000 -0700
-+++ ./ld/ld.c 2006-06-03 11:45:09.000000000 -0700
+--- ./misc/libtool.c.orig 2009-06-11 12:30:58.000000000 -0500
++++ ./misc/libtool.c 2009-06-11 12:31:02.000000000 -0500
+@@ -57,6 +57,8 @@
+ #else
+ #endif
+
++#include <config.h>
++
+ /* used by error routines as the name of the program */
+ char *progname = NULL;
+
+@@ -1035,6 +1037,11 @@
+ else{
+ next_root = getenv("NEXT_ROOT");
+ }
++ if(next_root == NULL) {
++#ifdef CROSS_SYSROOT
++ next_root = CROSS_SYSROOT;
++#endif
++ }
+ if(next_root != NULL){
+ for(i = 0; standard_dirs[i] != NULL; i++){
+ p = allocate(strlen(next_root) +
+--- ./ld/ld.c.orig 2009-06-11 12:31:01.000000000 -0500
++++ ./ld/ld.c 2009-06-11 12:31:02.000000000 -0500
@@ -81,6 +81,8 @@
#include "layout.h"
#include "pass2.h"
@@ -9,7 +32,7 @@
/* name of this program as executed (argv[0]) */
__private_extern__ char *progname = NULL;
/* indication of an error set in error(), for processing a number of errors
-@@ -1887,6 +1889,11 @@
+@@ -1916,6 +1918,11 @@
else{
next_root = p;
}
@@ -21,26 +44,3 @@
if(next_root != NULL){
for(i = 0; standard_dirs[i] != NULL; i++){
p = allocate(strlen(next_root) +
---- ./misc/libtool.c.orig 2006-06-03 11:45:08.000000000 -0700
-+++ ./misc/libtool.c 2006-06-03 11:45:09.000000000 -0700
-@@ -53,6 +53,8 @@
- #else
- #endif
-
-+#include <config.h>
-+
- /* used by error routines as the name of the program */
- char *progname = NULL;
-
-@@ -986,6 +988,11 @@
- else{
- next_root = getenv("NEXT_ROOT");
- }
-+ if(next_root == NULL) {
-+#ifdef CROSS_SYSROOT
-+ next_root = CROSS_SYSROOT;
-+#endif
-+ }
- if(next_root != NULL){
- for(i = 0; standard_dirs[i] != NULL; i++){
- p = allocate(strlen(next_root) +
Deleted: trunk/patches/ld64/MachOReaderRelocatable-ctz.diff
===================================================================
--- trunk/patches/ld64/MachOReaderRelocatable-ctz.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld64/MachOReaderRelocatable-ctz.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,40 +0,0 @@
---- ./src/MachOReaderRelocatable.hpp.orig 2006-09-11 20:51:41.000000000 -0700
-+++ ./src/MachOReaderRelocatable.hpp 2006-09-11 20:51:50.000000000 -0700
-@@ -383,6 +383,16 @@
- }
- }
-
-+extern "C" {
-+int ctz(uint64_t a) {
-+ int i=0;
-+ while((a & 1) == 0) {
-+ i++;
-+ a >>= 1;
-+ }
-+ return i;
-+}
-+}
-
- template <typename A>
- void SymbolAtom<A>::setSize(uint64_t size)
-@@ -394,17 +404,17 @@
- if ( fAddress == 0 )
- fAlignment = fSection->align();
- else
-- fAlignment = std::min((uint8_t)__builtin_ctz(fAddress), (uint8_t)fSection->align());
-+ fAlignment = std::min((uint8_t)ctz(fAddress), (uint8_t)fSection->align());
- }
- else {
- // For data, compute the alignment base on the address aligned at in object file and the size
-- uint8_t sizeAlign = __builtin_ctz(fSize);
-+ uint8_t sizeAlign = ctz(fSize);
- uint8_t sizeAndSectAlign = std::min((uint8_t)fSection->align(), sizeAlign);
- // If address is zero, can't figure out better alignment than section alignment and size
- if ( fAddress == 0 )
- fAlignment = sizeAndSectAlign;
- else
-- fAlignment = std::min((uint8_t)__builtin_ctz(fAddress), sizeAndSectAlign);
-+ fAlignment = std::min((uint8_t)ctz(fAddress), sizeAndSectAlign);
- }
- }
-
Added: trunk/patches/ld64/Options-config_h.diff
===================================================================
--- trunk/patches/ld64/Options-config_h.diff (rev 0)
+++ trunk/patches/ld64/Options-config_h.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,11 @@
+--- src/Options.cpp.orig 2009-06-11 20:01:53.000000000 -0500
++++ src/Options.cpp 2009-06-11 20:02:24.000000000 -0500
+@@ -30,7 +30,7 @@
+ #include <ctype.h>
+ #include <vector>
+
+-#include "configure.h"
++#include "config.h"
+ #include "Options.h"
+ #include "Architectures.hpp"
+ #include "MachOFileAbstraction.hpp"
Modified: trunk/patches/ld64/Options-defcross.diff
===================================================================
--- trunk/patches/ld64/Options-defcross.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld64/Options-defcross.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,14 +1,5 @@
--- ./src/Options.cpp.orig 2006-06-01 13:13:03.000000000 -0700
+++ ./src/Options.cpp 2006-06-04 09:16:05.000000000 -0700
-@@ -28,7 +28,7 @@
- #include <math.h>
- #include <fcntl.h>
- #include <vector>
--
-+#include "config.h"
-
- #include "Options.h"
-
@@ -1358,6 +1358,13 @@
fSDKPaths.push_back(path);
}
Added: trunk/patches/ld64/Options_h_includes.diff
===================================================================
--- trunk/patches/ld64/Options_h_includes.diff (rev 0)
+++ trunk/patches/ld64/Options_h_includes.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,12 @@
+--- src/Options.h.orig 2009-06-11 20:14:41.000000000 -0500
++++ src/Options.h 2009-06-11 20:15:01.000000000 -0500
+@@ -28,6 +28,9 @@
+
+ #include <stdint.h>
+ #include <mach/machine.h>
++#include <stdlib.h>
++#include <limits.h>
++#include <string.h>
+
+ #include <vector>
+ #include <ext/hash_set>
Added: trunk/patches/ld64/Thread64_MachOWriterExecutable.diff
===================================================================
--- trunk/patches/ld64/Thread64_MachOWriterExecutable.diff (rev 0)
+++ trunk/patches/ld64/Thread64_MachOWriterExecutable.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,15 @@
+--- ./src/MachOWriterExecutable.hpp.orig 2008-05-07 14:30:53.000000000 -0500
++++ ./src/MachOWriterExecutable.hpp 2009-06-11 12:31:08.000000000 -0500
+@@ -46,6 +48,12 @@
+
+ #include "MachOFileAbstraction.hpp"
+
++#ifndef x86_THREAD_STATE64_COUNT
++#define x86_THREAD_STATE64_COUNT 42
++#endif
++#ifndef x86_THREAD_STATE64
++#define x86_THREAD_STATE64 4
++#endif
+
+ //
+ //
Deleted: trunk/patches/ld64/ld64-case-variables.diff
===================================================================
--- trunk/patches/ld64/ld64-case-variables.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/ld64/ld64-case-variables.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,74 +0,0 @@
---- ./src/MachOReaderDylib.hpp.orig 2006-09-06 13:26:13.000000000 -0700
-+++ ./src/MachOReaderDylib.hpp 2006-09-12 13:37:21.000000000 -0700
-@@ -246,13 +246,13 @@
- case LC_DYSYMTAB:
- dynamicInfo = (macho_dysymtab_command<P>*)cmd;
- break;
-- case LC_ID_DYLIB:
-+ case LC_ID_DYLIB: {
- macho_dylib_command<P>* dylibID = (macho_dylib_command<P>*)cmd;
- fDylibInstallPath = strdup(dylibID->name());
- fDylibTimeStamp = dylibID->timestamp();
- fDylibtCurrentVersion = dylibID->current_version();
- fDylibCompatibilityVersion = dylibID->compatibility_version();
-- break;
-+ } break;
- case LC_SUB_UMBRELLA:
- if ( !options.fFlatNamespace ) {
- const char* frameworkLeafName = ((macho_sub_umbrella_command<P>*)cmd)->sub_umbrella();
---- ./src/MachOReaderRelocatable.hpp.orig 2006-09-06 13:32:03.000000000 -0700
-+++ ./src/MachOReaderRelocatable.hpp 2006-09-12 13:38:36.000000000 -0700
-@@ -1544,7 +1544,7 @@
- // not associated with an atom, just copy
- stab.string = symString;
- break;
-- case N_GSYM:
-+ case N_GSYM: {
- // n_value field is NOT atom address ;-(
- // need to find atom by name match
- const char* colon = strchr(symString, ':');
-@@ -1565,7 +1565,7 @@
- fprintf(stderr, "can't find atom for N_GSYM stabs %s in %s\n", symString, path);
- useStab = false;
- }
-- break;
-+ } break;
- case N_FUN:
- // old style stabs without BNSYM
- state = inFun;
-@@ -1603,7 +1603,7 @@
- currentAtom = NULL;
- break;
- case N_LCSYM:
-- case N_STSYM:
-+ case N_STSYM: {
- BaseAtom* nestedAtom = (BaseAtom*)this->findAtomAndOffset(sym->n_value()).atom;
- if ( nestedAtom != NULL ) {
- stab.atom = nestedAtom;
-@@ -1613,7 +1613,7 @@
- fprintf(stderr, "can't find atom for stabs 0x%X at %08llX in %s\n",
- type, (uint64_t)sym->n_value(), path);
- }
-- break;
-+ } break;
- case N_LBRAC:
- case N_RBRAC:
- case N_SLINE:
-@@ -2767,7 +2767,7 @@
- else
- makeReferenceToSymbol(x86_64::kPCRel32GOTLoad, srcAddr, targetSymbol, addend);
- break;
-- case X86_64_RELOC_SUBTRACTOR:
-+ case X86_64_RELOC_SUBTRACTOR: {
- if ( reloc->r_pcrel() )
- throw "X86_64_RELOC_SUBTRACTOR cannot be pc-relative";
- if ( reloc->r_length() < 2 )
-@@ -2829,7 +2829,7 @@
- ref->setFromTargetOffset(-dstAddr);
- else
- ref->setToTargetOffset(dstAddr);
-- break;
-+ } break;
- default:
- fprintf(stderr, "unknown relocation type %d\n", reloc->r_type());
- }
Added: trunk/patches/ld64/ld_cpp_signal.diff
===================================================================
--- trunk/patches/ld64/ld_cpp_signal.diff (rev 0)
+++ trunk/patches/ld64/ld_cpp_signal.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,13 @@
+--- src/ld.cpp.orig 2009-06-11 20:00:40.000000000 -0500
++++ src/ld.cpp 2009-06-11 20:01:04.000000000 -0500
+@@ -47,8 +47,9 @@
+ #include <ext/hash_map>
+ #include <dlfcn.h>
+ #include <AvailabilityMacros.h>
++#include <signal.h>
+
+-#include "configure.h"
++#include "config.h"
+ #include "Options.h"
+
+ #include "ObjectFile.h"
Added: trunk/patches/ld64/remove_tmp_math_hack.diff
===================================================================
--- trunk/patches/ld64/remove_tmp_math_hack.diff (rev 0)
+++ trunk/patches/ld64/remove_tmp_math_hack.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,14 @@
+--- src/ld.cpp.orig 2009-06-11 19:59:13.000000000 -0500
++++ src/ld.cpp 2009-06-11 19:59:23.000000000 -0500
+@@ -21,11 +21,6 @@
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+-// start temp HACK for cross builds
+-extern "C" double log2 ( double );
+-#define __MATH__
+-// end temp HACK for cross builds
+-
+
+ #include <stdlib.h>
+ #include <sys/types.h>
Added: trunk/patches/libstuff/macosx_deployment_target_default_105.diff
===================================================================
--- trunk/patches/libstuff/macosx_deployment_target_default_105.diff (rev 0)
+++ trunk/patches/libstuff/macosx_deployment_target_default_105.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,16 @@
+--- ./macosx_deployment_target.c.orig 2008-02-11 13:07:14.000000000 -0600
++++ ./macosx_deployment_target.c 2009-06-11 12:31:10.000000000 -0500
+@@ -146,10 +146,10 @@
+ * As a last resort we set the default to the highest known shipping
+ * system to date.
+ */
+- value->major = 6;
++ value->major = 5;
+ value->minor = 0;
+- value->name = allocate(strlen("10.6") + 1);
+- strcpy(value->name, "10.6");
++ value->name = allocate(strlen("10.5") + 1);
++ strcpy(value->name, "10.5");
+ warning("unknown value returned by sysctl() for kern.osrelease: %s "
+ "ignored (using %s)", osversion, value->name);
+ /* fall through to also warn about a possble bad user value */
Added: trunk/patches/libstuff/sys_types.diff
===================================================================
--- trunk/patches/libstuff/sys_types.diff (rev 0)
+++ trunk/patches/libstuff/sys_types.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -0,0 +1,23 @@
+--- swap_headers.c.orig 2009-06-11 21:10:12.000000000 -0500
++++ swap_headers.c 2009-06-11 21:10:50.000000000 -0500
+@@ -24,6 +24,8 @@
+ #define __darwin_i386_float_state i386_float_state
+ #define __darwin_i386_thread_state i386_thread_state
+
++#include <sys/types.h>
++
+ #include <mach-o/loader.h>
+ #include <mach/m68k/thread_status.h>
+ #undef MACHINE_THREAD_STATE /* need to undef these to avoid warnings */
+--- ofile_error.c.orig 2009-06-11 21:10:23.000000000 -0500
++++ ofile_error.c 2009-06-11 21:11:00.000000000 -0500
+@@ -20,6 +20,9 @@
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
++
++#include <sys/types.h>
++
+ #include <stdarg.h>
+ #include "stuff/ofile.h"
+ #include "stuff/print.h"
Modified: trunk/patches/misc/libtool-ldpath.diff
===================================================================
--- trunk/patches/misc/libtool-ldpath.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/misc/libtool-ldpath.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,11 +1,11 @@
---- ./libtool.c.orig 2006-06-03 11:45:07.000000000 -0700
-+++ ./libtool.c 2006-06-03 11:45:08.000000000 -0700
-@@ -2377,7 +2377,7 @@
- if((archs[i].arch_flag.cputype & CPU_ARCH_ABI64) == CPU_ARCH_ABI64)
- add_execute_list("ld64");
- else
-- add_execute_list("ld");
-+ add_execute_list(makestr(BINDIR, "/", LDPROG, NULL));
+--- ./libtool.c.orig 2009-06-11 12:30:41.000000000 -0500
++++ ./libtool.c 2009-06-11 12:30:41.000000000 -0500
+@@ -2910,7 +2910,7 @@
+ */
+ for(i = 0; i < narchs || (i == 0 && narchs == 0); i++){
+ reset_execute_list();
+- add_execute_list("ld");
++ add_execute_list(makestr(BINDIR, "/", LDPROG, NULL));
if(narchs != 0 && cmd_flags.arch_only_flag.name == NULL)
add_execute_list("-arch_multiple");
if(archs != NULL){
Modified: trunk/patches/misc/libtool-pb.diff
===================================================================
--- trunk/patches/misc/libtool-pb.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/misc/libtool-pb.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,8 +1,8 @@
---- ./libtool.c.orig 2006-06-03 11:45:08.000000000 -0700
-+++ ./libtool.c 2006-06-03 11:45:08.000000000 -0700
-@@ -47,12 +47,10 @@
- #include "stuff/execute.h"
- #include "stuff/version_number.h"
+--- ./libtool.c.orig 2009-06-11 12:30:41.000000000 -0500
++++ ./libtool.c 2009-06-11 12:30:58.000000000 -0500
+@@ -51,12 +51,10 @@
+ #include "stuff/lto.h"
+ #endif /* LTO_SUPPORT */
-#include "make.h"
#include <mach/mach_init.h>
@@ -13,7 +13,7 @@
#endif
/* used by error routines as the name of the program */
-@@ -2292,6 +2290,7 @@
+@@ -2828,6 +2826,7 @@
char *arch_name,
char *fileName)
{
@@ -21,7 +21,7 @@
char message_buf[1024];
mach_port_t ProjectBuilder_port;
char *portName;
-@@ -2327,6 +2326,7 @@
+@@ -2863,6 +2862,7 @@
NULL, 0,
0,
message_buf, strlen(message_buf) + 1);
Deleted: trunk/patches/misc/libtool-relocate-ld64.diff
===================================================================
--- trunk/patches/misc/libtool-relocate-ld64.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/misc/libtool-relocate-ld64.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,11 +0,0 @@
---- ./libtool.c.orig 2006-06-03 11:45:09.000000000 -0700
-+++ ./libtool.c 2006-06-03 11:45:10.000000000 -0700
-@@ -2382,7 +2382,7 @@
- for(i = 0; i < narchs || (i == 0 && narchs == 0); i++){
- reset_execute_list();
- if((archs[i].arch_flag.cputype & CPU_ARCH_ABI64) == CPU_ARCH_ABI64)
-- add_execute_list("ld64");
-+ add_execute_list(makestr(BINDIR, "/", LD64PROG, NULL));
- else
- add_execute_list(makestr(BINDIR, "/", LDPROG, NULL));
- if(narchs != 0 && cmd_flags.arch_only_flag.name == NULL)
Modified: trunk/patches/misc/ranlibname.diff
===================================================================
--- trunk/patches/misc/ranlibname.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/misc/ranlibname.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,6 +1,6 @@
---- ./libtool.c.orig 2006-03-15 20:35:28.000000000 -0800
-+++ ./libtool.c 2006-03-15 20:35:28.000000000 -0800
-@@ -288,14 +288,9 @@
+--- ./libtool.c.orig 2008-07-09 19:51:58.000000000 -0500
++++ ./libtool.c 2009-06-11 12:30:41.000000000 -0500
+@@ -330,14 +330,9 @@
toc_mode = S_IFREG | (0666 & ~oumask);
(void)umask(oumask);
Modified: trunk/patches/misc/redo_prebinding.nomalloc.diff
===================================================================
--- trunk/patches/misc/redo_prebinding.nomalloc.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/misc/redo_prebinding.nomalloc.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,11 +1,10 @@
---- ./redo_prebinding.c.orig 2006-09-09 13:50:19.000000000 -0700
-+++ ./redo_prebinding.c 2006-09-09 13:50:50.000000000 -0700
-@@ -88,7 +88,7 @@
+--- ./redo_prebinding.c.orig 2008-02-04 16:30:15.000000000 -0600
++++ ./redo_prebinding.c 2009-06-11 12:31:06.000000000 -0500
+@@ -88,7 +88,6 @@
#include <string.h>
#include <limits.h>
#include <libc.h>
-#include <malloc/malloc.h>
-+//#include <malloc/malloc.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <mach-o/stab.h>
Modified: trunk/patches/otool/nolibmstub.diff
===================================================================
--- trunk/patches/otool/nolibmstub.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/otool/nolibmstub.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,17 +1,11 @@
---- ./main.c.orig 2004-12-02 11:06:00.000000000 -0800
-+++ ./main.c 2006-03-15 20:35:28.000000000 -0800
-@@ -2099,6 +2099,8 @@
+--- ./main.c.orig 2008-03-31 19:16:28.000000000 -0500
++++ ./main.c 2009-06-11 12:30:40.000000000 -0500
+@@ -2656,7 +2656,7 @@
}
}
+-#ifndef __DYNAMIC__
+#if 0
-+
/*
* To avoid linking in libm. These variables are defined as they are used in
* pthread_init() to put in place a fast sqrt().
-@@ -2130,3 +2132,5 @@
- {
- return(0);
- }
-+
-+#endif
Modified: trunk/patches/otool/noobjc.diff
===================================================================
--- trunk/patches/otool/noobjc.diff 2006-11-17 14:37:37 UTC (rev 150)
+++ trunk/patches/otool/noobjc.diff 2009-06-14 05:07:11 UTC (rev 151)
@@ -1,8 +1,8 @@
---- ./main.c.orig 2006-03-15 20:35:28.000000000 -0800
-+++ ./main.c 2006-03-15 20:35:29.000000000 -0800
+--- ./main.c.orig 2009-06-11 12:30:40.000000000 -0500
++++ ./main.c 2009-06-11 12:30:52.000000000 -0500
@@ -44,6 +44,10 @@
- #include "hppa_disasm.h"
#include "sparc_disasm.h"
+ #include "arm_disasm.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
@@ -11,13 +11,13 @@
/* Name of this program for error messages (argv[0]) */
char *progname = NULL;
-@@ -997,23 +1001,35 @@
+@@ -1138,14 +1142,19 @@
S_ATTR_SOME_INSTRUCTIONS){
if(strcmp(segname, SEG_OBJC) == 0 &&
strcmp(sectname, "__protocol") == 0 && vflag == TRUE){
+#ifdef HAVE_OBJC_OBJC_RUNTIME_H
- print_objc_protocol_section(ofile_mh, ofile->load_commands,
- ofile->object_byte_sex, ofile->object_addr,
+ print_objc_protocol_section(ofile->load_commands, mh_ncmds,
+ mh_sizeofcmds, ofile->object_byte_sex, ofile->object_addr,
ofile->object_size, vflag);
+#else
+ printf("Objective-C not supported\n");
@@ -28,9 +28,13 @@
strcmp(sectname, "__cstring_object") == 0) &&
vflag == TRUE){
+#ifdef HAVE_OBJC_OBJC_RUNTIME_H
- print_objc_string_object_section(sectname, ofile_mh,
- ofile->load_commands, ofile->object_byte_sex,
- ofile->object_addr, ofile->object_size, vflag);
+ if(mh_cputype & CPU_ARCH_ABI64)
+ print_objc_string_object_section_64(sectname,
+ ofile->load_commands, mh_ncmds, mh_sizeofcmds,
+@@ -1158,12 +1167,19 @@
+ ofile->load_commands, mh_ncmds, mh_sizeofcmds,
+ ofile->object_byte_sex, ofile->object_addr,
+ ofile->object_size, vflag);
+#else
+ printf("Objective-C not supported\n");
+#endif
@@ -38,49 +42,56 @@
else if(strcmp(segname, SEG_OBJC) == 0 &&
strcmp(sectname, "__runtime_setup") == 0 && vflag == TRUE){
+#ifdef HAVE_OBJC_OBJC_RUNTIME_H
- print_objc_runtime_setup_section(ofile_mh,ofile->load_commands,
- ofile->object_byte_sex, ofile->object_addr,
+ print_objc_runtime_setup_section(ofile->load_commands, mh_ncmds,
+ mh_sizeofcmds, ofile->object_byte_sex, ofile->object_addr,
ofile->object_size, vflag);
+#else
+ printf("Objective-C not supported\n");
+#endif
}
- else if(get_sect_info(segname, sectname, ofile_mh,
- ofile->load_commands, ofile->object_byte_sex,
-@@ -1093,10 +1109,14 @@
- ofile->object_size);
-
- if(oflag)
+ #ifdef EFI_SUPPORT
+ else if(strcmp(segname, "__RELOC") == 0 &&
+@@ -1295,12 +1311,16 @@
+ swap_relocation_info(loc_relocs, nloc_relocs,
+ get_host_byte_sex());
+ }
+#ifdef HAVE_OBJC_OBJC_RUNTIME_H
- print_objc_segment(ofile_mh, ofile->load_commands,
- ofile->object_byte_sex, ofile->object_addr,
- ofile->object_size, sorted_symbols,
- nsorted_symbols, vflag);
+ print_objc2_64bit(mh_cputype, ofile->load_commands, mh_ncmds,
+ mh_sizeofcmds, ofile->object_byte_sex,
+ ofile->object_addr, ofile->object_size, symbols64,
+ nsymbols, strings, strings_size, sorted_symbols,
+ nsorted_symbols, ext_relocs, next_relocs,
+ loc_relocs, nloc_relocs, vflag);
+#else
+ printf("Objective-C not supported\n");
+#endif
-
- if(load_commands != NULL)
- free(load_commands);
---- ./print_objc.c.orig 2004-09-15 15:24:36.000000000 -0700
-+++ ./print_objc.c 2006-03-15 20:35:29.000000000 -0800
-@@ -20,6 +20,13 @@
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-+
-+#if HAVE_CONFIG_H
-+#include <config.h>
+ }
+ else if(mh_cputype == CPU_TYPE_ARM){
+ get_linked_reloc_info(ofile->load_commands, mh_ncmds,
+@@ -1332,18 +1352,26 @@
+ swap_relocation_info(loc_relocs, nloc_relocs,
+ get_host_byte_sex());
+ }
++#ifdef HAVE_OBJC_OBJC_RUNTIME_H
+ print_objc2_32bit(mh_cputype, ofile->load_commands, mh_ncmds,
+ mh_sizeofcmds, ofile->object_byte_sex,
+ ofile->object_addr, ofile->object_size, symbols,
+ nsymbols, strings, strings_size, sorted_symbols,
+ nsorted_symbols, ext_relocs, next_relocs,
+ loc_relocs, nloc_relocs, vflag);
++#else
++ printf("Objective-C not supported\n");
+#endif
-+
+ }
+ else{
+#ifdef HAVE_OBJC_OBJC_RUNTIME_H
-+
- #include "stdio.h"
- #include "string.h"
- #include "stuff/target_arch.h"
-@@ -2041,3 +2048,5 @@
+ print_objc_segment(ofile->load_commands,mh_ncmds,mh_sizeofcmds,
+ ofile->object_byte_sex, ofile->object_addr,
+ ofile->object_size, sorted_symbols,
+ nsorted_symbols, vflag);
++#else
++ printf("Objective-C not supported\n");
++#endif
+ }
}
- return(FALSE);
- }
-+
-+#endif // HAVE_OBJC_OBJC_RUNTIME_H
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/odcctools-changes/attachments/20090613/bc4458e2/attachment-0001.html>
More information about the odcctools-changes
mailing list