4 2008-04-29 Nick Kledzik <kledzik@apple.com>
6 * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
9 2008-04-29 Nick Kledzik <kledzik@apple.com>
11 <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
12 * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
15 2008-04-29 Nick Kledzik <kledzik@apple.com>
17 <rdar://problem/5866582> GLRendererFloat has bad __eh_frame section caused by mixing llvm-gcc and gcc object files
18 * src/MachOReaderRelocatable.hpp: make all atoms in __eh_frame section have 1-byte alignment
19 * src/MachOWriterExecutable.hpp: make __eh_frame section have pointer sized alignment
22 2008-04-17 Nick Kledzik <kledzik@apple.com>
24 * src/MachOReaderRelocatable.hpp: better cpu subtype support
27 2008-04-14 Nick Kledzik <kledzik@apple.com>
29 <rdar://problem/5733759> ld64 has bad ARM branch island check
30 * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail
33 2008-04-10 Nick Kledzik <kledzik@apple.com>
35 * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
38 ----- Tagged ld64-84.4
40 2008-04-10 Nick Kledzik <kledzik@apple.com>
42 <rdar://problem/5847206> SPEC2000/eon built with -mdynamic-no-pic won't run
43 * src/Architectures.hpp: added arm::kReadOnlyPointer
44 * src/MachOReaderRelocatable.hpp: generate arm::kReadOnlyPointer
45 * src/MachOWriterExecutable.hpp: use arm::kReadOnlyPointer
46 * src/machochecker.cpp: allow MH_PIE bit
47 * unit-tests/test-cases/switch-jump-table: added test cases
50 ----- Tagged ld64-84.3
52 2008-04-09 Nick Kledzik <kledzik@apple.com>
54 <rdar://problem/5852023> -undefined dynamic_lookup busted
55 * src/ld.cpp: don't create proxy atom when scanning for dylib duplicates
56 * unit-tests/test-cases/tentative-and-archive: use -undefined dynamic_lookup
59 ----- Tagged ld64-84.2
61 2008-04-04 Nick Kledzik <kledzik@apple.com>
63 * src/ld.cpp: don't add .eh symbols to symbol table in -r mode
64 * unit-tests/test-cases/eh-coalescing-r: update to test out of order coalescing
67 ----- Tagged ld64-84.1
69 2008-03-28 Nick Kledzik <kledzik@apple.com>
71 <rdar://problem/5720961> ld should prefer architecture-specific variant over generic in fat object file
72 * src/Options.cpp: fully process -arch arguments into fArchitecture and fSubArchitecture
73 * src/ld.cpp: when -arch with a subtype is used, try to find the exact subtype from fat files
74 * unit-tests/test-cases/cpu-sub-types-preference: added test cases for arm and ppc
79 2008-03-28 Nick Kledzik <kledzik@apple.com>
81 * src/LTOReader.hpp: don't print lto version, if lto is unavailable
84 2008-03-26 Nick Kledzik <kledzik@apple.com>
86 <rdar://problem/5575399> Add LD_WARN_COMMONS to BigBear builds
87 * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file
90 2008-03-26 Nick Kledzik <kledzik@apple.com>
92 <rdar://problem/5797713> Need encryption tag in mach-o file
93 <rdar://problem/5811920> linker should adjust arm final linked images so __text is never on the same page as the load commands
94 * src/MachOFileAbstraction.hpp: add support for encryption_info_command
95 * src/Options.cpp: add support for LD_NO_ENCRYPT and -no_encryption
96 * src/MachOWriterExecutable.hpp: add EncryptionLoadCommandsAtom
97 * src/machochecker.cpp: validate LC_ENCRYPTION_INFO
100 2008-03-25 Nick Kledzik <kledzik@apple.com>
102 <rdar://problem/5712533> ld64 does not recognize LLVM bitcode archive files
103 * src/MachOReaderArchive.hpp: renamed to src/ArchiveReader.hpp
104 * src/ArchiveReader.hpp: sniff each member and instantiate correct reader
105 * src/ld.cpp: rename mach_o::archive::Reader to archive::Reader
106 * ld64.xcodeproj/project.pbxproj: rename MachOReaderArchive.hpp to ArchiveReader.hpp
107 * unit-tests/test-cases/llvm-integration: added test case
110 2008-03-25 Nick Kledzik <kledzik@apple.com>
112 <rdar://problem/5771658> ld64 should switch to new libLTO.dylib interface
113 <rdar://problem/5675690> Produce llvm bc file in 'ld -r' mode if all .o files are llvm bc
114 * src/LTOReader.hpp: rewrite from LLVMReader.hpp to use new lto_* C interface
115 * unit-tests/test-cases/llvm-integration: update and comment
116 * ld64.xcodeproj/project.pbxproj: update to lazy load libLTO.dylib
117 * src/ld.cpp: rework and simplify Linker::optimize()
118 * src/ObjectDump.cpp: Add -nm option
121 2008-03-25 Nick Kledzik <kledzik@apple.com>
123 * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem
124 * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem
127 2008-03-24 Nick Kledzik <kledzik@apple.com>
129 <rdar://problem/5814613> Xcode 3.1 breaks linkage of libgcj.9.dylib from gcc 4.3.0
130 * src/MachOWriterExecutable.cpp: Make sure all ivars in Writer are initialized.
133 2008-03-21 Nick Kledzik <kledzik@apple.com>
135 * src/Options.cpp: warn if -seg1addr value is not page aligned
138 2008-03-21 Nick Kledzik <kledzik@apple.com>
140 <rdar://problem/5806437> Move ARM support outside of __OPEN_SOURCE__
141 * src/ld.cpp: remove __OPEN_SOURCE__ around arm support
142 * src/LLVMReader.hpp: remove __OPEN_SOURCE__ around arm support
143 * src/MachOReaderDylib.hpp: remove __OPEN_SOURCE__ around arm support
144 * src/ObjectFile.h: remove __OPEN_SOURCE__ around arm support
145 * src/MachOReaderRelocatable.hpp: remove __OPEN_SOURCE__ around arm support
146 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
147 * src/MachOWriterExecutable.hpp: remove __OPEN_SOURCE__ around arm support
148 * src/ObjectDump.cpp: remove __OPEN_SOURCE__ around arm support
149 * ld64.xcodeproj/project.pbxproj: remove ARM_SUPPORT from config.h
152 ----- Tagged ld64-83.2
154 2008-03-15 Nick Kledzik <kledzik@apple.com>
156 <rdar://problem/5801620> ld64-83 removes OBJC_CLASS_$ symbols from projects, causes catastrophic results
157 * src/Options.cpp: restore "case CPU_TYPE_ARM" in switch statement for .objc_class symbols in .exp files
158 * unit-tests/test-cases/objc-exported_symbols_list: added test case
161 ----- Tagged ld64-83.1
163 2008-03-14 Nick Kledzik <kledzik@apple.com>
165 <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
166 * src/Options.cpp: support -iphoneos_version_min as well
171 2008-03-10 Nick Kledzik <kledzik@apple.com>
173 <rdar://problem/5791543> ld needs to strip iphone_version_min option if invoking ld_classic
174 * src/Options.cpp: suppress -iphone_version_min from being passed to ld_classic
177 2008-03-04 Nick Kledzik <kledzik@apple.com>
179 <rdar://problem/4171253> ADOBE XCODE: Linker option to lazy load frameworks (cause dyld is too slow)
180 * src/MachOWriterExecutable.hpp: create lazy stubs and LC_LAZY_LOAD_DYLIB for lazy load dylibs
181 * src/Options.cpp: support -lazy-l, -lazy_library, and -lazy_framework
182 * src/MachOFileAbstraction.hpp: add LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS until in cctools
183 * src/MachOReaderDylib.hpp: add isLazyLoadedDylib()
184 * src/ld.cpp: pass lazy helper atom to writer
185 * doc/man/man1/ld.1: document new options
186 * unit-tests/test-cases/lazy-dylib-objc: add test case
187 * unit-tests/test-cases/lazy-dylib: add test case
190 ----- Tagged ld64-82.7
192 2008-03-07 Nick Kledzik <kledzik@apple.com>
194 <rdar://problem/5787149> duplicate symbol literal-pointer@__OBJC@__message_refs@...
195 * src/MachOReaderRelocatable.hpp: AnonymousAtom from S_LITERAL_POINTERS section should be weak
196 * unit-tests/test-cases/objc-selector-coalescing: added test case
199 ----- Tagged ld64-82.6
201 2008-03-04 Nick Kledzik <kledzik@apple.com>
203 <rdar://problem/5779681> ld crashes building XsanFS for Snow Leopard Builds
204 * src/ld.cpp: add bool dylibsOnly parameter to addJustInTimeAtoms()
205 * unit-tests/test-cases/tentative-and-archive: added test case
207 2008-03-04 Nick Kledzik <kledzik@apple.com>
209 <rdar://problem/5775822> ld64 should not force building with gcc 4.0
210 * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0
213 2008-02-29 Nick Kledzik <kledzik@apple.com>
215 <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
216 * src/Options.cpp: only splitseg if prebound
219 2008-02-29 Nick Kledzik <kledzik@apple.com>
221 <rdar://problem/5774231> Linker should not make GSYM debug note for .objc_category_* symbols
222 * src/ld.cpp: suppress GSYM debug notes for absolute symbols
223 * unit-tests/test-cases/objc-category-debug-notes: added test case
226 2008-02-29 Nick Kledzik <kledzik@apple.com>
228 <rdar://problem/5768970> non-ASCII CFString support is broken
229 * src/MachOReaderRelocatable.hpp: only name and coalesce cfstring constants if they use a __cstring
230 * unit-tests/test-cases/cfstring-utf16: add test case
233 2008-02-25 Nick Kledzik <kledzik@apple.com>
235 <rdar://problem/5366363> ld -r -x
236 * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
239 ----- Tagged ld64-82.5
241 2008-02-12 Nick Kledzik <kledzik@apple.com>
243 <rdar://problem/5738023> x86_64: -stack_size failure when large __bss is used
244 * src/ld.cpp: only move section already in __DATA segment to new __huge section
245 * unit-tests/test-cases/stack_size_no_addr: updated test case to add large bss section
248 ----- Tagged ld64-82.4
250 2008-02-06 Nick Kledzik <kledzik@apple.com>
252 <rdar://problem/5726215> comdat warnings with ld -r of C++ .o files
253 * unit-tests/test-cases/eh-coalescing-r: added test case
254 * src/ld.cpp: in ld -r mode don't warn about if .eh symbols are not static
257 2008-02-06 Devang Patel <dpatel@apple.com>
259 <rdar://problem/5724990> LTO of Bom framework with -dead_strip causes ld(1) crash
260 * src/LLVMReader.hpp: Check fAtom while determining LLVMReference target binding.
261 * unit-tests/test-cases/llvm-integration/Makefile: Add new test case.
262 * unit-tests/test-cases/llvm-integration/a15.c: New.
263 * unit-tests/test-cases/llvm-integration/b15.c: New.
264 * unit-tests/test-cases/llvm-integration/c15.c: New.
266 2008-02-05 Nick Kledzik <kledzik@apple.com>
268 * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used
270 ----- Tagged ld64-82.3
272 2008-02-04 Nick Kledzik <kledzik@apple.com>
274 <rdar://problem/5721186> ld doesn't seem to understand $ld$add$os... and $ld$hide$os... for 10.6 moves
275 * src/ObjectFile.h: add 10.6
276 * src/Options.cpp: add 10.6 support
277 * src/MachOReaderDylib.hpp: recognize $os10.6$
280 ----- Tagged ld64-82.2
282 2008-01-30 Devang Patel <dpatel@apple.com>
284 <rdar://problem/5714833> Can't build 64-bit Intel binaries with LTO
285 <rdar://problem/5714787> ld64 fails to build with llvm-gcc-4.2
286 * src/LLVMReader.hpp: Fix character count typo in strncmp call.
287 Use const char * to initialize temp. string.
288 * ld64.xcodeproj/project.pbxproj: use $(DEVELOPER_DIR) in header search construction
289 instead of hard coding /Developer.
291 ----- Tagged ld64-82.1
293 2008-01-23 Nick Kledzik <kledzik@apple.com>
295 * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
298 2008-01-22 Nick Kledzik <kledzik@apple.com>
300 <rdar://problem/5695496> ld uses 32-bits in some places to hold addresses when parsing 64-bit mach-o files
301 * src/MachOReaderRelocatable.hpp: use AddrToAtomMap type that switch address to 64-bits for 64-bit archs
302 * src/MachOWriterExecutable.hpp: verify BR14 does not overflow for external relocs
303 * unit-tests/test-cases/relocs-c: update test case to slide addresses to verify x86_64 .o files
308 2008-01-18 Nick Kledzik <kledzik@apple.com>
310 <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
311 * src/ld.cpp: fix typo in warning string
314 2008-01-16 Nick Kledzik <kledzik@apple.com>
316 <rdar://problem/5565074> Bundle Loader does not work anymore when loader is a bundle
317 <rdar://problem/5590203> ld warns of incorrect architecture when linking a bundle to a bundle
318 * src/MachOReaderDylib.hpp: support linking against bundles via -bundle_loader. Clean up error messages
319 * unit-tests/test-cases/bundle_loader: update test case
322 2008-01-16 Nick Kledzik <kledzik@apple.com>
324 <rdar://problem/5366363> ld -r -x creates debug notes (stabs) when it should not with -x (keep only global symbols)
325 * src/Options.cpp: in reconfigureDefaults() if -r and -x then -S
328 2008-01-16 Nick Kledzik <kledzik@apple.com>
330 <rdar://problem/5566068> if ld crashes while writing output file, it should delete the half written file
331 * src/MachOWriterExecutable.hpp: wrap open/write/close in try block and add signal handlers all to delete
332 output file on failure.
335 2008-01-16 Devang Patel <dpatel@apple.com>
337 * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
340 2008-01-16 Nick Kledzik <kledzik@apple.com>
342 <rdar://problem/5593537> GC-supported library can't be linked into GC-required executable
343 * src/ld.cpp: loosen constraint that all objc code must be compiled with same GC settings and
344 allow gc-compatible code to be linked into anything.
345 * unit-tests/test-cases/objc-gc-checks: update test case
348 2008-01-15 Nick Kledzik <kledzik@apple.com>
350 <rdar://problem/5687976> no debug notes for custom named data
351 * src/ld.cpp: in synthesizeDebugNotes() check getSymbolTableInclusion() instead of for leading underscore
352 * unit-tests/test-cases/dwarf-debug-notes: update test case
354 ----- Tagged ld64-81.5
356 2008-01-14 Devang Patel <dpatel@apple.com>
358 <rdar://problem/5683813> llvm-gcc-4.2 fails to build Sqlite 3.5.4 with -O4
359 * src/LLVMReader.hpp: Resolve proxy references. Collect new unbounded references
361 * src/ld.cpp: Resolve additional unbounded references after optimization.
364 2008-01-14 Nick Kledzik <kledzik@apple.com>
366 <rdar://problem/5655246> PPC Leopard (Xcode 3.0) linker ld gets "Bus error" sometimes
367 * src/MachOReaderRelocatable.hpp: use same code as x86 to parse ppc and arm sect-diff relocs
368 * src/MachOWriterExecutable.hpp: use same code as x86 to write ppc and arm sect-diff relocs
371 2008-01-11 Nick Kledzik <kledzik@apple.com>
373 <rdar://problem/5637618> PPC Leopard (Xcode 3.0) linker ld reports "unknown scattered relocation type 4"
374 * src/MachOReaderRelocatable.hpp: add PPC_RELOC_HI16 to scattered reloc parsing
375 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added tests for scattered hi/lo instructions
378 2008-01-11 Nick Kledzik <kledzik@apple.com>
380 * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
383 2008-01-11 Nick Kledzik <kledzik@apple.com>
385 <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
386 * doc/man/man1/ld.1: make meaning of "suffix" more explicit
389 2008-01-11 Nick Kledzik <kledzik@apple.com>
391 <rdar://problem/5633081> Obj-C Symbols in Leopard Can't Be Weak Linked
392 * src/MachOWriterExecutable.hpp: set weak and lazy attributes on dummy .objc_class_name undefines
393 to dylibs to support Mac OS X 10.3.x dyld
396 2008-01-11 Nick Kledzik <kledzik@apple.com>
398 <rdar://problem/5669751> Unknown error with linker (dyld: unknown external relocation type)
399 * src/ld.cpp: fix crash when SO stabs are not balanced
402 2008-01-11 Devang Patel <dpatel@apple.com>
404 <rdar://problem/5667433> LTO does not work if expected output is a dynamic library
405 * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate
408 2000-01-10 Nick Kledzik <kledzik@apple.com>
410 <rdar://problem/5680988> __cls_refs section is losing S_LITERAL_POINTERS section type
411 * src/MachOWriterExecutable.hpp: special case __cls_refs section
412 * unit-tests/test-cases/objc-literal-pointers: add test case
415 2008-01-03 Nick Kledzik <kledzik@apple.com>
417 <rdar://problem/5667688> wrong EH information might be used
418 Created new kGroupSubordinate reference kind to model group comdat. The "signature" atom
419 has kGroupSubordinate references to the other atoms in the group. If the signature atom
420 is coalesced away, the linker follows kGroupSubordinate references and throws away the
421 other members of the group.
422 * unit-tests/test-cases/eh-coalescing: added test case
423 * src/ld.cpp: added markDead() and use propagate to subordinates
424 * src/Architectures.hpp: added kGroupSubordinate
425 * src/MachOReaderRelocatable.hpp: add kGroupSubordinate reference from a function to its .eh atom
426 and if used, from .eh atom to its LSDA atom.
427 * src/MachOWriterExecutable.hpp: handle kGroupSubordinate like kNoFixUp
429 ----- Tagged ld64-81.4.1
431 2007-12-19 Devang Patel <dpatel@apple.com>
433 * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
435 2007-12-19 Devang Patel <dpatel@apple.com>
437 * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
439 2007-12-19 Devang Patel <dpatel@apple.com>
441 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
442 * src/LLVMReader.hpp: Add printLLVMVersion() to print llvm version string in verbose mode.
443 * src/Options.cpp: Use printLLVMVersion() in verbose mode.
445 2007-12-19 Devang Patel <dpatel@apple.com>
447 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
448 * src/Options.h: Add verbose() method to check fVerbose flag.
449 * src/LLVMReader.hpp: Print LLVM version string in verbose mode.
451 ----- Tagged ld64-81.4
453 2007-12-18 Devang Patel <dpatel@apple.com>
455 * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
457 ----- Tagged ld64-81.3
459 2007-12-17 Nick Kledzik <kledzik@apple.com>
461 * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
464 2007-12-17 Devang Patel <dpatel@apple.com>
466 * src/LLVMReader.hpp: Do not throw exception if LLVMReader is not able to
467 dlopen LTO library. Instead just flag input file as an invalid LLVM bitcode file.
470 2007-12-14 Nick Kledzik <kledzik@apple.com>
472 <rdar://problem/5645908> gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all)
473 * src/MachOWriterExecutable.hpp: fix Writer<x86>::generatesExternalTextReloc() to allow text relocs
474 * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static
477 2007-12-14 Devang Patel <dpatel@apple.com>
479 <rdar://problem/5648438> Enable Link Time Optimization in Opal
480 * src/LLVMReader.hpp: Locate LLVMlto.dylib relative to ld location in Developer folder.
481 * ld64.xcodeproj/project.pbxproj: Add {DEVELOPER_DIR}/usr/include in header search path.
482 * unit-tests/run-all-unit-tests: Set DYLD_FALLBACK_LIBRARY_PATH to find LLVMlto.dylib during unit testing.
483 * unit-tests/testcases/llvm-integration/Makefile: Point LLVMGCC and LLVMGXX to llvm-gcc-4.2 in Developer folder during unit testing.
486 2007-12-13 Nick Kledzik <kledzik@apple.com>
488 <rdar://problem/5645446> SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ...
489 * src/MachOReaderRelocatable.hpp: in Reader<x86>::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly
491 ----- Tagged ld64-81.2