2 ----- Tagged ld64-97.14
4 2010-04-20 Nick Kledzik <kledzik@apple.com>
6 <rdar://problem/7712869> if last section is zero-fill don't add size to filesize total in -r mode
8 ----- Tagged ld64-97.13
10 2010-03-17 Nick Kledzik <kledzik@apple.com>
12 <rdar://problem/7824112> Support for iPhoneSimulator with OBJC 2.0 ABI
15 ----- Tagged ld64-97.12
17 2010-03-17 Nick Kledzik <kledzik@apple.com>
19 <rdar://problem/7712869> if last section is zero-fill don't add size to filesize total in -r mode
21 ----- Tagged ld64-97.11
23 2010-01-26 Nick Kledzik <kledzik@apple.com>
25 <rdar://problem/7622634> Libc-624.1 causes latent ld bug
26 * build linker -no_pie
29 ----- Tagged ld64-97.10
31 2010-01-26 Nick Kledzik <kledzik@apple.com>
33 <rdar://problem/7556912> LC_SEGMENT command 0 filesize field greater than vmsize field
34 * Move __DATA to end in -r mode
37 2010-01-26 Nick Kledzik <kledzik@apple.com>
39 <rdar://problem/7516793> symboled __ustring strings of just 0x0000 mis-parsed
40 * Parse __ustring section based on content - not just labels
43 ----- Tagged ld64-97.9
45 2010-01-14 Nick Kledzik <kledzik@apple.com>
47 <rdar://problem/7532743> LC_SEGMENT command 0 filesize field greater than vmsize field
48 * for i386 -r mode sort __IMPORT segment before __DATA segment
51 2010-01-11 Nick Kledzik <kledzik@apple.com>
53 * fix ARM -r -d references to tentative definitions
55 ----- Tagged ld64-97.8
57 2009-12-08 Nick Kledzik <kledzik@apple.com>
59 <rdar://problem/7455147> many mach-o images in Barolo have MH_WEAK_DEFINES bit incorrectly set
60 * don't let auto-strip weak symbols set MH_WEAK_DEFINES
63 ----- Tagged ld64-97.7
65 2009-11-30 Nick Kledzik <kledzik@apple.com>
67 <rdar://problem/7429384> llvmgcc now puts const short arrays in __ustring section, linker does not handle that
68 * Only auto-coalesce UTF16 strings that are labeled with "___utf16_string*"
71 ----- Tagged ld64-97.6
73 2009-11-06 Nick Kledzik <kledzik@apple.com>
75 <rdar://problem/7332627> make -pie default for x86_64 for 10.7 and later
78 2009-10-28 Nick Kledzik <kledzik@apple.com>
80 <rdar://problem/7331635> Add a -no_pie flag
81 * support -no_pie and LD_NO_PIE
84 ----- Tagged ld64-97.5
86 2009-10-27 Nick Kledzik <kledzik@apple.com>
88 <rdar://problem/7341117> crash when __ustring section has zero length string
89 * stop trying to suppress tailing 0x0000 from synthesized string used to coalese utf16 strings
92 ----- Tagged ld64-97.4
94 2009-10-21 Nick Kledzik <kledzik@apple.com>
96 <rdar://problem/7320293> missing thumb bit when thumb function takes address of itself
97 * move toao.atom == srcao.atom test to after fromao.atom == srcao.atom test
100 ----- Tagged ld64-97.3
102 2009-10-06 Nick Kledzik <kledzik@apple.com>
104 * Add missing LittleEndian::set32() in arm::kPointerDiff
106 2009-10-05 Nick Kledzik <kledzik@apple.com>
108 <rdar://problem/7268427> ARM: handle pointer-diff to weak thumb that is overridden by non-weak ARM
109 * When parsing ARM relocations, if target is a thumb function, remove one from addend
110 * When writing out content for arm::kPointerDiff, add one if target is thumb
111 * When writing ARM_RELOC_SECTDIFF, use target offsets if they fit in function
114 ----- Tagged ld64-97.2
116 2009-09-25 Nick Kledzik <kledzik@apple.com>
118 <rdar://problem/7200658> 'unknown DWARF EH encoding' message logged to console with clang-50
121 ----- Tagged ld64-97.1
123 2009-07-28 Nick Kledzik <kledzik@apple.com>
125 <rdar://problem/7099040> make better no-PIC branch island to thumb1
126 * Add kBranchIslandNoPicToThumb1 as 8-byte no-PIC island
129 2009-07-20 Nick Kledzik <kledzik@apple.com>
131 <rdar://problem/7075703> section$start$__DATA$__bss can fail
132 * In SectionBoundaryAtom constructor make __bss and __common be zero-fill
133 * In AtomSorter, make sure end kSectionEnd sort after kTentativeDefinition
134 * unit-tests/test-cases/section-labels-zero-fill: add test cases
139 2009-07-13 Nick Kledzik <kledzik@apple.com>
141 <rdar://problem/7049478> empty dylib should have subtype from command line
142 In Linker::writeOutput() for ARM, set initial fCurrentCpuConstraint to be command line subtype
145 2009-07-09 Nick Kledzik <kledzik@apple.com>
147 <rdar://problem/7043920> crash when using -dead_strip and LTO with unresolved intrinsic
148 * In Linker::optimize() after final deadStripResolve() call checkUndefines() one last time
151 2009-07-09 Nick Kledzik <kledzik@apple.com>
153 <rdar://problem/7043256> ld64 can not find a -e entry point from an archive
154 * src/ld/ld.cpp: add searchArchives parameter to entryPoint() for use by deadStripResolve()
155 * unit-tests/test-cases/dead_strip-entry-archive: added test case
158 2009-07-08 Nick Kledzik <kledzik@apple.com>
160 <rdar://problem/6702217> __objc_classrefs section could be coalesced
161 * In machoReader, chop up __objc_classrefs section into pointer size atoms
162 and make each weak and hidden with a name based on its target name.
165 2009-06-26 Nick Kledzik <kledzik@apple.com>
167 <rdar://problem/6715874> "ld: symbol dyld_stub_binding_helper not defined" for xnu built with clang for x86_64
168 * Fix relocationNeededInFinalLinkedImage() to say weak-defs don't require indirection in static executables
169 * Added unit-tests/test-cases/static-executable-weak-defines
172 2009-06-26 Nick Kledzik <kledzik@apple.com>
174 <rdar://problem/7012016> Error msg for missing -init symbol is misleading/unclear
175 * In Linker::checkUndefines() check all ways that the command line could add an undefined
176 and then search for close matches/typos.
179 2009-06-25 Nick Kledzik <kledzik@apple.com>
181 <rdar://problem/5725900> We need ld-symbol-moving-symbols for ARM/Embedded
182 * In mach_o::dylib::Reader::addSymbol() parse iPhoneOS version strings
183 * Update IPhoneVersionMin
186 2009-06-25 Nick Kledzik <kledzik@apple.com>
188 <rdar://problem/6933931> Linker makes subtype-zero file from empty subtype-nonzero file.
189 * In Linker::writeOutput() set inittal fCurrentCpuConstraint to be command line subtype
190 * Fix fArchitectureName to have arm sub-types
193 2009-06-24 Nick Kledzik <kledzik@apple.com>
195 <rdar://problem/6955021> ld should do a better job of reporting attempts to link directories
196 * In Options::buildSearchPaths() sanity check -L and -F options
199 2009-06-24 Nick Kledzik <kledzik@apple.com>
201 <rdar://problem/6974647> better error message when libLTO.dylib not loadable
202 * in Linker::createReader() provide detail error messages
205 ----- Tagged ld64-96.10
207 2009-08-31 Nick Kledzik <kledzik@apple.com>
209 <rdar://problem/7182988> empty dylib has been __mh_dylib_header n_sect
210 * rework patch to use MinimalTextAtom to ensure there is always a __text section
213 ----- Tagged ld64-96.9
215 2009-08-31 Nick Kledzik <kledzik@apple.com>
217 <rdar://problem/7182988> empty dylib has been __mh_dylib_header n_sect
218 * suppress __mh_dylib_header from symbol table if there is no __text section
220 Implicitly add dyld_stub_binder to libSystem.dylib so iPhone clients can build
221 against SnowLeopard libSystem.dylib.
224 ----- Tagged ld64-96.8
226 2009-08-30 Nick Kledzik <kledzik@apple.com>
228 <rdar://problem/7049478> SWB: gcc-5577.1 fails to build vecLib
231 ----- Tagged ld64-96.7
233 2009-08-29 Nick Kledzik <kledzik@apple.com>
235 <rdar://problem/6933931> Linker makes subtype-zero file from empty subtype-nonzero file.
238 ----- Tagged ld64-96.6
240 2009-07-30 Nick Kledzik <kledzik@apple.com>
242 <rdar://problem/7103437> ld: ldr 12-bit displacement out of range on SnowLeopard with gcc-5648
243 * in Section::Section() set fIndex to ensure __symbolstub1 sorts to end of __TEXT segment
246 ----- Tagged ld64-96.5
248 2009-07-28 Nick Kledzik <kledzik@apple.com>
250 <rdar://problem/7073626> Thumb mode compilation isn't working on 3.1 beta 2
251 * Fix instructions used in kBranchIslandToThumb1 case
254 ----- Tagged ld64-96.4
256 2009-06-22 Nick Kledzik <kledzik@apple.com>
258 <rdar://problem/6992387> platform linker should use platform ld_classic
259 * Fix Options::gotoClassicLinker() to use realpath()s
262 2009-06-22 Nick Kledzik <kledzik@apple.com>
264 * Fix Options::setIPhoneVersionMin() to handle 2.x through 9.x
267 ----- Tagged ld64-96.3
269 2009-06-17 Nick Kledzik <kledzik@apple.com>
271 * Change section sorting so that arm and ppc stub section is immediately after __text section
274 2009-06-17 Nick Kledzik <kledzik@apple.com>
276 <rdar://problem/6975041> don't use no-PIC stubs in any dylibs - it might conflict with codesigning
277 * In StubAtom<arm>::StubAtom() don't use kStubNoPIC for OS dylibs
280 ----- Tagged ld64-96.2
282 2009-06-09 Nick Kledzik <kledzik@apple.com>
284 * Back out page-cross branch work around
287 ----- Tagged ld64-96.1
289 2009-06-05 Nick Kledzik <kledzik@apple.com>
291 * Fix "duplicate symbol cache-line-crossing-stub" error by giving placeholders unique names
292 * Fix -pie by allowing relocs in x86 stubs and stub helpers
297 2009-06-04 Nick Kledzik <kledzik@apple.com>
299 * Darwin x86_64 static codegen is really dynamic code gen, so use LTO_CODEGEN_PIC_MODEL_DYNAMIC
302 2009-06-03 Nick Kledzik <kledzik@apple.com>
304 <rdar://problem/6945923> use lto_codegen_set_assembler_path()
307 2009-06-03 Nick Kledzik <kledzik@apple.com>
309 * In src/ld/LTOReader.hpp, move where -save-temps .bc file is saved to be after code model set
312 2009-06-01 Nick Kledzik <kledzik@apple.com>
314 <rdar://problem/6806033> Link Time Optimization error with 'dead code strip' + hidden symbol
315 * scan newAtoms returned from optimize() looking for ones already in the symbol table
316 * add test case unit-tests/test-cases/lto-dead_strip-all-hidden
319 2009-05-19 Nick Kledzik <kledzik@apple.com>
321 <rdar://problem/6881656> make dyld stubs smaller/faster
322 * Add new addSynthesizedAtoms() method to Writer, called before atoms are sorted
323 * Fix throwf() and warning() to check printf types
324 * Add arm::kPointerDiff12 to support fast arm stubs
325 * Add new ContentType values for stubs and (non)lazy pointers
326 * Add new variant of arm stub this is one instruction
329 2009-05-13 Nick Kledzik <kledzik@apple.com>
331 * ld64.xcodeproj/project.pbxproj: add warnings to dyldinfo target
332 * src/other/dyldinfo.cpp: support classic LINKEDIT format
335 2009-05-12 Nick Kledzik <kledzik@apple.com>
337 * src/ld/MachOWriterExecutable.hpp: fix optimization to skip branch islands with ARM bl instructions
340 2009-05-12 Nick Kledzik <kledzik@apple.com>
342 <rdar://problem/6836647> creation of __unwind_info section can fail if hundreds of functions cannot be compact encoded
343 * src/ld/MachOWriterExecutable.hpp: fix when to make regular vs compressed pages
346 2009-05-08 Nick Kledzik <kledzik@apple.com>
348 * src/ld/ld.cpp: enhance -save-temps to also write out optimized bitcode file
351 2009-05-08 Nick Kledzik <kledzik@apple.com>
353 * src/ld/ld.cpp: fix -order_file_statistics to print each symbol not found and correct total
356 2009-05-08 Nick Kledzik <kledzik@apple.com>
358 <rdar://problem/6870522> linker should be able to coalesce UTF16 strings
359 * src/ld/MachOReaderRelocatable.hpp: parse __ustring section by labels but synthesize an
360 atom name based on the content. Leverage for __cfstring section
361 * unit-tests/test-cases/cfstring-utf16: update test case
364 2009-05-07 Nick Kledzik <kledzik@apple.com>
366 * src/ld/MachOWriterExecutable.hpp: put branch islands further apart if there is no thumb code
369 2009-05-07 Nick Kledzik <kledzik@apple.com>
371 <rdar://problem/6331300> LINKEDIT optimizations for iPhone
372 * src/ld/ObjectFile.h: Recognize iPhoneOS 3.1
373 * src/ld/Options.cpp: iPhoneOS 3.1 => use compressed LINKEDIT
374 * src/ld/MachOWriterExecutable.hpp: support generating compressed LINKEDIT for arm
377 2009-05-04 Nick Kledzik <kledzik@apple.com>
379 <rdar://problem/5716715> Add linker support for ARM branch islands
380 <rdar://problem/5253691> Add labels to linker synthesized jump islands
381 * src/ld/MachOWriterExecutable.hpp: reworked BranchIslandAtom and createBranchIslands to support arm/thumb
382 * src/ld/ObjectFile.h: added kBranchIsland
383 * unit-tests/test-cases/branch-islands: updated test case to check arm/thumb
386 2009-04-30 Nick Kledzik <kledzik@apple.com>
388 * src/ld/Options.cpp: fix custom stack base address for arm
391 2009-04-30 Nick Kledzik <kledzik@apple.com>
393 <rdar://problem/6818272> likely incorrect warning about common symbols
394 * src/ld/Options.cpp: ignore LD_WARN_COMMONS in -r mode
397 ----- Tagged ld64-95.8.3
399 2009-03-31 Nick Kledzik <kledzik@apple.com>
401 <rdar://problem/6719270> ld might set MH_WEAK_DEFINES when it should not
402 * src/ld/MachOWriterExecutable.hpp: rescan fRegularDefAtomsThatOverrideADylibsWeakDef and only consider global ones
405 ----- Tagged ld64-95.8.2
407 2009-03-18 Nick Kledzik <kledzik@apple.com>
409 * src/ld/MachOReaderRelocatable.hpp: back out -force_cpusubtype_ALL changes
412 ----- Tagged ld64-95.8.1
414 2009-03-17 Nick Kledzik <kledzik@apple.com>
416 <rdar://problem/6578416> -dead_strip inhibits weak coalescing in no_dead_strip section
417 * src/ld/ld.cpp: in markDead() remove from fLiveRootAtoms
420 2009-03-17 Nick Kledzik <kledzik@apple.com>
422 <rdar://problem/6671072> libgcc fails to build in with ld64-95.8
423 * src/ld/MachOReaderRelocatable.hpp: interpret CPU_SUBTYPE_ARM_ALL as CPU_SUBTYPE_ARM_V4T
424 * src/ld/Options.cpp: interept -force_cpusubtype_ALL as -arch armv4t
427 ----- Tagged ld64-95.8
429 2009-02-09 Nick Kledzik <kledzik@apple.com>
431 <rdar://problem/6569316> ld64-95.7 crashes building Foundation-678.39 in side build
432 * src/ld/MachOReaderRelocatable.hpp: handle a zero length section with a label before __cstring section
435 ----- Tagged ld64-95.7
437 2009-02-06 Nick Kledzik <kledzik@apple.com>
439 * src/ld/ObjectFile.h: make fAddCompactUnwindEncoding false by default
442 2009-02-06 Nick Kledzik <kledzik@apple.com>
444 <rdar://problem/6537210> ER: add linker option to zero fill empty DATA sections on disk
445 * src/ld/Options.cpp: add support for -no_zero_fill_sections
446 * src/ld/MachOReaderRelocatable.hpp: isZeroFill() is only true if fOptimizeZeroFill
447 * doc/man/man1/ld.1: document -no_zero_fill_sections
448 * unit-tests/test-cases/no_zero_fill_sections: add test case
451 2009-02-05 Nick Kledzik <kledzik@apple.com>
453 <rdar://problem/6497366> label getting resolved to the wrong address.
454 * src/ld/MachOWriterExecutable.hpp: add findAtomAndOffsetForSection() and use it to disambiguate
455 * unit-tests/test-cases/label-on-end-of-section: added test case
458 2009-01-27 Nick Kledzik <kledzik@apple.com>
460 <rdar://problem/6517393> Warn -force_cpusubtype_ALL is not supported
461 * src/ld/Options.cpp: warn if fForceSubtypeAll and fArchitecture is CPU_TYPE_ARM
464 ----- Tagged ld64-95.6
466 2009-01-25 Nick Kledzik <kledzik@apple.com>
468 <rdar://problem/6439020> Add support for section start/end labels
469 * src/ld/ObjectFile.h: add kSectionStart and kSectionEnd
470 * src/ld/MachOReaderRelocatable.hpp: create SectionBoundaryAtoms as needed
471 * src/ld/ld.cpp: sort SectionBoundaryAtoms correctly
472 * src/ld/MachOWriterExecutable.hpp: allow all relocations in preload images
475 ----- Tagged ld64-95.5
477 2009-01-15 Nick Kledzik <kledzik@apple.com>
479 * src/ld/MachOWriterExecutable.hpp: in hasPageCrossingBranches() ignore branches preceeded by a branch
482 ----- Tagged ld64-95.4
484 2009-01-15 Nick Kledzik <kledzik@apple.com>
486 * src/ld/Options.cpp: handle -kext and -r the same for fPreventPageCrossingBranches
489 ----- Tagged ld64-95.3
491 2009-01-14 Nick Kledzik <kledzik@apple.com>
493 <rdar://problem/6497574> linker should alter layout to prevent armv7 page crossing branches
494 * src/ld/Options.cpp: set fPreventPageCrossingBranches
495 * src/ld/MachOWriterExecutable.hpp: adjust layout of __text so there are not page crossing branches
496 * src/ld/MachOReaderRelocatable.hpp: support new ARM_THUMB_32BIT_BRANCH reloce
499 ----- Tagged ld64-95.2.10
501 2009-04-02 Nick Kledzik <kledzik@apple.com>
503 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
504 * src/ld/ld.cpp: change Section constructor to copy segment and section names
507 ----- Tagged ld64-95.2.9
509 2009-04-02 Nick Kledzik <kledzik@apple.com>
511 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
512 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
515 ----- Tagged ld64-95.2.8
517 2009-03-24 Nick Kledzik <kledzik@apple.com>
519 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
520 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
523 ----- Tagged ld64-95.2.7
525 2009-03-11 Nick Kledzik <kledzik@apple.com>
527 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
528 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
529 that is already explictly or implicitly linked.
530 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
533 2009-03-10 Nick Kledzik <kledzik@apple.com>
535 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
536 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
537 to a symbol in a dylib that is a weak definition
538 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
541 2009-03-10 Nick Kledzik <kledzik@apple.com>
543 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
544 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
545 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
548 ----- Tagged ld64-95.2.6
550 2009-02-27 Nick Kledzik <kledzik@apple.com>
552 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
553 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
554 that will be exported when computing MH_WEAK_DEFINES
555 * unit-tests/test-cases/operator-new: updated to reproduce issue
558 ----- Tagged ld64-95.2.5
560 2009-02-24 Nick Kledzik <kledzik@apple.com>
562 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
563 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
564 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
567 ----- Tagged ld64-95.2.4
569 2009-02-23 Nick Kledzik <kledzik@apple.com>
571 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
574 2009-02-18 Nick Kledzik <kledzik@apple.com>
576 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
577 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
580 2009-02-18 Nick Kledzik <kledzik@apple.com>
582 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
583 * src/ld/Architectures.hpp: add kSectionOffset24
584 * src/ld/ObjectFile.h: add getFDE()
585 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
586 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
587 * src/other/unwinddump.cpp: update unwinddump output to display register save set
590 2009-02-16 Nick Kledzik <kledzik@apple.com>
592 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
593 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
596 2009-02-15 Nick Kledzik <kledzik@apple.com>
598 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
599 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
600 * unit-tests/test-cases/relocs-neg-from-local: add test case
603 2009-02-12 Nick Kledzik <kledzik@apple.com>
605 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
606 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
607 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
610 2009-02-12 Nick Kledzik <kledzik@apple.com>
612 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
613 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
614 * src/other/dyldinfo.cpp: update to display weak_import attribute
615 * unit-tests/test-cases/weak_import: updated test case
618 2009-02-06 Nick Kledzik <kledzik@apple.com>
620 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
621 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
624 ----- Tagged ld64-95.2.3
626 2009-02-04 Nick Kledzik <kledzik@apple.com>
628 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
629 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
632 ----- Tagged ld64-95.2.2
634 2009-02-02 Nick Kledzik <kledzik@apple.com>
636 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
637 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
638 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
641 ----- Tagged ld64-95.2.1
643 ----- Tagged ld64-95.2.10
645 2009-04-02 Nick Kledzik <kledzik@apple.com>
647 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
648 * src/ld/ld.cpp: change Section constructor to copy segment and section names
651 ----- Tagged ld64-95.2.9
653 2009-04-02 Nick Kledzik <kledzik@apple.com>
655 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
656 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
659 ----- Tagged ld64-95.2.8
661 2009-03-24 Nick Kledzik <kledzik@apple.com>
663 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
664 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
667 ----- Tagged ld64-95.2.7
669 2009-03-11 Nick Kledzik <kledzik@apple.com>
671 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
672 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
673 that is already explictly or implicitly linked.
674 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
677 2009-03-10 Nick Kledzik <kledzik@apple.com>
679 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
680 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
681 to a symbol in a dylib that is a weak definition
682 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
685 2009-03-10 Nick Kledzik <kledzik@apple.com>
687 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
688 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
689 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
692 ----- Tagged ld64-95.2.6
694 2009-02-27 Nick Kledzik <kledzik@apple.com>
696 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
697 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
698 that will be exported when computing MH_WEAK_DEFINES
699 * unit-tests/test-cases/operator-new: updated to reproduce issue
702 ----- Tagged ld64-95.2.5
704 2009-02-24 Nick Kledzik <kledzik@apple.com>
706 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
707 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
708 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
711 ----- Tagged ld64-95.2.4
713 2009-02-23 Nick Kledzik <kledzik@apple.com>
715 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
718 2009-02-18 Nick Kledzik <kledzik@apple.com>
720 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
721 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
724 2009-02-18 Nick Kledzik <kledzik@apple.com>
726 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
727 * src/ld/Architectures.hpp: add kSectionOffset24
728 * src/ld/ObjectFile.h: add getFDE()
729 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
730 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
731 * src/other/unwinddump.cpp: update unwinddump output to display register save set
734 2009-02-16 Nick Kledzik <kledzik@apple.com>
736 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
737 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
740 2009-02-15 Nick Kledzik <kledzik@apple.com>
742 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
743 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
744 * unit-tests/test-cases/relocs-neg-from-local: add test case
747 2009-02-12 Nick Kledzik <kledzik@apple.com>
749 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
750 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
751 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
754 2009-02-12 Nick Kledzik <kledzik@apple.com>
756 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
757 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
758 * src/other/dyldinfo.cpp: update to display weak_import attribute
759 * unit-tests/test-cases/weak_import: updated test case
762 2009-02-06 Nick Kledzik <kledzik@apple.com>
764 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
765 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
768 ----- Tagged ld64-95.2.3
770 2009-02-04 Nick Kledzik <kledzik@apple.com>
772 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
773 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
776 ----- Tagged ld64-95.2.2
778 2009-02-02 Nick Kledzik <kledzik@apple.com>
780 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
781 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
782 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
785 ----- Tagged ld64-95.2.1
787 2009-01-29 Nick Kledzik <kledzik@apple.com>
789 <rdar://problem/6532377> gcc DejaGnu failure: building longcall/dylib library
790 * src/ld/MachOWriterExecutable.hpp: if no __DATA sections insert non-lazy pointers at end of __TEXT segment
791 * unit-tests/test-cases/no-data-bundle: added test case
794 ----- Tagged ld64-95.2
796 2009-01-06 Nick Kledzik <kledzik@apple.com>
798 <rdar://problem/6476760> strip -S fails with "new trie is larger than original"
799 * src/other/PruneTrie.cpp: don't align trie more than original trie was aligned
802 ----- Tagged ld64-95.1
804 2008-12-21 Nick Kledzik <kledzik@apple.com>
806 * src/ld/MachOWriterExecutable.hpp: in new linkedit format, make sure only exported symbols
807 make it into weak binding info
812 2008-12-18 Nick Kledzik <kledzik@apple.com>
814 * src/ld/Options.cpp: move check for fSharedRegionEligible until fPrebind has stabilized
817 2008-12-18 Nick Kledzik <kledzik@apple.com>
819 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
820 * src/ld/Options.cpp: turn on compressed LINKEDIT by default
823 ----- Tagged ld64-94.1
825 2008-12-16 Nick Kledzik <kledzik@apple.com>
827 * src/ld/Options.cpp: Fix -F handling in buildSearchPaths()
832 2008-12-15 Nick Kledzik <kledzik@apple.com>
834 * doc/man/man1/ld.1: document new options
837 2008-12-15 Nick Kledzik <kledzik@apple.com>
839 <rdar://problem/6134468> linker should enforce all .o files have same sub-type, and ignore sub-type of dylibs
840 * doc/man/man1/ld.1: update man page about -allow_sub_type_mismatches
841 * src/ld/ld.cpp: call validFile() with new arguments
842 * src/ld/MachOReaderRelocatable.hpp: add new arguments to validFile()
843 * src/ld/Options.cpp: Support LD_ALLOW_CPU_SUBTYPE_MISMATCHES and -allow_sub_type_mismatches
846 2008-12-15 Nick Kledzik <kledzik@apple.com>
848 <rdar://problem/6438270> -syslibroot should skip standard search paths not in the SDK
849 * src/ld/Options.cpp: in buildSearchPaths() if an SDK is specified don't add
850 standard search paths not in the SDK.
853 2008-12-15 Nick Kledzik <kledzik@apple.com>
855 <rdar://problem/6406609> ld: remove "can't make compact unwind encoding" warning
856 * src/ld/ObjectFile.h: add fWarnCompactUnwind
857 * src/ld/Options.cpp: -warn_compact_unwind --> fWarnCompactUnwind
858 * src/ld/MachOReaderRelocatable.hpp: test fWarnCompactUnwind before warning
861 2008-12-15 Nick Kledzik <kledzik@apple.com>
863 <rdar://problem/6442926> Add dtrace usdt support for arm to ld64
864 * src/ld/MachOWriterExecutable.hpp: handle arm::kDtraceIsEnabledSite
865 * unit-tests/test-cases/dtrace-static-probes: use is-enabled in test case
870 2008-12-11 Nick Kledzik <kledzik@apple.com>
872 * src/ld/ObjectFile.h: add fIPhoneVersionMin to track min iPhoneOS version
873 * src/ld/Options.cpp: use fIPhoneVersionMin
876 2008-12-11 Nick Kledzik <kledzik@apple.com>
878 <rdar://problem/6431277> non-lazy pointer to non-global tentative definition encoded wrong
879 * src/ld/MachOWriterExecutable.hpp: don't use INDIRECT_SYMBOL_LOCAL for tentative definitions
880 * unit-tests/test-cases/non-lazy-r: updated test case
883 2008-12-11 Nick Kledzik <kledzik@apple.com>
885 <rdar://problem/6437667> kernel fails to boot when ld64 used for intermediate ld -r step
886 * src/ld/MachOWriterExecutable.hpp: in -r mode when generating a scattered sect-diff reloc for
887 i386/arm, special case when from target is not the atom
888 the relocation is in.
889 * unit-tests/test-cases/relocs-asm: update test case
892 2008-12-11 Nick Kledzik <kledzik@apple.com>
894 * src/ld/ld.cpp: handle new __program_vars section
895 * src/ld/MachOWriterExecutable.hpp: handle inserting synthesized sections when there is no __dyld section
898 2008-12-11 Nick Kledzik <kledzik@apple.com>
900 * src/ld/MachOReaderRelocatable.hpp: Fix getDescription() to work when direct reference is to anonymous atom
903 2008-12-10 Nick Kledzik <kledzik@apple.com>
905 * src/ld/Options.cpp: enable LD_FORCE_NO_PREBIND to be used with arm
908 2008-12-10 Nick Kledzik <kledzik@apple.com>
910 <rdar://problem/6258169> Developer tool to print the new compressed LINKEDIT information
911 * src/other/dyldinfo.cpp: fix typo in usage()
914 2008-12-05 Nick Kledzik <kledzik@apple.com>
916 <rdar://problem/6308882> SnowLeopard kernel should compile warning free
917 * src/ld/MachOReaderRelocatable.hpp: correct parse two global labels at end of section and make one an alias
918 * unit-tests/test-cases/end-label: update test case
921 2008-12-04 Nick Kledzik <kledzik@apple.com>
923 <rdar://problem/6342245> Better warning than "PPC_RELOC_JBSR should not be using an external relocation"
924 * src/ld/MachOReaderRelocatable.hpp: issue warning with .o path if it was compiled with -mlong-branch
927 2008-12-04 Nick Kledzik <kledzik@apple.com>
929 <rdar://problem/6408832> linker should not map __pointers -> __nl_symbol_ptr unless actually making new LINKEDIT
930 * src/ld/ObjectFile.h: add fMakeCompressedDyldInfo for readers to see
931 * src/ld/Options.cpp: set fMakeCompressedDyldInfo for readers to see
932 * src/ld/MachOReaderRelocatable.hpp: check fMakeCompressedDyldInfo
935 2008-12-02 Nick Kledzik <kledzik@apple.com>
937 * src/ld/debugline.c: fix error handling in line_open()
940 2008-11-26 Nick Kledzik <kledzik@apple.com>
942 <rdar://problem/6401277> vtable with thumb entries broke after ld -r
943 * src/ld/MachOReaderRelocatable.hpp: if target of reloc is thumb, mask thumb bit off addend
944 * unit-tests/test-cases/thumb-pointer: added test case
947 2008-11-26 Nick Kledzik <kledzik@apple.com>
949 * src/ld/Option.cpp: Fix how crashreporterBuffer is created to not miss some arguments
952 2008-11-24 Nick Kledzik <kledzik@apple.com>
954 <rdar://problem/6398605> Security.framework has some duplicate FDEs for some functions
955 * src/ld/ld.cpp: remove fDeadAtoms from fLiveAtoms when there are weak atoms overriden by late loads
956 * unit-tests/test-cases/dead_strip-archive-eh: added test case
961 2008-11-21 Nick Kledzik <kledzik@apple.com>
963 * src/ld/MachOReaderDylib.hpp: if export_size is zero, no need to parse trie
964 * src/abstraction/MachOTrie.hpp: gracefully handle empty trie
967 2008-11-21 Nick Kledzik <kledzik@apple.com>
969 <rdar://problem/6257854> strip(1) support for new compressed LINKEDIT information
970 * ld64.xcodeproj/project.pbxproj: build and install new libprunetrie.a
971 * src/other/prune_trie.h: added
972 * src/other/PruneTrie.cpp: implements prune_trie()
975 2008-11-21 Nick Kledzik <kledzik@apple.com>
977 * src/ld/ld.cpp: if an export file is used and all weak symbols are masked, don't set WEAK_DEFINES
978 * unit-tests/test-cases/weak-def-flag: added test case
981 2008-11-20 Nick Kledzik <kledzik@apple.com>
983 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
984 * src/ld/MachOWriterExecutable.hpp: support generating new compressed format
985 * src/ld/MachOReaderRelocatable.hpp: new compress format implies non-lazy pointers in __DATA for i386
986 * src/ld/MachOReaderDylib.hpp: support linking aginst new format
987 * src/ld/Options.cpp: suppport -exported_symbols_order and -no_compact_linkedit
988 * src/ld/ld.cpp: track which atoms have weak counter parts in dylibs
989 * src/other/dyldinfo.cpp: added tool to display new LINKEDIT format
990 * ld64.xcodeproj/project.pbxproj: add dyldinfo tool
991 * unit-tests/*: lots of fixes to work with new format
994 2008-11-20 Nick Kledzik <kledzik@apple.com>
996 <rdar://problem/6389316> ld64 should preserve N_WEAK_REF when linking MH_KEXT_BUNDLEs
997 * src/ld/MachOWriterExecutable.hpp: set up fWeakImportMap in synthesizeKextGOT()
1000 2008-11-19 Nick Kledzik <kledzik@apple.com>
1002 <rdar://problem/6342406> VideoToolbox.framework has bad __TEXT.__eh_frame info
1003 * src/ld/Options.cpp: add -no_eh_labels option for use with -r
1004 * src/ld/MachOWriterExecutable.hpp: generate correct x86_64 labeless relocs in -r mode
1005 * src/ld/MachOReaderRelocatable.hpp: now ignore all labels and relocations in
1006 __TEXT/__eh_frame section and rely on getCFIs() from libunwind
1007 * unit-tests/test-cases/eh-coalescing-no-labels: add test case
1010 2008-11-19 Nick Kledzik <kledzik@apple.com>
1012 <rdar://problem/6378110> LTO doesn't like dtrace symbols
1013 * src/ld/LTOReader.hpp: ignore __dtrace_probe undefines in bitcode files
1016 2008-11-14 Nick Kledzik <kledzik@apple.com>
1018 * src/abstraction/MachOFileAbstraction.hpp: fix to work with 10.5 headers
1021 ----- Tagged ld64-91
1023 2008-11-07 Nick Kledzik <kledzik@apple.com>
1025 Remove COMPACT_UNWIND_SUPPORT conditionalizing
1028 2008-11-06 Nick Kledzik <kledzik@apple.com>
1030 Reorganize source layout. ld sources are now in "ld",
1031 and other tools are in "other".
1034 2008-11-05 Nick Kledzik <kledzik@apple.com>
1036 * ld64.xcodeproj/project.pbxproj: start installing unwinddump tool
1037 * src/UnwindDump.cpp: support -arch option
1038 * doc/man/man1/unwinddump.1: create man page
1041 2008-11-05 Nick Kledzik <kledzik@apple.com>
1043 <rdar://problem/6337329> linker should put cpusubtype in n_sect field of nlist entry for N_OSO debug note entries
1044 * src/ld.cpp: in synthesizeDebugNotes() set other field of OSO to be subtype
1047 2008-11-05 Nick Kledzik <kledzik@apple.com>
1049 <rdar://problem/3738966> Need a linker option to load all objects from one library
1050 * src/Options.cpp: support -force_load option
1051 * src/ArchiveReader.hpp: Add fForceLoad ivar
1052 * doc/man/man1/ld.1: update man page with -force_load option
1053 * unit-tests/test-cases/archive-force-load: add test case
1056 2008-11-05 Nick Kledzik <kledzik@apple.com>
1058 <rdar://problem/6308882> Dtrace Probe Warnings: SnowLeopard kernel should compile warning free
1059 * src/ld.cpp: don't generate GSYM stabs for old style __dtrace_probe
1060 * src/MachOReaderRelocatable.hpp: fix test for deciding if a symbol is an alias
1063 2008-11-04 Nick Kledzik <kledzik@apple.com>
1065 <rdar://problem/6294378> ADOBE: XCODE: ld: duplicate typeinfo in executable
1066 * src/ld.cpp: in dead-strip mode, record overriden symbols and later rebind all uses
1067 * unit-tests/test-cases/dead_strip-archive-weak: add test case
1070 2008-11-03 Nick Kledzik <kledzik@apple.com>
1072 <rdar://problem/6254202> support increased branch range in Thumb-2
1073 * src/MachOReaderRelocatable.hpp: handle full branch range in addRelocReference()
1074 * unit-tests/test-cases/branch-distance: added test case
1076 2008-10-31 Devang Patel <dpatel@apple.com>
1078 <rdar://problem/5725712> Sqlite 3.5.4 built with lvm-gcc-4.2 -O4 fails regression test
1079 * src/LTOReader.hpp: Use real atom scope when real atom is available.
1080 Preserve globals while optimizing an executable.
1082 2008-10-30 Nick Kledzik <kledzik@apple.com>
1084 * src/MachOReaderRelocatable.hpp: support all encodings in getEncodedP()
1087 ----- Tagged ld64-90
1089 2008-10-30 Nick Kledzik <kledzik@apple.com>
1091 <rdar://problem/6327584> icc has dwarf unwind info that is different than gcc
1092 * src/MachOReaderRelocatable.hpp: support more encodings in getEncodedP()
1095 2008-10-23 Nick Kledzik <kledzik@apple.com>
1097 <rdar://problem/6088653> build ld64 for x86_64
1098 * ld64.xcodeproj/project.pbxproj: add X86_64 to valid archs
1101 2008-10-23 Nick Kledzik <kledzik@apple.com>
1103 * ld64.xcodeproj/project.pbxproj: use generated @$(DERIVED_FILE_DIR)/linker_opts for extra
1104 linker options. This allows linker to be built if LTO headers and libs are missing.
1107 2008-10-23 Nick Kledzik <kledzik@apple.com>
1109 <rdar://problem/6273617> Linker warning not shown in the Xcode build log
1110 * src/Options.cpp: add colon to format string in warning()
1113 ----- Tagged ld64-89.3
1115 2008-10-24 Nick Kledzik <kledzik@apple.com>
1117 <rdar://problem/6317985> ld64-89 broke TOT OpenGL libProgrammability x86_64 build
1118 * src/MachOReaderRelocatable.hpp: add cast in getEncodedP()
1121 ----- Tagged ld64-89.2
1123 2008-10-23 Nick Kledzik <kledzik@apple.com>
1125 <rdar://problem/6312895> SnowLeopard: Libsystem built with ld64-89.1 causes crashes
1126 * src/MachOReaderRelocatable.hpp: when FDE information causes __text atom to be split, make the
1127 atoms follow-on pairs.
1130 ----- Tagged ld64-89.1
1132 2008-10-22 Nick Kledzik <kledzik@apple.com>
1134 * src/MachOReaderRelocatable.hpp: for x86_64 __eh_frame force direct references
1137 2008-10-21 Nick Kledzik <kledzik@apple.com>
1139 * src/ObjectDump.cpp: Use getContentType() to see if content type is a cstring
1142 ----- Tagged ld64-89
1144 2008-10-21 Nick Kledzik <kledzik@apple.com>
1146 <rdar://problem/6253171> 10A180 with QT-1119 roots: iTunes and QuickTime cannot play back purchased videos
1147 <rdar://problem/5950453> linker should not need .eh labels
1148 * src/MachOWriterExecutable.hpp: use kCFIType to set section attributes
1149 * src/MachOReaderRelocatable.hpp: use libunwind's CFITuple to parse __eh_frame content
1150 * src/ld.cpp: Add adjustScope() phase instead of demoting scope within symboltable.add()
1151 * unit-tests/test-cases/eh-stripped-symbols: added test case
1154 ----- Tagged ld64-88.1
1156 2008-10-16 Nick Kledzik <kledzik@apple.com>
1158 * src/MachOReaderRelocatable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
1159 * src/MachOWriterExecutable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
1162 2008-09-30 Nick Kledzik <kledzik@apple.com>
1164 <rdar://problem/6255983> OBJC2: Reorder __DATA,__objc_* sections by writedness
1165 * src/ld.cpp: change sorting order of Sections
1168 2008-09-29 Nick Kledzik <kledzik@apple.com>
1170 <rdar://problem/6159479> Executable produced by XCode 3.2 on 10.6 crashes on 10.3.9
1171 * src/MachOWriterExecutable.hpp: set objc_module_info_addr field of module table
1174 ----- Tagged ld64-88
1176 2008-09-25 Nick Kledzik <kledzik@apple.com>
1178 <rdar://problem/5935708> kexts need to be built as MH_BUNDLE mach-o files
1179 * src/ld.cpp: use getUndefinedProxyAtom() with kKextBundle
1180 * src/MachOFileAbstraction.hpp: add MH_KEXT_BUNDLE
1181 * src/Options.cpp: support -kext for all architectures
1182 * src/MachOWriterExecutable.hpp: support kKextBundle to make a bundle like kext
1183 * unit-tests/test-cases/kext-basic: added test case
1186 2008-09-25 Nick Kledzik <kledzik@apple.com>
1188 <rdar://problem/6052546> ld invoking wrong ld_classic
1189 * src/Options.cpp: first look for ld_classic relative to ld itself
1192 2008-09-25 Nick Kledzik <kledzik@apple.com>
1194 <rdar://problem/5855588> ld fails to link references from 32 bit code into 64 bit code
1195 <rdar://problem/5955200> Desired 32-bit absolute relocation
1196 * src/Architectures.hpp: add x86_64::kPointer32
1197 * src/MachOReaderRelocatable.hpp: support X86_64_RELOC_UNSIGNED with length=2
1198 * src/MachOWriterExecutable.hpp: support x86_64::kPointer32
1199 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added 32-bit pointer tests
1202 2008-09-25 Nick Kledzik <kledzik@apple.com>
1204 <rdar://problem/6075323> Should be able to mark dylibs as auto-dead-dylib-strip
1205 * src/Options.h: add fMarkDeadStrippableDylib
1206 * src/MachOReaderDylib.hpp: check MH_DEAD_STRIPPABLE_DYLIB
1207 * src/ObjectFile.h: add deadStrippable()
1208 * src/MachOFileAbstraction.hpp: add MH_DEAD_STRIPPABLE_DYLIB
1209 * src/Options.cpp: support -mark_dead_strippable_dylib
1210 * src/MachOWriterExecutable.hpp: test reader->deadStrippable(), set MH_DEAD_STRIPPABLE_DYLIB
1211 * doc/man/man1/ld.1: update man page
1212 * unit-tests/test-cases/dead_strippable_dylib: added test case
1215 2008-09-25 Nick Kledzik <kledzik@apple.com>
1217 <rdar://problem/6197601> ER: Add -seg_page_size option
1218 * src/Options.cpp: add -seg_page_size option
1219 * src/MachOWriterExecutable.hpp: use new page size info when laying out segments
1220 * doc/man/man1/ld.1: update man page
1223 2008-09-24 Nick Kledzik <kledzik@apple.com>
1225 <rdar://problem/5798786> -arch_errors_fatal not working
1226 * src/ld.cpp: check fOptions.errorOnOtherArchFiles()
1227 * src/Options.cpp: turn -arch_errors_fatal into fOptions.errorOnOtherArchFiles()
1230 2008-09-24 Nick Kledzik <kledzik@apple.com>
1232 <rdar://problem/6161215> CrashTracer: [USER] 1 crash in ld at ld: 0x5ce02
1233 * src/ld.cpp: abort if resolve() finds an unresolved reference, rather than allow a future crash
1236 2008-09-24 Nick Kledzik <kledzik@apple.com>
1238 <rdar://problem/6157989> linker crashes linking X86-64 with -fwritable-strings
1239 * src/MachOReaderRelocatable.hpp: handle unbound cfstring references
1240 * unit-tests/test-cases/cfstring-coalesce: update test case
1243 2008-09-24 Nick Kledzik <kledzik@apple.com>
1245 <rdar://problem/6213035> ld64: bl out of range (-17147704 max is +/-16M) on ppc
1246 * src/MachOWriterExecutable.hpp: tweak branch island regions to be every 14MB instead of 15MB
1249 2008-09-24 Nick Kledzik <kledzik@apple.com>
1251 <rdar://problem/5907981> -filelist fails with comma in path
1252 * src/Options.cpp: in loadFileList() first try without special comma meaning
1253 * unit-tests/test-cases/filelist/Makefile: update test case
1256 2008-09-23 Nick Kledzik <kledzik@apple.com>
1258 <rdar://problem/6203068> nop not used when aligning functions in -r mode
1259 * src/MachOWriterExecutable.hpp: change check for when to pad with nops to not test segment's name
1262 2008-09-23 Nick Kledzik <kledzik@apple.com>
1264 <rdar://problem/6238329> "-pie can only be used when linking a main executable" should be a warning, not an error
1265 * src/Options.cpp: make -pie on a dylib or bundle be a warning instead of an error
1268 2008-09-23 Nick Kledzik <kledzik@apple.com>
1270 * src/MachOReaderRelocatable.hpp: add warning if dwarf cannot be encoded as compact unwind
1273 2008-09-18 Nick Kledzik <kledzik@apple.com>
1275 * src/LTOReader.hpp: re-enable use of lto_codegen_debug_options()
1278 2008-09-16 Nick Kledzik <kledzik@apple.com>
1280 <rdar://problem/6219054> ld does not always set S_CSTRING_LITERALS on __TEXT,__cstring
1281 * src/MachOReaderRelocatable.hpp: add getContentType() to SymbolAtom
1282 * src/MachOWriterExecutable.hpp: for x86_64 don't override named cstrings with LC* name
1285 2008-09-10 Nick Kledzik <kledzik@apple.com>
1287 * Options.cpp: add __crashreporter_info__ to communicate command line to crash reporter
1288 * ld64.xcodeproj/project.pbxproj: leave local symbols in ld to provide better crash reports
1291 2008-09-08 Nick Kledzik <kledzik@apple.com>
1293 <rdar://problem/6126637> 161569 GCC 4.2 - breakpoints no longer work for a large number of functions
1294 * src/MachOReaderRelocatable.hpp: support DW_FORM_strp out-of-line strings when parsing line table
1297 2008-09-02 Nick Kledzik <kledzik@apple.com>
1299 * src/MachOReaderRelocatable.hpp: fix compact unwind personality for dyld and -slow_stubs
1302 2008-08-29 Nick Kledzik <kledzik@apple.com>
1304 <rdar://problem/6186838> -weak_library no longer forces uses to be weak_import
1305 * src/MachOWriterExecutable.hpp: use fWeakImport on dylib to force proxy atoms into fWeakImportMap
1306 * unit-tests/test-cases/weak_import-force: added test case
1309 2008-08-29 Nick Kledzik <kledzik@apple.com>
1311 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1312 * src/Options.cpp: add fOrderData and support -no_data_order
1313 * src/ld.cpp: modify tweakLayout() to sort atoms with relocations to start of __data section
1316 2008-08-27 Nick Kledzik <kledzik@apple.com>
1318 * src/Options.cpp: back out <rdar://problem/6174493>
1321 ----- Tagged ld64-87.5
1323 2008-08-26 Nick Kledzik <kledzik@apple.com>
1325 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
1326 * src/Options.cpp: swap any early symlinks to libSystem with libgcc_s
1329 ----- Tagged ld64-87.4
1331 2008-08-25 Nick Kledzik <kledzik@apple.com>
1333 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
1334 * src/Options.cpp: swap any early libSystem with libgcc_s
1337 2008-08-15 Nick Kledzik <kledzik@apple.com>
1339 <rdar://problem/5898326> Unable to build ppc debug builds (linker out of range error)
1340 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands() look ahead so large atoms don't push out branch islands
1343 ----- Tagged ld64-87.3.1
1345 2008-09-08 Nick Kledzik <kledzik@apple.com>
1347 <rdar://problem/6204202> i386 dylibs have incorrect personality pointers when put in dyld shared cache
1348 * src/MachOWriterExecutable.hpp: in addCrossSegmentRef() handle kImageOffset32 to __IMPORT segment
1351 ----- Tagged ld64-87.3
1353 2008-08-09 Nick Kledzik <kledzik@apple.com>
1355 <rdar://problem/6125381> work around compiler gcc_except_table alignment
1356 * src/ObjectFile.h: change getLSDA() to return a reference instead of an atom
1357 * src/MachOReaderRelocatable.hpp: special case __eh_frame 64-bit pointer diff relocations
1358 * src/MachOWriterExecutable.hpp: track lsda offset when creating __unwind_info section
1359 * src/UnwindDump.cpp: log when LDSA content does not start with 0xFF
1361 ----- Tagged ld64-87.2
1363 2008-08-07 Nick Kledzik <kledzik@apple.com>
1365 <rdar://problem/6131559> 10A141: libuwind falls back to dwarf and makes whole system super slow
1366 * src/MachOWriterExecutable.hpp: Fix sign extension bug with x86_64::kPointerDiff24
1367 * src/UnwindDump.cpp: warn about mangled LSDA entries when dumping unwind section
1370 ----- Tagged ld64-87.1
1372 2008-08-03 Nick Kledzik <kledzik@apple.com>
1374 * src/LTOReader.hpp: Don't use lto_codegen_debug_options until newer libLTO.dylib is available
1377 ----- Tagged ld64-87
1379 2008-07-21 Nick Kledzik <kledzik@apple.com>
1381 * src/Options.cpp: Always set fAutoOrderInitializers=false for dyld
1384 2008-07-21 Nick Kledzik <kledzik@apple.com>
1386 * src/MachOWriterExecutable.hpp: fix when regular vs compressed __unwind_info pages are generated
1387 * src/UnwindDump.cpp: fix function name decoding in regular pages
1390 2008-07-21 Nick Kledzik <kledzik@apple.com>
1392 * ld64.xcodeproj/project.pbxproj: don't allow ld to build for x86_64 until libdtrace.dylib is available
1395 2008-07-18 Nick Kledzik <kledzik@apple.com>
1397 * src/MachOReaderRelocatable.hpp: don't crash if debug_line section has no line table
1400 2008-07-18 Nick Kledzik <kledzik@apple.com>
1402 <rdar://problem/5628149> Duplicate probe firings in Security.framework
1403 * src/LTOReader.hpp: optimize() now returns atoms optimized away
1404 * src/ObjectFile.h: optimize() should return if it did anything
1405 * src/ArchiveReader.hpp: pass through optimize() result
1406 * src/ld.cpp: rework dtrace probe processing as a new pass to prevent double counting
1409 2008-07-15 Nick Kledzik <kledzik@apple.com>
1411 <rdar://problem/6061904> automatically order initializers to start of __TEXT
1412 * src/Options.cpp: add -no_order_inits option
1413 * src/MachOReaderRelocatable.hpp: merge __StaticInit into __text
1414 * src/ObjectFile.h: add fAutoOrderInitializers
1415 * src/ld.cpp: sort initializer to start of __text and terminators to end
1416 * doc/man/man1/ld.1: add doc about -no_order_inits
1417 * unit-tests/test-cases/init-order: add test case
1419 2008-07-15 Nick Kledzik <kledzik@apple.com>
1421 <rdar://problem/6073697> Only add LC_SEGMENT_SPLIT_INFO to dylibs that might be in the shared cache
1422 * src/MachOWriterExecutable.hpp: re-layout load commands after split-seg data computed
1423 * src/Options.cpp: non-public install name will disable split-seg load command
1426 2008-07-14 Nick Kledzik <kledzik@apple.com>
1428 <rdar://problem/6069861> ld -r for x86_64 is changing visibility of cstring constants
1429 * src/MachOWriterExecutable.hpp: force x86_64 cstring labels to be local in -r mode
1430 * unit-tests/test-cases/cstring-label: added test case
1433 2008-07-11 Nick Kledzik <kledzik@apple.com>
1435 <rdar://problem/6070190> ld not adding updating LC_SEGMENT_SPLIT_INFO with __unwind_info section
1436 * src/MachOWriterExecutable.hpp: run createSplitSegContent() after __unwind_info section is created
1438 2008-07-10 Nick Kledzik <kledzik@apple.com>
1440 * src/LTOReader.hpp: improve missing symbol error message
1443 2008-07-09 Nick Kledzik <kledzik@apple.com>
1445 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1446 * src/ld.cpp: first phase, order sections
1449 2008-07-08 Nick Kledzik <kledzik@apple.com>
1451 * src/MachOReaderRelocatable.hpp: remove "coal" sections when creating a final linked image
1454 2008-07-08 Nick Kledzik <kledzik@apple.com>
1456 <rdar://problem/6054476> ld: add support for mllvm LTO options
1457 * src/Options.cpp: support -mllvm option
1458 * src/LTOReader.hpp: call lto_codegen_debug_options() with -mllvm options
1459 * src/ld.cpp: pass llvmOptions to optimize()
1460 * src/Options.h: add fLLVMOptions
1461 * src/ArchiveReader.hpp: add llvmOptions parameter to optimize()
1462 * src/ObjectFile.h: add llvmOptions parameter to optimize()
1463 * unit-tests/test-cases/lto-llvm-options: add test case
1466 2008-07-07 Nick Kledzik <kledzik@apple.com>
1468 <rdar://problem/6054296> Linker fails with: 24-bit pointer diff out of range in unwind info in unwind info from...
1469 * src/MachOWriterExecutable.hpp: fix when to fallback to uncompressed unwind info
1472 2008-07-03 Nick Kledzik <kledzik@apple.com>
1474 <rdar://problem/6001472> ld crash with gcc-4.0 code that uses a zero sized array
1475 * src/MachOReaderRelocatable.hpp: handle zero size atom in a zero sized section
1478 2008-07-03 Nick Kledzik <kledzik@apple.com>
1480 <rdar://problem/6016809> ld crashes when bad ppc relocs are found
1481 * src/MachOReaderRelocatable.hpp: change all missing PAIR warnings to errors
1484 2008-07-02 Nick Kledzik <kledzik@apple.com>
1486 <rdar://problem/5881324> when linking a kext the static linker should leave a pad in the headers to allow code signing
1487 * src/MachOWriterExecutable.hpp: add padding for load commands in object files
1488 * unit-tests/test-cases/code-signed-object-file: added test case
1491 2008-07-02 Nick Kledzik <kledzik@apple.com>
1493 <rdar://problem/6048484> LC_SEGMENT_64 filesize incorrect for MH_OBJECT filetype
1494 * src/MachOWriterExecutable.hpp: correctly set segment size info in object files
1495 * unit-tests/test-cases/no-object-symbols: add test case
1498 2008-06-26 Nick Kledzik <kledzik@apple.com>
1500 * ld64.xcodeproj/project.pbxproj: enable ld and rebase targets to build for x86_64
1501 * src/rebase.cpp: remove unused fRelocBase field that was not 64-bit clean
1502 * src/MachOReaderRelocatable.hpp: fix getEncodedP() to be 64-bit clean
1505 ----- Tagged ld64-86.3
1507 2008-06-17 Nick Kledzik <kledzik@apple.com>
1509 * src/ld.cpp: fix loadUndefines() to double check undefine symbol was not already loaded
1512 ----- Tagged ld64-86.2
1514 2008-06-14 Nick Kledzik <kledzik@apple.com>
1516 * srd/ld.cpp: Add NULL check in getTentativesNames()
1519 ----- Tagged ld64-86.1
1521 2008-06-06 Nick Kledzik <kledzik@apple.com>
1523 * src/MachOWriterExecutable.hpp: fix header padding calculation for dyld
1526 ----- Tagged ld64-86
1528 2008-06-04 Nick Kledzik <kledzik@apple.com>
1530 * src/LTOReader.hpp: if lto_codegen_add_module() fails, add explanation to error message
1533 2008-06-04 Nick Kledzik <kledzik@apple.com>
1535 * src/ObjectFile.h: add deadAtoms parameter to optimize()
1537 * src/ArchiveReader.hpp: ditto
1538 * src/MachOReaderRelocatable.hpp: handle llvm use of 0x1B pointer encodings in CIEs
1539 * src/LTOReader.hpp: make sure libLTO.dylib knows about any llvm symbol coalesced away
1540 * unit-tests/test-cases/lto-weak-native-override: add test case
1543 2008-06-04 Nick Kledzik <kledzik@apple.com>
1545 <rdar://problem/5935600> LTO : 176.gcc and 177.mesa build failure at -O4
1546 * src/LTOReader.hpp: make sure internal is returned by getAtoms()
1547 * unit-tests/test-cases/lto-archive-dylib: update test case
1550 2008-06-03 Nick Kledzik <kledzik@apple.com>
1552 <rdar://problem/5894163> fix for 5613343 need to search for definitions for common symbols is broken
1553 * src/ld.cpp: modify loadUndefines() to check for undefines in all files and tentative definitions but only in archives
1554 * src/machochecker.cpp: check for undefine symbols and external symbols with same name
1555 * unit-tests/test-cases/tentative-and-archive: update test case
1558 2008-06-03 Nick Kledzik <kledzik@apple.com>
1560 <rdar://problem/5935237> linker produces wrong result for 16-bit call relocations
1561 * src/MachOReaderRelocatable.hpp: properly parse i386 scattered relocs for word sized pc-rel vanilla
1562 * src/MachOWriterExecutable.hpp: propery compute displacement for x86::kPCRel16
1563 * unit-tests/test-cases/relocs-asm: update test case with callw instructions
1566 2008-06-03 Nick Kledzik <kledzik@apple.com>
1568 <rdar://problem/5905900> Building kext x86_64 with unexported symbols file causes linking problems
1569 * src/MachOWriterExecutable.hpp: better check when creating undefined proxy atoms
1570 * unit-tests/test-cases/unexported_symbols_list-r: added test case
1573 2008-06-02 Nick Kledzik <kledzik@apple.com>
1575 <rdar://problem/5659338> S_CSTRING_LITERALS section type not preserved in executable
1576 * src/ObjectFile.h: added ContentType
1577 * src/MachOReaderRelocatable.hpp: set ContentType for anonymous string literals
1578 * src/MachOWriterExecutable.hpp: set S_CSTRING_LITERALS if ContentType is kCStringType
1579 * unit-tests/test-cases/cstring-custom-section: added test case
1582 2008-06-02 Nick Kledzik <kledzik@apple.com>
1584 <rdar://problem/5980194> linker should produce __unwind_info section in final linked images
1585 * src/ld.cpp: sort __unwind_info then __eh_frame section to end of __TEXT
1586 * src/Architectures.hpp: add kImageOffset32 and kPointerDiff24
1587 * src/ObjectFile.h: add compact unwind info support
1588 * src/MachOReaderRelocatable.hpp: add compact unwind info support
1589 * src/MachOFileAbstraction.hpp: add C++ wrappers for unwind section layout
1590 * src/UnwindDump.cpp: new tool for dumping __unwind_info section
1591 * src/MachOWriterExecutable.hpp: create __unwind_info section when needed
1592 * src/ObjectDump.cpp: print unwind info
1595 2008-06-02 Nick Kledzik <kledzik@apple.com>
1597 * unit-tests/test-cases/llvm-integration: split out some test cases
1598 * unit-tests/test-cases/lto-preload-pie: added
1599 * unit-tests/test-cases/lto-archive-dylib: added
1602 2008-05-30 Nick Kledzik <kledzik@apple.com>
1604 * unit-tests: fixes to build all tests with with gcc-4.2 on SnowLeopard
1607 2008-05-30 Nick Kledzik <kledzik@apple.com>
1609 <rdar://problem/5536348> support -preload option to generate MH_PRELOAD binaries compatible with mtoc(1) and EFI
1610 * src/ld.cpp: add entryPoint parameter to optimize()
1611 * src/ArchiveReader.hpp: ditto
1612 * src/ObjectFile.h: ditto
1613 * src/LTOReader.hpp: use entryPoint parameter to optimize()
1614 * src/Options.h: add kPreload and segment alignment
1615 * src/Options.cpp: support -preload and -segalign
1616 * src/MachOWriterExecutable.hpp: support kPreload and non-page aligned segments
1619 2008-05-30 Nick Kledzik <kledzik@apple.com>
1621 <rdar://problem/4431008> ld should warn if passed -r and also dylibs
1622 * src/ld.cpp: check for spurious dylibs in Linker::addDylib()
1625 ----- Tagged ld64-85.6
1627 2008-11-01 Nick Kledzik <kledzik@apple.com>
1629 <rdar://problem/6254202> support increased branch range in Thumb-2
1630 * src/MachOWriterExecutable.hpp: in fixUpReferenceFinal() support new longer branch range
1633 2008-11-01 Nick Kledzik <kledzik@apple.com>
1635 <rdar://problem/6104368> ld warning: unknown option to -iphoneos_version_min, not 1.x or 2.x
1636 * src/Options.cpp: In setIPhoneVersionMin() support 3.x
1639 ----- Tagged ld64-85.5
1641 2008-09-17 Nick Kledzik <kledzik@apple.com>
1643 <rdar://problem/6162415> vtable pointers can be missing thumb bit
1644 * src/MachOWriterExecutable.hpp: Writer<arm>::fixUpReferenceFinal() OR in the 1 bit if the target
1645 of a arm::kReadOnlyPointer is thumb.
1648 ----- Tagged ld64-85.4
1650 2008-08-11 Nick Kledzik <kledzik@apple.com>
1652 <rdar://problem/6138961> ld should ignore LD_PREBIND when processing a static archive
1653 * src/MachOWriterExecutable.hpp: in setImportNlist() never use N_PBUD for object files
1655 ----- Tagged ld64-85.3
1657 2008-07-14 Nick Kledzik <kledzik@apple.com>
1659 <rdar://problem/6060912> Prebinding busted in DTSB
1660 * src/Options.cpp: check for libstdc++.6.0.[49] in seg_addr_table
1663 ----- Tagged ld64-85.2
1665 2008-05-06 Nick Kledzik <kledzik@apple.com>
1667 <rdar://problem/5905889> ARM ld should take W bit off of maxprot for __TEXT segment
1668 * src/MachOWriterExecutable.hpp: for iPhone always set maxprot to be initprot in all segments
1671 2008-05-06 Nick Kledzik <kledzik@apple.com>
1673 <rdar://problem/5914343> encryptable images may not be signable
1674 * src/MachOWriterExecutable.hpp: use minimum header padding when aligning __text section
1677 ----- Tagged ld64-85 (Xcode 3.1)
1679 2008-04-29 Nick Kledzik <kledzik@apple.com>
1681 * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
1684 2008-04-29 Nick Kledzik <kledzik@apple.com>
1686 <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
1687 * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
1690 2008-04-29 Nick Kledzik <kledzik@apple.com>
1692 <rdar://problem/5866582> GLRendererFloat has bad __eh_frame section caused by mixing llvm-gcc and gcc object files
1693 * src/MachOReaderRelocatable.hpp: make all atoms in __eh_frame section have 1-byte alignment
1694 * src/MachOWriterExecutable.hpp: make __eh_frame section have pointer sized alignment
1697 2008-04-17 Nick Kledzik <kledzik@apple.com>
1699 * src/MachOReaderRelocatable.hpp: better cpu subtype support
1702 2008-04-14 Nick Kledzik <kledzik@apple.com>
1704 <rdar://problem/5733759> ld64 has bad ARM branch island check
1705 * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail
1708 2008-04-10 Nick Kledzik <kledzik@apple.com>
1710 * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
1713 ----- Tagged ld64-84.4
1715 2008-04-10 Nick Kledzik <kledzik@apple.com>
1717 <rdar://problem/5847206> SPEC2000/eon built with -mdynamic-no-pic won't run
1718 * src/Architectures.hpp: added arm::kReadOnlyPointer
1719 * src/MachOReaderRelocatable.hpp: generate arm::kReadOnlyPointer
1720 * src/MachOWriterExecutable.hpp: use arm::kReadOnlyPointer
1721 * src/machochecker.cpp: allow MH_PIE bit
1722 * unit-tests/test-cases/switch-jump-table: added test cases
1725 ----- Tagged ld64-84.3
1727 2008-04-09 Nick Kledzik <kledzik@apple.com>
1729 <rdar://problem/5852023> -undefined dynamic_lookup busted
1730 * src/ld.cpp: don't create proxy atom when scanning for dylib duplicates
1731 * unit-tests/test-cases/tentative-and-archive: use -undefined dynamic_lookup
1734 ----- Tagged ld64-84.2
1736 2008-04-04 Nick Kledzik <kledzik@apple.com>
1738 * src/ld.cpp: don't add .eh symbols to symbol table in -r mode
1739 * unit-tests/test-cases/eh-coalescing-r: update to test out of order coalescing
1742 ----- Tagged ld64-84.1
1744 2008-03-28 Nick Kledzik <kledzik@apple.com>
1746 <rdar://problem/5720961> ld should prefer architecture-specific variant over generic in fat object file
1747 * src/Options.cpp: fully process -arch arguments into fArchitecture and fSubArchitecture
1748 * src/ld.cpp: when -arch with a subtype is used, try to find the exact subtype from fat files
1749 * unit-tests/test-cases/cpu-sub-types-preference: added test cases for arm and ppc
1752 ----- Tagged ld64-84
1754 2008-03-28 Nick Kledzik <kledzik@apple.com>
1756 * src/LTOReader.hpp: don't print lto version, if lto is unavailable
1759 2008-03-26 Nick Kledzik <kledzik@apple.com>
1761 <rdar://problem/5575399> Add LD_WARN_COMMONS to BigBear builds
1762 * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file
1765 2008-03-26 Nick Kledzik <kledzik@apple.com>
1767 <rdar://problem/5797713> Need encryption tag in mach-o file
1768 <rdar://problem/5811920> linker should adjust arm final linked images so __text is never on the same page as the load commands
1769 * src/MachOFileAbstraction.hpp: add support for encryption_info_command
1770 * src/Options.cpp: add support for LD_NO_ENCRYPT and -no_encryption
1771 * src/MachOWriterExecutable.hpp: add EncryptionLoadCommandsAtom
1772 * src/machochecker.cpp: validate LC_ENCRYPTION_INFO
1775 2008-03-25 Nick Kledzik <kledzik@apple.com>
1777 <rdar://problem/5712533> ld64 does not recognize LLVM bitcode archive files
1778 * src/MachOReaderArchive.hpp: renamed to src/ArchiveReader.hpp
1779 * src/ArchiveReader.hpp: sniff each member and instantiate correct reader
1780 * src/ld.cpp: rename mach_o::archive::Reader to archive::Reader
1781 * ld64.xcodeproj/project.pbxproj: rename MachOReaderArchive.hpp to ArchiveReader.hpp
1782 * unit-tests/test-cases/llvm-integration: added test case
1785 2008-03-25 Nick Kledzik <kledzik@apple.com>
1787 <rdar://problem/5771658> ld64 should switch to new libLTO.dylib interface
1788 <rdar://problem/5675690> Produce llvm bc file in 'ld -r' mode if all .o files are llvm bc
1789 * src/LTOReader.hpp: rewrite from LLVMReader.hpp to use new lto_* C interface
1790 * unit-tests/test-cases/llvm-integration: update and comment
1791 * ld64.xcodeproj/project.pbxproj: update to lazy load libLTO.dylib
1792 * src/ld.cpp: rework and simplify Linker::optimize()
1793 * src/ObjectDump.cpp: Add -nm option
1796 2008-03-25 Nick Kledzik <kledzik@apple.com>
1798 * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem
1799 * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem
1802 2008-03-24 Nick Kledzik <kledzik@apple.com>
1804 <rdar://problem/5814613> Xcode 3.1 breaks linkage of libgcj.9.dylib from gcc 4.3.0
1805 * src/MachOWriterExecutable.cpp: Make sure all ivars in Writer are initialized.
1808 2008-03-21 Nick Kledzik <kledzik@apple.com>
1810 * src/Options.cpp: warn if -seg1addr value is not page aligned
1813 2008-03-21 Nick Kledzik <kledzik@apple.com>
1815 <rdar://problem/5806437> Move ARM support outside of __OPEN_SOURCE__
1816 * src/ld.cpp: remove __OPEN_SOURCE__ around arm support
1817 * src/LLVMReader.hpp: remove __OPEN_SOURCE__ around arm support
1818 * src/MachOReaderDylib.hpp: remove __OPEN_SOURCE__ around arm support
1819 * src/ObjectFile.h: remove __OPEN_SOURCE__ around arm support
1820 * src/MachOReaderRelocatable.hpp: remove __OPEN_SOURCE__ around arm support
1821 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
1822 * src/MachOWriterExecutable.hpp: remove __OPEN_SOURCE__ around arm support
1823 * src/ObjectDump.cpp: remove __OPEN_SOURCE__ around arm support
1824 * ld64.xcodeproj/project.pbxproj: remove ARM_SUPPORT from config.h
1827 ----- Tagged ld64-83.2
1829 2008-03-15 Nick Kledzik <kledzik@apple.com>
1831 <rdar://problem/5801620> ld64-83 removes OBJC_CLASS_$ symbols from projects, causes catastrophic results
1832 * src/Options.cpp: restore "case CPU_TYPE_ARM" in switch statement for .objc_class symbols in .exp files
1833 * unit-tests/test-cases/objc-exported_symbols_list: added test case
1836 ----- Tagged ld64-83.1
1838 2008-03-14 Nick Kledzik <kledzik@apple.com>
1840 <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
1841 * src/Options.cpp: support -iphoneos_version_min as well
1844 ----- Tagged ld64-83
1846 2008-03-10 Nick Kledzik <kledzik@apple.com>
1848 <rdar://problem/5791543> ld needs to strip iphone_version_min option if invoking ld_classic
1849 * src/Options.cpp: suppress -iphone_version_min from being passed to ld_classic
1852 2008-03-04 Nick Kledzik <kledzik@apple.com>
1854 <rdar://problem/4171253> ADOBE XCODE: Linker option to lazy load frameworks (cause dyld is too slow)
1855 * src/MachOWriterExecutable.hpp: create lazy stubs and LC_LAZY_LOAD_DYLIB for lazy load dylibs
1856 * src/Options.cpp: support -lazy-l, -lazy_library, and -lazy_framework
1857 * src/MachOFileAbstraction.hpp: add LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS until in cctools
1858 * src/MachOReaderDylib.hpp: add isLazyLoadedDylib()
1859 * src/ld.cpp: pass lazy helper atom to writer
1860 * doc/man/man1/ld.1: document new options
1861 * unit-tests/test-cases/lazy-dylib-objc: add test case
1862 * unit-tests/test-cases/lazy-dylib: add test case
1865 ----- Tagged ld64-82.7
1867 2008-03-07 Nick Kledzik <kledzik@apple.com>
1869 <rdar://problem/5787149> duplicate symbol literal-pointer@__OBJC@__message_refs@...
1870 * src/MachOReaderRelocatable.hpp: AnonymousAtom from S_LITERAL_POINTERS section should be weak
1871 * unit-tests/test-cases/objc-selector-coalescing: added test case
1874 ----- Tagged ld64-82.6
1876 2008-03-04 Nick Kledzik <kledzik@apple.com>
1878 <rdar://problem/5779681> ld crashes building XsanFS for Snow Leopard Builds
1879 * src/ld.cpp: add bool dylibsOnly parameter to addJustInTimeAtoms()
1880 * unit-tests/test-cases/tentative-and-archive: added test case
1882 2008-03-04 Nick Kledzik <kledzik@apple.com>
1884 <rdar://problem/5775822> ld64 should not force building with gcc 4.0
1885 * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0
1888 2008-02-29 Nick Kledzik <kledzik@apple.com>
1890 <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
1891 * src/Options.cpp: only splitseg if prebound
1894 2008-02-29 Nick Kledzik <kledzik@apple.com>
1896 <rdar://problem/5774231> Linker should not make GSYM debug note for .objc_category_* symbols
1897 * src/ld.cpp: suppress GSYM debug notes for absolute symbols
1898 * unit-tests/test-cases/objc-category-debug-notes: added test case
1901 2008-02-29 Nick Kledzik <kledzik@apple.com>
1903 <rdar://problem/5768970> non-ASCII CFString support is broken
1904 * src/MachOReaderRelocatable.hpp: only name and coalesce cfstring constants if they use a __cstring
1905 * unit-tests/test-cases/cfstring-utf16: add test case
1908 2008-02-25 Nick Kledzik <kledzik@apple.com>
1910 <rdar://problem/5366363> ld -r -x
1911 * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
1914 ----- Tagged ld64-82.5
1916 2008-02-12 Nick Kledzik <kledzik@apple.com>
1918 <rdar://problem/5738023> x86_64: -stack_size failure when large __bss is used
1919 * src/ld.cpp: only move section already in __DATA segment to new __huge section
1920 * unit-tests/test-cases/stack_size_no_addr: updated test case to add large bss section
1923 ----- Tagged ld64-82.4
1925 2008-02-06 Nick Kledzik <kledzik@apple.com>
1927 <rdar://problem/5726215> comdat warnings with ld -r of C++ .o files
1928 * unit-tests/test-cases/eh-coalescing-r: added test case
1929 * src/ld.cpp: in ld -r mode don't warn about if .eh symbols are not static
1932 2008-02-06 Devang Patel <dpatel@apple.com>
1934 <rdar://problem/5724990> LTO of Bom framework with -dead_strip causes ld(1) crash
1935 * src/LLVMReader.hpp: Check fAtom while determining LLVMReference target binding.
1936 * unit-tests/test-cases/llvm-integration/Makefile: Add new test case.
1937 * unit-tests/test-cases/llvm-integration/a15.c: New.
1938 * unit-tests/test-cases/llvm-integration/b15.c: New.
1939 * unit-tests/test-cases/llvm-integration/c15.c: New.
1941 2008-02-05 Nick Kledzik <kledzik@apple.com>
1943 * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used
1945 ----- Tagged ld64-82.3
1947 2008-02-04 Nick Kledzik <kledzik@apple.com>
1949 <rdar://problem/5721186> ld doesn't seem to understand $ld$add$os... and $ld$hide$os... for 10.6 moves
1950 * src/ObjectFile.h: add 10.6
1951 * src/Options.cpp: add 10.6 support
1952 * src/MachOReaderDylib.hpp: recognize $os10.6$
1955 ----- Tagged ld64-82.2
1957 2008-01-30 Devang Patel <dpatel@apple.com>
1959 <rdar://problem/5714833> Can't build 64-bit Intel binaries with LTO
1960 <rdar://problem/5714787> ld64 fails to build with llvm-gcc-4.2
1961 * src/LLVMReader.hpp: Fix character count typo in strncmp call.
1962 Use const char * to initialize temp. string.
1963 * ld64.xcodeproj/project.pbxproj: use $(DEVELOPER_DIR) in header search construction
1964 instead of hard coding /Developer.
1966 ----- Tagged ld64-82.1
1968 2008-01-23 Nick Kledzik <kledzik@apple.com>
1970 * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
1973 2008-01-22 Nick Kledzik <kledzik@apple.com>
1975 <rdar://problem/5695496> ld uses 32-bits in some places to hold addresses when parsing 64-bit mach-o files
1976 * src/MachOReaderRelocatable.hpp: use AddrToAtomMap type that switch address to 64-bits for 64-bit archs
1977 * src/MachOWriterExecutable.hpp: verify BR14 does not overflow for external relocs
1978 * unit-tests/test-cases/relocs-c: update test case to slide addresses to verify x86_64 .o files
1981 ----- Tagged ld64-82
1983 2008-01-18 Nick Kledzik <kledzik@apple.com>
1985 <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
1986 * src/ld.cpp: fix typo in warning string
1989 2008-01-16 Nick Kledzik <kledzik@apple.com>
1991 <rdar://problem/5565074> Bundle Loader does not work anymore when loader is a bundle
1992 <rdar://problem/5590203> ld warns of incorrect architecture when linking a bundle to a bundle
1993 * src/MachOReaderDylib.hpp: support linking against bundles via -bundle_loader. Clean up error messages
1994 * unit-tests/test-cases/bundle_loader: update test case
1997 2008-01-16 Nick Kledzik <kledzik@apple.com>
1999 <rdar://problem/5366363> ld -r -x creates debug notes (stabs) when it should not with -x (keep only global symbols)
2000 * src/Options.cpp: in reconfigureDefaults() if -r and -x then -S
2003 2008-01-16 Nick Kledzik <kledzik@apple.com>
2005 <rdar://problem/5566068> if ld crashes while writing output file, it should delete the half written file
2006 * src/MachOWriterExecutable.hpp: wrap open/write/close in try block and add signal handlers all to delete
2007 output file on failure.
2010 2008-01-16 Devang Patel <dpatel@apple.com>
2012 * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
2015 2008-01-16 Nick Kledzik <kledzik@apple.com>
2017 <rdar://problem/5593537> GC-supported library can't be linked into GC-required executable
2018 * src/ld.cpp: loosen constraint that all objc code must be compiled with same GC settings and
2019 allow gc-compatible code to be linked into anything.
2020 * unit-tests/test-cases/objc-gc-checks: update test case
2023 2008-01-15 Nick Kledzik <kledzik@apple.com>
2025 <rdar://problem/5687976> no debug notes for custom named data
2026 * src/ld.cpp: in synthesizeDebugNotes() check getSymbolTableInclusion() instead of for leading underscore
2027 * unit-tests/test-cases/dwarf-debug-notes: update test case
2029 ----- Tagged ld64-81.5
2031 2008-01-14 Devang Patel <dpatel@apple.com>
2033 <rdar://problem/5683813> llvm-gcc-4.2 fails to build Sqlite 3.5.4 with -O4
2034 * src/LLVMReader.hpp: Resolve proxy references. Collect new unbounded references
2036 * src/ld.cpp: Resolve additional unbounded references after optimization.
2039 2008-01-14 Nick Kledzik <kledzik@apple.com>
2041 <rdar://problem/5655246> PPC Leopard (Xcode 3.0) linker ld gets "Bus error" sometimes
2042 * src/MachOReaderRelocatable.hpp: use same code as x86 to parse ppc and arm sect-diff relocs
2043 * src/MachOWriterExecutable.hpp: use same code as x86 to write ppc and arm sect-diff relocs
2046 2008-01-11 Nick Kledzik <kledzik@apple.com>
2048 <rdar://problem/5637618> PPC Leopard (Xcode 3.0) linker ld reports "unknown scattered relocation type 4"
2049 * src/MachOReaderRelocatable.hpp: add PPC_RELOC_HI16 to scattered reloc parsing
2050 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added tests for scattered hi/lo instructions
2053 2008-01-11 Nick Kledzik <kledzik@apple.com>
2055 * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
2058 2008-01-11 Nick Kledzik <kledzik@apple.com>
2060 <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
2061 * doc/man/man1/ld.1: make meaning of "suffix" more explicit
2064 2008-01-11 Nick Kledzik <kledzik@apple.com>
2066 <rdar://problem/5633081> Obj-C Symbols in Leopard Can't Be Weak Linked
2067 * src/MachOWriterExecutable.hpp: set weak and lazy attributes on dummy .objc_class_name undefines
2068 to dylibs to support Mac OS X 10.3.x dyld
2071 2008-01-11 Nick Kledzik <kledzik@apple.com>
2073 <rdar://problem/5669751> Unknown error with linker (dyld: unknown external relocation type)
2074 * src/ld.cpp: fix crash when SO stabs are not balanced
2077 2008-01-11 Devang Patel <dpatel@apple.com>
2079 <rdar://problem/5667433> LTO does not work if expected output is a dynamic library
2080 * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate
2083 2000-01-10 Nick Kledzik <kledzik@apple.com>
2085 <rdar://problem/5680988> __cls_refs section is losing S_LITERAL_POINTERS section type
2086 * src/MachOWriterExecutable.hpp: special case __cls_refs section
2087 * unit-tests/test-cases/objc-literal-pointers: add test case
2090 2008-01-03 Nick Kledzik <kledzik@apple.com>
2092 <rdar://problem/5667688> wrong EH information might be used
2093 Created new kGroupSubordinate reference kind to model group comdat. The "signature" atom
2094 has kGroupSubordinate references to the other atoms in the group. If the signature atom
2095 is coalesced away, the linker follows kGroupSubordinate references and throws away the
2096 other members of the group.
2097 * unit-tests/test-cases/eh-coalescing: added test case
2098 * src/ld.cpp: added markDead() and use propagate to subordinates
2099 * src/Architectures.hpp: added kGroupSubordinate
2100 * src/MachOReaderRelocatable.hpp: add kGroupSubordinate reference from a function to its .eh atom
2101 and if used, from .eh atom to its LSDA atom.
2102 * src/MachOWriterExecutable.hpp: handle kGroupSubordinate like kNoFixUp
2104 ----- Tagged ld64-81.4.1
2106 2007-12-19 Devang Patel <dpatel@apple.com>
2108 * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
2110 2007-12-19 Devang Patel <dpatel@apple.com>
2112 * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
2114 2007-12-19 Devang Patel <dpatel@apple.com>
2116 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
2117 * src/LLVMReader.hpp: Add printLLVMVersion() to print llvm version string in verbose mode.
2118 * src/Options.cpp: Use printLLVMVersion() in verbose mode.
2120 2007-12-19 Devang Patel <dpatel@apple.com>
2122 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
2123 * src/Options.h: Add verbose() method to check fVerbose flag.
2124 * src/LLVMReader.hpp: Print LLVM version string in verbose mode.
2126 ----- Tagged ld64-81.4
2128 2007-12-18 Devang Patel <dpatel@apple.com>
2130 * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
2132 ----- Tagged ld64-81.3
2134 2007-12-17 Nick Kledzik <kledzik@apple.com>
2136 * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
2139 2007-12-17 Devang Patel <dpatel@apple.com>
2141 * src/LLVMReader.hpp: Do not throw exception if LLVMReader is not able to
2142 dlopen LTO library. Instead just flag input file as an invalid LLVM bitcode file.
2145 2007-12-14 Nick Kledzik <kledzik@apple.com>
2147 <rdar://problem/5645908> gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all)
2148 * src/MachOWriterExecutable.hpp: fix Writer<x86>::generatesExternalTextReloc() to allow text relocs
2149 * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static
2152 2007-12-14 Devang Patel <dpatel@apple.com>
2154 <rdar://problem/5648438> Enable Link Time Optimization in Opal
2155 * src/LLVMReader.hpp: Locate LLVMlto.dylib relative to ld location in Developer folder.
2156 * ld64.xcodeproj/project.pbxproj: Add {DEVELOPER_DIR}/usr/include in header search path.
2157 * unit-tests/run-all-unit-tests: Set DYLD_FALLBACK_LIBRARY_PATH to find LLVMlto.dylib during unit testing.
2158 * unit-tests/testcases/llvm-integration/Makefile: Point LLVMGCC and LLVMGXX to llvm-gcc-4.2 in Developer folder during unit testing.
2161 2007-12-13 Nick Kledzik <kledzik@apple.com>
2163 <rdar://problem/5645446> SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ...
2164 * src/MachOReaderRelocatable.hpp: in Reader<x86>::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly
2166 ----- Tagged ld64-81.2
2170 2007-12-07 Nick Kledzik <kledzik@apple.com>
2172 <rdar://problem/5615298> support 8-bit relocations for i386
2173 * src/Architectures.hpp: add kPCRel8
2174 * src/MachOReaderRelocatable.hpp: support 8-bit pc-rel relocations for intel
2175 * src/MachOWriterExecutable.hpp: support 8-bit pc-rel relocations for intel
2176 * unit-tests/test-cases/relocs-asm: add test cases
2179 ----- Tagged ld64-81.1
2181 2007-12-06 Nick Kledzik <kledzik@apple.com>
2183 * src/MachOReaderDylib.hpp: rework cycle detection to remove some false positives
2186 2007-12-05 Nick Kledzik <kledzik@apple.com>
2188 <rdar://problem/5628149> Duplicate probe firings in Security.framework
2189 * src/ld.cpp: check dtrace probe sites are not in fDeadAtoms before using
2190 * unit-tests/test-cases/dtrace-static-probes-coalescing: add test case
2193 2007-12-05 Nick Kledzik <kledzik@apple.com>
2195 * src/MachOReaderRelocatable.hpp: fix CFString coalescing to work with -fwritable-strings
2196 * unit-tests/test-cases/cfstring-coalesce: add -fwritable-strings to test case
2199 ----- Tagged ld64-81
2201 2007-11-15 Nick Kledzik <kledzik@apple.com>
2203 <rdar://problem/4196067> ld64 should support runtime text relocations
2204 * src/MachOWriterExecutable.hpp: add generatesLocalTextReloc() and generatesExternalTextReloc()
2205 * src/Options.cpp: process -read_only_relocs option
2206 * src/Options.h: add allowTextRelocs() and warnAboutTextRelocs()
2207 * src/MachOReaderRelocatable.hpp: add hasLongBranchStubs()
2208 * src/machochecker.cpp: allow relocs in read only segments, if section flags are set
2209 * unit-tests/test-cases/read-only-relocs: update test case
2212 2007-11-08 Devang Patel <dpatel@apple.com>
2214 * ld64.xcodeproj/project.pbxproj: add new build phase "build configure.h" for
2216 * src/ld.cpp: Include "configure.h"
2219 ----- Tagged ld64-80.11
2221 2008-02-12 Nick Kledzik <kledzik@apple.com>
2223 <rdar://problem/5741312> Wrong section name for objc info for ARM when OBJC2 is used
2224 * src/MachOWriterExecutable.hpp: switch segment/section name for ARM objc2 image info
2226 ----- Tagged ld64-80.10
2228 2008-02-11 Nick Kledzik <kledzik@apple.com>
2230 <rdar://problem/5733578> ld64 does not support -aspen_version_min 2.0
2231 * src/Options.cpp: allow 2.x for -aspen_version_min
2234 2008-02-11 Nick Kledzik <kledzik@apple.com>
2236 <rdar://problem/5733575> ld_classic: unknown flag: -aspen_version_min
2237 * src/Options.cpp: change -aspen_version_min x.x to -macosx_version_min 10.5 when invoking ld_classic
2240 ----- Tagged ld64-80.9
2242 2008-01-29 Nick Kledzik <kledzik@apple.com>
2244 <rdar://problem/5713054> -iphone_version_min ==> -aspen_version_min
2245 * src/Options.cpp: support -aspen_version_min
2248 ----- Tagged ld64-80.8
2250 2008-01-10 Nick Kledzik <kledzik@apple.com>
2252 * src/Options.cpp: support transition to new objc ABI for ARM by allowing old .objc_class_name_*
2253 style names in export files and map them to new _OBJC_CLASS_$_ style names.
2256 ----- Tagged ld64-80.7
2258 2008-01-02 Nick Kledzik <kledzik@apple.com>
2260 <rdar://problem/5572168> BigBear5A18 isn't fully prebound
2261 * src/Options.cpp: make fNeedsModuleTable true for arm
2263 ----- Tagged ld64-80.6
2265 2007-11-30 Nick Kledzik <kledzik@apple.com>
2267 <rdar://problem/5620976> -iphone_version_min
2268 * src/Options.cpp: handle -iphone_version_min option
2271 ----- Tagged ld64-80.5
2273 2007-11-26 Nick Kledzik <kledzik@apple.com>
2275 <rdar://problem/5601142> need to special case some dylibs in seg_addr_table
2276 * src/Options.cpp: retry seg_add_table lookup for a couple of unusual dylibs
2279 ----- Tagged ld64-80.4
2281 2007-11-06 Nick Kledzik <kledzik@apple.com>
2283 * src/MachOReaderRelocatable.hpp: fix parsing of external and scattered thumb branch22 relocs
2284 * unit-tests/test-cases/thumb-blx: add test case to keep blx issues from coming back
2286 ----- Tagged ld64-80.3
2288 2007-11-03 Nick Kledzik <kledzik@apple.com>
2290 * src/MachOReaderRelocatable.hpp: remove recalc of dstAddr which could cause thumb branches to be +2
2291 * src/MachOWriterExecutable.hpp: remove incorrect test for relocateableExternal
2293 ----- Tagged ld64-80.2
2295 2007-11-01 Nick Kledzik <kledzik@apple.com>
2297 * src/ld.cpp: hack my own prototype for log2() until math.h is cleaned up
2300 ----- Tagged ld64-80.1
2302 2007-11-01 Nick Kledzik <kledzik@apple.com>
2304 * ld64.xcodeproj/project.pbxproj: add HEADER_SEARCH_PATHS for cross builds
2305 * src/ld.cpp: temporarily disable LLVM_SUPPORT
2306 * src/MachOWriterExecutable.hpp: Don't use CC_MD5() directly
2309 2007-10-26 Nick Kledzik <kledzik@apple.com>
2311 <rdar://problem/5556038> Cannot build with libm_static.a statically linked
2312 * src/MachOWriterExecutable.hpp: Fix makesExternalRelocatableReference() for -r -d case
2313 * unit-tests/test-cases/tentative-to-real-hidden: add test case
2316 ----- Tagged ld64-80
2318 2007-10-24 Nick Kledzik <kledzik@apple.com>
2320 <rdar://problem/4222696> linker should probably warn about trying to export a hidden symbol
2321 * src/ld.cpp: if using -exported_symbols_list check each hidden atom as it is added to symbol table
2322 * src/Options.h,.cpp: add hasExportMaskList()
2323 * unit-tests/test-cases/exported_symbols_list-hidden: added test case
2326 2007-10-24 Nick Kledzik <kledzik@apple.com>
2328 * src/MachOWriterExecutable.hpp: keep old style dtrace probes externel for kernel builds
2331 2007-10-23 Nick Kledzik <kledzik@apple.com>
2333 <rdar://problem/4556199> unify error and warning messages
2334 <rdar://problem/5546450> -w should suppress warnings
2335 * src/ld.cpp: use warning() function
2336 * src/Options.h: remove emitWarnings()
2337 * src/MachOReaderDylib.hpp: use warning() function
2338 * src/MachOReaderRelocatable.hpp: use warning() function
2339 * src/Options.cpp: use and implement warning()
2340 * src/MachOWriterExecutable.hpp: use warning() function
2341 * unit-tests/test-cases/visibility-warning: verify -w suppresses warnings
2344 2007-10-23 Devang Patel <dpatel@apple.com>
2346 * src/ld.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2347 * src/LLVMReader.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2348 * src/MachOReaderDylib.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2349 * src/ObjectFile.h: Cover arm support inside __OPEN_SOURCE__ macro check.
2350 * src/MachOReaderRelocatable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2351 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
2352 * src/MachOWriterExecutable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2353 * src/ObjectDump.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
2356 2007-10-22 Nick Kledzik <kledzik@apple.com>
2358 * src/Options.cpp: add support for LD_DEAD_STRIP and LD_WARN_COMMONS
2359 * src/MachOReaderRelocatable.hpp: fix problem with -dead_strip of ObjC literal pointers
2362 2007-10-22 Nick Kledzik <kledzik@apple.com>
2364 * src/Options.cpp: have -static arm code link with ld_classic (for now)
2367 2007-10-22 Nick Kledzik <kledzik@apple.com>
2369 <rdar://problem/5396826> Recognize all arm architectures
2370 * src/MachOReaderRelocatable.hpp: add support for all ARM sub-types
2371 * unit-tests/test-cases/cpu-sub-types: add test cases for all combinations of ARM sub-types
2374 2007-10-19 Nick Kledzik <kledzik@apple.com>
2376 * src/*: merge in arm support
2377 * unit-tests/test-cases/*: fix to work for arm and thumb
2379 ----- Tagged ld64-79
2381 2007-10-16 Nick Kledzik <kledzik@apple.com>
2383 * src/MachOWriterExecutable.hpp: if -r mode, always set custom alignment (SET_COMM_ALIGN) on common symbols
2384 * unit-tests/test-cases/visibility-warning-dylib-v-archive/Makefile: fix warning
2385 * unit-tests/test-cases/static-executable/Makefile: fix spurious failure
2388 2007-10-16 Nick Kledzik <kledzik@apple.com>
2390 * src/MachOWriterExecutable.hpp: fix edge case in branch island generation
2393 2007-10-12 Nick Kledzik <kledzik@apple.com>
2395 <rdar://problem/5323449> Add option to create old, slow stubs for i386
2396 * src/ObjectFile.h/.cpp: support -read_only_stubs
2397 * src/MachOWriterExecutable.hpp: enhance StubAtom<x86> to support old style __symbol_stub/__la_symbol_ptr stubs
2398 * unit-tests/test-cases/slow-x86-stubs: add test case
2401 2007-10-12 Nick Kledzik <kledzik@apple.com>
2403 <rdar://problem/5427952> ld64's re-export cycle detection logic prevents use of X11 libGL on Leopard
2404 * src/Options.cpp: in findFileUsingPaths() don't search for embedded dylibs
2405 * unit-tests/test-cases/indirect-path-search/Makefile: added case for a dylib embedded in a framework
2408 2007-10-11 Nick Kledzik <kledzik@apple.com>
2410 <rdar://problem/5451987> add option to disable implicit load commands for indirectly used public dylibs
2411 * src/Options.cpp: add support for -no_implicit_dylibs
2412 * src/ObjectFile.h: add fImplicitlyLinkPublicDylibs
2413 * src/MachOReaderDylib.hpp: test fImplicitlyLinkPublicDylibs before hoisting an implicitly linked dylib
2414 * unit-tests/test-cases/implicit_dylib: add test case
2417 2007-10-11 Nick Kledzik <kledzik@apple.com>
2419 <rdar://problem/5254413> -interposable_list
2420 * src/Options.h/cpp: Add fInterposeList and fInterposeMode to support -interposable_list
2421 * src/MachOWriterExecutable.hpp: pass symbol name to fOptions.interposable()
2422 * unit-tests/test-cases/interposable_list: add test case
2425 2007-10-10 Nick Kledzik <kledzik@apple.com>
2427 <rdar://problem/5529626> If only weak_import symbols are used, linker should use LD_LOAD_WEAK_DYLIB
2428 * src/MachOWriterExecutable.hpp: automatically use LC_LOAD_WEAK_DYLIB if all symbols used from a dylib are weak_import
2429 * unit-tests/test-cases/weak_dylib: added test case
2432 2007-10-10 Nick Kledzik <kledzik@apple.com>
2434 <rdar://problem/5504954> linker does not error when dylib ordinal exceeds 250
2435 * src/MachOWriterExecutable.hpp: error out if ordinals exceed max allowed
2438 2007-10-10 Nick Kledzik <kledzik@apple.com>
2440 <rdar://problem/4067110> overriding 'operator new' or 'operator delete' fails if no weak symbols are present
2441 * src/ld.cpp: at end of checkUndefines() search dylibs for weak versions of any global external symbols
2442 * src/ObjectFile.h: add hasWeakExternals() method to Reader
2443 * src/MachOReaderDylib.hpp: implement hasWeakExternals() method in Reader
2444 * src/ExecutableFile.h: add overridesDylibWeakDefines parameter to write()
2445 * src/MachOWriterExecutable.hpp: use overridesDylibWeakDefines parameter to write()
2446 * unit-tests/test-cases/operator-new: add test case
2449 2007-10-05 Nick Kledzik <kledzik@apple.com>
2451 <rdar://problem/5048861> No warning about tentative definition conflicting with dylib definition
2452 <rdar://problem/5132652> .comm variables in shared library, worked with XCode 2.4.1, broken with XCode 3?
2453 * src/ld.cpp: at end of checkUndefines() verify if any remaining commons conflict with dylibs
2454 * doc/man/man1/ld.1: document -commons and -warn_commons options
2455 * unit-tests/test-cases/tentative-and-dylib: added test case
2458 2007-10-05 Nick Kledzik <kledzik@apple.com>
2460 <rdar://problem/5346331> NS/CFString constants are not dead strippable
2461 * src/MachOReaderRelocatable.hpp: break up __cfstring section into one atom per cfstring, make them coalesable
2462 * unit-tests/test-cases/cfstring-coalesce: added test case
2465 2007-10-05 Nick Kledzik <kledzik@apple.com>
2467 <rdar://problem/5524973> Dead stripping + exported symbols list using wildcards doesn't seem to do the right thing
2468 * src/Options.cpp/h: add hasWildCardExportRestrictList()
2469 * src/ld.cpp: if dead stripping code and have wildcard exports, add all global atoms matching wildcards as roots
2470 * unit-tests/test-cases/exported-symbols-wildcards-dead_strip: added test case
2473 2007-10-04 Nick Kledzik <kledzik@apple.com>
2475 <rdar://problem/5433882> ld shouldn't search /Network/Library/Frameworks by default
2476 * src/Options.cpp: remove /Network/Library/Frameworks/ from default search path
2477 * doc/man/man1/ld.1: document the change
2480 2007-10-04 Nick Kledzik <kledzik@apple.com>
2482 <rdar://problem/5341567> all binaries should get LD_UUID load commands, not just those with DWARF symbols
2483 * src/ld.cpp: default fCreateUUID to be true for non object file output types
2484 * unit-tests/test-cases/no-uuid/Makefile: update test case to match new rules
2487 ----- Tagged ld64-78
2489 2007-09-27 Nick Kledzik <kledzik@apple.com>
2491 <rdar://problem/5476313> range check load commands
2492 * src/MachOReaderDylib.hpp: check that load commands all fit in load command size from header
2493 * src/MachOReaderRelocatable.hpp: check that load commands all fit in load command size from header
2496 2007-09-27 Nick Kledzik <kledzik@apple.com>
2498 <rdar://problem/5433355> Xc8M2540a: ld64 crashes when linking Pascal program
2499 * src/ld.cpp: fix findAtomAndOffset() to handle where there are no function atoms
2502 2007-09-27 Nick Kledzik <kledzik@apple.com>
2504 <rdar://problem/5241179> ADOBE Xcode 3: ld -dead_strip does not work with -init from an archive
2505 * src/ld.cpp: add bool parameter to entryPoint() so -init atom not looked for too soon
2506 * unit-tests/test-cases/dead_strip-init-archive: added test case
2509 2007-09-26 Nick Kledzik <kledzik@apple.com>
2511 <rdar://problem/5459546> Spurious link warnings for inline members of C++ template classes
2512 * src/ld.cpp: check definition kinds before warning about visibility mismatches
2513 * unit-tests/test-cases/visibility-warning: added test case
2516 2007-09-26 Nick Kledzik <kledzik@apple.com>
2518 <rdar://problem/5394172> an empty .o file with zero load commands will crash linker
2519 * src/MachOReaderRelocatable.hpp: have Reader constructor return early of no load commands
2520 * unit-tests/test-cases/empty-object: added test case
2523 2007-09-26 Nick Kledzik <kledzik@apple.com>
2525 <rdar://problem/5453384> 9a527: ppc64 branch islands fail with 4GB pagezeo
2526 * src/MachOWriterExecutable.hpp: start range calculations at start of __text not at zero.
2529 ----- Tagged ld64-77 (Xcode 3.0)
2531 2007-07-23 Nick Kledzik <kledzik@apple.com>
2533 <rdar://problem/5351380> Kernel is linked with some global symbols unsorted
2534 * src/MachOWriterExecutable.hpp: Add NListNameSorter to allow global atoms and extra labels to be sorted
2537 2007-07-20 Nick Kledzik <kledzik@apple.com>
2539 <rdar://problem/5254468> Can't do objc_msgSendSuper dispatches after loading a Fix&Continue bundle
2540 * src/MachOWriterExecutable.hpp: when calculating what kind of reloc to use, never use an
2541 external reloc to reference 32-bit ObjC symbols.
2544 2007-07-20 Nick Kledzik <kledzik@apple.com>
2546 <rdar://problem/5349847> Runtime crash with ICC math library on Leopard
2547 * src/MachOReaderRelocatable.hpp: detect if section starts with a symbol that is not
2548 aligned to section and correct it.
2551 ----- Tagged ld64-76
2553 2007-06-29 Nick Kledzik <kledzik@apple.com>
2555 <rdar://problem/5303718> export hiding does not work for frameworks
2556 * src/MachOReaderDylib.hpp: fix checks in isPublicLocation()
2557 * unit-tests/test-cases/symbol-moving: update to test frameworks as well as dylibs
2560 2007-06-27 Nick Kledzik <kledzik@apple.com>
2562 <rdar://problem/5299907> linker should use undefines from flat dylibs when linking a main flat
2563 * src/ObjectFile.h: added fLinkingMainExecutable
2564 * src/Options.cpp: set up fLinkingMainExecutable
2565 * src/MachOReaderDylib.hpp: when linking a main executable for flat namespace, the reader for
2566 any loaded flat namespace dylib will have a new atoms that has references to all undefined
2567 symbols in the dylib
2568 * unit-tests/test-cases/flat-indirect-undefines: added test case
2569 * doc/man/man1/ld.1: update man page to describe when dylib undefines are used
2572 2007-06-27 Nick Kledzik <kledzik@apple.com>
2574 <rdar://problem/5277857> OpenGL.framework and X11 both have a libGL.dylib which can cause ld to segfault if both are found
2575 * src/MachOReaderDylib.hpp: add assertNoReExportCycles() method
2576 * unit-tests/test-cases/dylib-re-export-cycle: added test case
2579 2007-06-27 Nick Kledzik <kledzik@apple.com>
2581 <rdar://problem/5286462> ld64 has slightly different warning message formats than the old ld
2582 * src/ld.cpp: standardize all warning messages to start with "ld: warning"
2583 * src/MachOWriterExecutable.hpp: ditto
2584 * src/MachOReaderRelocatable.hpp: ditto
2585 * src/MachOReaderDylib.hpp:ditto
2588 2007-06-26 Nick Kledzik <kledzik@apple.com>
2590 <rdar://problem/5297034> -dead_strip can cause duplicate external commons
2591 * src/ld.cpp: don't use discarded coalesced global atoms as dead strip roots
2592 * src/machochecker.cpp: error if duplicate external symbols
2593 * unit-tests/test-cases/commons-coalesced-dead_strip: added test case
2596 2007-06-26 Nick Kledzik <kledzik@apple.com>
2598 <rdar://problem/4135857> update man page that linker does not search indirect libraries with two-level namespace
2599 * doc/man/man1/ld.1: add new "Indirect dynamic libraries" section to man page
2602 2007-06-26 Nick Kledzik <kledzik@apple.com>
2604 <rdar://problem/5285473> Xc9A466: Exports file cannot use Mac line ends
2605 * src/Options.cpp: check for \r or \n when parsing .exp files
2606 * unit-tests/test-cases/exported_symbols_list-eol: added test case
2609 ----- Tagged ld64-75
2611 2007-05-31 Nick Kledzik <kledzik@apple.com>
2613 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
2614 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
2617 ----- Tagged ld64-74.5
2619 2007-05-31 Nick Kledzik <kledzik@apple.com>
2621 <rdar://problem/5241902> set OSO timestamp to zero for when building in buildit
2622 * src/ld.cpp: check for RC_RELEASE and if exists set all OSO timestamps to zero
2625 2007-05-30 Nick Kledzik <kledzik@apple.com>
2627 <rdar://problem/5224676> BUILD_STABS now causes ld of xnu to bus error
2628 * src/ld.cpp: Change || to && in collectStabs()
2631 ----- Tagged ld64-74.4
2633 2007-05-18 Nick Kledzik <kledzik@apple.com>
2635 <rdar://problem/5211667> static probes don't work with libraries in dyld shared cache
2636 * src/OpaqueSection.hpp: the __TEXT segment is executable
2639 ----- Tagged ld64-74.3
2641 2007-05-16 Nick Kledzik <kledzik@apple.com>
2643 <rdar://problem/5201463> ppc: linker adds stubs to cstring references
2644 * src/MachOWriterExecutable.hpp: update ppc stubableReference() to only allow high/low references
2645 to be stubed if they reference a symbol in some other dylib.
2646 * unit-tests/test-cases/stub-generation: added test case
2649 2007-05-16 Nick Kledzik <kledzik@apple.com>
2651 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2652 * src/MachOWriterExecutable.hpp: factored local tests into indirectSymbolIsLocal()
2653 * unit-tests/test-cases/non-lazy-r: added test case
2656 2007-05-15 Nick Kledzik <kledzik@apple.com>
2658 <rdar://problem/5198807> ld64 drops fix&continue bit in __OBJC, __image_info.
2659 * src/MachOReaderRelocatable.hpp: implement objcReplacementClasses()
2662 2007-05-15 Nick Kledzik <kledzik@apple.com>
2664 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2665 * src/MachOReaderRelocatable.hpp: use strncmp() for __objc_imageinfo since it is 16 bytes long
2666 * src/MachOWriterExecutable.hpp: specialize segment/section names for synthesized objc image info section
2669 2007-05-15 Nick Kledzik <kledzik@apple.com>
2671 * unit-tests/include/common.makefile: set COMPILER_PATH so harness works with latest compiler
2674 ----- Tagged ld64-74.2
2676 2007-05-11 Nick Kledzik <kledzik@apple.com>
2678 <rdar://problem/5195447> ld64-74.1 breaks libstdc++ DejaGnu test (G5 only)
2679 * src/MachOWriterExecutable.hpp: don't stub a reference if the target offset is non-zero
2682 ----- Tagged ld64-74.1
2684 2007-05-09 Nick Kledzik <kledzik@apple.com>
2686 * src/Options.h: add emitWarnings()
2687 * src/Options.cpp: wire up -w to emitWarnings()
2690 2007-05-09 Nick Kledzik <kledzik@apple.com>
2692 <rdar://problem/5137285> ld64 won't link wine (regression from Tiger)
2693 * src/Architectures.hpp: add x86::kPointerDiff16 and x86::kPCRel16
2694 * src/MachOReaderRelocatable.hpp: add support to parse new relocs
2695 * src/MachOWriterExecutable.hpp: add support fo new relocs
2698 2007-05-08 Nick Kledzik <kledzik@apple.com>
2700 <rdar://problem/5182537> need way for ld and dyld to see different exported symbols in a dylib
2701 * src/MachOReaderDylib.hpp: update parse and use $ld$ symbols
2702 * src/Options.h: move VersionMin to ReaderOptions
2703 * src/ObjectFile.h: move VersionMin to ReaderOptions
2704 * src/Options.cpp: move VersionMin to ReaderOptions
2705 * src/MachOWriterExecutable.hpp: move VersionMin to ReaderOptions
2706 * unit-tests/test-cases/symbol-moving: added test case
2709 2007-05-03 Nick Kledzik <kledzik@apple.com>
2711 <rdar://problem/5181105> typo in error message for linking -pie
2712 * src/MachOWriterExecutable.hpp: fix typo in error messages
2715 ----- Tagged ld64-74
2717 2007-05-03 Nick Kledzik <kledzik@apple.com>
2719 <rdar://problem/5171880> ld64 can't find @executable _path relative dylibs from our umbrella frameworks
2720 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
2721 * src/ObjectFile.h: add from parameter to findDylib()
2722 * src/MachOReaderDylib.hpp: supply from parameter to findDylib()
2723 * src/ld.cpp: use from parameter for @loader_path substitution in findDylib()
2724 * unit-tests/test-cases/re-export-relative-paths: added test case
2727 2007-05-02 Nick Kledzik <kledzik@apple.com>
2729 * src/ObjectFile.h: add fLogObjectFiles and fLogAllFiles
2730 * src/Options.cpp: hook up -t to fLogAllFiles and -whatsloaded to fLogObjectFiles
2731 * src/MachOReaderDylib.hpp: log if fLogAllFiles
2732 * src/MachOReaderRelocatable.hpp: log if fLogObjectFiles or fLogAllFiles
2733 * src/MachOReaderArchive.hpp: log if fLogAllFiles
2734 * doc/man/man1/ld.1: update man page
2737 2007-05-02 Nick Kledzik <kledzik@apple.com>
2739 <rdar://problem/5177848> typo in message, frameowrk
2740 * src/Options.cpp: fix typo
2743 2007-05-01 Nick Kledzik <kledzik@apple.com>
2745 <rdar://problem/4977301> "ld" man page is missing the description for many options
2746 * doc/man/man1/ld.1: add documentation on all obsolete options
2749 2007-05-01 Nick Kledzik <kledzik@apple.com>
2751 <rdar://problem/5113424> ld doesn't handle -mlong-branch .o files that have had local symbols stripped
2752 <rdar://problem/4965359> warning about dwarf line info with -mlong-branch
2753 * src/MachOReaderRelocatable.hpp: don't lop -mlong-branch stubs off end of functions
2754 * src/MachOWriterExecutable.hpp: allow code references besides BR24 to be stubable
2757 2007-04-30 Nick Kledzik <kledzik@apple.com>
2759 <rdar://problem/5065659> unable to link VTK because __textcoal_nt too large
2760 * src/MachOReaderRelocatable.hpp: when doing a final link map __textcoal_nt to __text
2763 2007-04-30 Nick Kledzik <kledzik@apple.com>
2765 <rdar://problem/5062685> ld does not report error when -r is used and exported symbols are not defined.
2766 <rdar://problem/4637139> ld leaves global common symbols not in exported symbols list.
2767 * src/ld.cpp: stop special casing -r mode in checkUndefines()
2768 * src/MachOWriterExecutable.hpp: don't create proxy atom in -r mode if it is supposed to be exported.
2769 mark tentative definitions are private extern in -r mode even without -keep_private_externs
2770 * unit-tests/test-cases/exported_symbols_list-r: added test case
2773 2007-04-27 Nick Kledzik <kledzik@apple.com>
2775 <rdar://problem/5137732> ld should keep looking when it finds a weak definition in a dylib
2776 * src/ld.cpp: modified addJustInTimeAtoms() to keep looking when a weak defintion is found
2777 * unit-tests/test-cases/weak-def-ordinal: added test case
2780 2007-04-27 Nick Kledzik <kledzik@apple.com>
2782 <rdar://problem/5166572> better error message for indirect dylibs missing required architecture
2783 * src/ld.cpp: when loading indirect dylib add path to error messages
2786 2007-04-25 Nick Kledzik <kledzik@apple.com>
2788 <rdar://problem/5109373> the i386 slice of dyld does not need __IMPORT segment
2789 * src/ObjectFile.h: add fForDyld
2790 * src/Options.cpp: set up fForDyld
2791 * src/MachOReaderRelocatable.hpp: if fForDyld, change __IMPORT segment to __DATA
2792 * src/MachOWriterExecutable.hpp: recognize __DATA/__pointers in dyld as a non-lazy section
2795 2007-04-24 Nick Kledzik <kledzik@apple.com>
2797 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2798 * src/MachOWriterExecutable.hpp: use INDIRECT_SYMBOL_LOCAL for any non-global symbol
2799 * unit-tests/test-cases/strip_local: update test case
2802 2007-04-24 Nick Kledzik <kledzik@apple.com>
2804 <rdar://problem/5150407> ld64 -sectorder and -order_file files don't accept white space following the :
2805 * src/Options.cpp: prune white space after colon and before symbol name
2806 * unit-tests/test-cases/order_file: update test case to have a space after the colon
2809 2007-04-24 Nick Kledzik <kledzik@apple.com>
2811 <rdar://problem/5055233> ld64 corrupts debug symbol table entries, nm doesn't print them
2812 * src/MachOWriterExecutable.hpp: properly set ilocalsym in module table
2815 2007-04-24 Nick Kledzik <kledzik@apple.com>
2817 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2818 * src/MachOReaderRelocatable.hpp: look for new objc info section name too
2821 2007-04-24 Nick Kledzik <kledzik@apple.com>
2823 * src/MachOWriterExecutable.hpp: fix -non_global_symbols_strip_list to work with -r
2824 * unit-tests/test-cases/local-symbol-partial-stripping: update test case
2828 ----- Tagged ld64-73.7
2830 2007-05-10 Nick Kledzik <kledzik@apple.com>
2832 <rdar://problem/5194804> can't use dtrace static probes in x86_64 dylib
2833 * src/MachOWriterExecutable.hpp: x86_64:kPointerDiff32 is ok in shared region
2834 * unit-tests/test-cases/dtrace-static-probes: update to build dylib too
2837 2007-05-09 Nick Kledzik <kledzik@apple.com>
2839 <rdar://problem/5191610> 9A430: using -dead_strip with static dtrace probes causes ld to crash
2840 * src/ld.cpp: fix markLive() to look at right name in dtrace probe refernce
2841 * unit-tests/test-cases/dtrace-static-probes: added -dead_strip case
2844 ----- Tagged ld64-73.6
2846 2007-04-17 Nick Kledzik <kledzik@apple.com>
2848 <rdar://problem/5140897> Add options to do partial stripping of local symbols
2849 * src/MachOWriterExecutable.hpp: use fOptions.keepLocalSymbol()
2850 * src/Options.cpp: implement -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2851 * src/Options.h: replace stripLocalSymbols() with localSymbolHandling() and keepLocalSymbol()
2852 * doc/man/man1/ld.1: document -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2853 * unit-tests/test-cases/local-symbol-partial-stripping: added test case
2856 ----- Tagged ld64-73.5
2858 2007-04-17 Nick Kledzik <kledzik@apple.com>
2860 <rdar://problem/5129379> ld64-73.3 XBS logging incorrectly reporting "direct" dynamic libraries
2861 * src/ld.cpp: restore direct vs indirect library for LD_TRACE_DYLIBS logging
2864 2007-04-16 Nick Kledzik <kledzik@apple.com>
2866 <rdar://problem/5067034> data initialized to a weak imported symbol is missing relocation
2867 * src/MachOWriterExecutable.hpp: check for A::kPointerWeakImport in buildExecutableFixups()
2868 * unit-tests/test-cases/weak_import: updated test case to catch this problem
2871 2007-04-13 Nick Kledzik <kledzik@apple.com>
2873 <rdar://problem/5071047> Support -U
2874 * src/MachOWriterExecutable.hpp: create proxies for -U symbols
2875 * src/Options.cpp: process -U
2876 * src/Options.h: add allowedUndefined() and someAllowedUndefines()
2877 * src/ld.cpp: create proxies for -U symbols
2878 * doc/man/man1/ld.1: document -U and -undefined options
2879 * unit-tests/test-cases/undefined-dynamic-lookup: added test case
2882 ----- Tagged ld64-73.4
2884 2007-04-12 Nick Kledzik <kledzik@apple.com>
2886 <rdar://problem/5125280> ld changes needed to support read-only DOF
2887 * src/Options.cpp: remove -read_only_dof
2888 * src/Options.h: remove fReadOnlyDOFs
2889 * src/ld.cpp: only generate read-only DOF sections
2892 ----- Tagged ld64-73.3.1
2894 2007-04-13 Nick Kledzik <kledzik@apple.com>
2896 <rdar://problem/5130496> -framework vecLib -framework Accelerate causes bad ordinals
2897 * src/MachOWriterExecutable.hpp: fix bug optimizeDylibReferences() when there are two readers with same install name
2900 ----- Tagged ld64-73.3
2902 2007-04-03 Nick Kledzik <kledzik@apple.com>
2904 * src/ld.cpp: read-only-dofs should use 32-bit offsets for x86_64
2905 * src/MachOReaderDylib.hpp: if "public" re-export is not marked implict, still mark it as re-exported
2908 2007-04-02 Nick Kledzik <kledzik@apple.com>
2910 <rdar://problem/5105971> if replacement file for -dylib_file is missing, warn instead of error
2911 * src/ld.cpp: a try/catch to turn -dylib_file error into a warning.
2912 * unit-tests/test-cases/dylib_file-missing: add test case
2913 * doc/man/man1/ld.1: update man page about -dead_strip_dylibs
2916 ----- Tagged ld64-73.2
2918 2007-03-31 Nick Kledzik <kledzik@apple.com>
2920 <rdar://problem/5102873> ld64-73: atom sorting error with duplicate zero sized bss symbols
2921 * src/MachOReaderRelocatable.hpp: suppress warning on sorting zero size zero fill atoms
2923 2007-03-31 Nick Kledzik <kledzik@apple.com>
2925 <rdar://problem/5102845> ld64-73 fails anything linking with -lm
2926 * src/ld.cpp: when processing dylbs that are sylinks ensure that fDylibMap contains all paths
2927 * src/MachOWriterExecutable.hpp: when dead stripping dylibs and renumbering ordinals make sure
2928 aliases dylib get renumbered too
2929 * unit-tests/test-cases/dylib-aliases: added
2932 ----- Tagged ld64-73.1
2934 2007-03-30 Nick Kledzik <kledzik@apple.com>
2936 * src/MachOWriterExecutable.hpp: back out use of LC_REEXPORT_DYLIB until rdar://problem/5009909 is in build fleet
2939 ----- Tagged ld64-73
2941 2007-03-30 Nick Kledzik <kledzik@apple.com>
2943 <rdar://problem/4175790> ER: -dead_strip_dylibs
2944 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
2945 * src/ObjectFile.h: change dylib reader interface to implictly/explicitlyLinked
2946 * src/ld.cpp: use new dylib reader interface
2947 * src/Options.h: add deadStripDylibs()
2948 * src/Options.cpp: support -dead_strip_dylibs
2949 * src/MachOReaderDylib.hpp: use new dylib reader interface
2950 * src/MachOWriterExecutable.hpp: remove dylib load commands for unused dylibs and alter ordinals
2951 * unit-tests/test-cases/re-export-optimizations: added
2952 * unit-tests/test-cases/dead_strip_dylibs: added
2955 2007-03-30 Nick Kledzik <kledzik@apple.com>
2957 * src/Options.cpp: enable -lfoo to search for libfoo.so as well as libfoo.dylib,
2958 remove seg addr table hack for transitioning to new linker
2960 2007-03-30 Nick Kledzik <kledzik@apple.com>
2962 <rdar://problem/5073800> ADOBE XCODE3: Linker is slow with large C++ .o files
2963 * src/MachOReaderRelocatable.hpp: the compiler generates stubs to weak functions in the
2964 same translation unit. Don't treat those like the spurios stubs to static functions.
2967 2007-03-29 Nick Kledzik <kledzik@apple.com>
2969 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
2970 * src/MachOReaderRelocatable.hpp: To handle duplicate labels properly, rework how atoms sizes are set
2971 by iterating through sorted fAtoms rather than fAddrToAtom, . Change default alignment of commons
2972 to be the natural alignment of the size rounded up to the closest power of two and max it at 12.
2973 Build atoms in reverse symbol table order so that global atoms are constructed before locals.
2974 This assures that if there is a global and local label at the same location, the global label
2975 will become the atom's name and the local will be an alias. Properly handle a label
2976 at the end of a section. Handle R_ABS in relocations. Handle sect-diff relocs with addends.
2977 Don't auto-strip 'l' symbols in static executables (mach_kernel).
2978 * src/OpaqueSection.hpp: opaque_section now has an ordinal
2979 * src/ld.cpp: opaque_section now requires an ordinal
2980 * src/ObjectFile.h: add ReaderOptions.fForStatic
2981 * src/Options.cpp: set fForStatic when building a static executable
2982 * src/MachOWriterExecutable.hpp: add from atom to StubAtom<ppc>. Properly write out i386
2983 sect-diff relocs with addends. properly write out ppc PICbase relocs where pic base
2987 2007-03-27 Nick Kledzik <kledzik@apple.com>
2989 <rdar://problem/5085863> Typo in ld man page (-exported_symbols_list)
2990 * doc/man/man1/ld.1: fix typo
2993 2007-03-26 Nick Kledzik <kledzik@apple.com>
2995 <rdar://problem/4727750> consider generating LC_UUID from a checksum of the file
2996 * src/Options.h: change emitUUID() to getUUIDMode()
2997 * src/Options.cpp: support -random_uuid
2998 * src/MachOWriterExecutable.hpp: set uuid to be md5 hash of entire output file
3001 2007-03-24 Nick Kledzik <kledzik@apple.com>
3003 * src/MachOWriterExecutable.hpp: restructure writeAtoms() to copy all atoms in memory if possible
3006 2007-03-24 Nick Kledzik <kledzik@apple.com>
3008 <rdar://problem/5082603> ld -r of stripped .o file can incorrectly merge non-lazy pointers
3009 * src/MachOWriterExecutable.hpp: when generating a .o file, non-lazy pointer with target offsets should be
3010 encoded as LOCAL in the indirect symbol table
3011 * unit-tests/test-cases/stripped-indirect-symbol-table: added test case
3014 2007-03-23 Nick Kledzik <kledzik@apple.com>
3016 <rdar://problem/5084564> SWB: ld64-72 errors building with gcc-4.2
3017 * src/MachOReaderDylib.hpp: add curly brackets in switch cases
3018 * src/MachOWriterExecutable.hpp: rearrange classes so there are no template specialization forward references
3021 2007-03-23 Nick Kledzik <kledzik@apple.com>
3023 * src/ld.cpp: fix -print_statistics when using -dead_strip
3026 2007-03-23 Nick Kledzik <kledzik@apple.com>
3028 * src/MachOReaderRelocatable.hpp: generate better names for non-lazy pointers to the interior of atoms
3031 2007-03-16 Nick Kledzik <kledzik@apple.com>
3033 * src/MachOWriterExecutable.hpp: speed up ld -r a little by reversing relocs en mas
3036 2007-03-16 Nick Kledzik <kledzik@apple.com>
3038 <rdar://problem/4975277> ld Bus Error on missing command line arguments
3039 * src/Options.cpp: check next argv[] is not NULL
3042 2007-03-16 Nick Kledzik <kledzik@apple.com>
3044 <rdar://problem/4832049> need to be able to order symbols in anonymous namespaces
3045 * src/ld.cpp: add logic to do fuzzy matching of symbols with anonymous namespace usage
3046 * unit-tests/test-cases/order_file-ans: added test case
3049 2007-03-16 Nick Kledzik <kledzik@apple.com>
3051 <rdar://problem/5042552> headerpad_max_install_names deprecated for 64-bit
3052 * src/ld.cpp: make sure dylib load command order matches command line order
3053 * src/Options.h: add maxMminimumHeaderPad()
3054 * src/Options.cpp: add maxMminimumHeaderPad() set by -headerpad_max_install_names
3055 * src/src/MachOWriterExecutable.hpp: check maxMminimumHeaderPad()
3056 * doc/man/man1/ld.1: update man page about -headerpad_max_install_names
3059 2007-03-16 Nick Kledzik <kledzik@apple.com>
3061 <rdar://problem/4592484> Linker returns success although exported symbols are undefined.
3062 * src/ld.cpp: turn missing symbols back into an error
3065 2007-03-16 Nick Kledzik <kledzik@apple.com>
3067 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
3068 * unit-tests/test-cases/loader_path: added test case
3071 2007-03-16 Nick Kledzik <kledzik@apple.com>
3073 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
3074 <rdar://problem/4142277> Indirect libraries should be found using -F and -L options
3075 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
3076 * src/ld.cpp: reworked all dylib processing. Readers can now add the dylib list.
3077 * src/Options.h: add findFileUsingPaths()
3078 * src/MachOReaderDylib.hpp: look in re-exported children instead of requring linker to do that
3079 * src/ObjectFile.h: add processIndirectLibraries(), remove getDependentLibraryPaths()
3080 * src/machochecker.cpp: support LC_REEXPORT_DYLIB
3081 * src/ExecutableFile.h: simplify DyLibUsed
3082 * src/Options.cpp: add findFileUsingPaths(). add new re-export options
3083 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
3084 * doc/man/man1/ld.1: updated with new re-export options
3085 * unit-tests/test-cases/indirect-path-search: added tests that -F and -L work with indirect dylibs
3086 * unit-tests/test-cases/re-export-cases: added tests for all combinations of re-exporting
3089 2007-03-14 Nick Kledzik <kledzik@apple.com>
3091 <rdar://problem/4982400> sort external relocations to optimize dyld performance
3092 * src/MachOWriterExecutable.hpp: added ExternalRelocSorter
3093 * src/machochecker.cpp: verify external relocations are grouped by symbol number
3094 * unit-tests/test-cases/external-reloc-sorting: added test case
3097 ----- Tagged ld64-72
3099 2007-03-06 Nick Kledzik <kledzik@apple.com>
3101 * src/Options.cpp: ignore .objc_category_name_* symbols in .exp files
3104 2007-03-06 Nick Kledzik <kledzik@apple.com>
3106 * src/Options.cpp: stop special casing mach_kernel and instead requre kernel to be built with -new_linker
3109 2007-03-06 Nick Kledzik <kledzik@apple.com>
3111 <rdar://problem/5044253> ld64-72 (experimental) is causing DejaGnu test failures
3112 * src/MachOWriterExecutable.hpp: add optimizableGOTReferenceKind() to track GOT uses that cannot be optimized
3115 2007-03-06 Nick Kledzik <kledzik@apple.com>
3117 <rdar://problem/5026135> minimum header padding should be 32 to allow code signing
3118 * src/Options.cpp: initialize fMinimumHeaderPad to 32
3119 * src/MachOWriterExecutable.hpp: better calculation of header padding
3122 2007-03-06 Nick Kledzik <kledzik@apple.com>
3124 <rdar://problem/5033206> Linker crashes with -flat_namespace against two-level dylibs that might have re-exports
3125 * src/ld.cpp: flat namespace should not allow NULL indirect readers
3128 2007-03-06 Nick Kledzik <kledzik@apple.com>
3130 * src/MachOReaderRelocatable.hpp: don't error on S_COALESCED sections with anonymous atoms
3131 * src/MachOWriterExecutable.hpp: set MH_PIE bit when linking -pie
3132 * ld64.xcodeproj/project.pbxproj: don't echo environment when running unit test
3135 2007-03-01 Nick Kledzik <kledzik@apple.com>
3137 * doc/man/man1/ld.1: Add descriptions to all "rarely used options"
3140 2007-03-01 Nick Kledzik <kledzik@apple.com>
3142 <rdar://problem/4971033> Remove support for Essential Symbols: Warn about use of -Sp option; remove man page entry
3143 * src/Options.cpp: make -Sp obsolete
3144 * doc/man/man1/ld.1: make -Sp obsolete
3147 2007-03-01 Nick Kledzik <kledzik@apple.com>
3149 <rdar://problem/5040314> Support -pie
3150 * src/Options.h: Add positionIndependentExecutable()
3151 * src/Options.cpp: Support -pie option to set positionIndependentExecutable()
3152 * src/MachOWriterExecutable: if -pie is used, add extra local relocations and error if any
3153 absolute addressing is used
3156 2007-03-01 Nick Kledzik <kledzik@apple.com>
3158 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
3159 * src/ld.cpp: Ensure segments are laid out in discovery order. Add support for kAbsoluteSymbol.
3160 Warn when merging symbols of different visiblity. Warn when a tentative definition
3161 is replaced by one a real definition with a smaller size. Lay out __common section
3162 so that ones built with -fno-commons come before regular commons.
3163 * src/ObjectFile.h: remove SegmentOffset ivar and getter/setters
3164 * src/machochecker.cpp: allow images with no r/w segments
3165 * src/MachOReaderRelocatable: Add AbsoluteAtom. Sort tentative definitions by name instead of by size
3166 Add support for custom commons alignment.
3167 * src/Options.cpp: Fix spurious -sectalign warnings. Don't use ld_classic when linking mach_kernel
3168 * src/MachOWriterExecutable.hpp: Support kAbsoluteSymbol atoms. In -r mode, set custom alignment
3169 for commons if alignment is not its size. Support global __dtrace_probe labels.
3170 * src/ObjectDump.cpp: add support for kAbsoluteSymbol atoms.
3171 * unit-tests/test-cases/commons-alignment: Added test case for custom commons alignment
3172 * unit-tests/test-cases/absolute-symbol: Added test case for basic absolute symbols
3173 * unit-tests/test-cases/segment-order: Added test case that segments lay out in discovery order
3174 * unit-tests/test-cases/commons-order: Added test case that commons lay out correctly
3175 * unit-tests/test-cases/end-label: Added test case that a label used to mark the end of a section does not
3176 get associcated with the next section.
3179 2007-02-23 Nick Kledzik <kledzik@apple.com>
3181 <rdar://problem/3965017> gcc-5005: DejaGnu failures due to -frepo
3182 * src/ld.cpp: Add quotes to referenced from name to make collect2 and -frepo happy
3185 2007-02-22 Nick Kledzik <kledzik@apple.com>
3187 * src/MachOWriterExecutable.hpp: rework how padding after load commands is calculated
3190 2007-02-21 Nick Kledzik <kledzik@apple.com>
3192 * src/MachOWriterExecutable.hpp: extend special case of __mh_execute_header to static executables too
3195 2007-02-21 Nick Kledzik <kledzik@apple.com>
3197 <rdar://problem/3882294> gcc link map option ( "-M" ) should be redirectable to file
3198 * doc/man/man1/ld.1: added -map option description
3199 * src/Options.h: added generatedMapPath()
3200 * src/Options.cpp: set up generatedMapPath() if -map option is used
3201 * src/MachOWriterExecutable.hpp: add writeMap() method to generate map file
3204 2007-02-19 Nick Kledzik <kledzik@apple.com>
3206 <rdar://problem/4557734> Implement GOT Load elimination optimization
3207 * src/ld.cpp: track size of all atoms and if > 2GB sort large zero-fill atoms to end
3208 * src/MachOWriterExecutable.hpp: If image size < 2GB, only generate GOT entries if value must be
3209 updatable by dyld. If > 2GB, only eliminate GOT entries to non-zero-fill atoms. Any use
3210 of an eliminated GOT entry has its code changed from MOVQ _foo@GOT(%rip) to LEAQ _foo(%rip).
3211 * unit-tests/test-cases/large-data: added
3212 * unit-tests/test-cases/got-elimination: added
3215 ----- Tagged ld64-71.2
3217 2007-02-13 Nick Kledzik <kledzik@apple.com>
3219 <rdar://problem/4995303> new ld ignores -segprot option
3220 * src/Options.h: expose customSegmentProtections()
3221 * src/Options.cpp: parse -segprot option and populate customSegmentProtections()
3222 * src/MachOWriterExecutable.hpp: use customSegmentProtections()
3225 2007-02-13 Nick Kledzik <kledzik@apple.com>
3227 <rdar://problem/4988068> i386 -stack_addr doesn't work
3228 * src/MachOWriterExecutable.hpp: use correct offset into thread state record
3231 ----- Tagged ld64-71.1
3233 2007-02-07 Nick Kledzik <kledzik@apple.com>
3235 * src/ld.cpp: sort __OBJC2 segment to be next to __OBJC segment
3238 2007-02-07 Nick Kledzik <kledzik@apple.com>
3240 * src/Options.cpp: change missing -seg_addr_table from an error to a warning
3243 2007-02-06 Nick Kledzik <kledzik@apple.com>
3245 <rdar://problem/4977311> Leopard 9A357: -dylib_file broken?
3246 * src/MachOWriterExecutable.hpp: remove use of fInstallPathOverride
3247 * src/Options.cpp: wire up -dylib_file option
3248 * src/Options.h: remove fInstallPathOverride. add fDylibOverrides
3249 * src/ld.cpp: check dylibOverrides() for indirect libraries
3250 * unit-tests/test-cases/dylib_file: add test case
3253 2007-02-05 Nick Kledzik <kledzik@apple.com>
3255 * src/MachOReaderDylib.hpp: don't warn about zero size __image_info sections
3258 2007-02-04 Rick Balocca <rbalocca@apple.com>
3259 Enable the failing cases for missing command line arguments
3261 2007-02-04 Rick Balocca <rbalocca@apple.com>
3262 Make sure that all .o's are checked by ObjectDump
3263 and all macho are checked by machochecker
3265 2007-02-04 Rick Balocca <rbalocca@apple.com>
3266 Fix an endian problem with machochecker
3267 Fix blank-stubs Makefile
3269 ----- Tagged ld64-71
3271 2007-02-02 Rick Balocca <rbalocca@apple.com>
3272 blank-stubs test case: handle the case of a native ppc compile--this
3273 sets the subtype, which must be passed to lipo
3275 2007-02-01 Rick Balocca <rbalocca@apple.com>
3276 make cpu-sub-types test more robust
3278 2007-02-01 Rick Balocca <rbalocca@apple.com>
3279 auto-arch tests were resulting in a false FAILs
3281 2007-02-01 Rick Balocca <rbalocca@apple.com>
3282 test cpu-sub-types was resulting in a false FAIL
3284 2007-02-01 Nick Kledzik <kledzik@apple.com>
3286 <rdar://problem/4969335> STD:VSC: c99 -o writes to file that does not have write permission
3287 * src/MachOWriterExecutable.hpp: check file is writable before using it
3289 2007-02-01 Nick Kledzik <kledzik@apple.com>
3291 <rdar://problem/4965743> debug map (N_OSO) timestamps for object files in ranlib archive are incorrect
3292 * src/MachOReaderArchive.hpp: parse modTime for .o files out of archive header
3294 2007-01-31 Nick Kledzik <kledzik@apple.com>
3296 <rdar://problem/4967535> 9A354: ld -all_load does *NOT* produce the same dSYM as *.o or -u
3297 * src/ld.cpp: when using -all_load don't assume that all atoms have same reader
3298 * unit-tests/test-cases/dwarf-archive-all_load: added
3300 ----- Tagged ld64-70.1
3302 2007-01-31 Nick Kledzik <kledzik@apple.com>
3304 * src/MachOWriterExecutable.hpp: in addObjectRelocs_powerpc() mask scattered r_address to 16-bits
3306 ----- Tagged ld64-70
3309 2007-01-30 Nick Kledzik <kledzik@apple.com>
3311 <rdar://problem/4810668> linker should verify GC consistency of modules being linked into library
3312 <rdar://problem/4474195> Support cpu-sub-types for ppc
3313 * src/ObjectFile.h: Add getObjCConstraint() and getCpuConstraint()
3314 * src/MachOReaderRelocatable.hpp: don't make atom for __image_info section, instead parse constaints
3315 * src/MachOReaderDylib.hpp: look at __image_info content to get constaints
3316 * src/ld.cpp: add updateContraints() and checkObjc()
3317 * src/MachOWriterExecutable.hpp: add ObjCInfoAtom to sythesize __image_info content
3320 2007-01-28 Nick Kledzik <kledzik@apple.com>
3322 src/*: remove ObjectFile::requiresFollowOnAtom() method
3325 2007-01-28 Nick Kledzik <kledzik@apple.com>
3327 src/ld.cpp: enable LLVM_SUPPORT by default
3328 src/LLVMReader.hpp: don't use absolute paths for llvm headers and libraries
3331 2007-01-26 Rick Balocca <rbalocca@apple.com>
3332 * src/ObjectDump.cpp: The usage() message was incorrect.
3335 2007-01-25 Rick Balocca <rbalocca@apple.com>
3336 * unit-tests/test-cases/zero-fill3: It was reporting FAIL on ld64 error return.
3337 It should have been checking for non-error return.
3340 2007-01-24 Nick Kledzik <kledzik@apple.com>
3342 <rdar://problem/4952297> x86 fast stubs should not cross 64-byte boundries
3343 * src/MachOWriterExecutable.hpp: for x86, 64-byte align __jump_table section
3344 and make 64-btye crossing stubs be empty entries with indirect symbol table
3345 entry of INDIRECT_SYMBOL_ABS
3348 2007-01-19 Nick Kledzik <kledzik@apple.com>
3350 * src/Options.h: add readOnlyx86Stubs()
3351 * src/Options.cpp: support -read_only_stubs
3352 * src/MachOWriterExecutable.hpp: make __IMPORT segment not writable if -read_only_stubs is used
3355 2007-01-16 Eric Christopher <echristo@apple.com>
3357 <rdar://problem/4856341> ld64 --help isn't recognized
3358 * src/Options.cpp (Options::parse): Support --help and -help.
3361 2007-01-15 Nick Kledzik <kledzik@apple.com>
3363 * src/MachOFileAbstraction.hpp: add range checking on macho_scattered_relocation_info::set_r_address()
3366 2007-01-14 Nick Kledzik <kledzik@apple.com>
3368 <rdar://problem/4514409> Support wildcards in contents of -exported_symbols_list
3369 * src/Options.h: add SetWithWildcards class
3370 * src/Options.cpp: add -exported_symbol and -unexported_symbol and use SetWithWildcards
3371 * doc/man/man1/ld.1: add -exported_symbol and wildcard explanation
3372 * unit-tests/test-cases/exported-symbols-wildcards: added test case
3375 2007-01-10 Nick Kledzik <kledzik@apple.com>
3377 <rdar://problem/4868270> [U]SDT probes should use C calling convention
3378 * src/Options.cpp: Add -read_only_dof
3379 * src/ld.cpp: create __dof section(s) based on probe and isenabled sites
3380 * src/MachOReaderRelocatable.hpp: parse new sdt 2.0 probes encoded in .o files
3381 * src/MachOWriterExecutable.hpp: handle regenerating dtrace probes into .o files
3382 * unit-tests/test-cases/dtrace-static-probes: added test case
3385 ----- Tagged ld64-69.8
3387 2007-01-30 Nick Kledzik <kledzik@apple.com>
3389 <rdar://problem/4964508> Support LD_FORCE_NO_SEG_ADDR_TABLE
3390 * src/Options.cpp: Support LD_FORCE_NO_SEG_ADDR_TABLE
3393 ----- Tagged ld64-69.7
3395 2007-01-25 Nick Kledzik <kledzik@apple.com>
3397 <rdar://problem/4949507> Leopard9A351: CFM Apps Are Broken because CFM glue is missing
3398 * src/MachOReaderRelocatable.hpp: check S_ATTR_NO_DEAD_STRIP in dontDeadStrip()
3401 ----- Tagged ld64-69.6
3403 2007-01-24 Nick Kledzik <kledzik@apple.com>
3405 <rdar://problem/4947347> LD_TRACE_ARCHIVES should only print out when a .o is actually used from an archive
3406 * src/ld.cpp: create and use logArchive()
3409 ----- Tagged ld64-69.5
3411 2007-01-22 Nick Kledzik <kledzik@apple.com>
3413 <rdar://problem/4946075> 9A350: can't link ppc programs with ld_classic
3414 * src/Options.cpp: Remove support for LD_NO_CLASSIC_LINKER. Add support for -classic_linker
3417 ----- Tagged ld64-69.4
3419 2007-01-17 Nick Kledzik <kledzik@apple.com>
3421 <rdar://problem/4925645> QTComponents does not link with ld64
3422 * src/MachOReaderRelocatable.hpp: handle N_RSYM and N_PSYM stabs
3425 ----- Tagged ld64-69.3
3427 2007-01-03 Nick Kledzik <kledzik@apple.com>
3429 * src/Options.cpp: If the same dylib is specified twice and the second is specified weak, make it weak
3432 ----- Tagged ld64-69.2
3434 2006-12-18 Nick Kledzik <kledzik@apple.com>
3436 <rdar://problem/4889729> -dead_strip without -exported_symbols_list should not strip global functions from archives
3437 * src/ld.cpp: when adding a .o file from an archive, add all its global symbols to live roots
3438 * unit-tests/test-cases/dead_strip-archive: added
3441 2006-12-18 Nick Kledzik <kledzik@apple.com>
3443 <rdar://problem/4889409> flat_namespace main executables do not need to indirect interior references
3444 * src/MachOWriterExecutable.hpp: don't indirect references to global symbols in main executables
3445 * unit-tests/test-cases/flat-main: updated to test for indirection
3446 * unit-tests/test-cases/flat-dylib: added
3449 ----- Tagged ld64-69.1
3451 2006-12-15 Nick Kledzik <kledzik@apple.com>
3453 <rdar://problem/4886721> -flat_namespace does not work with -mdynamic-no-pic
3454 * src/MachOWriterExecutable.hpp: rework checking for use of ppc absolute addressing to allow them as long as
3455 the target is within the same linkage unit.
3458 2006-12-15 Nick Kledzik <kledzik@apple.com>
3460 <rdar://problem/4886652> -ObjC should only load .o with .objc_ symbols
3461 * src/Options.cpp: remove warning from -ObjC and have it instead set fLoadAllObjcObjectsFromArchives
3462 * src/MachOReaderArchive.hpp: when -ObjC is used, preload all .o files from archives that contain .objc_ symbols
3465 ----- Tagged ld64-69
3467 2006-12-13 Nick Kledzik <kledzik@apple.com>
3469 <rdar://problem/4879913> prebound interior pointers must be non-zero
3470 * src/MachOWriterExecutable.hpp: in fixUpReference_powerpc() set lazy pointers bound to with the dylib to
3471 their target value. Properly set REFERENCE_FLAG_UNDEFINED_* flags in reference table and n_desc
3474 2006-12-09 Nick Kledzik <kledzik@apple.com>
3476 <rdar://problem/4868738> ld64 fails to detect error that ld_classic does
3477 * src/MachOWriterExecutable.hpp: check for absolute reloc to an external symbol
3478 * src/MachOReaderRelocatable.hpp: ignore -mlong-branch stubs in .o files
3481 2006-12-09 Nick Kledzik <kledzik@apple.com>
3483 <rdar://problem/4874209> symbols with REFERENCED_DYNAMICALLY should never be stripped
3484 * src/MachOWriterExecutable.hpp: update Writer<A>::shouldExport() to check for kSymbolTableInAndNeverStrip
3485 * unit-tests/test-cases/main-stripped: add test that dynamically referenced symbol cannot be stripped
3488 2006-12-08 Nick Kledzik <kledzik@apple.com>
3490 * unit-tests/test-cases/allowable-client: add variant test cases (e.g. CoreServices_profile)
3491 * src/ld.cpp: allow frameworks with variant install names (e.g. CoreServices_profile) to be private clients
3494 2006-12-08 Nick Kledzik <kledzik@apple.com>
3496 * doc/man/man1/ld.1: rewrite man page
3497 * src/Options.h: add warnObsolete()
3498 * src/Options.cpp: use warnObsolete() on many options. Make nonWeak the weak-mis-match default.
3499 Make -ObjC mean -all_load.
3501 ----- Tagged ld64-68.3
3503 2006-12-05 Nick Kledzik <kledzik@apple.com>
3505 * src/ld.cpp: allow umbrella frameworks to have variant install names (e.g. CoreServices_profile) and still link
3508 ----- Tagged ld64-68.2
3510 2006-12-05 Nick Kledzik <kledzik@apple.com>
3512 * src/MachOWriterExecutable.cpp: Use N_PBUD in the symbol table for undefined symbols in prebound dylibs
3515 ----- Tagged ld64-68.1
3517 2006-12-01 Nick Kledzik <kledzik@apple.com>
3519 * src/Options.cpp: always generate module tables for 32-bit architectures so that ld_classic
3520 can link against them
3523 ----- Tagged ld64-68
3525 2006-12-01 Nick Kledzik <kledzik@apple.com>
3527 <rdar://problem/4858299> seg_addr_table needs matching fuzziness
3528 * src/Options.cpp: special case a how a dozen dylib are looked up in the seg_addr_table
3531 2006-12-01 Nick Kledzik <kledzik@apple.com>
3533 * src/Options.cpp: have all -static links for 32-bit archs roll over to ld_classic unless
3534 LD_NO_CLASSIC_LINKER_STATIC is set.
3535 * unit-tests/bin/make-recursive.pl: set LD_NO_CLASSIC_LINKER_STATIC for unit tests
3538 2006-11-29 Nick Kledzik <kledzik@apple.com>
3540 <rdar://problem/4855542> ld64-67: QTComponents fails to build
3541 * src/MachOReaderRelocatable.hpp: don't error out when a local non-lazy pointer does not point to a symbol
3542 * unit-tests/test-cases/strip_local: added test case
3545 2006-11-28 Nick Kledzik <kledzik@apple.com>
3547 <rdar://problem/4433496> Need a way to mark libraries usable by dynamic linker but unusable by static linker
3548 * src/Options.cpp: allow -client_name to be used with main executables
3549 * src/ld.cpp: generalize -allowable_client. Any dylib can now restrict who can link against it. As a convention
3550 linking with -allowable_client '!' will mean no one can statically link with the dylib. It can still be loaded
3551 dynamically, or by any existing clients, but no new clients can link with it.
3552 * unit-tests/test-cases/allowable-client/Makefile: enable previously commented out test cases. Add test cases
3553 of a dylib that allows no clients and just one client
3555 2006-11-27 Nick Kledzik <kledzik@apple.com>
3557 <rdar://problem/4795615> -final_output should be used if -install_name not used
3558 * src/Options.cpp: fall back to using -final_output for install name
3561 ----- Tagged ld64-67
3563 2006-11-17 Nick Kledzik <kledzik@apple.com>
3565 * src/MachOWriterExecutable.hpp: support __IMPORT segment being slide independently of __DATA segment in shared cache
3568 2006-11-16 Nick Kledzik <kledzik@apple.com>
3570 <rdar://problem/4838262> 9a303: ld -filelist Bus Error
3571 * src/Options.cpp: add check that -filelist is followed by an argument
3574 2006-11-16 Nick Kledzik <kledzik@apple.com>
3576 * src/MachOWriterExecutable.hpp: when building split-seg dylibs, LINKEDIT goes in read-only side
3579 2006-11-15 Nick Kledzik <kledzik@apple.com>
3581 * src/MachOWriterExecutable.hpp: set proper attributes for __eh_frame in ld -r mode
3582 * unit-tests/test-cases/eh_frame: added test case
3585 2006-11-10 Nick Kledzik <kledzik@apple.com>
3587 * src/MachOReaderRelocatable.hpp: redirect references to static weak stubs to the real target
3590 2006-11-09 Nick Kledzik <kledzik@apple.com>
3592 * src/MachOWriterExecutable.hpp: r_address is offset from first LC_SEGMENT vmaddr - not from segment with lowest address
3595 ----- Tagged ld64-66.1
3597 2006-11-09 Nick Kledzik <kledzik@apple.com>
3599 * src/MachOWriterExecutable.hpp: initialize fModuleInfoAtom to zero
3602 2006-11-08 Nick Kledzik <kledzik@apple.com>
3604 <rdar://problem/4821985> FSF GCC's libjava doesn't link with Ochre ld64
3605 * src/MachOReaderRelocatable.hpp: ignore debug_line section if debug_info section is missing or empty
3607 ----- Tagged ld64-66
3609 2006-11-07 Nick Kledzik <kledzik@apple.com>
3611 <rdar://problem/4824368> SWB: d64-65 does not built usage split-seg dylibs
3612 * src/MachOWriterExecutable.hpp: when prebinding split-seg correctly set r_address fields and on
3613 disk values for external relocations
3614 * unit-tests/test-cases/prebound-split-seg: added test case
3617 2006-11-03 Nick Kledzik <kledzik@apple.com>
3619 * src/MachOReaderDylib.hpp: don't report dependent libraries if MH_NO_REEXPORTED_DYLIBS bit is set
3620 * src/MachOWriterExecutable.hpp: set MH_NO_REEXPORTED_DYLIBS bit if dylib does not logically re-export any other dylibs
3621 * unit-tests/test-cases/re-export-flag: added test case
3622 * src/machochecker.cpp: validate use of MH_NO_REEXPORTED_DYLIBS
3625 2006-11-02 Nick Kledzik <kledzik@apple.com>
3627 <rdar://problem/4814565> Mysterious messages from ld64 with MACOSX_DEPLOYMENT_TARGET = 10.5
3628 * src/MachOWriterExecutable.hpp: kPointerWeakImport is a valid reference type to cross segments
3631 2006-11-02 Nick Kledzik <kledzik@apple.com>
3633 * src/Options.cpp,h: Add support for -rpath
3634 * src/MachOFileAbstraction.hpp: add macho_rpath_command
3635 * src/MachOWriterExecutable.hpp: add RPathLoadCommandsAtom to create LC_RPATH for each -rpath
3638 ----- Tagged ld64-65
3640 2006-10-30 Nick Kledzik <kledzik@apple.com>
3642 <rdar://problem/4729162> x86_64 default stack_addr is wrong
3643 * src/Options.cpp: change default 64-bit stack location when using -stack_size
3646 2006-10-30 Nick Kledzik <kledzik@apple.com>
3648 <rdar://problem/4474316> dylibs need modules for 10.3 and for ld_classic in Salt
3649 * src/MachOWriterExecutable.hpp: add ModuleInfoLinkEditAtom to create module table stuff
3650 * src/Options.cpp,h: Add needsModuleTable()
3651 * src/MachOFileAbstraction.hpp: Add macho_dylib_module, macho_dylib_reference, and macho_dylib_table_of_contents
3654 2006-10-27 Nick Kledzik <kledzik@apple.com>
3656 * unit-tests/test-cases/no-uuid/Makefile: add -gstabs+ to be compatible with latest compiler
3657 * unit-tests/test-cases/stabs-coalesce/Makefile: add -gstabs+ to be compatible with latest compiler
3660 2006-10-26 Nick Kledzik <kledzik@apple.com>
3662 <rdar://problem/4585230> i386 -mdynamic-no-pic switch statement jump table is out of line
3663 * src/MachOWriterExecutable.hpp: for i386 don't check for direct references to weak symbols
3666 2006-10-26 Devang Patel <dpatel@apple.com>
3668 * src/LLVMReader.hpp: Supply final output file path to optimizer.
3670 2006-10-26 Devang Patel <dpatel@apple.com>
3672 * src/ObjectFile.h: Make setSection* methods virtual.
3673 * src/LLVMReader.hpp: Override setSection* methods.
3675 2006-10-26 Devang Patel <dpatel@apple.com>
3677 * unit-tests/test-case/llvm-integration/a13.h: New.
3678 * unit-tests/test-case/llvm-integration/a13.cc: New.
3679 * unit-tests/test-case/llvm-integration/main13.cc: New.
3681 2006-10-26 Devang Patel <dpatel@apple.com>
3683 * src/options.h, src/options.cpp: Add -save-temps command line option.
3684 * src/LLVMReader.hpp: Use saveTemps option.
3687 2006-10-26 Devang Patel <dpatel@apple.com>
3689 * src/LLVMReader.hpp: Remove invalid module from memory.
3691 2006-10-26 Devang Patel <dpatel@apple.com>
3693 * src/LLVMReader.hpp: Collect symbol alignment info from LLVM optimizer.
3695 2006-10-21 Eric Christopher <echristo@apple.com>
3697 * src/ld.cpp (Linker::Linker): Check for LD_NO_CLASSIC_LINKER before
3698 invoking ld_classic.
3699 * unit-tests/test-cases/relocs-literals/Makefile: Run for -mdynamic-no-pic
3701 * unit-tests/test-cases/static-executable/Makefile: Skip for 64-bit. Add
3702 -dead_strip to command line.
3704 ----- Tagged ld64-64.2
3706 2006-10-19 Nick Kledzik <kledzik@apple.com>
3708 * ld64.xcodeproj/project.pbxproj: stop copying LLVMReader.hpp into man1 directory
3710 ----- Tagged ld64-64.1
3712 2006-10-19 Nick Kledzik <kledzik@apple.com>
3714 <rdar://problem/4791643> ld64-63.1 erroneously coalesces an empty string with a non-empty string
3715 * src/MachOReaderRelocatable.hpp: rework cstring parsing to not assume all strings are start
3716 at section alignment boundaries, and when coalescing empty strings always use one with greatest
3717 alignment requirement
3718 * src/MachOWriterExecutable.hpp: in -r mode, don't pad end of cstring section
3719 * src/ObjectFile.h: correctly name leadingZeros() as trailingZeros()
3720 * src/ld.cpp: leadingZeros() --> trailingZeros()
3723 2006-10-18 Eric Christopher <echristo@apple.com>
3725 * unit-tests/test-cases/read-only-relocs/Makefile: Skip for x86_64.
3726 * unit-tests/test-cases/llvm-integration/Makefile: Skip if llvm isn't
3729 2006-10-18 Nick Kledzik <kledzik@apple.com>
3731 <rdar://problem/4783853> ld64 change required to go with assembler cstring change
3732 <rdar://problem/4732996> ld64 should error when a local relocation references an address outside its section
3733 * src/MachOReaderRelocatable.hpp: for x86_64 in order to work with local or external relocations to cstrings
3734 change parser to allow atoms with a pending name that is resolved after references are instantiated.
3735 Make direct references to kRegularDefinition atoms.
3736 * src/MachOWriterExecutable.hpp: in -r mode for x86_64 generate L* labels for cstrings and use external relocations
3737 * unit-tests/test-cases/relocs-literals/test.c: add two cases of cstring literal plus addend
3740 2006-10-06 Nick Kledzik <kledzik@apple.com>
3742 <rdar://problem/4786250> check MACOSX_DEPLOYMENT_TARGET if -macosx_version_min is not used
3743 * src/Options.cpp: if -macosx_version_min is not used, check MACOSX_DEPLOYMENT_TARGET, if
3744 that is unused, default to 10.5
3746 ----- Tagged ld64-64
3748 2006-10-06 Nick Kledzik <kledzik@apple.com>
3750 <rdar://problem/4756806> crash in ppc64 program - bl to saveFP, but saveFP is too far away?
3751 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands(), properly account for growth of __text
3754 2006-10-06 Nick Kledzik <kledzik@apple.com>
3756 <rdar://problem/4769120> Linker-defined alias converts reference into definition and generates error.
3757 * src/MachOReaderRelocatable.hpp: only alias symbols actually in the symbol table
3760 2006-10-06 Nick Kledzik <kledzik@apple.com>
3762 * unit-tests/test-cases/dwarf-debug-notes/Makefile: crt1.o no longer has stabs, so don't need to strip it
3763 * unit-tests/test-cases/dwarf-debug-notes-r/Makefile: crt1.o no longer has stabs, so don't need to strip it
3766 2006-10-06 Nick Kledzik <kledzik@apple.com>
3768 * src/MachOReaderRelocatable.hpp: rework dwarf line parsing to fix warnings that starting
3769 showing up with gcc-5421
3772 2006-10-05 Eric Christopher <echristo@apple.com>
3774 <rdar://problem/4760935> ld64 needs to support libtool options
3775 * src/Options.cpp (Options::parse): Add -noall_load, -install_name,
3776 -current_version and -compatibility_version.
3778 2006-10-03 Eric Christopher <echristo@apple.com>
3780 * src/Options.cpp (Options::gotoClassicLinker): Use execvp
3783 2006-10-03 Eric Christopher <echristo@apple.com>
3785 * unit-tests/test-cases/tentative-to-real/Makefile: Clean up after tests.
3787 2006-10-03 Eric Christopher <echristo@apple.com>
3789 * unit-tests/include/common.makefile (VALID_ARCHS): Add x86_64.
3790 (OTOOL): Remove munging based on ARCH.
3792 2006-09-29 Nick Kledzik <kledzik@apple.com>
3794 <rdar://problem/4743925> problem merging .o files built with and without -fno-common
3795 src/Options.*: make MakeTentativeDefinitionsReal a reader option
3796 src/ObjectFile.h: make MakeTentativeDefinitionsReal a reader option
3797 src/MachOWriterExecutable.hpp: make MakeTentativeDefinitionsReal a reader option
3798 src/MachOReaderRelocatable.hpp: only assign a section name of __common to
3799 tentative defintions when making a final linked image
3802 2006-09-28 Nick Kledzik <kledzik@apple.com>
3804 src/Options.h/.cpp: add support for -segaddr option
3805 src/MachOWriterExecutable.hpp: In Writer::assignFileOffsets(), use -segaddr info
3808 2006-09-28 Nick Kledzik <kledzik@apple.com>
3810 <rdar://problem/4587349> Emit new CPU subtypes for ppc64 and x86-64 when targeting 10.5 or later
3811 src/MachOWriterExecutable.hpp: set high bit of cpusubtype of 64-bit main executables when targeting 10.5 or later
3814 2006-09-28 Devang Patel <dpatel@apple.com>
3816 Add LLVM LTO support
3817 src/LLVMReader.hpp: New file.
3818 src/ld.cpp: Add optimization phase. Use LLVM LTO.
3819 unit-tests/test-cases/llvm-integration: New tests.
3821 2006-09-27 Nick Kledzik <kledzik@apple.com>
3823 ld64.xcodeproj/project.pbxproj: remove accidental install of source file into man1
3826 2006-09-25 Nick Kledzik <kledzik@apple.com>
3828 src/Architectures.hpp: add kPointerDiff16 for ppc and ppc64
3829 src/MachOReaderRelocatable.hpp: support kPointerDiff16
3830 src/MachOWriterExecutable.hpp: support kPointerDiff16
3832 ----- Tagged ld64-63.1
3834 2006-09-22 Nick Kledzik <kledzik@apple.com>
3836 src/MachOWriterExecutable.hpp: include stubs in LC_SEGMENT_SPLIT_INFO
3839 2006-09-21 Nick Kledzik <kledzik@apple.com>
3841 src/Options.cpp: disable split-seg dylibs for 64-bit architectures
3844 2006-09-19 Nick Kledzik <kledzik@apple.com>
3846 src/MachOReaderRelocatable.hpp: rework __cstring parsing to better handle mixed alignment cstrings
3847 src/MachOWriterExecutable.hpp: in -r mode, make all __cstrings aligned to section alignment
3850 2006-09-19 Nick Kledzik <kledzik@apple.com>
3852 src/MachOWriterExecutable.hpp: rework encoding of LC_SEGMENT_SPLIT_INFO
3855 2006-09-19 Nick Kledzik <kledzik@apple.com>
3857 src/Options.cpp: check for -search_paths_first in first pass
3860 ----- Tagged ld64-63
3862 2006-09-15 Nick Kledzik <kledzik@apple.com>
3864 src/Options.cpp: since the ld64 will repeatedly search an archive, and some project list archives
3865 multiple times on command line to work with traditional linkers, automatically ignore duplicate libraries
3866 unit-tests/test-cases/archive-duplicate: added test case
3869 2006-09-15 Nick Kledzik <kledzik@apple.com>
3871 src/Options.cpp: support -r -static
3872 src/MachOWriterExecutable.hpp: support -r -static an don't generate LC_DYSYMTAB
3875 2006-09-14 Nick Kledzik <kledzik@apple.com>
3877 src/MachOWriterExecutable.hpp: in -r mode references to weak symbols should not create external relocations
3878 as that can cause nmedit to errror later.
3881 2006-09-13 Nick Kledzik <kledzik@apple.com>
3883 <rdar://problem/4718189> ld64: Handle .objc_class_name exports specially
3884 src/Options.cpp: add hack so that .objc_class_name_XXX in -exported_symbols_list imples _OBJC_CLASS_$_XXX
3885 src/ld.cpp: add hack to supporess errors about .objc_class_name_XXX or _OBJC_CLASS_$_XXX being undefined
3888 2006-09-12 Nick Kledzik <kledzik@apple.com>
3890 <rdar://problem/4474172> Support -prebind when targeting ppc and OS < 10.4
3891 src/Options.h: add splitSeg() and baseWritableAddress()
3892 src/Options.cpp: Add support for -seg_addr_table and LD_SEG_ADDR_TABLE, and -prebind and LD_PREBIND.
3893 src/src/MachOWriterExecutable.hpp: support split-seg and canonical prebound files to be generated
3896 2006-09-11 Nick Kledzik <kledzik@apple.com>
3898 <rdar://problem/4464904> Linking a dylib or binary from identical binaries should produce the same output
3899 src/MachOWriterExecutable.hpp: set the timestamps to be constant
3902 2006-09-11 Nick Kledzik <kledzik@apple.com>
3904 <rdar://problem/4070025> Linker support for ordering all sections and symbols
3905 src/Options.cpp: Add -order_file_statistics. Allow architecture prefixes in order files
3906 src/ld.cpp: Use fOptions.printOrderFileStatistics()
3909 2006-09-11 Nick Kledzik <kledzik@apple.com>
3911 <rdar://problem/3894079> Support -sectorder
3912 unit-tests/test-cases/order_file: added test case
3913 src/ld.cpp: Implement order file support in Linker::sortAtoms()
3914 src/Options.h: add Options.orderedSymbols()
3915 src/Options.cpp: add parseOrderFile(), implement -order_file
3918 2006-09-07 Nick Kledzik <kledzik@apple.com>
3920 <rdar://problem/4637023> need -i for 64-bit (or equivalent)
3921 <rdar://problem/4014529> Support -i for aliasing exported symbols
3922 unit-tests/test-cases/alias-objects: added
3923 unit-tests/test-cases/alias-command-line: added
3924 src/ObjectFile.h: Added Atom::getOrdinal() as new way to sort atoms. Added ReaderOptions.fAliases
3925 src/MachOReaderRelocatable.hpp: Added SymbolAliasAtom to handle multiple symbols to same address
3926 src/MachOReaderArchive.hpp: implement Atom::getOrdinal() to space out atom ordinals across member objects
3927 src/Options.cpp: support -i, -alias, -alias_list. Move search of /Network/Library/Frameworks to after /System/Library/Frameworks
3928 src/MachOWriterExecutable.hpp: pad out seg_info data. Implement getOrdinal().
3929 src/ObjectDump.cpp: call constructors directly instead of using make() wrapper
3932 2006-09-01 Nick Kledzik <kledzik@apple.com>
3934 <rdar://problem/4458878> Need the ability to tag libraries/plug-ins with security attributes
3935 src/MachOReaderDylib.hpp: add warning if using -root_safe or -setuid_safe and link against dylib that is not
3936 src/ObjectFile.h: add ReaderOption fRootSafe and fSetuidSafe
3937 src/Options.cpp: handle -root_safe or -setuid_safe command line options
3938 src/MachOWriterExecutable.hpp: set MH_ROOT_SAFE and MH_SETUID_SAFE flags
3941 2006-08-31 Nick Kledzik <kledzik@apple.com>
3943 src/ld.cpp: Add Linker::processDTrace() for processing dtrace static probes
3944 src/OpaqueSection.hpp: renamed, add symbol name, add ability to add references
3945 ld64.xcodeproj/project.pbxproj: remove SectCreate.cpp, add OpaqueSection.hpp
3948 2006-08-28 Nick Kledzik <kledzik@apple.com>
3950 <rdar://problem/4571042> Add convention for removing symbols at link time
3951 <rdar://problem/3962731> Assembler -L option causes ld64 to split stubs
3952 unit-tests/test-cases/special-labels: added test case
3953 src/MachOReaderRelocatable.hpp: ignore L* labels, make l* labels as kSymbolTableNotIn
3956 2006-08-28 Nick Kledzik <kledzik@apple.com>
3958 src/lObjectFile.h: refactor isTargetUnbound() into getTargetBinding()
3959 src/ld.cpp: create __dof section in final linked images from dtrace static probes
3960 src/Architectures.hpp: add kDtraceProbe
3961 src/Options.h/cpp: Add support for -dtrace
3962 src/machochecker.cpp: support LC_SEGMENT_SPLIT_INFO
3963 src/MachOWriterExecutable.hpp: support kDtraceProbe
3964 src/MachOReaderRelocatable.hpp: suppport kDtraceProbe
3967 2006-08-25 Nick Kledzik <kledzik@apple.com>
3969 <rdar://problem/4701529> generate LC_SEGMENT_SPLIT_INFO for 10.5 or later dylibs
3970 src/Options.h&.cpp: implement sharedRegionEligible() to control when LC_SEGMENT_SPLIT_INFO is added
3971 src/MachOFileAbstraction.hpp: add macho_linkedit_data_command
3972 src/MachOWriterExecutable.hpp: generate LC_SEGMENT_SPLIT_INFO load command and linkedit content
3974 ----- Tagged ld64-62
3976 2006-08-15 Nick Kledzik <kledzik@apple.com>
3978 <rdar://problem/4681062> wrong error message when symbol is found in unused indirect library
3979 src/ld.cpp: remove indirect libraries if they are not re-exported
3980 unit-tests/test-cases/indirect-dylib: added test case
3983 2006-08-15 Nick Kledzik <kledzik@apple.com>
3985 <rdar://problem/3930461> alignment needs to be richer
3986 src/ObjectFile.h: define ObjectFile::Alignment class for tracking rich alignment info
3987 src/ld.cpp: modify SymbolTable::add() to work with new Alignment type
3988 src/MachOReaderRelocatable.hpp: use new Alignment type. Remove alignAtLeast() and handleAnonymousNonLazyPointers()
3989 src/MachOWriterExecutable.hpp: update for new Alignment type, use modulus when calculating layout address
3990 src/ObjectDump.cpp: print richer Alignment info
3991 unit-tests/test-cases/align-modulus: added test case
3994 2006-08-11 Nick Kledzik <kledzik@apple.com>
3996 remove OPEN_SOURCE conditionals around x86_64 support
3999 2006-07-31 Nick Kledzik <kledzik@apple.com>
4001 <rdar://problem/4654131> ld64 while linking cc1 [ when dead_strip is ON]
4002 src/ld.cpp: Add ivar fAtomsWithUnresolvedReferences to track atoms not initially resolvable
4003 unit-tests/test-cases/dead_strip-archive: added test case
4006 2006-07-31 Nick Kledzik <kledzik@apple.com>
4008 <rdar://problem/4656617> x86_64: instructions with immediate and rip-relative operands need to use new relocation types
4009 src/MachOWriterExecutable.hpp: generate new reloc types in -r mode
4010 src/MachOReaderRelocatable.hpp: parse new reloc types
4011 unit-tests/test-cases/relocs-asm/relocs-asm.s: add test cases for new reloc type
4014 2006-07-18 Nick Kledzik <kledzik@apple.com>
4016 src/MachOReaderRelocatable.hpp: suppress warning about dwarf info parsing for one benign no-op case
4017 the compiler emits when there are not functions in the __text section
4020 2006-07-17 Nick Kledzik <kledzik@apple.com>
4022 <rdar://problem/4634840> faster debug note generation
4023 src/ld.cpp: rework collectDebugInfo() to produce all debug notes in one pass, intead of a
4024 pass per .o file. Added timing info for collectDebugInfo() to -print_statistics
4025 unit-tests/test-cases/dwarf-debug-notes-r/Makefile: add expliced -arch to ld -r
4026 unit-tests/test-cases/dwarf-debug-notes-r/expected-stabs: alter for new debug notes order
4029 2006-07-17 Nick Kledzik <kledzik@apple.com>
4031 <rdar://problem/4623994> ld64 VSIZE is 1.18GB when building Finder ppc64
4032 src/ld.cpp: fixed typo in createReader() that prevented dylibs from being unmapped
4034 ----- Tagged ld64-61.1
4036 2006-07-11 Nick Kledzik <kledzik@apple.com>
4038 <rdar://problem/4622049> ld64-61: gcc DejaGnu tests failing due to -arch followed by unknown architecture name
4039 src/Options.cpp: map ppc750, ppc7400, ppc7450, and ppc970 to ppc. Improve error message
4041 2006-07-11 Nick Kledzik <kledzik@apple.com>
4043 <rdar://problem/4622769> If -arch is missing, rollover to ld_classic does not happen
4044 src/Options.h: make gotoClassicLinker() public
4045 src/ld.cpp: call gotoClassicLinker() if the inferred architecture is ppc or i386
4047 ----- Tagged ld64-61
4049 2006-06-29 Nick Kledzik <kledzik@apple.com>
4051 <rdar://problem/4606628> ld64 should be renamed to ld
4052 src/Options.cpp: exec() ld_classic if -arch ppc or -arch i386 is seen
4053 src/ld.cpp: alter version string
4054 ld64.xcodeproj/project.pbxproj: change install location to /usr/bin/ld, add symlink from /usr/bin/ld64
4055 doc/man/man1/ld.1: added
4057 ----- Tagged ld64-60
4059 2006-06-28 Nick Kledzik <kledzik@apple.com>
4061 <rdar://problem/4604539> Can't link large ppc64 program: ld64 says "bl out of range"
4062 MachOWriterExecutable.hpp: fix branch island generation to work for weak_import functions
4063 and properly chain together branch islands
4064 MachOReaderRelocatable.hpp: improve performance of huge .o file reading by sorted references
4067 2006-06-28 Nick Kledzik <kledzik@apple.com>
4069 <rdar://problem/4603454> MySQL-36 fails to build with ld64-59
4070 src/MachOReaderRelocatable.hpp: back out fix for 4585335
4071 src/MachOWriterExecutable.hpp: back out fix for 4585335
4073 2006-06-27 Nick Kledzik <kledzik@apple.com>
4075 src/MachOReaderRelocatable.hpp: handle N_GSYM without ending :G() since that is how
4076 dwarf debug notes are formed.
4078 2006-06-23 Nick Kledzik <kledzik@apple.com>
4080 <rdar://problem/4599239 objc class with no superclass causes bad undefined symbol
4081 src/MachOReaderRelocatable.hpp: handle NULL superclass in objc_class
4082 unit-tests/test-cases/relocs-objc/test.m: add case with no super class
4085 2006-06-23 Nick Kledzik <kledzik@apple.com>
4087 <rdar://problem/4313369> ld64 doesn't support variant linking -framework fw,_debug
4088 src/Options.cpp: enhance findFramework() to support suffixes
4090 ----- Tagged ld64-59
4092 2006-06-22 Nick Kledzik <kledzik@apple.com>
4094 <rdar://problem/4596726> ld64 lost DWARF debug notes
4095 src/MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
4096 unit-tests/test-cases/dwarf-debug-notes-r: added test case
4098 2006-06-21 Nick Kledzik <kledzik@apple.com>
4100 <rdar://problem/4567995> python 64-bit address miscalculation
4101 src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
4103 2006-06-21 Nick Kledzik <kledzik@apple.com>
4105 <rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
4106 src/MachOWriterExecutable.hpp: in -r mode, virtual sections should not increment address
4109 ----- Tagged ld64-58
4111 2006-06-16 Nick Kledzik <kledzik@apple.com>
4113 src/rebase.cpp: fix page alignment problem
4114 src/rebase.cpp: fix endianess problem with local non-lazy pointers
4116 2006-06-15 Nick Kledzik <kledzik@apple.com>
4118 src/rebase.cpp: fix to build in CurryWeed
4119 ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
4121 2006-06-15 Nick Kledzik <kledzik@apple.com>
4123 <rdar://problem/4495309> Support .objc_class_name_* symbols
4124 src/ObjectFile.h: Add kSymbolTableInAsAbsolute
4125 src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
4126 src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
4127 unit-tests/test-cases/objc-references: added
4129 2006-06-15 Nick Kledzik <kledzik@apple.com>
4131 <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
4132 src/MachOWriterExecutable.hpp: add section attribute for sections with code
4134 2006-06-15 Nick Kledzik <kledzik@apple.com>
4136 <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
4137 src/MachOReaderRelocatable.hpp: only special case Apple objc runtime objc classes
4139 2006-06-15 Nick Kledzik <kledzik@apple.com>
4141 <rdar://problem/4582999> x86_64: ".align" directive not honored
4142 src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
4144 2006-06-14 Nick Kledzik <kledzik@apple.com>
4146 <rdar://problem/4585335> jump table into middle of weak symbol causes error
4147 src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
4148 src/MachOWriterExecutable.hpp: do not error on absolute references to interior of weak symbols
4150 2006-06-13 Nick Kledzik <kledzik@apple.com>
4152 src/Options.cpp: allow -image_base as an alias for -seg1addr
4154 2006-06-13 Nick Kledzik <kledzik@apple.com>
4156 <rdar://problem/4585115> implement -d
4157 src/Options.h: add fMakeTentativeDefinitionsReal
4158 src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
4159 src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
4160 unit-tests/test-cases/btentative-to-real: added test case
4162 2006-06-13 Nick Kledzik <kledzik@apple.com>
4164 <rdar://problem/4584355> implement -bundle_loader
4165 src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
4166 src/Options.cpp: handle -bundle_loader
4167 src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
4168 src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
4169 src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
4170 unit-tests/test-cases/bundle_loader: added test case
4172 2006-06-12 Nick Kledzik <kledzik@apple.com>
4174 <rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
4175 src/MachOReaderDylib.hpp: in Reader::reExports() compare install path in addition to load path
4178 2006-06-10 Nick Kledzik <kledzik@apple.com>
4180 <rdar://problem/4548935> Need rebasing tool
4181 src/rebase.cpp: added
4182 unit-tests/test-cases/rebase-basic: added
4183 doc/man/man1/rebase.1: added
4184 ld64.xcodeproj/project.pbxproj: added rebase target. changed all targets to build with dwarf
4187 2006-06-10 Nick Kledzik <kledzik@apple.com>
4189 src/machochecker.cpp: add some ppc reloc sanity checking
4191 ----- Tagged ld64-57
4193 2006-06-06 Nick Kledzik <kledzik@apple.com>
4195 <rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
4196 ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
4197 unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
4199 2006-06-06 Nick Kledzik <kledzik@apple.com>
4201 <rdar://problem/4572702> -sectcreate of a 0-byte section fails
4202 MachOWriterExecutable.cpp: Don't error out on zero length segments
4203 MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
4204 there is a writable segment >4GB from base address
4206 2006-06-04 Eric Christopher <echristo@apple.com>
4210 * src/ld.cpp (createReader): Fixed error message.
4212 (resolveFrom): Ditto.
4213 (checkUndefines): Ditto.
4215 ----- Tagged ld64-56
4217 2006-05-23 Nick Kledzik <kledzik@apple.com>
4219 <rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
4220 ld.cpp: don't limit debug notes to functions starting with underscore
4222 2006-05-22 Nick Kledzik <kledzik@apple.com>
4224 <rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
4225 * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups
4227 2006-05-22 Nick Kledzik <kledzik@apple.com>
4229 <rdar://problem/4535044> remove inferring warning
4230 * ld.cpp: Remove "inferring" warning. If a link failed and now arch was specifed add which arch was
4231 inferred to error message
4233 2006-05-19 Nick Kledzik <kledzik@apple.com>
4235 <rdar://problem/4544001> ld64 does not honor -arch_multiple
4236 * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
4238 2006-05-19 Nick Kledzik <kledzik@apple.com>
4240 <rdar://problem/4555973> Support S_16BYTE_LITERALS section types
4241 * src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
4242 * src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS
4244 2006-05-19 Nick Kledzik <kledzik@apple.com>
4246 <rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
4247 * src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing
4249 ----- Tagged ld64-55
4251 2006-05-18 Nick Kledzik <kledzik@apple.com>
4253 <rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
4254 * src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64
4256 2006-05-18 Nick Kledzik <kledzik@apple.com>
4258 <rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
4259 * src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references
4261 2006-05-18 Nick Kledzik <kledzik@apple.com>
4263 <rdar://problem/4553555> ld64: .section defaults to read-only
4264 * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
4266 2006-05-18 Nick Kledzik <kledzik@apple.com>
4268 <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
4269 * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
4271 2006-05-12 Nick Kledzik <kledzik@apple.com>
4273 * src/Architectures.hpp: add x86::kAbsolute32
4274 * src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
4275 * src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind
4277 ----- Tagged ld64-54
4279 2006-05-11 Nick Kledzik <kledzik@apple.com>
4281 <rdar://problem/4545108> CF-393 failes to link for x86_64
4282 * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable
4284 2006-05-11 Nick Kledzik <kledzik@apple.com>
4286 <rdar://problem/4501434> warning arch x86_64 not found using i386
4287 * src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs
4290 2006-05-10 Nick Kledzik <kledzik@apple.com>
4292 <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
4293 * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
4296 2006-05-08 Nick Kledzik <kledzik@apple.com>
4298 <rdar://problem/3894083> Support -dead_strip
4299 * src/Options.h/cpp: implement -why_load and -why_live. Enable -dead_strip.
4300 * src/MachOReaderArchive.hpp: implement -why_load
4301 * src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
4302 * src/ld.cpp: implement dead code stripping
4303 * unit-tests/test-cases/dead_strip: added
4305 ----- Tagged ld64-53
4307 2006-05-05 Nick Kledzik <kledzik@apple.com>
4309 * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
4311 2006-05-05 Nick Kledzik <kledzik@apple.com>
4313 <rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
4314 * src/ld.cpp: for SO stabs, associate first and last atom in the SO range
4315 * src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value
4317 2006-05-05 Nick Kledzik <kledzik@apple.com>
4319 * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
4322 2006-05-02 Nick Kledzik <kledzik@apple.com>
4324 <rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
4325 * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
4326 <rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
4327 * src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
4328 is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.
4330 2006-05-02 Nick Kledzik <kledzik@apple.com>
4332 * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
4333 overlaps shared region
4335 ----- Tagged ld64-52.1
4337 2006-05-01 Nick Kledzik <kledzik@apple.com>
4339 * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
4340 the __data section too.
4342 ----- Tagged ld64-52
4344 2006-04-28 Nick Kledzik <kledzik@apple.com>
4346 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4347 * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
4349 2006-04-28 Nick Kledzik <kledzik@apple.com>
4351 <rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
4352 * src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol
4356 2006-04-21 Nick Kledzik <kledzik@apple.com>
4358 * src/Options.cpp: fix default address for ppc64 custom stack
4359 * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
4362 2006-04-14 Nick Kledzik <kledzik@apple.com>
4364 * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
4366 ----- Tagged ld64-51.1
4368 2006-04-13 Nick Kledzik <kledzik@apple.com>
4370 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4371 * src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
4372 that points to static or global symbols
4373 * src/ld.cpp: print version of ld64 in error messages
4376 ----- Tagged ld64-51
4378 2006-04-11 Nick Kledzik <kledzik@apple.com>
4380 <rdar://problem/4499168> exported symbols not properly stripped
4381 * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
4383 2006-03-31 Nick Kledzik <kledzik@apple.com>
4385 <rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
4386 * src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
4387 * src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that
4390 2006-03-31 Nick Kledzik <kledzik@apple.com>
4392 <rdar://problem/4496499> ld64 should remove generated file if link errors out
4393 * src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow
4396 ----- Tagged ld64-50
4399 2006-03-29 Nick Kledzik <kledzik@apple.com>
4401 * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
4402 * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
4404 2006-03-28 Nick Kledzik <kledzik@apple.com>
4406 * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
4408 ----- Tagged ld64-49.1
4410 2006-03-25 Nick Kledzik <kledzik@apple.com>
4412 * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
4414 ----- Tagged ld64-49
4416 2006-03-24 Nick Kledzik <kledzik@apple.com>
4418 * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
4419 <rdar://problem/4488113> ld64 is after processing bad GSYM stabs
4420 * src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it
4422 2006-03-23 Nick Kledzik <kledzik@apple.com>
4424 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
4427 2006-03-23 Nick Kledzik <kledzik@apple.com>
4429 * src/Options.cpp: change macosx-min-version to default to a per-architecture setting
4430 add warning if -pagezero_size is not page aligned
4431 * src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
4432 * src/machochecker.cpp: sanity check relocation records
4434 ----- Tagged ld64-48
4436 2006-03-21 Nick Kledzik <kledzik@apple.com>
4438 <rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
4439 * src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
4440 match it to a STAB symbol.
4442 2006-03-21 Nick Kledzik <kledzik@apple.com>
4444 <rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
4445 * src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
4446 * src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
4447 * src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image
4449 2006-03-21 Nick Kledzik <kledzik@apple.com>
4451 <rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
4452 * unit-tests/test-cases/filelist: added
4453 * src/Options.cpp: in Options::loadFileList() handle comma option
4456 ----- Tagged ld64-47.1
4459 ----- Tagged ld64-47
4462 ----- Tagged ld64-46
4464 2006-03-10 Nick Kledzik <kledzik@apple.com>
4466 <rdar://problem/4419505> ld64 should figure out architecture from .o files
4467 * unit-tests/test-cases/auto-arch: added
4468 * src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
4469 * src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
4470 * src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
4471 * src/Options.cpp: stop defaulting to ppc64
4474 2006-03-09 Nick Kledzik <kledzik@apple.com>
4476 <rdar://problem/4465004> Need "intentionally left blank" dylib stubs
4477 * unit-tests/include/common.makefile: add VALID_ARCHS
4478 * unit-tests/run-all-unit-tests: set up VALID_ARCHS
4479 * unit-tests/test-cases/blank-stubs: add test case
4480 * src/ld.cpp: in addDylib(), detect and ignore blank stubs
4481 * src/MachOReaderDylib.hpp: in constructor, handle blank stubs
4483 2006-03-09 Nick Kledzik <kledzik@apple.com>
4485 <rdar://problem/4471424> crash in stub with 2GB pagezero
4486 * src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used
4488 2006-03-06 Nick Kledzik <kledzik@apple.com>
4490 * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
4492 ----- Tagged ld64-45
4495 2006-03-06 Nick Kledzik <kledzik@apple.com>
4497 <rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
4498 * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion
4501 ----- Tagged ld64-44
4503 2006-03-04 Nick Kledzik <kledzik@apple.com>
4505 * src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
4506 Error out if .o file contains old __DWARFA style dwarf.
4508 2006-03-02 Nick Kledzik <kledzik@apple.com>
4510 * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
4512 ----- Tagged ld64-43
4515 2006-03-02 Nick Kledzik <kledzik@apple.com>
4517 * src/MachOReaderRelocatable.hpp: <rdar://problem/4464370> tighten detection of anonymous non-lazy-pointer
4519 ----- Tagged ld64-42
4521 2006-02-28 Nick Kledzik <kledzik@apple.com>
4523 * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment
4525 2006-02-28 Nick Kledzik <kledzik@apple.com>
4527 <rdar://problem/4461240> SWB: ld64-37 (can't resolve symbol ___dso_handle)
4528 * src/MachOWriterExecutable.hpp: add class DsoHandleAtom
4530 2006-02-28 Nick Kledzik <kledzik@apple.com>
4532 * unit-tests/test-cases/literals-coalesce-alignment: added test case
4533 * src/ld.cpp: when coalescing strings pick one with greater alignment
4534 <rdar://problem/4458660> ld64: CG link failed because lo14 reference to anonymous non-lazy-pointer not aligned
4535 * unit-tests/test-cases/relocs-c/test.c: tweak to fail like 4458660
4536 * src/MachOReaderRelocatable.hpp: detect anonymous non-lazy-pointer and transform into real non-lazy-pointers
4538 ----- Tagged ld64-41
4540 2006-02-24 Nick Kledzik <kledzik@apple.com>
4542 * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options.
4545 ----- Tagged ld64-40
4547 2006-02-24 Nick Kledzik <kledzik@apple.com>
4549 <rdar://problem/4454698> Leopard9A113: ppc64 libstdc++.dylib initializer crashes in pthread_once
4550 * unit-tests/test-cases/multiple-entry-points: added
4551 * src/MachOReaderRelocatable.hpp: make sure that if there are multiple symbols with the same
4552 address, that we properly make zero length atoms for all but last symbol
4554 2006-02-24 Nick Kledzik <kledzik@apple.com>
4556 * src/Options.cpp: <rdar://problem/4456093> ld64 doesn't realpath(3) B&I tracing paths
4558 2006-02-24 Nick Kledzik <kledzik@apple.com>
4560 * src/Options.cpp: <rdar://problem/4457078> 9A110: ld64 can't deal with section names >16 chars
4562 2006-02-23 Nick Kledzik <kledzik@apple.com>
4564 * src/MachOWriterExecutable.hpp: use vector.reserve() to minimize re-allocations
4565 * src/Options.cpp: use vector.reserve() to minimize re-allocations
4566 * src/MachOReaderRelocatable.hpp: use vector.reserve() to minimize re-allocations
4567 * src/MachOReaderDylib.hpp: use vector.reserve() to minimize re-allocations
4568 * src/ld.cpp: use vector.reserve() to minimize re-allocations
4570 2006-02-23 Nick Kledzik <kledzik@apple.com>
4572 <rdar://problem/4455927> ld64 creates corrupt executables (and has malloc errors) with -headerpad option
4573 * src/MachOWriterExecutable.hpp: Change LoadCommandsPaddingAtom<A>::setSize() to update fLargestAtomSize
4574 * unit-tests/test-cases/header-pad: added
4576 2006-02-23 Nick Kledzik <kledzik@apple.com>
4578 <rdar://problem/4455192> ld64 creates invalid static executables
4579 * src/MachOWriterExecutable.hpp: Change MachHeaderAtom<A>::copyRawContent() to create correct header
4580 for static executables. Change SymbolTableLoadCommandsAtom to skip LC_DYSYMTAB for static executables
4581 * src/machochecker.cpp: Add tests that static executables are well formed
4582 * unit-tests/test-cases/static-executable: added
4584 2006-02-22 Nick Kledzik <kledzik@apple.com>
4586 * src/Options.cpp: <rdar://problem/4453468> chnage printf on unknown arg to a throw
4588 ----- Tagged ld64-39
4590 2006-02-20 Nick Kledzik <kledzik@apple.com>
4592 * unit-tests/test-cases/read-only-relocs: added new test case
4593 * src/MachOWriterExecutable.hpp: <rdar://problem/4448922> detect and error on relocs in read-only sections
4594 * src/MachOReaderRelocatable.hpp: fix parsing of i386 absolute addressing relocs
4596 2006-02-20 Nick Kledzik <kledzik@apple.com>
4598 * unit-tests/test-cases/stabs-coalesce: added new test case
4599 * src/ld.cpp.hpp: <rdar://problem/4449226> in collectStabs removed unused stabs
4601 ----- Tagged ld64-38
4603 2006-02-17 Nick Kledzik <kledzik@apple.com>
4605 * src/MachOWriterExecutable.hpp: <rdar://problem/4434578> set correct n_sect field of stabs
4607 2006-02-15 Nick Kledzik <kledzik@apple.com>
4609 * src/MachOReaderArchive.hpp: <rdar://problem/4441920> with -all_load skip over both kinds of SYMDEFs
4610 * unit-tests/test-cases/archive-basic/Makefile: add -all_load test case
4612 ----- Tagged ld64-37
4614 2006-02-13 Eric Christopher <echristo@apple.com>
4616 * src/MachOWriterExecutable.hpp (assignFileOffsets): Simplify. Add comments.
4619 2006-02-13 Nick Kledzik <kledzik@apple.com>
4621 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceRelocatable() fix kPCRel32 for external case
4623 2006-02-13 Nick Kledzik <kledzik@apple.com>
4625 * unit-tests/test-cases/zero-fill: added
4626 * src/machochecker.cpp: check that S_ZEROFILL have no file offset
4627 * src/MachOWriterExecutable.hpp: rework assignFileOffsets() to fix rdar://problem/4441145
4629 2006-02-12 Nick Kledzik <kledzik@apple.com>
4631 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440880> fix use of first zero-length c-string in .o file
4633 2006-02-12 Nick Kledzik <kledzik@apple.com>
4635 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440905> fix uninitialized fAlignment
4637 2006-02-12 Nick Kledzik <kledzik@apple.com>
4639 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add pointer-diff cases
4640 * src/Architectures.hpp: make size explicit in ppc/ppc64 kPointerDiff
4641 * src/MachOReaderRelocatable.hpp: don't allow kPointerDiff64 for ppc (just ppc64)
4642 * src/MachOWriterExecutable.cpp: set proper r_length for ld -r of kPointerDiff
4644 ----- Tagged ld64-36
4646 2006-02-08 Nick Kledzik <kledzik@apple.com>
4648 * src/MachOReaderRelocatable.cpp: rdar://problem/4438677 Handle when a .o file dwarf line info entries but no functions
4650 2006-02-08 Nick Kledzik <kledzik@apple.com>
4652 * src/MachOWriterExecutable.cpp: Properly set address of first TEXT section
4653 Keep S_COALESCED attribute for __eh_frame
4655 2006-02-08 Nick Kledzik <kledzik@apple.com>
4657 * src/ld.cpp: Temporarily turn allowable client errors into warnings
4658 * unit-tests/test-cases/allowable-clientMakefile: Temporarily let warnings be ok for above
4659 * src/MachOWriterExecutable.hpp: fix ld -r to not use external relocations for symbols make static
4661 2006-02-08 Nick Kledzik <kledzik@apple.com>
4663 * src/ld.cpp: A sibling in an umbrella can always link with its other siblings
4664 * unit-tests/test-cases/allowable-client: add test case for above
4666 2006-02-08 Nick Kledzik <kledzik@apple.com>
4668 * src/MachOReaderRelocatable.hpp: support LOCAL non-lazy pointers to hidden symbols
4669 * src/machochecker.cpp: verify indirect symbol table
4670 * unit-tests/test-cases/private-non-lazy: added test case
4672 2006-02-07 Nick Kledzik <kledzik@apple.com>
4674 * src/MachOWriterExecutable.hpp: fix calculation of file offsets in ld -r mode
4675 * src/machochecker.cpp: verify segment file offsets are within file
4677 ----- Tagged ld64-35
4679 2006-02-06 Nick Kledzik <kledzik@apple.com>
4681 * ld.cpp: allow parent of sub-framework to link
4682 * unit-tests/test-cases/allowable-client/Makefile: added cases for parent and clients of parent
4684 2006-02-04 Nick Kledzik <kledzik@apple.com>
4686 * unit-tests/test-cases/relocs-c/test.c: added some array cases
4687 * src/MachOReaderRelocatable.hpp: factor out makeReferenceToEH()
4688 * src/MachOWriterExecutable.hpp: add initial support for non-lazy pointer synthesis
4690 ----- Tagged ld64-34
4692 2006-02-04 Nick Kledzik <kledzik@apple.com>
4694 * src/ld.cpp: <rdar://problem/4432917> fix -no_arch_warnings
4695 <rdar://problem/4432932> fix -undefined warning
4696 Do BINCL/EINCL optimization for gfull stabs
4697 Implement "essential symbols" for stabs (-Sp)
4698 Fix allowable clients to only test on direct libraries
4699 * src/MachOReaderRelocatable.hpp: support BINCL/EINCL stabs
4701 2006-02-03 Nick Kledzik <kledzik@apple.com>
4703 * src/machochecker.cpp: add code to check load command alignment
4704 * src/MachOWriterExecutable.hpp: make load command alignment depend on architecture
4706 2006-02-03 Nick Kledzik <kledzik@apple.com>
4708 * unit-tests/test-cases/literals-coalesce: added
4709 * src/MachOReaderRelocatable.hpp: assure all targets of low14 ppc relocs are at least 4-byte alignmented
4711 ----- Tagged ld64-33
4713 2006-02-02 Nick Kledzik <kledzik@apple.com>
4715 * src/MachOReaderRelocatable.hpp: properly coalesce 8-byte literals
4716 * src/MachOWriterExecutable.hpp: support ppc64::kPointerDiff32
4718 ----- Tagged ld64-32
4720 2006-02-02 Nick Kledzik <kledzik@apple.com>
4722 * src/MachOReaderRelocatable.hpp: support anonymous zero fill atoms
4724 2006-02-02 Nick Kledzik <kledzik@apple.com>
4726 * src/ld.cpp: A weak definition is good enough, do not search archives for a non-weak one
4727 * unit-tests/test-cases/archive-weak: add test case for above
4728 * src/MachOReaderRelocatable.hpp: an atom should never have a by-name reference to itself
4729 * src/Options.cpp: prevent .eh symbols from being exported via a -exported_symbols_list
4731 2006-02-01 Nick Kledzik <kledzik@apple.com>
4733 * src/MachOReaderRelocatable.hpp: Support -macosx_version_min 10.5
4735 2006-02-01 Nick Kledzik <kledzik@apple.com>
4737 * src/MachOReaderRelocatable.hpp: don't try to parse debug_line dwarf if no symboled atoms
4739 ----- Tagged ld64-31
4741 2006-02-01 Eric Christopher <echristo@apple.com>
4743 * unit-tests/test-cases/allow-stack-execute/Makefile: Move otool handling...
4744 * unit-tests/include/common.makefile: ... here.
4745 * unit-tests/bin/fail-if-stdin.pl: New.
4746 * unit-tests/test-cases/no-uuid: Ditto.
4747 * src/ld.cpp (Linker::) Add fCreateUUID.
4748 (::Linker): Initialize.
4749 (::collectStabs): Use. Set if dwarf or we have a UUID already.
4750 (::writeOutput): Pass as argument to Writer::write along with option.
4751 * src/Options.h (Option::emitUUID): Declare.
4752 (Option::fEmitUUID): Ditto.
4753 * src/Options.cpp (Option::emitUUID): New.
4754 (parse): Handle -no_uuid.
4755 * src/MachOReaderRelocatable (Reader::Reader): Handle LC_UUID.
4756 * src/ExecutableFile.h (Writer::Write): Add createUUID boolean.
4757 * src/MachOWriterExecutable: Add UUID forward declaration.
4759 (UUIDLoadCommandAtom): Emit LC_UUID if fEmit. New function emit. Size
4761 (Writer::writer): Add handle for LC_UUID. If createUUID emit LC_UUID.
4762 (MachHeaderAtom::copyRawContent): Don't count a load command if its size is
4764 (UUIDLoadCommandAtom::copyRawContent): Depend on fEmit.
4767 2006-01-31 Nick Kledzik <kledzik@apple.com>
4769 * unit-tests/test-cases/dwarf-debug-notes : Added
4770 * src/ld.cpp: don't generate debug note for .eh symbols
4771 * src/MachOReaderRelocatable.hpp: make dwarf line info to atom matching faster and better
4773 2006-01-31 Nick Kledzik <kledzik@apple.com>
4775 * ld64.xcodeproj/project.pbxproj : Make buildable on Leopard
4776 * src/MachOFileAbstraction.hpp: make buildable without latest cctools headers
4778 2006-01-31 Nick Kledzik <kledzik@apple.com>
4780 * src/MachOReaderRelocatable.hpp: better error message for bad relocs
4781 * src/ObjectDump.cpp: add emacs tab settings
4782 * src/SectCreate.h: ditto
4783 * src/SectCreate.cpp: ditto
4784 * src/machochecker.cpp: ditto
4785 * src/ExecutableFile.h: ditto
4787 2006-01-30 Eric Christopher <echristo@apple.com>
4789 * src/ExecutableFile.h: Indent.
4791 2006-01-30 Nick Kledzik <kledzik@apple.com>
4793 * src/MachOReaderRelocatable.hpp: performance improvements
4794 * src/ld.cpp: now that stubs are synthesized in write, don't need to special case anymore
4796 2006-01-30 Nick Kledzik <kledzik@apple.com>
4798 * src/MachOReaderRelocatable.hpp: fix parsing of pcc relocs
4799 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add test case for above
4801 2006-01-29 Nick Kledzik <kledzik@apple.com>
4803 * unit-tests/test-cases/weak_import: added test case
4804 * src/ld.cpp: move code for weak_import mismatch to writer
4805 * src/ObjectFile.h: remove ImportWeakness methods
4806 * src/MachOReaderDylib.hpp: ditto
4807 * src/SectCreate.cpp: ditto
4808 * src/Architectures.hpp: add new ReferenceKinds for weak_imports
4809 * src/MachOReaderRelocatable.hpp: implement new ReferenceKinds
4810 * src/MachOWriterExecutable.hpp: handle new ReferenceKinds and weak_import mismatches
4812 2006-01-29 Nick Kledzik <kledzik@apple.com>
4814 * src/Options.cpp: verify -allow_stack_execute is only used on main executables
4816 2006-01-29 Nick Kledzik <kledzik@apple.com>
4818 * src/MachOReaderRelocatable.hpp: sync with latest dwarf reader from Geoff
4819 * src/debugline.c: sync with latest dwarf reader from Geoff
4821 2006-01-27 Eric Christopher <echristo@apple.com>
4823 * src/ld.cpp (Linker::syntesizeStabs): Correct spelling. Update all uses.
4825 2006-01-27 Eric Christopher <echristo@apple.com>
4827 * src/Options.h (Options): Add hasExecutableStack, fExecutableStack.
4828 * src/Options.cpp (Options::hasExecutableStack): New.
4829 (Options::parse): Parse -allow_stack_execute.
4830 * src/MachOWriterExecutable.hpp (MachHeaderAtom::copyRawContent):
4831 Implement MH_ALLOW_STACK_EXECUTION.
4832 * unit-tests/include/common.makefile (FAIL_IF_EMPTY): New.
4833 * unit-tests/bin/fail-if-no-stdin.pl: New file.
4834 * unit-tests/test-cases/allow-stack-execute: New directory.
4836 2006-01-27 Nick Kledzik <kledzik@apple.com>
4838 * src/MachOFileAbstraction.hpp: rely on latest system headers
4839 * src/MachOWriterExecutable.hpp: fix ppc stubs.
4840 wrote new relocationNeededInFinalLinkedImage() to replace common code
4842 2006-01-27 Eric Christopher <echristo@apple.com>
4844 * src/ld.cpp (logTraceInfo): New.
4845 (Linker::addArchive): Use.
4846 (Linker::addDylib): Ditto.
4847 * src/ObjectFile (ReaderOptions::fTraceOutputFile): New.
4848 * src/MachOReaderArchive.hpp (Reader::Reader): Move trace
4849 logging to Linker::addArchive.
4850 * src/Options.cpp (parsePreCommandLineEnvironment): Check
4851 LD_PRINT_FILE if tracing dylibs or archives.
4853 2006-01-26 Nick Kledzik <kledzik@apple.com>
4855 * src/MachOWriterExecutable.hpp: handle NULL strings in SO debug notes
4857 2006-01-26 Nick Kledzik <kledzik@apple.com>
4859 * src/MachOWriterExecutable.hpp: fix header padding calculation and thread state
4861 2006-01-26 Nick Kledzik <kledzik@apple.com>
4863 Rewrite all stabs processing.
4864 Move sythesize of debug notes into ld.cpp
4866 2006-01-26 Nick Kledzik <kledzik@apple.com>
4868 * src/MachOWriterExecutable.hpp: fix ppc and ppc64 stub relocs
4870 2006-01-25 Nick Kledzik <kledzik@apple.com>
4872 * ld64.xcodeproj/project.pbxproj: special case building in Curry
4874 2006-01-25 Nick Kledzik <kledzik@apple.com>
4876 * src/MachOWriterExecutable.hpp: fix bugs in stub/lazy-pointer synthesis
4878 2006-01-24 Eric Christopher <echristo@apple.com>
4880 * src/ld.cpp (Linker::createReaders): Change logging title to XBS.
4881 (Linker::addDylib): Ditto.
4882 * src/MachOReaderArchive.hpp (Reader::Reader): Ditto.
4883 * src/Options.h (fPrintOptions): New.
4884 * src/Options.cpp (Options::Options): Initialize above.
4885 (Options::checkForFile): Change logging title to XBS.
4886 (Options::findFramework): Ditto.
4887 (Options::parse): Add log for options.
4888 (Options::parsePreCommandLineEnvironmentSettings): Add LD_TRACE_ARCHIVES,
4889 LD_TRACE_DYLIBS, and LD_PRINT_OPTIONS.
4891 2006-01-24 Nick Kledzik <kledzik@apple.com>
4893 * src/MachOReaderRelocatable.hpp: better C++ eh parsing
4895 2006-01-23 Eric Christopher <echristo@apple.com>
4897 * unit-tests/bin/fail-if-exit-zero.pl: New.
4898 * unit-tests/include/common.makefile (FAIL_IF_SUCCESS): Use.
4899 * unit-tests/allowable-client: New test.
4900 * src/ld.cpp (Linker::addDylib): Check allowable clients before adding dylib.
4901 * src/Options.h (allowableClients): New.
4902 (clientName): Ditto.
4903 (fAllowableClients): Ditto.
4904 (fClientName): Ditto.
4905 * src/Options.cpp: Implement above.
4906 (parse): Handle -allowable_client and -client_name.
4907 * src/MachOReaderDylib.hpp (getAllowableClients): New.
4908 (fAllowableClients): Ditto.
4909 (Reader): Process LC_SUB_CLIENT load command.
4910 * src/ObjectFile.h (parentUmbrella): New.
4911 (getAllowableClients): New.
4912 * src/MachOWriterExecutable.hpp (AllowableClientLoadCommandsAtom): New.
4914 2006-01-23 Nick Kledzik <kledzik@apple.com>
4916 * unit-tests/test-cases/archive-basic: added
4917 * src/ld.cpp: fix shadowed local variable
4918 * src/FileAbstraction.hpp: <rdar://problem/4417372> ld64 shouldn't inline when building debug
4920 2006-01-23 Nick Kledzik <kledzik@apple.com>
4922 * src/ld.cpp: fix symbol not found error message
4923 * src/MachOReaderDylib.hpp: add logging to hash table
4924 * src/MachOReaderRelocatable.hpp: enable stabs processing. Handle static functions with stubs
4925 handle labeled cstrings.
4926 * src/MachOWriterExecutable.hpp: properly suppress atoms not in symbol table. fix low14 error check.
4928 * unit-tests/test-cases/relocs-literals/test.c: add more interesting edge cases
4930 2006-01-17 Nick Kledzik <kledzik@apple.com>
4932 * src/MachOReaderRelocatable.hpp: tweaks to synthesizing debug notes
4934 2006-01-16 Nick Kledzik <kledzik@apple.com>
4936 * src/debugline.{sh}: added
4937 * src/MachOReaderRelocatable.hpp: synthesize debug notes SOL from dwarf
4938 * src/MachOWriterExecutable.hpp: fix lazy pointer section
4939 * src/ObjectDump.hpp: Fix conditionalization
4940 * unit-tests/test-cases/dwarf-strip: added
4942 2006-01-11 Nick Kledzik <kledzik@apple.com>
4944 * src/MachOReaderRelocatable.hpp: support Tiger crt1.o build with old ld64
4945 * src/ObjectDump.hpp: Support -arch option
4947 2006-01-10 Nick Kledzik <kledzik@apple.com>
4949 * src/MachOWriterExecutable.hpp: fix stubs for ppc64
4950 * src/MachOFileAbstraction.hpp: fix typo for macho_routines
4951 * ld64.xcodeproj/project.pbxproj: add machochecker target
4952 * src/machochecker.cpp: new skeleton for checking mach-o file bit
4953 * unit-tests/: Add support for running machochecker
4955 2006-01-10 Nick Kledzik <kledzik@apple.com>
4957 * src/MachOReaderRelocatable.hpp: warn if dwarf can't be parsed
4958 * src/MachOReaderArchive.hpp: modTime for OSO stabs from archives is .a modTime
4960 2006-01-09 Nick Kledzik <kledzik@apple.com>
4962 * track modification time of .o files so that sythesized OSO stab will have it
4964 2006-01-09 Nick Kledzik <kledzik@apple.com>
4966 * src/MachOFileAbstraction.hpp: add macho_uuid_command
4967 * src/MachOWriterExecutable.cpp: add UUID load command to generated files
4969 2006-01-09 Nick Kledzik <kledzik@apple.com>
4971 * src/MachOReaderDylib.hpp: no longer keep dylib memory mapped
4972 * src/ld.cpp: don't track dylib sizes because they are not longer memory mapped
4974 2006-01-05 Nick Kledzik <kledzik@apple.com>
4976 * src/MachOReaderRelocatable.hpp: support new relocations
4978 2006-01-05 Nick Kledzik <kledzik@apple.com>
4980 * src/MachOReaderDylib.hpp: support MH_DYLIB_STUB
4981 * src/MachOReaderRelocatable.hpp: Add Geoff's comp unit extractor
4983 2006-01-05 Nick Kledzik <kledzik@apple.com>
4985 refactor: transform Atom::dontStripName() to getSymbolTableInclusion()
4986 * src/ld.cpp: pass dyld_stub_binding_helper to writer
4987 * src/MachOReaderRelocatable.hpp: update synthesized stabs
4988 Ignore stubs and lazy pointers in .o files
4989 Support initializers and terminators
4990 * src/MachOWriterExecutable.hpp: synthesize stubs and lazy pointers as needed
4991 * ld64.xcodeproj/project.pbxproj: change Release target to build with dwarf
4993 2006-01-03 Eric Christopher <echristo@apple.com>
4995 * src/Options.h (multipleDefinitionsInDylibs): Declare.
4996 (overridingDefinitionInDependentDylib): Ditto.
4997 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
4998 (multiplyDefined): Remove.
4999 (multiplyDefinedUnused): Ditto.
5000 (fMultiplyDefined): Ditto.
5001 (fWarnOnMultiplyDefined): New.
5002 (fMultiplyDefinedDynamic): Ditto.
5003 * src/Options.cpp (Options::Options): Initialize above.
5004 (overridingDefinitionInDependentDylib): New.
5005 (multipleDefinitionsInDylibs): Ditto.
5006 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
5007 (parse): Update comments. Fix parsing of -y option.
5008 Update error message for -dead_strip. Parse above
5011 2006-01-02 Nick Kledzik <kledzik@apple.com>
5013 * Refactor: move Atom::writeContent() to Writer
5015 2005-12-23 Nick Kledzik <kledzik@apple.com>
5017 * Reworked, simplify, and document test harness
5018 * unit-tests/README: Added
5020 2005-12-23 Nick Kledzik <kledzik@apple.com>
5022 * src/MachOReaderRelocatable.hpp: fixes for Objective-C
5023 * unit-tests/test-cases/relocs-objc: Added
5025 2005-12-22 Nick Kledzik <kledzik@apple.com>
5027 * src/MachOReaderRelocatable.hpp: fix check that next reloc is pair
5028 * src/MachOReaderRelocatable.hpp: Add code to synthesize essential stabs from dwarf
5030 2005-12-21 Nick Kledzik <kledzik@apple.com>
5032 * src/MachOReaderRelocatable.hpp: Fix parsing of literal sections
5033 * src/MachOWriterExecutable.hpp: Fix writing of literal sections
5034 * unit-tests/test-cases/relocs-literals: Added
5036 2005-12-15 Eric Christopher <echristo@apple.com>
5038 * src/Options.h (enum Treatment): New.
5039 (enum PICTreatment): Delete.
5040 (enum VersionMin): New.
5042 (macosxVersionMin): Ditto.
5043 (multiplyDefined): Ditto.
5044 (multiplyDefinedUnused): Ditto.
5045 (setVersionMin): Ditto.
5046 (setPICTreatment): Delete.
5047 (setReadOnlyRelocTreatment): Ditto.
5048 (picTreatment): Adjust return type.
5049 (parseTreatment): New.
5051 (fVersionMin): Ditto.
5052 (fPICTreatment): Change type.
5053 (fMultiplyDefined): New.
5054 (fMultiplyDefinedUnused): Ditto.
5055 (fLimitUndefinedSymbols): Ditto.
5057 * src/Options.cpp: Fix whitespace. Add comments on options.
5058 (Options::Options): Add initializers for new variables.
5059 (Options::prebind): New.
5060 (Options::macosxVersionMin): Ditto.
5061 (Options::parseTreatment): Ditto.
5062 (Options::setVersionMin): Ditto.
5063 (Options::setReadOnlyRelocTreatment): Delete.
5064 (Options::setPICTreatment): Ditto.
5065 (Options::Parse): Update for above. Add comments.
5067 2005-12-15 Nick Kledzik <kledzik@apple.com>
5069 * src/MachOReaderRelocatable.hpp: Add comments about dwarf
5071 2005-12-14 Nick Kledzik <kledzik@apple.com>
5073 * src/ELFFileAbstraction.hpp: Added
5074 * src/ELFReaderRelocatable.hpp: Added
5075 * Lot of fixes for new architecture
5076 * Added __OPEN_SOURCE__ to "Preprocessor Macros" to disable new architecture support by default
5078 2005-12-13 Nick Kledzik <kledzik@apple.com>
5080 * src/MachOReaderRelocatable.hpp: check for S_ATTR_DEBUG and ignore those sections
5081 * unit-tests/test-cases/dwarf-ignore: added
5083 2005-12-12 Nick Kledzik <kledzik@apple.com>
5085 * Added test harness and three initial tests:
5086 relocs-asm, relocs-c, and hello-world
5088 2005-12-12 Nick Kledzik <kledzik@apple.com>
5090 * src/MachOReaderRelocatable.hpp: Massive refactoring:
5091 Now there are three Atom classes, Chopping into Atoms
5092 is done on label boundaries or by knowledge of special
5093 sections, Share lots of ppc/ppc64 code.
5094 Stabs process code is temporarily disabled.
5096 2005-12-12 Nick Kledzik <kledzik@apple.com>
5098 * src/ObjectDump.cpp: Add command line options: -no_content, -stabs, -no_sort
5100 2005-12-11 Eric Christopher <echristo@apple.com>
5102 * src/Options.cpp: Reformat.
5103 * src/Options.h: Ditto.
5105 2005-12-07 Eric Christopher <echristo@apple.com>
5107 * src/MachOReaderRelocatable.hpp (Atom::getAlignment):
5108 When calculating alignment of an Atom, take into account
5109 the alignment from which we pulled the Atom.
5111 2005-12-06 Nick Kledzik <kledzik@apple.com>
5113 * src/Options.cpp src/Options.h: Add design comments
5115 2005-12-05 Eric Christopher <echristo@apple.com>
5117 * src/ld.cpp (Linker::createWriter): Uncomment ppc64 and
5120 2005-12-05 Eric Christopher <echristo@apple.com>
5122 * ChangeLog: New file.
5124 2005-12-02 Nick Kledzik <kledzik@apple.com>
5126 * src/ObjectFile.h: Add design comments
5128 2005-11-30 Nick Kledzik <kledzik@apple.com>
5130 * Fix uses of __OPEN_SOURCE__
5132 2005-11-28 Nick Kledzik <kledzik@apple.com>
5134 * Refactor Atom to use getDefinitionKind()
5136 2005-11-21 Nick Kledzik <kledzik@apple.com>
5138 * src/MachOWriterExecutable.hpp: don't generate section for commons in -r mode
5140 2005-11-18 Nick Kledzik <kledzik@apple.com>
5144 2005-11-18 Nick Kledzik <kledzik@apple.com>
5146 * src/ObjectDump.cpp: make work with command line arguments
5148 2005-11-18 Nick Kledzik <kledzik@apple.com>
5150 * Massive rework to remove preprocessor conditionals and use templates
5152 2005-11-14 Nick Kledzik <kledzik@apple.com>
5154 * Created new Subversion repository for ld64 from cvs tag ld64-27.2