5 2009-07-28 Nick Kledzik <kledzik@apple.com>
7 <rdar://problem/7073626> Thumb mode compilation isn't working on 3.1 beta 2
8 * Fix instructions used in kBranchIslandToThumb1 case
11 ----- Tagged ld64-96.4
13 2009-06-22 Nick Kledzik <kledzik@apple.com>
15 <rdar://problem/6992387> platform linker should use platform ld_classic
16 * Fix Options::gotoClassicLinker() to use realpath()s
19 2009-06-22 Nick Kledzik <kledzik@apple.com>
21 * Fix Options::setIPhoneVersionMin() to handle 2.x through 9.x
24 ----- Tagged ld64-96.3
26 2009-06-17 Nick Kledzik <kledzik@apple.com>
28 * Change section sorting so that arm and ppc stub section is immediately after __text section
31 2009-06-17 Nick Kledzik <kledzik@apple.com>
33 <rdar://problem/6975041> don't use no-PIC stubs in any dylibs - it might conflict with codesigning
34 * In StubAtom<arm>::StubAtom() don't use kStubNoPIC for OS dylibs
37 ----- Tagged ld64-96.2
39 2009-06-09 Nick Kledzik <kledzik@apple.com>
41 * Back out page-cross branch work around
44 ----- Tagged ld64-96.1
46 2009-06-05 Nick Kledzik <kledzik@apple.com>
48 * Fix "duplicate symbol cache-line-crossing-stub" error by giving placeholders unique names
49 * Fix -pie by allowing relocs in x86 stubs and stub helpers
54 2009-06-04 Nick Kledzik <kledzik@apple.com>
56 * Darwin x86_64 static codegen is really dynamic code gen, so use LTO_CODEGEN_PIC_MODEL_DYNAMIC
59 2009-06-03 Nick Kledzik <kledzik@apple.com>
61 <rdar://problem/6945923> use lto_codegen_set_assembler_path()
64 2009-06-03 Nick Kledzik <kledzik@apple.com>
66 * In src/ld/LTOReader.hpp, move where -save-temps .bc file is saved to be after code model set
69 2009-06-01 Nick Kledzik <kledzik@apple.com>
71 <rdar://problem/6806033> Link Time Optimization error with 'dead code strip' + hidden symbol
72 * scan newAtoms returned from optimize() looking for ones already in the symbol table
73 * add test case unit-tests/test-cases/lto-dead_strip-all-hidden
76 2009-05-19 Nick Kledzik <kledzik@apple.com>
78 <rdar://problem/6881656> make dyld stubs smaller/faster
79 * Add new addSynthesizedAtoms() method to Writer, called before atoms are sorted
80 * Fix throwf() and warning() to check printf types
81 * Add arm::kPointerDiff12 to support fast arm stubs
82 * Add new ContentType values for stubs and (non)lazy pointers
83 * Add new variant of arm stub this is one instruction
86 2009-05-13 Nick Kledzik <kledzik@apple.com>
88 * ld64.xcodeproj/project.pbxproj: add warnings to dyldinfo target
89 * src/other/dyldinfo.cpp: support classic LINKEDIT format
92 2009-05-12 Nick Kledzik <kledzik@apple.com>
94 * src/ld/MachOWriterExecutable.hpp: fix optimization to skip branch islands with ARM bl instructions
97 2009-05-12 Nick Kledzik <kledzik@apple.com>
99 <rdar://problem/6836647> creation of __unwind_info section can fail if hundreds of functions cannot be compact encoded
100 * src/ld/MachOWriterExecutable.hpp: fix when to make regular vs compressed pages
103 2009-05-08 Nick Kledzik <kledzik@apple.com>
105 * src/ld/ld.cpp: enhance -save-temps to also write out optimized bitcode file
108 2009-05-08 Nick Kledzik <kledzik@apple.com>
110 * src/ld/ld.cpp: fix -order_file_statistics to print each symbol not found and correct total
113 2009-05-08 Nick Kledzik <kledzik@apple.com>
115 <rdar://problem/6870522> linker should be able to coalesce UTF16 strings
116 * src/ld/MachOReaderRelocatable.hpp: parse __ustring section by labels but synthesize an
117 atom name based on the content. Leverage for __cfstring section
118 * unit-tests/test-cases/cfstring-utf16: update test case
121 2009-05-07 Nick Kledzik <kledzik@apple.com>
123 * src/ld/MachOWriterExecutable.hpp: put branch islands further apart if there is no thumb code
126 2009-05-07 Nick Kledzik <kledzik@apple.com>
128 <rdar://problem/6331300> LINKEDIT optimizations for iPhone
129 * src/ld/ObjectFile.h: Recognize iPhoneOS 3.1
130 * src/ld/Options.cpp: iPhoneOS 3.1 => use compressed LINKEDIT
131 * src/ld/MachOWriterExecutable.hpp: support generating compressed LINKEDIT for arm
134 2009-05-04 Nick Kledzik <kledzik@apple.com>
136 <rdar://problem/5716715> Add linker support for ARM branch islands
137 <rdar://problem/5253691> Add labels to linker synthesized jump islands
138 * src/ld/MachOWriterExecutable.hpp: reworked BranchIslandAtom and createBranchIslands to support arm/thumb
139 * src/ld/ObjectFile.h: added kBranchIsland
140 * unit-tests/test-cases/branch-islands: updated test case to check arm/thumb
143 2009-04-30 Nick Kledzik <kledzik@apple.com>
145 * src/ld/Options.cpp: fix custom stack base address for arm
148 2009-04-30 Nick Kledzik <kledzik@apple.com>
150 <rdar://problem/6818272> likely incorrect warning about common symbols
151 * src/ld/Options.cpp: ignore LD_WARN_COMMONS in -r mode
154 ----- Tagged ld64-95.8.3
156 2009-03-31 Nick Kledzik <kledzik@apple.com>
158 <rdar://problem/6719270> ld might set MH_WEAK_DEFINES when it should not
159 * src/ld/MachOWriterExecutable.hpp: rescan fRegularDefAtomsThatOverrideADylibsWeakDef and only consider global ones
162 ----- Tagged ld64-95.8.2
164 2009-03-18 Nick Kledzik <kledzik@apple.com>
166 * src/ld/MachOReaderRelocatable.hpp: back out -force_cpusubtype_ALL changes
169 ----- Tagged ld64-95.8.1
171 2009-03-17 Nick Kledzik <kledzik@apple.com>
173 <rdar://problem/6578416> -dead_strip inhibits weak coalescing in no_dead_strip section
174 * src/ld/ld.cpp: in markDead() remove from fLiveRootAtoms
177 2009-03-17 Nick Kledzik <kledzik@apple.com>
179 <rdar://problem/6671072> libgcc fails to build in with ld64-95.8
180 * src/ld/MachOReaderRelocatable.hpp: interpret CPU_SUBTYPE_ARM_ALL as CPU_SUBTYPE_ARM_V4T
181 * src/ld/Options.cpp: interept -force_cpusubtype_ALL as -arch armv4t
184 ----- Tagged ld64-95.8
186 2009-02-09 Nick Kledzik <kledzik@apple.com>
188 <rdar://problem/6569316> ld64-95.7 crashes building Foundation-678.39 in side build
189 * src/ld/MachOReaderRelocatable.hpp: handle a zero length section with a label before __cstring section
192 ----- Tagged ld64-95.7
194 2009-02-06 Nick Kledzik <kledzik@apple.com>
196 * src/ld/ObjectFile.h: make fAddCompactUnwindEncoding false by default
199 2009-02-06 Nick Kledzik <kledzik@apple.com>
201 <rdar://problem/6537210> ER: add linker option to zero fill empty DATA sections on disk
202 * src/ld/Options.cpp: add support for -no_zero_fill_sections
203 * src/ld/MachOReaderRelocatable.hpp: isZeroFill() is only true if fOptimizeZeroFill
204 * doc/man/man1/ld.1: document -no_zero_fill_sections
205 * unit-tests/test-cases/no_zero_fill_sections: add test case
208 2009-02-05 Nick Kledzik <kledzik@apple.com>
210 <rdar://problem/6497366> label getting resolved to the wrong address.
211 * src/ld/MachOWriterExecutable.hpp: add findAtomAndOffsetForSection() and use it to disambiguate
212 * unit-tests/test-cases/label-on-end-of-section: added test case
215 2009-01-27 Nick Kledzik <kledzik@apple.com>
217 <rdar://problem/6517393> Warn -force_cpusubtype_ALL is not supported
218 * src/ld/Options.cpp: warn if fForceSubtypeAll and fArchitecture is CPU_TYPE_ARM
221 ----- Tagged ld64-95.6
223 2009-01-25 Nick Kledzik <kledzik@apple.com>
225 <rdar://problem/6439020> Add support for section start/end labels
226 * src/ld/ObjectFile.h: add kSectionStart and kSectionEnd
227 * src/ld/MachOReaderRelocatable.hpp: create SectionBoundaryAtoms as needed
228 * src/ld/ld.cpp: sort SectionBoundaryAtoms correctly
229 * src/ld/MachOWriterExecutable.hpp: allow all relocations in preload images
232 ----- Tagged ld64-95.5
234 2009-01-15 Nick Kledzik <kledzik@apple.com>
236 * src/ld/MachOWriterExecutable.hpp: in hasPageCrossingBranches() ignore branches preceeded by a branch
239 ----- Tagged ld64-95.4
241 2009-01-15 Nick Kledzik <kledzik@apple.com>
243 * src/ld/Options.cpp: handle -kext and -r the same for fPreventPageCrossingBranches
246 ----- Tagged ld64-95.3
248 2009-01-14 Nick Kledzik <kledzik@apple.com>
250 <rdar://problem/6497574> linker should alter layout to prevent armv7 page crossing branches
251 * src/ld/Options.cpp: set fPreventPageCrossingBranches
252 * src/ld/MachOWriterExecutable.hpp: adjust layout of __text so there are not page crossing branches
253 * src/ld/MachOReaderRelocatable.hpp: support new ARM_THUMB_32BIT_BRANCH reloce
256 ----- Tagged ld64-95.2.10
258 2009-04-02 Nick Kledzik <kledzik@apple.com>
260 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
261 * src/ld/ld.cpp: change Section constructor to copy segment and section names
264 ----- Tagged ld64-95.2.9
266 2009-04-02 Nick Kledzik <kledzik@apple.com>
268 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
269 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
272 ----- Tagged ld64-95.2.8
274 2009-03-24 Nick Kledzik <kledzik@apple.com>
276 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
277 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
280 ----- Tagged ld64-95.2.7
282 2009-03-11 Nick Kledzik <kledzik@apple.com>
284 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
285 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
286 that is already explictly or implicitly linked.
287 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
290 2009-03-10 Nick Kledzik <kledzik@apple.com>
292 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
293 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
294 to a symbol in a dylib that is a weak definition
295 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
298 2009-03-10 Nick Kledzik <kledzik@apple.com>
300 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
301 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
302 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
305 ----- Tagged ld64-95.2.6
307 2009-02-27 Nick Kledzik <kledzik@apple.com>
309 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
310 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
311 that will be exported when computing MH_WEAK_DEFINES
312 * unit-tests/test-cases/operator-new: updated to reproduce issue
315 ----- Tagged ld64-95.2.5
317 2009-02-24 Nick Kledzik <kledzik@apple.com>
319 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
320 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
321 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
324 ----- Tagged ld64-95.2.4
326 2009-02-23 Nick Kledzik <kledzik@apple.com>
328 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
331 2009-02-18 Nick Kledzik <kledzik@apple.com>
333 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
334 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
337 2009-02-18 Nick Kledzik <kledzik@apple.com>
339 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
340 * src/ld/Architectures.hpp: add kSectionOffset24
341 * src/ld/ObjectFile.h: add getFDE()
342 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
343 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
344 * src/other/unwinddump.cpp: update unwinddump output to display register save set
347 2009-02-16 Nick Kledzik <kledzik@apple.com>
349 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
350 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
353 2009-02-15 Nick Kledzik <kledzik@apple.com>
355 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
356 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
357 * unit-tests/test-cases/relocs-neg-from-local: add test case
360 2009-02-12 Nick Kledzik <kledzik@apple.com>
362 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
363 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
364 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
367 2009-02-12 Nick Kledzik <kledzik@apple.com>
369 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
370 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
371 * src/other/dyldinfo.cpp: update to display weak_import attribute
372 * unit-tests/test-cases/weak_import: updated test case
375 2009-02-06 Nick Kledzik <kledzik@apple.com>
377 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
378 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
381 ----- Tagged ld64-95.2.3
383 2009-02-04 Nick Kledzik <kledzik@apple.com>
385 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
386 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
389 ----- Tagged ld64-95.2.2
391 2009-02-02 Nick Kledzik <kledzik@apple.com>
393 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
394 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
395 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
398 ----- Tagged ld64-95.2.1
400 ----- Tagged ld64-95.2.10
402 2009-04-02 Nick Kledzik <kledzik@apple.com>
404 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
405 * src/ld/ld.cpp: change Section constructor to copy segment and section names
408 ----- Tagged ld64-95.2.9
410 2009-04-02 Nick Kledzik <kledzik@apple.com>
412 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
413 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
416 ----- Tagged ld64-95.2.8
418 2009-03-24 Nick Kledzik <kledzik@apple.com>
420 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
421 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
424 ----- Tagged ld64-95.2.7
426 2009-03-11 Nick Kledzik <kledzik@apple.com>
428 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
429 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
430 that is already explictly or implicitly linked.
431 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
434 2009-03-10 Nick Kledzik <kledzik@apple.com>
436 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
437 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
438 to a symbol in a dylib that is a weak definition
439 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
442 2009-03-10 Nick Kledzik <kledzik@apple.com>
444 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
445 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
446 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
449 ----- Tagged ld64-95.2.6
451 2009-02-27 Nick Kledzik <kledzik@apple.com>
453 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
454 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
455 that will be exported when computing MH_WEAK_DEFINES
456 * unit-tests/test-cases/operator-new: updated to reproduce issue
459 ----- Tagged ld64-95.2.5
461 2009-02-24 Nick Kledzik <kledzik@apple.com>
463 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
464 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
465 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
468 ----- Tagged ld64-95.2.4
470 2009-02-23 Nick Kledzik <kledzik@apple.com>
472 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
475 2009-02-18 Nick Kledzik <kledzik@apple.com>
477 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
478 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
481 2009-02-18 Nick Kledzik <kledzik@apple.com>
483 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
484 * src/ld/Architectures.hpp: add kSectionOffset24
485 * src/ld/ObjectFile.h: add getFDE()
486 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
487 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
488 * src/other/unwinddump.cpp: update unwinddump output to display register save set
491 2009-02-16 Nick Kledzik <kledzik@apple.com>
493 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
494 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
497 2009-02-15 Nick Kledzik <kledzik@apple.com>
499 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
500 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
501 * unit-tests/test-cases/relocs-neg-from-local: add test case
504 2009-02-12 Nick Kledzik <kledzik@apple.com>
506 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
507 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
508 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
511 2009-02-12 Nick Kledzik <kledzik@apple.com>
513 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
514 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
515 * src/other/dyldinfo.cpp: update to display weak_import attribute
516 * unit-tests/test-cases/weak_import: updated test case
519 2009-02-06 Nick Kledzik <kledzik@apple.com>
521 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
522 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
525 ----- Tagged ld64-95.2.3
527 2009-02-04 Nick Kledzik <kledzik@apple.com>
529 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
530 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
533 ----- Tagged ld64-95.2.2
535 2009-02-02 Nick Kledzik <kledzik@apple.com>
537 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
538 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
539 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
542 ----- Tagged ld64-95.2.1
544 2009-01-29 Nick Kledzik <kledzik@apple.com>
546 <rdar://problem/6532377> gcc DejaGnu failure: building longcall/dylib library
547 * src/ld/MachOWriterExecutable.hpp: if no __DATA sections insert non-lazy pointers at end of __TEXT segment
548 * unit-tests/test-cases/no-data-bundle: added test case
551 ----- Tagged ld64-95.2
553 2009-01-06 Nick Kledzik <kledzik@apple.com>
555 <rdar://problem/6476760> strip -S fails with "new trie is larger than original"
556 * src/other/PruneTrie.cpp: don't align trie more than original trie was aligned
559 ----- Tagged ld64-95.1
561 2008-12-21 Nick Kledzik <kledzik@apple.com>
563 * src/ld/MachOWriterExecutable.hpp: in new linkedit format, make sure only exported symbols
564 make it into weak binding info
569 2008-12-18 Nick Kledzik <kledzik@apple.com>
571 * src/ld/Options.cpp: move check for fSharedRegionEligible until fPrebind has stabilized
574 2008-12-18 Nick Kledzik <kledzik@apple.com>
576 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
577 * src/ld/Options.cpp: turn on compressed LINKEDIT by default
580 ----- Tagged ld64-94.1
582 2008-12-16 Nick Kledzik <kledzik@apple.com>
584 * src/ld/Options.cpp: Fix -F handling in buildSearchPaths()
589 2008-12-15 Nick Kledzik <kledzik@apple.com>
591 * doc/man/man1/ld.1: document new options
594 2008-12-15 Nick Kledzik <kledzik@apple.com>
596 <rdar://problem/6134468> linker should enforce all .o files have same sub-type, and ignore sub-type of dylibs
597 * doc/man/man1/ld.1: update man page about -allow_sub_type_mismatches
598 * src/ld/ld.cpp: call validFile() with new arguments
599 * src/ld/MachOReaderRelocatable.hpp: add new arguments to validFile()
600 * src/ld/Options.cpp: Support LD_ALLOW_CPU_SUBTYPE_MISMATCHES and -allow_sub_type_mismatches
603 2008-12-15 Nick Kledzik <kledzik@apple.com>
605 <rdar://problem/6438270> -syslibroot should skip standard search paths not in the SDK
606 * src/ld/Options.cpp: in buildSearchPaths() if an SDK is specified don't add
607 standard search paths not in the SDK.
610 2008-12-15 Nick Kledzik <kledzik@apple.com>
612 <rdar://problem/6406609> ld: remove "can't make compact unwind encoding" warning
613 * src/ld/ObjectFile.h: add fWarnCompactUnwind
614 * src/ld/Options.cpp: -warn_compact_unwind --> fWarnCompactUnwind
615 * src/ld/MachOReaderRelocatable.hpp: test fWarnCompactUnwind before warning
618 2008-12-15 Nick Kledzik <kledzik@apple.com>
620 <rdar://problem/6442926> Add dtrace usdt support for arm to ld64
621 * src/ld/MachOWriterExecutable.hpp: handle arm::kDtraceIsEnabledSite
622 * unit-tests/test-cases/dtrace-static-probes: use is-enabled in test case
627 2008-12-11 Nick Kledzik <kledzik@apple.com>
629 * src/ld/ObjectFile.h: add fIPhoneVersionMin to track min iPhoneOS version
630 * src/ld/Options.cpp: use fIPhoneVersionMin
633 2008-12-11 Nick Kledzik <kledzik@apple.com>
635 <rdar://problem/6431277> non-lazy pointer to non-global tentative definition encoded wrong
636 * src/ld/MachOWriterExecutable.hpp: don't use INDIRECT_SYMBOL_LOCAL for tentative definitions
637 * unit-tests/test-cases/non-lazy-r: updated test case
640 2008-12-11 Nick Kledzik <kledzik@apple.com>
642 <rdar://problem/6437667> kernel fails to boot when ld64 used for intermediate ld -r step
643 * src/ld/MachOWriterExecutable.hpp: in -r mode when generating a scattered sect-diff reloc for
644 i386/arm, special case when from target is not the atom
645 the relocation is in.
646 * unit-tests/test-cases/relocs-asm: update test case
649 2008-12-11 Nick Kledzik <kledzik@apple.com>
651 * src/ld/ld.cpp: handle new __program_vars section
652 * src/ld/MachOWriterExecutable.hpp: handle inserting synthesized sections when there is no __dyld section
655 2008-12-11 Nick Kledzik <kledzik@apple.com>
657 * src/ld/MachOReaderRelocatable.hpp: Fix getDescription() to work when direct reference is to anonymous atom
660 2008-12-10 Nick Kledzik <kledzik@apple.com>
662 * src/ld/Options.cpp: enable LD_FORCE_NO_PREBIND to be used with arm
665 2008-12-10 Nick Kledzik <kledzik@apple.com>
667 <rdar://problem/6258169> Developer tool to print the new compressed LINKEDIT information
668 * src/other/dyldinfo.cpp: fix typo in usage()
671 2008-12-05 Nick Kledzik <kledzik@apple.com>
673 <rdar://problem/6308882> SnowLeopard kernel should compile warning free
674 * src/ld/MachOReaderRelocatable.hpp: correct parse two global labels at end of section and make one an alias
675 * unit-tests/test-cases/end-label: update test case
678 2008-12-04 Nick Kledzik <kledzik@apple.com>
680 <rdar://problem/6342245> Better warning than "PPC_RELOC_JBSR should not be using an external relocation"
681 * src/ld/MachOReaderRelocatable.hpp: issue warning with .o path if it was compiled with -mlong-branch
684 2008-12-04 Nick Kledzik <kledzik@apple.com>
686 <rdar://problem/6408832> linker should not map __pointers -> __nl_symbol_ptr unless actually making new LINKEDIT
687 * src/ld/ObjectFile.h: add fMakeCompressedDyldInfo for readers to see
688 * src/ld/Options.cpp: set fMakeCompressedDyldInfo for readers to see
689 * src/ld/MachOReaderRelocatable.hpp: check fMakeCompressedDyldInfo
692 2008-12-02 Nick Kledzik <kledzik@apple.com>
694 * src/ld/debugline.c: fix error handling in line_open()
697 2008-11-26 Nick Kledzik <kledzik@apple.com>
699 <rdar://problem/6401277> vtable with thumb entries broke after ld -r
700 * src/ld/MachOReaderRelocatable.hpp: if target of reloc is thumb, mask thumb bit off addend
701 * unit-tests/test-cases/thumb-pointer: added test case
704 2008-11-26 Nick Kledzik <kledzik@apple.com>
706 * src/ld/Option.cpp: Fix how crashreporterBuffer is created to not miss some arguments
709 2008-11-24 Nick Kledzik <kledzik@apple.com>
711 <rdar://problem/6398605> Security.framework has some duplicate FDEs for some functions
712 * src/ld/ld.cpp: remove fDeadAtoms from fLiveAtoms when there are weak atoms overriden by late loads
713 * unit-tests/test-cases/dead_strip-archive-eh: added test case
718 2008-11-21 Nick Kledzik <kledzik@apple.com>
720 * src/ld/MachOReaderDylib.hpp: if export_size is zero, no need to parse trie
721 * src/abstraction/MachOTrie.hpp: gracefully handle empty trie
724 2008-11-21 Nick Kledzik <kledzik@apple.com>
726 <rdar://problem/6257854> strip(1) support for new compressed LINKEDIT information
727 * ld64.xcodeproj/project.pbxproj: build and install new libprunetrie.a
728 * src/other/prune_trie.h: added
729 * src/other/PruneTrie.cpp: implements prune_trie()
732 2008-11-21 Nick Kledzik <kledzik@apple.com>
734 * src/ld/ld.cpp: if an export file is used and all weak symbols are masked, don't set WEAK_DEFINES
735 * unit-tests/test-cases/weak-def-flag: added test case
738 2008-11-20 Nick Kledzik <kledzik@apple.com>
740 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
741 * src/ld/MachOWriterExecutable.hpp: support generating new compressed format
742 * src/ld/MachOReaderRelocatable.hpp: new compress format implies non-lazy pointers in __DATA for i386
743 * src/ld/MachOReaderDylib.hpp: support linking aginst new format
744 * src/ld/Options.cpp: suppport -exported_symbols_order and -no_compact_linkedit
745 * src/ld/ld.cpp: track which atoms have weak counter parts in dylibs
746 * src/other/dyldinfo.cpp: added tool to display new LINKEDIT format
747 * ld64.xcodeproj/project.pbxproj: add dyldinfo tool
748 * unit-tests/*: lots of fixes to work with new format
751 2008-11-20 Nick Kledzik <kledzik@apple.com>
753 <rdar://problem/6389316> ld64 should preserve N_WEAK_REF when linking MH_KEXT_BUNDLEs
754 * src/ld/MachOWriterExecutable.hpp: set up fWeakImportMap in synthesizeKextGOT()
757 2008-11-19 Nick Kledzik <kledzik@apple.com>
759 <rdar://problem/6342406> VideoToolbox.framework has bad __TEXT.__eh_frame info
760 * src/ld/Options.cpp: add -no_eh_labels option for use with -r
761 * src/ld/MachOWriterExecutable.hpp: generate correct x86_64 labeless relocs in -r mode
762 * src/ld/MachOReaderRelocatable.hpp: now ignore all labels and relocations in
763 __TEXT/__eh_frame section and rely on getCFIs() from libunwind
764 * unit-tests/test-cases/eh-coalescing-no-labels: add test case
767 2008-11-19 Nick Kledzik <kledzik@apple.com>
769 <rdar://problem/6378110> LTO doesn't like dtrace symbols
770 * src/ld/LTOReader.hpp: ignore __dtrace_probe undefines in bitcode files
773 2008-11-14 Nick Kledzik <kledzik@apple.com>
775 * src/abstraction/MachOFileAbstraction.hpp: fix to work with 10.5 headers
780 2008-11-07 Nick Kledzik <kledzik@apple.com>
782 Remove COMPACT_UNWIND_SUPPORT conditionalizing
785 2008-11-06 Nick Kledzik <kledzik@apple.com>
787 Reorganize source layout. ld sources are now in "ld",
788 and other tools are in "other".
791 2008-11-05 Nick Kledzik <kledzik@apple.com>
793 * ld64.xcodeproj/project.pbxproj: start installing unwinddump tool
794 * src/UnwindDump.cpp: support -arch option
795 * doc/man/man1/unwinddump.1: create man page
798 2008-11-05 Nick Kledzik <kledzik@apple.com>
800 <rdar://problem/6337329> linker should put cpusubtype in n_sect field of nlist entry for N_OSO debug note entries
801 * src/ld.cpp: in synthesizeDebugNotes() set other field of OSO to be subtype
804 2008-11-05 Nick Kledzik <kledzik@apple.com>
806 <rdar://problem/3738966> Need a linker option to load all objects from one library
807 * src/Options.cpp: support -force_load option
808 * src/ArchiveReader.hpp: Add fForceLoad ivar
809 * doc/man/man1/ld.1: update man page with -force_load option
810 * unit-tests/test-cases/archive-force-load: add test case
813 2008-11-05 Nick Kledzik <kledzik@apple.com>
815 <rdar://problem/6308882> Dtrace Probe Warnings: SnowLeopard kernel should compile warning free
816 * src/ld.cpp: don't generate GSYM stabs for old style __dtrace_probe
817 * src/MachOReaderRelocatable.hpp: fix test for deciding if a symbol is an alias
820 2008-11-04 Nick Kledzik <kledzik@apple.com>
822 <rdar://problem/6294378> ADOBE: XCODE: ld: duplicate typeinfo in executable
823 * src/ld.cpp: in dead-strip mode, record overriden symbols and later rebind all uses
824 * unit-tests/test-cases/dead_strip-archive-weak: add test case
827 2008-11-03 Nick Kledzik <kledzik@apple.com>
829 <rdar://problem/6254202> support increased branch range in Thumb-2
830 * src/MachOReaderRelocatable.hpp: handle full branch range in addRelocReference()
831 * unit-tests/test-cases/branch-distance: added test case
833 2008-10-31 Devang Patel <dpatel@apple.com>
835 <rdar://problem/5725712> Sqlite 3.5.4 built with lvm-gcc-4.2 -O4 fails regression test
836 * src/LTOReader.hpp: Use real atom scope when real atom is available.
837 Preserve globals while optimizing an executable.
839 2008-10-30 Nick Kledzik <kledzik@apple.com>
841 * src/MachOReaderRelocatable.hpp: support all encodings in getEncodedP()
846 2008-10-30 Nick Kledzik <kledzik@apple.com>
848 <rdar://problem/6327584> icc has dwarf unwind info that is different than gcc
849 * src/MachOReaderRelocatable.hpp: support more encodings in getEncodedP()
852 2008-10-23 Nick Kledzik <kledzik@apple.com>
854 <rdar://problem/6088653> build ld64 for x86_64
855 * ld64.xcodeproj/project.pbxproj: add X86_64 to valid archs
858 2008-10-23 Nick Kledzik <kledzik@apple.com>
860 * ld64.xcodeproj/project.pbxproj: use generated @$(DERIVED_FILE_DIR)/linker_opts for extra
861 linker options. This allows linker to be built if LTO headers and libs are missing.
864 2008-10-23 Nick Kledzik <kledzik@apple.com>
866 <rdar://problem/6273617> Linker warning not shown in the Xcode build log
867 * src/Options.cpp: add colon to format string in warning()
870 ----- Tagged ld64-89.3
872 2008-10-24 Nick Kledzik <kledzik@apple.com>
874 <rdar://problem/6317985> ld64-89 broke TOT OpenGL libProgrammability x86_64 build
875 * src/MachOReaderRelocatable.hpp: add cast in getEncodedP()
878 ----- Tagged ld64-89.2
880 2008-10-23 Nick Kledzik <kledzik@apple.com>
882 <rdar://problem/6312895> SnowLeopard: Libsystem built with ld64-89.1 causes crashes
883 * src/MachOReaderRelocatable.hpp: when FDE information causes __text atom to be split, make the
884 atoms follow-on pairs.
887 ----- Tagged ld64-89.1
889 2008-10-22 Nick Kledzik <kledzik@apple.com>
891 * src/MachOReaderRelocatable.hpp: for x86_64 __eh_frame force direct references
894 2008-10-21 Nick Kledzik <kledzik@apple.com>
896 * src/ObjectDump.cpp: Use getContentType() to see if content type is a cstring
901 2008-10-21 Nick Kledzik <kledzik@apple.com>
903 <rdar://problem/6253171> 10A180 with QT-1119 roots: iTunes and QuickTime cannot play back purchased videos
904 <rdar://problem/5950453> linker should not need .eh labels
905 * src/MachOWriterExecutable.hpp: use kCFIType to set section attributes
906 * src/MachOReaderRelocatable.hpp: use libunwind's CFITuple to parse __eh_frame content
907 * src/ld.cpp: Add adjustScope() phase instead of demoting scope within symboltable.add()
908 * unit-tests/test-cases/eh-stripped-symbols: added test case
911 ----- Tagged ld64-88.1
913 2008-10-16 Nick Kledzik <kledzik@apple.com>
915 * src/MachOReaderRelocatable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
916 * src/MachOWriterExecutable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
919 2008-09-30 Nick Kledzik <kledzik@apple.com>
921 <rdar://problem/6255983> OBJC2: Reorder __DATA,__objc_* sections by writedness
922 * src/ld.cpp: change sorting order of Sections
925 2008-09-29 Nick Kledzik <kledzik@apple.com>
927 <rdar://problem/6159479> Executable produced by XCode 3.2 on 10.6 crashes on 10.3.9
928 * src/MachOWriterExecutable.hpp: set objc_module_info_addr field of module table
933 2008-09-25 Nick Kledzik <kledzik@apple.com>
935 <rdar://problem/5935708> kexts need to be built as MH_BUNDLE mach-o files
936 * src/ld.cpp: use getUndefinedProxyAtom() with kKextBundle
937 * src/MachOFileAbstraction.hpp: add MH_KEXT_BUNDLE
938 * src/Options.cpp: support -kext for all architectures
939 * src/MachOWriterExecutable.hpp: support kKextBundle to make a bundle like kext
940 * unit-tests/test-cases/kext-basic: added test case
943 2008-09-25 Nick Kledzik <kledzik@apple.com>
945 <rdar://problem/6052546> ld invoking wrong ld_classic
946 * src/Options.cpp: first look for ld_classic relative to ld itself
949 2008-09-25 Nick Kledzik <kledzik@apple.com>
951 <rdar://problem/5855588> ld fails to link references from 32 bit code into 64 bit code
952 <rdar://problem/5955200> Desired 32-bit absolute relocation
953 * src/Architectures.hpp: add x86_64::kPointer32
954 * src/MachOReaderRelocatable.hpp: support X86_64_RELOC_UNSIGNED with length=2
955 * src/MachOWriterExecutable.hpp: support x86_64::kPointer32
956 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added 32-bit pointer tests
959 2008-09-25 Nick Kledzik <kledzik@apple.com>
961 <rdar://problem/6075323> Should be able to mark dylibs as auto-dead-dylib-strip
962 * src/Options.h: add fMarkDeadStrippableDylib
963 * src/MachOReaderDylib.hpp: check MH_DEAD_STRIPPABLE_DYLIB
964 * src/ObjectFile.h: add deadStrippable()
965 * src/MachOFileAbstraction.hpp: add MH_DEAD_STRIPPABLE_DYLIB
966 * src/Options.cpp: support -mark_dead_strippable_dylib
967 * src/MachOWriterExecutable.hpp: test reader->deadStrippable(), set MH_DEAD_STRIPPABLE_DYLIB
968 * doc/man/man1/ld.1: update man page
969 * unit-tests/test-cases/dead_strippable_dylib: added test case
972 2008-09-25 Nick Kledzik <kledzik@apple.com>
974 <rdar://problem/6197601> ER: Add -seg_page_size option
975 * src/Options.cpp: add -seg_page_size option
976 * src/MachOWriterExecutable.hpp: use new page size info when laying out segments
977 * doc/man/man1/ld.1: update man page
980 2008-09-24 Nick Kledzik <kledzik@apple.com>
982 <rdar://problem/5798786> -arch_errors_fatal not working
983 * src/ld.cpp: check fOptions.errorOnOtherArchFiles()
984 * src/Options.cpp: turn -arch_errors_fatal into fOptions.errorOnOtherArchFiles()
987 2008-09-24 Nick Kledzik <kledzik@apple.com>
989 <rdar://problem/6161215> CrashTracer: [USER] 1 crash in ld at ld: 0x5ce02
990 * src/ld.cpp: abort if resolve() finds an unresolved reference, rather than allow a future crash
993 2008-09-24 Nick Kledzik <kledzik@apple.com>
995 <rdar://problem/6157989> linker crashes linking X86-64 with -fwritable-strings
996 * src/MachOReaderRelocatable.hpp: handle unbound cfstring references
997 * unit-tests/test-cases/cfstring-coalesce: update test case
1000 2008-09-24 Nick Kledzik <kledzik@apple.com>
1002 <rdar://problem/6213035> ld64: bl out of range (-17147704 max is +/-16M) on ppc
1003 * src/MachOWriterExecutable.hpp: tweak branch island regions to be every 14MB instead of 15MB
1006 2008-09-24 Nick Kledzik <kledzik@apple.com>
1008 <rdar://problem/5907981> -filelist fails with comma in path
1009 * src/Options.cpp: in loadFileList() first try without special comma meaning
1010 * unit-tests/test-cases/filelist/Makefile: update test case
1013 2008-09-23 Nick Kledzik <kledzik@apple.com>
1015 <rdar://problem/6203068> nop not used when aligning functions in -r mode
1016 * src/MachOWriterExecutable.hpp: change check for when to pad with nops to not test segment's name
1019 2008-09-23 Nick Kledzik <kledzik@apple.com>
1021 <rdar://problem/6238329> "-pie can only be used when linking a main executable" should be a warning, not an error
1022 * src/Options.cpp: make -pie on a dylib or bundle be a warning instead of an error
1025 2008-09-23 Nick Kledzik <kledzik@apple.com>
1027 * src/MachOReaderRelocatable.hpp: add warning if dwarf cannot be encoded as compact unwind
1030 2008-09-18 Nick Kledzik <kledzik@apple.com>
1032 * src/LTOReader.hpp: re-enable use of lto_codegen_debug_options()
1035 2008-09-16 Nick Kledzik <kledzik@apple.com>
1037 <rdar://problem/6219054> ld does not always set S_CSTRING_LITERALS on __TEXT,__cstring
1038 * src/MachOReaderRelocatable.hpp: add getContentType() to SymbolAtom
1039 * src/MachOWriterExecutable.hpp: for x86_64 don't override named cstrings with LC* name
1042 2008-09-10 Nick Kledzik <kledzik@apple.com>
1044 * Options.cpp: add __crashreporter_info__ to communicate command line to crash reporter
1045 * ld64.xcodeproj/project.pbxproj: leave local symbols in ld to provide better crash reports
1048 2008-09-08 Nick Kledzik <kledzik@apple.com>
1050 <rdar://problem/6126637> 161569 GCC 4.2 - breakpoints no longer work for a large number of functions
1051 * src/MachOReaderRelocatable.hpp: support DW_FORM_strp out-of-line strings when parsing line table
1054 2008-09-02 Nick Kledzik <kledzik@apple.com>
1056 * src/MachOReaderRelocatable.hpp: fix compact unwind personality for dyld and -slow_stubs
1059 2008-08-29 Nick Kledzik <kledzik@apple.com>
1061 <rdar://problem/6186838> -weak_library no longer forces uses to be weak_import
1062 * src/MachOWriterExecutable.hpp: use fWeakImport on dylib to force proxy atoms into fWeakImportMap
1063 * unit-tests/test-cases/weak_import-force: added test case
1066 2008-08-29 Nick Kledzik <kledzik@apple.com>
1068 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1069 * src/Options.cpp: add fOrderData and support -no_data_order
1070 * src/ld.cpp: modify tweakLayout() to sort atoms with relocations to start of __data section
1073 2008-08-27 Nick Kledzik <kledzik@apple.com>
1075 * src/Options.cpp: back out <rdar://problem/6174493>
1078 ----- Tagged ld64-87.5
1080 2008-08-26 Nick Kledzik <kledzik@apple.com>
1082 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
1083 * src/Options.cpp: swap any early symlinks to libSystem with libgcc_s
1086 ----- Tagged ld64-87.4
1088 2008-08-25 Nick Kledzik <kledzik@apple.com>
1090 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
1091 * src/Options.cpp: swap any early libSystem with libgcc_s
1094 2008-08-15 Nick Kledzik <kledzik@apple.com>
1096 <rdar://problem/5898326> Unable to build ppc debug builds (linker out of range error)
1097 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands() look ahead so large atoms don't push out branch islands
1100 ----- Tagged ld64-87.3.1
1102 2008-09-08 Nick Kledzik <kledzik@apple.com>
1104 <rdar://problem/6204202> i386 dylibs have incorrect personality pointers when put in dyld shared cache
1105 * src/MachOWriterExecutable.hpp: in addCrossSegmentRef() handle kImageOffset32 to __IMPORT segment
1108 ----- Tagged ld64-87.3
1110 2008-08-09 Nick Kledzik <kledzik@apple.com>
1112 <rdar://problem/6125381> work around compiler gcc_except_table alignment
1113 * src/ObjectFile.h: change getLSDA() to return a reference instead of an atom
1114 * src/MachOReaderRelocatable.hpp: special case __eh_frame 64-bit pointer diff relocations
1115 * src/MachOWriterExecutable.hpp: track lsda offset when creating __unwind_info section
1116 * src/UnwindDump.cpp: log when LDSA content does not start with 0xFF
1118 ----- Tagged ld64-87.2
1120 2008-08-07 Nick Kledzik <kledzik@apple.com>
1122 <rdar://problem/6131559> 10A141: libuwind falls back to dwarf and makes whole system super slow
1123 * src/MachOWriterExecutable.hpp: Fix sign extension bug with x86_64::kPointerDiff24
1124 * src/UnwindDump.cpp: warn about mangled LSDA entries when dumping unwind section
1127 ----- Tagged ld64-87.1
1129 2008-08-03 Nick Kledzik <kledzik@apple.com>
1131 * src/LTOReader.hpp: Don't use lto_codegen_debug_options until newer libLTO.dylib is available
1134 ----- Tagged ld64-87
1136 2008-07-21 Nick Kledzik <kledzik@apple.com>
1138 * src/Options.cpp: Always set fAutoOrderInitializers=false for dyld
1141 2008-07-21 Nick Kledzik <kledzik@apple.com>
1143 * src/MachOWriterExecutable.hpp: fix when regular vs compressed __unwind_info pages are generated
1144 * src/UnwindDump.cpp: fix function name decoding in regular pages
1147 2008-07-21 Nick Kledzik <kledzik@apple.com>
1149 * ld64.xcodeproj/project.pbxproj: don't allow ld to build for x86_64 until libdtrace.dylib is available
1152 2008-07-18 Nick Kledzik <kledzik@apple.com>
1154 * src/MachOReaderRelocatable.hpp: don't crash if debug_line section has no line table
1157 2008-07-18 Nick Kledzik <kledzik@apple.com>
1159 <rdar://problem/5628149> Duplicate probe firings in Security.framework
1160 * src/LTOReader.hpp: optimize() now returns atoms optimized away
1161 * src/ObjectFile.h: optimize() should return if it did anything
1162 * src/ArchiveReader.hpp: pass through optimize() result
1163 * src/ld.cpp: rework dtrace probe processing as a new pass to prevent double counting
1166 2008-07-15 Nick Kledzik <kledzik@apple.com>
1168 <rdar://problem/6061904> automatically order initializers to start of __TEXT
1169 * src/Options.cpp: add -no_order_inits option
1170 * src/MachOReaderRelocatable.hpp: merge __StaticInit into __text
1171 * src/ObjectFile.h: add fAutoOrderInitializers
1172 * src/ld.cpp: sort initializer to start of __text and terminators to end
1173 * doc/man/man1/ld.1: add doc about -no_order_inits
1174 * unit-tests/test-cases/init-order: add test case
1176 2008-07-15 Nick Kledzik <kledzik@apple.com>
1178 <rdar://problem/6073697> Only add LC_SEGMENT_SPLIT_INFO to dylibs that might be in the shared cache
1179 * src/MachOWriterExecutable.hpp: re-layout load commands after split-seg data computed
1180 * src/Options.cpp: non-public install name will disable split-seg load command
1183 2008-07-14 Nick Kledzik <kledzik@apple.com>
1185 <rdar://problem/6069861> ld -r for x86_64 is changing visibility of cstring constants
1186 * src/MachOWriterExecutable.hpp: force x86_64 cstring labels to be local in -r mode
1187 * unit-tests/test-cases/cstring-label: added test case
1190 2008-07-11 Nick Kledzik <kledzik@apple.com>
1192 <rdar://problem/6070190> ld not adding updating LC_SEGMENT_SPLIT_INFO with __unwind_info section
1193 * src/MachOWriterExecutable.hpp: run createSplitSegContent() after __unwind_info section is created
1195 2008-07-10 Nick Kledzik <kledzik@apple.com>
1197 * src/LTOReader.hpp: improve missing symbol error message
1200 2008-07-09 Nick Kledzik <kledzik@apple.com>
1202 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1203 * src/ld.cpp: first phase, order sections
1206 2008-07-08 Nick Kledzik <kledzik@apple.com>
1208 * src/MachOReaderRelocatable.hpp: remove "coal" sections when creating a final linked image
1211 2008-07-08 Nick Kledzik <kledzik@apple.com>
1213 <rdar://problem/6054476> ld: add support for mllvm LTO options
1214 * src/Options.cpp: support -mllvm option
1215 * src/LTOReader.hpp: call lto_codegen_debug_options() with -mllvm options
1216 * src/ld.cpp: pass llvmOptions to optimize()
1217 * src/Options.h: add fLLVMOptions
1218 * src/ArchiveReader.hpp: add llvmOptions parameter to optimize()
1219 * src/ObjectFile.h: add llvmOptions parameter to optimize()
1220 * unit-tests/test-cases/lto-llvm-options: add test case
1223 2008-07-07 Nick Kledzik <kledzik@apple.com>
1225 <rdar://problem/6054296> Linker fails with: 24-bit pointer diff out of range in unwind info in unwind info from...
1226 * src/MachOWriterExecutable.hpp: fix when to fallback to uncompressed unwind info
1229 2008-07-03 Nick Kledzik <kledzik@apple.com>
1231 <rdar://problem/6001472> ld crash with gcc-4.0 code that uses a zero sized array
1232 * src/MachOReaderRelocatable.hpp: handle zero size atom in a zero sized section
1235 2008-07-03 Nick Kledzik <kledzik@apple.com>
1237 <rdar://problem/6016809> ld crashes when bad ppc relocs are found
1238 * src/MachOReaderRelocatable.hpp: change all missing PAIR warnings to errors
1241 2008-07-02 Nick Kledzik <kledzik@apple.com>
1243 <rdar://problem/5881324> when linking a kext the static linker should leave a pad in the headers to allow code signing
1244 * src/MachOWriterExecutable.hpp: add padding for load commands in object files
1245 * unit-tests/test-cases/code-signed-object-file: added test case
1248 2008-07-02 Nick Kledzik <kledzik@apple.com>
1250 <rdar://problem/6048484> LC_SEGMENT_64 filesize incorrect for MH_OBJECT filetype
1251 * src/MachOWriterExecutable.hpp: correctly set segment size info in object files
1252 * unit-tests/test-cases/no-object-symbols: add test case
1255 2008-06-26 Nick Kledzik <kledzik@apple.com>
1257 * ld64.xcodeproj/project.pbxproj: enable ld and rebase targets to build for x86_64
1258 * src/rebase.cpp: remove unused fRelocBase field that was not 64-bit clean
1259 * src/MachOReaderRelocatable.hpp: fix getEncodedP() to be 64-bit clean
1262 ----- Tagged ld64-86.3
1264 2008-06-17 Nick Kledzik <kledzik@apple.com>
1266 * src/ld.cpp: fix loadUndefines() to double check undefine symbol was not already loaded
1269 ----- Tagged ld64-86.2
1271 2008-06-14 Nick Kledzik <kledzik@apple.com>
1273 * srd/ld.cpp: Add NULL check in getTentativesNames()
1276 ----- Tagged ld64-86.1
1278 2008-06-06 Nick Kledzik <kledzik@apple.com>
1280 * src/MachOWriterExecutable.hpp: fix header padding calculation for dyld
1283 ----- Tagged ld64-86
1285 2008-06-04 Nick Kledzik <kledzik@apple.com>
1287 * src/LTOReader.hpp: if lto_codegen_add_module() fails, add explanation to error message
1290 2008-06-04 Nick Kledzik <kledzik@apple.com>
1292 * src/ObjectFile.h: add deadAtoms parameter to optimize()
1294 * src/ArchiveReader.hpp: ditto
1295 * src/MachOReaderRelocatable.hpp: handle llvm use of 0x1B pointer encodings in CIEs
1296 * src/LTOReader.hpp: make sure libLTO.dylib knows about any llvm symbol coalesced away
1297 * unit-tests/test-cases/lto-weak-native-override: add test case
1300 2008-06-04 Nick Kledzik <kledzik@apple.com>
1302 <rdar://problem/5935600> LTO : 176.gcc and 177.mesa build failure at -O4
1303 * src/LTOReader.hpp: make sure internal is returned by getAtoms()
1304 * unit-tests/test-cases/lto-archive-dylib: update test case
1307 2008-06-03 Nick Kledzik <kledzik@apple.com>
1309 <rdar://problem/5894163> fix for 5613343 need to search for definitions for common symbols is broken
1310 * src/ld.cpp: modify loadUndefines() to check for undefines in all files and tentative definitions but only in archives
1311 * src/machochecker.cpp: check for undefine symbols and external symbols with same name
1312 * unit-tests/test-cases/tentative-and-archive: update test case
1315 2008-06-03 Nick Kledzik <kledzik@apple.com>
1317 <rdar://problem/5935237> linker produces wrong result for 16-bit call relocations
1318 * src/MachOReaderRelocatable.hpp: properly parse i386 scattered relocs for word sized pc-rel vanilla
1319 * src/MachOWriterExecutable.hpp: propery compute displacement for x86::kPCRel16
1320 * unit-tests/test-cases/relocs-asm: update test case with callw instructions
1323 2008-06-03 Nick Kledzik <kledzik@apple.com>
1325 <rdar://problem/5905900> Building kext x86_64 with unexported symbols file causes linking problems
1326 * src/MachOWriterExecutable.hpp: better check when creating undefined proxy atoms
1327 * unit-tests/test-cases/unexported_symbols_list-r: added test case
1330 2008-06-02 Nick Kledzik <kledzik@apple.com>
1332 <rdar://problem/5659338> S_CSTRING_LITERALS section type not preserved in executable
1333 * src/ObjectFile.h: added ContentType
1334 * src/MachOReaderRelocatable.hpp: set ContentType for anonymous string literals
1335 * src/MachOWriterExecutable.hpp: set S_CSTRING_LITERALS if ContentType is kCStringType
1336 * unit-tests/test-cases/cstring-custom-section: added test case
1339 2008-06-02 Nick Kledzik <kledzik@apple.com>
1341 <rdar://problem/5980194> linker should produce __unwind_info section in final linked images
1342 * src/ld.cpp: sort __unwind_info then __eh_frame section to end of __TEXT
1343 * src/Architectures.hpp: add kImageOffset32 and kPointerDiff24
1344 * src/ObjectFile.h: add compact unwind info support
1345 * src/MachOReaderRelocatable.hpp: add compact unwind info support
1346 * src/MachOFileAbstraction.hpp: add C++ wrappers for unwind section layout
1347 * src/UnwindDump.cpp: new tool for dumping __unwind_info section
1348 * src/MachOWriterExecutable.hpp: create __unwind_info section when needed
1349 * src/ObjectDump.cpp: print unwind info
1352 2008-06-02 Nick Kledzik <kledzik@apple.com>
1354 * unit-tests/test-cases/llvm-integration: split out some test cases
1355 * unit-tests/test-cases/lto-preload-pie: added
1356 * unit-tests/test-cases/lto-archive-dylib: added
1359 2008-05-30 Nick Kledzik <kledzik@apple.com>
1361 * unit-tests: fixes to build all tests with with gcc-4.2 on SnowLeopard
1364 2008-05-30 Nick Kledzik <kledzik@apple.com>
1366 <rdar://problem/5536348> support -preload option to generate MH_PRELOAD binaries compatible with mtoc(1) and EFI
1367 * src/ld.cpp: add entryPoint parameter to optimize()
1368 * src/ArchiveReader.hpp: ditto
1369 * src/ObjectFile.h: ditto
1370 * src/LTOReader.hpp: use entryPoint parameter to optimize()
1371 * src/Options.h: add kPreload and segment alignment
1372 * src/Options.cpp: support -preload and -segalign
1373 * src/MachOWriterExecutable.hpp: support kPreload and non-page aligned segments
1376 2008-05-30 Nick Kledzik <kledzik@apple.com>
1378 <rdar://problem/4431008> ld should warn if passed -r and also dylibs
1379 * src/ld.cpp: check for spurious dylibs in Linker::addDylib()
1382 ----- Tagged ld64-85.6
1384 2008-11-01 Nick Kledzik <kledzik@apple.com>
1386 <rdar://problem/6254202> support increased branch range in Thumb-2
1387 * src/MachOWriterExecutable.hpp: in fixUpReferenceFinal() support new longer branch range
1390 2008-11-01 Nick Kledzik <kledzik@apple.com>
1392 <rdar://problem/6104368> ld warning: unknown option to -iphoneos_version_min, not 1.x or 2.x
1393 * src/Options.cpp: In setIPhoneVersionMin() support 3.x
1396 ----- Tagged ld64-85.5
1398 2008-09-17 Nick Kledzik <kledzik@apple.com>
1400 <rdar://problem/6162415> vtable pointers can be missing thumb bit
1401 * src/MachOWriterExecutable.hpp: Writer<arm>::fixUpReferenceFinal() OR in the 1 bit if the target
1402 of a arm::kReadOnlyPointer is thumb.
1405 ----- Tagged ld64-85.4
1407 2008-08-11 Nick Kledzik <kledzik@apple.com>
1409 <rdar://problem/6138961> ld should ignore LD_PREBIND when processing a static archive
1410 * src/MachOWriterExecutable.hpp: in setImportNlist() never use N_PBUD for object files
1412 ----- Tagged ld64-85.3
1414 2008-07-14 Nick Kledzik <kledzik@apple.com>
1416 <rdar://problem/6060912> Prebinding busted in DTSB
1417 * src/Options.cpp: check for libstdc++.6.0.[49] in seg_addr_table
1420 ----- Tagged ld64-85.2
1422 2008-05-06 Nick Kledzik <kledzik@apple.com>
1424 <rdar://problem/5905889> ARM ld should take W bit off of maxprot for __TEXT segment
1425 * src/MachOWriterExecutable.hpp: for iPhone always set maxprot to be initprot in all segments
1428 2008-05-06 Nick Kledzik <kledzik@apple.com>
1430 <rdar://problem/5914343> encryptable images may not be signable
1431 * src/MachOWriterExecutable.hpp: use minimum header padding when aligning __text section
1434 ----- Tagged ld64-85 (Xcode 3.1)
1436 2008-04-29 Nick Kledzik <kledzik@apple.com>
1438 * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
1441 2008-04-29 Nick Kledzik <kledzik@apple.com>
1443 <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
1444 * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
1447 2008-04-29 Nick Kledzik <kledzik@apple.com>
1449 <rdar://problem/5866582> GLRendererFloat has bad __eh_frame section caused by mixing llvm-gcc and gcc object files
1450 * src/MachOReaderRelocatable.hpp: make all atoms in __eh_frame section have 1-byte alignment
1451 * src/MachOWriterExecutable.hpp: make __eh_frame section have pointer sized alignment
1454 2008-04-17 Nick Kledzik <kledzik@apple.com>
1456 * src/MachOReaderRelocatable.hpp: better cpu subtype support
1459 2008-04-14 Nick Kledzik <kledzik@apple.com>
1461 <rdar://problem/5733759> ld64 has bad ARM branch island check
1462 * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail
1465 2008-04-10 Nick Kledzik <kledzik@apple.com>
1467 * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
1470 ----- Tagged ld64-84.4
1472 2008-04-10 Nick Kledzik <kledzik@apple.com>
1474 <rdar://problem/5847206> SPEC2000/eon built with -mdynamic-no-pic won't run
1475 * src/Architectures.hpp: added arm::kReadOnlyPointer
1476 * src/MachOReaderRelocatable.hpp: generate arm::kReadOnlyPointer
1477 * src/MachOWriterExecutable.hpp: use arm::kReadOnlyPointer
1478 * src/machochecker.cpp: allow MH_PIE bit
1479 * unit-tests/test-cases/switch-jump-table: added test cases
1482 ----- Tagged ld64-84.3
1484 2008-04-09 Nick Kledzik <kledzik@apple.com>
1486 <rdar://problem/5852023> -undefined dynamic_lookup busted
1487 * src/ld.cpp: don't create proxy atom when scanning for dylib duplicates
1488 * unit-tests/test-cases/tentative-and-archive: use -undefined dynamic_lookup
1491 ----- Tagged ld64-84.2
1493 2008-04-04 Nick Kledzik <kledzik@apple.com>
1495 * src/ld.cpp: don't add .eh symbols to symbol table in -r mode
1496 * unit-tests/test-cases/eh-coalescing-r: update to test out of order coalescing
1499 ----- Tagged ld64-84.1
1501 2008-03-28 Nick Kledzik <kledzik@apple.com>
1503 <rdar://problem/5720961> ld should prefer architecture-specific variant over generic in fat object file
1504 * src/Options.cpp: fully process -arch arguments into fArchitecture and fSubArchitecture
1505 * src/ld.cpp: when -arch with a subtype is used, try to find the exact subtype from fat files
1506 * unit-tests/test-cases/cpu-sub-types-preference: added test cases for arm and ppc
1509 ----- Tagged ld64-84
1511 2008-03-28 Nick Kledzik <kledzik@apple.com>
1513 * src/LTOReader.hpp: don't print lto version, if lto is unavailable
1516 2008-03-26 Nick Kledzik <kledzik@apple.com>
1518 <rdar://problem/5575399> Add LD_WARN_COMMONS to BigBear builds
1519 * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file
1522 2008-03-26 Nick Kledzik <kledzik@apple.com>
1524 <rdar://problem/5797713> Need encryption tag in mach-o file
1525 <rdar://problem/5811920> linker should adjust arm final linked images so __text is never on the same page as the load commands
1526 * src/MachOFileAbstraction.hpp: add support for encryption_info_command
1527 * src/Options.cpp: add support for LD_NO_ENCRYPT and -no_encryption
1528 * src/MachOWriterExecutable.hpp: add EncryptionLoadCommandsAtom
1529 * src/machochecker.cpp: validate LC_ENCRYPTION_INFO
1532 2008-03-25 Nick Kledzik <kledzik@apple.com>
1534 <rdar://problem/5712533> ld64 does not recognize LLVM bitcode archive files
1535 * src/MachOReaderArchive.hpp: renamed to src/ArchiveReader.hpp
1536 * src/ArchiveReader.hpp: sniff each member and instantiate correct reader
1537 * src/ld.cpp: rename mach_o::archive::Reader to archive::Reader
1538 * ld64.xcodeproj/project.pbxproj: rename MachOReaderArchive.hpp to ArchiveReader.hpp
1539 * unit-tests/test-cases/llvm-integration: added test case
1542 2008-03-25 Nick Kledzik <kledzik@apple.com>
1544 <rdar://problem/5771658> ld64 should switch to new libLTO.dylib interface
1545 <rdar://problem/5675690> Produce llvm bc file in 'ld -r' mode if all .o files are llvm bc
1546 * src/LTOReader.hpp: rewrite from LLVMReader.hpp to use new lto_* C interface
1547 * unit-tests/test-cases/llvm-integration: update and comment
1548 * ld64.xcodeproj/project.pbxproj: update to lazy load libLTO.dylib
1549 * src/ld.cpp: rework and simplify Linker::optimize()
1550 * src/ObjectDump.cpp: Add -nm option
1553 2008-03-25 Nick Kledzik <kledzik@apple.com>
1555 * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem
1556 * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem
1559 2008-03-24 Nick Kledzik <kledzik@apple.com>
1561 <rdar://problem/5814613> Xcode 3.1 breaks linkage of libgcj.9.dylib from gcc 4.3.0
1562 * src/MachOWriterExecutable.cpp: Make sure all ivars in Writer are initialized.
1565 2008-03-21 Nick Kledzik <kledzik@apple.com>
1567 * src/Options.cpp: warn if -seg1addr value is not page aligned
1570 2008-03-21 Nick Kledzik <kledzik@apple.com>
1572 <rdar://problem/5806437> Move ARM support outside of __OPEN_SOURCE__
1573 * src/ld.cpp: remove __OPEN_SOURCE__ around arm support
1574 * src/LLVMReader.hpp: remove __OPEN_SOURCE__ around arm support
1575 * src/MachOReaderDylib.hpp: remove __OPEN_SOURCE__ around arm support
1576 * src/ObjectFile.h: remove __OPEN_SOURCE__ around arm support
1577 * src/MachOReaderRelocatable.hpp: remove __OPEN_SOURCE__ around arm support
1578 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
1579 * src/MachOWriterExecutable.hpp: remove __OPEN_SOURCE__ around arm support
1580 * src/ObjectDump.cpp: remove __OPEN_SOURCE__ around arm support
1581 * ld64.xcodeproj/project.pbxproj: remove ARM_SUPPORT from config.h
1584 ----- Tagged ld64-83.2
1586 2008-03-15 Nick Kledzik <kledzik@apple.com>
1588 <rdar://problem/5801620> ld64-83 removes OBJC_CLASS_$ symbols from projects, causes catastrophic results
1589 * src/Options.cpp: restore "case CPU_TYPE_ARM" in switch statement for .objc_class symbols in .exp files
1590 * unit-tests/test-cases/objc-exported_symbols_list: added test case
1593 ----- Tagged ld64-83.1
1595 2008-03-14 Nick Kledzik <kledzik@apple.com>
1597 <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
1598 * src/Options.cpp: support -iphoneos_version_min as well
1601 ----- Tagged ld64-83
1603 2008-03-10 Nick Kledzik <kledzik@apple.com>
1605 <rdar://problem/5791543> ld needs to strip iphone_version_min option if invoking ld_classic
1606 * src/Options.cpp: suppress -iphone_version_min from being passed to ld_classic
1609 2008-03-04 Nick Kledzik <kledzik@apple.com>
1611 <rdar://problem/4171253> ADOBE XCODE: Linker option to lazy load frameworks (cause dyld is too slow)
1612 * src/MachOWriterExecutable.hpp: create lazy stubs and LC_LAZY_LOAD_DYLIB for lazy load dylibs
1613 * src/Options.cpp: support -lazy-l, -lazy_library, and -lazy_framework
1614 * src/MachOFileAbstraction.hpp: add LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS until in cctools
1615 * src/MachOReaderDylib.hpp: add isLazyLoadedDylib()
1616 * src/ld.cpp: pass lazy helper atom to writer
1617 * doc/man/man1/ld.1: document new options
1618 * unit-tests/test-cases/lazy-dylib-objc: add test case
1619 * unit-tests/test-cases/lazy-dylib: add test case
1622 ----- Tagged ld64-82.7
1624 2008-03-07 Nick Kledzik <kledzik@apple.com>
1626 <rdar://problem/5787149> duplicate symbol literal-pointer@__OBJC@__message_refs@...
1627 * src/MachOReaderRelocatable.hpp: AnonymousAtom from S_LITERAL_POINTERS section should be weak
1628 * unit-tests/test-cases/objc-selector-coalescing: added test case
1631 ----- Tagged ld64-82.6
1633 2008-03-04 Nick Kledzik <kledzik@apple.com>
1635 <rdar://problem/5779681> ld crashes building XsanFS for Snow Leopard Builds
1636 * src/ld.cpp: add bool dylibsOnly parameter to addJustInTimeAtoms()
1637 * unit-tests/test-cases/tentative-and-archive: added test case
1639 2008-03-04 Nick Kledzik <kledzik@apple.com>
1641 <rdar://problem/5775822> ld64 should not force building with gcc 4.0
1642 * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0
1645 2008-02-29 Nick Kledzik <kledzik@apple.com>
1647 <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
1648 * src/Options.cpp: only splitseg if prebound
1651 2008-02-29 Nick Kledzik <kledzik@apple.com>
1653 <rdar://problem/5774231> Linker should not make GSYM debug note for .objc_category_* symbols
1654 * src/ld.cpp: suppress GSYM debug notes for absolute symbols
1655 * unit-tests/test-cases/objc-category-debug-notes: added test case
1658 2008-02-29 Nick Kledzik <kledzik@apple.com>
1660 <rdar://problem/5768970> non-ASCII CFString support is broken
1661 * src/MachOReaderRelocatable.hpp: only name and coalesce cfstring constants if they use a __cstring
1662 * unit-tests/test-cases/cfstring-utf16: add test case
1665 2008-02-25 Nick Kledzik <kledzik@apple.com>
1667 <rdar://problem/5366363> ld -r -x
1668 * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
1671 ----- Tagged ld64-82.5
1673 2008-02-12 Nick Kledzik <kledzik@apple.com>
1675 <rdar://problem/5738023> x86_64: -stack_size failure when large __bss is used
1676 * src/ld.cpp: only move section already in __DATA segment to new __huge section
1677 * unit-tests/test-cases/stack_size_no_addr: updated test case to add large bss section
1680 ----- Tagged ld64-82.4
1682 2008-02-06 Nick Kledzik <kledzik@apple.com>
1684 <rdar://problem/5726215> comdat warnings with ld -r of C++ .o files
1685 * unit-tests/test-cases/eh-coalescing-r: added test case
1686 * src/ld.cpp: in ld -r mode don't warn about if .eh symbols are not static
1689 2008-02-06 Devang Patel <dpatel@apple.com>
1691 <rdar://problem/5724990> LTO of Bom framework with -dead_strip causes ld(1) crash
1692 * src/LLVMReader.hpp: Check fAtom while determining LLVMReference target binding.
1693 * unit-tests/test-cases/llvm-integration/Makefile: Add new test case.
1694 * unit-tests/test-cases/llvm-integration/a15.c: New.
1695 * unit-tests/test-cases/llvm-integration/b15.c: New.
1696 * unit-tests/test-cases/llvm-integration/c15.c: New.
1698 2008-02-05 Nick Kledzik <kledzik@apple.com>
1700 * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used
1702 ----- Tagged ld64-82.3
1704 2008-02-04 Nick Kledzik <kledzik@apple.com>
1706 <rdar://problem/5721186> ld doesn't seem to understand $ld$add$os... and $ld$hide$os... for 10.6 moves
1707 * src/ObjectFile.h: add 10.6
1708 * src/Options.cpp: add 10.6 support
1709 * src/MachOReaderDylib.hpp: recognize $os10.6$
1712 ----- Tagged ld64-82.2
1714 2008-01-30 Devang Patel <dpatel@apple.com>
1716 <rdar://problem/5714833> Can't build 64-bit Intel binaries with LTO
1717 <rdar://problem/5714787> ld64 fails to build with llvm-gcc-4.2
1718 * src/LLVMReader.hpp: Fix character count typo in strncmp call.
1719 Use const char * to initialize temp. string.
1720 * ld64.xcodeproj/project.pbxproj: use $(DEVELOPER_DIR) in header search construction
1721 instead of hard coding /Developer.
1723 ----- Tagged ld64-82.1
1725 2008-01-23 Nick Kledzik <kledzik@apple.com>
1727 * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
1730 2008-01-22 Nick Kledzik <kledzik@apple.com>
1732 <rdar://problem/5695496> ld uses 32-bits in some places to hold addresses when parsing 64-bit mach-o files
1733 * src/MachOReaderRelocatable.hpp: use AddrToAtomMap type that switch address to 64-bits for 64-bit archs
1734 * src/MachOWriterExecutable.hpp: verify BR14 does not overflow for external relocs
1735 * unit-tests/test-cases/relocs-c: update test case to slide addresses to verify x86_64 .o files
1738 ----- Tagged ld64-82
1740 2008-01-18 Nick Kledzik <kledzik@apple.com>
1742 <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
1743 * src/ld.cpp: fix typo in warning string
1746 2008-01-16 Nick Kledzik <kledzik@apple.com>
1748 <rdar://problem/5565074> Bundle Loader does not work anymore when loader is a bundle
1749 <rdar://problem/5590203> ld warns of incorrect architecture when linking a bundle to a bundle
1750 * src/MachOReaderDylib.hpp: support linking against bundles via -bundle_loader. Clean up error messages
1751 * unit-tests/test-cases/bundle_loader: update test case
1754 2008-01-16 Nick Kledzik <kledzik@apple.com>
1756 <rdar://problem/5366363> ld -r -x creates debug notes (stabs) when it should not with -x (keep only global symbols)
1757 * src/Options.cpp: in reconfigureDefaults() if -r and -x then -S
1760 2008-01-16 Nick Kledzik <kledzik@apple.com>
1762 <rdar://problem/5566068> if ld crashes while writing output file, it should delete the half written file
1763 * src/MachOWriterExecutable.hpp: wrap open/write/close in try block and add signal handlers all to delete
1764 output file on failure.
1767 2008-01-16 Devang Patel <dpatel@apple.com>
1769 * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
1772 2008-01-16 Nick Kledzik <kledzik@apple.com>
1774 <rdar://problem/5593537> GC-supported library can't be linked into GC-required executable
1775 * src/ld.cpp: loosen constraint that all objc code must be compiled with same GC settings and
1776 allow gc-compatible code to be linked into anything.
1777 * unit-tests/test-cases/objc-gc-checks: update test case
1780 2008-01-15 Nick Kledzik <kledzik@apple.com>
1782 <rdar://problem/5687976> no debug notes for custom named data
1783 * src/ld.cpp: in synthesizeDebugNotes() check getSymbolTableInclusion() instead of for leading underscore
1784 * unit-tests/test-cases/dwarf-debug-notes: update test case
1786 ----- Tagged ld64-81.5
1788 2008-01-14 Devang Patel <dpatel@apple.com>
1790 <rdar://problem/5683813> llvm-gcc-4.2 fails to build Sqlite 3.5.4 with -O4
1791 * src/LLVMReader.hpp: Resolve proxy references. Collect new unbounded references
1793 * src/ld.cpp: Resolve additional unbounded references after optimization.
1796 2008-01-14 Nick Kledzik <kledzik@apple.com>
1798 <rdar://problem/5655246> PPC Leopard (Xcode 3.0) linker ld gets "Bus error" sometimes
1799 * src/MachOReaderRelocatable.hpp: use same code as x86 to parse ppc and arm sect-diff relocs
1800 * src/MachOWriterExecutable.hpp: use same code as x86 to write ppc and arm sect-diff relocs
1803 2008-01-11 Nick Kledzik <kledzik@apple.com>
1805 <rdar://problem/5637618> PPC Leopard (Xcode 3.0) linker ld reports "unknown scattered relocation type 4"
1806 * src/MachOReaderRelocatable.hpp: add PPC_RELOC_HI16 to scattered reloc parsing
1807 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added tests for scattered hi/lo instructions
1810 2008-01-11 Nick Kledzik <kledzik@apple.com>
1812 * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
1815 2008-01-11 Nick Kledzik <kledzik@apple.com>
1817 <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
1818 * doc/man/man1/ld.1: make meaning of "suffix" more explicit
1821 2008-01-11 Nick Kledzik <kledzik@apple.com>
1823 <rdar://problem/5633081> Obj-C Symbols in Leopard Can't Be Weak Linked
1824 * src/MachOWriterExecutable.hpp: set weak and lazy attributes on dummy .objc_class_name undefines
1825 to dylibs to support Mac OS X 10.3.x dyld
1828 2008-01-11 Nick Kledzik <kledzik@apple.com>
1830 <rdar://problem/5669751> Unknown error with linker (dyld: unknown external relocation type)
1831 * src/ld.cpp: fix crash when SO stabs are not balanced
1834 2008-01-11 Devang Patel <dpatel@apple.com>
1836 <rdar://problem/5667433> LTO does not work if expected output is a dynamic library
1837 * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate
1840 2000-01-10 Nick Kledzik <kledzik@apple.com>
1842 <rdar://problem/5680988> __cls_refs section is losing S_LITERAL_POINTERS section type
1843 * src/MachOWriterExecutable.hpp: special case __cls_refs section
1844 * unit-tests/test-cases/objc-literal-pointers: add test case
1847 2008-01-03 Nick Kledzik <kledzik@apple.com>
1849 <rdar://problem/5667688> wrong EH information might be used
1850 Created new kGroupSubordinate reference kind to model group comdat. The "signature" atom
1851 has kGroupSubordinate references to the other atoms in the group. If the signature atom
1852 is coalesced away, the linker follows kGroupSubordinate references and throws away the
1853 other members of the group.
1854 * unit-tests/test-cases/eh-coalescing: added test case
1855 * src/ld.cpp: added markDead() and use propagate to subordinates
1856 * src/Architectures.hpp: added kGroupSubordinate
1857 * src/MachOReaderRelocatable.hpp: add kGroupSubordinate reference from a function to its .eh atom
1858 and if used, from .eh atom to its LSDA atom.
1859 * src/MachOWriterExecutable.hpp: handle kGroupSubordinate like kNoFixUp
1861 ----- Tagged ld64-81.4.1
1863 2007-12-19 Devang Patel <dpatel@apple.com>
1865 * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
1867 2007-12-19 Devang Patel <dpatel@apple.com>
1869 * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
1871 2007-12-19 Devang Patel <dpatel@apple.com>
1873 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
1874 * src/LLVMReader.hpp: Add printLLVMVersion() to print llvm version string in verbose mode.
1875 * src/Options.cpp: Use printLLVMVersion() in verbose mode.
1877 2007-12-19 Devang Patel <dpatel@apple.com>
1879 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
1880 * src/Options.h: Add verbose() method to check fVerbose flag.
1881 * src/LLVMReader.hpp: Print LLVM version string in verbose mode.
1883 ----- Tagged ld64-81.4
1885 2007-12-18 Devang Patel <dpatel@apple.com>
1887 * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
1889 ----- Tagged ld64-81.3
1891 2007-12-17 Nick Kledzik <kledzik@apple.com>
1893 * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
1896 2007-12-17 Devang Patel <dpatel@apple.com>
1898 * src/LLVMReader.hpp: Do not throw exception if LLVMReader is not able to
1899 dlopen LTO library. Instead just flag input file as an invalid LLVM bitcode file.
1902 2007-12-14 Nick Kledzik <kledzik@apple.com>
1904 <rdar://problem/5645908> gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all)
1905 * src/MachOWriterExecutable.hpp: fix Writer<x86>::generatesExternalTextReloc() to allow text relocs
1906 * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static
1909 2007-12-14 Devang Patel <dpatel@apple.com>
1911 <rdar://problem/5648438> Enable Link Time Optimization in Opal
1912 * src/LLVMReader.hpp: Locate LLVMlto.dylib relative to ld location in Developer folder.
1913 * ld64.xcodeproj/project.pbxproj: Add {DEVELOPER_DIR}/usr/include in header search path.
1914 * unit-tests/run-all-unit-tests: Set DYLD_FALLBACK_LIBRARY_PATH to find LLVMlto.dylib during unit testing.
1915 * unit-tests/testcases/llvm-integration/Makefile: Point LLVMGCC and LLVMGXX to llvm-gcc-4.2 in Developer folder during unit testing.
1918 2007-12-13 Nick Kledzik <kledzik@apple.com>
1920 <rdar://problem/5645446> SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ...
1921 * src/MachOReaderRelocatable.hpp: in Reader<x86>::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly
1923 ----- Tagged ld64-81.2
1927 2007-12-07 Nick Kledzik <kledzik@apple.com>
1929 <rdar://problem/5615298> support 8-bit relocations for i386
1930 * src/Architectures.hpp: add kPCRel8
1931 * src/MachOReaderRelocatable.hpp: support 8-bit pc-rel relocations for intel
1932 * src/MachOWriterExecutable.hpp: support 8-bit pc-rel relocations for intel
1933 * unit-tests/test-cases/relocs-asm: add test cases
1936 ----- Tagged ld64-81.1
1938 2007-12-06 Nick Kledzik <kledzik@apple.com>
1940 * src/MachOReaderDylib.hpp: rework cycle detection to remove some false positives
1943 2007-12-05 Nick Kledzik <kledzik@apple.com>
1945 <rdar://problem/5628149> Duplicate probe firings in Security.framework
1946 * src/ld.cpp: check dtrace probe sites are not in fDeadAtoms before using
1947 * unit-tests/test-cases/dtrace-static-probes-coalescing: add test case
1950 2007-12-05 Nick Kledzik <kledzik@apple.com>
1952 * src/MachOReaderRelocatable.hpp: fix CFString coalescing to work with -fwritable-strings
1953 * unit-tests/test-cases/cfstring-coalesce: add -fwritable-strings to test case
1956 ----- Tagged ld64-81
1958 2007-11-15 Nick Kledzik <kledzik@apple.com>
1960 <rdar://problem/4196067> ld64 should support runtime text relocations
1961 * src/MachOWriterExecutable.hpp: add generatesLocalTextReloc() and generatesExternalTextReloc()
1962 * src/Options.cpp: process -read_only_relocs option
1963 * src/Options.h: add allowTextRelocs() and warnAboutTextRelocs()
1964 * src/MachOReaderRelocatable.hpp: add hasLongBranchStubs()
1965 * src/machochecker.cpp: allow relocs in read only segments, if section flags are set
1966 * unit-tests/test-cases/read-only-relocs: update test case
1969 2007-11-08 Devang Patel <dpatel@apple.com>
1971 * ld64.xcodeproj/project.pbxproj: add new build phase "build configure.h" for
1973 * src/ld.cpp: Include "configure.h"
1976 ----- Tagged ld64-80.11
1978 2008-02-12 Nick Kledzik <kledzik@apple.com>
1980 <rdar://problem/5741312> Wrong section name for objc info for ARM when OBJC2 is used
1981 * src/MachOWriterExecutable.hpp: switch segment/section name for ARM objc2 image info
1983 ----- Tagged ld64-80.10
1985 2008-02-11 Nick Kledzik <kledzik@apple.com>
1987 <rdar://problem/5733578> ld64 does not support -aspen_version_min 2.0
1988 * src/Options.cpp: allow 2.x for -aspen_version_min
1991 2008-02-11 Nick Kledzik <kledzik@apple.com>
1993 <rdar://problem/5733575> ld_classic: unknown flag: -aspen_version_min
1994 * src/Options.cpp: change -aspen_version_min x.x to -macosx_version_min 10.5 when invoking ld_classic
1997 ----- Tagged ld64-80.9
1999 2008-01-29 Nick Kledzik <kledzik@apple.com>
2001 <rdar://problem/5713054> -iphone_version_min ==> -aspen_version_min
2002 * src/Options.cpp: support -aspen_version_min
2005 ----- Tagged ld64-80.8
2007 2008-01-10 Nick Kledzik <kledzik@apple.com>
2009 * src/Options.cpp: support transition to new objc ABI for ARM by allowing old .objc_class_name_*
2010 style names in export files and map them to new _OBJC_CLASS_$_ style names.
2013 ----- Tagged ld64-80.7
2015 2008-01-02 Nick Kledzik <kledzik@apple.com>
2017 <rdar://problem/5572168> BigBear5A18 isn't fully prebound
2018 * src/Options.cpp: make fNeedsModuleTable true for arm
2020 ----- Tagged ld64-80.6
2022 2007-11-30 Nick Kledzik <kledzik@apple.com>
2024 <rdar://problem/5620976> -iphone_version_min
2025 * src/Options.cpp: handle -iphone_version_min option
2028 ----- Tagged ld64-80.5
2030 2007-11-26 Nick Kledzik <kledzik@apple.com>
2032 <rdar://problem/5601142> need to special case some dylibs in seg_addr_table
2033 * src/Options.cpp: retry seg_add_table lookup for a couple of unusual dylibs
2036 ----- Tagged ld64-80.4
2038 2007-11-06 Nick Kledzik <kledzik@apple.com>
2040 * src/MachOReaderRelocatable.hpp: fix parsing of external and scattered thumb branch22 relocs
2041 * unit-tests/test-cases/thumb-blx: add test case to keep blx issues from coming back
2043 ----- Tagged ld64-80.3
2045 2007-11-03 Nick Kledzik <kledzik@apple.com>
2047 * src/MachOReaderRelocatable.hpp: remove recalc of dstAddr which could cause thumb branches to be +2
2048 * src/MachOWriterExecutable.hpp: remove incorrect test for relocateableExternal
2050 ----- Tagged ld64-80.2
2052 2007-11-01 Nick Kledzik <kledzik@apple.com>
2054 * src/ld.cpp: hack my own prototype for log2() until math.h is cleaned up
2057 ----- Tagged ld64-80.1
2059 2007-11-01 Nick Kledzik <kledzik@apple.com>
2061 * ld64.xcodeproj/project.pbxproj: add HEADER_SEARCH_PATHS for cross builds
2062 * src/ld.cpp: temporarily disable LLVM_SUPPORT
2063 * src/MachOWriterExecutable.hpp: Don't use CC_MD5() directly
2066 2007-10-26 Nick Kledzik <kledzik@apple.com>
2068 <rdar://problem/5556038> Cannot build with libm_static.a statically linked
2069 * src/MachOWriterExecutable.hpp: Fix makesExternalRelocatableReference() for -r -d case
2070 * unit-tests/test-cases/tentative-to-real-hidden: add test case
2073 ----- Tagged ld64-80
2075 2007-10-24 Nick Kledzik <kledzik@apple.com>
2077 <rdar://problem/4222696> linker should probably warn about trying to export a hidden symbol
2078 * src/ld.cpp: if using -exported_symbols_list check each hidden atom as it is added to symbol table
2079 * src/Options.h,.cpp: add hasExportMaskList()
2080 * unit-tests/test-cases/exported_symbols_list-hidden: added test case
2083 2007-10-24 Nick Kledzik <kledzik@apple.com>
2085 * src/MachOWriterExecutable.hpp: keep old style dtrace probes externel for kernel builds
2088 2007-10-23 Nick Kledzik <kledzik@apple.com>
2090 <rdar://problem/4556199> unify error and warning messages
2091 <rdar://problem/5546450> -w should suppress warnings
2092 * src/ld.cpp: use warning() function
2093 * src/Options.h: remove emitWarnings()
2094 * src/MachOReaderDylib.hpp: use warning() function
2095 * src/MachOReaderRelocatable.hpp: use warning() function
2096 * src/Options.cpp: use and implement warning()
2097 * src/MachOWriterExecutable.hpp: use warning() function
2098 * unit-tests/test-cases/visibility-warning: verify -w suppresses warnings
2101 2007-10-23 Devang Patel <dpatel@apple.com>
2103 * src/ld.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2104 * src/LLVMReader.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2105 * src/MachOReaderDylib.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2106 * src/ObjectFile.h: Cover arm support inside __OPEN_SOURCE__ macro check.
2107 * src/MachOReaderRelocatable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2108 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
2109 * src/MachOWriterExecutable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2110 * src/ObjectDump.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2113 2007-10-22 Nick Kledzik <kledzik@apple.com>
2115 * src/Options.cpp: add support for LD_DEAD_STRIP and LD_WARN_COMMONS
2116 * src/MachOReaderRelocatable.hpp: fix problem with -dead_strip of ObjC literal pointers
2119 2007-10-22 Nick Kledzik <kledzik@apple.com>
2121 * src/Options.cpp: have -static arm code link with ld_classic (for now)
2124 2007-10-22 Nick Kledzik <kledzik@apple.com>
2126 <rdar://problem/5396826> Recognize all arm architectures
2127 * src/MachOReaderRelocatable.hpp: add support for all ARM sub-types
2128 * unit-tests/test-cases/cpu-sub-types: add test cases for all combinations of ARM sub-types
2131 2007-10-19 Nick Kledzik <kledzik@apple.com>
2133 * src/*: merge in arm support
2134 * unit-tests/test-cases/*: fix to work for arm and thumb
2136 ----- Tagged ld64-79
2138 2007-10-16 Nick Kledzik <kledzik@apple.com>
2140 * src/MachOWriterExecutable.hpp: if -r mode, always set custom alignment (SET_COMM_ALIGN) on common symbols
2141 * unit-tests/test-cases/visibility-warning-dylib-v-archive/Makefile: fix warning
2142 * unit-tests/test-cases/static-executable/Makefile: fix spurious failure
2145 2007-10-16 Nick Kledzik <kledzik@apple.com>
2147 * src/MachOWriterExecutable.hpp: fix edge case in branch island generation
2150 2007-10-12 Nick Kledzik <kledzik@apple.com>
2152 <rdar://problem/5323449> Add option to create old, slow stubs for i386
2153 * src/ObjectFile.h/.cpp: support -read_only_stubs
2154 * src/MachOWriterExecutable.hpp: enhance StubAtom<x86> to support old style __symbol_stub/__la_symbol_ptr stubs
2155 * unit-tests/test-cases/slow-x86-stubs: add test case
2158 2007-10-12 Nick Kledzik <kledzik@apple.com>
2160 <rdar://problem/5427952> ld64's re-export cycle detection logic prevents use of X11 libGL on Leopard
2161 * src/Options.cpp: in findFileUsingPaths() don't search for embedded dylibs
2162 * unit-tests/test-cases/indirect-path-search/Makefile: added case for a dylib embedded in a framework
2165 2007-10-11 Nick Kledzik <kledzik@apple.com>
2167 <rdar://problem/5451987> add option to disable implicit load commands for indirectly used public dylibs
2168 * src/Options.cpp: add support for -no_implicit_dylibs
2169 * src/ObjectFile.h: add fImplicitlyLinkPublicDylibs
2170 * src/MachOReaderDylib.hpp: test fImplicitlyLinkPublicDylibs before hoisting an implicitly linked dylib
2171 * unit-tests/test-cases/implicit_dylib: add test case
2174 2007-10-11 Nick Kledzik <kledzik@apple.com>
2176 <rdar://problem/5254413> -interposable_list
2177 * src/Options.h/cpp: Add fInterposeList and fInterposeMode to support -interposable_list
2178 * src/MachOWriterExecutable.hpp: pass symbol name to fOptions.interposable()
2179 * unit-tests/test-cases/interposable_list: add test case
2182 2007-10-10 Nick Kledzik <kledzik@apple.com>
2184 <rdar://problem/5529626> If only weak_import symbols are used, linker should use LD_LOAD_WEAK_DYLIB
2185 * src/MachOWriterExecutable.hpp: automatically use LC_LOAD_WEAK_DYLIB if all symbols used from a dylib are weak_import
2186 * unit-tests/test-cases/weak_dylib: added test case
2189 2007-10-10 Nick Kledzik <kledzik@apple.com>
2191 <rdar://problem/5504954> linker does not error when dylib ordinal exceeds 250
2192 * src/MachOWriterExecutable.hpp: error out if ordinals exceed max allowed
2195 2007-10-10 Nick Kledzik <kledzik@apple.com>
2197 <rdar://problem/4067110> overriding 'operator new' or 'operator delete' fails if no weak symbols are present
2198 * src/ld.cpp: at end of checkUndefines() search dylibs for weak versions of any global external symbols
2199 * src/ObjectFile.h: add hasWeakExternals() method to Reader
2200 * src/MachOReaderDylib.hpp: implement hasWeakExternals() method in Reader
2201 * src/ExecutableFile.h: add overridesDylibWeakDefines parameter to write()
2202 * src/MachOWriterExecutable.hpp: use overridesDylibWeakDefines parameter to write()
2203 * unit-tests/test-cases/operator-new: add test case
2206 2007-10-05 Nick Kledzik <kledzik@apple.com>
2208 <rdar://problem/5048861> No warning about tentative definition conflicting with dylib definition
2209 <rdar://problem/5132652> .comm variables in shared library, worked with XCode 2.4.1, broken with XCode 3?
2210 * src/ld.cpp: at end of checkUndefines() verify if any remaining commons conflict with dylibs
2211 * doc/man/man1/ld.1: document -commons and -warn_commons options
2212 * unit-tests/test-cases/tentative-and-dylib: added test case
2215 2007-10-05 Nick Kledzik <kledzik@apple.com>
2217 <rdar://problem/5346331> NS/CFString constants are not dead strippable
2218 * src/MachOReaderRelocatable.hpp: break up __cfstring section into one atom per cfstring, make them coalesable
2219 * unit-tests/test-cases/cfstring-coalesce: added test case
2222 2007-10-05 Nick Kledzik <kledzik@apple.com>
2224 <rdar://problem/5524973> Dead stripping + exported symbols list using wildcards doesn't seem to do the right thing
2225 * src/Options.cpp/h: add hasWildCardExportRestrictList()
2226 * src/ld.cpp: if dead stripping code and have wildcard exports, add all global atoms matching wildcards as roots
2227 * unit-tests/test-cases/exported-symbols-wildcards-dead_strip: added test case
2230 2007-10-04 Nick Kledzik <kledzik@apple.com>
2232 <rdar://problem/5433882> ld shouldn't search /Network/Library/Frameworks by default
2233 * src/Options.cpp: remove /Network/Library/Frameworks/ from default search path
2234 * doc/man/man1/ld.1: document the change
2237 2007-10-04 Nick Kledzik <kledzik@apple.com>
2239 <rdar://problem/5341567> all binaries should get LD_UUID load commands, not just those with DWARF symbols
2240 * src/ld.cpp: default fCreateUUID to be true for non object file output types
2241 * unit-tests/test-cases/no-uuid/Makefile: update test case to match new rules
2244 ----- Tagged ld64-78
2246 2007-09-27 Nick Kledzik <kledzik@apple.com>
2248 <rdar://problem/5476313> range check load commands
2249 * src/MachOReaderDylib.hpp: check that load commands all fit in load command size from header
2250 * src/MachOReaderRelocatable.hpp: check that load commands all fit in load command size from header
2253 2007-09-27 Nick Kledzik <kledzik@apple.com>
2255 <rdar://problem/5433355> Xc8M2540a: ld64 crashes when linking Pascal program
2256 * src/ld.cpp: fix findAtomAndOffset() to handle where there are no function atoms
2259 2007-09-27 Nick Kledzik <kledzik@apple.com>
2261 <rdar://problem/5241179> ADOBE Xcode 3: ld -dead_strip does not work with -init from an archive
2262 * src/ld.cpp: add bool parameter to entryPoint() so -init atom not looked for too soon
2263 * unit-tests/test-cases/dead_strip-init-archive: added test case
2266 2007-09-26 Nick Kledzik <kledzik@apple.com>
2268 <rdar://problem/5459546> Spurious link warnings for inline members of C++ template classes
2269 * src/ld.cpp: check definition kinds before warning about visibility mismatches
2270 * unit-tests/test-cases/visibility-warning: added test case
2273 2007-09-26 Nick Kledzik <kledzik@apple.com>
2275 <rdar://problem/5394172> an empty .o file with zero load commands will crash linker
2276 * src/MachOReaderRelocatable.hpp: have Reader constructor return early of no load commands
2277 * unit-tests/test-cases/empty-object: added test case
2280 2007-09-26 Nick Kledzik <kledzik@apple.com>
2282 <rdar://problem/5453384> 9a527: ppc64 branch islands fail with 4GB pagezeo
2283 * src/MachOWriterExecutable.hpp: start range calculations at start of __text not at zero.
2286 ----- Tagged ld64-77 (Xcode 3.0)
2288 2007-07-23 Nick Kledzik <kledzik@apple.com>
2290 <rdar://problem/5351380> Kernel is linked with some global symbols unsorted
2291 * src/MachOWriterExecutable.hpp: Add NListNameSorter to allow global atoms and extra labels to be sorted
2294 2007-07-20 Nick Kledzik <kledzik@apple.com>
2296 <rdar://problem/5254468> Can't do objc_msgSendSuper dispatches after loading a Fix&Continue bundle
2297 * src/MachOWriterExecutable.hpp: when calculating what kind of reloc to use, never use an
2298 external reloc to reference 32-bit ObjC symbols.
2301 2007-07-20 Nick Kledzik <kledzik@apple.com>
2303 <rdar://problem/5349847> Runtime crash with ICC math library on Leopard
2304 * src/MachOReaderRelocatable.hpp: detect if section starts with a symbol that is not
2305 aligned to section and correct it.
2308 ----- Tagged ld64-76
2310 2007-06-29 Nick Kledzik <kledzik@apple.com>
2312 <rdar://problem/5303718> export hiding does not work for frameworks
2313 * src/MachOReaderDylib.hpp: fix checks in isPublicLocation()
2314 * unit-tests/test-cases/symbol-moving: update to test frameworks as well as dylibs
2317 2007-06-27 Nick Kledzik <kledzik@apple.com>
2319 <rdar://problem/5299907> linker should use undefines from flat dylibs when linking a main flat
2320 * src/ObjectFile.h: added fLinkingMainExecutable
2321 * src/Options.cpp: set up fLinkingMainExecutable
2322 * src/MachOReaderDylib.hpp: when linking a main executable for flat namespace, the reader for
2323 any loaded flat namespace dylib will have a new atoms that has references to all undefined
2324 symbols in the dylib
2325 * unit-tests/test-cases/flat-indirect-undefines: added test case
2326 * doc/man/man1/ld.1: update man page to describe when dylib undefines are used
2329 2007-06-27 Nick Kledzik <kledzik@apple.com>
2331 <rdar://problem/5277857> OpenGL.framework and X11 both have a libGL.dylib which can cause ld to segfault if both are found
2332 * src/MachOReaderDylib.hpp: add assertNoReExportCycles() method
2333 * unit-tests/test-cases/dylib-re-export-cycle: added test case
2336 2007-06-27 Nick Kledzik <kledzik@apple.com>
2338 <rdar://problem/5286462> ld64 has slightly different warning message formats than the old ld
2339 * src/ld.cpp: standardize all warning messages to start with "ld: warning"
2340 * src/MachOWriterExecutable.hpp: ditto
2341 * src/MachOReaderRelocatable.hpp: ditto
2342 * src/MachOReaderDylib.hpp:ditto
2345 2007-06-26 Nick Kledzik <kledzik@apple.com>
2347 <rdar://problem/5297034> -dead_strip can cause duplicate external commons
2348 * src/ld.cpp: don't use discarded coalesced global atoms as dead strip roots
2349 * src/machochecker.cpp: error if duplicate external symbols
2350 * unit-tests/test-cases/commons-coalesced-dead_strip: added test case
2353 2007-06-26 Nick Kledzik <kledzik@apple.com>
2355 <rdar://problem/4135857> update man page that linker does not search indirect libraries with two-level namespace
2356 * doc/man/man1/ld.1: add new "Indirect dynamic libraries" section to man page
2359 2007-06-26 Nick Kledzik <kledzik@apple.com>
2361 <rdar://problem/5285473> Xc9A466: Exports file cannot use Mac line ends
2362 * src/Options.cpp: check for \r or \n when parsing .exp files
2363 * unit-tests/test-cases/exported_symbols_list-eol: added test case
2366 ----- Tagged ld64-75
2368 2007-05-31 Nick Kledzik <kledzik@apple.com>
2370 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
2371 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
2374 ----- Tagged ld64-74.5
2376 2007-05-31 Nick Kledzik <kledzik@apple.com>
2378 <rdar://problem/5241902> set OSO timestamp to zero for when building in buildit
2379 * src/ld.cpp: check for RC_RELEASE and if exists set all OSO timestamps to zero
2382 2007-05-30 Nick Kledzik <kledzik@apple.com>
2384 <rdar://problem/5224676> BUILD_STABS now causes ld of xnu to bus error
2385 * src/ld.cpp: Change || to && in collectStabs()
2388 ----- Tagged ld64-74.4
2390 2007-05-18 Nick Kledzik <kledzik@apple.com>
2392 <rdar://problem/5211667> static probes don't work with libraries in dyld shared cache
2393 * src/OpaqueSection.hpp: the __TEXT segment is executable
2396 ----- Tagged ld64-74.3
2398 2007-05-16 Nick Kledzik <kledzik@apple.com>
2400 <rdar://problem/5201463> ppc: linker adds stubs to cstring references
2401 * src/MachOWriterExecutable.hpp: update ppc stubableReference() to only allow high/low references
2402 to be stubed if they reference a symbol in some other dylib.
2403 * unit-tests/test-cases/stub-generation: added test case
2406 2007-05-16 Nick Kledzik <kledzik@apple.com>
2408 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2409 * src/MachOWriterExecutable.hpp: factored local tests into indirectSymbolIsLocal()
2410 * unit-tests/test-cases/non-lazy-r: added test case
2413 2007-05-15 Nick Kledzik <kledzik@apple.com>
2415 <rdar://problem/5198807> ld64 drops fix&continue bit in __OBJC, __image_info.
2416 * src/MachOReaderRelocatable.hpp: implement objcReplacementClasses()
2419 2007-05-15 Nick Kledzik <kledzik@apple.com>
2421 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2422 * src/MachOReaderRelocatable.hpp: use strncmp() for __objc_imageinfo since it is 16 bytes long
2423 * src/MachOWriterExecutable.hpp: specialize segment/section names for synthesized objc image info section
2426 2007-05-15 Nick Kledzik <kledzik@apple.com>
2428 * unit-tests/include/common.makefile: set COMPILER_PATH so harness works with latest compiler
2431 ----- Tagged ld64-74.2
2433 2007-05-11 Nick Kledzik <kledzik@apple.com>
2435 <rdar://problem/5195447> ld64-74.1 breaks libstdc++ DejaGnu test (G5 only)
2436 * src/MachOWriterExecutable.hpp: don't stub a reference if the target offset is non-zero
2439 ----- Tagged ld64-74.1
2441 2007-05-09 Nick Kledzik <kledzik@apple.com>
2443 * src/Options.h: add emitWarnings()
2444 * src/Options.cpp: wire up -w to emitWarnings()
2447 2007-05-09 Nick Kledzik <kledzik@apple.com>
2449 <rdar://problem/5137285> ld64 won't link wine (regression from Tiger)
2450 * src/Architectures.hpp: add x86::kPointerDiff16 and x86::kPCRel16
2451 * src/MachOReaderRelocatable.hpp: add support to parse new relocs
2452 * src/MachOWriterExecutable.hpp: add support fo new relocs
2455 2007-05-08 Nick Kledzik <kledzik@apple.com>
2457 <rdar://problem/5182537> need way for ld and dyld to see different exported symbols in a dylib
2458 * src/MachOReaderDylib.hpp: update parse and use $ld$ symbols
2459 * src/Options.h: move VersionMin to ReaderOptions
2460 * src/ObjectFile.h: move VersionMin to ReaderOptions
2461 * src/Options.cpp: move VersionMin to ReaderOptions
2462 * src/MachOWriterExecutable.hpp: move VersionMin to ReaderOptions
2463 * unit-tests/test-cases/symbol-moving: added test case
2466 2007-05-03 Nick Kledzik <kledzik@apple.com>
2468 <rdar://problem/5181105> typo in error message for linking -pie
2469 * src/MachOWriterExecutable.hpp: fix typo in error messages
2472 ----- Tagged ld64-74
2474 2007-05-03 Nick Kledzik <kledzik@apple.com>
2476 <rdar://problem/5171880> ld64 can't find @executable _path relative dylibs from our umbrella frameworks
2477 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
2478 * src/ObjectFile.h: add from parameter to findDylib()
2479 * src/MachOReaderDylib.hpp: supply from parameter to findDylib()
2480 * src/ld.cpp: use from parameter for @loader_path substitution in findDylib()
2481 * unit-tests/test-cases/re-export-relative-paths: added test case
2484 2007-05-02 Nick Kledzik <kledzik@apple.com>
2486 * src/ObjectFile.h: add fLogObjectFiles and fLogAllFiles
2487 * src/Options.cpp: hook up -t to fLogAllFiles and -whatsloaded to fLogObjectFiles
2488 * src/MachOReaderDylib.hpp: log if fLogAllFiles
2489 * src/MachOReaderRelocatable.hpp: log if fLogObjectFiles or fLogAllFiles
2490 * src/MachOReaderArchive.hpp: log if fLogAllFiles
2491 * doc/man/man1/ld.1: update man page
2494 2007-05-02 Nick Kledzik <kledzik@apple.com>
2496 <rdar://problem/5177848> typo in message, frameowrk
2497 * src/Options.cpp: fix typo
2500 2007-05-01 Nick Kledzik <kledzik@apple.com>
2502 <rdar://problem/4977301> "ld" man page is missing the description for many options
2503 * doc/man/man1/ld.1: add documentation on all obsolete options
2506 2007-05-01 Nick Kledzik <kledzik@apple.com>
2508 <rdar://problem/5113424> ld doesn't handle -mlong-branch .o files that have had local symbols stripped
2509 <rdar://problem/4965359> warning about dwarf line info with -mlong-branch
2510 * src/MachOReaderRelocatable.hpp: don't lop -mlong-branch stubs off end of functions
2511 * src/MachOWriterExecutable.hpp: allow code references besides BR24 to be stubable
2514 2007-04-30 Nick Kledzik <kledzik@apple.com>
2516 <rdar://problem/5065659> unable to link VTK because __textcoal_nt too large
2517 * src/MachOReaderRelocatable.hpp: when doing a final link map __textcoal_nt to __text
2520 2007-04-30 Nick Kledzik <kledzik@apple.com>
2522 <rdar://problem/5062685> ld does not report error when -r is used and exported symbols are not defined.
2523 <rdar://problem/4637139> ld leaves global common symbols not in exported symbols list.
2524 * src/ld.cpp: stop special casing -r mode in checkUndefines()
2525 * src/MachOWriterExecutable.hpp: don't create proxy atom in -r mode if it is supposed to be exported.
2526 mark tentative definitions are private extern in -r mode even without -keep_private_externs
2527 * unit-tests/test-cases/exported_symbols_list-r: added test case
2530 2007-04-27 Nick Kledzik <kledzik@apple.com>
2532 <rdar://problem/5137732> ld should keep looking when it finds a weak definition in a dylib
2533 * src/ld.cpp: modified addJustInTimeAtoms() to keep looking when a weak defintion is found
2534 * unit-tests/test-cases/weak-def-ordinal: added test case
2537 2007-04-27 Nick Kledzik <kledzik@apple.com>
2539 <rdar://problem/5166572> better error message for indirect dylibs missing required architecture
2540 * src/ld.cpp: when loading indirect dylib add path to error messages
2543 2007-04-25 Nick Kledzik <kledzik@apple.com>
2545 <rdar://problem/5109373> the i386 slice of dyld does not need __IMPORT segment
2546 * src/ObjectFile.h: add fForDyld
2547 * src/Options.cpp: set up fForDyld
2548 * src/MachOReaderRelocatable.hpp: if fForDyld, change __IMPORT segment to __DATA
2549 * src/MachOWriterExecutable.hpp: recognize __DATA/__pointers in dyld as a non-lazy section
2552 2007-04-24 Nick Kledzik <kledzik@apple.com>
2554 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2555 * src/MachOWriterExecutable.hpp: use INDIRECT_SYMBOL_LOCAL for any non-global symbol
2556 * unit-tests/test-cases/strip_local: update test case
2559 2007-04-24 Nick Kledzik <kledzik@apple.com>
2561 <rdar://problem/5150407> ld64 -sectorder and -order_file files don't accept white space following the :
2562 * src/Options.cpp: prune white space after colon and before symbol name
2563 * unit-tests/test-cases/order_file: update test case to have a space after the colon
2566 2007-04-24 Nick Kledzik <kledzik@apple.com>
2568 <rdar://problem/5055233> ld64 corrupts debug symbol table entries, nm doesn't print them
2569 * src/MachOWriterExecutable.hpp: properly set ilocalsym in module table
2572 2007-04-24 Nick Kledzik <kledzik@apple.com>
2574 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2575 * src/MachOReaderRelocatable.hpp: look for new objc info section name too
2578 2007-04-24 Nick Kledzik <kledzik@apple.com>
2580 * src/MachOWriterExecutable.hpp: fix -non_global_symbols_strip_list to work with -r
2581 * unit-tests/test-cases/local-symbol-partial-stripping: update test case
2585 ----- Tagged ld64-73.7
2587 2007-05-10 Nick Kledzik <kledzik@apple.com>
2589 <rdar://problem/5194804> can't use dtrace static probes in x86_64 dylib
2590 * src/MachOWriterExecutable.hpp: x86_64:kPointerDiff32 is ok in shared region
2591 * unit-tests/test-cases/dtrace-static-probes: update to build dylib too
2594 2007-05-09 Nick Kledzik <kledzik@apple.com>
2596 <rdar://problem/5191610> 9A430: using -dead_strip with static dtrace probes causes ld to crash
2597 * src/ld.cpp: fix markLive() to look at right name in dtrace probe refernce
2598 * unit-tests/test-cases/dtrace-static-probes: added -dead_strip case
2601 ----- Tagged ld64-73.6
2603 2007-04-17 Nick Kledzik <kledzik@apple.com>
2605 <rdar://problem/5140897> Add options to do partial stripping of local symbols
2606 * src/MachOWriterExecutable.hpp: use fOptions.keepLocalSymbol()
2607 * src/Options.cpp: implement -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2608 * src/Options.h: replace stripLocalSymbols() with localSymbolHandling() and keepLocalSymbol()
2609 * doc/man/man1/ld.1: document -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2610 * unit-tests/test-cases/local-symbol-partial-stripping: added test case
2613 ----- Tagged ld64-73.5
2615 2007-04-17 Nick Kledzik <kledzik@apple.com>
2617 <rdar://problem/5129379> ld64-73.3 XBS logging incorrectly reporting "direct" dynamic libraries
2618 * src/ld.cpp: restore direct vs indirect library for LD_TRACE_DYLIBS logging
2621 2007-04-16 Nick Kledzik <kledzik@apple.com>
2623 <rdar://problem/5067034> data initialized to a weak imported symbol is missing relocation
2624 * src/MachOWriterExecutable.hpp: check for A::kPointerWeakImport in buildExecutableFixups()
2625 * unit-tests/test-cases/weak_import: updated test case to catch this problem
2628 2007-04-13 Nick Kledzik <kledzik@apple.com>
2630 <rdar://problem/5071047> Support -U
2631 * src/MachOWriterExecutable.hpp: create proxies for -U symbols
2632 * src/Options.cpp: process -U
2633 * src/Options.h: add allowedUndefined() and someAllowedUndefines()
2634 * src/ld.cpp: create proxies for -U symbols
2635 * doc/man/man1/ld.1: document -U and -undefined options
2636 * unit-tests/test-cases/undefined-dynamic-lookup: added test case
2639 ----- Tagged ld64-73.4
2641 2007-04-12 Nick Kledzik <kledzik@apple.com>
2643 <rdar://problem/5125280> ld changes needed to support read-only DOF
2644 * src/Options.cpp: remove -read_only_dof
2645 * src/Options.h: remove fReadOnlyDOFs
2646 * src/ld.cpp: only generate read-only DOF sections
2649 ----- Tagged ld64-73.3.1
2651 2007-04-13 Nick Kledzik <kledzik@apple.com>
2653 <rdar://problem/5130496> -framework vecLib -framework Accelerate causes bad ordinals
2654 * src/MachOWriterExecutable.hpp: fix bug optimizeDylibReferences() when there are two readers with same install name
2657 ----- Tagged ld64-73.3
2659 2007-04-03 Nick Kledzik <kledzik@apple.com>
2661 * src/ld.cpp: read-only-dofs should use 32-bit offsets for x86_64
2662 * src/MachOReaderDylib.hpp: if "public" re-export is not marked implict, still mark it as re-exported
2665 2007-04-02 Nick Kledzik <kledzik@apple.com>
2667 <rdar://problem/5105971> if replacement file for -dylib_file is missing, warn instead of error
2668 * src/ld.cpp: a try/catch to turn -dylib_file error into a warning.
2669 * unit-tests/test-cases/dylib_file-missing: add test case
2670 * doc/man/man1/ld.1: update man page about -dead_strip_dylibs
2673 ----- Tagged ld64-73.2
2675 2007-03-31 Nick Kledzik <kledzik@apple.com>
2677 <rdar://problem/5102873> ld64-73: atom sorting error with duplicate zero sized bss symbols
2678 * src/MachOReaderRelocatable.hpp: suppress warning on sorting zero size zero fill atoms
2680 2007-03-31 Nick Kledzik <kledzik@apple.com>
2682 <rdar://problem/5102845> ld64-73 fails anything linking with -lm
2683 * src/ld.cpp: when processing dylbs that are sylinks ensure that fDylibMap contains all paths
2684 * src/MachOWriterExecutable.hpp: when dead stripping dylibs and renumbering ordinals make sure
2685 aliases dylib get renumbered too
2686 * unit-tests/test-cases/dylib-aliases: added
2689 ----- Tagged ld64-73.1
2691 2007-03-30 Nick Kledzik <kledzik@apple.com>
2693 * src/MachOWriterExecutable.hpp: back out use of LC_REEXPORT_DYLIB until rdar://problem/5009909 is in build fleet
2696 ----- Tagged ld64-73
2698 2007-03-30 Nick Kledzik <kledzik@apple.com>
2700 <rdar://problem/4175790> ER: -dead_strip_dylibs
2701 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
2702 * src/ObjectFile.h: change dylib reader interface to implictly/explicitlyLinked
2703 * src/ld.cpp: use new dylib reader interface
2704 * src/Options.h: add deadStripDylibs()
2705 * src/Options.cpp: support -dead_strip_dylibs
2706 * src/MachOReaderDylib.hpp: use new dylib reader interface
2707 * src/MachOWriterExecutable.hpp: remove dylib load commands for unused dylibs and alter ordinals
2708 * unit-tests/test-cases/re-export-optimizations: added
2709 * unit-tests/test-cases/dead_strip_dylibs: added
2712 2007-03-30 Nick Kledzik <kledzik@apple.com>
2714 * src/Options.cpp: enable -lfoo to search for libfoo.so as well as libfoo.dylib,
2715 remove seg addr table hack for transitioning to new linker
2717 2007-03-30 Nick Kledzik <kledzik@apple.com>
2719 <rdar://problem/5073800> ADOBE XCODE3: Linker is slow with large C++ .o files
2720 * src/MachOReaderRelocatable.hpp: the compiler generates stubs to weak functions in the
2721 same translation unit. Don't treat those like the spurios stubs to static functions.
2724 2007-03-29 Nick Kledzik <kledzik@apple.com>
2726 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
2727 * src/MachOReaderRelocatable.hpp: To handle duplicate labels properly, rework how atoms sizes are set
2728 by iterating through sorted fAtoms rather than fAddrToAtom, . Change default alignment of commons
2729 to be the natural alignment of the size rounded up to the closest power of two and max it at 12.
2730 Build atoms in reverse symbol table order so that global atoms are constructed before locals.
2731 This assures that if there is a global and local label at the same location, the global label
2732 will become the atom's name and the local will be an alias. Properly handle a label
2733 at the end of a section. Handle R_ABS in relocations. Handle sect-diff relocs with addends.
2734 Don't auto-strip 'l' symbols in static executables (mach_kernel).
2735 * src/OpaqueSection.hpp: opaque_section now has an ordinal
2736 * src/ld.cpp: opaque_section now requires an ordinal
2737 * src/ObjectFile.h: add ReaderOptions.fForStatic
2738 * src/Options.cpp: set fForStatic when building a static executable
2739 * src/MachOWriterExecutable.hpp: add from atom to StubAtom<ppc>. Properly write out i386
2740 sect-diff relocs with addends. properly write out ppc PICbase relocs where pic base
2744 2007-03-27 Nick Kledzik <kledzik@apple.com>
2746 <rdar://problem/5085863> Typo in ld man page (-exported_symbols_list)
2747 * doc/man/man1/ld.1: fix typo
2750 2007-03-26 Nick Kledzik <kledzik@apple.com>
2752 <rdar://problem/4727750> consider generating LC_UUID from a checksum of the file
2753 * src/Options.h: change emitUUID() to getUUIDMode()
2754 * src/Options.cpp: support -random_uuid
2755 * src/MachOWriterExecutable.hpp: set uuid to be md5 hash of entire output file
2758 2007-03-24 Nick Kledzik <kledzik@apple.com>
2760 * src/MachOWriterExecutable.hpp: restructure writeAtoms() to copy all atoms in memory if possible
2763 2007-03-24 Nick Kledzik <kledzik@apple.com>
2765 <rdar://problem/5082603> ld -r of stripped .o file can incorrectly merge non-lazy pointers
2766 * src/MachOWriterExecutable.hpp: when generating a .o file, non-lazy pointer with target offsets should be
2767 encoded as LOCAL in the indirect symbol table
2768 * unit-tests/test-cases/stripped-indirect-symbol-table: added test case
2771 2007-03-23 Nick Kledzik <kledzik@apple.com>
2773 <rdar://problem/5084564> SWB: ld64-72 errors building with gcc-4.2
2774 * src/MachOReaderDylib.hpp: add curly brackets in switch cases
2775 * src/MachOWriterExecutable.hpp: rearrange classes so there are no template specialization forward references
2778 2007-03-23 Nick Kledzik <kledzik@apple.com>
2780 * src/ld.cpp: fix -print_statistics when using -dead_strip
2783 2007-03-23 Nick Kledzik <kledzik@apple.com>
2785 * src/MachOReaderRelocatable.hpp: generate better names for non-lazy pointers to the interior of atoms
2788 2007-03-16 Nick Kledzik <kledzik@apple.com>
2790 * src/MachOWriterExecutable.hpp: speed up ld -r a little by reversing relocs en mas
2793 2007-03-16 Nick Kledzik <kledzik@apple.com>
2795 <rdar://problem/4975277> ld Bus Error on missing command line arguments
2796 * src/Options.cpp: check next argv[] is not NULL
2799 2007-03-16 Nick Kledzik <kledzik@apple.com>
2801 <rdar://problem/4832049> need to be able to order symbols in anonymous namespaces
2802 * src/ld.cpp: add logic to do fuzzy matching of symbols with anonymous namespace usage
2803 * unit-tests/test-cases/order_file-ans: added test case
2806 2007-03-16 Nick Kledzik <kledzik@apple.com>
2808 <rdar://problem/5042552> headerpad_max_install_names deprecated for 64-bit
2809 * src/ld.cpp: make sure dylib load command order matches command line order
2810 * src/Options.h: add maxMminimumHeaderPad()
2811 * src/Options.cpp: add maxMminimumHeaderPad() set by -headerpad_max_install_names
2812 * src/src/MachOWriterExecutable.hpp: check maxMminimumHeaderPad()
2813 * doc/man/man1/ld.1: update man page about -headerpad_max_install_names
2816 2007-03-16 Nick Kledzik <kledzik@apple.com>
2818 <rdar://problem/4592484> Linker returns success although exported symbols are undefined.
2819 * src/ld.cpp: turn missing symbols back into an error
2822 2007-03-16 Nick Kledzik <kledzik@apple.com>
2824 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
2825 * unit-tests/test-cases/loader_path: added test case
2828 2007-03-16 Nick Kledzik <kledzik@apple.com>
2830 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
2831 <rdar://problem/4142277> Indirect libraries should be found using -F and -L options
2832 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
2833 * src/ld.cpp: reworked all dylib processing. Readers can now add the dylib list.
2834 * src/Options.h: add findFileUsingPaths()
2835 * src/MachOReaderDylib.hpp: look in re-exported children instead of requring linker to do that
2836 * src/ObjectFile.h: add processIndirectLibraries(), remove getDependentLibraryPaths()
2837 * src/machochecker.cpp: support LC_REEXPORT_DYLIB
2838 * src/ExecutableFile.h: simplify DyLibUsed
2839 * src/Options.cpp: add findFileUsingPaths(). add new re-export options
2840 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
2841 * doc/man/man1/ld.1: updated with new re-export options
2842 * unit-tests/test-cases/indirect-path-search: added tests that -F and -L work with indirect dylibs
2843 * unit-tests/test-cases/re-export-cases: added tests for all combinations of re-exporting
2846 2007-03-14 Nick Kledzik <kledzik@apple.com>
2848 <rdar://problem/4982400> sort external relocations to optimize dyld performance
2849 * src/MachOWriterExecutable.hpp: added ExternalRelocSorter
2850 * src/machochecker.cpp: verify external relocations are grouped by symbol number
2851 * unit-tests/test-cases/external-reloc-sorting: added test case
2854 ----- Tagged ld64-72
2856 2007-03-06 Nick Kledzik <kledzik@apple.com>
2858 * src/Options.cpp: ignore .objc_category_name_* symbols in .exp files
2861 2007-03-06 Nick Kledzik <kledzik@apple.com>
2863 * src/Options.cpp: stop special casing mach_kernel and instead requre kernel to be built with -new_linker
2866 2007-03-06 Nick Kledzik <kledzik@apple.com>
2868 <rdar://problem/5044253> ld64-72 (experimental) is causing DejaGnu test failures
2869 * src/MachOWriterExecutable.hpp: add optimizableGOTReferenceKind() to track GOT uses that cannot be optimized
2872 2007-03-06 Nick Kledzik <kledzik@apple.com>
2874 <rdar://problem/5026135> minimum header padding should be 32 to allow code signing
2875 * src/Options.cpp: initialize fMinimumHeaderPad to 32
2876 * src/MachOWriterExecutable.hpp: better calculation of header padding
2879 2007-03-06 Nick Kledzik <kledzik@apple.com>
2881 <rdar://problem/5033206> Linker crashes with -flat_namespace against two-level dylibs that might have re-exports
2882 * src/ld.cpp: flat namespace should not allow NULL indirect readers
2885 2007-03-06 Nick Kledzik <kledzik@apple.com>
2887 * src/MachOReaderRelocatable.hpp: don't error on S_COALESCED sections with anonymous atoms
2888 * src/MachOWriterExecutable.hpp: set MH_PIE bit when linking -pie
2889 * ld64.xcodeproj/project.pbxproj: don't echo environment when running unit test
2892 2007-03-01 Nick Kledzik <kledzik@apple.com>
2894 * doc/man/man1/ld.1: Add descriptions to all "rarely used options"
2897 2007-03-01 Nick Kledzik <kledzik@apple.com>
2899 <rdar://problem/4971033> Remove support for Essential Symbols: Warn about use of -Sp option; remove man page entry
2900 * src/Options.cpp: make -Sp obsolete
2901 * doc/man/man1/ld.1: make -Sp obsolete
2904 2007-03-01 Nick Kledzik <kledzik@apple.com>
2906 <rdar://problem/5040314> Support -pie
2907 * src/Options.h: Add positionIndependentExecutable()
2908 * src/Options.cpp: Support -pie option to set positionIndependentExecutable()
2909 * src/MachOWriterExecutable: if -pie is used, add extra local relocations and error if any
2910 absolute addressing is used
2913 2007-03-01 Nick Kledzik <kledzik@apple.com>
2915 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
2916 * src/ld.cpp: Ensure segments are laid out in discovery order. Add support for kAbsoluteSymbol.
2917 Warn when merging symbols of different visiblity. Warn when a tentative definition
2918 is replaced by one a real definition with a smaller size. Lay out __common section
2919 so that ones built with -fno-commons come before regular commons.
2920 * src/ObjectFile.h: remove SegmentOffset ivar and getter/setters
2921 * src/machochecker.cpp: allow images with no r/w segments
2922 * src/MachOReaderRelocatable: Add AbsoluteAtom. Sort tentative definitions by name instead of by size
2923 Add support for custom commons alignment.
2924 * src/Options.cpp: Fix spurious -sectalign warnings. Don't use ld_classic when linking mach_kernel
2925 * src/MachOWriterExecutable.hpp: Support kAbsoluteSymbol atoms. In -r mode, set custom alignment
2926 for commons if alignment is not its size. Support global __dtrace_probe labels.
2927 * src/ObjectDump.cpp: add support for kAbsoluteSymbol atoms.
2928 * unit-tests/test-cases/commons-alignment: Added test case for custom commons alignment
2929 * unit-tests/test-cases/absolute-symbol: Added test case for basic absolute symbols
2930 * unit-tests/test-cases/segment-order: Added test case that segments lay out in discovery order
2931 * unit-tests/test-cases/commons-order: Added test case that commons lay out correctly
2932 * unit-tests/test-cases/end-label: Added test case that a label used to mark the end of a section does not
2933 get associcated with the next section.
2936 2007-02-23 Nick Kledzik <kledzik@apple.com>
2938 <rdar://problem/3965017> gcc-5005: DejaGnu failures due to -frepo
2939 * src/ld.cpp: Add quotes to referenced from name to make collect2 and -frepo happy
2942 2007-02-22 Nick Kledzik <kledzik@apple.com>
2944 * src/MachOWriterExecutable.hpp: rework how padding after load commands is calculated
2947 2007-02-21 Nick Kledzik <kledzik@apple.com>
2949 * src/MachOWriterExecutable.hpp: extend special case of __mh_execute_header to static executables too
2952 2007-02-21 Nick Kledzik <kledzik@apple.com>
2954 <rdar://problem/3882294> gcc link map option ( "-M" ) should be redirectable to file
2955 * doc/man/man1/ld.1: added -map option description
2956 * src/Options.h: added generatedMapPath()
2957 * src/Options.cpp: set up generatedMapPath() if -map option is used
2958 * src/MachOWriterExecutable.hpp: add writeMap() method to generate map file
2961 2007-02-19 Nick Kledzik <kledzik@apple.com>
2963 <rdar://problem/4557734> Implement GOT Load elimination optimization
2964 * src/ld.cpp: track size of all atoms and if > 2GB sort large zero-fill atoms to end
2965 * src/MachOWriterExecutable.hpp: If image size < 2GB, only generate GOT entries if value must be
2966 updatable by dyld. If > 2GB, only eliminate GOT entries to non-zero-fill atoms. Any use
2967 of an eliminated GOT entry has its code changed from MOVQ _foo@GOT(%rip) to LEAQ _foo(%rip).
2968 * unit-tests/test-cases/large-data: added
2969 * unit-tests/test-cases/got-elimination: added
2972 ----- Tagged ld64-71.2
2974 2007-02-13 Nick Kledzik <kledzik@apple.com>
2976 <rdar://problem/4995303> new ld ignores -segprot option
2977 * src/Options.h: expose customSegmentProtections()
2978 * src/Options.cpp: parse -segprot option and populate customSegmentProtections()
2979 * src/MachOWriterExecutable.hpp: use customSegmentProtections()
2982 2007-02-13 Nick Kledzik <kledzik@apple.com>
2984 <rdar://problem/4988068> i386 -stack_addr doesn't work
2985 * src/MachOWriterExecutable.hpp: use correct offset into thread state record
2988 ----- Tagged ld64-71.1
2990 2007-02-07 Nick Kledzik <kledzik@apple.com>
2992 * src/ld.cpp: sort __OBJC2 segment to be next to __OBJC segment
2995 2007-02-07 Nick Kledzik <kledzik@apple.com>
2997 * src/Options.cpp: change missing -seg_addr_table from an error to a warning
3000 2007-02-06 Nick Kledzik <kledzik@apple.com>
3002 <rdar://problem/4977311> Leopard 9A357: -dylib_file broken?
3003 * src/MachOWriterExecutable.hpp: remove use of fInstallPathOverride
3004 * src/Options.cpp: wire up -dylib_file option
3005 * src/Options.h: remove fInstallPathOverride. add fDylibOverrides
3006 * src/ld.cpp: check dylibOverrides() for indirect libraries
3007 * unit-tests/test-cases/dylib_file: add test case
3010 2007-02-05 Nick Kledzik <kledzik@apple.com>
3012 * src/MachOReaderDylib.hpp: don't warn about zero size __image_info sections
3015 2007-02-04 Rick Balocca <rbalocca@apple.com>
3016 Enable the failing cases for missing command line arguments
3018 2007-02-04 Rick Balocca <rbalocca@apple.com>
3019 Make sure that all .o's are checked by ObjectDump
3020 and all macho are checked by machochecker
3022 2007-02-04 Rick Balocca <rbalocca@apple.com>
3023 Fix an endian problem with machochecker
3024 Fix blank-stubs Makefile
3026 ----- Tagged ld64-71
3028 2007-02-02 Rick Balocca <rbalocca@apple.com>
3029 blank-stubs test case: handle the case of a native ppc compile--this
3030 sets the subtype, which must be passed to lipo
3032 2007-02-01 Rick Balocca <rbalocca@apple.com>
3033 make cpu-sub-types test more robust
3035 2007-02-01 Rick Balocca <rbalocca@apple.com>
3036 auto-arch tests were resulting in a false FAILs
3038 2007-02-01 Rick Balocca <rbalocca@apple.com>
3039 test cpu-sub-types was resulting in a false FAIL
3041 2007-02-01 Nick Kledzik <kledzik@apple.com>
3043 <rdar://problem/4969335> STD:VSC: c99 -o writes to file that does not have write permission
3044 * src/MachOWriterExecutable.hpp: check file is writable before using it
3046 2007-02-01 Nick Kledzik <kledzik@apple.com>
3048 <rdar://problem/4965743> debug map (N_OSO) timestamps for object files in ranlib archive are incorrect
3049 * src/MachOReaderArchive.hpp: parse modTime for .o files out of archive header
3051 2007-01-31 Nick Kledzik <kledzik@apple.com>
3053 <rdar://problem/4967535> 9A354: ld -all_load does *NOT* produce the same dSYM as *.o or -u
3054 * src/ld.cpp: when using -all_load don't assume that all atoms have same reader
3055 * unit-tests/test-cases/dwarf-archive-all_load: added
3057 ----- Tagged ld64-70.1
3059 2007-01-31 Nick Kledzik <kledzik@apple.com>
3061 * src/MachOWriterExecutable.hpp: in addObjectRelocs_powerpc() mask scattered r_address to 16-bits
3063 ----- Tagged ld64-70
3066 2007-01-30 Nick Kledzik <kledzik@apple.com>
3068 <rdar://problem/4810668> linker should verify GC consistency of modules being linked into library
3069 <rdar://problem/4474195> Support cpu-sub-types for ppc
3070 * src/ObjectFile.h: Add getObjCConstraint() and getCpuConstraint()
3071 * src/MachOReaderRelocatable.hpp: don't make atom for __image_info section, instead parse constaints
3072 * src/MachOReaderDylib.hpp: look at __image_info content to get constaints
3073 * src/ld.cpp: add updateContraints() and checkObjc()
3074 * src/MachOWriterExecutable.hpp: add ObjCInfoAtom to sythesize __image_info content
3077 2007-01-28 Nick Kledzik <kledzik@apple.com>
3079 src/*: remove ObjectFile::requiresFollowOnAtom() method
3082 2007-01-28 Nick Kledzik <kledzik@apple.com>
3084 src/ld.cpp: enable LLVM_SUPPORT by default
3085 src/LLVMReader.hpp: don't use absolute paths for llvm headers and libraries
3088 2007-01-26 Rick Balocca <rbalocca@apple.com>
3089 * src/ObjectDump.cpp: The usage() message was incorrect.
3092 2007-01-25 Rick Balocca <rbalocca@apple.com>
3093 * unit-tests/test-cases/zero-fill3: It was reporting FAIL on ld64 error return.
3094 It should have been checking for non-error return.
3097 2007-01-24 Nick Kledzik <kledzik@apple.com>
3099 <rdar://problem/4952297> x86 fast stubs should not cross 64-byte boundries
3100 * src/MachOWriterExecutable.hpp: for x86, 64-byte align __jump_table section
3101 and make 64-btye crossing stubs be empty entries with indirect symbol table
3102 entry of INDIRECT_SYMBOL_ABS
3105 2007-01-19 Nick Kledzik <kledzik@apple.com>
3107 * src/Options.h: add readOnlyx86Stubs()
3108 * src/Options.cpp: support -read_only_stubs
3109 * src/MachOWriterExecutable.hpp: make __IMPORT segment not writable if -read_only_stubs is used
3112 2007-01-16 Eric Christopher <echristo@apple.com>
3114 <rdar://problem/4856341> ld64 --help isn't recognized
3115 * src/Options.cpp (Options::parse): Support --help and -help.
3118 2007-01-15 Nick Kledzik <kledzik@apple.com>
3120 * src/MachOFileAbstraction.hpp: add range checking on macho_scattered_relocation_info::set_r_address()
3123 2007-01-14 Nick Kledzik <kledzik@apple.com>
3125 <rdar://problem/4514409> Support wildcards in contents of -exported_symbols_list
3126 * src/Options.h: add SetWithWildcards class
3127 * src/Options.cpp: add -exported_symbol and -unexported_symbol and use SetWithWildcards
3128 * doc/man/man1/ld.1: add -exported_symbol and wildcard explanation
3129 * unit-tests/test-cases/exported-symbols-wildcards: added test case
3132 2007-01-10 Nick Kledzik <kledzik@apple.com>
3134 <rdar://problem/4868270> [U]SDT probes should use C calling convention
3135 * src/Options.cpp: Add -read_only_dof
3136 * src/ld.cpp: create __dof section(s) based on probe and isenabled sites
3137 * src/MachOReaderRelocatable.hpp: parse new sdt 2.0 probes encoded in .o files
3138 * src/MachOWriterExecutable.hpp: handle regenerating dtrace probes into .o files
3139 * unit-tests/test-cases/dtrace-static-probes: added test case
3142 ----- Tagged ld64-69.8
3144 2007-01-30 Nick Kledzik <kledzik@apple.com>
3146 <rdar://problem/4964508> Support LD_FORCE_NO_SEG_ADDR_TABLE
3147 * src/Options.cpp: Support LD_FORCE_NO_SEG_ADDR_TABLE
3150 ----- Tagged ld64-69.7
3152 2007-01-25 Nick Kledzik <kledzik@apple.com>
3154 <rdar://problem/4949507> Leopard9A351: CFM Apps Are Broken because CFM glue is missing
3155 * src/MachOReaderRelocatable.hpp: check S_ATTR_NO_DEAD_STRIP in dontDeadStrip()
3158 ----- Tagged ld64-69.6
3160 2007-01-24 Nick Kledzik <kledzik@apple.com>
3162 <rdar://problem/4947347> LD_TRACE_ARCHIVES should only print out when a .o is actually used from an archive
3163 * src/ld.cpp: create and use logArchive()
3166 ----- Tagged ld64-69.5
3168 2007-01-22 Nick Kledzik <kledzik@apple.com>
3170 <rdar://problem/4946075> 9A350: can't link ppc programs with ld_classic
3171 * src/Options.cpp: Remove support for LD_NO_CLASSIC_LINKER. Add support for -classic_linker
3174 ----- Tagged ld64-69.4
3176 2007-01-17 Nick Kledzik <kledzik@apple.com>
3178 <rdar://problem/4925645> QTComponents does not link with ld64
3179 * src/MachOReaderRelocatable.hpp: handle N_RSYM and N_PSYM stabs
3182 ----- Tagged ld64-69.3
3184 2007-01-03 Nick Kledzik <kledzik@apple.com>
3186 * src/Options.cpp: If the same dylib is specified twice and the second is specified weak, make it weak
3189 ----- Tagged ld64-69.2
3191 2006-12-18 Nick Kledzik <kledzik@apple.com>
3193 <rdar://problem/4889729> -dead_strip without -exported_symbols_list should not strip global functions from archives
3194 * src/ld.cpp: when adding a .o file from an archive, add all its global symbols to live roots
3195 * unit-tests/test-cases/dead_strip-archive: added
3198 2006-12-18 Nick Kledzik <kledzik@apple.com>
3200 <rdar://problem/4889409> flat_namespace main executables do not need to indirect interior references
3201 * src/MachOWriterExecutable.hpp: don't indirect references to global symbols in main executables
3202 * unit-tests/test-cases/flat-main: updated to test for indirection
3203 * unit-tests/test-cases/flat-dylib: added
3206 ----- Tagged ld64-69.1
3208 2006-12-15 Nick Kledzik <kledzik@apple.com>
3210 <rdar://problem/4886721> -flat_namespace does not work with -mdynamic-no-pic
3211 * src/MachOWriterExecutable.hpp: rework checking for use of ppc absolute addressing to allow them as long as
3212 the target is within the same linkage unit.
3215 2006-12-15 Nick Kledzik <kledzik@apple.com>
3217 <rdar://problem/4886652> -ObjC should only load .o with .objc_ symbols
3218 * src/Options.cpp: remove warning from -ObjC and have it instead set fLoadAllObjcObjectsFromArchives
3219 * src/MachOReaderArchive.hpp: when -ObjC is used, preload all .o files from archives that contain .objc_ symbols
3222 ----- Tagged ld64-69
3224 2006-12-13 Nick Kledzik <kledzik@apple.com>
3226 <rdar://problem/4879913> prebound interior pointers must be non-zero
3227 * src/MachOWriterExecutable.hpp: in fixUpReference_powerpc() set lazy pointers bound to with the dylib to
3228 their target value. Properly set REFERENCE_FLAG_UNDEFINED_* flags in reference table and n_desc
3231 2006-12-09 Nick Kledzik <kledzik@apple.com>
3233 <rdar://problem/4868738> ld64 fails to detect error that ld_classic does
3234 * src/MachOWriterExecutable.hpp: check for absolute reloc to an external symbol
3235 * src/MachOReaderRelocatable.hpp: ignore -mlong-branch stubs in .o files
3238 2006-12-09 Nick Kledzik <kledzik@apple.com>
3240 <rdar://problem/4874209> symbols with REFERENCED_DYNAMICALLY should never be stripped
3241 * src/MachOWriterExecutable.hpp: update Writer<A>::shouldExport() to check for kSymbolTableInAndNeverStrip
3242 * unit-tests/test-cases/main-stripped: add test that dynamically referenced symbol cannot be stripped
3245 2006-12-08 Nick Kledzik <kledzik@apple.com>
3247 * unit-tests/test-cases/allowable-client: add variant test cases (e.g. CoreServices_profile)
3248 * src/ld.cpp: allow frameworks with variant install names (e.g. CoreServices_profile) to be private clients
3251 2006-12-08 Nick Kledzik <kledzik@apple.com>
3253 * doc/man/man1/ld.1: rewrite man page
3254 * src/Options.h: add warnObsolete()
3255 * src/Options.cpp: use warnObsolete() on many options. Make nonWeak the weak-mis-match default.
3256 Make -ObjC mean -all_load.
3258 ----- Tagged ld64-68.3
3260 2006-12-05 Nick Kledzik <kledzik@apple.com>
3262 * src/ld.cpp: allow umbrella frameworks to have variant install names (e.g. CoreServices_profile) and still link
3265 ----- Tagged ld64-68.2
3267 2006-12-05 Nick Kledzik <kledzik@apple.com>
3269 * src/MachOWriterExecutable.cpp: Use N_PBUD in the symbol table for undefined symbols in prebound dylibs
3272 ----- Tagged ld64-68.1
3274 2006-12-01 Nick Kledzik <kledzik@apple.com>
3276 * src/Options.cpp: always generate module tables for 32-bit architectures so that ld_classic
3277 can link against them
3280 ----- Tagged ld64-68
3282 2006-12-01 Nick Kledzik <kledzik@apple.com>
3284 <rdar://problem/4858299> seg_addr_table needs matching fuzziness
3285 * src/Options.cpp: special case a how a dozen dylib are looked up in the seg_addr_table
3288 2006-12-01 Nick Kledzik <kledzik@apple.com>
3290 * src/Options.cpp: have all -static links for 32-bit archs roll over to ld_classic unless
3291 LD_NO_CLASSIC_LINKER_STATIC is set.
3292 * unit-tests/bin/make-recursive.pl: set LD_NO_CLASSIC_LINKER_STATIC for unit tests
3295 2006-11-29 Nick Kledzik <kledzik@apple.com>
3297 <rdar://problem/4855542> ld64-67: QTComponents fails to build
3298 * src/MachOReaderRelocatable.hpp: don't error out when a local non-lazy pointer does not point to a symbol
3299 * unit-tests/test-cases/strip_local: added test case
3302 2006-11-28 Nick Kledzik <kledzik@apple.com>
3304 <rdar://problem/4433496> Need a way to mark libraries usable by dynamic linker but unusable by static linker
3305 * src/Options.cpp: allow -client_name to be used with main executables
3306 * src/ld.cpp: generalize -allowable_client. Any dylib can now restrict who can link against it. As a convention
3307 linking with -allowable_client '!' will mean no one can statically link with the dylib. It can still be loaded
3308 dynamically, or by any existing clients, but no new clients can link with it.
3309 * unit-tests/test-cases/allowable-client/Makefile: enable previously commented out test cases. Add test cases
3310 of a dylib that allows no clients and just one client
3312 2006-11-27 Nick Kledzik <kledzik@apple.com>
3314 <rdar://problem/4795615> -final_output should be used if -install_name not used
3315 * src/Options.cpp: fall back to using -final_output for install name
3318 ----- Tagged ld64-67
3320 2006-11-17 Nick Kledzik <kledzik@apple.com>
3322 * src/MachOWriterExecutable.hpp: support __IMPORT segment being slide independently of __DATA segment in shared cache
3325 2006-11-16 Nick Kledzik <kledzik@apple.com>
3327 <rdar://problem/4838262> 9a303: ld -filelist Bus Error
3328 * src/Options.cpp: add check that -filelist is followed by an argument
3331 2006-11-16 Nick Kledzik <kledzik@apple.com>
3333 * src/MachOWriterExecutable.hpp: when building split-seg dylibs, LINKEDIT goes in read-only side
3336 2006-11-15 Nick Kledzik <kledzik@apple.com>
3338 * src/MachOWriterExecutable.hpp: set proper attributes for __eh_frame in ld -r mode
3339 * unit-tests/test-cases/eh_frame: added test case
3342 2006-11-10 Nick Kledzik <kledzik@apple.com>
3344 * src/MachOReaderRelocatable.hpp: redirect references to static weak stubs to the real target
3347 2006-11-09 Nick Kledzik <kledzik@apple.com>
3349 * src/MachOWriterExecutable.hpp: r_address is offset from first LC_SEGMENT vmaddr - not from segment with lowest address
3352 ----- Tagged ld64-66.1
3354 2006-11-09 Nick Kledzik <kledzik@apple.com>
3356 * src/MachOWriterExecutable.hpp: initialize fModuleInfoAtom to zero
3359 2006-11-08 Nick Kledzik <kledzik@apple.com>
3361 <rdar://problem/4821985> FSF GCC's libjava doesn't link with Ochre ld64
3362 * src/MachOReaderRelocatable.hpp: ignore debug_line section if debug_info section is missing or empty
3364 ----- Tagged ld64-66
3366 2006-11-07 Nick Kledzik <kledzik@apple.com>
3368 <rdar://problem/4824368> SWB: d64-65 does not built usage split-seg dylibs
3369 * src/MachOWriterExecutable.hpp: when prebinding split-seg correctly set r_address fields and on
3370 disk values for external relocations
3371 * unit-tests/test-cases/prebound-split-seg: added test case
3374 2006-11-03 Nick Kledzik <kledzik@apple.com>
3376 * src/MachOReaderDylib.hpp: don't report dependent libraries if MH_NO_REEXPORTED_DYLIBS bit is set
3377 * src/MachOWriterExecutable.hpp: set MH_NO_REEXPORTED_DYLIBS bit if dylib does not logically re-export any other dylibs
3378 * unit-tests/test-cases/re-export-flag: added test case
3379 * src/machochecker.cpp: validate use of MH_NO_REEXPORTED_DYLIBS
3382 2006-11-02 Nick Kledzik <kledzik@apple.com>
3384 <rdar://problem/4814565> Mysterious messages from ld64 with MACOSX_DEPLOYMENT_TARGET = 10.5
3385 * src/MachOWriterExecutable.hpp: kPointerWeakImport is a valid reference type to cross segments
3388 2006-11-02 Nick Kledzik <kledzik@apple.com>
3390 * src/Options.cpp,h: Add support for -rpath
3391 * src/MachOFileAbstraction.hpp: add macho_rpath_command
3392 * src/MachOWriterExecutable.hpp: add RPathLoadCommandsAtom to create LC_RPATH for each -rpath
3395 ----- Tagged ld64-65
3397 2006-10-30 Nick Kledzik <kledzik@apple.com>
3399 <rdar://problem/4729162> x86_64 default stack_addr is wrong
3400 * src/Options.cpp: change default 64-bit stack location when using -stack_size
3403 2006-10-30 Nick Kledzik <kledzik@apple.com>
3405 <rdar://problem/4474316> dylibs need modules for 10.3 and for ld_classic in Salt
3406 * src/MachOWriterExecutable.hpp: add ModuleInfoLinkEditAtom to create module table stuff
3407 * src/Options.cpp,h: Add needsModuleTable()
3408 * src/MachOFileAbstraction.hpp: Add macho_dylib_module, macho_dylib_reference, and macho_dylib_table_of_contents
3411 2006-10-27 Nick Kledzik <kledzik@apple.com>
3413 * unit-tests/test-cases/no-uuid/Makefile: add -gstabs+ to be compatible with latest compiler
3414 * unit-tests/test-cases/stabs-coalesce/Makefile: add -gstabs+ to be compatible with latest compiler
3417 2006-10-26 Nick Kledzik <kledzik@apple.com>
3419 <rdar://problem/4585230> i386 -mdynamic-no-pic switch statement jump table is out of line
3420 * src/MachOWriterExecutable.hpp: for i386 don't check for direct references to weak symbols
3423 2006-10-26 Devang Patel <dpatel@apple.com>
3425 * src/LLVMReader.hpp: Supply final output file path to optimizer.
3427 2006-10-26 Devang Patel <dpatel@apple.com>
3429 * src/ObjectFile.h: Make setSection* methods virtual.
3430 * src/LLVMReader.hpp: Override setSection* methods.
3432 2006-10-26 Devang Patel <dpatel@apple.com>
3434 * unit-tests/test-case/llvm-integration/a13.h: New.
3435 * unit-tests/test-case/llvm-integration/a13.cc: New.
3436 * unit-tests/test-case/llvm-integration/main13.cc: New.
3438 2006-10-26 Devang Patel <dpatel@apple.com>
3440 * src/options.h, src/options.cpp: Add -save-temps command line option.
3441 * src/LLVMReader.hpp: Use saveTemps option.
3444 2006-10-26 Devang Patel <dpatel@apple.com>
3446 * src/LLVMReader.hpp: Remove invalid module from memory.
3448 2006-10-26 Devang Patel <dpatel@apple.com>
3450 * src/LLVMReader.hpp: Collect symbol alignment info from LLVM optimizer.
3452 2006-10-21 Eric Christopher <echristo@apple.com>
3454 * src/ld.cpp (Linker::Linker): Check for LD_NO_CLASSIC_LINKER before
3455 invoking ld_classic.
3456 * unit-tests/test-cases/relocs-literals/Makefile: Run for -mdynamic-no-pic
3458 * unit-tests/test-cases/static-executable/Makefile: Skip for 64-bit. Add
3459 -dead_strip to command line.
3461 ----- Tagged ld64-64.2
3463 2006-10-19 Nick Kledzik <kledzik@apple.com>
3465 * ld64.xcodeproj/project.pbxproj: stop copying LLVMReader.hpp into man1 directory
3467 ----- Tagged ld64-64.1
3469 2006-10-19 Nick Kledzik <kledzik@apple.com>
3471 <rdar://problem/4791643> ld64-63.1 erroneously coalesces an empty string with a non-empty string
3472 * src/MachOReaderRelocatable.hpp: rework cstring parsing to not assume all strings are start
3473 at section alignment boundaries, and when coalescing empty strings always use one with greatest
3474 alignment requirement
3475 * src/MachOWriterExecutable.hpp: in -r mode, don't pad end of cstring section
3476 * src/ObjectFile.h: correctly name leadingZeros() as trailingZeros()
3477 * src/ld.cpp: leadingZeros() --> trailingZeros()
3480 2006-10-18 Eric Christopher <echristo@apple.com>
3482 * unit-tests/test-cases/read-only-relocs/Makefile: Skip for x86_64.
3483 * unit-tests/test-cases/llvm-integration/Makefile: Skip if llvm isn't
3486 2006-10-18 Nick Kledzik <kledzik@apple.com>
3488 <rdar://problem/4783853> ld64 change required to go with assembler cstring change
3489 <rdar://problem/4732996> ld64 should error when a local relocation references an address outside its section
3490 * src/MachOReaderRelocatable.hpp: for x86_64 in order to work with local or external relocations to cstrings
3491 change parser to allow atoms with a pending name that is resolved after references are instantiated.
3492 Make direct references to kRegularDefinition atoms.
3493 * src/MachOWriterExecutable.hpp: in -r mode for x86_64 generate L* labels for cstrings and use external relocations
3494 * unit-tests/test-cases/relocs-literals/test.c: add two cases of cstring literal plus addend
3497 2006-10-06 Nick Kledzik <kledzik@apple.com>
3499 <rdar://problem/4786250> check MACOSX_DEPLOYMENT_TARGET if -macosx_version_min is not used
3500 * src/Options.cpp: if -macosx_version_min is not used, check MACOSX_DEPLOYMENT_TARGET, if
3501 that is unused, default to 10.5
3503 ----- Tagged ld64-64
3505 2006-10-06 Nick Kledzik <kledzik@apple.com>
3507 <rdar://problem/4756806> crash in ppc64 program - bl to saveFP, but saveFP is too far away?
3508 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands(), properly account for growth of __text
3511 2006-10-06 Nick Kledzik <kledzik@apple.com>
3513 <rdar://problem/4769120> Linker-defined alias converts reference into definition and generates error.
3514 * src/MachOReaderRelocatable.hpp: only alias symbols actually in the symbol table
3517 2006-10-06 Nick Kledzik <kledzik@apple.com>
3519 * unit-tests/test-cases/dwarf-debug-notes/Makefile: crt1.o no longer has stabs, so don't need to strip it
3520 * unit-tests/test-cases/dwarf-debug-notes-r/Makefile: crt1.o no longer has stabs, so don't need to strip it
3523 2006-10-06 Nick Kledzik <kledzik@apple.com>
3525 * src/MachOReaderRelocatable.hpp: rework dwarf line parsing to fix warnings that starting
3526 showing up with gcc-5421
3529 2006-10-05 Eric Christopher <echristo@apple.com>
3531 <rdar://problem/4760935> ld64 needs to support libtool options
3532 * src/Options.cpp (Options::parse): Add -noall_load, -install_name,
3533 -current_version and -compatibility_version.
3535 2006-10-03 Eric Christopher <echristo@apple.com>
3537 * src/Options.cpp (Options::gotoClassicLinker): Use execvp
3540 2006-10-03 Eric Christopher <echristo@apple.com>
3542 * unit-tests/test-cases/tentative-to-real/Makefile: Clean up after tests.
3544 2006-10-03 Eric Christopher <echristo@apple.com>
3546 * unit-tests/include/common.makefile (VALID_ARCHS): Add x86_64.
3547 (OTOOL): Remove munging based on ARCH.
3549 2006-09-29 Nick Kledzik <kledzik@apple.com>
3551 <rdar://problem/4743925> problem merging .o files built with and without -fno-common
3552 src/Options.*: make MakeTentativeDefinitionsReal a reader option
3553 src/ObjectFile.h: make MakeTentativeDefinitionsReal a reader option
3554 src/MachOWriterExecutable.hpp: make MakeTentativeDefinitionsReal a reader option
3555 src/MachOReaderRelocatable.hpp: only assign a section name of __common to
3556 tentative defintions when making a final linked image
3559 2006-09-28 Nick Kledzik <kledzik@apple.com>
3561 src/Options.h/.cpp: add support for -segaddr option
3562 src/MachOWriterExecutable.hpp: In Writer::assignFileOffsets(), use -segaddr info
3565 2006-09-28 Nick Kledzik <kledzik@apple.com>
3567 <rdar://problem/4587349> Emit new CPU subtypes for ppc64 and x86-64 when targeting 10.5 or later
3568 src/MachOWriterExecutable.hpp: set high bit of cpusubtype of 64-bit main executables when targeting 10.5 or later
3571 2006-09-28 Devang Patel <dpatel@apple.com>
3573 Add LLVM LTO support
3574 src/LLVMReader.hpp: New file.
3575 src/ld.cpp: Add optimization phase. Use LLVM LTO.
3576 unit-tests/test-cases/llvm-integration: New tests.
3578 2006-09-27 Nick Kledzik <kledzik@apple.com>
3580 ld64.xcodeproj/project.pbxproj: remove accidental install of source file into man1
3583 2006-09-25 Nick Kledzik <kledzik@apple.com>
3585 src/Architectures.hpp: add kPointerDiff16 for ppc and ppc64
3586 src/MachOReaderRelocatable.hpp: support kPointerDiff16
3587 src/MachOWriterExecutable.hpp: support kPointerDiff16
3589 ----- Tagged ld64-63.1
3591 2006-09-22 Nick Kledzik <kledzik@apple.com>
3593 src/MachOWriterExecutable.hpp: include stubs in LC_SEGMENT_SPLIT_INFO
3596 2006-09-21 Nick Kledzik <kledzik@apple.com>
3598 src/Options.cpp: disable split-seg dylibs for 64-bit architectures
3601 2006-09-19 Nick Kledzik <kledzik@apple.com>
3603 src/MachOReaderRelocatable.hpp: rework __cstring parsing to better handle mixed alignment cstrings
3604 src/MachOWriterExecutable.hpp: in -r mode, make all __cstrings aligned to section alignment
3607 2006-09-19 Nick Kledzik <kledzik@apple.com>
3609 src/MachOWriterExecutable.hpp: rework encoding of LC_SEGMENT_SPLIT_INFO
3612 2006-09-19 Nick Kledzik <kledzik@apple.com>
3614 src/Options.cpp: check for -search_paths_first in first pass
3617 ----- Tagged ld64-63
3619 2006-09-15 Nick Kledzik <kledzik@apple.com>
3621 src/Options.cpp: since the ld64 will repeatedly search an archive, and some project list archives
3622 multiple times on command line to work with traditional linkers, automatically ignore duplicate libraries
3623 unit-tests/test-cases/archive-duplicate: added test case
3626 2006-09-15 Nick Kledzik <kledzik@apple.com>
3628 src/Options.cpp: support -r -static
3629 src/MachOWriterExecutable.hpp: support -r -static an don't generate LC_DYSYMTAB
3632 2006-09-14 Nick Kledzik <kledzik@apple.com>
3634 src/MachOWriterExecutable.hpp: in -r mode references to weak symbols should not create external relocations
3635 as that can cause nmedit to errror later.
3638 2006-09-13 Nick Kledzik <kledzik@apple.com>
3640 <rdar://problem/4718189> ld64: Handle .objc_class_name exports specially
3641 src/Options.cpp: add hack so that .objc_class_name_XXX in -exported_symbols_list imples _OBJC_CLASS_$_XXX
3642 src/ld.cpp: add hack to supporess errors about .objc_class_name_XXX or _OBJC_CLASS_$_XXX being undefined
3645 2006-09-12 Nick Kledzik <kledzik@apple.com>
3647 <rdar://problem/4474172> Support -prebind when targeting ppc and OS < 10.4
3648 src/Options.h: add splitSeg() and baseWritableAddress()
3649 src/Options.cpp: Add support for -seg_addr_table and LD_SEG_ADDR_TABLE, and -prebind and LD_PREBIND.
3650 src/src/MachOWriterExecutable.hpp: support split-seg and canonical prebound files to be generated
3653 2006-09-11 Nick Kledzik <kledzik@apple.com>
3655 <rdar://problem/4464904> Linking a dylib or binary from identical binaries should produce the same output
3656 src/MachOWriterExecutable.hpp: set the timestamps to be constant
3659 2006-09-11 Nick Kledzik <kledzik@apple.com>
3661 <rdar://problem/4070025> Linker support for ordering all sections and symbols
3662 src/Options.cpp: Add -order_file_statistics. Allow architecture prefixes in order files
3663 src/ld.cpp: Use fOptions.printOrderFileStatistics()
3666 2006-09-11 Nick Kledzik <kledzik@apple.com>
3668 <rdar://problem/3894079> Support -sectorder
3669 unit-tests/test-cases/order_file: added test case
3670 src/ld.cpp: Implement order file support in Linker::sortAtoms()
3671 src/Options.h: add Options.orderedSymbols()
3672 src/Options.cpp: add parseOrderFile(), implement -order_file
3675 2006-09-07 Nick Kledzik <kledzik@apple.com>
3677 <rdar://problem/4637023> need -i for 64-bit (or equivalent)
3678 <rdar://problem/4014529> Support -i for aliasing exported symbols
3679 unit-tests/test-cases/alias-objects: added
3680 unit-tests/test-cases/alias-command-line: added
3681 src/ObjectFile.h: Added Atom::getOrdinal() as new way to sort atoms. Added ReaderOptions.fAliases
3682 src/MachOReaderRelocatable.hpp: Added SymbolAliasAtom to handle multiple symbols to same address
3683 src/MachOReaderArchive.hpp: implement Atom::getOrdinal() to space out atom ordinals across member objects
3684 src/Options.cpp: support -i, -alias, -alias_list. Move search of /Network/Library/Frameworks to after /System/Library/Frameworks
3685 src/MachOWriterExecutable.hpp: pad out seg_info data. Implement getOrdinal().
3686 src/ObjectDump.cpp: call constructors directly instead of using make() wrapper
3689 2006-09-01 Nick Kledzik <kledzik@apple.com>
3691 <rdar://problem/4458878> Need the ability to tag libraries/plug-ins with security attributes
3692 src/MachOReaderDylib.hpp: add warning if using -root_safe or -setuid_safe and link against dylib that is not
3693 src/ObjectFile.h: add ReaderOption fRootSafe and fSetuidSafe
3694 src/Options.cpp: handle -root_safe or -setuid_safe command line options
3695 src/MachOWriterExecutable.hpp: set MH_ROOT_SAFE and MH_SETUID_SAFE flags
3698 2006-08-31 Nick Kledzik <kledzik@apple.com>
3700 src/ld.cpp: Add Linker::processDTrace() for processing dtrace static probes
3701 src/OpaqueSection.hpp: renamed, add symbol name, add ability to add references
3702 ld64.xcodeproj/project.pbxproj: remove SectCreate.cpp, add OpaqueSection.hpp
3705 2006-08-28 Nick Kledzik <kledzik@apple.com>
3707 <rdar://problem/4571042> Add convention for removing symbols at link time
3708 <rdar://problem/3962731> Assembler -L option causes ld64 to split stubs
3709 unit-tests/test-cases/special-labels: added test case
3710 src/MachOReaderRelocatable.hpp: ignore L* labels, make l* labels as kSymbolTableNotIn
3713 2006-08-28 Nick Kledzik <kledzik@apple.com>
3715 src/lObjectFile.h: refactor isTargetUnbound() into getTargetBinding()
3716 src/ld.cpp: create __dof section in final linked images from dtrace static probes
3717 src/Architectures.hpp: add kDtraceProbe
3718 src/Options.h/cpp: Add support for -dtrace
3719 src/machochecker.cpp: support LC_SEGMENT_SPLIT_INFO
3720 src/MachOWriterExecutable.hpp: support kDtraceProbe
3721 src/MachOReaderRelocatable.hpp: suppport kDtraceProbe
3724 2006-08-25 Nick Kledzik <kledzik@apple.com>
3726 <rdar://problem/4701529> generate LC_SEGMENT_SPLIT_INFO for 10.5 or later dylibs
3727 src/Options.h&.cpp: implement sharedRegionEligible() to control when LC_SEGMENT_SPLIT_INFO is added
3728 src/MachOFileAbstraction.hpp: add macho_linkedit_data_command
3729 src/MachOWriterExecutable.hpp: generate LC_SEGMENT_SPLIT_INFO load command and linkedit content
3731 ----- Tagged ld64-62
3733 2006-08-15 Nick Kledzik <kledzik@apple.com>
3735 <rdar://problem/4681062> wrong error message when symbol is found in unused indirect library
3736 src/ld.cpp: remove indirect libraries if they are not re-exported
3737 unit-tests/test-cases/indirect-dylib: added test case
3740 2006-08-15 Nick Kledzik <kledzik@apple.com>
3742 <rdar://problem/3930461> alignment needs to be richer
3743 src/ObjectFile.h: define ObjectFile::Alignment class for tracking rich alignment info
3744 src/ld.cpp: modify SymbolTable::add() to work with new Alignment type
3745 src/MachOReaderRelocatable.hpp: use new Alignment type. Remove alignAtLeast() and handleAnonymousNonLazyPointers()
3746 src/MachOWriterExecutable.hpp: update for new Alignment type, use modulus when calculating layout address
3747 src/ObjectDump.cpp: print richer Alignment info
3748 unit-tests/test-cases/align-modulus: added test case
3751 2006-08-11 Nick Kledzik <kledzik@apple.com>
3753 remove OPEN_SOURCE conditionals around x86_64 support
3756 2006-07-31 Nick Kledzik <kledzik@apple.com>
3758 <rdar://problem/4654131> ld64 while linking cc1 [ when dead_strip is ON]
3759 src/ld.cpp: Add ivar fAtomsWithUnresolvedReferences to track atoms not initially resolvable
3760 unit-tests/test-cases/dead_strip-archive: added test case
3763 2006-07-31 Nick Kledzik <kledzik@apple.com>
3765 <rdar://problem/4656617> x86_64: instructions with immediate and rip-relative operands need to use new relocation types
3766 src/MachOWriterExecutable.hpp: generate new reloc types in -r mode
3767 src/MachOReaderRelocatable.hpp: parse new reloc types
3768 unit-tests/test-cases/relocs-asm/relocs-asm.s: add test cases for new reloc type
3771 2006-07-18 Nick Kledzik <kledzik@apple.com>
3773 src/MachOReaderRelocatable.hpp: suppress warning about dwarf info parsing for one benign no-op case
3774 the compiler emits when there are not functions in the __text section
3777 2006-07-17 Nick Kledzik <kledzik@apple.com>
3779 <rdar://problem/4634840> faster debug note generation
3780 src/ld.cpp: rework collectDebugInfo() to produce all debug notes in one pass, intead of a
3781 pass per .o file. Added timing info for collectDebugInfo() to -print_statistics
3782 unit-tests/test-cases/dwarf-debug-notes-r/Makefile: add expliced -arch to ld -r
3783 unit-tests/test-cases/dwarf-debug-notes-r/expected-stabs: alter for new debug notes order
3786 2006-07-17 Nick Kledzik <kledzik@apple.com>
3788 <rdar://problem/4623994> ld64 VSIZE is 1.18GB when building Finder ppc64
3789 src/ld.cpp: fixed typo in createReader() that prevented dylibs from being unmapped
3791 ----- Tagged ld64-61.1
3793 2006-07-11 Nick Kledzik <kledzik@apple.com>
3795 <rdar://problem/4622049> ld64-61: gcc DejaGnu tests failing due to -arch followed by unknown architecture name
3796 src/Options.cpp: map ppc750, ppc7400, ppc7450, and ppc970 to ppc. Improve error message
3798 2006-07-11 Nick Kledzik <kledzik@apple.com>
3800 <rdar://problem/4622769> If -arch is missing, rollover to ld_classic does not happen
3801 src/Options.h: make gotoClassicLinker() public
3802 src/ld.cpp: call gotoClassicLinker() if the inferred architecture is ppc or i386
3804 ----- Tagged ld64-61
3806 2006-06-29 Nick Kledzik <kledzik@apple.com>
3808 <rdar://problem/4606628> ld64 should be renamed to ld
3809 src/Options.cpp: exec() ld_classic if -arch ppc or -arch i386 is seen
3810 src/ld.cpp: alter version string
3811 ld64.xcodeproj/project.pbxproj: change install location to /usr/bin/ld, add symlink from /usr/bin/ld64
3812 doc/man/man1/ld.1: added
3814 ----- Tagged ld64-60
3816 2006-06-28 Nick Kledzik <kledzik@apple.com>
3818 <rdar://problem/4604539> Can't link large ppc64 program: ld64 says "bl out of range"
3819 MachOWriterExecutable.hpp: fix branch island generation to work for weak_import functions
3820 and properly chain together branch islands
3821 MachOReaderRelocatable.hpp: improve performance of huge .o file reading by sorted references
3824 2006-06-28 Nick Kledzik <kledzik@apple.com>
3826 <rdar://problem/4603454> MySQL-36 fails to build with ld64-59
3827 src/MachOReaderRelocatable.hpp: back out fix for 4585335
3828 src/MachOWriterExecutable.hpp: back out fix for 4585335
3830 2006-06-27 Nick Kledzik <kledzik@apple.com>
3832 src/MachOReaderRelocatable.hpp: handle N_GSYM without ending :G() since that is how
3833 dwarf debug notes are formed.
3835 2006-06-23 Nick Kledzik <kledzik@apple.com>
3837 <rdar://problem/4599239 objc class with no superclass causes bad undefined symbol
3838 src/MachOReaderRelocatable.hpp: handle NULL superclass in objc_class
3839 unit-tests/test-cases/relocs-objc/test.m: add case with no super class
3842 2006-06-23 Nick Kledzik <kledzik@apple.com>
3844 <rdar://problem/4313369> ld64 doesn't support variant linking -framework fw,_debug
3845 src/Options.cpp: enhance findFramework() to support suffixes
3847 ----- Tagged ld64-59
3849 2006-06-22 Nick Kledzik <kledzik@apple.com>
3851 <rdar://problem/4596726> ld64 lost DWARF debug notes
3852 src/MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
3853 unit-tests/test-cases/dwarf-debug-notes-r: added test case
3855 2006-06-21 Nick Kledzik <kledzik@apple.com>
3857 <rdar://problem/4567995> python 64-bit address miscalculation
3858 src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
3860 2006-06-21 Nick Kledzik <kledzik@apple.com>
3862 <rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
3863 src/MachOWriterExecutable.hpp: in -r mode, virtual sections should not increment address
3866 ----- Tagged ld64-58
3868 2006-06-16 Nick Kledzik <kledzik@apple.com>
3870 src/rebase.cpp: fix page alignment problem
3871 src/rebase.cpp: fix endianess problem with local non-lazy pointers
3873 2006-06-15 Nick Kledzik <kledzik@apple.com>
3875 src/rebase.cpp: fix to build in CurryWeed
3876 ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
3878 2006-06-15 Nick Kledzik <kledzik@apple.com>
3880 <rdar://problem/4495309> Support .objc_class_name_* symbols
3881 src/ObjectFile.h: Add kSymbolTableInAsAbsolute
3882 src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
3883 src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
3884 unit-tests/test-cases/objc-references: added
3886 2006-06-15 Nick Kledzik <kledzik@apple.com>
3888 <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
3889 src/MachOWriterExecutable.hpp: add section attribute for sections with code
3891 2006-06-15 Nick Kledzik <kledzik@apple.com>
3893 <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
3894 src/MachOReaderRelocatable.hpp: only special case Apple objc runtime objc classes
3896 2006-06-15 Nick Kledzik <kledzik@apple.com>
3898 <rdar://problem/4582999> x86_64: ".align" directive not honored
3899 src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
3901 2006-06-14 Nick Kledzik <kledzik@apple.com>
3903 <rdar://problem/4585335> jump table into middle of weak symbol causes error
3904 src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
3905 src/MachOWriterExecutable.hpp: do not error on absolute references to interior of weak symbols
3907 2006-06-13 Nick Kledzik <kledzik@apple.com>
3909 src/Options.cpp: allow -image_base as an alias for -seg1addr
3911 2006-06-13 Nick Kledzik <kledzik@apple.com>
3913 <rdar://problem/4585115> implement -d
3914 src/Options.h: add fMakeTentativeDefinitionsReal
3915 src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
3916 src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
3917 unit-tests/test-cases/btentative-to-real: added test case
3919 2006-06-13 Nick Kledzik <kledzik@apple.com>
3921 <rdar://problem/4584355> implement -bundle_loader
3922 src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
3923 src/Options.cpp: handle -bundle_loader
3924 src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
3925 src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
3926 src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
3927 unit-tests/test-cases/bundle_loader: added test case
3929 2006-06-12 Nick Kledzik <kledzik@apple.com>
3931 <rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
3932 src/MachOReaderDylib.hpp: in Reader::reExports() compare install path in addition to load path
3935 2006-06-10 Nick Kledzik <kledzik@apple.com>
3937 <rdar://problem/4548935> Need rebasing tool
3938 src/rebase.cpp: added
3939 unit-tests/test-cases/rebase-basic: added
3940 doc/man/man1/rebase.1: added
3941 ld64.xcodeproj/project.pbxproj: added rebase target. changed all targets to build with dwarf
3944 2006-06-10 Nick Kledzik <kledzik@apple.com>
3946 src/machochecker.cpp: add some ppc reloc sanity checking
3948 ----- Tagged ld64-57
3950 2006-06-06 Nick Kledzik <kledzik@apple.com>
3952 <rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
3953 ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
3954 unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
3956 2006-06-06 Nick Kledzik <kledzik@apple.com>
3958 <rdar://problem/4572702> -sectcreate of a 0-byte section fails
3959 MachOWriterExecutable.cpp: Don't error out on zero length segments
3960 MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
3961 there is a writable segment >4GB from base address
3963 2006-06-04 Eric Christopher <echristo@apple.com>
3967 * src/ld.cpp (createReader): Fixed error message.
3969 (resolveFrom): Ditto.
3970 (checkUndefines): Ditto.
3972 ----- Tagged ld64-56
3974 2006-05-23 Nick Kledzik <kledzik@apple.com>
3976 <rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
3977 ld.cpp: don't limit debug notes to functions starting with underscore
3979 2006-05-22 Nick Kledzik <kledzik@apple.com>
3981 <rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
3982 * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups
3984 2006-05-22 Nick Kledzik <kledzik@apple.com>
3986 <rdar://problem/4535044> remove inferring warning
3987 * ld.cpp: Remove "inferring" warning. If a link failed and now arch was specifed add which arch was
3988 inferred to error message
3990 2006-05-19 Nick Kledzik <kledzik@apple.com>
3992 <rdar://problem/4544001> ld64 does not honor -arch_multiple
3993 * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
3995 2006-05-19 Nick Kledzik <kledzik@apple.com>
3997 <rdar://problem/4555973> Support S_16BYTE_LITERALS section types
3998 * src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
3999 * src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS
4001 2006-05-19 Nick Kledzik <kledzik@apple.com>
4003 <rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
4004 * src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing
4006 ----- Tagged ld64-55
4008 2006-05-18 Nick Kledzik <kledzik@apple.com>
4010 <rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
4011 * src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64
4013 2006-05-18 Nick Kledzik <kledzik@apple.com>
4015 <rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
4016 * src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references
4018 2006-05-18 Nick Kledzik <kledzik@apple.com>
4020 <rdar://problem/4553555> ld64: .section defaults to read-only
4021 * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
4023 2006-05-18 Nick Kledzik <kledzik@apple.com>
4025 <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
4026 * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
4028 2006-05-12 Nick Kledzik <kledzik@apple.com>
4030 * src/Architectures.hpp: add x86::kAbsolute32
4031 * src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
4032 * src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind
4034 ----- Tagged ld64-54
4036 2006-05-11 Nick Kledzik <kledzik@apple.com>
4038 <rdar://problem/4545108> CF-393 failes to link for x86_64
4039 * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable
4041 2006-05-11 Nick Kledzik <kledzik@apple.com>
4043 <rdar://problem/4501434> warning arch x86_64 not found using i386
4044 * src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs
4047 2006-05-10 Nick Kledzik <kledzik@apple.com>
4049 <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
4050 * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
4053 2006-05-08 Nick Kledzik <kledzik@apple.com>
4055 <rdar://problem/3894083> Support -dead_strip
4056 * src/Options.h/cpp: implement -why_load and -why_live. Enable -dead_strip.
4057 * src/MachOReaderArchive.hpp: implement -why_load
4058 * src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
4059 * src/ld.cpp: implement dead code stripping
4060 * unit-tests/test-cases/dead_strip: added
4062 ----- Tagged ld64-53
4064 2006-05-05 Nick Kledzik <kledzik@apple.com>
4066 * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
4068 2006-05-05 Nick Kledzik <kledzik@apple.com>
4070 <rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
4071 * src/ld.cpp: for SO stabs, associate first and last atom in the SO range
4072 * src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value
4074 2006-05-05 Nick Kledzik <kledzik@apple.com>
4076 * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
4079 2006-05-02 Nick Kledzik <kledzik@apple.com>
4081 <rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
4082 * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
4083 <rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
4084 * src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
4085 is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.
4087 2006-05-02 Nick Kledzik <kledzik@apple.com>
4089 * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
4090 overlaps shared region
4092 ----- Tagged ld64-52.1
4094 2006-05-01 Nick Kledzik <kledzik@apple.com>
4096 * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
4097 the __data section too.
4099 ----- Tagged ld64-52
4101 2006-04-28 Nick Kledzik <kledzik@apple.com>
4103 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4104 * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
4106 2006-04-28 Nick Kledzik <kledzik@apple.com>
4108 <rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
4109 * src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol
4113 2006-04-21 Nick Kledzik <kledzik@apple.com>
4115 * src/Options.cpp: fix default address for ppc64 custom stack
4116 * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
4119 2006-04-14 Nick Kledzik <kledzik@apple.com>
4121 * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
4123 ----- Tagged ld64-51.1
4125 2006-04-13 Nick Kledzik <kledzik@apple.com>
4127 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4128 * src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
4129 that points to static or global symbols
4130 * src/ld.cpp: print version of ld64 in error messages
4133 ----- Tagged ld64-51
4135 2006-04-11 Nick Kledzik <kledzik@apple.com>
4137 <rdar://problem/4499168> exported symbols not properly stripped
4138 * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
4140 2006-03-31 Nick Kledzik <kledzik@apple.com>
4142 <rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
4143 * src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
4144 * src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that
4147 2006-03-31 Nick Kledzik <kledzik@apple.com>
4149 <rdar://problem/4496499> ld64 should remove generated file if link errors out
4150 * src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow
4153 ----- Tagged ld64-50
4156 2006-03-29 Nick Kledzik <kledzik@apple.com>
4158 * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
4159 * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
4161 2006-03-28 Nick Kledzik <kledzik@apple.com>
4163 * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
4165 ----- Tagged ld64-49.1
4167 2006-03-25 Nick Kledzik <kledzik@apple.com>
4169 * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
4171 ----- Tagged ld64-49
4173 2006-03-24 Nick Kledzik <kledzik@apple.com>
4175 * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
4176 <rdar://problem/4488113> ld64 is after processing bad GSYM stabs
4177 * src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it
4179 2006-03-23 Nick Kledzik <kledzik@apple.com>
4181 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
4184 2006-03-23 Nick Kledzik <kledzik@apple.com>
4186 * src/Options.cpp: change macosx-min-version to default to a per-architecture setting
4187 add warning if -pagezero_size is not page aligned
4188 * src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
4189 * src/machochecker.cpp: sanity check relocation records
4191 ----- Tagged ld64-48
4193 2006-03-21 Nick Kledzik <kledzik@apple.com>
4195 <rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
4196 * src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
4197 match it to a STAB symbol.
4199 2006-03-21 Nick Kledzik <kledzik@apple.com>
4201 <rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
4202 * src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
4203 * src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
4204 * src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image
4206 2006-03-21 Nick Kledzik <kledzik@apple.com>
4208 <rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
4209 * unit-tests/test-cases/filelist: added
4210 * src/Options.cpp: in Options::loadFileList() handle comma option
4213 ----- Tagged ld64-47.1
4216 ----- Tagged ld64-47
4219 ----- Tagged ld64-46
4221 2006-03-10 Nick Kledzik <kledzik@apple.com>
4223 <rdar://problem/4419505> ld64 should figure out architecture from .o files
4224 * unit-tests/test-cases/auto-arch: added
4225 * src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
4226 * src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
4227 * src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
4228 * src/Options.cpp: stop defaulting to ppc64
4231 2006-03-09 Nick Kledzik <kledzik@apple.com>
4233 <rdar://problem/4465004> Need "intentionally left blank" dylib stubs
4234 * unit-tests/include/common.makefile: add VALID_ARCHS
4235 * unit-tests/run-all-unit-tests: set up VALID_ARCHS
4236 * unit-tests/test-cases/blank-stubs: add test case
4237 * src/ld.cpp: in addDylib(), detect and ignore blank stubs
4238 * src/MachOReaderDylib.hpp: in constructor, handle blank stubs
4240 2006-03-09 Nick Kledzik <kledzik@apple.com>
4242 <rdar://problem/4471424> crash in stub with 2GB pagezero
4243 * src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used
4245 2006-03-06 Nick Kledzik <kledzik@apple.com>
4247 * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
4249 ----- Tagged ld64-45
4252 2006-03-06 Nick Kledzik <kledzik@apple.com>
4254 <rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
4255 * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion
4258 ----- Tagged ld64-44
4260 2006-03-04 Nick Kledzik <kledzik@apple.com>
4262 * src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
4263 Error out if .o file contains old __DWARFA style dwarf.
4265 2006-03-02 Nick Kledzik <kledzik@apple.com>
4267 * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
4269 ----- Tagged ld64-43
4272 2006-03-02 Nick Kledzik <kledzik@apple.com>
4274 * src/MachOReaderRelocatable.hpp: <rdar://problem/4464370> tighten detection of anonymous non-lazy-pointer
4276 ----- Tagged ld64-42
4278 2006-02-28 Nick Kledzik <kledzik@apple.com>
4280 * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment
4282 2006-02-28 Nick Kledzik <kledzik@apple.com>
4284 <rdar://problem/4461240> SWB: ld64-37 (can't resolve symbol ___dso_handle)
4285 * src/MachOWriterExecutable.hpp: add class DsoHandleAtom
4287 2006-02-28 Nick Kledzik <kledzik@apple.com>
4289 * unit-tests/test-cases/literals-coalesce-alignment: added test case
4290 * src/ld.cpp: when coalescing strings pick one with greater alignment
4291 <rdar://problem/4458660> ld64: CG link failed because lo14 reference to anonymous non-lazy-pointer not aligned
4292 * unit-tests/test-cases/relocs-c/test.c: tweak to fail like 4458660
4293 * src/MachOReaderRelocatable.hpp: detect anonymous non-lazy-pointer and transform into real non-lazy-pointers
4295 ----- Tagged ld64-41
4297 2006-02-24 Nick Kledzik <kledzik@apple.com>
4299 * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options.
4302 ----- Tagged ld64-40
4304 2006-02-24 Nick Kledzik <kledzik@apple.com>
4306 <rdar://problem/4454698> Leopard9A113: ppc64 libstdc++.dylib initializer crashes in pthread_once
4307 * unit-tests/test-cases/multiple-entry-points: added
4308 * src/MachOReaderRelocatable.hpp: make sure that if there are multiple symbols with the same
4309 address, that we properly make zero length atoms for all but last symbol
4311 2006-02-24 Nick Kledzik <kledzik@apple.com>
4313 * src/Options.cpp: <rdar://problem/4456093> ld64 doesn't realpath(3) B&I tracing paths
4315 2006-02-24 Nick Kledzik <kledzik@apple.com>
4317 * src/Options.cpp: <rdar://problem/4457078> 9A110: ld64 can't deal with section names >16 chars
4319 2006-02-23 Nick Kledzik <kledzik@apple.com>
4321 * src/MachOWriterExecutable.hpp: use vector.reserve() to minimize re-allocations
4322 * src/Options.cpp: use vector.reserve() to minimize re-allocations
4323 * src/MachOReaderRelocatable.hpp: use vector.reserve() to minimize re-allocations
4324 * src/MachOReaderDylib.hpp: use vector.reserve() to minimize re-allocations
4325 * src/ld.cpp: use vector.reserve() to minimize re-allocations
4327 2006-02-23 Nick Kledzik <kledzik@apple.com>
4329 <rdar://problem/4455927> ld64 creates corrupt executables (and has malloc errors) with -headerpad option
4330 * src/MachOWriterExecutable.hpp: Change LoadCommandsPaddingAtom<A>::setSize() to update fLargestAtomSize
4331 * unit-tests/test-cases/header-pad: added
4333 2006-02-23 Nick Kledzik <kledzik@apple.com>
4335 <rdar://problem/4455192> ld64 creates invalid static executables
4336 * src/MachOWriterExecutable.hpp: Change MachHeaderAtom<A>::copyRawContent() to create correct header
4337 for static executables. Change SymbolTableLoadCommandsAtom to skip LC_DYSYMTAB for static executables
4338 * src/machochecker.cpp: Add tests that static executables are well formed
4339 * unit-tests/test-cases/static-executable: added
4341 2006-02-22 Nick Kledzik <kledzik@apple.com>
4343 * src/Options.cpp: <rdar://problem/4453468> chnage printf on unknown arg to a throw
4345 ----- Tagged ld64-39
4347 2006-02-20 Nick Kledzik <kledzik@apple.com>
4349 * unit-tests/test-cases/read-only-relocs: added new test case
4350 * src/MachOWriterExecutable.hpp: <rdar://problem/4448922> detect and error on relocs in read-only sections
4351 * src/MachOReaderRelocatable.hpp: fix parsing of i386 absolute addressing relocs
4353 2006-02-20 Nick Kledzik <kledzik@apple.com>
4355 * unit-tests/test-cases/stabs-coalesce: added new test case
4356 * src/ld.cpp.hpp: <rdar://problem/4449226> in collectStabs removed unused stabs
4358 ----- Tagged ld64-38
4360 2006-02-17 Nick Kledzik <kledzik@apple.com>
4362 * src/MachOWriterExecutable.hpp: <rdar://problem/4434578> set correct n_sect field of stabs
4364 2006-02-15 Nick Kledzik <kledzik@apple.com>
4366 * src/MachOReaderArchive.hpp: <rdar://problem/4441920> with -all_load skip over both kinds of SYMDEFs
4367 * unit-tests/test-cases/archive-basic/Makefile: add -all_load test case
4369 ----- Tagged ld64-37
4371 2006-02-13 Eric Christopher <echristo@apple.com>
4373 * src/MachOWriterExecutable.hpp (assignFileOffsets): Simplify. Add comments.
4376 2006-02-13 Nick Kledzik <kledzik@apple.com>
4378 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceRelocatable() fix kPCRel32 for external case
4380 2006-02-13 Nick Kledzik <kledzik@apple.com>
4382 * unit-tests/test-cases/zero-fill: added
4383 * src/machochecker.cpp: check that S_ZEROFILL have no file offset
4384 * src/MachOWriterExecutable.hpp: rework assignFileOffsets() to fix rdar://problem/4441145
4386 2006-02-12 Nick Kledzik <kledzik@apple.com>
4388 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440880> fix use of first zero-length c-string in .o file
4390 2006-02-12 Nick Kledzik <kledzik@apple.com>
4392 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440905> fix uninitialized fAlignment
4394 2006-02-12 Nick Kledzik <kledzik@apple.com>
4396 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add pointer-diff cases
4397 * src/Architectures.hpp: make size explicit in ppc/ppc64 kPointerDiff
4398 * src/MachOReaderRelocatable.hpp: don't allow kPointerDiff64 for ppc (just ppc64)
4399 * src/MachOWriterExecutable.cpp: set proper r_length for ld -r of kPointerDiff
4401 ----- Tagged ld64-36
4403 2006-02-08 Nick Kledzik <kledzik@apple.com>
4405 * src/MachOReaderRelocatable.cpp: rdar://problem/4438677 Handle when a .o file dwarf line info entries but no functions
4407 2006-02-08 Nick Kledzik <kledzik@apple.com>
4409 * src/MachOWriterExecutable.cpp: Properly set address of first TEXT section
4410 Keep S_COALESCED attribute for __eh_frame
4412 2006-02-08 Nick Kledzik <kledzik@apple.com>
4414 * src/ld.cpp: Temporarily turn allowable client errors into warnings
4415 * unit-tests/test-cases/allowable-clientMakefile: Temporarily let warnings be ok for above
4416 * src/MachOWriterExecutable.hpp: fix ld -r to not use external relocations for symbols make static
4418 2006-02-08 Nick Kledzik <kledzik@apple.com>
4420 * src/ld.cpp: A sibling in an umbrella can always link with its other siblings
4421 * unit-tests/test-cases/allowable-client: add test case for above
4423 2006-02-08 Nick Kledzik <kledzik@apple.com>
4425 * src/MachOReaderRelocatable.hpp: support LOCAL non-lazy pointers to hidden symbols
4426 * src/machochecker.cpp: verify indirect symbol table
4427 * unit-tests/test-cases/private-non-lazy: added test case
4429 2006-02-07 Nick Kledzik <kledzik@apple.com>
4431 * src/MachOWriterExecutable.hpp: fix calculation of file offsets in ld -r mode
4432 * src/machochecker.cpp: verify segment file offsets are within file
4434 ----- Tagged ld64-35
4436 2006-02-06 Nick Kledzik <kledzik@apple.com>
4438 * ld.cpp: allow parent of sub-framework to link
4439 * unit-tests/test-cases/allowable-client/Makefile: added cases for parent and clients of parent
4441 2006-02-04 Nick Kledzik <kledzik@apple.com>
4443 * unit-tests/test-cases/relocs-c/test.c: added some array cases
4444 * src/MachOReaderRelocatable.hpp: factor out makeReferenceToEH()
4445 * src/MachOWriterExecutable.hpp: add initial support for non-lazy pointer synthesis
4447 ----- Tagged ld64-34
4449 2006-02-04 Nick Kledzik <kledzik@apple.com>
4451 * src/ld.cpp: <rdar://problem/4432917> fix -no_arch_warnings
4452 <rdar://problem/4432932> fix -undefined warning
4453 Do BINCL/EINCL optimization for gfull stabs
4454 Implement "essential symbols" for stabs (-Sp)
4455 Fix allowable clients to only test on direct libraries
4456 * src/MachOReaderRelocatable.hpp: support BINCL/EINCL stabs
4458 2006-02-03 Nick Kledzik <kledzik@apple.com>
4460 * src/machochecker.cpp: add code to check load command alignment
4461 * src/MachOWriterExecutable.hpp: make load command alignment depend on architecture
4463 2006-02-03 Nick Kledzik <kledzik@apple.com>
4465 * unit-tests/test-cases/literals-coalesce: added
4466 * src/MachOReaderRelocatable.hpp: assure all targets of low14 ppc relocs are at least 4-byte alignmented
4468 ----- Tagged ld64-33
4470 2006-02-02 Nick Kledzik <kledzik@apple.com>
4472 * src/MachOReaderRelocatable.hpp: properly coalesce 8-byte literals
4473 * src/MachOWriterExecutable.hpp: support ppc64::kPointerDiff32
4475 ----- Tagged ld64-32
4477 2006-02-02 Nick Kledzik <kledzik@apple.com>
4479 * src/MachOReaderRelocatable.hpp: support anonymous zero fill atoms
4481 2006-02-02 Nick Kledzik <kledzik@apple.com>
4483 * src/ld.cpp: A weak definition is good enough, do not search archives for a non-weak one
4484 * unit-tests/test-cases/archive-weak: add test case for above
4485 * src/MachOReaderRelocatable.hpp: an atom should never have a by-name reference to itself
4486 * src/Options.cpp: prevent .eh symbols from being exported via a -exported_symbols_list
4488 2006-02-01 Nick Kledzik <kledzik@apple.com>
4490 * src/MachOReaderRelocatable.hpp: Support -macosx_version_min 10.5
4492 2006-02-01 Nick Kledzik <kledzik@apple.com>
4494 * src/MachOReaderRelocatable.hpp: don't try to parse debug_line dwarf if no symboled atoms
4496 ----- Tagged ld64-31
4498 2006-02-01 Eric Christopher <echristo@apple.com>
4500 * unit-tests/test-cases/allow-stack-execute/Makefile: Move otool handling...
4501 * unit-tests/include/common.makefile: ... here.
4502 * unit-tests/bin/fail-if-stdin.pl: New.
4503 * unit-tests/test-cases/no-uuid: Ditto.
4504 * src/ld.cpp (Linker::) Add fCreateUUID.
4505 (::Linker): Initialize.
4506 (::collectStabs): Use. Set if dwarf or we have a UUID already.
4507 (::writeOutput): Pass as argument to Writer::write along with option.
4508 * src/Options.h (Option::emitUUID): Declare.
4509 (Option::fEmitUUID): Ditto.
4510 * src/Options.cpp (Option::emitUUID): New.
4511 (parse): Handle -no_uuid.
4512 * src/MachOReaderRelocatable (Reader::Reader): Handle LC_UUID.
4513 * src/ExecutableFile.h (Writer::Write): Add createUUID boolean.
4514 * src/MachOWriterExecutable: Add UUID forward declaration.
4516 (UUIDLoadCommandAtom): Emit LC_UUID if fEmit. New function emit. Size
4518 (Writer::writer): Add handle for LC_UUID. If createUUID emit LC_UUID.
4519 (MachHeaderAtom::copyRawContent): Don't count a load command if its size is
4521 (UUIDLoadCommandAtom::copyRawContent): Depend on fEmit.
4524 2006-01-31 Nick Kledzik <kledzik@apple.com>
4526 * unit-tests/test-cases/dwarf-debug-notes : Added
4527 * src/ld.cpp: don't generate debug note for .eh symbols
4528 * src/MachOReaderRelocatable.hpp: make dwarf line info to atom matching faster and better
4530 2006-01-31 Nick Kledzik <kledzik@apple.com>
4532 * ld64.xcodeproj/project.pbxproj : Make buildable on Leopard
4533 * src/MachOFileAbstraction.hpp: make buildable without latest cctools headers
4535 2006-01-31 Nick Kledzik <kledzik@apple.com>
4537 * src/MachOReaderRelocatable.hpp: better error message for bad relocs
4538 * src/ObjectDump.cpp: add emacs tab settings
4539 * src/SectCreate.h: ditto
4540 * src/SectCreate.cpp: ditto
4541 * src/machochecker.cpp: ditto
4542 * src/ExecutableFile.h: ditto
4544 2006-01-30 Eric Christopher <echristo@apple.com>
4546 * src/ExecutableFile.h: Indent.
4548 2006-01-30 Nick Kledzik <kledzik@apple.com>
4550 * src/MachOReaderRelocatable.hpp: performance improvements
4551 * src/ld.cpp: now that stubs are synthesized in write, don't need to special case anymore
4553 2006-01-30 Nick Kledzik <kledzik@apple.com>
4555 * src/MachOReaderRelocatable.hpp: fix parsing of pcc relocs
4556 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add test case for above
4558 2006-01-29 Nick Kledzik <kledzik@apple.com>
4560 * unit-tests/test-cases/weak_import: added test case
4561 * src/ld.cpp: move code for weak_import mismatch to writer
4562 * src/ObjectFile.h: remove ImportWeakness methods
4563 * src/MachOReaderDylib.hpp: ditto
4564 * src/SectCreate.cpp: ditto
4565 * src/Architectures.hpp: add new ReferenceKinds for weak_imports
4566 * src/MachOReaderRelocatable.hpp: implement new ReferenceKinds
4567 * src/MachOWriterExecutable.hpp: handle new ReferenceKinds and weak_import mismatches
4569 2006-01-29 Nick Kledzik <kledzik@apple.com>
4571 * src/Options.cpp: verify -allow_stack_execute is only used on main executables
4573 2006-01-29 Nick Kledzik <kledzik@apple.com>
4575 * src/MachOReaderRelocatable.hpp: sync with latest dwarf reader from Geoff
4576 * src/debugline.c: sync with latest dwarf reader from Geoff
4578 2006-01-27 Eric Christopher <echristo@apple.com>
4580 * src/ld.cpp (Linker::syntesizeStabs): Correct spelling. Update all uses.
4582 2006-01-27 Eric Christopher <echristo@apple.com>
4584 * src/Options.h (Options): Add hasExecutableStack, fExecutableStack.
4585 * src/Options.cpp (Options::hasExecutableStack): New.
4586 (Options::parse): Parse -allow_stack_execute.
4587 * src/MachOWriterExecutable.hpp (MachHeaderAtom::copyRawContent):
4588 Implement MH_ALLOW_STACK_EXECUTION.
4589 * unit-tests/include/common.makefile (FAIL_IF_EMPTY): New.
4590 * unit-tests/bin/fail-if-no-stdin.pl: New file.
4591 * unit-tests/test-cases/allow-stack-execute: New directory.
4593 2006-01-27 Nick Kledzik <kledzik@apple.com>
4595 * src/MachOFileAbstraction.hpp: rely on latest system headers
4596 * src/MachOWriterExecutable.hpp: fix ppc stubs.
4597 wrote new relocationNeededInFinalLinkedImage() to replace common code
4599 2006-01-27 Eric Christopher <echristo@apple.com>
4601 * src/ld.cpp (logTraceInfo): New.
4602 (Linker::addArchive): Use.
4603 (Linker::addDylib): Ditto.
4604 * src/ObjectFile (ReaderOptions::fTraceOutputFile): New.
4605 * src/MachOReaderArchive.hpp (Reader::Reader): Move trace
4606 logging to Linker::addArchive.
4607 * src/Options.cpp (parsePreCommandLineEnvironment): Check
4608 LD_PRINT_FILE if tracing dylibs or archives.
4610 2006-01-26 Nick Kledzik <kledzik@apple.com>
4612 * src/MachOWriterExecutable.hpp: handle NULL strings in SO debug notes
4614 2006-01-26 Nick Kledzik <kledzik@apple.com>
4616 * src/MachOWriterExecutable.hpp: fix header padding calculation and thread state
4618 2006-01-26 Nick Kledzik <kledzik@apple.com>
4620 Rewrite all stabs processing.
4621 Move sythesize of debug notes into ld.cpp
4623 2006-01-26 Nick Kledzik <kledzik@apple.com>
4625 * src/MachOWriterExecutable.hpp: fix ppc and ppc64 stub relocs
4627 2006-01-25 Nick Kledzik <kledzik@apple.com>
4629 * ld64.xcodeproj/project.pbxproj: special case building in Curry
4631 2006-01-25 Nick Kledzik <kledzik@apple.com>
4633 * src/MachOWriterExecutable.hpp: fix bugs in stub/lazy-pointer synthesis
4635 2006-01-24 Eric Christopher <echristo@apple.com>
4637 * src/ld.cpp (Linker::createReaders): Change logging title to XBS.
4638 (Linker::addDylib): Ditto.
4639 * src/MachOReaderArchive.hpp (Reader::Reader): Ditto.
4640 * src/Options.h (fPrintOptions): New.
4641 * src/Options.cpp (Options::Options): Initialize above.
4642 (Options::checkForFile): Change logging title to XBS.
4643 (Options::findFramework): Ditto.
4644 (Options::parse): Add log for options.
4645 (Options::parsePreCommandLineEnvironmentSettings): Add LD_TRACE_ARCHIVES,
4646 LD_TRACE_DYLIBS, and LD_PRINT_OPTIONS.
4648 2006-01-24 Nick Kledzik <kledzik@apple.com>
4650 * src/MachOReaderRelocatable.hpp: better C++ eh parsing
4652 2006-01-23 Eric Christopher <echristo@apple.com>
4654 * unit-tests/bin/fail-if-exit-zero.pl: New.
4655 * unit-tests/include/common.makefile (FAIL_IF_SUCCESS): Use.
4656 * unit-tests/allowable-client: New test.
4657 * src/ld.cpp (Linker::addDylib): Check allowable clients before adding dylib.
4658 * src/Options.h (allowableClients): New.
4659 (clientName): Ditto.
4660 (fAllowableClients): Ditto.
4661 (fClientName): Ditto.
4662 * src/Options.cpp: Implement above.
4663 (parse): Handle -allowable_client and -client_name.
4664 * src/MachOReaderDylib.hpp (getAllowableClients): New.
4665 (fAllowableClients): Ditto.
4666 (Reader): Process LC_SUB_CLIENT load command.
4667 * src/ObjectFile.h (parentUmbrella): New.
4668 (getAllowableClients): New.
4669 * src/MachOWriterExecutable.hpp (AllowableClientLoadCommandsAtom): New.
4671 2006-01-23 Nick Kledzik <kledzik@apple.com>
4673 * unit-tests/test-cases/archive-basic: added
4674 * src/ld.cpp: fix shadowed local variable
4675 * src/FileAbstraction.hpp: <rdar://problem/4417372> ld64 shouldn't inline when building debug
4677 2006-01-23 Nick Kledzik <kledzik@apple.com>
4679 * src/ld.cpp: fix symbol not found error message
4680 * src/MachOReaderDylib.hpp: add logging to hash table
4681 * src/MachOReaderRelocatable.hpp: enable stabs processing. Handle static functions with stubs
4682 handle labeled cstrings.
4683 * src/MachOWriterExecutable.hpp: properly suppress atoms not in symbol table. fix low14 error check.
4685 * unit-tests/test-cases/relocs-literals/test.c: add more interesting edge cases
4687 2006-01-17 Nick Kledzik <kledzik@apple.com>
4689 * src/MachOReaderRelocatable.hpp: tweaks to synthesizing debug notes
4691 2006-01-16 Nick Kledzik <kledzik@apple.com>
4693 * src/debugline.{sh}: added
4694 * src/MachOReaderRelocatable.hpp: synthesize debug notes SOL from dwarf
4695 * src/MachOWriterExecutable.hpp: fix lazy pointer section
4696 * src/ObjectDump.hpp: Fix conditionalization
4697 * unit-tests/test-cases/dwarf-strip: added
4699 2006-01-11 Nick Kledzik <kledzik@apple.com>
4701 * src/MachOReaderRelocatable.hpp: support Tiger crt1.o build with old ld64
4702 * src/ObjectDump.hpp: Support -arch option
4704 2006-01-10 Nick Kledzik <kledzik@apple.com>
4706 * src/MachOWriterExecutable.hpp: fix stubs for ppc64
4707 * src/MachOFileAbstraction.hpp: fix typo for macho_routines
4708 * ld64.xcodeproj/project.pbxproj: add machochecker target
4709 * src/machochecker.cpp: new skeleton for checking mach-o file bit
4710 * unit-tests/: Add support for running machochecker
4712 2006-01-10 Nick Kledzik <kledzik@apple.com>
4714 * src/MachOReaderRelocatable.hpp: warn if dwarf can't be parsed
4715 * src/MachOReaderArchive.hpp: modTime for OSO stabs from archives is .a modTime
4717 2006-01-09 Nick Kledzik <kledzik@apple.com>
4719 * track modification time of .o files so that sythesized OSO stab will have it
4721 2006-01-09 Nick Kledzik <kledzik@apple.com>
4723 * src/MachOFileAbstraction.hpp: add macho_uuid_command
4724 * src/MachOWriterExecutable.cpp: add UUID load command to generated files
4726 2006-01-09 Nick Kledzik <kledzik@apple.com>
4728 * src/MachOReaderDylib.hpp: no longer keep dylib memory mapped
4729 * src/ld.cpp: don't track dylib sizes because they are not longer memory mapped
4731 2006-01-05 Nick Kledzik <kledzik@apple.com>
4733 * src/MachOReaderRelocatable.hpp: support new relocations
4735 2006-01-05 Nick Kledzik <kledzik@apple.com>
4737 * src/MachOReaderDylib.hpp: support MH_DYLIB_STUB
4738 * src/MachOReaderRelocatable.hpp: Add Geoff's comp unit extractor
4740 2006-01-05 Nick Kledzik <kledzik@apple.com>
4742 refactor: transform Atom::dontStripName() to getSymbolTableInclusion()
4743 * src/ld.cpp: pass dyld_stub_binding_helper to writer
4744 * src/MachOReaderRelocatable.hpp: update synthesized stabs
4745 Ignore stubs and lazy pointers in .o files
4746 Support initializers and terminators
4747 * src/MachOWriterExecutable.hpp: synthesize stubs and lazy pointers as needed
4748 * ld64.xcodeproj/project.pbxproj: change Release target to build with dwarf
4750 2006-01-03 Eric Christopher <echristo@apple.com>
4752 * src/Options.h (multipleDefinitionsInDylibs): Declare.
4753 (overridingDefinitionInDependentDylib): Ditto.
4754 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
4755 (multiplyDefined): Remove.
4756 (multiplyDefinedUnused): Ditto.
4757 (fMultiplyDefined): Ditto.
4758 (fWarnOnMultiplyDefined): New.
4759 (fMultiplyDefinedDynamic): Ditto.
4760 * src/Options.cpp (Options::Options): Initialize above.
4761 (overridingDefinitionInDependentDylib): New.
4762 (multipleDefinitionsInDylibs): Ditto.
4763 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
4764 (parse): Update comments. Fix parsing of -y option.
4765 Update error message for -dead_strip. Parse above
4768 2006-01-02 Nick Kledzik <kledzik@apple.com>
4770 * Refactor: move Atom::writeContent() to Writer
4772 2005-12-23 Nick Kledzik <kledzik@apple.com>
4774 * Reworked, simplify, and document test harness
4775 * unit-tests/README: Added
4777 2005-12-23 Nick Kledzik <kledzik@apple.com>
4779 * src/MachOReaderRelocatable.hpp: fixes for Objective-C
4780 * unit-tests/test-cases/relocs-objc: Added
4782 2005-12-22 Nick Kledzik <kledzik@apple.com>
4784 * src/MachOReaderRelocatable.hpp: fix check that next reloc is pair
4785 * src/MachOReaderRelocatable.hpp: Add code to synthesize essential stabs from dwarf
4787 2005-12-21 Nick Kledzik <kledzik@apple.com>
4789 * src/MachOReaderRelocatable.hpp: Fix parsing of literal sections
4790 * src/MachOWriterExecutable.hpp: Fix writing of literal sections
4791 * unit-tests/test-cases/relocs-literals: Added
4793 2005-12-15 Eric Christopher <echristo@apple.com>
4795 * src/Options.h (enum Treatment): New.
4796 (enum PICTreatment): Delete.
4797 (enum VersionMin): New.
4799 (macosxVersionMin): Ditto.
4800 (multiplyDefined): Ditto.
4801 (multiplyDefinedUnused): Ditto.
4802 (setVersionMin): Ditto.
4803 (setPICTreatment): Delete.
4804 (setReadOnlyRelocTreatment): Ditto.
4805 (picTreatment): Adjust return type.
4806 (parseTreatment): New.
4808 (fVersionMin): Ditto.
4809 (fPICTreatment): Change type.
4810 (fMultiplyDefined): New.
4811 (fMultiplyDefinedUnused): Ditto.
4812 (fLimitUndefinedSymbols): Ditto.
4814 * src/Options.cpp: Fix whitespace. Add comments on options.
4815 (Options::Options): Add initializers for new variables.
4816 (Options::prebind): New.
4817 (Options::macosxVersionMin): Ditto.
4818 (Options::parseTreatment): Ditto.
4819 (Options::setVersionMin): Ditto.
4820 (Options::setReadOnlyRelocTreatment): Delete.
4821 (Options::setPICTreatment): Ditto.
4822 (Options::Parse): Update for above. Add comments.
4824 2005-12-15 Nick Kledzik <kledzik@apple.com>
4826 * src/MachOReaderRelocatable.hpp: Add comments about dwarf
4828 2005-12-14 Nick Kledzik <kledzik@apple.com>
4830 * src/ELFFileAbstraction.hpp: Added
4831 * src/ELFReaderRelocatable.hpp: Added
4832 * Lot of fixes for new architecture
4833 * Added __OPEN_SOURCE__ to "Preprocessor Macros" to disable new architecture support by default
4835 2005-12-13 Nick Kledzik <kledzik@apple.com>
4837 * src/MachOReaderRelocatable.hpp: check for S_ATTR_DEBUG and ignore those sections
4838 * unit-tests/test-cases/dwarf-ignore: added
4840 2005-12-12 Nick Kledzik <kledzik@apple.com>
4842 * Added test harness and three initial tests:
4843 relocs-asm, relocs-c, and hello-world
4845 2005-12-12 Nick Kledzik <kledzik@apple.com>
4847 * src/MachOReaderRelocatable.hpp: Massive refactoring:
4848 Now there are three Atom classes, Chopping into Atoms
4849 is done on label boundaries or by knowledge of special
4850 sections, Share lots of ppc/ppc64 code.
4851 Stabs process code is temporarily disabled.
4853 2005-12-12 Nick Kledzik <kledzik@apple.com>
4855 * src/ObjectDump.cpp: Add command line options: -no_content, -stabs, -no_sort
4857 2005-12-11 Eric Christopher <echristo@apple.com>
4859 * src/Options.cpp: Reformat.
4860 * src/Options.h: Ditto.
4862 2005-12-07 Eric Christopher <echristo@apple.com>
4864 * src/MachOReaderRelocatable.hpp (Atom::getAlignment):
4865 When calculating alignment of an Atom, take into account
4866 the alignment from which we pulled the Atom.
4868 2005-12-06 Nick Kledzik <kledzik@apple.com>
4870 * src/Options.cpp src/Options.h: Add design comments
4872 2005-12-05 Eric Christopher <echristo@apple.com>
4874 * src/ld.cpp (Linker::createWriter): Uncomment ppc64 and
4877 2005-12-05 Eric Christopher <echristo@apple.com>
4879 * ChangeLog: New file.
4881 2005-12-02 Nick Kledzik <kledzik@apple.com>
4883 * src/ObjectFile.h: Add design comments
4885 2005-11-30 Nick Kledzik <kledzik@apple.com>
4887 * Fix uses of __OPEN_SOURCE__
4889 2005-11-28 Nick Kledzik <kledzik@apple.com>
4891 * Refactor Atom to use getDefinitionKind()
4893 2005-11-21 Nick Kledzik <kledzik@apple.com>
4895 * src/MachOWriterExecutable.hpp: don't generate section for commons in -r mode
4897 2005-11-18 Nick Kledzik <kledzik@apple.com>
4901 2005-11-18 Nick Kledzik <kledzik@apple.com>
4903 * src/ObjectDump.cpp: make work with command line arguments
4905 2005-11-18 Nick Kledzik <kledzik@apple.com>
4907 * Massive rework to remove preprocessor conditionals and use templates
4909 2005-11-14 Nick Kledzik <kledzik@apple.com>
4911 * Created new Subversion repository for ld64 from cvs tag ld64-27.2