2 ----- Tagged ld64-97.17
4 2010-09-07 Nick Kledzik <kledzik@apple.com>
6 <rdar://problem/7989734> ld mis-handling std::tr1::anonymous symbols
7 Remove support for ordering gcc-4.0 compiled anonymous namespace symbols
9 2010-09-07 Nick Kledzik <kledzik@apple.com>
11 <rdar://problem/8388362> RedGarnet's linker does not honor $ld$hide for umbrella libraries
13 ----- Tagged ld64-97.16
15 2010-08-10 Nick Kledzik <kledzik@apple.com>
17 <rdar://problem/8303976> add -demangle noop to ld64-97
19 ----- Tagged ld64-97.15
21 2010-08-10 Nick Kledzik <kledzik@apple.com>
23 <rdar://problem/8212744> linker crash when using LTO in lto::Atom::getSymbolTableInclusion()
25 ----- Tagged ld64-97.14
27 2010-04-20 Nick Kledzik <kledzik@apple.com>
29 <rdar://problem/7712869> if last section is zero-fill don't add size to filesize total in -r mode
31 ----- Tagged ld64-97.13
33 2010-03-17 Nick Kledzik <kledzik@apple.com>
35 <rdar://problem/7824112> Support for iPhoneSimulator with OBJC 2.0 ABI
38 ----- Tagged ld64-97.12
40 2010-03-17 Nick Kledzik <kledzik@apple.com>
42 <rdar://problem/7712869> if last section is zero-fill don't add size to filesize total in -r mode
44 ----- Tagged ld64-97.11
46 2010-01-26 Nick Kledzik <kledzik@apple.com>
48 <rdar://problem/7622634> Libc-624.1 causes latent ld bug
49 * build linker -no_pie
52 ----- Tagged ld64-97.10
54 2010-01-26 Nick Kledzik <kledzik@apple.com>
56 <rdar://problem/7556912> LC_SEGMENT command 0 filesize field greater than vmsize field
57 * Move __DATA to end in -r mode
60 2010-01-26 Nick Kledzik <kledzik@apple.com>
62 <rdar://problem/7516793> symboled __ustring strings of just 0x0000 mis-parsed
63 * Parse __ustring section based on content - not just labels
66 ----- Tagged ld64-97.9
68 2010-01-14 Nick Kledzik <kledzik@apple.com>
70 <rdar://problem/7532743> LC_SEGMENT command 0 filesize field greater than vmsize field
71 * for i386 -r mode sort __IMPORT segment before __DATA segment
74 2010-01-11 Nick Kledzik <kledzik@apple.com>
76 * fix ARM -r -d references to tentative definitions
78 ----- Tagged ld64-97.8
80 2009-12-08 Nick Kledzik <kledzik@apple.com>
82 <rdar://problem/7455147> many mach-o images in Barolo have MH_WEAK_DEFINES bit incorrectly set
83 * don't let auto-strip weak symbols set MH_WEAK_DEFINES
86 ----- Tagged ld64-97.7
88 2009-11-30 Nick Kledzik <kledzik@apple.com>
90 <rdar://problem/7429384> llvmgcc now puts const short arrays in __ustring section, linker does not handle that
91 * Only auto-coalesce UTF16 strings that are labeled with "___utf16_string*"
94 ----- Tagged ld64-97.6
96 2009-11-06 Nick Kledzik <kledzik@apple.com>
98 <rdar://problem/7332627> make -pie default for x86_64 for 10.7 and later
101 2009-10-28 Nick Kledzik <kledzik@apple.com>
103 <rdar://problem/7331635> Add a -no_pie flag
104 * support -no_pie and LD_NO_PIE
107 ----- Tagged ld64-97.5
109 2009-10-27 Nick Kledzik <kledzik@apple.com>
111 <rdar://problem/7341117> crash when __ustring section has zero length string
112 * stop trying to suppress tailing 0x0000 from synthesized string used to coalese utf16 strings
115 ----- Tagged ld64-97.4
117 2009-10-21 Nick Kledzik <kledzik@apple.com>
119 <rdar://problem/7320293> missing thumb bit when thumb function takes address of itself
120 * move toao.atom == srcao.atom test to after fromao.atom == srcao.atom test
123 ----- Tagged ld64-97.3
125 2009-10-06 Nick Kledzik <kledzik@apple.com>
127 * Add missing LittleEndian::set32() in arm::kPointerDiff
129 2009-10-05 Nick Kledzik <kledzik@apple.com>
131 <rdar://problem/7268427> ARM: handle pointer-diff to weak thumb that is overridden by non-weak ARM
132 * When parsing ARM relocations, if target is a thumb function, remove one from addend
133 * When writing out content for arm::kPointerDiff, add one if target is thumb
134 * When writing ARM_RELOC_SECTDIFF, use target offsets if they fit in function
137 ----- Tagged ld64-97.2
139 2009-09-25 Nick Kledzik <kledzik@apple.com>
141 <rdar://problem/7200658> 'unknown DWARF EH encoding' message logged to console with clang-50
144 ----- Tagged ld64-97.1
146 2009-07-28 Nick Kledzik <kledzik@apple.com>
148 <rdar://problem/7099040> make better no-PIC branch island to thumb1
149 * Add kBranchIslandNoPicToThumb1 as 8-byte no-PIC island
152 2009-07-20 Nick Kledzik <kledzik@apple.com>
154 <rdar://problem/7075703> section$start$__DATA$__bss can fail
155 * In SectionBoundaryAtom constructor make __bss and __common be zero-fill
156 * In AtomSorter, make sure end kSectionEnd sort after kTentativeDefinition
157 * unit-tests/test-cases/section-labels-zero-fill: add test cases
162 2009-07-13 Nick Kledzik <kledzik@apple.com>
164 <rdar://problem/7049478> empty dylib should have subtype from command line
165 In Linker::writeOutput() for ARM, set initial fCurrentCpuConstraint to be command line subtype
168 2009-07-09 Nick Kledzik <kledzik@apple.com>
170 <rdar://problem/7043920> crash when using -dead_strip and LTO with unresolved intrinsic
171 * In Linker::optimize() after final deadStripResolve() call checkUndefines() one last time
174 2009-07-09 Nick Kledzik <kledzik@apple.com>
176 <rdar://problem/7043256> ld64 can not find a -e entry point from an archive
177 * src/ld/ld.cpp: add searchArchives parameter to entryPoint() for use by deadStripResolve()
178 * unit-tests/test-cases/dead_strip-entry-archive: added test case
181 2009-07-08 Nick Kledzik <kledzik@apple.com>
183 <rdar://problem/6702217> __objc_classrefs section could be coalesced
184 * In machoReader, chop up __objc_classrefs section into pointer size atoms
185 and make each weak and hidden with a name based on its target name.
188 2009-06-26 Nick Kledzik <kledzik@apple.com>
190 <rdar://problem/6715874> "ld: symbol dyld_stub_binding_helper not defined" for xnu built with clang for x86_64
191 * Fix relocationNeededInFinalLinkedImage() to say weak-defs don't require indirection in static executables
192 * Added unit-tests/test-cases/static-executable-weak-defines
195 2009-06-26 Nick Kledzik <kledzik@apple.com>
197 <rdar://problem/7012016> Error msg for missing -init symbol is misleading/unclear
198 * In Linker::checkUndefines() check all ways that the command line could add an undefined
199 and then search for close matches/typos.
202 2009-06-25 Nick Kledzik <kledzik@apple.com>
204 <rdar://problem/5725900> We need ld-symbol-moving-symbols for ARM/Embedded
205 * In mach_o::dylib::Reader::addSymbol() parse iPhoneOS version strings
206 * Update IPhoneVersionMin
209 2009-06-25 Nick Kledzik <kledzik@apple.com>
211 <rdar://problem/6933931> Linker makes subtype-zero file from empty subtype-nonzero file.
212 * In Linker::writeOutput() set inittal fCurrentCpuConstraint to be command line subtype
213 * Fix fArchitectureName to have arm sub-types
216 2009-06-24 Nick Kledzik <kledzik@apple.com>
218 <rdar://problem/6955021> ld should do a better job of reporting attempts to link directories
219 * In Options::buildSearchPaths() sanity check -L and -F options
222 2009-06-24 Nick Kledzik <kledzik@apple.com>
224 <rdar://problem/6974647> better error message when libLTO.dylib not loadable
225 * in Linker::createReader() provide detail error messages
228 ----- Tagged ld64-96.10
230 2009-08-31 Nick Kledzik <kledzik@apple.com>
232 <rdar://problem/7182988> empty dylib has been __mh_dylib_header n_sect
233 * rework patch to use MinimalTextAtom to ensure there is always a __text section
236 ----- Tagged ld64-96.9
238 2009-08-31 Nick Kledzik <kledzik@apple.com>
240 <rdar://problem/7182988> empty dylib has been __mh_dylib_header n_sect
241 * suppress __mh_dylib_header from symbol table if there is no __text section
243 Implicitly add dyld_stub_binder to libSystem.dylib so iPhone clients can build
244 against SnowLeopard libSystem.dylib.
247 ----- Tagged ld64-96.8
249 2009-08-30 Nick Kledzik <kledzik@apple.com>
251 <rdar://problem/7049478> SWB: gcc-5577.1 fails to build vecLib
254 ----- Tagged ld64-96.7
256 2009-08-29 Nick Kledzik <kledzik@apple.com>
258 <rdar://problem/6933931> Linker makes subtype-zero file from empty subtype-nonzero file.
261 ----- Tagged ld64-96.6
263 2009-07-30 Nick Kledzik <kledzik@apple.com>
265 <rdar://problem/7103437> ld: ldr 12-bit displacement out of range on SnowLeopard with gcc-5648
266 * in Section::Section() set fIndex to ensure __symbolstub1 sorts to end of __TEXT segment
269 ----- Tagged ld64-96.5
271 2009-07-28 Nick Kledzik <kledzik@apple.com>
273 <rdar://problem/7073626> Thumb mode compilation isn't working on 3.1 beta 2
274 * Fix instructions used in kBranchIslandToThumb1 case
277 ----- Tagged ld64-96.4
279 2009-06-22 Nick Kledzik <kledzik@apple.com>
281 <rdar://problem/6992387> platform linker should use platform ld_classic
282 * Fix Options::gotoClassicLinker() to use realpath()s
285 2009-06-22 Nick Kledzik <kledzik@apple.com>
287 * Fix Options::setIPhoneVersionMin() to handle 2.x through 9.x
290 ----- Tagged ld64-96.3
292 2009-06-17 Nick Kledzik <kledzik@apple.com>
294 * Change section sorting so that arm and ppc stub section is immediately after __text section
297 2009-06-17 Nick Kledzik <kledzik@apple.com>
299 <rdar://problem/6975041> don't use no-PIC stubs in any dylibs - it might conflict with codesigning
300 * In StubAtom<arm>::StubAtom() don't use kStubNoPIC for OS dylibs
303 ----- Tagged ld64-96.2
305 2009-06-09 Nick Kledzik <kledzik@apple.com>
307 * Back out page-cross branch work around
310 ----- Tagged ld64-96.1
312 2009-06-05 Nick Kledzik <kledzik@apple.com>
314 * Fix "duplicate symbol cache-line-crossing-stub" error by giving placeholders unique names
315 * Fix -pie by allowing relocs in x86 stubs and stub helpers
320 2009-06-04 Nick Kledzik <kledzik@apple.com>
322 * Darwin x86_64 static codegen is really dynamic code gen, so use LTO_CODEGEN_PIC_MODEL_DYNAMIC
325 2009-06-03 Nick Kledzik <kledzik@apple.com>
327 <rdar://problem/6945923> use lto_codegen_set_assembler_path()
330 2009-06-03 Nick Kledzik <kledzik@apple.com>
332 * In src/ld/LTOReader.hpp, move where -save-temps .bc file is saved to be after code model set
335 2009-06-01 Nick Kledzik <kledzik@apple.com>
337 <rdar://problem/6806033> Link Time Optimization error with 'dead code strip' + hidden symbol
338 * scan newAtoms returned from optimize() looking for ones already in the symbol table
339 * add test case unit-tests/test-cases/lto-dead_strip-all-hidden
342 2009-05-19 Nick Kledzik <kledzik@apple.com>
344 <rdar://problem/6881656> make dyld stubs smaller/faster
345 * Add new addSynthesizedAtoms() method to Writer, called before atoms are sorted
346 * Fix throwf() and warning() to check printf types
347 * Add arm::kPointerDiff12 to support fast arm stubs
348 * Add new ContentType values for stubs and (non)lazy pointers
349 * Add new variant of arm stub this is one instruction
352 2009-05-13 Nick Kledzik <kledzik@apple.com>
354 * ld64.xcodeproj/project.pbxproj: add warnings to dyldinfo target
355 * src/other/dyldinfo.cpp: support classic LINKEDIT format
358 2009-05-12 Nick Kledzik <kledzik@apple.com>
360 * src/ld/MachOWriterExecutable.hpp: fix optimization to skip branch islands with ARM bl instructions
363 2009-05-12 Nick Kledzik <kledzik@apple.com>
365 <rdar://problem/6836647> creation of __unwind_info section can fail if hundreds of functions cannot be compact encoded
366 * src/ld/MachOWriterExecutable.hpp: fix when to make regular vs compressed pages
369 2009-05-08 Nick Kledzik <kledzik@apple.com>
371 * src/ld/ld.cpp: enhance -save-temps to also write out optimized bitcode file
374 2009-05-08 Nick Kledzik <kledzik@apple.com>
376 * src/ld/ld.cpp: fix -order_file_statistics to print each symbol not found and correct total
379 2009-05-08 Nick Kledzik <kledzik@apple.com>
381 <rdar://problem/6870522> linker should be able to coalesce UTF16 strings
382 * src/ld/MachOReaderRelocatable.hpp: parse __ustring section by labels but synthesize an
383 atom name based on the content. Leverage for __cfstring section
384 * unit-tests/test-cases/cfstring-utf16: update test case
387 2009-05-07 Nick Kledzik <kledzik@apple.com>
389 * src/ld/MachOWriterExecutable.hpp: put branch islands further apart if there is no thumb code
392 2009-05-07 Nick Kledzik <kledzik@apple.com>
394 <rdar://problem/6331300> LINKEDIT optimizations for iPhone
395 * src/ld/ObjectFile.h: Recognize iPhoneOS 3.1
396 * src/ld/Options.cpp: iPhoneOS 3.1 => use compressed LINKEDIT
397 * src/ld/MachOWriterExecutable.hpp: support generating compressed LINKEDIT for arm
400 2009-05-04 Nick Kledzik <kledzik@apple.com>
402 <rdar://problem/5716715> Add linker support for ARM branch islands
403 <rdar://problem/5253691> Add labels to linker synthesized jump islands
404 * src/ld/MachOWriterExecutable.hpp: reworked BranchIslandAtom and createBranchIslands to support arm/thumb
405 * src/ld/ObjectFile.h: added kBranchIsland
406 * unit-tests/test-cases/branch-islands: updated test case to check arm/thumb
409 2009-04-30 Nick Kledzik <kledzik@apple.com>
411 * src/ld/Options.cpp: fix custom stack base address for arm
414 2009-04-30 Nick Kledzik <kledzik@apple.com>
416 <rdar://problem/6818272> likely incorrect warning about common symbols
417 * src/ld/Options.cpp: ignore LD_WARN_COMMONS in -r mode
420 ----- Tagged ld64-95.8.3
422 2009-03-31 Nick Kledzik <kledzik@apple.com>
424 <rdar://problem/6719270> ld might set MH_WEAK_DEFINES when it should not
425 * src/ld/MachOWriterExecutable.hpp: rescan fRegularDefAtomsThatOverrideADylibsWeakDef and only consider global ones
428 ----- Tagged ld64-95.8.2
430 2009-03-18 Nick Kledzik <kledzik@apple.com>
432 * src/ld/MachOReaderRelocatable.hpp: back out -force_cpusubtype_ALL changes
435 ----- Tagged ld64-95.8.1
437 2009-03-17 Nick Kledzik <kledzik@apple.com>
439 <rdar://problem/6578416> -dead_strip inhibits weak coalescing in no_dead_strip section
440 * src/ld/ld.cpp: in markDead() remove from fLiveRootAtoms
443 2009-03-17 Nick Kledzik <kledzik@apple.com>
445 <rdar://problem/6671072> libgcc fails to build in with ld64-95.8
446 * src/ld/MachOReaderRelocatable.hpp: interpret CPU_SUBTYPE_ARM_ALL as CPU_SUBTYPE_ARM_V4T
447 * src/ld/Options.cpp: interept -force_cpusubtype_ALL as -arch armv4t
450 ----- Tagged ld64-95.8
452 2009-02-09 Nick Kledzik <kledzik@apple.com>
454 <rdar://problem/6569316> ld64-95.7 crashes building Foundation-678.39 in side build
455 * src/ld/MachOReaderRelocatable.hpp: handle a zero length section with a label before __cstring section
458 ----- Tagged ld64-95.7
460 2009-02-06 Nick Kledzik <kledzik@apple.com>
462 * src/ld/ObjectFile.h: make fAddCompactUnwindEncoding false by default
465 2009-02-06 Nick Kledzik <kledzik@apple.com>
467 <rdar://problem/6537210> ER: add linker option to zero fill empty DATA sections on disk
468 * src/ld/Options.cpp: add support for -no_zero_fill_sections
469 * src/ld/MachOReaderRelocatable.hpp: isZeroFill() is only true if fOptimizeZeroFill
470 * doc/man/man1/ld.1: document -no_zero_fill_sections
471 * unit-tests/test-cases/no_zero_fill_sections: add test case
474 2009-02-05 Nick Kledzik <kledzik@apple.com>
476 <rdar://problem/6497366> label getting resolved to the wrong address.
477 * src/ld/MachOWriterExecutable.hpp: add findAtomAndOffsetForSection() and use it to disambiguate
478 * unit-tests/test-cases/label-on-end-of-section: added test case
481 2009-01-27 Nick Kledzik <kledzik@apple.com>
483 <rdar://problem/6517393> Warn -force_cpusubtype_ALL is not supported
484 * src/ld/Options.cpp: warn if fForceSubtypeAll and fArchitecture is CPU_TYPE_ARM
487 ----- Tagged ld64-95.6
489 2009-01-25 Nick Kledzik <kledzik@apple.com>
491 <rdar://problem/6439020> Add support for section start/end labels
492 * src/ld/ObjectFile.h: add kSectionStart and kSectionEnd
493 * src/ld/MachOReaderRelocatable.hpp: create SectionBoundaryAtoms as needed
494 * src/ld/ld.cpp: sort SectionBoundaryAtoms correctly
495 * src/ld/MachOWriterExecutable.hpp: allow all relocations in preload images
498 ----- Tagged ld64-95.5
500 2009-01-15 Nick Kledzik <kledzik@apple.com>
502 * src/ld/MachOWriterExecutable.hpp: in hasPageCrossingBranches() ignore branches preceeded by a branch
505 ----- Tagged ld64-95.4
507 2009-01-15 Nick Kledzik <kledzik@apple.com>
509 * src/ld/Options.cpp: handle -kext and -r the same for fPreventPageCrossingBranches
512 ----- Tagged ld64-95.3
514 2009-01-14 Nick Kledzik <kledzik@apple.com>
516 <rdar://problem/6497574> linker should alter layout to prevent armv7 page crossing branches
517 * src/ld/Options.cpp: set fPreventPageCrossingBranches
518 * src/ld/MachOWriterExecutable.hpp: adjust layout of __text so there are not page crossing branches
519 * src/ld/MachOReaderRelocatable.hpp: support new ARM_THUMB_32BIT_BRANCH reloce
522 ----- Tagged ld64-95.2.10
524 2009-04-02 Nick Kledzik <kledzik@apple.com>
526 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
527 * src/ld/ld.cpp: change Section constructor to copy segment and section names
530 ----- Tagged ld64-95.2.9
532 2009-04-02 Nick Kledzik <kledzik@apple.com>
534 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
535 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
538 ----- Tagged ld64-95.2.8
540 2009-03-24 Nick Kledzik <kledzik@apple.com>
542 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
543 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
546 ----- Tagged ld64-95.2.7
548 2009-03-11 Nick Kledzik <kledzik@apple.com>
550 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
551 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
552 that is already explictly or implicitly linked.
553 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
556 2009-03-10 Nick Kledzik <kledzik@apple.com>
558 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
559 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
560 to a symbol in a dylib that is a weak definition
561 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
564 2009-03-10 Nick Kledzik <kledzik@apple.com>
566 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
567 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
568 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
571 ----- Tagged ld64-95.2.6
573 2009-02-27 Nick Kledzik <kledzik@apple.com>
575 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
576 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
577 that will be exported when computing MH_WEAK_DEFINES
578 * unit-tests/test-cases/operator-new: updated to reproduce issue
581 ----- Tagged ld64-95.2.5
583 2009-02-24 Nick Kledzik <kledzik@apple.com>
585 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
586 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
587 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
590 ----- Tagged ld64-95.2.4
592 2009-02-23 Nick Kledzik <kledzik@apple.com>
594 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
597 2009-02-18 Nick Kledzik <kledzik@apple.com>
599 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
600 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
603 2009-02-18 Nick Kledzik <kledzik@apple.com>
605 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
606 * src/ld/Architectures.hpp: add kSectionOffset24
607 * src/ld/ObjectFile.h: add getFDE()
608 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
609 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
610 * src/other/unwinddump.cpp: update unwinddump output to display register save set
613 2009-02-16 Nick Kledzik <kledzik@apple.com>
615 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
616 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
619 2009-02-15 Nick Kledzik <kledzik@apple.com>
621 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
622 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
623 * unit-tests/test-cases/relocs-neg-from-local: add test case
626 2009-02-12 Nick Kledzik <kledzik@apple.com>
628 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
629 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
630 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
633 2009-02-12 Nick Kledzik <kledzik@apple.com>
635 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
636 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
637 * src/other/dyldinfo.cpp: update to display weak_import attribute
638 * unit-tests/test-cases/weak_import: updated test case
641 2009-02-06 Nick Kledzik <kledzik@apple.com>
643 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
644 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
647 ----- Tagged ld64-95.2.3
649 2009-02-04 Nick Kledzik <kledzik@apple.com>
651 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
652 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
655 ----- Tagged ld64-95.2.2
657 2009-02-02 Nick Kledzik <kledzik@apple.com>
659 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
660 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
661 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
664 ----- Tagged ld64-95.2.1
666 ----- Tagged ld64-95.2.10
668 2009-04-02 Nick Kledzik <kledzik@apple.com>
670 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
671 * src/ld/ld.cpp: change Section constructor to copy segment and section names
674 ----- Tagged ld64-95.2.9
676 2009-04-02 Nick Kledzik <kledzik@apple.com>
678 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
679 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
682 ----- Tagged ld64-95.2.8
684 2009-03-24 Nick Kledzik <kledzik@apple.com>
686 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
687 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
690 ----- Tagged ld64-95.2.7
692 2009-03-11 Nick Kledzik <kledzik@apple.com>
694 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
695 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
696 that is already explictly or implicitly linked.
697 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
700 2009-03-10 Nick Kledzik <kledzik@apple.com>
702 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
703 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
704 to a symbol in a dylib that is a weak definition
705 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
708 2009-03-10 Nick Kledzik <kledzik@apple.com>
710 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
711 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
712 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
715 ----- Tagged ld64-95.2.6
717 2009-02-27 Nick Kledzik <kledzik@apple.com>
719 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
720 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
721 that will be exported when computing MH_WEAK_DEFINES
722 * unit-tests/test-cases/operator-new: updated to reproduce issue
725 ----- Tagged ld64-95.2.5
727 2009-02-24 Nick Kledzik <kledzik@apple.com>
729 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
730 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
731 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
734 ----- Tagged ld64-95.2.4
736 2009-02-23 Nick Kledzik <kledzik@apple.com>
738 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
741 2009-02-18 Nick Kledzik <kledzik@apple.com>
743 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
744 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
747 2009-02-18 Nick Kledzik <kledzik@apple.com>
749 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
750 * src/ld/Architectures.hpp: add kSectionOffset24
751 * src/ld/ObjectFile.h: add getFDE()
752 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
753 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
754 * src/other/unwinddump.cpp: update unwinddump output to display register save set
757 2009-02-16 Nick Kledzik <kledzik@apple.com>
759 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
760 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
763 2009-02-15 Nick Kledzik <kledzik@apple.com>
765 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
766 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
767 * unit-tests/test-cases/relocs-neg-from-local: add test case
770 2009-02-12 Nick Kledzik <kledzik@apple.com>
772 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
773 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
774 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
777 2009-02-12 Nick Kledzik <kledzik@apple.com>
779 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
780 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
781 * src/other/dyldinfo.cpp: update to display weak_import attribute
782 * unit-tests/test-cases/weak_import: updated test case
785 2009-02-06 Nick Kledzik <kledzik@apple.com>
787 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
788 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
791 ----- Tagged ld64-95.2.3
793 2009-02-04 Nick Kledzik <kledzik@apple.com>
795 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
796 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
799 ----- Tagged ld64-95.2.2
801 2009-02-02 Nick Kledzik <kledzik@apple.com>
803 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
804 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
805 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
808 ----- Tagged ld64-95.2.1
810 2009-01-29 Nick Kledzik <kledzik@apple.com>
812 <rdar://problem/6532377> gcc DejaGnu failure: building longcall/dylib library
813 * src/ld/MachOWriterExecutable.hpp: if no __DATA sections insert non-lazy pointers at end of __TEXT segment
814 * unit-tests/test-cases/no-data-bundle: added test case
817 ----- Tagged ld64-95.2
819 2009-01-06 Nick Kledzik <kledzik@apple.com>
821 <rdar://problem/6476760> strip -S fails with "new trie is larger than original"
822 * src/other/PruneTrie.cpp: don't align trie more than original trie was aligned
825 ----- Tagged ld64-95.1
827 2008-12-21 Nick Kledzik <kledzik@apple.com>
829 * src/ld/MachOWriterExecutable.hpp: in new linkedit format, make sure only exported symbols
830 make it into weak binding info
835 2008-12-18 Nick Kledzik <kledzik@apple.com>
837 * src/ld/Options.cpp: move check for fSharedRegionEligible until fPrebind has stabilized
840 2008-12-18 Nick Kledzik <kledzik@apple.com>
842 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
843 * src/ld/Options.cpp: turn on compressed LINKEDIT by default
846 ----- Tagged ld64-94.1
848 2008-12-16 Nick Kledzik <kledzik@apple.com>
850 * src/ld/Options.cpp: Fix -F handling in buildSearchPaths()
855 2008-12-15 Nick Kledzik <kledzik@apple.com>
857 * doc/man/man1/ld.1: document new options
860 2008-12-15 Nick Kledzik <kledzik@apple.com>
862 <rdar://problem/6134468> linker should enforce all .o files have same sub-type, and ignore sub-type of dylibs
863 * doc/man/man1/ld.1: update man page about -allow_sub_type_mismatches
864 * src/ld/ld.cpp: call validFile() with new arguments
865 * src/ld/MachOReaderRelocatable.hpp: add new arguments to validFile()
866 * src/ld/Options.cpp: Support LD_ALLOW_CPU_SUBTYPE_MISMATCHES and -allow_sub_type_mismatches
869 2008-12-15 Nick Kledzik <kledzik@apple.com>
871 <rdar://problem/6438270> -syslibroot should skip standard search paths not in the SDK
872 * src/ld/Options.cpp: in buildSearchPaths() if an SDK is specified don't add
873 standard search paths not in the SDK.
876 2008-12-15 Nick Kledzik <kledzik@apple.com>
878 <rdar://problem/6406609> ld: remove "can't make compact unwind encoding" warning
879 * src/ld/ObjectFile.h: add fWarnCompactUnwind
880 * src/ld/Options.cpp: -warn_compact_unwind --> fWarnCompactUnwind
881 * src/ld/MachOReaderRelocatable.hpp: test fWarnCompactUnwind before warning
884 2008-12-15 Nick Kledzik <kledzik@apple.com>
886 <rdar://problem/6442926> Add dtrace usdt support for arm to ld64
887 * src/ld/MachOWriterExecutable.hpp: handle arm::kDtraceIsEnabledSite
888 * unit-tests/test-cases/dtrace-static-probes: use is-enabled in test case
893 2008-12-11 Nick Kledzik <kledzik@apple.com>
895 * src/ld/ObjectFile.h: add fIPhoneVersionMin to track min iPhoneOS version
896 * src/ld/Options.cpp: use fIPhoneVersionMin
899 2008-12-11 Nick Kledzik <kledzik@apple.com>
901 <rdar://problem/6431277> non-lazy pointer to non-global tentative definition encoded wrong
902 * src/ld/MachOWriterExecutable.hpp: don't use INDIRECT_SYMBOL_LOCAL for tentative definitions
903 * unit-tests/test-cases/non-lazy-r: updated test case
906 2008-12-11 Nick Kledzik <kledzik@apple.com>
908 <rdar://problem/6437667> kernel fails to boot when ld64 used for intermediate ld -r step
909 * src/ld/MachOWriterExecutable.hpp: in -r mode when generating a scattered sect-diff reloc for
910 i386/arm, special case when from target is not the atom
911 the relocation is in.
912 * unit-tests/test-cases/relocs-asm: update test case
915 2008-12-11 Nick Kledzik <kledzik@apple.com>
917 * src/ld/ld.cpp: handle new __program_vars section
918 * src/ld/MachOWriterExecutable.hpp: handle inserting synthesized sections when there is no __dyld section
921 2008-12-11 Nick Kledzik <kledzik@apple.com>
923 * src/ld/MachOReaderRelocatable.hpp: Fix getDescription() to work when direct reference is to anonymous atom
926 2008-12-10 Nick Kledzik <kledzik@apple.com>
928 * src/ld/Options.cpp: enable LD_FORCE_NO_PREBIND to be used with arm
931 2008-12-10 Nick Kledzik <kledzik@apple.com>
933 <rdar://problem/6258169> Developer tool to print the new compressed LINKEDIT information
934 * src/other/dyldinfo.cpp: fix typo in usage()
937 2008-12-05 Nick Kledzik <kledzik@apple.com>
939 <rdar://problem/6308882> SnowLeopard kernel should compile warning free
940 * src/ld/MachOReaderRelocatable.hpp: correct parse two global labels at end of section and make one an alias
941 * unit-tests/test-cases/end-label: update test case
944 2008-12-04 Nick Kledzik <kledzik@apple.com>
946 <rdar://problem/6342245> Better warning than "PPC_RELOC_JBSR should not be using an external relocation"
947 * src/ld/MachOReaderRelocatable.hpp: issue warning with .o path if it was compiled with -mlong-branch
950 2008-12-04 Nick Kledzik <kledzik@apple.com>
952 <rdar://problem/6408832> linker should not map __pointers -> __nl_symbol_ptr unless actually making new LINKEDIT
953 * src/ld/ObjectFile.h: add fMakeCompressedDyldInfo for readers to see
954 * src/ld/Options.cpp: set fMakeCompressedDyldInfo for readers to see
955 * src/ld/MachOReaderRelocatable.hpp: check fMakeCompressedDyldInfo
958 2008-12-02 Nick Kledzik <kledzik@apple.com>
960 * src/ld/debugline.c: fix error handling in line_open()
963 2008-11-26 Nick Kledzik <kledzik@apple.com>
965 <rdar://problem/6401277> vtable with thumb entries broke after ld -r
966 * src/ld/MachOReaderRelocatable.hpp: if target of reloc is thumb, mask thumb bit off addend
967 * unit-tests/test-cases/thumb-pointer: added test case
970 2008-11-26 Nick Kledzik <kledzik@apple.com>
972 * src/ld/Option.cpp: Fix how crashreporterBuffer is created to not miss some arguments
975 2008-11-24 Nick Kledzik <kledzik@apple.com>
977 <rdar://problem/6398605> Security.framework has some duplicate FDEs for some functions
978 * src/ld/ld.cpp: remove fDeadAtoms from fLiveAtoms when there are weak atoms overriden by late loads
979 * unit-tests/test-cases/dead_strip-archive-eh: added test case
984 2008-11-21 Nick Kledzik <kledzik@apple.com>
986 * src/ld/MachOReaderDylib.hpp: if export_size is zero, no need to parse trie
987 * src/abstraction/MachOTrie.hpp: gracefully handle empty trie
990 2008-11-21 Nick Kledzik <kledzik@apple.com>
992 <rdar://problem/6257854> strip(1) support for new compressed LINKEDIT information
993 * ld64.xcodeproj/project.pbxproj: build and install new libprunetrie.a
994 * src/other/prune_trie.h: added
995 * src/other/PruneTrie.cpp: implements prune_trie()
998 2008-11-21 Nick Kledzik <kledzik@apple.com>
1000 * src/ld/ld.cpp: if an export file is used and all weak symbols are masked, don't set WEAK_DEFINES
1001 * unit-tests/test-cases/weak-def-flag: added test case
1004 2008-11-20 Nick Kledzik <kledzik@apple.com>
1006 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
1007 * src/ld/MachOWriterExecutable.hpp: support generating new compressed format
1008 * src/ld/MachOReaderRelocatable.hpp: new compress format implies non-lazy pointers in __DATA for i386
1009 * src/ld/MachOReaderDylib.hpp: support linking aginst new format
1010 * src/ld/Options.cpp: suppport -exported_symbols_order and -no_compact_linkedit
1011 * src/ld/ld.cpp: track which atoms have weak counter parts in dylibs
1012 * src/other/dyldinfo.cpp: added tool to display new LINKEDIT format
1013 * ld64.xcodeproj/project.pbxproj: add dyldinfo tool
1014 * unit-tests/*: lots of fixes to work with new format
1017 2008-11-20 Nick Kledzik <kledzik@apple.com>
1019 <rdar://problem/6389316> ld64 should preserve N_WEAK_REF when linking MH_KEXT_BUNDLEs
1020 * src/ld/MachOWriterExecutable.hpp: set up fWeakImportMap in synthesizeKextGOT()
1023 2008-11-19 Nick Kledzik <kledzik@apple.com>
1025 <rdar://problem/6342406> VideoToolbox.framework has bad __TEXT.__eh_frame info
1026 * src/ld/Options.cpp: add -no_eh_labels option for use with -r
1027 * src/ld/MachOWriterExecutable.hpp: generate correct x86_64 labeless relocs in -r mode
1028 * src/ld/MachOReaderRelocatable.hpp: now ignore all labels and relocations in
1029 __TEXT/__eh_frame section and rely on getCFIs() from libunwind
1030 * unit-tests/test-cases/eh-coalescing-no-labels: add test case
1033 2008-11-19 Nick Kledzik <kledzik@apple.com>
1035 <rdar://problem/6378110> LTO doesn't like dtrace symbols
1036 * src/ld/LTOReader.hpp: ignore __dtrace_probe undefines in bitcode files
1039 2008-11-14 Nick Kledzik <kledzik@apple.com>
1041 * src/abstraction/MachOFileAbstraction.hpp: fix to work with 10.5 headers
1044 ----- Tagged ld64-91
1046 2008-11-07 Nick Kledzik <kledzik@apple.com>
1048 Remove COMPACT_UNWIND_SUPPORT conditionalizing
1051 2008-11-06 Nick Kledzik <kledzik@apple.com>
1053 Reorganize source layout. ld sources are now in "ld",
1054 and other tools are in "other".
1057 2008-11-05 Nick Kledzik <kledzik@apple.com>
1059 * ld64.xcodeproj/project.pbxproj: start installing unwinddump tool
1060 * src/UnwindDump.cpp: support -arch option
1061 * doc/man/man1/unwinddump.1: create man page
1064 2008-11-05 Nick Kledzik <kledzik@apple.com>
1066 <rdar://problem/6337329> linker should put cpusubtype in n_sect field of nlist entry for N_OSO debug note entries
1067 * src/ld.cpp: in synthesizeDebugNotes() set other field of OSO to be subtype
1070 2008-11-05 Nick Kledzik <kledzik@apple.com>
1072 <rdar://problem/3738966> Need a linker option to load all objects from one library
1073 * src/Options.cpp: support -force_load option
1074 * src/ArchiveReader.hpp: Add fForceLoad ivar
1075 * doc/man/man1/ld.1: update man page with -force_load option
1076 * unit-tests/test-cases/archive-force-load: add test case
1079 2008-11-05 Nick Kledzik <kledzik@apple.com>
1081 <rdar://problem/6308882> Dtrace Probe Warnings: SnowLeopard kernel should compile warning free
1082 * src/ld.cpp: don't generate GSYM stabs for old style __dtrace_probe
1083 * src/MachOReaderRelocatable.hpp: fix test for deciding if a symbol is an alias
1086 2008-11-04 Nick Kledzik <kledzik@apple.com>
1088 <rdar://problem/6294378> ADOBE: XCODE: ld: duplicate typeinfo in executable
1089 * src/ld.cpp: in dead-strip mode, record overriden symbols and later rebind all uses
1090 * unit-tests/test-cases/dead_strip-archive-weak: add test case
1093 2008-11-03 Nick Kledzik <kledzik@apple.com>
1095 <rdar://problem/6254202> support increased branch range in Thumb-2
1096 * src/MachOReaderRelocatable.hpp: handle full branch range in addRelocReference()
1097 * unit-tests/test-cases/branch-distance: added test case
1099 2008-10-31 Devang Patel <dpatel@apple.com>
1101 <rdar://problem/5725712> Sqlite 3.5.4 built with lvm-gcc-4.2 -O4 fails regression test
1102 * src/LTOReader.hpp: Use real atom scope when real atom is available.
1103 Preserve globals while optimizing an executable.
1105 2008-10-30 Nick Kledzik <kledzik@apple.com>
1107 * src/MachOReaderRelocatable.hpp: support all encodings in getEncodedP()
1110 ----- Tagged ld64-90
1112 2008-10-30 Nick Kledzik <kledzik@apple.com>
1114 <rdar://problem/6327584> icc has dwarf unwind info that is different than gcc
1115 * src/MachOReaderRelocatable.hpp: support more encodings in getEncodedP()
1118 2008-10-23 Nick Kledzik <kledzik@apple.com>
1120 <rdar://problem/6088653> build ld64 for x86_64
1121 * ld64.xcodeproj/project.pbxproj: add X86_64 to valid archs
1124 2008-10-23 Nick Kledzik <kledzik@apple.com>
1126 * ld64.xcodeproj/project.pbxproj: use generated @$(DERIVED_FILE_DIR)/linker_opts for extra
1127 linker options. This allows linker to be built if LTO headers and libs are missing.
1130 2008-10-23 Nick Kledzik <kledzik@apple.com>
1132 <rdar://problem/6273617> Linker warning not shown in the Xcode build log
1133 * src/Options.cpp: add colon to format string in warning()
1136 ----- Tagged ld64-89.3
1138 2008-10-24 Nick Kledzik <kledzik@apple.com>
1140 <rdar://problem/6317985> ld64-89 broke TOT OpenGL libProgrammability x86_64 build
1141 * src/MachOReaderRelocatable.hpp: add cast in getEncodedP()
1144 ----- Tagged ld64-89.2
1146 2008-10-23 Nick Kledzik <kledzik@apple.com>
1148 <rdar://problem/6312895> SnowLeopard: Libsystem built with ld64-89.1 causes crashes
1149 * src/MachOReaderRelocatable.hpp: when FDE information causes __text atom to be split, make the
1150 atoms follow-on pairs.
1153 ----- Tagged ld64-89.1
1155 2008-10-22 Nick Kledzik <kledzik@apple.com>
1157 * src/MachOReaderRelocatable.hpp: for x86_64 __eh_frame force direct references
1160 2008-10-21 Nick Kledzik <kledzik@apple.com>
1162 * src/ObjectDump.cpp: Use getContentType() to see if content type is a cstring
1165 ----- Tagged ld64-89
1167 2008-10-21 Nick Kledzik <kledzik@apple.com>
1169 <rdar://problem/6253171> 10A180 with QT-1119 roots: iTunes and QuickTime cannot play back purchased videos
1170 <rdar://problem/5950453> linker should not need .eh labels
1171 * src/MachOWriterExecutable.hpp: use kCFIType to set section attributes
1172 * src/MachOReaderRelocatable.hpp: use libunwind's CFITuple to parse __eh_frame content
1173 * src/ld.cpp: Add adjustScope() phase instead of demoting scope within symboltable.add()
1174 * unit-tests/test-cases/eh-stripped-symbols: added test case
1177 ----- Tagged ld64-88.1
1179 2008-10-16 Nick Kledzik <kledzik@apple.com>
1181 * src/MachOReaderRelocatable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
1182 * src/MachOWriterExecutable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
1185 2008-09-30 Nick Kledzik <kledzik@apple.com>
1187 <rdar://problem/6255983> OBJC2: Reorder __DATA,__objc_* sections by writedness
1188 * src/ld.cpp: change sorting order of Sections
1191 2008-09-29 Nick Kledzik <kledzik@apple.com>
1193 <rdar://problem/6159479> Executable produced by XCode 3.2 on 10.6 crashes on 10.3.9
1194 * src/MachOWriterExecutable.hpp: set objc_module_info_addr field of module table
1197 ----- Tagged ld64-88
1199 2008-09-25 Nick Kledzik <kledzik@apple.com>
1201 <rdar://problem/5935708> kexts need to be built as MH_BUNDLE mach-o files
1202 * src/ld.cpp: use getUndefinedProxyAtom() with kKextBundle
1203 * src/MachOFileAbstraction.hpp: add MH_KEXT_BUNDLE
1204 * src/Options.cpp: support -kext for all architectures
1205 * src/MachOWriterExecutable.hpp: support kKextBundle to make a bundle like kext
1206 * unit-tests/test-cases/kext-basic: added test case
1209 2008-09-25 Nick Kledzik <kledzik@apple.com>
1211 <rdar://problem/6052546> ld invoking wrong ld_classic
1212 * src/Options.cpp: first look for ld_classic relative to ld itself
1215 2008-09-25 Nick Kledzik <kledzik@apple.com>
1217 <rdar://problem/5855588> ld fails to link references from 32 bit code into 64 bit code
1218 <rdar://problem/5955200> Desired 32-bit absolute relocation
1219 * src/Architectures.hpp: add x86_64::kPointer32
1220 * src/MachOReaderRelocatable.hpp: support X86_64_RELOC_UNSIGNED with length=2
1221 * src/MachOWriterExecutable.hpp: support x86_64::kPointer32
1222 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added 32-bit pointer tests
1225 2008-09-25 Nick Kledzik <kledzik@apple.com>
1227 <rdar://problem/6075323> Should be able to mark dylibs as auto-dead-dylib-strip
1228 * src/Options.h: add fMarkDeadStrippableDylib
1229 * src/MachOReaderDylib.hpp: check MH_DEAD_STRIPPABLE_DYLIB
1230 * src/ObjectFile.h: add deadStrippable()
1231 * src/MachOFileAbstraction.hpp: add MH_DEAD_STRIPPABLE_DYLIB
1232 * src/Options.cpp: support -mark_dead_strippable_dylib
1233 * src/MachOWriterExecutable.hpp: test reader->deadStrippable(), set MH_DEAD_STRIPPABLE_DYLIB
1234 * doc/man/man1/ld.1: update man page
1235 * unit-tests/test-cases/dead_strippable_dylib: added test case
1238 2008-09-25 Nick Kledzik <kledzik@apple.com>
1240 <rdar://problem/6197601> ER: Add -seg_page_size option
1241 * src/Options.cpp: add -seg_page_size option
1242 * src/MachOWriterExecutable.hpp: use new page size info when laying out segments
1243 * doc/man/man1/ld.1: update man page
1246 2008-09-24 Nick Kledzik <kledzik@apple.com>
1248 <rdar://problem/5798786> -arch_errors_fatal not working
1249 * src/ld.cpp: check fOptions.errorOnOtherArchFiles()
1250 * src/Options.cpp: turn -arch_errors_fatal into fOptions.errorOnOtherArchFiles()
1253 2008-09-24 Nick Kledzik <kledzik@apple.com>
1255 <rdar://problem/6161215> CrashTracer: [USER] 1 crash in ld at ld: 0x5ce02
1256 * src/ld.cpp: abort if resolve() finds an unresolved reference, rather than allow a future crash
1259 2008-09-24 Nick Kledzik <kledzik@apple.com>
1261 <rdar://problem/6157989> linker crashes linking X86-64 with -fwritable-strings
1262 * src/MachOReaderRelocatable.hpp: handle unbound cfstring references
1263 * unit-tests/test-cases/cfstring-coalesce: update test case
1266 2008-09-24 Nick Kledzik <kledzik@apple.com>
1268 <rdar://problem/6213035> ld64: bl out of range (-17147704 max is +/-16M) on ppc
1269 * src/MachOWriterExecutable.hpp: tweak branch island regions to be every 14MB instead of 15MB
1272 2008-09-24 Nick Kledzik <kledzik@apple.com>
1274 <rdar://problem/5907981> -filelist fails with comma in path
1275 * src/Options.cpp: in loadFileList() first try without special comma meaning
1276 * unit-tests/test-cases/filelist/Makefile: update test case
1279 2008-09-23 Nick Kledzik <kledzik@apple.com>
1281 <rdar://problem/6203068> nop not used when aligning functions in -r mode
1282 * src/MachOWriterExecutable.hpp: change check for when to pad with nops to not test segment's name
1285 2008-09-23 Nick Kledzik <kledzik@apple.com>
1287 <rdar://problem/6238329> "-pie can only be used when linking a main executable" should be a warning, not an error
1288 * src/Options.cpp: make -pie on a dylib or bundle be a warning instead of an error
1291 2008-09-23 Nick Kledzik <kledzik@apple.com>
1293 * src/MachOReaderRelocatable.hpp: add warning if dwarf cannot be encoded as compact unwind
1296 2008-09-18 Nick Kledzik <kledzik@apple.com>
1298 * src/LTOReader.hpp: re-enable use of lto_codegen_debug_options()
1301 2008-09-16 Nick Kledzik <kledzik@apple.com>
1303 <rdar://problem/6219054> ld does not always set S_CSTRING_LITERALS on __TEXT,__cstring
1304 * src/MachOReaderRelocatable.hpp: add getContentType() to SymbolAtom
1305 * src/MachOWriterExecutable.hpp: for x86_64 don't override named cstrings with LC* name
1308 2008-09-10 Nick Kledzik <kledzik@apple.com>
1310 * Options.cpp: add __crashreporter_info__ to communicate command line to crash reporter
1311 * ld64.xcodeproj/project.pbxproj: leave local symbols in ld to provide better crash reports
1314 2008-09-08 Nick Kledzik <kledzik@apple.com>
1316 <rdar://problem/6126637> 161569 GCC 4.2 - breakpoints no longer work for a large number of functions
1317 * src/MachOReaderRelocatable.hpp: support DW_FORM_strp out-of-line strings when parsing line table
1320 2008-09-02 Nick Kledzik <kledzik@apple.com>
1322 * src/MachOReaderRelocatable.hpp: fix compact unwind personality for dyld and -slow_stubs
1325 2008-08-29 Nick Kledzik <kledzik@apple.com>
1327 <rdar://problem/6186838> -weak_library no longer forces uses to be weak_import
1328 * src/MachOWriterExecutable.hpp: use fWeakImport on dylib to force proxy atoms into fWeakImportMap
1329 * unit-tests/test-cases/weak_import-force: added test case
1332 2008-08-29 Nick Kledzik <kledzik@apple.com>
1334 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1335 * src/Options.cpp: add fOrderData and support -no_data_order
1336 * src/ld.cpp: modify tweakLayout() to sort atoms with relocations to start of __data section
1339 2008-08-27 Nick Kledzik <kledzik@apple.com>
1341 * src/Options.cpp: back out <rdar://problem/6174493>
1344 ----- Tagged ld64-87.5
1346 2008-08-26 Nick Kledzik <kledzik@apple.com>
1348 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
1349 * src/Options.cpp: swap any early symlinks to libSystem with libgcc_s
1352 ----- Tagged ld64-87.4
1354 2008-08-25 Nick Kledzik <kledzik@apple.com>
1356 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
1357 * src/Options.cpp: swap any early libSystem with libgcc_s
1360 2008-08-15 Nick Kledzik <kledzik@apple.com>
1362 <rdar://problem/5898326> Unable to build ppc debug builds (linker out of range error)
1363 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands() look ahead so large atoms don't push out branch islands
1366 ----- Tagged ld64-87.3.1
1368 2008-09-08 Nick Kledzik <kledzik@apple.com>
1370 <rdar://problem/6204202> i386 dylibs have incorrect personality pointers when put in dyld shared cache
1371 * src/MachOWriterExecutable.hpp: in addCrossSegmentRef() handle kImageOffset32 to __IMPORT segment
1374 ----- Tagged ld64-87.3
1376 2008-08-09 Nick Kledzik <kledzik@apple.com>
1378 <rdar://problem/6125381> work around compiler gcc_except_table alignment
1379 * src/ObjectFile.h: change getLSDA() to return a reference instead of an atom
1380 * src/MachOReaderRelocatable.hpp: special case __eh_frame 64-bit pointer diff relocations
1381 * src/MachOWriterExecutable.hpp: track lsda offset when creating __unwind_info section
1382 * src/UnwindDump.cpp: log when LDSA content does not start with 0xFF
1384 ----- Tagged ld64-87.2
1386 2008-08-07 Nick Kledzik <kledzik@apple.com>
1388 <rdar://problem/6131559> 10A141: libuwind falls back to dwarf and makes whole system super slow
1389 * src/MachOWriterExecutable.hpp: Fix sign extension bug with x86_64::kPointerDiff24
1390 * src/UnwindDump.cpp: warn about mangled LSDA entries when dumping unwind section
1393 ----- Tagged ld64-87.1
1395 2008-08-03 Nick Kledzik <kledzik@apple.com>
1397 * src/LTOReader.hpp: Don't use lto_codegen_debug_options until newer libLTO.dylib is available
1400 ----- Tagged ld64-87
1402 2008-07-21 Nick Kledzik <kledzik@apple.com>
1404 * src/Options.cpp: Always set fAutoOrderInitializers=false for dyld
1407 2008-07-21 Nick Kledzik <kledzik@apple.com>
1409 * src/MachOWriterExecutable.hpp: fix when regular vs compressed __unwind_info pages are generated
1410 * src/UnwindDump.cpp: fix function name decoding in regular pages
1413 2008-07-21 Nick Kledzik <kledzik@apple.com>
1415 * ld64.xcodeproj/project.pbxproj: don't allow ld to build for x86_64 until libdtrace.dylib is available
1418 2008-07-18 Nick Kledzik <kledzik@apple.com>
1420 * src/MachOReaderRelocatable.hpp: don't crash if debug_line section has no line table
1423 2008-07-18 Nick Kledzik <kledzik@apple.com>
1425 <rdar://problem/5628149> Duplicate probe firings in Security.framework
1426 * src/LTOReader.hpp: optimize() now returns atoms optimized away
1427 * src/ObjectFile.h: optimize() should return if it did anything
1428 * src/ArchiveReader.hpp: pass through optimize() result
1429 * src/ld.cpp: rework dtrace probe processing as a new pass to prevent double counting
1432 2008-07-15 Nick Kledzik <kledzik@apple.com>
1434 <rdar://problem/6061904> automatically order initializers to start of __TEXT
1435 * src/Options.cpp: add -no_order_inits option
1436 * src/MachOReaderRelocatable.hpp: merge __StaticInit into __text
1437 * src/ObjectFile.h: add fAutoOrderInitializers
1438 * src/ld.cpp: sort initializer to start of __text and terminators to end
1439 * doc/man/man1/ld.1: add doc about -no_order_inits
1440 * unit-tests/test-cases/init-order: add test case
1442 2008-07-15 Nick Kledzik <kledzik@apple.com>
1444 <rdar://problem/6073697> Only add LC_SEGMENT_SPLIT_INFO to dylibs that might be in the shared cache
1445 * src/MachOWriterExecutable.hpp: re-layout load commands after split-seg data computed
1446 * src/Options.cpp: non-public install name will disable split-seg load command
1449 2008-07-14 Nick Kledzik <kledzik@apple.com>
1451 <rdar://problem/6069861> ld -r for x86_64 is changing visibility of cstring constants
1452 * src/MachOWriterExecutable.hpp: force x86_64 cstring labels to be local in -r mode
1453 * unit-tests/test-cases/cstring-label: added test case
1456 2008-07-11 Nick Kledzik <kledzik@apple.com>
1458 <rdar://problem/6070190> ld not adding updating LC_SEGMENT_SPLIT_INFO with __unwind_info section
1459 * src/MachOWriterExecutable.hpp: run createSplitSegContent() after __unwind_info section is created
1461 2008-07-10 Nick Kledzik <kledzik@apple.com>
1463 * src/LTOReader.hpp: improve missing symbol error message
1466 2008-07-09 Nick Kledzik <kledzik@apple.com>
1468 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1469 * src/ld.cpp: first phase, order sections
1472 2008-07-08 Nick Kledzik <kledzik@apple.com>
1474 * src/MachOReaderRelocatable.hpp: remove "coal" sections when creating a final linked image
1477 2008-07-08 Nick Kledzik <kledzik@apple.com>
1479 <rdar://problem/6054476> ld: add support for mllvm LTO options
1480 * src/Options.cpp: support -mllvm option
1481 * src/LTOReader.hpp: call lto_codegen_debug_options() with -mllvm options
1482 * src/ld.cpp: pass llvmOptions to optimize()
1483 * src/Options.h: add fLLVMOptions
1484 * src/ArchiveReader.hpp: add llvmOptions parameter to optimize()
1485 * src/ObjectFile.h: add llvmOptions parameter to optimize()
1486 * unit-tests/test-cases/lto-llvm-options: add test case
1489 2008-07-07 Nick Kledzik <kledzik@apple.com>
1491 <rdar://problem/6054296> Linker fails with: 24-bit pointer diff out of range in unwind info in unwind info from...
1492 * src/MachOWriterExecutable.hpp: fix when to fallback to uncompressed unwind info
1495 2008-07-03 Nick Kledzik <kledzik@apple.com>
1497 <rdar://problem/6001472> ld crash with gcc-4.0 code that uses a zero sized array
1498 * src/MachOReaderRelocatable.hpp: handle zero size atom in a zero sized section
1501 2008-07-03 Nick Kledzik <kledzik@apple.com>
1503 <rdar://problem/6016809> ld crashes when bad ppc relocs are found
1504 * src/MachOReaderRelocatable.hpp: change all missing PAIR warnings to errors
1507 2008-07-02 Nick Kledzik <kledzik@apple.com>
1509 <rdar://problem/5881324> when linking a kext the static linker should leave a pad in the headers to allow code signing
1510 * src/MachOWriterExecutable.hpp: add padding for load commands in object files
1511 * unit-tests/test-cases/code-signed-object-file: added test case
1514 2008-07-02 Nick Kledzik <kledzik@apple.com>
1516 <rdar://problem/6048484> LC_SEGMENT_64 filesize incorrect for MH_OBJECT filetype
1517 * src/MachOWriterExecutable.hpp: correctly set segment size info in object files
1518 * unit-tests/test-cases/no-object-symbols: add test case
1521 2008-06-26 Nick Kledzik <kledzik@apple.com>
1523 * ld64.xcodeproj/project.pbxproj: enable ld and rebase targets to build for x86_64
1524 * src/rebase.cpp: remove unused fRelocBase field that was not 64-bit clean
1525 * src/MachOReaderRelocatable.hpp: fix getEncodedP() to be 64-bit clean
1528 ----- Tagged ld64-86.3
1530 2008-06-17 Nick Kledzik <kledzik@apple.com>
1532 * src/ld.cpp: fix loadUndefines() to double check undefine symbol was not already loaded
1535 ----- Tagged ld64-86.2
1537 2008-06-14 Nick Kledzik <kledzik@apple.com>
1539 * srd/ld.cpp: Add NULL check in getTentativesNames()
1542 ----- Tagged ld64-86.1
1544 2008-06-06 Nick Kledzik <kledzik@apple.com>
1546 * src/MachOWriterExecutable.hpp: fix header padding calculation for dyld
1549 ----- Tagged ld64-86
1551 2008-06-04 Nick Kledzik <kledzik@apple.com>
1553 * src/LTOReader.hpp: if lto_codegen_add_module() fails, add explanation to error message
1556 2008-06-04 Nick Kledzik <kledzik@apple.com>
1558 * src/ObjectFile.h: add deadAtoms parameter to optimize()
1560 * src/ArchiveReader.hpp: ditto
1561 * src/MachOReaderRelocatable.hpp: handle llvm use of 0x1B pointer encodings in CIEs
1562 * src/LTOReader.hpp: make sure libLTO.dylib knows about any llvm symbol coalesced away
1563 * unit-tests/test-cases/lto-weak-native-override: add test case
1566 2008-06-04 Nick Kledzik <kledzik@apple.com>
1568 <rdar://problem/5935600> LTO : 176.gcc and 177.mesa build failure at -O4
1569 * src/LTOReader.hpp: make sure internal is returned by getAtoms()
1570 * unit-tests/test-cases/lto-archive-dylib: update test case
1573 2008-06-03 Nick Kledzik <kledzik@apple.com>
1575 <rdar://problem/5894163> fix for 5613343 need to search for definitions for common symbols is broken
1576 * src/ld.cpp: modify loadUndefines() to check for undefines in all files and tentative definitions but only in archives
1577 * src/machochecker.cpp: check for undefine symbols and external symbols with same name
1578 * unit-tests/test-cases/tentative-and-archive: update test case
1581 2008-06-03 Nick Kledzik <kledzik@apple.com>
1583 <rdar://problem/5935237> linker produces wrong result for 16-bit call relocations
1584 * src/MachOReaderRelocatable.hpp: properly parse i386 scattered relocs for word sized pc-rel vanilla
1585 * src/MachOWriterExecutable.hpp: propery compute displacement for x86::kPCRel16
1586 * unit-tests/test-cases/relocs-asm: update test case with callw instructions
1589 2008-06-03 Nick Kledzik <kledzik@apple.com>
1591 <rdar://problem/5905900> Building kext x86_64 with unexported symbols file causes linking problems
1592 * src/MachOWriterExecutable.hpp: better check when creating undefined proxy atoms
1593 * unit-tests/test-cases/unexported_symbols_list-r: added test case
1596 2008-06-02 Nick Kledzik <kledzik@apple.com>
1598 <rdar://problem/5659338> S_CSTRING_LITERALS section type not preserved in executable
1599 * src/ObjectFile.h: added ContentType
1600 * src/MachOReaderRelocatable.hpp: set ContentType for anonymous string literals
1601 * src/MachOWriterExecutable.hpp: set S_CSTRING_LITERALS if ContentType is kCStringType
1602 * unit-tests/test-cases/cstring-custom-section: added test case
1605 2008-06-02 Nick Kledzik <kledzik@apple.com>
1607 <rdar://problem/5980194> linker should produce __unwind_info section in final linked images
1608 * src/ld.cpp: sort __unwind_info then __eh_frame section to end of __TEXT
1609 * src/Architectures.hpp: add kImageOffset32 and kPointerDiff24
1610 * src/ObjectFile.h: add compact unwind info support
1611 * src/MachOReaderRelocatable.hpp: add compact unwind info support
1612 * src/MachOFileAbstraction.hpp: add C++ wrappers for unwind section layout
1613 * src/UnwindDump.cpp: new tool for dumping __unwind_info section
1614 * src/MachOWriterExecutable.hpp: create __unwind_info section when needed
1615 * src/ObjectDump.cpp: print unwind info
1618 2008-06-02 Nick Kledzik <kledzik@apple.com>
1620 * unit-tests/test-cases/llvm-integration: split out some test cases
1621 * unit-tests/test-cases/lto-preload-pie: added
1622 * unit-tests/test-cases/lto-archive-dylib: added
1625 2008-05-30 Nick Kledzik <kledzik@apple.com>
1627 * unit-tests: fixes to build all tests with with gcc-4.2 on SnowLeopard
1630 2008-05-30 Nick Kledzik <kledzik@apple.com>
1632 <rdar://problem/5536348> support -preload option to generate MH_PRELOAD binaries compatible with mtoc(1) and EFI
1633 * src/ld.cpp: add entryPoint parameter to optimize()
1634 * src/ArchiveReader.hpp: ditto
1635 * src/ObjectFile.h: ditto
1636 * src/LTOReader.hpp: use entryPoint parameter to optimize()
1637 * src/Options.h: add kPreload and segment alignment
1638 * src/Options.cpp: support -preload and -segalign
1639 * src/MachOWriterExecutable.hpp: support kPreload and non-page aligned segments
1642 2008-05-30 Nick Kledzik <kledzik@apple.com>
1644 <rdar://problem/4431008> ld should warn if passed -r and also dylibs
1645 * src/ld.cpp: check for spurious dylibs in Linker::addDylib()
1648 ----- Tagged ld64-85.6
1650 2008-11-01 Nick Kledzik <kledzik@apple.com>
1652 <rdar://problem/6254202> support increased branch range in Thumb-2
1653 * src/MachOWriterExecutable.hpp: in fixUpReferenceFinal() support new longer branch range
1656 2008-11-01 Nick Kledzik <kledzik@apple.com>
1658 <rdar://problem/6104368> ld warning: unknown option to -iphoneos_version_min, not 1.x or 2.x
1659 * src/Options.cpp: In setIPhoneVersionMin() support 3.x
1662 ----- Tagged ld64-85.5
1664 2008-09-17 Nick Kledzik <kledzik@apple.com>
1666 <rdar://problem/6162415> vtable pointers can be missing thumb bit
1667 * src/MachOWriterExecutable.hpp: Writer<arm>::fixUpReferenceFinal() OR in the 1 bit if the target
1668 of a arm::kReadOnlyPointer is thumb.
1671 ----- Tagged ld64-85.4
1673 2008-08-11 Nick Kledzik <kledzik@apple.com>
1675 <rdar://problem/6138961> ld should ignore LD_PREBIND when processing a static archive
1676 * src/MachOWriterExecutable.hpp: in setImportNlist() never use N_PBUD for object files
1678 ----- Tagged ld64-85.3
1680 2008-07-14 Nick Kledzik <kledzik@apple.com>
1682 <rdar://problem/6060912> Prebinding busted in DTSB
1683 * src/Options.cpp: check for libstdc++.6.0.[49] in seg_addr_table
1686 ----- Tagged ld64-85.2
1688 2008-05-06 Nick Kledzik <kledzik@apple.com>
1690 <rdar://problem/5905889> ARM ld should take W bit off of maxprot for __TEXT segment
1691 * src/MachOWriterExecutable.hpp: for iPhone always set maxprot to be initprot in all segments
1694 2008-05-06 Nick Kledzik <kledzik@apple.com>
1696 <rdar://problem/5914343> encryptable images may not be signable
1697 * src/MachOWriterExecutable.hpp: use minimum header padding when aligning __text section
1700 ----- Tagged ld64-85 (Xcode 3.1)
1702 2008-04-29 Nick Kledzik <kledzik@apple.com>
1704 * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
1707 2008-04-29 Nick Kledzik <kledzik@apple.com>
1709 <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
1710 * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
1713 2008-04-29 Nick Kledzik <kledzik@apple.com>
1715 <rdar://problem/5866582> GLRendererFloat has bad __eh_frame section caused by mixing llvm-gcc and gcc object files
1716 * src/MachOReaderRelocatable.hpp: make all atoms in __eh_frame section have 1-byte alignment
1717 * src/MachOWriterExecutable.hpp: make __eh_frame section have pointer sized alignment
1720 2008-04-17 Nick Kledzik <kledzik@apple.com>
1722 * src/MachOReaderRelocatable.hpp: better cpu subtype support
1725 2008-04-14 Nick Kledzik <kledzik@apple.com>
1727 <rdar://problem/5733759> ld64 has bad ARM branch island check
1728 * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail
1731 2008-04-10 Nick Kledzik <kledzik@apple.com>
1733 * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
1736 ----- Tagged ld64-84.4
1738 2008-04-10 Nick Kledzik <kledzik@apple.com>
1740 <rdar://problem/5847206> SPEC2000/eon built with -mdynamic-no-pic won't run
1741 * src/Architectures.hpp: added arm::kReadOnlyPointer
1742 * src/MachOReaderRelocatable.hpp: generate arm::kReadOnlyPointer
1743 * src/MachOWriterExecutable.hpp: use arm::kReadOnlyPointer
1744 * src/machochecker.cpp: allow MH_PIE bit
1745 * unit-tests/test-cases/switch-jump-table: added test cases
1748 ----- Tagged ld64-84.3
1750 2008-04-09 Nick Kledzik <kledzik@apple.com>
1752 <rdar://problem/5852023> -undefined dynamic_lookup busted
1753 * src/ld.cpp: don't create proxy atom when scanning for dylib duplicates
1754 * unit-tests/test-cases/tentative-and-archive: use -undefined dynamic_lookup
1757 ----- Tagged ld64-84.2
1759 2008-04-04 Nick Kledzik <kledzik@apple.com>
1761 * src/ld.cpp: don't add .eh symbols to symbol table in -r mode
1762 * unit-tests/test-cases/eh-coalescing-r: update to test out of order coalescing
1765 ----- Tagged ld64-84.1
1767 2008-03-28 Nick Kledzik <kledzik@apple.com>
1769 <rdar://problem/5720961> ld should prefer architecture-specific variant over generic in fat object file
1770 * src/Options.cpp: fully process -arch arguments into fArchitecture and fSubArchitecture
1771 * src/ld.cpp: when -arch with a subtype is used, try to find the exact subtype from fat files
1772 * unit-tests/test-cases/cpu-sub-types-preference: added test cases for arm and ppc
1775 ----- Tagged ld64-84
1777 2008-03-28 Nick Kledzik <kledzik@apple.com>
1779 * src/LTOReader.hpp: don't print lto version, if lto is unavailable
1782 2008-03-26 Nick Kledzik <kledzik@apple.com>
1784 <rdar://problem/5575399> Add LD_WARN_COMMONS to BigBear builds
1785 * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file
1788 2008-03-26 Nick Kledzik <kledzik@apple.com>
1790 <rdar://problem/5797713> Need encryption tag in mach-o file
1791 <rdar://problem/5811920> linker should adjust arm final linked images so __text is never on the same page as the load commands
1792 * src/MachOFileAbstraction.hpp: add support for encryption_info_command
1793 * src/Options.cpp: add support for LD_NO_ENCRYPT and -no_encryption
1794 * src/MachOWriterExecutable.hpp: add EncryptionLoadCommandsAtom
1795 * src/machochecker.cpp: validate LC_ENCRYPTION_INFO
1798 2008-03-25 Nick Kledzik <kledzik@apple.com>
1800 <rdar://problem/5712533> ld64 does not recognize LLVM bitcode archive files
1801 * src/MachOReaderArchive.hpp: renamed to src/ArchiveReader.hpp
1802 * src/ArchiveReader.hpp: sniff each member and instantiate correct reader
1803 * src/ld.cpp: rename mach_o::archive::Reader to archive::Reader
1804 * ld64.xcodeproj/project.pbxproj: rename MachOReaderArchive.hpp to ArchiveReader.hpp
1805 * unit-tests/test-cases/llvm-integration: added test case
1808 2008-03-25 Nick Kledzik <kledzik@apple.com>
1810 <rdar://problem/5771658> ld64 should switch to new libLTO.dylib interface
1811 <rdar://problem/5675690> Produce llvm bc file in 'ld -r' mode if all .o files are llvm bc
1812 * src/LTOReader.hpp: rewrite from LLVMReader.hpp to use new lto_* C interface
1813 * unit-tests/test-cases/llvm-integration: update and comment
1814 * ld64.xcodeproj/project.pbxproj: update to lazy load libLTO.dylib
1815 * src/ld.cpp: rework and simplify Linker::optimize()
1816 * src/ObjectDump.cpp: Add -nm option
1819 2008-03-25 Nick Kledzik <kledzik@apple.com>
1821 * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem
1822 * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem
1825 2008-03-24 Nick Kledzik <kledzik@apple.com>
1827 <rdar://problem/5814613> Xcode 3.1 breaks linkage of libgcj.9.dylib from gcc 4.3.0
1828 * src/MachOWriterExecutable.cpp: Make sure all ivars in Writer are initialized.
1831 2008-03-21 Nick Kledzik <kledzik@apple.com>
1833 * src/Options.cpp: warn if -seg1addr value is not page aligned
1836 2008-03-21 Nick Kledzik <kledzik@apple.com>
1838 <rdar://problem/5806437> Move ARM support outside of __OPEN_SOURCE__
1839 * src/ld.cpp: remove __OPEN_SOURCE__ around arm support
1840 * src/LLVMReader.hpp: remove __OPEN_SOURCE__ around arm support
1841 * src/MachOReaderDylib.hpp: remove __OPEN_SOURCE__ around arm support
1842 * src/ObjectFile.h: remove __OPEN_SOURCE__ around arm support
1843 * src/MachOReaderRelocatable.hpp: remove __OPEN_SOURCE__ around arm support
1844 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
1845 * src/MachOWriterExecutable.hpp: remove __OPEN_SOURCE__ around arm support
1846 * src/ObjectDump.cpp: remove __OPEN_SOURCE__ around arm support
1847 * ld64.xcodeproj/project.pbxproj: remove ARM_SUPPORT from config.h
1850 ----- Tagged ld64-83.2
1852 2008-03-15 Nick Kledzik <kledzik@apple.com>
1854 <rdar://problem/5801620> ld64-83 removes OBJC_CLASS_$ symbols from projects, causes catastrophic results
1855 * src/Options.cpp: restore "case CPU_TYPE_ARM" in switch statement for .objc_class symbols in .exp files
1856 * unit-tests/test-cases/objc-exported_symbols_list: added test case
1859 ----- Tagged ld64-83.1
1861 2008-03-14 Nick Kledzik <kledzik@apple.com>
1863 <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
1864 * src/Options.cpp: support -iphoneos_version_min as well
1867 ----- Tagged ld64-83
1869 2008-03-10 Nick Kledzik <kledzik@apple.com>
1871 <rdar://problem/5791543> ld needs to strip iphone_version_min option if invoking ld_classic
1872 * src/Options.cpp: suppress -iphone_version_min from being passed to ld_classic
1875 2008-03-04 Nick Kledzik <kledzik@apple.com>
1877 <rdar://problem/4171253> ADOBE XCODE: Linker option to lazy load frameworks (cause dyld is too slow)
1878 * src/MachOWriterExecutable.hpp: create lazy stubs and LC_LAZY_LOAD_DYLIB for lazy load dylibs
1879 * src/Options.cpp: support -lazy-l, -lazy_library, and -lazy_framework
1880 * src/MachOFileAbstraction.hpp: add LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS until in cctools
1881 * src/MachOReaderDylib.hpp: add isLazyLoadedDylib()
1882 * src/ld.cpp: pass lazy helper atom to writer
1883 * doc/man/man1/ld.1: document new options
1884 * unit-tests/test-cases/lazy-dylib-objc: add test case
1885 * unit-tests/test-cases/lazy-dylib: add test case
1888 ----- Tagged ld64-82.7
1890 2008-03-07 Nick Kledzik <kledzik@apple.com>
1892 <rdar://problem/5787149> duplicate symbol literal-pointer@__OBJC@__message_refs@...
1893 * src/MachOReaderRelocatable.hpp: AnonymousAtom from S_LITERAL_POINTERS section should be weak
1894 * unit-tests/test-cases/objc-selector-coalescing: added test case
1897 ----- Tagged ld64-82.6
1899 2008-03-04 Nick Kledzik <kledzik@apple.com>
1901 <rdar://problem/5779681> ld crashes building XsanFS for Snow Leopard Builds
1902 * src/ld.cpp: add bool dylibsOnly parameter to addJustInTimeAtoms()
1903 * unit-tests/test-cases/tentative-and-archive: added test case
1905 2008-03-04 Nick Kledzik <kledzik@apple.com>
1907 <rdar://problem/5775822> ld64 should not force building with gcc 4.0
1908 * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0
1911 2008-02-29 Nick Kledzik <kledzik@apple.com>
1913 <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
1914 * src/Options.cpp: only splitseg if prebound
1917 2008-02-29 Nick Kledzik <kledzik@apple.com>
1919 <rdar://problem/5774231> Linker should not make GSYM debug note for .objc_category_* symbols
1920 * src/ld.cpp: suppress GSYM debug notes for absolute symbols
1921 * unit-tests/test-cases/objc-category-debug-notes: added test case
1924 2008-02-29 Nick Kledzik <kledzik@apple.com>
1926 <rdar://problem/5768970> non-ASCII CFString support is broken
1927 * src/MachOReaderRelocatable.hpp: only name and coalesce cfstring constants if they use a __cstring
1928 * unit-tests/test-cases/cfstring-utf16: add test case
1931 2008-02-25 Nick Kledzik <kledzik@apple.com>
1933 <rdar://problem/5366363> ld -r -x
1934 * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
1937 ----- Tagged ld64-82.5
1939 2008-02-12 Nick Kledzik <kledzik@apple.com>
1941 <rdar://problem/5738023> x86_64: -stack_size failure when large __bss is used
1942 * src/ld.cpp: only move section already in __DATA segment to new __huge section
1943 * unit-tests/test-cases/stack_size_no_addr: updated test case to add large bss section
1946 ----- Tagged ld64-82.4
1948 2008-02-06 Nick Kledzik <kledzik@apple.com>
1950 <rdar://problem/5726215> comdat warnings with ld -r of C++ .o files
1951 * unit-tests/test-cases/eh-coalescing-r: added test case
1952 * src/ld.cpp: in ld -r mode don't warn about if .eh symbols are not static
1955 2008-02-06 Devang Patel <dpatel@apple.com>
1957 <rdar://problem/5724990> LTO of Bom framework with -dead_strip causes ld(1) crash
1958 * src/LLVMReader.hpp: Check fAtom while determining LLVMReference target binding.
1959 * unit-tests/test-cases/llvm-integration/Makefile: Add new test case.
1960 * unit-tests/test-cases/llvm-integration/a15.c: New.
1961 * unit-tests/test-cases/llvm-integration/b15.c: New.
1962 * unit-tests/test-cases/llvm-integration/c15.c: New.
1964 2008-02-05 Nick Kledzik <kledzik@apple.com>
1966 * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used
1968 ----- Tagged ld64-82.3
1970 2008-02-04 Nick Kledzik <kledzik@apple.com>
1972 <rdar://problem/5721186> ld doesn't seem to understand $ld$add$os... and $ld$hide$os... for 10.6 moves
1973 * src/ObjectFile.h: add 10.6
1974 * src/Options.cpp: add 10.6 support
1975 * src/MachOReaderDylib.hpp: recognize $os10.6$
1978 ----- Tagged ld64-82.2
1980 2008-01-30 Devang Patel <dpatel@apple.com>
1982 <rdar://problem/5714833> Can't build 64-bit Intel binaries with LTO
1983 <rdar://problem/5714787> ld64 fails to build with llvm-gcc-4.2
1984 * src/LLVMReader.hpp: Fix character count typo in strncmp call.
1985 Use const char * to initialize temp. string.
1986 * ld64.xcodeproj/project.pbxproj: use $(DEVELOPER_DIR) in header search construction
1987 instead of hard coding /Developer.
1989 ----- Tagged ld64-82.1
1991 2008-01-23 Nick Kledzik <kledzik@apple.com>
1993 * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
1996 2008-01-22 Nick Kledzik <kledzik@apple.com>
1998 <rdar://problem/5695496> ld uses 32-bits in some places to hold addresses when parsing 64-bit mach-o files
1999 * src/MachOReaderRelocatable.hpp: use AddrToAtomMap type that switch address to 64-bits for 64-bit archs
2000 * src/MachOWriterExecutable.hpp: verify BR14 does not overflow for external relocs
2001 * unit-tests/test-cases/relocs-c: update test case to slide addresses to verify x86_64 .o files
2004 ----- Tagged ld64-82
2006 2008-01-18 Nick Kledzik <kledzik@apple.com>
2008 <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
2009 * src/ld.cpp: fix typo in warning string
2012 2008-01-16 Nick Kledzik <kledzik@apple.com>
2014 <rdar://problem/5565074> Bundle Loader does not work anymore when loader is a bundle
2015 <rdar://problem/5590203> ld warns of incorrect architecture when linking a bundle to a bundle
2016 * src/MachOReaderDylib.hpp: support linking against bundles via -bundle_loader. Clean up error messages
2017 * unit-tests/test-cases/bundle_loader: update test case
2020 2008-01-16 Nick Kledzik <kledzik@apple.com>
2022 <rdar://problem/5366363> ld -r -x creates debug notes (stabs) when it should not with -x (keep only global symbols)
2023 * src/Options.cpp: in reconfigureDefaults() if -r and -x then -S
2026 2008-01-16 Nick Kledzik <kledzik@apple.com>
2028 <rdar://problem/5566068> if ld crashes while writing output file, it should delete the half written file
2029 * src/MachOWriterExecutable.hpp: wrap open/write/close in try block and add signal handlers all to delete
2030 output file on failure.
2033 2008-01-16 Devang Patel <dpatel@apple.com>
2035 * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
2038 2008-01-16 Nick Kledzik <kledzik@apple.com>
2040 <rdar://problem/5593537> GC-supported library can't be linked into GC-required executable
2041 * src/ld.cpp: loosen constraint that all objc code must be compiled with same GC settings and
2042 allow gc-compatible code to be linked into anything.
2043 * unit-tests/test-cases/objc-gc-checks: update test case
2046 2008-01-15 Nick Kledzik <kledzik@apple.com>
2048 <rdar://problem/5687976> no debug notes for custom named data
2049 * src/ld.cpp: in synthesizeDebugNotes() check getSymbolTableInclusion() instead of for leading underscore
2050 * unit-tests/test-cases/dwarf-debug-notes: update test case
2052 ----- Tagged ld64-81.5
2054 2008-01-14 Devang Patel <dpatel@apple.com>
2056 <rdar://problem/5683813> llvm-gcc-4.2 fails to build Sqlite 3.5.4 with -O4
2057 * src/LLVMReader.hpp: Resolve proxy references. Collect new unbounded references
2059 * src/ld.cpp: Resolve additional unbounded references after optimization.
2062 2008-01-14 Nick Kledzik <kledzik@apple.com>
2064 <rdar://problem/5655246> PPC Leopard (Xcode 3.0) linker ld gets "Bus error" sometimes
2065 * src/MachOReaderRelocatable.hpp: use same code as x86 to parse ppc and arm sect-diff relocs
2066 * src/MachOWriterExecutable.hpp: use same code as x86 to write ppc and arm sect-diff relocs
2069 2008-01-11 Nick Kledzik <kledzik@apple.com>
2071 <rdar://problem/5637618> PPC Leopard (Xcode 3.0) linker ld reports "unknown scattered relocation type 4"
2072 * src/MachOReaderRelocatable.hpp: add PPC_RELOC_HI16 to scattered reloc parsing
2073 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added tests for scattered hi/lo instructions
2076 2008-01-11 Nick Kledzik <kledzik@apple.com>
2078 * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
2081 2008-01-11 Nick Kledzik <kledzik@apple.com>
2083 <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
2084 * doc/man/man1/ld.1: make meaning of "suffix" more explicit
2087 2008-01-11 Nick Kledzik <kledzik@apple.com>
2089 <rdar://problem/5633081> Obj-C Symbols in Leopard Can't Be Weak Linked
2090 * src/MachOWriterExecutable.hpp: set weak and lazy attributes on dummy .objc_class_name undefines
2091 to dylibs to support Mac OS X 10.3.x dyld
2094 2008-01-11 Nick Kledzik <kledzik@apple.com>
2096 <rdar://problem/5669751> Unknown error with linker (dyld: unknown external relocation type)
2097 * src/ld.cpp: fix crash when SO stabs are not balanced
2100 2008-01-11 Devang Patel <dpatel@apple.com>
2102 <rdar://problem/5667433> LTO does not work if expected output is a dynamic library
2103 * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate
2106 2000-01-10 Nick Kledzik <kledzik@apple.com>
2108 <rdar://problem/5680988> __cls_refs section is losing S_LITERAL_POINTERS section type
2109 * src/MachOWriterExecutable.hpp: special case __cls_refs section
2110 * unit-tests/test-cases/objc-literal-pointers: add test case
2113 2008-01-03 Nick Kledzik <kledzik@apple.com>
2115 <rdar://problem/5667688> wrong EH information might be used
2116 Created new kGroupSubordinate reference kind to model group comdat. The "signature" atom
2117 has kGroupSubordinate references to the other atoms in the group. If the signature atom
2118 is coalesced away, the linker follows kGroupSubordinate references and throws away the
2119 other members of the group.
2120 * unit-tests/test-cases/eh-coalescing: added test case
2121 * src/ld.cpp: added markDead() and use propagate to subordinates
2122 * src/Architectures.hpp: added kGroupSubordinate
2123 * src/MachOReaderRelocatable.hpp: add kGroupSubordinate reference from a function to its .eh atom
2124 and if used, from .eh atom to its LSDA atom.
2125 * src/MachOWriterExecutable.hpp: handle kGroupSubordinate like kNoFixUp
2127 ----- Tagged ld64-81.4.1
2129 2007-12-19 Devang Patel <dpatel@apple.com>
2131 * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
2133 2007-12-19 Devang Patel <dpatel@apple.com>
2135 * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
2137 2007-12-19 Devang Patel <dpatel@apple.com>
2139 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
2140 * src/LLVMReader.hpp: Add printLLVMVersion() to print llvm version string in verbose mode.
2141 * src/Options.cpp: Use printLLVMVersion() in verbose mode.
2143 2007-12-19 Devang Patel <dpatel@apple.com>
2145 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
2146 * src/Options.h: Add verbose() method to check fVerbose flag.
2147 * src/LLVMReader.hpp: Print LLVM version string in verbose mode.
2149 ----- Tagged ld64-81.4
2151 2007-12-18 Devang Patel <dpatel@apple.com>
2153 * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
2155 ----- Tagged ld64-81.3
2157 2007-12-17 Nick Kledzik <kledzik@apple.com>
2159 * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
2162 2007-12-17 Devang Patel <dpatel@apple.com>
2164 * src/LLVMReader.hpp: Do not throw exception if LLVMReader is not able to
2165 dlopen LTO library. Instead just flag input file as an invalid LLVM bitcode file.
2168 2007-12-14 Nick Kledzik <kledzik@apple.com>
2170 <rdar://problem/5645908> gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all)
2171 * src/MachOWriterExecutable.hpp: fix Writer<x86>::generatesExternalTextReloc() to allow text relocs
2172 * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static
2175 2007-12-14 Devang Patel <dpatel@apple.com>
2177 <rdar://problem/5648438> Enable Link Time Optimization in Opal
2178 * src/LLVMReader.hpp: Locate LLVMlto.dylib relative to ld location in Developer folder.
2179 * ld64.xcodeproj/project.pbxproj: Add {DEVELOPER_DIR}/usr/include in header search path.
2180 * unit-tests/run-all-unit-tests: Set DYLD_FALLBACK_LIBRARY_PATH to find LLVMlto.dylib during unit testing.
2181 * unit-tests/testcases/llvm-integration/Makefile: Point LLVMGCC and LLVMGXX to llvm-gcc-4.2 in Developer folder during unit testing.
2184 2007-12-13 Nick Kledzik <kledzik@apple.com>
2186 <rdar://problem/5645446> SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ...
2187 * src/MachOReaderRelocatable.hpp: in Reader<x86>::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly
2189 ----- Tagged ld64-81.2
2193 2007-12-07 Nick Kledzik <kledzik@apple.com>
2195 <rdar://problem/5615298> support 8-bit relocations for i386
2196 * src/Architectures.hpp: add kPCRel8
2197 * src/MachOReaderRelocatable.hpp: support 8-bit pc-rel relocations for intel
2198 * src/MachOWriterExecutable.hpp: support 8-bit pc-rel relocations for intel
2199 * unit-tests/test-cases/relocs-asm: add test cases
2202 ----- Tagged ld64-81.1
2204 2007-12-06 Nick Kledzik <kledzik@apple.com>
2206 * src/MachOReaderDylib.hpp: rework cycle detection to remove some false positives
2209 2007-12-05 Nick Kledzik <kledzik@apple.com>
2211 <rdar://problem/5628149> Duplicate probe firings in Security.framework
2212 * src/ld.cpp: check dtrace probe sites are not in fDeadAtoms before using
2213 * unit-tests/test-cases/dtrace-static-probes-coalescing: add test case
2216 2007-12-05 Nick Kledzik <kledzik@apple.com>
2218 * src/MachOReaderRelocatable.hpp: fix CFString coalescing to work with -fwritable-strings
2219 * unit-tests/test-cases/cfstring-coalesce: add -fwritable-strings to test case
2222 ----- Tagged ld64-81
2224 2007-11-15 Nick Kledzik <kledzik@apple.com>
2226 <rdar://problem/4196067> ld64 should support runtime text relocations
2227 * src/MachOWriterExecutable.hpp: add generatesLocalTextReloc() and generatesExternalTextReloc()
2228 * src/Options.cpp: process -read_only_relocs option
2229 * src/Options.h: add allowTextRelocs() and warnAboutTextRelocs()
2230 * src/MachOReaderRelocatable.hpp: add hasLongBranchStubs()
2231 * src/machochecker.cpp: allow relocs in read only segments, if section flags are set
2232 * unit-tests/test-cases/read-only-relocs: update test case
2235 2007-11-08 Devang Patel <dpatel@apple.com>
2237 * ld64.xcodeproj/project.pbxproj: add new build phase "build configure.h" for
2239 * src/ld.cpp: Include "configure.h"
2242 ----- Tagged ld64-80.11
2244 2008-02-12 Nick Kledzik <kledzik@apple.com>
2246 <rdar://problem/5741312> Wrong section name for objc info for ARM when OBJC2 is used
2247 * src/MachOWriterExecutable.hpp: switch segment/section name for ARM objc2 image info
2249 ----- Tagged ld64-80.10
2251 2008-02-11 Nick Kledzik <kledzik@apple.com>
2253 <rdar://problem/5733578> ld64 does not support -aspen_version_min 2.0
2254 * src/Options.cpp: allow 2.x for -aspen_version_min
2257 2008-02-11 Nick Kledzik <kledzik@apple.com>
2259 <rdar://problem/5733575> ld_classic: unknown flag: -aspen_version_min
2260 * src/Options.cpp: change -aspen_version_min x.x to -macosx_version_min 10.5 when invoking ld_classic
2263 ----- Tagged ld64-80.9
2265 2008-01-29 Nick Kledzik <kledzik@apple.com>
2267 <rdar://problem/5713054> -iphone_version_min ==> -aspen_version_min
2268 * src/Options.cpp: support -aspen_version_min
2271 ----- Tagged ld64-80.8
2273 2008-01-10 Nick Kledzik <kledzik@apple.com>
2275 * src/Options.cpp: support transition to new objc ABI for ARM by allowing old .objc_class_name_*
2276 style names in export files and map them to new _OBJC_CLASS_$_ style names.
2279 ----- Tagged ld64-80.7
2281 2008-01-02 Nick Kledzik <kledzik@apple.com>
2283 <rdar://problem/5572168> BigBear5A18 isn't fully prebound
2284 * src/Options.cpp: make fNeedsModuleTable true for arm
2286 ----- Tagged ld64-80.6
2288 2007-11-30 Nick Kledzik <kledzik@apple.com>
2290 <rdar://problem/5620976> -iphone_version_min
2291 * src/Options.cpp: handle -iphone_version_min option
2294 ----- Tagged ld64-80.5
2296 2007-11-26 Nick Kledzik <kledzik@apple.com>
2298 <rdar://problem/5601142> need to special case some dylibs in seg_addr_table
2299 * src/Options.cpp: retry seg_add_table lookup for a couple of unusual dylibs
2302 ----- Tagged ld64-80.4
2304 2007-11-06 Nick Kledzik <kledzik@apple.com>
2306 * src/MachOReaderRelocatable.hpp: fix parsing of external and scattered thumb branch22 relocs
2307 * unit-tests/test-cases/thumb-blx: add test case to keep blx issues from coming back
2309 ----- Tagged ld64-80.3
2311 2007-11-03 Nick Kledzik <kledzik@apple.com>
2313 * src/MachOReaderRelocatable.hpp: remove recalc of dstAddr which could cause thumb branches to be +2
2314 * src/MachOWriterExecutable.hpp: remove incorrect test for relocateableExternal
2316 ----- Tagged ld64-80.2
2318 2007-11-01 Nick Kledzik <kledzik@apple.com>
2320 * src/ld.cpp: hack my own prototype for log2() until math.h is cleaned up
2323 ----- Tagged ld64-80.1
2325 2007-11-01 Nick Kledzik <kledzik@apple.com>
2327 * ld64.xcodeproj/project.pbxproj: add HEADER_SEARCH_PATHS for cross builds
2328 * src/ld.cpp: temporarily disable LLVM_SUPPORT
2329 * src/MachOWriterExecutable.hpp: Don't use CC_MD5() directly
2332 2007-10-26 Nick Kledzik <kledzik@apple.com>
2334 <rdar://problem/5556038> Cannot build with libm_static.a statically linked
2335 * src/MachOWriterExecutable.hpp: Fix makesExternalRelocatableReference() for -r -d case
2336 * unit-tests/test-cases/tentative-to-real-hidden: add test case
2339 ----- Tagged ld64-80
2341 2007-10-24 Nick Kledzik <kledzik@apple.com>
2343 <rdar://problem/4222696> linker should probably warn about trying to export a hidden symbol
2344 * src/ld.cpp: if using -exported_symbols_list check each hidden atom as it is added to symbol table
2345 * src/Options.h,.cpp: add hasExportMaskList()
2346 * unit-tests/test-cases/exported_symbols_list-hidden: added test case
2349 2007-10-24 Nick Kledzik <kledzik@apple.com>
2351 * src/MachOWriterExecutable.hpp: keep old style dtrace probes externel for kernel builds
2354 2007-10-23 Nick Kledzik <kledzik@apple.com>
2356 <rdar://problem/4556199> unify error and warning messages
2357 <rdar://problem/5546450> -w should suppress warnings
2358 * src/ld.cpp: use warning() function
2359 * src/Options.h: remove emitWarnings()
2360 * src/MachOReaderDylib.hpp: use warning() function
2361 * src/MachOReaderRelocatable.hpp: use warning() function
2362 * src/Options.cpp: use and implement warning()
2363 * src/MachOWriterExecutable.hpp: use warning() function
2364 * unit-tests/test-cases/visibility-warning: verify -w suppresses warnings
2367 2007-10-23 Devang Patel <dpatel@apple.com>
2369 * src/ld.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2370 * src/LLVMReader.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2371 * src/MachOReaderDylib.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2372 * src/ObjectFile.h: Cover arm support inside __OPEN_SOURCE__ macro check.
2373 * src/MachOReaderRelocatable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2374 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
2375 * src/MachOWriterExecutable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2376 * src/ObjectDump.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2379 2007-10-22 Nick Kledzik <kledzik@apple.com>
2381 * src/Options.cpp: add support for LD_DEAD_STRIP and LD_WARN_COMMONS
2382 * src/MachOReaderRelocatable.hpp: fix problem with -dead_strip of ObjC literal pointers
2385 2007-10-22 Nick Kledzik <kledzik@apple.com>
2387 * src/Options.cpp: have -static arm code link with ld_classic (for now)
2390 2007-10-22 Nick Kledzik <kledzik@apple.com>
2392 <rdar://problem/5396826> Recognize all arm architectures
2393 * src/MachOReaderRelocatable.hpp: add support for all ARM sub-types
2394 * unit-tests/test-cases/cpu-sub-types: add test cases for all combinations of ARM sub-types
2397 2007-10-19 Nick Kledzik <kledzik@apple.com>
2399 * src/*: merge in arm support
2400 * unit-tests/test-cases/*: fix to work for arm and thumb
2402 ----- Tagged ld64-79
2404 2007-10-16 Nick Kledzik <kledzik@apple.com>
2406 * src/MachOWriterExecutable.hpp: if -r mode, always set custom alignment (SET_COMM_ALIGN) on common symbols
2407 * unit-tests/test-cases/visibility-warning-dylib-v-archive/Makefile: fix warning
2408 * unit-tests/test-cases/static-executable/Makefile: fix spurious failure
2411 2007-10-16 Nick Kledzik <kledzik@apple.com>
2413 * src/MachOWriterExecutable.hpp: fix edge case in branch island generation
2416 2007-10-12 Nick Kledzik <kledzik@apple.com>
2418 <rdar://problem/5323449> Add option to create old, slow stubs for i386
2419 * src/ObjectFile.h/.cpp: support -read_only_stubs
2420 * src/MachOWriterExecutable.hpp: enhance StubAtom<x86> to support old style __symbol_stub/__la_symbol_ptr stubs
2421 * unit-tests/test-cases/slow-x86-stubs: add test case
2424 2007-10-12 Nick Kledzik <kledzik@apple.com>
2426 <rdar://problem/5427952> ld64's re-export cycle detection logic prevents use of X11 libGL on Leopard
2427 * src/Options.cpp: in findFileUsingPaths() don't search for embedded dylibs
2428 * unit-tests/test-cases/indirect-path-search/Makefile: added case for a dylib embedded in a framework
2431 2007-10-11 Nick Kledzik <kledzik@apple.com>
2433 <rdar://problem/5451987> add option to disable implicit load commands for indirectly used public dylibs
2434 * src/Options.cpp: add support for -no_implicit_dylibs
2435 * src/ObjectFile.h: add fImplicitlyLinkPublicDylibs
2436 * src/MachOReaderDylib.hpp: test fImplicitlyLinkPublicDylibs before hoisting an implicitly linked dylib
2437 * unit-tests/test-cases/implicit_dylib: add test case
2440 2007-10-11 Nick Kledzik <kledzik@apple.com>
2442 <rdar://problem/5254413> -interposable_list
2443 * src/Options.h/cpp: Add fInterposeList and fInterposeMode to support -interposable_list
2444 * src/MachOWriterExecutable.hpp: pass symbol name to fOptions.interposable()
2445 * unit-tests/test-cases/interposable_list: add test case
2448 2007-10-10 Nick Kledzik <kledzik@apple.com>
2450 <rdar://problem/5529626> If only weak_import symbols are used, linker should use LD_LOAD_WEAK_DYLIB
2451 * src/MachOWriterExecutable.hpp: automatically use LC_LOAD_WEAK_DYLIB if all symbols used from a dylib are weak_import
2452 * unit-tests/test-cases/weak_dylib: added test case
2455 2007-10-10 Nick Kledzik <kledzik@apple.com>
2457 <rdar://problem/5504954> linker does not error when dylib ordinal exceeds 250
2458 * src/MachOWriterExecutable.hpp: error out if ordinals exceed max allowed
2461 2007-10-10 Nick Kledzik <kledzik@apple.com>
2463 <rdar://problem/4067110> overriding 'operator new' or 'operator delete' fails if no weak symbols are present
2464 * src/ld.cpp: at end of checkUndefines() search dylibs for weak versions of any global external symbols
2465 * src/ObjectFile.h: add hasWeakExternals() method to Reader
2466 * src/MachOReaderDylib.hpp: implement hasWeakExternals() method in Reader
2467 * src/ExecutableFile.h: add overridesDylibWeakDefines parameter to write()
2468 * src/MachOWriterExecutable.hpp: use overridesDylibWeakDefines parameter to write()
2469 * unit-tests/test-cases/operator-new: add test case
2472 2007-10-05 Nick Kledzik <kledzik@apple.com>
2474 <rdar://problem/5048861> No warning about tentative definition conflicting with dylib definition
2475 <rdar://problem/5132652> .comm variables in shared library, worked with XCode 2.4.1, broken with XCode 3?
2476 * src/ld.cpp: at end of checkUndefines() verify if any remaining commons conflict with dylibs
2477 * doc/man/man1/ld.1: document -commons and -warn_commons options
2478 * unit-tests/test-cases/tentative-and-dylib: added test case
2481 2007-10-05 Nick Kledzik <kledzik@apple.com>
2483 <rdar://problem/5346331> NS/CFString constants are not dead strippable
2484 * src/MachOReaderRelocatable.hpp: break up __cfstring section into one atom per cfstring, make them coalesable
2485 * unit-tests/test-cases/cfstring-coalesce: added test case
2488 2007-10-05 Nick Kledzik <kledzik@apple.com>
2490 <rdar://problem/5524973> Dead stripping + exported symbols list using wildcards doesn't seem to do the right thing
2491 * src/Options.cpp/h: add hasWildCardExportRestrictList()
2492 * src/ld.cpp: if dead stripping code and have wildcard exports, add all global atoms matching wildcards as roots
2493 * unit-tests/test-cases/exported-symbols-wildcards-dead_strip: added test case
2496 2007-10-04 Nick Kledzik <kledzik@apple.com>
2498 <rdar://problem/5433882> ld shouldn't search /Network/Library/Frameworks by default
2499 * src/Options.cpp: remove /Network/Library/Frameworks/ from default search path
2500 * doc/man/man1/ld.1: document the change
2503 2007-10-04 Nick Kledzik <kledzik@apple.com>
2505 <rdar://problem/5341567> all binaries should get LD_UUID load commands, not just those with DWARF symbols
2506 * src/ld.cpp: default fCreateUUID to be true for non object file output types
2507 * unit-tests/test-cases/no-uuid/Makefile: update test case to match new rules
2510 ----- Tagged ld64-78
2512 2007-09-27 Nick Kledzik <kledzik@apple.com>
2514 <rdar://problem/5476313> range check load commands
2515 * src/MachOReaderDylib.hpp: check that load commands all fit in load command size from header
2516 * src/MachOReaderRelocatable.hpp: check that load commands all fit in load command size from header
2519 2007-09-27 Nick Kledzik <kledzik@apple.com>
2521 <rdar://problem/5433355> Xc8M2540a: ld64 crashes when linking Pascal program
2522 * src/ld.cpp: fix findAtomAndOffset() to handle where there are no function atoms
2525 2007-09-27 Nick Kledzik <kledzik@apple.com>
2527 <rdar://problem/5241179> ADOBE Xcode 3: ld -dead_strip does not work with -init from an archive
2528 * src/ld.cpp: add bool parameter to entryPoint() so -init atom not looked for too soon
2529 * unit-tests/test-cases/dead_strip-init-archive: added test case
2532 2007-09-26 Nick Kledzik <kledzik@apple.com>
2534 <rdar://problem/5459546> Spurious link warnings for inline members of C++ template classes
2535 * src/ld.cpp: check definition kinds before warning about visibility mismatches
2536 * unit-tests/test-cases/visibility-warning: added test case
2539 2007-09-26 Nick Kledzik <kledzik@apple.com>
2541 <rdar://problem/5394172> an empty .o file with zero load commands will crash linker
2542 * src/MachOReaderRelocatable.hpp: have Reader constructor return early of no load commands
2543 * unit-tests/test-cases/empty-object: added test case
2546 2007-09-26 Nick Kledzik <kledzik@apple.com>
2548 <rdar://problem/5453384> 9a527: ppc64 branch islands fail with 4GB pagezeo
2549 * src/MachOWriterExecutable.hpp: start range calculations at start of __text not at zero.
2552 ----- Tagged ld64-77 (Xcode 3.0)
2554 2007-07-23 Nick Kledzik <kledzik@apple.com>
2556 <rdar://problem/5351380> Kernel is linked with some global symbols unsorted
2557 * src/MachOWriterExecutable.hpp: Add NListNameSorter to allow global atoms and extra labels to be sorted
2560 2007-07-20 Nick Kledzik <kledzik@apple.com>
2562 <rdar://problem/5254468> Can't do objc_msgSendSuper dispatches after loading a Fix&Continue bundle
2563 * src/MachOWriterExecutable.hpp: when calculating what kind of reloc to use, never use an
2564 external reloc to reference 32-bit ObjC symbols.
2567 2007-07-20 Nick Kledzik <kledzik@apple.com>
2569 <rdar://problem/5349847> Runtime crash with ICC math library on Leopard
2570 * src/MachOReaderRelocatable.hpp: detect if section starts with a symbol that is not
2571 aligned to section and correct it.
2574 ----- Tagged ld64-76
2576 2007-06-29 Nick Kledzik <kledzik@apple.com>
2578 <rdar://problem/5303718> export hiding does not work for frameworks
2579 * src/MachOReaderDylib.hpp: fix checks in isPublicLocation()
2580 * unit-tests/test-cases/symbol-moving: update to test frameworks as well as dylibs
2583 2007-06-27 Nick Kledzik <kledzik@apple.com>
2585 <rdar://problem/5299907> linker should use undefines from flat dylibs when linking a main flat
2586 * src/ObjectFile.h: added fLinkingMainExecutable
2587 * src/Options.cpp: set up fLinkingMainExecutable
2588 * src/MachOReaderDylib.hpp: when linking a main executable for flat namespace, the reader for
2589 any loaded flat namespace dylib will have a new atoms that has references to all undefined
2590 symbols in the dylib
2591 * unit-tests/test-cases/flat-indirect-undefines: added test case
2592 * doc/man/man1/ld.1: update man page to describe when dylib undefines are used
2595 2007-06-27 Nick Kledzik <kledzik@apple.com>
2597 <rdar://problem/5277857> OpenGL.framework and X11 both have a libGL.dylib which can cause ld to segfault if both are found
2598 * src/MachOReaderDylib.hpp: add assertNoReExportCycles() method
2599 * unit-tests/test-cases/dylib-re-export-cycle: added test case
2602 2007-06-27 Nick Kledzik <kledzik@apple.com>
2604 <rdar://problem/5286462> ld64 has slightly different warning message formats than the old ld
2605 * src/ld.cpp: standardize all warning messages to start with "ld: warning"
2606 * src/MachOWriterExecutable.hpp: ditto
2607 * src/MachOReaderRelocatable.hpp: ditto
2608 * src/MachOReaderDylib.hpp:ditto
2611 2007-06-26 Nick Kledzik <kledzik@apple.com>
2613 <rdar://problem/5297034> -dead_strip can cause duplicate external commons
2614 * src/ld.cpp: don't use discarded coalesced global atoms as dead strip roots
2615 * src/machochecker.cpp: error if duplicate external symbols
2616 * unit-tests/test-cases/commons-coalesced-dead_strip: added test case
2619 2007-06-26 Nick Kledzik <kledzik@apple.com>
2621 <rdar://problem/4135857> update man page that linker does not search indirect libraries with two-level namespace
2622 * doc/man/man1/ld.1: add new "Indirect dynamic libraries" section to man page
2625 2007-06-26 Nick Kledzik <kledzik@apple.com>
2627 <rdar://problem/5285473> Xc9A466: Exports file cannot use Mac line ends
2628 * src/Options.cpp: check for \r or \n when parsing .exp files
2629 * unit-tests/test-cases/exported_symbols_list-eol: added test case
2632 ----- Tagged ld64-75
2634 2007-05-31 Nick Kledzik <kledzik@apple.com>
2636 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
2637 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
2640 ----- Tagged ld64-74.5
2642 2007-05-31 Nick Kledzik <kledzik@apple.com>
2644 <rdar://problem/5241902> set OSO timestamp to zero for when building in buildit
2645 * src/ld.cpp: check for RC_RELEASE and if exists set all OSO timestamps to zero
2648 2007-05-30 Nick Kledzik <kledzik@apple.com>
2650 <rdar://problem/5224676> BUILD_STABS now causes ld of xnu to bus error
2651 * src/ld.cpp: Change || to && in collectStabs()
2654 ----- Tagged ld64-74.4
2656 2007-05-18 Nick Kledzik <kledzik@apple.com>
2658 <rdar://problem/5211667> static probes don't work with libraries in dyld shared cache
2659 * src/OpaqueSection.hpp: the __TEXT segment is executable
2662 ----- Tagged ld64-74.3
2664 2007-05-16 Nick Kledzik <kledzik@apple.com>
2666 <rdar://problem/5201463> ppc: linker adds stubs to cstring references
2667 * src/MachOWriterExecutable.hpp: update ppc stubableReference() to only allow high/low references
2668 to be stubed if they reference a symbol in some other dylib.
2669 * unit-tests/test-cases/stub-generation: added test case
2672 2007-05-16 Nick Kledzik <kledzik@apple.com>
2674 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2675 * src/MachOWriterExecutable.hpp: factored local tests into indirectSymbolIsLocal()
2676 * unit-tests/test-cases/non-lazy-r: added test case
2679 2007-05-15 Nick Kledzik <kledzik@apple.com>
2681 <rdar://problem/5198807> ld64 drops fix&continue bit in __OBJC, __image_info.
2682 * src/MachOReaderRelocatable.hpp: implement objcReplacementClasses()
2685 2007-05-15 Nick Kledzik <kledzik@apple.com>
2687 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2688 * src/MachOReaderRelocatable.hpp: use strncmp() for __objc_imageinfo since it is 16 bytes long
2689 * src/MachOWriterExecutable.hpp: specialize segment/section names for synthesized objc image info section
2692 2007-05-15 Nick Kledzik <kledzik@apple.com>
2694 * unit-tests/include/common.makefile: set COMPILER_PATH so harness works with latest compiler
2697 ----- Tagged ld64-74.2
2699 2007-05-11 Nick Kledzik <kledzik@apple.com>
2701 <rdar://problem/5195447> ld64-74.1 breaks libstdc++ DejaGnu test (G5 only)
2702 * src/MachOWriterExecutable.hpp: don't stub a reference if the target offset is non-zero
2705 ----- Tagged ld64-74.1
2707 2007-05-09 Nick Kledzik <kledzik@apple.com>
2709 * src/Options.h: add emitWarnings()
2710 * src/Options.cpp: wire up -w to emitWarnings()
2713 2007-05-09 Nick Kledzik <kledzik@apple.com>
2715 <rdar://problem/5137285> ld64 won't link wine (regression from Tiger)
2716 * src/Architectures.hpp: add x86::kPointerDiff16 and x86::kPCRel16
2717 * src/MachOReaderRelocatable.hpp: add support to parse new relocs
2718 * src/MachOWriterExecutable.hpp: add support fo new relocs
2721 2007-05-08 Nick Kledzik <kledzik@apple.com>
2723 <rdar://problem/5182537> need way for ld and dyld to see different exported symbols in a dylib
2724 * src/MachOReaderDylib.hpp: update parse and use $ld$ symbols
2725 * src/Options.h: move VersionMin to ReaderOptions
2726 * src/ObjectFile.h: move VersionMin to ReaderOptions
2727 * src/Options.cpp: move VersionMin to ReaderOptions
2728 * src/MachOWriterExecutable.hpp: move VersionMin to ReaderOptions
2729 * unit-tests/test-cases/symbol-moving: added test case
2732 2007-05-03 Nick Kledzik <kledzik@apple.com>
2734 <rdar://problem/5181105> typo in error message for linking -pie
2735 * src/MachOWriterExecutable.hpp: fix typo in error messages
2738 ----- Tagged ld64-74
2740 2007-05-03 Nick Kledzik <kledzik@apple.com>
2742 <rdar://problem/5171880> ld64 can't find @executable _path relative dylibs from our umbrella frameworks
2743 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
2744 * src/ObjectFile.h: add from parameter to findDylib()
2745 * src/MachOReaderDylib.hpp: supply from parameter to findDylib()
2746 * src/ld.cpp: use from parameter for @loader_path substitution in findDylib()
2747 * unit-tests/test-cases/re-export-relative-paths: added test case
2750 2007-05-02 Nick Kledzik <kledzik@apple.com>
2752 * src/ObjectFile.h: add fLogObjectFiles and fLogAllFiles
2753 * src/Options.cpp: hook up -t to fLogAllFiles and -whatsloaded to fLogObjectFiles
2754 * src/MachOReaderDylib.hpp: log if fLogAllFiles
2755 * src/MachOReaderRelocatable.hpp: log if fLogObjectFiles or fLogAllFiles
2756 * src/MachOReaderArchive.hpp: log if fLogAllFiles
2757 * doc/man/man1/ld.1: update man page
2760 2007-05-02 Nick Kledzik <kledzik@apple.com>
2762 <rdar://problem/5177848> typo in message, frameowrk
2763 * src/Options.cpp: fix typo
2766 2007-05-01 Nick Kledzik <kledzik@apple.com>
2768 <rdar://problem/4977301> "ld" man page is missing the description for many options
2769 * doc/man/man1/ld.1: add documentation on all obsolete options
2772 2007-05-01 Nick Kledzik <kledzik@apple.com>
2774 <rdar://problem/5113424> ld doesn't handle -mlong-branch .o files that have had local symbols stripped
2775 <rdar://problem/4965359> warning about dwarf line info with -mlong-branch
2776 * src/MachOReaderRelocatable.hpp: don't lop -mlong-branch stubs off end of functions
2777 * src/MachOWriterExecutable.hpp: allow code references besides BR24 to be stubable
2780 2007-04-30 Nick Kledzik <kledzik@apple.com>
2782 <rdar://problem/5065659> unable to link VTK because __textcoal_nt too large
2783 * src/MachOReaderRelocatable.hpp: when doing a final link map __textcoal_nt to __text
2786 2007-04-30 Nick Kledzik <kledzik@apple.com>
2788 <rdar://problem/5062685> ld does not report error when -r is used and exported symbols are not defined.
2789 <rdar://problem/4637139> ld leaves global common symbols not in exported symbols list.
2790 * src/ld.cpp: stop special casing -r mode in checkUndefines()
2791 * src/MachOWriterExecutable.hpp: don't create proxy atom in -r mode if it is supposed to be exported.
2792 mark tentative definitions are private extern in -r mode even without -keep_private_externs
2793 * unit-tests/test-cases/exported_symbols_list-r: added test case
2796 2007-04-27 Nick Kledzik <kledzik@apple.com>
2798 <rdar://problem/5137732> ld should keep looking when it finds a weak definition in a dylib
2799 * src/ld.cpp: modified addJustInTimeAtoms() to keep looking when a weak defintion is found
2800 * unit-tests/test-cases/weak-def-ordinal: added test case
2803 2007-04-27 Nick Kledzik <kledzik@apple.com>
2805 <rdar://problem/5166572> better error message for indirect dylibs missing required architecture
2806 * src/ld.cpp: when loading indirect dylib add path to error messages
2809 2007-04-25 Nick Kledzik <kledzik@apple.com>
2811 <rdar://problem/5109373> the i386 slice of dyld does not need __IMPORT segment
2812 * src/ObjectFile.h: add fForDyld
2813 * src/Options.cpp: set up fForDyld
2814 * src/MachOReaderRelocatable.hpp: if fForDyld, change __IMPORT segment to __DATA
2815 * src/MachOWriterExecutable.hpp: recognize __DATA/__pointers in dyld as a non-lazy section
2818 2007-04-24 Nick Kledzik <kledzik@apple.com>
2820 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2821 * src/MachOWriterExecutable.hpp: use INDIRECT_SYMBOL_LOCAL for any non-global symbol
2822 * unit-tests/test-cases/strip_local: update test case
2825 2007-04-24 Nick Kledzik <kledzik@apple.com>
2827 <rdar://problem/5150407> ld64 -sectorder and -order_file files don't accept white space following the :
2828 * src/Options.cpp: prune white space after colon and before symbol name
2829 * unit-tests/test-cases/order_file: update test case to have a space after the colon
2832 2007-04-24 Nick Kledzik <kledzik@apple.com>
2834 <rdar://problem/5055233> ld64 corrupts debug symbol table entries, nm doesn't print them
2835 * src/MachOWriterExecutable.hpp: properly set ilocalsym in module table
2838 2007-04-24 Nick Kledzik <kledzik@apple.com>
2840 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2841 * src/MachOReaderRelocatable.hpp: look for new objc info section name too
2844 2007-04-24 Nick Kledzik <kledzik@apple.com>
2846 * src/MachOWriterExecutable.hpp: fix -non_global_symbols_strip_list to work with -r
2847 * unit-tests/test-cases/local-symbol-partial-stripping: update test case
2851 ----- Tagged ld64-73.7
2853 2007-05-10 Nick Kledzik <kledzik@apple.com>
2855 <rdar://problem/5194804> can't use dtrace static probes in x86_64 dylib
2856 * src/MachOWriterExecutable.hpp: x86_64:kPointerDiff32 is ok in shared region
2857 * unit-tests/test-cases/dtrace-static-probes: update to build dylib too
2860 2007-05-09 Nick Kledzik <kledzik@apple.com>
2862 <rdar://problem/5191610> 9A430: using -dead_strip with static dtrace probes causes ld to crash
2863 * src/ld.cpp: fix markLive() to look at right name in dtrace probe refernce
2864 * unit-tests/test-cases/dtrace-static-probes: added -dead_strip case
2867 ----- Tagged ld64-73.6
2869 2007-04-17 Nick Kledzik <kledzik@apple.com>
2871 <rdar://problem/5140897> Add options to do partial stripping of local symbols
2872 * src/MachOWriterExecutable.hpp: use fOptions.keepLocalSymbol()
2873 * src/Options.cpp: implement -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2874 * src/Options.h: replace stripLocalSymbols() with localSymbolHandling() and keepLocalSymbol()
2875 * doc/man/man1/ld.1: document -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2876 * unit-tests/test-cases/local-symbol-partial-stripping: added test case
2879 ----- Tagged ld64-73.5
2881 2007-04-17 Nick Kledzik <kledzik@apple.com>
2883 <rdar://problem/5129379> ld64-73.3 XBS logging incorrectly reporting "direct" dynamic libraries
2884 * src/ld.cpp: restore direct vs indirect library for LD_TRACE_DYLIBS logging
2887 2007-04-16 Nick Kledzik <kledzik@apple.com>
2889 <rdar://problem/5067034> data initialized to a weak imported symbol is missing relocation
2890 * src/MachOWriterExecutable.hpp: check for A::kPointerWeakImport in buildExecutableFixups()
2891 * unit-tests/test-cases/weak_import: updated test case to catch this problem
2894 2007-04-13 Nick Kledzik <kledzik@apple.com>
2896 <rdar://problem/5071047> Support -U
2897 * src/MachOWriterExecutable.hpp: create proxies for -U symbols
2898 * src/Options.cpp: process -U
2899 * src/Options.h: add allowedUndefined() and someAllowedUndefines()
2900 * src/ld.cpp: create proxies for -U symbols
2901 * doc/man/man1/ld.1: document -U and -undefined options
2902 * unit-tests/test-cases/undefined-dynamic-lookup: added test case
2905 ----- Tagged ld64-73.4
2907 2007-04-12 Nick Kledzik <kledzik@apple.com>
2909 <rdar://problem/5125280> ld changes needed to support read-only DOF
2910 * src/Options.cpp: remove -read_only_dof
2911 * src/Options.h: remove fReadOnlyDOFs
2912 * src/ld.cpp: only generate read-only DOF sections
2915 ----- Tagged ld64-73.3.1
2917 2007-04-13 Nick Kledzik <kledzik@apple.com>
2919 <rdar://problem/5130496> -framework vecLib -framework Accelerate causes bad ordinals
2920 * src/MachOWriterExecutable.hpp: fix bug optimizeDylibReferences() when there are two readers with same install name
2923 ----- Tagged ld64-73.3
2925 2007-04-03 Nick Kledzik <kledzik@apple.com>
2927 * src/ld.cpp: read-only-dofs should use 32-bit offsets for x86_64
2928 * src/MachOReaderDylib.hpp: if "public" re-export is not marked implict, still mark it as re-exported
2931 2007-04-02 Nick Kledzik <kledzik@apple.com>
2933 <rdar://problem/5105971> if replacement file for -dylib_file is missing, warn instead of error
2934 * src/ld.cpp: a try/catch to turn -dylib_file error into a warning.
2935 * unit-tests/test-cases/dylib_file-missing: add test case
2936 * doc/man/man1/ld.1: update man page about -dead_strip_dylibs
2939 ----- Tagged ld64-73.2
2941 2007-03-31 Nick Kledzik <kledzik@apple.com>
2943 <rdar://problem/5102873> ld64-73: atom sorting error with duplicate zero sized bss symbols
2944 * src/MachOReaderRelocatable.hpp: suppress warning on sorting zero size zero fill atoms
2946 2007-03-31 Nick Kledzik <kledzik@apple.com>
2948 <rdar://problem/5102845> ld64-73 fails anything linking with -lm
2949 * src/ld.cpp: when processing dylbs that are sylinks ensure that fDylibMap contains all paths
2950 * src/MachOWriterExecutable.hpp: when dead stripping dylibs and renumbering ordinals make sure
2951 aliases dylib get renumbered too
2952 * unit-tests/test-cases/dylib-aliases: added
2955 ----- Tagged ld64-73.1
2957 2007-03-30 Nick Kledzik <kledzik@apple.com>
2959 * src/MachOWriterExecutable.hpp: back out use of LC_REEXPORT_DYLIB until rdar://problem/5009909 is in build fleet
2962 ----- Tagged ld64-73
2964 2007-03-30 Nick Kledzik <kledzik@apple.com>
2966 <rdar://problem/4175790> ER: -dead_strip_dylibs
2967 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
2968 * src/ObjectFile.h: change dylib reader interface to implictly/explicitlyLinked
2969 * src/ld.cpp: use new dylib reader interface
2970 * src/Options.h: add deadStripDylibs()
2971 * src/Options.cpp: support -dead_strip_dylibs
2972 * src/MachOReaderDylib.hpp: use new dylib reader interface
2973 * src/MachOWriterExecutable.hpp: remove dylib load commands for unused dylibs and alter ordinals
2974 * unit-tests/test-cases/re-export-optimizations: added
2975 * unit-tests/test-cases/dead_strip_dylibs: added
2978 2007-03-30 Nick Kledzik <kledzik@apple.com>
2980 * src/Options.cpp: enable -lfoo to search for libfoo.so as well as libfoo.dylib,
2981 remove seg addr table hack for transitioning to new linker
2983 2007-03-30 Nick Kledzik <kledzik@apple.com>
2985 <rdar://problem/5073800> ADOBE XCODE3: Linker is slow with large C++ .o files
2986 * src/MachOReaderRelocatable.hpp: the compiler generates stubs to weak functions in the
2987 same translation unit. Don't treat those like the spurios stubs to static functions.
2990 2007-03-29 Nick Kledzik <kledzik@apple.com>
2992 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
2993 * src/MachOReaderRelocatable.hpp: To handle duplicate labels properly, rework how atoms sizes are set
2994 by iterating through sorted fAtoms rather than fAddrToAtom, . Change default alignment of commons
2995 to be the natural alignment of the size rounded up to the closest power of two and max it at 12.
2996 Build atoms in reverse symbol table order so that global atoms are constructed before locals.
2997 This assures that if there is a global and local label at the same location, the global label
2998 will become the atom's name and the local will be an alias. Properly handle a label
2999 at the end of a section. Handle R_ABS in relocations. Handle sect-diff relocs with addends.
3000 Don't auto-strip 'l' symbols in static executables (mach_kernel).
3001 * src/OpaqueSection.hpp: opaque_section now has an ordinal
3002 * src/ld.cpp: opaque_section now requires an ordinal
3003 * src/ObjectFile.h: add ReaderOptions.fForStatic
3004 * src/Options.cpp: set fForStatic when building a static executable
3005 * src/MachOWriterExecutable.hpp: add from atom to StubAtom<ppc>. Properly write out i386
3006 sect-diff relocs with addends. properly write out ppc PICbase relocs where pic base
3010 2007-03-27 Nick Kledzik <kledzik@apple.com>
3012 <rdar://problem/5085863> Typo in ld man page (-exported_symbols_list)
3013 * doc/man/man1/ld.1: fix typo
3016 2007-03-26 Nick Kledzik <kledzik@apple.com>
3018 <rdar://problem/4727750> consider generating LC_UUID from a checksum of the file
3019 * src/Options.h: change emitUUID() to getUUIDMode()
3020 * src/Options.cpp: support -random_uuid
3021 * src/MachOWriterExecutable.hpp: set uuid to be md5 hash of entire output file
3024 2007-03-24 Nick Kledzik <kledzik@apple.com>
3026 * src/MachOWriterExecutable.hpp: restructure writeAtoms() to copy all atoms in memory if possible
3029 2007-03-24 Nick Kledzik <kledzik@apple.com>
3031 <rdar://problem/5082603> ld -r of stripped .o file can incorrectly merge non-lazy pointers
3032 * src/MachOWriterExecutable.hpp: when generating a .o file, non-lazy pointer with target offsets should be
3033 encoded as LOCAL in the indirect symbol table
3034 * unit-tests/test-cases/stripped-indirect-symbol-table: added test case
3037 2007-03-23 Nick Kledzik <kledzik@apple.com>
3039 <rdar://problem/5084564> SWB: ld64-72 errors building with gcc-4.2
3040 * src/MachOReaderDylib.hpp: add curly brackets in switch cases
3041 * src/MachOWriterExecutable.hpp: rearrange classes so there are no template specialization forward references
3044 2007-03-23 Nick Kledzik <kledzik@apple.com>
3046 * src/ld.cpp: fix -print_statistics when using -dead_strip
3049 2007-03-23 Nick Kledzik <kledzik@apple.com>
3051 * src/MachOReaderRelocatable.hpp: generate better names for non-lazy pointers to the interior of atoms
3054 2007-03-16 Nick Kledzik <kledzik@apple.com>
3056 * src/MachOWriterExecutable.hpp: speed up ld -r a little by reversing relocs en mas
3059 2007-03-16 Nick Kledzik <kledzik@apple.com>
3061 <rdar://problem/4975277> ld Bus Error on missing command line arguments
3062 * src/Options.cpp: check next argv[] is not NULL
3065 2007-03-16 Nick Kledzik <kledzik@apple.com>
3067 <rdar://problem/4832049> need to be able to order symbols in anonymous namespaces
3068 * src/ld.cpp: add logic to do fuzzy matching of symbols with anonymous namespace usage
3069 * unit-tests/test-cases/order_file-ans: added test case
3072 2007-03-16 Nick Kledzik <kledzik@apple.com>
3074 <rdar://problem/5042552> headerpad_max_install_names deprecated for 64-bit
3075 * src/ld.cpp: make sure dylib load command order matches command line order
3076 * src/Options.h: add maxMminimumHeaderPad()
3077 * src/Options.cpp: add maxMminimumHeaderPad() set by -headerpad_max_install_names
3078 * src/src/MachOWriterExecutable.hpp: check maxMminimumHeaderPad()
3079 * doc/man/man1/ld.1: update man page about -headerpad_max_install_names
3082 2007-03-16 Nick Kledzik <kledzik@apple.com>
3084 <rdar://problem/4592484> Linker returns success although exported symbols are undefined.
3085 * src/ld.cpp: turn missing symbols back into an error
3088 2007-03-16 Nick Kledzik <kledzik@apple.com>
3090 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
3091 * unit-tests/test-cases/loader_path: added test case
3094 2007-03-16 Nick Kledzik <kledzik@apple.com>
3096 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
3097 <rdar://problem/4142277> Indirect libraries should be found using -F and -L options
3098 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
3099 * src/ld.cpp: reworked all dylib processing. Readers can now add the dylib list.
3100 * src/Options.h: add findFileUsingPaths()
3101 * src/MachOReaderDylib.hpp: look in re-exported children instead of requring linker to do that
3102 * src/ObjectFile.h: add processIndirectLibraries(), remove getDependentLibraryPaths()
3103 * src/machochecker.cpp: support LC_REEXPORT_DYLIB
3104 * src/ExecutableFile.h: simplify DyLibUsed
3105 * src/Options.cpp: add findFileUsingPaths(). add new re-export options
3106 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
3107 * doc/man/man1/ld.1: updated with new re-export options
3108 * unit-tests/test-cases/indirect-path-search: added tests that -F and -L work with indirect dylibs
3109 * unit-tests/test-cases/re-export-cases: added tests for all combinations of re-exporting
3112 2007-03-14 Nick Kledzik <kledzik@apple.com>
3114 <rdar://problem/4982400> sort external relocations to optimize dyld performance
3115 * src/MachOWriterExecutable.hpp: added ExternalRelocSorter
3116 * src/machochecker.cpp: verify external relocations are grouped by symbol number
3117 * unit-tests/test-cases/external-reloc-sorting: added test case
3120 ----- Tagged ld64-72
3122 2007-03-06 Nick Kledzik <kledzik@apple.com>
3124 * src/Options.cpp: ignore .objc_category_name_* symbols in .exp files
3127 2007-03-06 Nick Kledzik <kledzik@apple.com>
3129 * src/Options.cpp: stop special casing mach_kernel and instead requre kernel to be built with -new_linker
3132 2007-03-06 Nick Kledzik <kledzik@apple.com>
3134 <rdar://problem/5044253> ld64-72 (experimental) is causing DejaGnu test failures
3135 * src/MachOWriterExecutable.hpp: add optimizableGOTReferenceKind() to track GOT uses that cannot be optimized
3138 2007-03-06 Nick Kledzik <kledzik@apple.com>
3140 <rdar://problem/5026135> minimum header padding should be 32 to allow code signing
3141 * src/Options.cpp: initialize fMinimumHeaderPad to 32
3142 * src/MachOWriterExecutable.hpp: better calculation of header padding
3145 2007-03-06 Nick Kledzik <kledzik@apple.com>
3147 <rdar://problem/5033206> Linker crashes with -flat_namespace against two-level dylibs that might have re-exports
3148 * src/ld.cpp: flat namespace should not allow NULL indirect readers
3151 2007-03-06 Nick Kledzik <kledzik@apple.com>
3153 * src/MachOReaderRelocatable.hpp: don't error on S_COALESCED sections with anonymous atoms
3154 * src/MachOWriterExecutable.hpp: set MH_PIE bit when linking -pie
3155 * ld64.xcodeproj/project.pbxproj: don't echo environment when running unit test
3158 2007-03-01 Nick Kledzik <kledzik@apple.com>
3160 * doc/man/man1/ld.1: Add descriptions to all "rarely used options"
3163 2007-03-01 Nick Kledzik <kledzik@apple.com>
3165 <rdar://problem/4971033> Remove support for Essential Symbols: Warn about use of -Sp option; remove man page entry
3166 * src/Options.cpp: make -Sp obsolete
3167 * doc/man/man1/ld.1: make -Sp obsolete
3170 2007-03-01 Nick Kledzik <kledzik@apple.com>
3172 <rdar://problem/5040314> Support -pie
3173 * src/Options.h: Add positionIndependentExecutable()
3174 * src/Options.cpp: Support -pie option to set positionIndependentExecutable()
3175 * src/MachOWriterExecutable: if -pie is used, add extra local relocations and error if any
3176 absolute addressing is used
3179 2007-03-01 Nick Kledzik <kledzik@apple.com>
3181 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
3182 * src/ld.cpp: Ensure segments are laid out in discovery order. Add support for kAbsoluteSymbol.
3183 Warn when merging symbols of different visiblity. Warn when a tentative definition
3184 is replaced by one a real definition with a smaller size. Lay out __common section
3185 so that ones built with -fno-commons come before regular commons.
3186 * src/ObjectFile.h: remove SegmentOffset ivar and getter/setters
3187 * src/machochecker.cpp: allow images with no r/w segments
3188 * src/MachOReaderRelocatable: Add AbsoluteAtom. Sort tentative definitions by name instead of by size
3189 Add support for custom commons alignment.
3190 * src/Options.cpp: Fix spurious -sectalign warnings. Don't use ld_classic when linking mach_kernel
3191 * src/MachOWriterExecutable.hpp: Support kAbsoluteSymbol atoms. In -r mode, set custom alignment
3192 for commons if alignment is not its size. Support global __dtrace_probe labels.
3193 * src/ObjectDump.cpp: add support for kAbsoluteSymbol atoms.
3194 * unit-tests/test-cases/commons-alignment: Added test case for custom commons alignment
3195 * unit-tests/test-cases/absolute-symbol: Added test case for basic absolute symbols
3196 * unit-tests/test-cases/segment-order: Added test case that segments lay out in discovery order
3197 * unit-tests/test-cases/commons-order: Added test case that commons lay out correctly
3198 * unit-tests/test-cases/end-label: Added test case that a label used to mark the end of a section does not
3199 get associcated with the next section.
3202 2007-02-23 Nick Kledzik <kledzik@apple.com>
3204 <rdar://problem/3965017> gcc-5005: DejaGnu failures due to -frepo
3205 * src/ld.cpp: Add quotes to referenced from name to make collect2 and -frepo happy
3208 2007-02-22 Nick Kledzik <kledzik@apple.com>
3210 * src/MachOWriterExecutable.hpp: rework how padding after load commands is calculated
3213 2007-02-21 Nick Kledzik <kledzik@apple.com>
3215 * src/MachOWriterExecutable.hpp: extend special case of __mh_execute_header to static executables too
3218 2007-02-21 Nick Kledzik <kledzik@apple.com>
3220 <rdar://problem/3882294> gcc link map option ( "-M" ) should be redirectable to file
3221 * doc/man/man1/ld.1: added -map option description
3222 * src/Options.h: added generatedMapPath()
3223 * src/Options.cpp: set up generatedMapPath() if -map option is used
3224 * src/MachOWriterExecutable.hpp: add writeMap() method to generate map file
3227 2007-02-19 Nick Kledzik <kledzik@apple.com>
3229 <rdar://problem/4557734> Implement GOT Load elimination optimization
3230 * src/ld.cpp: track size of all atoms and if > 2GB sort large zero-fill atoms to end
3231 * src/MachOWriterExecutable.hpp: If image size < 2GB, only generate GOT entries if value must be
3232 updatable by dyld. If > 2GB, only eliminate GOT entries to non-zero-fill atoms. Any use
3233 of an eliminated GOT entry has its code changed from MOVQ _foo@GOT(%rip) to LEAQ _foo(%rip).
3234 * unit-tests/test-cases/large-data: added
3235 * unit-tests/test-cases/got-elimination: added
3238 ----- Tagged ld64-71.2
3240 2007-02-13 Nick Kledzik <kledzik@apple.com>
3242 <rdar://problem/4995303> new ld ignores -segprot option
3243 * src/Options.h: expose customSegmentProtections()
3244 * src/Options.cpp: parse -segprot option and populate customSegmentProtections()
3245 * src/MachOWriterExecutable.hpp: use customSegmentProtections()
3248 2007-02-13 Nick Kledzik <kledzik@apple.com>
3250 <rdar://problem/4988068> i386 -stack_addr doesn't work
3251 * src/MachOWriterExecutable.hpp: use correct offset into thread state record
3254 ----- Tagged ld64-71.1
3256 2007-02-07 Nick Kledzik <kledzik@apple.com>
3258 * src/ld.cpp: sort __OBJC2 segment to be next to __OBJC segment
3261 2007-02-07 Nick Kledzik <kledzik@apple.com>
3263 * src/Options.cpp: change missing -seg_addr_table from an error to a warning
3266 2007-02-06 Nick Kledzik <kledzik@apple.com>
3268 <rdar://problem/4977311> Leopard 9A357: -dylib_file broken?
3269 * src/MachOWriterExecutable.hpp: remove use of fInstallPathOverride
3270 * src/Options.cpp: wire up -dylib_file option
3271 * src/Options.h: remove fInstallPathOverride. add fDylibOverrides
3272 * src/ld.cpp: check dylibOverrides() for indirect libraries
3273 * unit-tests/test-cases/dylib_file: add test case
3276 2007-02-05 Nick Kledzik <kledzik@apple.com>
3278 * src/MachOReaderDylib.hpp: don't warn about zero size __image_info sections
3281 2007-02-04 Rick Balocca <rbalocca@apple.com>
3282 Enable the failing cases for missing command line arguments
3284 2007-02-04 Rick Balocca <rbalocca@apple.com>
3285 Make sure that all .o's are checked by ObjectDump
3286 and all macho are checked by machochecker
3288 2007-02-04 Rick Balocca <rbalocca@apple.com>
3289 Fix an endian problem with machochecker
3290 Fix blank-stubs Makefile
3292 ----- Tagged ld64-71
3294 2007-02-02 Rick Balocca <rbalocca@apple.com>
3295 blank-stubs test case: handle the case of a native ppc compile--this
3296 sets the subtype, which must be passed to lipo
3298 2007-02-01 Rick Balocca <rbalocca@apple.com>
3299 make cpu-sub-types test more robust
3301 2007-02-01 Rick Balocca <rbalocca@apple.com>
3302 auto-arch tests were resulting in a false FAILs
3304 2007-02-01 Rick Balocca <rbalocca@apple.com>
3305 test cpu-sub-types was resulting in a false FAIL
3307 2007-02-01 Nick Kledzik <kledzik@apple.com>
3309 <rdar://problem/4969335> STD:VSC: c99 -o writes to file that does not have write permission
3310 * src/MachOWriterExecutable.hpp: check file is writable before using it
3312 2007-02-01 Nick Kledzik <kledzik@apple.com>
3314 <rdar://problem/4965743> debug map (N_OSO) timestamps for object files in ranlib archive are incorrect
3315 * src/MachOReaderArchive.hpp: parse modTime for .o files out of archive header
3317 2007-01-31 Nick Kledzik <kledzik@apple.com>
3319 <rdar://problem/4967535> 9A354: ld -all_load does *NOT* produce the same dSYM as *.o or -u
3320 * src/ld.cpp: when using -all_load don't assume that all atoms have same reader
3321 * unit-tests/test-cases/dwarf-archive-all_load: added
3323 ----- Tagged ld64-70.1
3325 2007-01-31 Nick Kledzik <kledzik@apple.com>
3327 * src/MachOWriterExecutable.hpp: in addObjectRelocs_powerpc() mask scattered r_address to 16-bits
3329 ----- Tagged ld64-70
3332 2007-01-30 Nick Kledzik <kledzik@apple.com>
3334 <rdar://problem/4810668> linker should verify GC consistency of modules being linked into library
3335 <rdar://problem/4474195> Support cpu-sub-types for ppc
3336 * src/ObjectFile.h: Add getObjCConstraint() and getCpuConstraint()
3337 * src/MachOReaderRelocatable.hpp: don't make atom for __image_info section, instead parse constaints
3338 * src/MachOReaderDylib.hpp: look at __image_info content to get constaints
3339 * src/ld.cpp: add updateContraints() and checkObjc()
3340 * src/MachOWriterExecutable.hpp: add ObjCInfoAtom to sythesize __image_info content
3343 2007-01-28 Nick Kledzik <kledzik@apple.com>
3345 src/*: remove ObjectFile::requiresFollowOnAtom() method
3348 2007-01-28 Nick Kledzik <kledzik@apple.com>
3350 src/ld.cpp: enable LLVM_SUPPORT by default
3351 src/LLVMReader.hpp: don't use absolute paths for llvm headers and libraries
3354 2007-01-26 Rick Balocca <rbalocca@apple.com>
3355 * src/ObjectDump.cpp: The usage() message was incorrect.
3358 2007-01-25 Rick Balocca <rbalocca@apple.com>
3359 * unit-tests/test-cases/zero-fill3: It was reporting FAIL on ld64 error return.
3360 It should have been checking for non-error return.
3363 2007-01-24 Nick Kledzik <kledzik@apple.com>
3365 <rdar://problem/4952297> x86 fast stubs should not cross 64-byte boundries
3366 * src/MachOWriterExecutable.hpp: for x86, 64-byte align __jump_table section
3367 and make 64-btye crossing stubs be empty entries with indirect symbol table
3368 entry of INDIRECT_SYMBOL_ABS
3371 2007-01-19 Nick Kledzik <kledzik@apple.com>
3373 * src/Options.h: add readOnlyx86Stubs()
3374 * src/Options.cpp: support -read_only_stubs
3375 * src/MachOWriterExecutable.hpp: make __IMPORT segment not writable if -read_only_stubs is used
3378 2007-01-16 Eric Christopher <echristo@apple.com>
3380 <rdar://problem/4856341> ld64 --help isn't recognized
3381 * src/Options.cpp (Options::parse): Support --help and -help.
3384 2007-01-15 Nick Kledzik <kledzik@apple.com>
3386 * src/MachOFileAbstraction.hpp: add range checking on macho_scattered_relocation_info::set_r_address()
3389 2007-01-14 Nick Kledzik <kledzik@apple.com>
3391 <rdar://problem/4514409> Support wildcards in contents of -exported_symbols_list
3392 * src/Options.h: add SetWithWildcards class
3393 * src/Options.cpp: add -exported_symbol and -unexported_symbol and use SetWithWildcards
3394 * doc/man/man1/ld.1: add -exported_symbol and wildcard explanation
3395 * unit-tests/test-cases/exported-symbols-wildcards: added test case
3398 2007-01-10 Nick Kledzik <kledzik@apple.com>
3400 <rdar://problem/4868270> [U]SDT probes should use C calling convention
3401 * src/Options.cpp: Add -read_only_dof
3402 * src/ld.cpp: create __dof section(s) based on probe and isenabled sites
3403 * src/MachOReaderRelocatable.hpp: parse new sdt 2.0 probes encoded in .o files
3404 * src/MachOWriterExecutable.hpp: handle regenerating dtrace probes into .o files
3405 * unit-tests/test-cases/dtrace-static-probes: added test case
3408 ----- Tagged ld64-69.8
3410 2007-01-30 Nick Kledzik <kledzik@apple.com>
3412 <rdar://problem/4964508> Support LD_FORCE_NO_SEG_ADDR_TABLE
3413 * src/Options.cpp: Support LD_FORCE_NO_SEG_ADDR_TABLE
3416 ----- Tagged ld64-69.7
3418 2007-01-25 Nick Kledzik <kledzik@apple.com>
3420 <rdar://problem/4949507> Leopard9A351: CFM Apps Are Broken because CFM glue is missing
3421 * src/MachOReaderRelocatable.hpp: check S_ATTR_NO_DEAD_STRIP in dontDeadStrip()
3424 ----- Tagged ld64-69.6
3426 2007-01-24 Nick Kledzik <kledzik@apple.com>
3428 <rdar://problem/4947347> LD_TRACE_ARCHIVES should only print out when a .o is actually used from an archive
3429 * src/ld.cpp: create and use logArchive()
3432 ----- Tagged ld64-69.5
3434 2007-01-22 Nick Kledzik <kledzik@apple.com>
3436 <rdar://problem/4946075> 9A350: can't link ppc programs with ld_classic
3437 * src/Options.cpp: Remove support for LD_NO_CLASSIC_LINKER. Add support for -classic_linker
3440 ----- Tagged ld64-69.4
3442 2007-01-17 Nick Kledzik <kledzik@apple.com>
3444 <rdar://problem/4925645> QTComponents does not link with ld64
3445 * src/MachOReaderRelocatable.hpp: handle N_RSYM and N_PSYM stabs
3448 ----- Tagged ld64-69.3
3450 2007-01-03 Nick Kledzik <kledzik@apple.com>
3452 * src/Options.cpp: If the same dylib is specified twice and the second is specified weak, make it weak
3455 ----- Tagged ld64-69.2
3457 2006-12-18 Nick Kledzik <kledzik@apple.com>
3459 <rdar://problem/4889729> -dead_strip without -exported_symbols_list should not strip global functions from archives
3460 * src/ld.cpp: when adding a .o file from an archive, add all its global symbols to live roots
3461 * unit-tests/test-cases/dead_strip-archive: added
3464 2006-12-18 Nick Kledzik <kledzik@apple.com>
3466 <rdar://problem/4889409> flat_namespace main executables do not need to indirect interior references
3467 * src/MachOWriterExecutable.hpp: don't indirect references to global symbols in main executables
3468 * unit-tests/test-cases/flat-main: updated to test for indirection
3469 * unit-tests/test-cases/flat-dylib: added
3472 ----- Tagged ld64-69.1
3474 2006-12-15 Nick Kledzik <kledzik@apple.com>
3476 <rdar://problem/4886721> -flat_namespace does not work with -mdynamic-no-pic
3477 * src/MachOWriterExecutable.hpp: rework checking for use of ppc absolute addressing to allow them as long as
3478 the target is within the same linkage unit.
3481 2006-12-15 Nick Kledzik <kledzik@apple.com>
3483 <rdar://problem/4886652> -ObjC should only load .o with .objc_ symbols
3484 * src/Options.cpp: remove warning from -ObjC and have it instead set fLoadAllObjcObjectsFromArchives
3485 * src/MachOReaderArchive.hpp: when -ObjC is used, preload all .o files from archives that contain .objc_ symbols
3488 ----- Tagged ld64-69
3490 2006-12-13 Nick Kledzik <kledzik@apple.com>
3492 <rdar://problem/4879913> prebound interior pointers must be non-zero
3493 * src/MachOWriterExecutable.hpp: in fixUpReference_powerpc() set lazy pointers bound to with the dylib to
3494 their target value. Properly set REFERENCE_FLAG_UNDEFINED_* flags in reference table and n_desc
3497 2006-12-09 Nick Kledzik <kledzik@apple.com>
3499 <rdar://problem/4868738> ld64 fails to detect error that ld_classic does
3500 * src/MachOWriterExecutable.hpp: check for absolute reloc to an external symbol
3501 * src/MachOReaderRelocatable.hpp: ignore -mlong-branch stubs in .o files
3504 2006-12-09 Nick Kledzik <kledzik@apple.com>
3506 <rdar://problem/4874209> symbols with REFERENCED_DYNAMICALLY should never be stripped
3507 * src/MachOWriterExecutable.hpp: update Writer<A>::shouldExport() to check for kSymbolTableInAndNeverStrip
3508 * unit-tests/test-cases/main-stripped: add test that dynamically referenced symbol cannot be stripped
3511 2006-12-08 Nick Kledzik <kledzik@apple.com>
3513 * unit-tests/test-cases/allowable-client: add variant test cases (e.g. CoreServices_profile)
3514 * src/ld.cpp: allow frameworks with variant install names (e.g. CoreServices_profile) to be private clients
3517 2006-12-08 Nick Kledzik <kledzik@apple.com>
3519 * doc/man/man1/ld.1: rewrite man page
3520 * src/Options.h: add warnObsolete()
3521 * src/Options.cpp: use warnObsolete() on many options. Make nonWeak the weak-mis-match default.
3522 Make -ObjC mean -all_load.
3524 ----- Tagged ld64-68.3
3526 2006-12-05 Nick Kledzik <kledzik@apple.com>
3528 * src/ld.cpp: allow umbrella frameworks to have variant install names (e.g. CoreServices_profile) and still link
3531 ----- Tagged ld64-68.2
3533 2006-12-05 Nick Kledzik <kledzik@apple.com>
3535 * src/MachOWriterExecutable.cpp: Use N_PBUD in the symbol table for undefined symbols in prebound dylibs
3538 ----- Tagged ld64-68.1
3540 2006-12-01 Nick Kledzik <kledzik@apple.com>
3542 * src/Options.cpp: always generate module tables for 32-bit architectures so that ld_classic
3543 can link against them
3546 ----- Tagged ld64-68
3548 2006-12-01 Nick Kledzik <kledzik@apple.com>
3550 <rdar://problem/4858299> seg_addr_table needs matching fuzziness
3551 * src/Options.cpp: special case a how a dozen dylib are looked up in the seg_addr_table
3554 2006-12-01 Nick Kledzik <kledzik@apple.com>
3556 * src/Options.cpp: have all -static links for 32-bit archs roll over to ld_classic unless
3557 LD_NO_CLASSIC_LINKER_STATIC is set.
3558 * unit-tests/bin/make-recursive.pl: set LD_NO_CLASSIC_LINKER_STATIC for unit tests
3561 2006-11-29 Nick Kledzik <kledzik@apple.com>
3563 <rdar://problem/4855542> ld64-67: QTComponents fails to build
3564 * src/MachOReaderRelocatable.hpp: don't error out when a local non-lazy pointer does not point to a symbol
3565 * unit-tests/test-cases/strip_local: added test case
3568 2006-11-28 Nick Kledzik <kledzik@apple.com>
3570 <rdar://problem/4433496> Need a way to mark libraries usable by dynamic linker but unusable by static linker
3571 * src/Options.cpp: allow -client_name to be used with main executables
3572 * src/ld.cpp: generalize -allowable_client. Any dylib can now restrict who can link against it. As a convention
3573 linking with -allowable_client '!' will mean no one can statically link with the dylib. It can still be loaded
3574 dynamically, or by any existing clients, but no new clients can link with it.
3575 * unit-tests/test-cases/allowable-client/Makefile: enable previously commented out test cases. Add test cases
3576 of a dylib that allows no clients and just one client
3578 2006-11-27 Nick Kledzik <kledzik@apple.com>
3580 <rdar://problem/4795615> -final_output should be used if -install_name not used
3581 * src/Options.cpp: fall back to using -final_output for install name
3584 ----- Tagged ld64-67
3586 2006-11-17 Nick Kledzik <kledzik@apple.com>
3588 * src/MachOWriterExecutable.hpp: support __IMPORT segment being slide independently of __DATA segment in shared cache
3591 2006-11-16 Nick Kledzik <kledzik@apple.com>
3593 <rdar://problem/4838262> 9a303: ld -filelist Bus Error
3594 * src/Options.cpp: add check that -filelist is followed by an argument
3597 2006-11-16 Nick Kledzik <kledzik@apple.com>
3599 * src/MachOWriterExecutable.hpp: when building split-seg dylibs, LINKEDIT goes in read-only side
3602 2006-11-15 Nick Kledzik <kledzik@apple.com>
3604 * src/MachOWriterExecutable.hpp: set proper attributes for __eh_frame in ld -r mode
3605 * unit-tests/test-cases/eh_frame: added test case
3608 2006-11-10 Nick Kledzik <kledzik@apple.com>
3610 * src/MachOReaderRelocatable.hpp: redirect references to static weak stubs to the real target
3613 2006-11-09 Nick Kledzik <kledzik@apple.com>
3615 * src/MachOWriterExecutable.hpp: r_address is offset from first LC_SEGMENT vmaddr - not from segment with lowest address
3618 ----- Tagged ld64-66.1
3620 2006-11-09 Nick Kledzik <kledzik@apple.com>
3622 * src/MachOWriterExecutable.hpp: initialize fModuleInfoAtom to zero
3625 2006-11-08 Nick Kledzik <kledzik@apple.com>
3627 <rdar://problem/4821985> FSF GCC's libjava doesn't link with Ochre ld64
3628 * src/MachOReaderRelocatable.hpp: ignore debug_line section if debug_info section is missing or empty
3630 ----- Tagged ld64-66
3632 2006-11-07 Nick Kledzik <kledzik@apple.com>
3634 <rdar://problem/4824368> SWB: d64-65 does not built usage split-seg dylibs
3635 * src/MachOWriterExecutable.hpp: when prebinding split-seg correctly set r_address fields and on
3636 disk values for external relocations
3637 * unit-tests/test-cases/prebound-split-seg: added test case
3640 2006-11-03 Nick Kledzik <kledzik@apple.com>
3642 * src/MachOReaderDylib.hpp: don't report dependent libraries if MH_NO_REEXPORTED_DYLIBS bit is set
3643 * src/MachOWriterExecutable.hpp: set MH_NO_REEXPORTED_DYLIBS bit if dylib does not logically re-export any other dylibs
3644 * unit-tests/test-cases/re-export-flag: added test case
3645 * src/machochecker.cpp: validate use of MH_NO_REEXPORTED_DYLIBS
3648 2006-11-02 Nick Kledzik <kledzik@apple.com>
3650 <rdar://problem/4814565> Mysterious messages from ld64 with MACOSX_DEPLOYMENT_TARGET = 10.5
3651 * src/MachOWriterExecutable.hpp: kPointerWeakImport is a valid reference type to cross segments
3654 2006-11-02 Nick Kledzik <kledzik@apple.com>
3656 * src/Options.cpp,h: Add support for -rpath
3657 * src/MachOFileAbstraction.hpp: add macho_rpath_command
3658 * src/MachOWriterExecutable.hpp: add RPathLoadCommandsAtom to create LC_RPATH for each -rpath
3661 ----- Tagged ld64-65
3663 2006-10-30 Nick Kledzik <kledzik@apple.com>
3665 <rdar://problem/4729162> x86_64 default stack_addr is wrong
3666 * src/Options.cpp: change default 64-bit stack location when using -stack_size
3669 2006-10-30 Nick Kledzik <kledzik@apple.com>
3671 <rdar://problem/4474316> dylibs need modules for 10.3 and for ld_classic in Salt
3672 * src/MachOWriterExecutable.hpp: add ModuleInfoLinkEditAtom to create module table stuff
3673 * src/Options.cpp,h: Add needsModuleTable()
3674 * src/MachOFileAbstraction.hpp: Add macho_dylib_module, macho_dylib_reference, and macho_dylib_table_of_contents
3677 2006-10-27 Nick Kledzik <kledzik@apple.com>
3679 * unit-tests/test-cases/no-uuid/Makefile: add -gstabs+ to be compatible with latest compiler
3680 * unit-tests/test-cases/stabs-coalesce/Makefile: add -gstabs+ to be compatible with latest compiler
3683 2006-10-26 Nick Kledzik <kledzik@apple.com>
3685 <rdar://problem/4585230> i386 -mdynamic-no-pic switch statement jump table is out of line
3686 * src/MachOWriterExecutable.hpp: for i386 don't check for direct references to weak symbols
3689 2006-10-26 Devang Patel <dpatel@apple.com>
3691 * src/LLVMReader.hpp: Supply final output file path to optimizer.
3693 2006-10-26 Devang Patel <dpatel@apple.com>
3695 * src/ObjectFile.h: Make setSection* methods virtual.
3696 * src/LLVMReader.hpp: Override setSection* methods.
3698 2006-10-26 Devang Patel <dpatel@apple.com>
3700 * unit-tests/test-case/llvm-integration/a13.h: New.
3701 * unit-tests/test-case/llvm-integration/a13.cc: New.
3702 * unit-tests/test-case/llvm-integration/main13.cc: New.
3704 2006-10-26 Devang Patel <dpatel@apple.com>
3706 * src/options.h, src/options.cpp: Add -save-temps command line option.
3707 * src/LLVMReader.hpp: Use saveTemps option.
3710 2006-10-26 Devang Patel <dpatel@apple.com>
3712 * src/LLVMReader.hpp: Remove invalid module from memory.
3714 2006-10-26 Devang Patel <dpatel@apple.com>
3716 * src/LLVMReader.hpp: Collect symbol alignment info from LLVM optimizer.
3718 2006-10-21 Eric Christopher <echristo@apple.com>
3720 * src/ld.cpp (Linker::Linker): Check for LD_NO_CLASSIC_LINKER before
3721 invoking ld_classic.
3722 * unit-tests/test-cases/relocs-literals/Makefile: Run for -mdynamic-no-pic
3724 * unit-tests/test-cases/static-executable/Makefile: Skip for 64-bit. Add
3725 -dead_strip to command line.
3727 ----- Tagged ld64-64.2
3729 2006-10-19 Nick Kledzik <kledzik@apple.com>
3731 * ld64.xcodeproj/project.pbxproj: stop copying LLVMReader.hpp into man1 directory
3733 ----- Tagged ld64-64.1
3735 2006-10-19 Nick Kledzik <kledzik@apple.com>
3737 <rdar://problem/4791643> ld64-63.1 erroneously coalesces an empty string with a non-empty string
3738 * src/MachOReaderRelocatable.hpp: rework cstring parsing to not assume all strings are start
3739 at section alignment boundaries, and when coalescing empty strings always use one with greatest
3740 alignment requirement
3741 * src/MachOWriterExecutable.hpp: in -r mode, don't pad end of cstring section
3742 * src/ObjectFile.h: correctly name leadingZeros() as trailingZeros()
3743 * src/ld.cpp: leadingZeros() --> trailingZeros()
3746 2006-10-18 Eric Christopher <echristo@apple.com>
3748 * unit-tests/test-cases/read-only-relocs/Makefile: Skip for x86_64.
3749 * unit-tests/test-cases/llvm-integration/Makefile: Skip if llvm isn't
3752 2006-10-18 Nick Kledzik <kledzik@apple.com>
3754 <rdar://problem/4783853> ld64 change required to go with assembler cstring change
3755 <rdar://problem/4732996> ld64 should error when a local relocation references an address outside its section
3756 * src/MachOReaderRelocatable.hpp: for x86_64 in order to work with local or external relocations to cstrings
3757 change parser to allow atoms with a pending name that is resolved after references are instantiated.
3758 Make direct references to kRegularDefinition atoms.
3759 * src/MachOWriterExecutable.hpp: in -r mode for x86_64 generate L* labels for cstrings and use external relocations
3760 * unit-tests/test-cases/relocs-literals/test.c: add two cases of cstring literal plus addend
3763 2006-10-06 Nick Kledzik <kledzik@apple.com>
3765 <rdar://problem/4786250> check MACOSX_DEPLOYMENT_TARGET if -macosx_version_min is not used
3766 * src/Options.cpp: if -macosx_version_min is not used, check MACOSX_DEPLOYMENT_TARGET, if
3767 that is unused, default to 10.5
3769 ----- Tagged ld64-64
3771 2006-10-06 Nick Kledzik <kledzik@apple.com>
3773 <rdar://problem/4756806> crash in ppc64 program - bl to saveFP, but saveFP is too far away?
3774 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands(), properly account for growth of __text
3777 2006-10-06 Nick Kledzik <kledzik@apple.com>
3779 <rdar://problem/4769120> Linker-defined alias converts reference into definition and generates error.
3780 * src/MachOReaderRelocatable.hpp: only alias symbols actually in the symbol table
3783 2006-10-06 Nick Kledzik <kledzik@apple.com>
3785 * unit-tests/test-cases/dwarf-debug-notes/Makefile: crt1.o no longer has stabs, so don't need to strip it
3786 * unit-tests/test-cases/dwarf-debug-notes-r/Makefile: crt1.o no longer has stabs, so don't need to strip it
3789 2006-10-06 Nick Kledzik <kledzik@apple.com>
3791 * src/MachOReaderRelocatable.hpp: rework dwarf line parsing to fix warnings that starting
3792 showing up with gcc-5421
3795 2006-10-05 Eric Christopher <echristo@apple.com>
3797 <rdar://problem/4760935> ld64 needs to support libtool options
3798 * src/Options.cpp (Options::parse): Add -noall_load, -install_name,
3799 -current_version and -compatibility_version.
3801 2006-10-03 Eric Christopher <echristo@apple.com>
3803 * src/Options.cpp (Options::gotoClassicLinker): Use execvp
3806 2006-10-03 Eric Christopher <echristo@apple.com>
3808 * unit-tests/test-cases/tentative-to-real/Makefile: Clean up after tests.
3810 2006-10-03 Eric Christopher <echristo@apple.com>
3812 * unit-tests/include/common.makefile (VALID_ARCHS): Add x86_64.
3813 (OTOOL): Remove munging based on ARCH.
3815 2006-09-29 Nick Kledzik <kledzik@apple.com>
3817 <rdar://problem/4743925> problem merging .o files built with and without -fno-common
3818 src/Options.*: make MakeTentativeDefinitionsReal a reader option
3819 src/ObjectFile.h: make MakeTentativeDefinitionsReal a reader option
3820 src/MachOWriterExecutable.hpp: make MakeTentativeDefinitionsReal a reader option
3821 src/MachOReaderRelocatable.hpp: only assign a section name of __common to
3822 tentative defintions when making a final linked image
3825 2006-09-28 Nick Kledzik <kledzik@apple.com>
3827 src/Options.h/.cpp: add support for -segaddr option
3828 src/MachOWriterExecutable.hpp: In Writer::assignFileOffsets(), use -segaddr info
3831 2006-09-28 Nick Kledzik <kledzik@apple.com>
3833 <rdar://problem/4587349> Emit new CPU subtypes for ppc64 and x86-64 when targeting 10.5 or later
3834 src/MachOWriterExecutable.hpp: set high bit of cpusubtype of 64-bit main executables when targeting 10.5 or later
3837 2006-09-28 Devang Patel <dpatel@apple.com>
3839 Add LLVM LTO support
3840 src/LLVMReader.hpp: New file.
3841 src/ld.cpp: Add optimization phase. Use LLVM LTO.
3842 unit-tests/test-cases/llvm-integration: New tests.
3844 2006-09-27 Nick Kledzik <kledzik@apple.com>
3846 ld64.xcodeproj/project.pbxproj: remove accidental install of source file into man1
3849 2006-09-25 Nick Kledzik <kledzik@apple.com>
3851 src/Architectures.hpp: add kPointerDiff16 for ppc and ppc64
3852 src/MachOReaderRelocatable.hpp: support kPointerDiff16
3853 src/MachOWriterExecutable.hpp: support kPointerDiff16
3855 ----- Tagged ld64-63.1
3857 2006-09-22 Nick Kledzik <kledzik@apple.com>
3859 src/MachOWriterExecutable.hpp: include stubs in LC_SEGMENT_SPLIT_INFO
3862 2006-09-21 Nick Kledzik <kledzik@apple.com>
3864 src/Options.cpp: disable split-seg dylibs for 64-bit architectures
3867 2006-09-19 Nick Kledzik <kledzik@apple.com>
3869 src/MachOReaderRelocatable.hpp: rework __cstring parsing to better handle mixed alignment cstrings
3870 src/MachOWriterExecutable.hpp: in -r mode, make all __cstrings aligned to section alignment
3873 2006-09-19 Nick Kledzik <kledzik@apple.com>
3875 src/MachOWriterExecutable.hpp: rework encoding of LC_SEGMENT_SPLIT_INFO
3878 2006-09-19 Nick Kledzik <kledzik@apple.com>
3880 src/Options.cpp: check for -search_paths_first in first pass
3883 ----- Tagged ld64-63
3885 2006-09-15 Nick Kledzik <kledzik@apple.com>
3887 src/Options.cpp: since the ld64 will repeatedly search an archive, and some project list archives
3888 multiple times on command line to work with traditional linkers, automatically ignore duplicate libraries
3889 unit-tests/test-cases/archive-duplicate: added test case
3892 2006-09-15 Nick Kledzik <kledzik@apple.com>
3894 src/Options.cpp: support -r -static
3895 src/MachOWriterExecutable.hpp: support -r -static an don't generate LC_DYSYMTAB
3898 2006-09-14 Nick Kledzik <kledzik@apple.com>
3900 src/MachOWriterExecutable.hpp: in -r mode references to weak symbols should not create external relocations
3901 as that can cause nmedit to errror later.
3904 2006-09-13 Nick Kledzik <kledzik@apple.com>
3906 <rdar://problem/4718189> ld64: Handle .objc_class_name exports specially
3907 src/Options.cpp: add hack so that .objc_class_name_XXX in -exported_symbols_list imples _OBJC_CLASS_$_XXX
3908 src/ld.cpp: add hack to supporess errors about .objc_class_name_XXX or _OBJC_CLASS_$_XXX being undefined
3911 2006-09-12 Nick Kledzik <kledzik@apple.com>
3913 <rdar://problem/4474172> Support -prebind when targeting ppc and OS < 10.4
3914 src/Options.h: add splitSeg() and baseWritableAddress()
3915 src/Options.cpp: Add support for -seg_addr_table and LD_SEG_ADDR_TABLE, and -prebind and LD_PREBIND.
3916 src/src/MachOWriterExecutable.hpp: support split-seg and canonical prebound files to be generated
3919 2006-09-11 Nick Kledzik <kledzik@apple.com>
3921 <rdar://problem/4464904> Linking a dylib or binary from identical binaries should produce the same output
3922 src/MachOWriterExecutable.hpp: set the timestamps to be constant
3925 2006-09-11 Nick Kledzik <kledzik@apple.com>
3927 <rdar://problem/4070025> Linker support for ordering all sections and symbols
3928 src/Options.cpp: Add -order_file_statistics. Allow architecture prefixes in order files
3929 src/ld.cpp: Use fOptions.printOrderFileStatistics()
3932 2006-09-11 Nick Kledzik <kledzik@apple.com>
3934 <rdar://problem/3894079> Support -sectorder
3935 unit-tests/test-cases/order_file: added test case
3936 src/ld.cpp: Implement order file support in Linker::sortAtoms()
3937 src/Options.h: add Options.orderedSymbols()
3938 src/Options.cpp: add parseOrderFile(), implement -order_file
3941 2006-09-07 Nick Kledzik <kledzik@apple.com>
3943 <rdar://problem/4637023> need -i for 64-bit (or equivalent)
3944 <rdar://problem/4014529> Support -i for aliasing exported symbols
3945 unit-tests/test-cases/alias-objects: added
3946 unit-tests/test-cases/alias-command-line: added
3947 src/ObjectFile.h: Added Atom::getOrdinal() as new way to sort atoms. Added ReaderOptions.fAliases
3948 src/MachOReaderRelocatable.hpp: Added SymbolAliasAtom to handle multiple symbols to same address
3949 src/MachOReaderArchive.hpp: implement Atom::getOrdinal() to space out atom ordinals across member objects
3950 src/Options.cpp: support -i, -alias, -alias_list. Move search of /Network/Library/Frameworks to after /System/Library/Frameworks
3951 src/MachOWriterExecutable.hpp: pad out seg_info data. Implement getOrdinal().
3952 src/ObjectDump.cpp: call constructors directly instead of using make() wrapper
3955 2006-09-01 Nick Kledzik <kledzik@apple.com>
3957 <rdar://problem/4458878> Need the ability to tag libraries/plug-ins with security attributes
3958 src/MachOReaderDylib.hpp: add warning if using -root_safe or -setuid_safe and link against dylib that is not
3959 src/ObjectFile.h: add ReaderOption fRootSafe and fSetuidSafe
3960 src/Options.cpp: handle -root_safe or -setuid_safe command line options
3961 src/MachOWriterExecutable.hpp: set MH_ROOT_SAFE and MH_SETUID_SAFE flags
3964 2006-08-31 Nick Kledzik <kledzik@apple.com>
3966 src/ld.cpp: Add Linker::processDTrace() for processing dtrace static probes
3967 src/OpaqueSection.hpp: renamed, add symbol name, add ability to add references
3968 ld64.xcodeproj/project.pbxproj: remove SectCreate.cpp, add OpaqueSection.hpp
3971 2006-08-28 Nick Kledzik <kledzik@apple.com>
3973 <rdar://problem/4571042> Add convention for removing symbols at link time
3974 <rdar://problem/3962731> Assembler -L option causes ld64 to split stubs
3975 unit-tests/test-cases/special-labels: added test case
3976 src/MachOReaderRelocatable.hpp: ignore L* labels, make l* labels as kSymbolTableNotIn
3979 2006-08-28 Nick Kledzik <kledzik@apple.com>
3981 src/lObjectFile.h: refactor isTargetUnbound() into getTargetBinding()
3982 src/ld.cpp: create __dof section in final linked images from dtrace static probes
3983 src/Architectures.hpp: add kDtraceProbe
3984 src/Options.h/cpp: Add support for -dtrace
3985 src/machochecker.cpp: support LC_SEGMENT_SPLIT_INFO
3986 src/MachOWriterExecutable.hpp: support kDtraceProbe
3987 src/MachOReaderRelocatable.hpp: suppport kDtraceProbe
3990 2006-08-25 Nick Kledzik <kledzik@apple.com>
3992 <rdar://problem/4701529> generate LC_SEGMENT_SPLIT_INFO for 10.5 or later dylibs
3993 src/Options.h&.cpp: implement sharedRegionEligible() to control when LC_SEGMENT_SPLIT_INFO is added
3994 src/MachOFileAbstraction.hpp: add macho_linkedit_data_command
3995 src/MachOWriterExecutable.hpp: generate LC_SEGMENT_SPLIT_INFO load command and linkedit content
3997 ----- Tagged ld64-62
3999 2006-08-15 Nick Kledzik <kledzik@apple.com>
4001 <rdar://problem/4681062> wrong error message when symbol is found in unused indirect library
4002 src/ld.cpp: remove indirect libraries if they are not re-exported
4003 unit-tests/test-cases/indirect-dylib: added test case
4006 2006-08-15 Nick Kledzik <kledzik@apple.com>
4008 <rdar://problem/3930461> alignment needs to be richer
4009 src/ObjectFile.h: define ObjectFile::Alignment class for tracking rich alignment info
4010 src/ld.cpp: modify SymbolTable::add() to work with new Alignment type
4011 src/MachOReaderRelocatable.hpp: use new Alignment type. Remove alignAtLeast() and handleAnonymousNonLazyPointers()
4012 src/MachOWriterExecutable.hpp: update for new Alignment type, use modulus when calculating layout address
4013 src/ObjectDump.cpp: print richer Alignment info
4014 unit-tests/test-cases/align-modulus: added test case
4017 2006-08-11 Nick Kledzik <kledzik@apple.com>
4019 remove OPEN_SOURCE conditionals around x86_64 support
4022 2006-07-31 Nick Kledzik <kledzik@apple.com>
4024 <rdar://problem/4654131> ld64 while linking cc1 [ when dead_strip is ON]
4025 src/ld.cpp: Add ivar fAtomsWithUnresolvedReferences to track atoms not initially resolvable
4026 unit-tests/test-cases/dead_strip-archive: added test case
4029 2006-07-31 Nick Kledzik <kledzik@apple.com>
4031 <rdar://problem/4656617> x86_64: instructions with immediate and rip-relative operands need to use new relocation types
4032 src/MachOWriterExecutable.hpp: generate new reloc types in -r mode
4033 src/MachOReaderRelocatable.hpp: parse new reloc types
4034 unit-tests/test-cases/relocs-asm/relocs-asm.s: add test cases for new reloc type
4037 2006-07-18 Nick Kledzik <kledzik@apple.com>
4039 src/MachOReaderRelocatable.hpp: suppress warning about dwarf info parsing for one benign no-op case
4040 the compiler emits when there are not functions in the __text section
4043 2006-07-17 Nick Kledzik <kledzik@apple.com>
4045 <rdar://problem/4634840> faster debug note generation
4046 src/ld.cpp: rework collectDebugInfo() to produce all debug notes in one pass, intead of a
4047 pass per .o file. Added timing info for collectDebugInfo() to -print_statistics
4048 unit-tests/test-cases/dwarf-debug-notes-r/Makefile: add expliced -arch to ld -r
4049 unit-tests/test-cases/dwarf-debug-notes-r/expected-stabs: alter for new debug notes order
4052 2006-07-17 Nick Kledzik <kledzik@apple.com>
4054 <rdar://problem/4623994> ld64 VSIZE is 1.18GB when building Finder ppc64
4055 src/ld.cpp: fixed typo in createReader() that prevented dylibs from being unmapped
4057 ----- Tagged ld64-61.1
4059 2006-07-11 Nick Kledzik <kledzik@apple.com>
4061 <rdar://problem/4622049> ld64-61: gcc DejaGnu tests failing due to -arch followed by unknown architecture name
4062 src/Options.cpp: map ppc750, ppc7400, ppc7450, and ppc970 to ppc. Improve error message
4064 2006-07-11 Nick Kledzik <kledzik@apple.com>
4066 <rdar://problem/4622769> If -arch is missing, rollover to ld_classic does not happen
4067 src/Options.h: make gotoClassicLinker() public
4068 src/ld.cpp: call gotoClassicLinker() if the inferred architecture is ppc or i386
4070 ----- Tagged ld64-61
4072 2006-06-29 Nick Kledzik <kledzik@apple.com>
4074 <rdar://problem/4606628> ld64 should be renamed to ld
4075 src/Options.cpp: exec() ld_classic if -arch ppc or -arch i386 is seen
4076 src/ld.cpp: alter version string
4077 ld64.xcodeproj/project.pbxproj: change install location to /usr/bin/ld, add symlink from /usr/bin/ld64
4078 doc/man/man1/ld.1: added
4080 ----- Tagged ld64-60
4082 2006-06-28 Nick Kledzik <kledzik@apple.com>
4084 <rdar://problem/4604539> Can't link large ppc64 program: ld64 says "bl out of range"
4085 MachOWriterExecutable.hpp: fix branch island generation to work for weak_import functions
4086 and properly chain together branch islands
4087 MachOReaderRelocatable.hpp: improve performance of huge .o file reading by sorted references
4090 2006-06-28 Nick Kledzik <kledzik@apple.com>
4092 <rdar://problem/4603454> MySQL-36 fails to build with ld64-59
4093 src/MachOReaderRelocatable.hpp: back out fix for 4585335
4094 src/MachOWriterExecutable.hpp: back out fix for 4585335
4096 2006-06-27 Nick Kledzik <kledzik@apple.com>
4098 src/MachOReaderRelocatable.hpp: handle N_GSYM without ending :G() since that is how
4099 dwarf debug notes are formed.
4101 2006-06-23 Nick Kledzik <kledzik@apple.com>
4103 <rdar://problem/4599239 objc class with no superclass causes bad undefined symbol
4104 src/MachOReaderRelocatable.hpp: handle NULL superclass in objc_class
4105 unit-tests/test-cases/relocs-objc/test.m: add case with no super class
4108 2006-06-23 Nick Kledzik <kledzik@apple.com>
4110 <rdar://problem/4313369> ld64 doesn't support variant linking -framework fw,_debug
4111 src/Options.cpp: enhance findFramework() to support suffixes
4113 ----- Tagged ld64-59
4115 2006-06-22 Nick Kledzik <kledzik@apple.com>
4117 <rdar://problem/4596726> ld64 lost DWARF debug notes
4118 src/MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
4119 unit-tests/test-cases/dwarf-debug-notes-r: added test case
4121 2006-06-21 Nick Kledzik <kledzik@apple.com>
4123 <rdar://problem/4567995> python 64-bit address miscalculation
4124 src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
4126 2006-06-21 Nick Kledzik <kledzik@apple.com>
4128 <rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
4129 src/MachOWriterExecutable.hpp: in -r mode, virtual sections should not increment address
4132 ----- Tagged ld64-58
4134 2006-06-16 Nick Kledzik <kledzik@apple.com>
4136 src/rebase.cpp: fix page alignment problem
4137 src/rebase.cpp: fix endianess problem with local non-lazy pointers
4139 2006-06-15 Nick Kledzik <kledzik@apple.com>
4141 src/rebase.cpp: fix to build in CurryWeed
4142 ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
4144 2006-06-15 Nick Kledzik <kledzik@apple.com>
4146 <rdar://problem/4495309> Support .objc_class_name_* symbols
4147 src/ObjectFile.h: Add kSymbolTableInAsAbsolute
4148 src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
4149 src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
4150 unit-tests/test-cases/objc-references: added
4152 2006-06-15 Nick Kledzik <kledzik@apple.com>
4154 <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
4155 src/MachOWriterExecutable.hpp: add section attribute for sections with code
4157 2006-06-15 Nick Kledzik <kledzik@apple.com>
4159 <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
4160 src/MachOReaderRelocatable.hpp: only special case Apple objc runtime objc classes
4162 2006-06-15 Nick Kledzik <kledzik@apple.com>
4164 <rdar://problem/4582999> x86_64: ".align" directive not honored
4165 src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
4167 2006-06-14 Nick Kledzik <kledzik@apple.com>
4169 <rdar://problem/4585335> jump table into middle of weak symbol causes error
4170 src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
4171 src/MachOWriterExecutable.hpp: do not error on absolute references to interior of weak symbols
4173 2006-06-13 Nick Kledzik <kledzik@apple.com>
4175 src/Options.cpp: allow -image_base as an alias for -seg1addr
4177 2006-06-13 Nick Kledzik <kledzik@apple.com>
4179 <rdar://problem/4585115> implement -d
4180 src/Options.h: add fMakeTentativeDefinitionsReal
4181 src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
4182 src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
4183 unit-tests/test-cases/btentative-to-real: added test case
4185 2006-06-13 Nick Kledzik <kledzik@apple.com>
4187 <rdar://problem/4584355> implement -bundle_loader
4188 src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
4189 src/Options.cpp: handle -bundle_loader
4190 src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
4191 src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
4192 src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
4193 unit-tests/test-cases/bundle_loader: added test case
4195 2006-06-12 Nick Kledzik <kledzik@apple.com>
4197 <rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
4198 src/MachOReaderDylib.hpp: in Reader::reExports() compare install path in addition to load path
4201 2006-06-10 Nick Kledzik <kledzik@apple.com>
4203 <rdar://problem/4548935> Need rebasing tool
4204 src/rebase.cpp: added
4205 unit-tests/test-cases/rebase-basic: added
4206 doc/man/man1/rebase.1: added
4207 ld64.xcodeproj/project.pbxproj: added rebase target. changed all targets to build with dwarf
4210 2006-06-10 Nick Kledzik <kledzik@apple.com>
4212 src/machochecker.cpp: add some ppc reloc sanity checking
4214 ----- Tagged ld64-57
4216 2006-06-06 Nick Kledzik <kledzik@apple.com>
4218 <rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
4219 ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
4220 unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
4222 2006-06-06 Nick Kledzik <kledzik@apple.com>
4224 <rdar://problem/4572702> -sectcreate of a 0-byte section fails
4225 MachOWriterExecutable.cpp: Don't error out on zero length segments
4226 MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
4227 there is a writable segment >4GB from base address
4229 2006-06-04 Eric Christopher <echristo@apple.com>
4233 * src/ld.cpp (createReader): Fixed error message.
4235 (resolveFrom): Ditto.
4236 (checkUndefines): Ditto.
4238 ----- Tagged ld64-56
4240 2006-05-23 Nick Kledzik <kledzik@apple.com>
4242 <rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
4243 ld.cpp: don't limit debug notes to functions starting with underscore
4245 2006-05-22 Nick Kledzik <kledzik@apple.com>
4247 <rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
4248 * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups
4250 2006-05-22 Nick Kledzik <kledzik@apple.com>
4252 <rdar://problem/4535044> remove inferring warning
4253 * ld.cpp: Remove "inferring" warning. If a link failed and now arch was specifed add which arch was
4254 inferred to error message
4256 2006-05-19 Nick Kledzik <kledzik@apple.com>
4258 <rdar://problem/4544001> ld64 does not honor -arch_multiple
4259 * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
4261 2006-05-19 Nick Kledzik <kledzik@apple.com>
4263 <rdar://problem/4555973> Support S_16BYTE_LITERALS section types
4264 * src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
4265 * src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS
4267 2006-05-19 Nick Kledzik <kledzik@apple.com>
4269 <rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
4270 * src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing
4272 ----- Tagged ld64-55
4274 2006-05-18 Nick Kledzik <kledzik@apple.com>
4276 <rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
4277 * src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64
4279 2006-05-18 Nick Kledzik <kledzik@apple.com>
4281 <rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
4282 * src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references
4284 2006-05-18 Nick Kledzik <kledzik@apple.com>
4286 <rdar://problem/4553555> ld64: .section defaults to read-only
4287 * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
4289 2006-05-18 Nick Kledzik <kledzik@apple.com>
4291 <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
4292 * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
4294 2006-05-12 Nick Kledzik <kledzik@apple.com>
4296 * src/Architectures.hpp: add x86::kAbsolute32
4297 * src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
4298 * src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind
4300 ----- Tagged ld64-54
4302 2006-05-11 Nick Kledzik <kledzik@apple.com>
4304 <rdar://problem/4545108> CF-393 failes to link for x86_64
4305 * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable
4307 2006-05-11 Nick Kledzik <kledzik@apple.com>
4309 <rdar://problem/4501434> warning arch x86_64 not found using i386
4310 * src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs
4313 2006-05-10 Nick Kledzik <kledzik@apple.com>
4315 <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
4316 * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
4319 2006-05-08 Nick Kledzik <kledzik@apple.com>
4321 <rdar://problem/3894083> Support -dead_strip
4322 * src/Options.h/cpp: implement -why_load and -why_live. Enable -dead_strip.
4323 * src/MachOReaderArchive.hpp: implement -why_load
4324 * src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
4325 * src/ld.cpp: implement dead code stripping
4326 * unit-tests/test-cases/dead_strip: added
4328 ----- Tagged ld64-53
4330 2006-05-05 Nick Kledzik <kledzik@apple.com>
4332 * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
4334 2006-05-05 Nick Kledzik <kledzik@apple.com>
4336 <rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
4337 * src/ld.cpp: for SO stabs, associate first and last atom in the SO range
4338 * src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value
4340 2006-05-05 Nick Kledzik <kledzik@apple.com>
4342 * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
4345 2006-05-02 Nick Kledzik <kledzik@apple.com>
4347 <rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
4348 * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
4349 <rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
4350 * src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
4351 is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.
4353 2006-05-02 Nick Kledzik <kledzik@apple.com>
4355 * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
4356 overlaps shared region
4358 ----- Tagged ld64-52.1
4360 2006-05-01 Nick Kledzik <kledzik@apple.com>
4362 * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
4363 the __data section too.
4365 ----- Tagged ld64-52
4367 2006-04-28 Nick Kledzik <kledzik@apple.com>
4369 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4370 * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
4372 2006-04-28 Nick Kledzik <kledzik@apple.com>
4374 <rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
4375 * src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol
4379 2006-04-21 Nick Kledzik <kledzik@apple.com>
4381 * src/Options.cpp: fix default address for ppc64 custom stack
4382 * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
4385 2006-04-14 Nick Kledzik <kledzik@apple.com>
4387 * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
4389 ----- Tagged ld64-51.1
4391 2006-04-13 Nick Kledzik <kledzik@apple.com>
4393 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4394 * src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
4395 that points to static or global symbols
4396 * src/ld.cpp: print version of ld64 in error messages
4399 ----- Tagged ld64-51
4401 2006-04-11 Nick Kledzik <kledzik@apple.com>
4403 <rdar://problem/4499168> exported symbols not properly stripped
4404 * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
4406 2006-03-31 Nick Kledzik <kledzik@apple.com>
4408 <rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
4409 * src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
4410 * src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that
4413 2006-03-31 Nick Kledzik <kledzik@apple.com>
4415 <rdar://problem/4496499> ld64 should remove generated file if link errors out
4416 * src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow
4419 ----- Tagged ld64-50
4422 2006-03-29 Nick Kledzik <kledzik@apple.com>
4424 * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
4425 * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
4427 2006-03-28 Nick Kledzik <kledzik@apple.com>
4429 * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
4431 ----- Tagged ld64-49.1
4433 2006-03-25 Nick Kledzik <kledzik@apple.com>
4435 * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
4437 ----- Tagged ld64-49
4439 2006-03-24 Nick Kledzik <kledzik@apple.com>
4441 * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
4442 <rdar://problem/4488113> ld64 is after processing bad GSYM stabs
4443 * src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it
4445 2006-03-23 Nick Kledzik <kledzik@apple.com>
4447 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
4450 2006-03-23 Nick Kledzik <kledzik@apple.com>
4452 * src/Options.cpp: change macosx-min-version to default to a per-architecture setting
4453 add warning if -pagezero_size is not page aligned
4454 * src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
4455 * src/machochecker.cpp: sanity check relocation records
4457 ----- Tagged ld64-48
4459 2006-03-21 Nick Kledzik <kledzik@apple.com>
4461 <rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
4462 * src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
4463 match it to a STAB symbol.
4465 2006-03-21 Nick Kledzik <kledzik@apple.com>
4467 <rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
4468 * src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
4469 * src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
4470 * src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image
4472 2006-03-21 Nick Kledzik <kledzik@apple.com>
4474 <rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
4475 * unit-tests/test-cases/filelist: added
4476 * src/Options.cpp: in Options::loadFileList() handle comma option
4479 ----- Tagged ld64-47.1
4482 ----- Tagged ld64-47
4485 ----- Tagged ld64-46
4487 2006-03-10 Nick Kledzik <kledzik@apple.com>
4489 <rdar://problem/4419505> ld64 should figure out architecture from .o files
4490 * unit-tests/test-cases/auto-arch: added
4491 * src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
4492 * src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
4493 * src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
4494 * src/Options.cpp: stop defaulting to ppc64
4497 2006-03-09 Nick Kledzik <kledzik@apple.com>
4499 <rdar://problem/4465004> Need "intentionally left blank" dylib stubs
4500 * unit-tests/include/common.makefile: add VALID_ARCHS
4501 * unit-tests/run-all-unit-tests: set up VALID_ARCHS
4502 * unit-tests/test-cases/blank-stubs: add test case
4503 * src/ld.cpp: in addDylib(), detect and ignore blank stubs
4504 * src/MachOReaderDylib.hpp: in constructor, handle blank stubs
4506 2006-03-09 Nick Kledzik <kledzik@apple.com>
4508 <rdar://problem/4471424> crash in stub with 2GB pagezero
4509 * src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used
4511 2006-03-06 Nick Kledzik <kledzik@apple.com>
4513 * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
4515 ----- Tagged ld64-45
4518 2006-03-06 Nick Kledzik <kledzik@apple.com>
4520 <rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
4521 * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion
4524 ----- Tagged ld64-44
4526 2006-03-04 Nick Kledzik <kledzik@apple.com>
4528 * src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
4529 Error out if .o file contains old __DWARFA style dwarf.
4531 2006-03-02 Nick Kledzik <kledzik@apple.com>
4533 * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
4535 ----- Tagged ld64-43
4538 2006-03-02 Nick Kledzik <kledzik@apple.com>
4540 * src/MachOReaderRelocatable.hpp: <rdar://problem/4464370> tighten detection of anonymous non-lazy-pointer
4542 ----- Tagged ld64-42
4544 2006-02-28 Nick Kledzik <kledzik@apple.com>
4546 * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment
4548 2006-02-28 Nick Kledzik <kledzik@apple.com>
4550 <rdar://problem/4461240> SWB: ld64-37 (can't resolve symbol ___dso_handle)
4551 * src/MachOWriterExecutable.hpp: add class DsoHandleAtom
4553 2006-02-28 Nick Kledzik <kledzik@apple.com>
4555 * unit-tests/test-cases/literals-coalesce-alignment: added test case
4556 * src/ld.cpp: when coalescing strings pick one with greater alignment
4557 <rdar://problem/4458660> ld64: CG link failed because lo14 reference to anonymous non-lazy-pointer not aligned
4558 * unit-tests/test-cases/relocs-c/test.c: tweak to fail like 4458660
4559 * src/MachOReaderRelocatable.hpp: detect anonymous non-lazy-pointer and transform into real non-lazy-pointers
4561 ----- Tagged ld64-41
4563 2006-02-24 Nick Kledzik <kledzik@apple.com>
4565 * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options.
4568 ----- Tagged ld64-40
4570 2006-02-24 Nick Kledzik <kledzik@apple.com>
4572 <rdar://problem/4454698> Leopard9A113: ppc64 libstdc++.dylib initializer crashes in pthread_once
4573 * unit-tests/test-cases/multiple-entry-points: added
4574 * src/MachOReaderRelocatable.hpp: make sure that if there are multiple symbols with the same
4575 address, that we properly make zero length atoms for all but last symbol
4577 2006-02-24 Nick Kledzik <kledzik@apple.com>
4579 * src/Options.cpp: <rdar://problem/4456093> ld64 doesn't realpath(3) B&I tracing paths
4581 2006-02-24 Nick Kledzik <kledzik@apple.com>
4583 * src/Options.cpp: <rdar://problem/4457078> 9A110: ld64 can't deal with section names >16 chars
4585 2006-02-23 Nick Kledzik <kledzik@apple.com>
4587 * src/MachOWriterExecutable.hpp: use vector.reserve() to minimize re-allocations
4588 * src/Options.cpp: use vector.reserve() to minimize re-allocations
4589 * src/MachOReaderRelocatable.hpp: use vector.reserve() to minimize re-allocations
4590 * src/MachOReaderDylib.hpp: use vector.reserve() to minimize re-allocations
4591 * src/ld.cpp: use vector.reserve() to minimize re-allocations
4593 2006-02-23 Nick Kledzik <kledzik@apple.com>
4595 <rdar://problem/4455927> ld64 creates corrupt executables (and has malloc errors) with -headerpad option
4596 * src/MachOWriterExecutable.hpp: Change LoadCommandsPaddingAtom<A>::setSize() to update fLargestAtomSize
4597 * unit-tests/test-cases/header-pad: added
4599 2006-02-23 Nick Kledzik <kledzik@apple.com>
4601 <rdar://problem/4455192> ld64 creates invalid static executables
4602 * src/MachOWriterExecutable.hpp: Change MachHeaderAtom<A>::copyRawContent() to create correct header
4603 for static executables. Change SymbolTableLoadCommandsAtom to skip LC_DYSYMTAB for static executables
4604 * src/machochecker.cpp: Add tests that static executables are well formed
4605 * unit-tests/test-cases/static-executable: added
4607 2006-02-22 Nick Kledzik <kledzik@apple.com>
4609 * src/Options.cpp: <rdar://problem/4453468> chnage printf on unknown arg to a throw
4611 ----- Tagged ld64-39
4613 2006-02-20 Nick Kledzik <kledzik@apple.com>
4615 * unit-tests/test-cases/read-only-relocs: added new test case
4616 * src/MachOWriterExecutable.hpp: <rdar://problem/4448922> detect and error on relocs in read-only sections
4617 * src/MachOReaderRelocatable.hpp: fix parsing of i386 absolute addressing relocs
4619 2006-02-20 Nick Kledzik <kledzik@apple.com>
4621 * unit-tests/test-cases/stabs-coalesce: added new test case
4622 * src/ld.cpp.hpp: <rdar://problem/4449226> in collectStabs removed unused stabs
4624 ----- Tagged ld64-38
4626 2006-02-17 Nick Kledzik <kledzik@apple.com>
4628 * src/MachOWriterExecutable.hpp: <rdar://problem/4434578> set correct n_sect field of stabs
4630 2006-02-15 Nick Kledzik <kledzik@apple.com>
4632 * src/MachOReaderArchive.hpp: <rdar://problem/4441920> with -all_load skip over both kinds of SYMDEFs
4633 * unit-tests/test-cases/archive-basic/Makefile: add -all_load test case
4635 ----- Tagged ld64-37
4637 2006-02-13 Eric Christopher <echristo@apple.com>
4639 * src/MachOWriterExecutable.hpp (assignFileOffsets): Simplify. Add comments.
4642 2006-02-13 Nick Kledzik <kledzik@apple.com>
4644 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceRelocatable() fix kPCRel32 for external case
4646 2006-02-13 Nick Kledzik <kledzik@apple.com>
4648 * unit-tests/test-cases/zero-fill: added
4649 * src/machochecker.cpp: check that S_ZEROFILL have no file offset
4650 * src/MachOWriterExecutable.hpp: rework assignFileOffsets() to fix rdar://problem/4441145
4652 2006-02-12 Nick Kledzik <kledzik@apple.com>
4654 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440880> fix use of first zero-length c-string in .o file
4656 2006-02-12 Nick Kledzik <kledzik@apple.com>
4658 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440905> fix uninitialized fAlignment
4660 2006-02-12 Nick Kledzik <kledzik@apple.com>
4662 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add pointer-diff cases
4663 * src/Architectures.hpp: make size explicit in ppc/ppc64 kPointerDiff
4664 * src/MachOReaderRelocatable.hpp: don't allow kPointerDiff64 for ppc (just ppc64)
4665 * src/MachOWriterExecutable.cpp: set proper r_length for ld -r of kPointerDiff
4667 ----- Tagged ld64-36
4669 2006-02-08 Nick Kledzik <kledzik@apple.com>
4671 * src/MachOReaderRelocatable.cpp: rdar://problem/4438677 Handle when a .o file dwarf line info entries but no functions
4673 2006-02-08 Nick Kledzik <kledzik@apple.com>
4675 * src/MachOWriterExecutable.cpp: Properly set address of first TEXT section
4676 Keep S_COALESCED attribute for __eh_frame
4678 2006-02-08 Nick Kledzik <kledzik@apple.com>
4680 * src/ld.cpp: Temporarily turn allowable client errors into warnings
4681 * unit-tests/test-cases/allowable-clientMakefile: Temporarily let warnings be ok for above
4682 * src/MachOWriterExecutable.hpp: fix ld -r to not use external relocations for symbols make static
4684 2006-02-08 Nick Kledzik <kledzik@apple.com>
4686 * src/ld.cpp: A sibling in an umbrella can always link with its other siblings
4687 * unit-tests/test-cases/allowable-client: add test case for above
4689 2006-02-08 Nick Kledzik <kledzik@apple.com>
4691 * src/MachOReaderRelocatable.hpp: support LOCAL non-lazy pointers to hidden symbols
4692 * src/machochecker.cpp: verify indirect symbol table
4693 * unit-tests/test-cases/private-non-lazy: added test case
4695 2006-02-07 Nick Kledzik <kledzik@apple.com>
4697 * src/MachOWriterExecutable.hpp: fix calculation of file offsets in ld -r mode
4698 * src/machochecker.cpp: verify segment file offsets are within file
4700 ----- Tagged ld64-35
4702 2006-02-06 Nick Kledzik <kledzik@apple.com>
4704 * ld.cpp: allow parent of sub-framework to link
4705 * unit-tests/test-cases/allowable-client/Makefile: added cases for parent and clients of parent
4707 2006-02-04 Nick Kledzik <kledzik@apple.com>
4709 * unit-tests/test-cases/relocs-c/test.c: added some array cases
4710 * src/MachOReaderRelocatable.hpp: factor out makeReferenceToEH()
4711 * src/MachOWriterExecutable.hpp: add initial support for non-lazy pointer synthesis
4713 ----- Tagged ld64-34
4715 2006-02-04 Nick Kledzik <kledzik@apple.com>
4717 * src/ld.cpp: <rdar://problem/4432917> fix -no_arch_warnings
4718 <rdar://problem/4432932> fix -undefined warning
4719 Do BINCL/EINCL optimization for gfull stabs
4720 Implement "essential symbols" for stabs (-Sp)
4721 Fix allowable clients to only test on direct libraries
4722 * src/MachOReaderRelocatable.hpp: support BINCL/EINCL stabs
4724 2006-02-03 Nick Kledzik <kledzik@apple.com>
4726 * src/machochecker.cpp: add code to check load command alignment
4727 * src/MachOWriterExecutable.hpp: make load command alignment depend on architecture
4729 2006-02-03 Nick Kledzik <kledzik@apple.com>
4731 * unit-tests/test-cases/literals-coalesce: added
4732 * src/MachOReaderRelocatable.hpp: assure all targets of low14 ppc relocs are at least 4-byte alignmented
4734 ----- Tagged ld64-33
4736 2006-02-02 Nick Kledzik <kledzik@apple.com>
4738 * src/MachOReaderRelocatable.hpp: properly coalesce 8-byte literals
4739 * src/MachOWriterExecutable.hpp: support ppc64::kPointerDiff32
4741 ----- Tagged ld64-32
4743 2006-02-02 Nick Kledzik <kledzik@apple.com>
4745 * src/MachOReaderRelocatable.hpp: support anonymous zero fill atoms
4747 2006-02-02 Nick Kledzik <kledzik@apple.com>
4749 * src/ld.cpp: A weak definition is good enough, do not search archives for a non-weak one
4750 * unit-tests/test-cases/archive-weak: add test case for above
4751 * src/MachOReaderRelocatable.hpp: an atom should never have a by-name reference to itself
4752 * src/Options.cpp: prevent .eh symbols from being exported via a -exported_symbols_list
4754 2006-02-01 Nick Kledzik <kledzik@apple.com>
4756 * src/MachOReaderRelocatable.hpp: Support -macosx_version_min 10.5
4758 2006-02-01 Nick Kledzik <kledzik@apple.com>
4760 * src/MachOReaderRelocatable.hpp: don't try to parse debug_line dwarf if no symboled atoms
4762 ----- Tagged ld64-31
4764 2006-02-01 Eric Christopher <echristo@apple.com>
4766 * unit-tests/test-cases/allow-stack-execute/Makefile: Move otool handling...
4767 * unit-tests/include/common.makefile: ... here.
4768 * unit-tests/bin/fail-if-stdin.pl: New.
4769 * unit-tests/test-cases/no-uuid: Ditto.
4770 * src/ld.cpp (Linker::) Add fCreateUUID.
4771 (::Linker): Initialize.
4772 (::collectStabs): Use. Set if dwarf or we have a UUID already.
4773 (::writeOutput): Pass as argument to Writer::write along with option.
4774 * src/Options.h (Option::emitUUID): Declare.
4775 (Option::fEmitUUID): Ditto.
4776 * src/Options.cpp (Option::emitUUID): New.
4777 (parse): Handle -no_uuid.
4778 * src/MachOReaderRelocatable (Reader::Reader): Handle LC_UUID.
4779 * src/ExecutableFile.h (Writer::Write): Add createUUID boolean.
4780 * src/MachOWriterExecutable: Add UUID forward declaration.
4782 (UUIDLoadCommandAtom): Emit LC_UUID if fEmit. New function emit. Size
4784 (Writer::writer): Add handle for LC_UUID. If createUUID emit LC_UUID.
4785 (MachHeaderAtom::copyRawContent): Don't count a load command if its size is
4787 (UUIDLoadCommandAtom::copyRawContent): Depend on fEmit.
4790 2006-01-31 Nick Kledzik <kledzik@apple.com>
4792 * unit-tests/test-cases/dwarf-debug-notes : Added
4793 * src/ld.cpp: don't generate debug note for .eh symbols
4794 * src/MachOReaderRelocatable.hpp: make dwarf line info to atom matching faster and better
4796 2006-01-31 Nick Kledzik <kledzik@apple.com>
4798 * ld64.xcodeproj/project.pbxproj : Make buildable on Leopard
4799 * src/MachOFileAbstraction.hpp: make buildable without latest cctools headers
4801 2006-01-31 Nick Kledzik <kledzik@apple.com>
4803 * src/MachOReaderRelocatable.hpp: better error message for bad relocs
4804 * src/ObjectDump.cpp: add emacs tab settings
4805 * src/SectCreate.h: ditto
4806 * src/SectCreate.cpp: ditto
4807 * src/machochecker.cpp: ditto
4808 * src/ExecutableFile.h: ditto
4810 2006-01-30 Eric Christopher <echristo@apple.com>
4812 * src/ExecutableFile.h: Indent.
4814 2006-01-30 Nick Kledzik <kledzik@apple.com>
4816 * src/MachOReaderRelocatable.hpp: performance improvements
4817 * src/ld.cpp: now that stubs are synthesized in write, don't need to special case anymore
4819 2006-01-30 Nick Kledzik <kledzik@apple.com>
4821 * src/MachOReaderRelocatable.hpp: fix parsing of pcc relocs
4822 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add test case for above
4824 2006-01-29 Nick Kledzik <kledzik@apple.com>
4826 * unit-tests/test-cases/weak_import: added test case
4827 * src/ld.cpp: move code for weak_import mismatch to writer
4828 * src/ObjectFile.h: remove ImportWeakness methods
4829 * src/MachOReaderDylib.hpp: ditto
4830 * src/SectCreate.cpp: ditto
4831 * src/Architectures.hpp: add new ReferenceKinds for weak_imports
4832 * src/MachOReaderRelocatable.hpp: implement new ReferenceKinds
4833 * src/MachOWriterExecutable.hpp: handle new ReferenceKinds and weak_import mismatches
4835 2006-01-29 Nick Kledzik <kledzik@apple.com>
4837 * src/Options.cpp: verify -allow_stack_execute is only used on main executables
4839 2006-01-29 Nick Kledzik <kledzik@apple.com>
4841 * src/MachOReaderRelocatable.hpp: sync with latest dwarf reader from Geoff
4842 * src/debugline.c: sync with latest dwarf reader from Geoff
4844 2006-01-27 Eric Christopher <echristo@apple.com>
4846 * src/ld.cpp (Linker::syntesizeStabs): Correct spelling. Update all uses.
4848 2006-01-27 Eric Christopher <echristo@apple.com>
4850 * src/Options.h (Options): Add hasExecutableStack, fExecutableStack.
4851 * src/Options.cpp (Options::hasExecutableStack): New.
4852 (Options::parse): Parse -allow_stack_execute.
4853 * src/MachOWriterExecutable.hpp (MachHeaderAtom::copyRawContent):
4854 Implement MH_ALLOW_STACK_EXECUTION.
4855 * unit-tests/include/common.makefile (FAIL_IF_EMPTY): New.
4856 * unit-tests/bin/fail-if-no-stdin.pl: New file.
4857 * unit-tests/test-cases/allow-stack-execute: New directory.
4859 2006-01-27 Nick Kledzik <kledzik@apple.com>
4861 * src/MachOFileAbstraction.hpp: rely on latest system headers
4862 * src/MachOWriterExecutable.hpp: fix ppc stubs.
4863 wrote new relocationNeededInFinalLinkedImage() to replace common code
4865 2006-01-27 Eric Christopher <echristo@apple.com>
4867 * src/ld.cpp (logTraceInfo): New.
4868 (Linker::addArchive): Use.
4869 (Linker::addDylib): Ditto.
4870 * src/ObjectFile (ReaderOptions::fTraceOutputFile): New.
4871 * src/MachOReaderArchive.hpp (Reader::Reader): Move trace
4872 logging to Linker::addArchive.
4873 * src/Options.cpp (parsePreCommandLineEnvironment): Check
4874 LD_PRINT_FILE if tracing dylibs or archives.
4876 2006-01-26 Nick Kledzik <kledzik@apple.com>
4878 * src/MachOWriterExecutable.hpp: handle NULL strings in SO debug notes
4880 2006-01-26 Nick Kledzik <kledzik@apple.com>
4882 * src/MachOWriterExecutable.hpp: fix header padding calculation and thread state
4884 2006-01-26 Nick Kledzik <kledzik@apple.com>
4886 Rewrite all stabs processing.
4887 Move sythesize of debug notes into ld.cpp
4889 2006-01-26 Nick Kledzik <kledzik@apple.com>
4891 * src/MachOWriterExecutable.hpp: fix ppc and ppc64 stub relocs
4893 2006-01-25 Nick Kledzik <kledzik@apple.com>
4895 * ld64.xcodeproj/project.pbxproj: special case building in Curry
4897 2006-01-25 Nick Kledzik <kledzik@apple.com>
4899 * src/MachOWriterExecutable.hpp: fix bugs in stub/lazy-pointer synthesis
4901 2006-01-24 Eric Christopher <echristo@apple.com>
4903 * src/ld.cpp (Linker::createReaders): Change logging title to XBS.
4904 (Linker::addDylib): Ditto.
4905 * src/MachOReaderArchive.hpp (Reader::Reader): Ditto.
4906 * src/Options.h (fPrintOptions): New.
4907 * src/Options.cpp (Options::Options): Initialize above.
4908 (Options::checkForFile): Change logging title to XBS.
4909 (Options::findFramework): Ditto.
4910 (Options::parse): Add log for options.
4911 (Options::parsePreCommandLineEnvironmentSettings): Add LD_TRACE_ARCHIVES,
4912 LD_TRACE_DYLIBS, and LD_PRINT_OPTIONS.
4914 2006-01-24 Nick Kledzik <kledzik@apple.com>
4916 * src/MachOReaderRelocatable.hpp: better C++ eh parsing
4918 2006-01-23 Eric Christopher <echristo@apple.com>
4920 * unit-tests/bin/fail-if-exit-zero.pl: New.
4921 * unit-tests/include/common.makefile (FAIL_IF_SUCCESS): Use.
4922 * unit-tests/allowable-client: New test.
4923 * src/ld.cpp (Linker::addDylib): Check allowable clients before adding dylib.
4924 * src/Options.h (allowableClients): New.
4925 (clientName): Ditto.
4926 (fAllowableClients): Ditto.
4927 (fClientName): Ditto.
4928 * src/Options.cpp: Implement above.
4929 (parse): Handle -allowable_client and -client_name.
4930 * src/MachOReaderDylib.hpp (getAllowableClients): New.
4931 (fAllowableClients): Ditto.
4932 (Reader): Process LC_SUB_CLIENT load command.
4933 * src/ObjectFile.h (parentUmbrella): New.
4934 (getAllowableClients): New.
4935 * src/MachOWriterExecutable.hpp (AllowableClientLoadCommandsAtom): New.
4937 2006-01-23 Nick Kledzik <kledzik@apple.com>
4939 * unit-tests/test-cases/archive-basic: added
4940 * src/ld.cpp: fix shadowed local variable
4941 * src/FileAbstraction.hpp: <rdar://problem/4417372> ld64 shouldn't inline when building debug
4943 2006-01-23 Nick Kledzik <kledzik@apple.com>
4945 * src/ld.cpp: fix symbol not found error message
4946 * src/MachOReaderDylib.hpp: add logging to hash table
4947 * src/MachOReaderRelocatable.hpp: enable stabs processing. Handle static functions with stubs
4948 handle labeled cstrings.
4949 * src/MachOWriterExecutable.hpp: properly suppress atoms not in symbol table. fix low14 error check.
4951 * unit-tests/test-cases/relocs-literals/test.c: add more interesting edge cases
4953 2006-01-17 Nick Kledzik <kledzik@apple.com>
4955 * src/MachOReaderRelocatable.hpp: tweaks to synthesizing debug notes
4957 2006-01-16 Nick Kledzik <kledzik@apple.com>
4959 * src/debugline.{sh}: added
4960 * src/MachOReaderRelocatable.hpp: synthesize debug notes SOL from dwarf
4961 * src/MachOWriterExecutable.hpp: fix lazy pointer section
4962 * src/ObjectDump.hpp: Fix conditionalization
4963 * unit-tests/test-cases/dwarf-strip: added
4965 2006-01-11 Nick Kledzik <kledzik@apple.com>
4967 * src/MachOReaderRelocatable.hpp: support Tiger crt1.o build with old ld64
4968 * src/ObjectDump.hpp: Support -arch option
4970 2006-01-10 Nick Kledzik <kledzik@apple.com>
4972 * src/MachOWriterExecutable.hpp: fix stubs for ppc64
4973 * src/MachOFileAbstraction.hpp: fix typo for macho_routines
4974 * ld64.xcodeproj/project.pbxproj: add machochecker target
4975 * src/machochecker.cpp: new skeleton for checking mach-o file bit
4976 * unit-tests/: Add support for running machochecker
4978 2006-01-10 Nick Kledzik <kledzik@apple.com>
4980 * src/MachOReaderRelocatable.hpp: warn if dwarf can't be parsed
4981 * src/MachOReaderArchive.hpp: modTime for OSO stabs from archives is .a modTime
4983 2006-01-09 Nick Kledzik <kledzik@apple.com>
4985 * track modification time of .o files so that sythesized OSO stab will have it
4987 2006-01-09 Nick Kledzik <kledzik@apple.com>
4989 * src/MachOFileAbstraction.hpp: add macho_uuid_command
4990 * src/MachOWriterExecutable.cpp: add UUID load command to generated files
4992 2006-01-09 Nick Kledzik <kledzik@apple.com>
4994 * src/MachOReaderDylib.hpp: no longer keep dylib memory mapped
4995 * src/ld.cpp: don't track dylib sizes because they are not longer memory mapped
4997 2006-01-05 Nick Kledzik <kledzik@apple.com>
4999 * src/MachOReaderRelocatable.hpp: support new relocations
5001 2006-01-05 Nick Kledzik <kledzik@apple.com>
5003 * src/MachOReaderDylib.hpp: support MH_DYLIB_STUB
5004 * src/MachOReaderRelocatable.hpp: Add Geoff's comp unit extractor
5006 2006-01-05 Nick Kledzik <kledzik@apple.com>
5008 refactor: transform Atom::dontStripName() to getSymbolTableInclusion()
5009 * src/ld.cpp: pass dyld_stub_binding_helper to writer
5010 * src/MachOReaderRelocatable.hpp: update synthesized stabs
5011 Ignore stubs and lazy pointers in .o files
5012 Support initializers and terminators
5013 * src/MachOWriterExecutable.hpp: synthesize stubs and lazy pointers as needed
5014 * ld64.xcodeproj/project.pbxproj: change Release target to build with dwarf
5016 2006-01-03 Eric Christopher <echristo@apple.com>
5018 * src/Options.h (multipleDefinitionsInDylibs): Declare.
5019 (overridingDefinitionInDependentDylib): Ditto.
5020 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
5021 (multiplyDefined): Remove.
5022 (multiplyDefinedUnused): Ditto.
5023 (fMultiplyDefined): Ditto.
5024 (fWarnOnMultiplyDefined): New.
5025 (fMultiplyDefinedDynamic): Ditto.
5026 * src/Options.cpp (Options::Options): Initialize above.
5027 (overridingDefinitionInDependentDylib): New.
5028 (multipleDefinitionsInDylibs): Ditto.
5029 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
5030 (parse): Update comments. Fix parsing of -y option.
5031 Update error message for -dead_strip. Parse above
5034 2006-01-02 Nick Kledzik <kledzik@apple.com>
5036 * Refactor: move Atom::writeContent() to Writer
5038 2005-12-23 Nick Kledzik <kledzik@apple.com>
5040 * Reworked, simplify, and document test harness
5041 * unit-tests/README: Added
5043 2005-12-23 Nick Kledzik <kledzik@apple.com>
5045 * src/MachOReaderRelocatable.hpp: fixes for Objective-C
5046 * unit-tests/test-cases/relocs-objc: Added
5048 2005-12-22 Nick Kledzik <kledzik@apple.com>
5050 * src/MachOReaderRelocatable.hpp: fix check that next reloc is pair
5051 * src/MachOReaderRelocatable.hpp: Add code to synthesize essential stabs from dwarf
5053 2005-12-21 Nick Kledzik <kledzik@apple.com>
5055 * src/MachOReaderRelocatable.hpp: Fix parsing of literal sections
5056 * src/MachOWriterExecutable.hpp: Fix writing of literal sections
5057 * unit-tests/test-cases/relocs-literals: Added
5059 2005-12-15 Eric Christopher <echristo@apple.com>
5061 * src/Options.h (enum Treatment): New.
5062 (enum PICTreatment): Delete.
5063 (enum VersionMin): New.
5065 (macosxVersionMin): Ditto.
5066 (multiplyDefined): Ditto.
5067 (multiplyDefinedUnused): Ditto.
5068 (setVersionMin): Ditto.
5069 (setPICTreatment): Delete.
5070 (setReadOnlyRelocTreatment): Ditto.
5071 (picTreatment): Adjust return type.
5072 (parseTreatment): New.
5074 (fVersionMin): Ditto.
5075 (fPICTreatment): Change type.
5076 (fMultiplyDefined): New.
5077 (fMultiplyDefinedUnused): Ditto.
5078 (fLimitUndefinedSymbols): Ditto.
5080 * src/Options.cpp: Fix whitespace. Add comments on options.
5081 (Options::Options): Add initializers for new variables.
5082 (Options::prebind): New.
5083 (Options::macosxVersionMin): Ditto.
5084 (Options::parseTreatment): Ditto.
5085 (Options::setVersionMin): Ditto.
5086 (Options::setReadOnlyRelocTreatment): Delete.
5087 (Options::setPICTreatment): Ditto.
5088 (Options::Parse): Update for above. Add comments.
5090 2005-12-15 Nick Kledzik <kledzik@apple.com>
5092 * src/MachOReaderRelocatable.hpp: Add comments about dwarf
5094 2005-12-14 Nick Kledzik <kledzik@apple.com>
5096 * src/ELFFileAbstraction.hpp: Added
5097 * src/ELFReaderRelocatable.hpp: Added
5098 * Lot of fixes for new architecture
5099 * Added __OPEN_SOURCE__ to "Preprocessor Macros" to disable new architecture support by default
5101 2005-12-13 Nick Kledzik <kledzik@apple.com>
5103 * src/MachOReaderRelocatable.hpp: check for S_ATTR_DEBUG and ignore those sections
5104 * unit-tests/test-cases/dwarf-ignore: added
5106 2005-12-12 Nick Kledzik <kledzik@apple.com>
5108 * Added test harness and three initial tests:
5109 relocs-asm, relocs-c, and hello-world
5111 2005-12-12 Nick Kledzik <kledzik@apple.com>
5113 * src/MachOReaderRelocatable.hpp: Massive refactoring:
5114 Now there are three Atom classes, Chopping into Atoms
5115 is done on label boundaries or by knowledge of special
5116 sections, Share lots of ppc/ppc64 code.
5117 Stabs process code is temporarily disabled.
5119 2005-12-12 Nick Kledzik <kledzik@apple.com>
5121 * src/ObjectDump.cpp: Add command line options: -no_content, -stabs, -no_sort
5123 2005-12-11 Eric Christopher <echristo@apple.com>
5125 * src/Options.cpp: Reformat.
5126 * src/Options.h: Ditto.
5128 2005-12-07 Eric Christopher <echristo@apple.com>
5130 * src/MachOReaderRelocatable.hpp (Atom::getAlignment):
5131 When calculating alignment of an Atom, take into account
5132 the alignment from which we pulled the Atom.
5134 2005-12-06 Nick Kledzik <kledzik@apple.com>
5136 * src/Options.cpp src/Options.h: Add design comments
5138 2005-12-05 Eric Christopher <echristo@apple.com>
5140 * src/ld.cpp (Linker::createWriter): Uncomment ppc64 and
5143 2005-12-05 Eric Christopher <echristo@apple.com>
5145 * ChangeLog: New file.
5147 2005-12-02 Nick Kledzik <kledzik@apple.com>
5149 * src/ObjectFile.h: Add design comments
5151 2005-11-30 Nick Kledzik <kledzik@apple.com>
5153 * Fix uses of __OPEN_SOURCE__
5155 2005-11-28 Nick Kledzik <kledzik@apple.com>
5157 * Refactor Atom to use getDefinitionKind()
5159 2005-11-21 Nick Kledzik <kledzik@apple.com>
5161 * src/MachOWriterExecutable.hpp: don't generate section for commons in -r mode
5163 2005-11-18 Nick Kledzik <kledzik@apple.com>
5167 2005-11-18 Nick Kledzik <kledzik@apple.com>
5169 * src/ObjectDump.cpp: make work with command line arguments
5171 2005-11-18 Nick Kledzik <kledzik@apple.com>
5173 * Massive rework to remove preprocessor conditionals and use templates
5175 2005-11-14 Nick Kledzik <kledzik@apple.com>
5177 * Created new Subversion repository for ld64 from cvs tag ld64-27.2