X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/4f3e367c520f1fd8affdc77dd9e2b6bc6c3c693b..4be885f63e03d78a3780e8041f107657f85eb5cb:/ChangeLog diff --git a/ChangeLog b/ChangeLog index 1a79a07..ab1e984 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,542 +1,118 @@ -2008-07-10 Nick Kledzik +----- Tagged ld64-95.9 - * src/LTOReader.hpp: improve missing symbol error message +2009-02-13 Nick Kledzik + Back out Linker changes for H2 hang + * src/ld/Options.cpp: remove fPreventPageCrossingBranches + * src/ld/MachOWriterExecutable.hpp: remove layout of __text so there are not page crossing branches + * src/ld/MachOReaderRelocatable.hpp: parse but ignore ARM_THUMB_32BIT_BRANCH reloc -2008-07-08 Nick Kledzik - ld: add support for mllvm LTO options - * src/Options.cpp: support -mllvm option - * src/LTOReader.hpp: call lto_codegen_debug_options() with -mllvm options - * src/ld.cpp: pass llvmOptions to optimize() - * src/Options.h: add fLLVMOptions - * src/ArchiveReader.hpp: add llvmOptions parameter to optimize() - * src/ObjectFile.h: add llvmOptions parameter to optimize() - * unit-tests/test-cases/lto-llvm-options: add test case - - -2008-06-04 Nick Kledzik - - * src/LTOReader.hpp: if lto_codegen_add_module() fails, add explanation to error message - -2008-06-04 Nick Kledzik - - * src/ObjectFile.h: add deadAtoms parameter to optimize() - * src/ld.cpp: ditto - * src/ArchiveReader.hpp: ditto - * src/MachOReaderRelocatable.hpp: handle llvm use of 0x1B pointer encodings in CIEs - * src/LTOReader.hpp: make sure libLTO.dylib knows about any llvm symbol coalesced away - * unit-tests/test-cases/lto-weak-native-override: add test case - - -2008-06-04 Nick Kledzik - - LTO : 176.gcc and 177.mesa build failure at -O4 - * src/LTOReader.hpp: make sure internal is returned by getAtoms() - * unit-tests/test-cases/lto-archive-dylib: update test case - - -2008-05-06 Nick Kledzik - - ARM ld should take W bit off of maxprot for __TEXT segment - * src/MachOWriterExecutable.hpp: for iPhone always set maxprot to be initprot in all segments - - -2008-05-06 Nick Kledzik - - encryptable images may not be signable - * src/MachOWriterExecutable.hpp: use minimum header padding when aligning __text section - - ------ Tagged ld64-85 (Xcode 3.1) - -2008-04-29 Nick Kledzik - - * ld64.xcodeproj/project.pbxproj: is moving from /usr/local/include to /Developer/usr/local/include - - -2008-04-29 Nick Kledzik - - ld doesn't honor "rightmost" -syslibroot argument - * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots - - -2008-04-29 Nick Kledzik - - GLRendererFloat has bad __eh_frame section caused by mixing llvm-gcc and gcc object files - * src/MachOReaderRelocatable.hpp: make all atoms in __eh_frame section have 1-byte alignment - * src/MachOWriterExecutable.hpp: make __eh_frame section have pointer sized alignment - - -2008-04-17 Nick Kledzik - - * src/MachOReaderRelocatable.hpp: better cpu subtype support - - -2008-04-14 Nick Kledzik - - ld64 has bad ARM branch island check - * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail - - -2008-04-10 Nick Kledzik - - * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs - - ------ Tagged ld64-84.4 - -2008-04-10 Nick Kledzik - - SPEC2000/eon built with -mdynamic-no-pic won't run - * src/Architectures.hpp: added arm::kReadOnlyPointer - * src/MachOReaderRelocatable.hpp: generate arm::kReadOnlyPointer - * src/MachOWriterExecutable.hpp: use arm::kReadOnlyPointer - * src/machochecker.cpp: allow MH_PIE bit - * unit-tests/test-cases/switch-jump-table: added test cases - - ------ Tagged ld64-84.3 - -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.2 - -2008-04-04 Nick Kledzik - - * src/ld.cpp: don't add .eh symbols to symbol table in -r mode - * unit-tests/test-cases/eh-coalescing-r: update to test out of order coalescing - - ------ 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 +----- Tagged ld64-95.8.3 -2008-03-14 Nick Kledzik +2009-03-31 Nick Kledzik - -iphone_version_min ==> -iphoneos_version_min - * src/Options.cpp: support -iphoneos_version_min as well + ld might set MH_WEAK_DEFINES when it should not + * src/ld/MachOWriterExecutable.hpp: rescan fRegularDefAtomsThatOverrideADylibsWeakDef and only consider global ones ------ Tagged ld64-83 +----- Tagged ld64-95.8.2 -2008-03-10 Nick Kledzik +2009-03-18 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$ - + * src/ld/MachOReaderRelocatable.hpp: back out -force_cpusubtype_ALL changes ------ Tagged ld64-82.2 -2008-01-30 Devang Patel +----- Tagged ld64-95.8.1 - 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 +2009-03-17 Nick Kledzik + -dead_strip inhibits weak coalescing in no_dead_strip section + * src/ld/ld.cpp: in markDead() remove from fLiveRootAtoms ------ Tagged ld64-82 -2008-01-18 Nick Kledzik +2009-03-17 Nick Kledzik - Bad grammar used in ld warning: cannot exported hidden symbol - * src/ld.cpp: fix typo in warning string - + libgcc fails to build in with ld64-95.8 + * src/ld/MachOReaderRelocatable.hpp: interpret CPU_SUBTYPE_ARM_ALL as CPU_SUBTYPE_ARM_V4T + * src/ld/Options.cpp: interept -force_cpusubtype_ALL as -arch armv4t -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 - +----- Tagged ld64-95.8 -2008-01-16 Nick Kledzik +2009-02-09 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. - + ld64-95.7 crashes building Foundation-678.39 in side build + * src/ld/MachOReaderRelocatable.hpp: handle a zero length section with a label before __cstring section -2008-01-16 Devang Patel - * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM. +----- Tagged ld64-95.7 +2009-02-06 Nick Kledzik -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 + * src/ld/ObjectFile.h: make fAddCompactUnwindEncoding false by default ------ Tagged ld64-81.5 -2008-01-14 Devang Patel +2009-02-06 Nick Kledzik - 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. + ER: add linker option to zero fill empty DATA sections on disk + * src/ld/Options.cpp: add support for -no_zero_fill_sections + * src/ld/MachOReaderRelocatable.hpp: isZeroFill() is only true if fOptimizeZeroFill + * doc/man/man1/ld.1: document -no_zero_fill_sections + * unit-tests/test-cases/no_zero_fill_sections: add test case -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 - +2009-02-05 Nick Kledzik -2008-01-11 Nick Kledzik + label getting resolved to the wrong address. + * src/ld/MachOWriterExecutable.hpp: add findAtomAndOffsetForSection() and use it to disambiguate + * unit-tests/test-cases/label-on-end-of-section: added test case - 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 +2009-01-27 Nick Kledzik - * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list - + Warn -force_cpusubtype_ALL is not supported + * src/ld/Options.cpp: warn if fForceSubtypeAll and fArchitecture is CPU_TYPE_ARM -2008-01-11 Nick Kledzik - ld64(1) man page uses ambiguous term "suffix" - * doc/man/man1/ld.1: make meaning of "suffix" more explicit - +----- Tagged ld64-95.6 -2008-01-11 Nick Kledzik +2009-01-25 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 - + Add support for section start/end labels + * src/ld/ObjectFile.h: add kSectionStart and kSectionEnd + * src/ld/MachOReaderRelocatable.hpp: create SectionBoundaryAtoms as needed + * src/ld/ld.cpp: sort SectionBoundaryAtoms correctly + * src/ld/MachOWriterExecutable.hpp: allow all relocations in preload images -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 - +----- Tagged ld64-95.5 -2008-01-11 Devang Patel +2009-01-15 Nick Kledzik - LTO does not work if expected output is a dynamic library - * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate - visibility info. + * src/ld/MachOWriterExecutable.hpp: in hasPageCrossingBranches() ignore branches preceeded by a branch -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 +----- Tagged ld64-95.4 +2009-01-15 Nick Kledzik -2008-01-03 Nick Kledzik + * src/ld/Options.cpp: handle -kext and -r the same for fPreventPageCrossingBranches - 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 +----- Tagged ld64-95.3 -2007-12-19 Devang Patel +2009-01-14 Nick Kledzik - * 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 + linker should alter layout to prevent armv7 page crossing branches + * src/ld/Options.cpp: set fPreventPageCrossingBranches + * src/ld/MachOWriterExecutable.hpp: adjust layout of __text so there are not page crossing branches + * src/ld/MachOReaderRelocatable.hpp: support new ARM_THUMB_32BIT_BRANCH reloce -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 +----- Tagged ld64-95.2 - 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 +2009-01-06 Nick Kledzik + strip -S fails with "new trie is larger than original"