------ Tagged ld64-59
+----- Tagged ld64-85
-2006-06-22 Nick Kledzik <kledzik@apple.com>
+2008-04-29 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4596726> ld64 lost DWARF debug notes
- MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
- unit-tests/test-cases/dwarf-debug-notes-r: added test case
-
-2006-06-21 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4567995> python 64-bit address miscalculation
- src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
-
-2006-06-21 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
- src/MachOWriterExecutable.hpp: in -r mode, virtual sections don't increment address
-
-
------ Tagged ld64-58
-
-2006-06-16 Nick Kledzik <kledzik@apple.com>
-
- src/rebase.cpp: fix page alignment problem
- src/rebase.cpp: fix endianess problem with local non-lazy pointers
-
-2006-06-15 Nick Kledzik <kledzik@apple.com>
-
- src/rebase.cpp: fix to build in CurryWeed
- ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
-
-2006-06-15 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4495309> Support .objc_class_name_* symbols
- src/ObjectFile.h: Add kSymbolTableInAsAbsolute
- src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
- src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
- unit-tests/test-cases/objc-references: added
-
-2006-06-15 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
- src/MachOWriterExecutable.hpp: add section attribute for sections with code
-
-2006-06-15 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
- src/MachOReaderRelocatable.hpp: only special case Apple's objc runtime objc classes
-
-2006-06-15 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4582999> x86_64: ".align" directive not honored
- src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
-
-2006-06-14 Nick Kledzik <kledzik@apple.com>
+ * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
- <rdar://problem/4585335> jump table into middle of weak symbol causes error
- src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
- src/MachOWriterExecutable.hpp: don't error on absolute references to interior of weak symbols
-2006-06-13 Nick Kledzik <kledzik@apple.com>
+2008-04-29 Nick Kledzik <kledzik@apple.com>
- src/Options.cpp: allow -image_base as an alias for -seg1addr
+ <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
+ * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
-2006-06-13 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4585115> implement -d
- src/Options.h: add fMakeTentativeDefinitionsReal
- src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
- src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
- unit-tests/test-cases/btentative-to-real: added test case
-
-2006-06-13 Nick Kledzik <kledzik@apple.com>
-
- <rdar://problem/4584355> implement -bundle_loader
- src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
- src/Options.cpp: handle -bundle_loader
- src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
- src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
- src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
- unit-tests/test-cases/bundle_loader: added test case
+2008-04-29 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/5866582> 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
-2006-06-12 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
- src/MachOReaderDylib.hpp: in Reader::reExports() compare install path in addition to load path
+2008-04-17 Nick Kledzik <kledzik@apple.com>
+ * src/MachOReaderRelocatable.hpp: better cpu subtype support
-2006-06-10 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4548935> Need rebasing tool
- src/rebase.cpp: added
- unit-tests/test-cases/rebase-basic: added
- doc/man/man1/rebase.1: added
- ld64.xcodeproj/project.pbxproj: added rebase target. changed all targets to build with dwarf
+2008-04-14 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/5733759> ld64 has bad ARM branch island check
+ * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail
-2006-06-10 Nick Kledzik <kledzik@apple.com>
-
- src/machochecker.cpp: add some ppc reloc sanity checking
-
------ Tagged ld64-57
-
-2006-06-06 Nick Kledzik <kledzik@apple.com>
+2008-04-10 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
- ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
- unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
+ * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
-2006-06-06 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4572702> -sectcreate of a 0-byte section fails
- MachOWriterExecutable.cpp: Don't error out on zero length segments
- MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
- there is a writable segment >4GB from base address
+----- Tagged ld64-84.4
-2006-06-04 Eric Christopher <echristo@apple.com>
+2008-04-10 Nick Kledzik <kledzik@apple.com>
- Radar 4560240
- Radar 3964999
- * src/ld.cpp (createReader): Fixed error message.
- (resolve): Ditto.
- (resolveFrom): Ditto.
- (checkUndefines): Ditto.
+ <rdar://problem/5847206> 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-56
+----- Tagged ld64-84.3
-2006-05-23 Nick Kledzik <kledzik@apple.com>
+2008-04-09 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/5852023> -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
- <rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
- ld.cpp: don't limit debug notes to functions starting with underscore
-2006-05-22 Nick Kledzik <kledzik@apple.com>
+----- Tagged ld64-84.2
- <rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
- * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups
+2008-04-04 Nick Kledzik <kledzik@apple.com>
-2006-05-22 Nick Kledzik <kledzik@apple.com>
+ * 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
+
- <rdar://problem/4535044> remove inferring warning
- * ld.cpp: Remove "inferring" warning. If a link failed and now arch was specifed add which arch was
- inferred to error message
+----- Tagged ld64-84.1
-2006-05-19 Nick Kledzik <kledzik@apple.com>
+2008-03-28 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4544001> ld64 does not honor -arch_multiple
- * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
+ <rdar://problem/5720961> 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
+
-2006-05-19 Nick Kledzik <kledzik@apple.com>
+----- Tagged ld64-84
- <rdar://problem/4555973> Support S_16BYTE_LITERALS section types
- * src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
- * src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS
+2008-03-28 Nick Kledzik <kledzik@apple.com>
-2006-05-19 Nick Kledzik <kledzik@apple.com>
+ * src/LTOReader.hpp: don't print lto version, if lto is unavailable
+
- <rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
- * src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing
+2008-03-26 Nick Kledzik <kledzik@apple.com>
------ Tagged ld64-55
+ <rdar://problem/5575399> Add LD_WARN_COMMONS to BigBear builds
+ * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file
+
-2006-05-18 Nick Kledzik <kledzik@apple.com>
+2008-03-26 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
- * src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64
+ <rdar://problem/5797713> Need encryption tag in mach-o file
+ <rdar://problem/5811920> 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
+
-2006-05-18 Nick Kledzik <kledzik@apple.com>
+2008-03-25 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
- * src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references
+ <rdar://problem/5712533> 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
-2006-05-18 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4553555> ld64: .section defaults to read-only
- * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
+2008-03-25 Nick Kledzik <kledzik@apple.com>
-2006-05-18 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5771658> ld64 should switch to new libLTO.dylib interface
+ <rdar://problem/5675690> 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
+
- <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
- * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
+2008-03-25 Nick Kledzik <kledzik@apple.com>
-2006-05-12 Nick Kledzik <kledzik@apple.com>
+ * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem
+ * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem
- * src/Architectures.hpp: add x86::kAbsolute32
- * src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
- * src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind
------ Tagged ld64-54
+2008-03-24 Nick Kledzik <kledzik@apple.com>
-2006-05-11 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5814613> 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.
- <rdar://problem/4545108> CF-393 failes to link for x86_64
- * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable
-2006-05-11 Nick Kledzik <kledzik@apple.com>
+2008-03-21 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4501434> warning arch x86_64 not found using i386
- * src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs
+ * src/Options.cpp: warn if -seg1addr value is not page aligned
+
+2008-03-21 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/5806437> 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
+
-2006-05-10 Nick Kledzik <kledzik@apple.com>
+----- Tagged ld64-83.2
+
+2008-03-15 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/5801620> 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
- <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
- * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
+2008-03-14 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
+ * src/Options.cpp: support -iphoneos_version_min as well
+
-2006-05-08 Nick Kledzik <kledzik@apple.com>
+----- Tagged ld64-83
- <rdar://problem/3894083> Support -dead_strip
- * src/Options.h/cpp: implement -why_load and -why_live. Enable -dead_strip.
- * src/MachOReaderArchive.hpp: implement -why_load
- * src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
- * src/ld.cpp: implement dead code stripping
- * unit-tests/test-cases/dead_strip: added
+2008-03-10 Nick Kledzik <kledzik@apple.com>
------ Tagged ld64-53
+ <rdar://problem/5791543> 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
+
-2006-05-05 Nick Kledzik <kledzik@apple.com>
+2008-03-04 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/4171253> 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
+
- * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
+----- Tagged ld64-82.7
-2006-05-05 Nick Kledzik <kledzik@apple.com>
+2008-03-07 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
- * src/ld.cpp: for SO stabs, associate first and last atom in the SO range
- * src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value
+ <rdar://problem/5787149> 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
-2006-05-05 Nick Kledzik <kledzik@apple.com>
+
+----- Tagged ld64-82.6
- * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
+2008-03-04 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5779681> 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 <kledzik@apple.com>
-2006-05-02 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5775822> ld64 should not force building with gcc 4.0
+ * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0
+
- <rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
- * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
- <rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
- * src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
- is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.
+2008-02-29 Nick Kledzik <kledzik@apple.com>
-2006-05-02 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
+ * src/Options.cpp: only splitseg if prebound
- * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
- overlaps shared region
------ Tagged ld64-52.1
+2008-02-29 Nick Kledzik <kledzik@apple.com>
-2006-05-01 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5774231> 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
- * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
- the __data section too.
------ Tagged ld64-52
+2008-02-29 Nick Kledzik <kledzik@apple.com>
-2006-04-28 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5768970> 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
- <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
- * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
-2006-04-28 Nick Kledzik <kledzik@apple.com>
+2008-02-25 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
- * src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol
+ <rdar://problem/5366363> ld -r -x
+ * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
-2006-04-27 Nick Kledzik <kledzik@apple.com>
+----- Tagged ld64-82.5
- <rdar://problem/4498971> dyld crashes ungracefully on x86_64 when there is an internal exception
- * src/MachOWriterExecutable.cpp: allow non-zero PCRELGOT addends (used by C++ eh frames)
+2008-02-12 Nick Kledzik <kledzik@apple.com>
-2006-04-21 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5738023> 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
+
- * src/Options.cpp: fix default address for ppc64 custom stack
- * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
+----- Tagged ld64-82.4
+2008-02-06 Nick Kledzik <kledzik@apple.com>
+
+ <rdar://problem/5726215> 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
+
-2006-04-14 Nick Kledzik <kledzik@apple.com>
+2008-02-06 Devang Patel <dpatel@apple.com>
- * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
+ <rdar://problem/5724990> 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 <kledzik@apple.com>
------ Tagged ld64-51.1
+ * 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 <kledzik@apple.com>
-2006-04-13 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5721186> 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$
+
- <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
- * src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
- that points to static or global symbols
- * src/ld.cpp: print version of ld64 in error messages
+----- Tagged ld64-82.2
+2008-01-30 Devang Patel <dpatel@apple.com>
------ Tagged ld64-51
+ <rdar://problem/5714833> Can't build 64-bit Intel binaries with LTO
+ <rdar://problem/5714787> 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
-2006-04-11 Nick Kledzik <kledzik@apple.com>
+2008-01-23 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4499168> exported symbols not properly stripped
- * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
+ * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
+
-2006-03-31 Nick Kledzik <kledzik@apple.com>
+2008-01-22 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
- * src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
- * src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that
+ <rdar://problem/5695496> 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 <kledzik@apple.com>
-2006-03-31 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
+ * src/ld.cpp: fix typo in warning string
+
- <rdar://problem/4496499> ld64 should remove generated file if link errors out
- * src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow
+2008-01-16 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5565074> Bundle Loader does not work anymore when loader is a bundle
+ <rdar://problem/5590203> 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 <kledzik@apple.com>
+
+ <rdar://problem/5366363> 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-50
+2008-01-16 Nick Kledzik <kledzik@apple.com>
-2006-03-29 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5566068> 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.
+
- * src/MachOWriterExecutable.hpp: fix x86_64 addends when -multi_module forces an external relocation
+2008-01-16 Devang Patel <dpatel@apple.com>
-2006-03-29 Nick Kledzik <kledzik@apple.com>
+ * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
- * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
- * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
-2006-03-28 Nick Kledzik <kledzik@apple.com>
+2008-01-16 Nick Kledzik <kledzik@apple.com>
- * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
+ <rdar://problem/5593537> 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
------ Tagged ld64-49.1
-2006-03-25 Nick Kledzik <kledzik@apple.com>
+2008-01-15 Nick Kledzik <kledzik@apple.com>
- * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
+ <rdar://problem/5687976> 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
------ Tagged ld64-49
+2008-01-14 Devang Patel <dpatel@apple.com>
-2006-03-24 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5683813> 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.
+
- * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
- <rdar://problem/4488113> ld64 is after processing bad GSYM stabs
- * src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it
+2008-01-14 Nick Kledzik <kledzik@apple.com>
-2006-03-23 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5655246> 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
+
- * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
- external relocation
+2008-01-11 Nick Kledzik <kledzik@apple.com>
-2006-03-23 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5637618> 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
+
- * src/Options.cpp: change macosx-min-version to default to a per-architecture setting
- add warning if -pagezero_size is not page aligned
- * src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
- * src/machochecker.cpp: sanity check relocation records
+2008-01-11 Nick Kledzik <kledzik@apple.com>
------ Tagged ld64-48
+ * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
+
+
+2008-01-11 Nick Kledzik <kledzik@apple.com>
-2006-03-21 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
+ * doc/man/man1/ld.1: make meaning of "suffix" more explicit
+
- <rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
- * src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
- match it to a STAB symbol.
+2008-01-11 Nick Kledzik <kledzik@apple.com>
-2006-03-21 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5633081> 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
+
- <rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
- * src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
- * src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
- * src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image
+2008-01-11 Nick Kledzik <kledzik@apple.com>
-2006-03-21 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5669751> Unknown error with linker (dyld: unknown external relocation type)
+ * src/ld.cpp: fix crash when SO stabs are not balanced
+
- <rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
- * unit-tests/test-cases/filelist: added
- * src/Options.cpp: in Options::loadFileList() handle comma option
+2008-01-11 Devang Patel <dpatel@apple.com>
+ <rdar://problem/5667433> LTO does not work if expected output is a dynamic library
+ * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate
+ visibility info.
------ Tagged ld64-47
+2000-01-10 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5680988> __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-46
-2006-03-10 Nick Kledzik <kledzik@apple.com>
+2008-01-03 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4419505> ld64 should figure out architecture from .o files
- * unit-tests/test-cases/auto-arch: added
- * src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
- * src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
- * src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
- * src/Options.cpp: stop defaulting to ppc64
+ <rdar://problem/5667688> 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
-2006-03-09 Nick Kledzik <kledzik@apple.com>
+2007-12-19 Devang Patel <dpatel@apple.com>
- <rdar://problem/4465004> Need "intentionally left blank" dylib stubs
- * unit-tests/include/common.makefile: add VALID_ARCHS
- * unit-tests/run-all-unit-tests: set up VALID_ARCHS
- * unit-tests/test-cases/blank-stubs: add test case
- * src/ld.cpp: in addDylib(), detect and ignore blank stubs
- * src/MachOReaderDylib.hpp: in constructor, handle blank stubs
+ * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
+
+2007-12-19 Devang Patel <dpatel@apple.com>
-2006-03-09 Nick Kledzik <kledzik@apple.com>
+ * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
+
+2007-12-19 Devang Patel <dpatel@apple.com>
- <rdar://problem/4471424> crash in stub with 2GB pagezero
- * src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used
+ <rdar://problem/5655956> 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.
-2006-03-06 Nick Kledzik <kledzik@apple.com>
+2007-12-19 Devang Patel <dpatel@apple.com>
- * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
+ <rdar://problem/5655956> 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
------ Tagged ld64-45
+2007-12-18 Devang Patel <dpatel@apple.com>
-2006-03-06 Nick Kledzik <kledzik@apple.com>
+ * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
- <rdar://problem/4466930> <rdar://problem/4467982> ld64 failed: rel32 out of range when linking a dylib
- * src/MachOWriterExecutable.cpp: in Writer<x86_64>::fixUpReferenceFinal add (int32_t) cast
+----- Tagged ld64-81.3
-2006-03-06 Nick Kledzik <kledzik@apple.com>
+2007-12-17 Nick Kledzik <kledzik@apple.com>
- <rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
- * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion
+ * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
+
-2006-03-06 Nick Kledzik <kledzik@apple.com>
+2007-12-17 Devang Patel <dpatel@apple.com>
- <rdar://problem/4457818> x86_THREAD_STATE64_COUNT will change, ld64 must adapt
- * src/MachOWriterExecutable.hpp: update ThreadsLoadCommandsAtom<x86_64> for new thread status layout
+ * 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.
------ Tagged ld64-44
-2006-03-04 Nick Kledzik <kledzik@apple.com>
+2007-12-14 Nick Kledzik <kledzik@apple.com>
- * src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
- Error out if .o file contains old __DWARFA style dwarf.
+ <rdar://problem/5645908> gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all)
+ * src/MachOWriterExecutable.hpp: fix Writer<x86>::generatesExternalTextReloc() to allow text relocs
+ * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static
-2006-03-02 Nick Kledzik <kledzik@apple.com>
- * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
+2007-12-14 Devang Patel <dpatel@apple.com>
------ Tagged ld64-43
+ <rdar://problem/5648438> 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 <kledzik@apple.com>
-2006-03-03 Nick Kledzik <kledzik@apple.com>
+ <rdar://problem/5645446> SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ...
+ * src/MachOReaderRelocatable.hpp: in Reader<x86>::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly
+
+----- Tagged ld64-81.2
- <rdar://problem/4465443> RIP-relative offsets aren't handled properly when the instruction has immediate operands
- * src/Architectures.hpp: add x86_64::kPCRel32_*
- * src/MachOReaderRelocatable.hpp: generate x86_64::kPCRel32_*
- * src/MachOWriterExecutable.hpp: process x86_64::kPCRel32_*