----- Tagged ld64-84.1.2 2008-04-09 Nick Kledzik -undefined dynamic_lookup busted * src/ld.cpp: don't create proxy atom when scanning for dylib duplicates * unit-tests/test-cases/tentative-and-archive: use -undefined dynamic_lookup ----- Tagged ld64-84.1 2008-03-28 Nick Kledzik ld should prefer architecture-specific variant over generic in fat object file * src/Options.cpp: fully process -arch arguments into fArchitecture and fSubArchitecture * src/ld.cpp: when -arch with a subtype is used, try to find the exact subtype from fat files * unit-tests/test-cases/cpu-sub-types-preference: added test cases for arm and ppc ----- Tagged ld64-84 2008-03-28 Nick Kledzik * src/LTOReader.hpp: don't print lto version, if lto is unavailable 2008-03-26 Nick Kledzik Add LD_WARN_COMMONS to BigBear builds * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file 2008-03-26 Nick Kledzik Need encryption tag in mach-o file linker should adjust arm final linked images so __text is never on the same page as the load commands * src/MachOFileAbstraction.hpp: add support for encryption_info_command * src/Options.cpp: add support for LD_NO_ENCRYPT and -no_encryption * src/MachOWriterExecutable.hpp: add EncryptionLoadCommandsAtom * src/machochecker.cpp: validate LC_ENCRYPTION_INFO 2008-03-25 Nick Kledzik ld64 does not recognize LLVM bitcode archive files * src/MachOReaderArchive.hpp: renamed to src/ArchiveReader.hpp * src/ArchiveReader.hpp: sniff each member and instantiate correct reader * src/ld.cpp: rename mach_o::archive::Reader to archive::Reader * ld64.xcodeproj/project.pbxproj: rename MachOReaderArchive.hpp to ArchiveReader.hpp * unit-tests/test-cases/llvm-integration: added test case 2008-03-25 Nick Kledzik ld64 should switch to new libLTO.dylib interface Produce llvm bc file in 'ld -r' mode if all .o files are llvm bc * src/LTOReader.hpp: rewrite from LLVMReader.hpp to use new lto_* C interface * unit-tests/test-cases/llvm-integration: update and comment * ld64.xcodeproj/project.pbxproj: update to lazy load libLTO.dylib * src/ld.cpp: rework and simplify Linker::optimize() * src/ObjectDump.cpp: Add -nm option 2008-03-25 Nick Kledzik * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem 2008-03-24 Nick Kledzik Xcode 3.1 breaks linkage of libgcj.9.dylib from gcc 4.3.0 * src/MachOWriterExecutable.cpp: Make sure all ivars in Writer are initialized. 2008-03-21 Nick Kledzik * src/Options.cpp: warn if -seg1addr value is not page aligned 2008-03-21 Nick Kledzik Move ARM support outside of __OPEN_SOURCE__ * src/ld.cpp: remove __OPEN_SOURCE__ around arm support * src/LLVMReader.hpp: remove __OPEN_SOURCE__ around arm support * src/MachOReaderDylib.hpp: remove __OPEN_SOURCE__ around arm support * src/ObjectFile.h: remove __OPEN_SOURCE__ around arm support * src/MachOReaderRelocatable.hpp: remove __OPEN_SOURCE__ around arm support * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check * src/MachOWriterExecutable.hpp: remove __OPEN_SOURCE__ around arm support * src/ObjectDump.cpp: remove __OPEN_SOURCE__ around arm support * ld64.xcodeproj/project.pbxproj: remove ARM_SUPPORT from config.h ----- Tagged ld64-83.2 2008-03-15 Nick Kledzik ld64-83 removes OBJC_CLASS_$ symbols from projects, causes catastrophic results * src/Options.cpp: restore "case CPU_TYPE_ARM" in switch statement for .objc_class symbols in .exp files * unit-tests/test-cases/objc-exported_symbols_list: added test case ----- Tagged ld64-83.1 2008-03-14 Nick Kledzik -iphone_version_min ==> -iphoneos_version_min * src/Options.cpp: support -iphoneos_version_min as well ----- Tagged ld64-83 2008-03-10 Nick Kledzik ld needs to strip iphone_version_min option if invoking ld_classic * src/Options.cpp: suppress -iphone_version_min from being passed to ld_classic 2008-03-04 Nick Kledzik ADOBE XCODE: Linker option to lazy load frameworks (cause dyld is too slow) * src/MachOWriterExecutable.hpp: create lazy stubs and LC_LAZY_LOAD_DYLIB for lazy load dylibs * src/Options.cpp: support -lazy-l, -lazy_library, and -lazy_framework * src/MachOFileAbstraction.hpp: add LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS until in cctools * src/MachOReaderDylib.hpp: add isLazyLoadedDylib() * src/ld.cpp: pass lazy helper atom to writer * doc/man/man1/ld.1: document new options * unit-tests/test-cases/lazy-dylib-objc: add test case * unit-tests/test-cases/lazy-dylib: add test case ----- Tagged ld64-82.7 2008-03-07 Nick Kledzik duplicate symbol literal-pointer@__OBJC@__message_refs@... * src/MachOReaderRelocatable.hpp: AnonymousAtom from S_LITERAL_POINTERS section should be weak * unit-tests/test-cases/objc-selector-coalescing: added test case ----- Tagged ld64-82.6 2008-03-04 Nick Kledzik ld crashes building XsanFS for Snow Leopard Builds * src/ld.cpp: add bool dylibsOnly parameter to addJustInTimeAtoms() * unit-tests/test-cases/tentative-and-archive: added test case 2008-03-04 Nick Kledzik ld64 should not force building with gcc 4.0 * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0 2008-02-29 Nick Kledzik Simulator frameworks are being build split-seg and not prebound * src/Options.cpp: only splitseg if prebound 2008-02-29 Nick Kledzik Linker should not make GSYM debug note for .objc_category_* symbols * src/ld.cpp: suppress GSYM debug notes for absolute symbols * unit-tests/test-cases/objc-category-debug-notes: added test case 2008-02-29 Nick Kledzik non-ASCII CFString support is broken * src/MachOReaderRelocatable.hpp: only name and coalesce cfstring constants if they use a __cstring * unit-tests/test-cases/cfstring-utf16: add test case 2008-02-25 Nick Kledzik ld -r -x * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels ----- Tagged ld64-82.5 2008-02-12 Nick Kledzik x86_64: -stack_size failure when large __bss is used * src/ld.cpp: only move section already in __DATA segment to new __huge section * unit-tests/test-cases/stack_size_no_addr: updated test case to add large bss section ----- Tagged ld64-82.4 2008-02-06 Nick Kledzik comdat warnings with ld -r of C++ .o files * unit-tests/test-cases/eh-coalescing-r: added test case * src/ld.cpp: in ld -r mode don't warn about if .eh symbols are not static 2008-02-06 Devang Patel LTO of Bom framework with -dead_strip causes ld(1) crash * src/LLVMReader.hpp: Check fAtom while determining LLVMReference target binding. * unit-tests/test-cases/llvm-integration/Makefile: Add new test case. * unit-tests/test-cases/llvm-integration/a15.c: New. * unit-tests/test-cases/llvm-integration/b15.c: New. * unit-tests/test-cases/llvm-integration/c15.c: New. 2008-02-05 Nick Kledzik * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used ----- Tagged ld64-82.3 2008-02-04 Nick Kledzik ld doesn't seem to understand $ld$add$os... and $ld$hide$os... for 10.6 moves * src/ObjectFile.h: add 10.6 * src/Options.cpp: add 10.6 support * src/MachOReaderDylib.hpp: recognize $os10.6$ ----- Tagged ld64-82.2 2008-01-30 Devang Patel Can't build 64-bit Intel binaries with LTO ld64 fails to build with llvm-gcc-4.2 * src/LLVMReader.hpp: Fix character count typo in strncmp call. Use const char * to initialize temp. string. * ld64.xcodeproj/project.pbxproj: use $(DEVELOPER_DIR) in header search construction instead of hard coding /Developer. ----- Tagged ld64-82.1 2008-01-23 Nick Kledzik * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs 2008-01-22 Nick Kledzik ld uses 32-bits in some places to hold addresses when parsing 64-bit mach-o files * src/MachOReaderRelocatable.hpp: use AddrToAtomMap type that switch address to 64-bits for 64-bit archs * src/MachOWriterExecutable.hpp: verify BR14 does not overflow for external relocs * unit-tests/test-cases/relocs-c: update test case to slide addresses to verify x86_64 .o files ----- Tagged ld64-82 2008-01-18 Nick Kledzik Bad grammar used in ld warning: cannot exported hidden symbol * src/ld.cpp: fix typo in warning string 2008-01-16 Nick Kledzik Bundle Loader does not work anymore when loader is a bundle ld warns of incorrect architecture when linking a bundle to a bundle * src/MachOReaderDylib.hpp: support linking against bundles via -bundle_loader. Clean up error messages * unit-tests/test-cases/bundle_loader: update test case 2008-01-16 Nick Kledzik ld -r -x creates debug notes (stabs) when it should not with -x (keep only global symbols) * src/Options.cpp: in reconfigureDefaults() if -r and -x then -S 2008-01-16 Nick Kledzik if ld crashes while writing output file, it should delete the half written file * src/MachOWriterExecutable.hpp: wrap open/write/close in try block and add signal handlers all to delete output file on failure. 2008-01-16 Devang Patel * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM. 2008-01-16 Nick Kledzik GC-supported library can't be linked into GC-required executable * src/ld.cpp: loosen constraint that all objc code must be compiled with same GC settings and allow gc-compatible code to be linked into anything. * unit-tests/test-cases/objc-gc-checks: update test case 2008-01-15 Nick Kledzik no debug notes for custom named data * src/ld.cpp: in synthesizeDebugNotes() check getSymbolTableInclusion() instead of for leading underscore * unit-tests/test-cases/dwarf-debug-notes: update test case ----- Tagged ld64-81.5 2008-01-14 Devang Patel llvm-gcc-4.2 fails to build Sqlite 3.5.4 with -O4 * src/LLVMReader.hpp: Resolve proxy references. Collect new unbounded references after optimization. * src/ld.cpp: Resolve additional unbounded references after optimization. 2008-01-14 Nick Kledzik PPC Leopard (Xcode 3.0) linker ld gets "Bus error" sometimes * src/MachOReaderRelocatable.hpp: use same code as x86 to parse ppc and arm sect-diff relocs * src/MachOWriterExecutable.hpp: use same code as x86 to write ppc and arm sect-diff relocs 2008-01-11 Nick Kledzik PPC Leopard (Xcode 3.0) linker ld reports "unknown scattered relocation type 4" * src/MachOReaderRelocatable.hpp: add PPC_RELOC_HI16 to scattered reloc parsing * unit-tests/test-cases/relocs-asm/relocs-asm.s: added tests for scattered hi/lo instructions 2008-01-11 Nick Kledzik * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list 2008-01-11 Nick Kledzik ld64(1) man page uses ambiguous term "suffix" * doc/man/man1/ld.1: make meaning of "suffix" more explicit 2008-01-11 Nick Kledzik Obj-C Symbols in Leopard Can't Be Weak Linked * src/MachOWriterExecutable.hpp: set weak and lazy attributes on dummy .objc_class_name undefines to dylibs to support Mac OS X 10.3.x dyld 2008-01-11 Nick Kledzik Unknown error with linker (dyld: unknown external relocation type) * src/ld.cpp: fix crash when SO stabs are not balanced 2008-01-11 Devang Patel LTO does not work if expected output is a dynamic library * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate visibility info. 2000-01-10 Nick Kledzik __cls_refs section is losing S_LITERAL_POINTERS section type * src/MachOWriterExecutable.hpp: special case __cls_refs section * unit-tests/test-cases/objc-literal-pointers: add test case 2008-01-03 Nick Kledzik wrong EH information might be used Created new kGroupSubordinate reference kind to model group comdat. The "signature" atom has kGroupSubordinate references to the other atoms in the group. If the signature atom is coalesced away, the linker follows kGroupSubordinate references and throws away the other members of the group. * unit-tests/test-cases/eh-coalescing: added test case * src/ld.cpp: added markDead() and use propagate to subordinates * src/Architectures.hpp: added kGroupSubordinate * src/MachOReaderRelocatable.hpp: add kGroupSubordinate reference from a function to its .eh atom and if used, from .eh atom to its LSDA atom. * src/MachOWriterExecutable.hpp: handle kGroupSubordinate like kNoFixUp ----- Tagged ld64-81.4.1 2007-12-19 Devang Patel * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check. 2007-12-19 Devang Patel * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion(). 2007-12-19 Devang Patel print LLVM LTO version number in verbose mode * src/LLVMReader.hpp: Add printLLVMVersion() to print llvm version string in verbose mode. * src/Options.cpp: Use printLLVMVersion() in verbose mode. 2007-12-19 Devang Patel print LLVM LTO version number in verbose mode * src/Options.h: Add verbose() method to check fVerbose flag. * src/LLVMReader.hpp: Print LLVM version string in verbose mode. ----- Tagged ld64-81.4 2007-12-18 Devang Patel * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available. ----- Tagged ld64-81.3 2007-12-17 Nick Kledzik * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths 2007-12-17 Devang Patel * src/LLVMReader.hpp: Do not throw exception if LLVMReader is not able to dlopen LTO library. Instead just flag input file as an invalid LLVM bitcode file. 2007-12-14 Nick Kledzik gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all) * src/MachOWriterExecutable.hpp: fix Writer::generatesExternalTextReloc() to allow text relocs * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static 2007-12-14 Devang Patel Enable Link Time Optimization in Opal * src/LLVMReader.hpp: Locate LLVMlto.dylib relative to ld location in Developer folder. * ld64.xcodeproj/project.pbxproj: Add {DEVELOPER_DIR}/usr/include in header search path. * unit-tests/run-all-unit-tests: Set DYLD_FALLBACK_LIBRARY_PATH to find LLVMlto.dylib during unit testing. * unit-tests/testcases/llvm-integration/Makefile: Point LLVMGCC and LLVMGXX to llvm-gcc-4.2 in Developer folder during unit testing. 2007-12-13 Nick Kledzik SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ... * src/MachOReaderRelocatable.hpp: in Reader::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly ----- Tagged ld64-81.2