]> git.saurik.com Git - apple/ld64.git/blame - ChangeLog
ld64-97.14.tar.gz
[apple/ld64.git] / ChangeLog
CommitLineData
d696c285 1
d9246299
A
2----- Tagged ld64-97.14
3
42010-04-20 Nick Kledzik <kledzik@apple.com>
5
6 <rdar://problem/7712869> if last section is zero-fill don't add size to filesize total in -r mode
7
8----- Tagged ld64-97.13
9
102010-03-17 Nick Kledzik <kledzik@apple.com>
11
12 <rdar://problem/7824112> Support for iPhoneSimulator with OBJC 2.0 ABI
13
14
15----- Tagged ld64-97.12
16
172010-03-17 Nick Kledzik <kledzik@apple.com>
18
19 <rdar://problem/7712869> if last section is zero-fill don't add size to filesize total in -r mode
20
21----- Tagged ld64-97.11
22
232010-01-26 Nick Kledzik <kledzik@apple.com>
24
25 <rdar://problem/7622634> Libc-624.1 causes latent ld bug
26 * build linker -no_pie
27
28
29----- Tagged ld64-97.10
30
312010-01-26 Nick Kledzik <kledzik@apple.com>
32
33 <rdar://problem/7556912> LC_SEGMENT command 0 filesize field greater than vmsize field
34 * Move __DATA to end in -r mode
35
36
372010-01-26 Nick Kledzik <kledzik@apple.com>
38
39 <rdar://problem/7516793> symboled __ustring strings of just 0x0000 mis-parsed
40 * Parse __ustring section based on content - not just labels
41
42
43----- Tagged ld64-97.9
44
452010-01-14 Nick Kledzik <kledzik@apple.com>
46
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
49
50
512010-01-11 Nick Kledzik <kledzik@apple.com>
52
53 * fix ARM -r -d references to tentative definitions
54
55----- Tagged ld64-97.8
56
572009-12-08 Nick Kledzik <kledzik@apple.com>
58
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
61
62
63----- Tagged ld64-97.7
64
652009-11-30 Nick Kledzik <kledzik@apple.com>
66
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*"
69
70
71----- Tagged ld64-97.6
72
732009-11-06 Nick Kledzik <kledzik@apple.com>
74
75 <rdar://problem/7332627> make -pie default for x86_64 for 10.7 and later
76
77
782009-10-28 Nick Kledzik <kledzik@apple.com>
79
80 <rdar://problem/7331635> Add a -no_pie flag
81 * support -no_pie and LD_NO_PIE
82
83
84----- Tagged ld64-97.5
85
862009-10-27 Nick Kledzik <kledzik@apple.com>
87
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
90
91
92----- Tagged ld64-97.4
93
942009-10-21 Nick Kledzik <kledzik@apple.com>
95
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
98
99
100----- Tagged ld64-97.3
101
1022009-10-06 Nick Kledzik <kledzik@apple.com>
103
104 * Add missing LittleEndian::set32() in arm::kPointerDiff
105
1062009-10-05 Nick Kledzik <kledzik@apple.com>
107
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
112
113
c211e7c9
A
114----- Tagged ld64-97.2
115
1162009-09-25 Nick Kledzik <kledzik@apple.com>
117
118 <rdar://problem/7200658> 'unknown DWARF EH encoding' message logged to console with clang-50
119
120
121----- Tagged ld64-97.1
122
1232009-07-28 Nick Kledzik <kledzik@apple.com>
124
125 <rdar://problem/7099040> make better no-PIC branch island to thumb1
126 * Add kBranchIslandNoPicToThumb1 as 8-byte no-PIC island
127
128
1292009-07-20 Nick Kledzik <kledzik@apple.com>
130
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
135
136
137----- Tagged ld64-97
138
1392009-07-13 Nick Kledzik <kledzik@apple.com>
140
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
143
144
1452009-07-09 Nick Kledzik <kledzik@apple.com>
146
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
149
150
1512009-07-09 Nick Kledzik <kledzik@apple.com>
152
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
156
157
1582009-07-08 Nick Kledzik <kledzik@apple.com>
159
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.
163
164
1652009-06-26 Nick Kledzik <kledzik@apple.com>
166
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
170
171
1722009-06-26 Nick Kledzik <kledzik@apple.com>
173
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.
177
178
1792009-06-25 Nick Kledzik <kledzik@apple.com>
180
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
184
185
1862009-06-25 Nick Kledzik <kledzik@apple.com>
187
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
191
192
1932009-06-24 Nick Kledzik <kledzik@apple.com>
194
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
197
198
1992009-06-24 Nick Kledzik <kledzik@apple.com>
200
201 <rdar://problem/6974647> better error message when libLTO.dylib not loadable
202 * in Linker::createReader() provide detail error messages
203
204
205----- Tagged ld64-96.10
206
2072009-08-31 Nick Kledzik <kledzik@apple.com>
208
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
211
212
213----- Tagged ld64-96.9
214
2152009-08-31 Nick Kledzik <kledzik@apple.com>
216
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
219
220 Implicitly add dyld_stub_binder to libSystem.dylib so iPhone clients can build
221 against SnowLeopard libSystem.dylib.
222
223
224----- Tagged ld64-96.8
225
2262009-08-30 Nick Kledzik <kledzik@apple.com>
227
228 <rdar://problem/7049478> SWB: gcc-5577.1 fails to build vecLib
229
230
231----- Tagged ld64-96.7
232
2332009-08-29 Nick Kledzik <kledzik@apple.com>
234
235 <rdar://problem/6933931> Linker makes subtype-zero file from empty subtype-nonzero file.
236
237
238----- Tagged ld64-96.6
239
2402009-07-30 Nick Kledzik <kledzik@apple.com>
241
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
244
4f3e367c 245
fb24a050 246----- Tagged ld64-96.5
4f3e367c 247
fb24a050 2482009-07-28 Nick Kledzik <kledzik@apple.com>
4f3e367c 249
fb24a050
A
250 <rdar://problem/7073626> Thumb mode compilation isn't working on 3.1 beta 2
251 * Fix instructions used in kBranchIslandToThumb1 case
252
253
254----- Tagged ld64-96.4
255
2562009-06-22 Nick Kledzik <kledzik@apple.com>
257
258 <rdar://problem/6992387> platform linker should use platform ld_classic
259 * Fix Options::gotoClassicLinker() to use realpath()s
260
261
2622009-06-22 Nick Kledzik <kledzik@apple.com>
263
264 * Fix Options::setIPhoneVersionMin() to handle 2.x through 9.x
265
266
267----- Tagged ld64-96.3
268
2692009-06-17 Nick Kledzik <kledzik@apple.com>
270
271 * Change section sorting so that arm and ppc stub section is immediately after __text section
272
273
2742009-06-17 Nick Kledzik <kledzik@apple.com>
275
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
278
279
280----- Tagged ld64-96.2
281
2822009-06-09 Nick Kledzik <kledzik@apple.com>
283
284 * Back out page-cross branch work around
285
286
287----- Tagged ld64-96.1
288
2892009-06-05 Nick Kledzik <kledzik@apple.com>
290
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
293
294
295----- Tagged ld64-96
296
2972009-06-04 Nick Kledzik <kledzik@apple.com>
298
299 * Darwin x86_64 static codegen is really dynamic code gen, so use LTO_CODEGEN_PIC_MODEL_DYNAMIC
300
301
3022009-06-03 Nick Kledzik <kledzik@apple.com>
303
304 <rdar://problem/6945923> use lto_codegen_set_assembler_path()
305
306
3072009-06-03 Nick Kledzik <kledzik@apple.com>
308
309 * In src/ld/LTOReader.hpp, move where -save-temps .bc file is saved to be after code model set
310
311
3122009-06-01 Nick Kledzik <kledzik@apple.com>
313
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
317
318
3192009-05-19 Nick Kledzik <kledzik@apple.com>
320
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
327
328
3292009-05-13 Nick Kledzik <kledzik@apple.com>
330
331 * ld64.xcodeproj/project.pbxproj: add warnings to dyldinfo target
332 * src/other/dyldinfo.cpp: support classic LINKEDIT format
333
334
3352009-05-12 Nick Kledzik <kledzik@apple.com>
336
337 * src/ld/MachOWriterExecutable.hpp: fix optimization to skip branch islands with ARM bl instructions
338
339
3402009-05-12 Nick Kledzik <kledzik@apple.com>
341
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
344
345
3462009-05-08 Nick Kledzik <kledzik@apple.com>
347
348 * src/ld/ld.cpp: enhance -save-temps to also write out optimized bitcode file
349
350
3512009-05-08 Nick Kledzik <kledzik@apple.com>
352
353 * src/ld/ld.cpp: fix -order_file_statistics to print each symbol not found and correct total
354
355
3562009-05-08 Nick Kledzik <kledzik@apple.com>
357
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
362
363
3642009-05-07 Nick Kledzik <kledzik@apple.com>
365
366 * src/ld/MachOWriterExecutable.hpp: put branch islands further apart if there is no thumb code
367
368
3692009-05-07 Nick Kledzik <kledzik@apple.com>
370
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
375
376
3772009-05-04 Nick Kledzik <kledzik@apple.com>
378
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
384
385
3862009-04-30 Nick Kledzik <kledzik@apple.com>
387
388 * src/ld/Options.cpp: fix custom stack base address for arm
389
390
3912009-04-30 Nick Kledzik <kledzik@apple.com>
392
393 <rdar://problem/6818272> likely incorrect warning about common symbols
394 * src/ld/Options.cpp: ignore LD_WARN_COMMONS in -r mode
395
4f3e367c 396
4be885f6 397----- Tagged ld64-95.8.3
4f3e367c 398
4be885f6 3992009-03-31 Nick Kledzik <kledzik@apple.com>
77cc3118 400
4be885f6
A
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
77cc3118
A
403
404
4be885f6 405----- Tagged ld64-95.8.2
183622f6 406
4be885f6 4072009-03-18 Nick Kledzik <kledzik@apple.com>
a61fdf0a 408
4be885f6 409 * src/ld/MachOReaderRelocatable.hpp: back out -force_cpusubtype_ALL changes
77cc3118 410
77cc3118 411
4be885f6 412----- Tagged ld64-95.8.1
77cc3118 413
4be885f6 4142009-03-17 Nick Kledzik <kledzik@apple.com>
55e3d2f6 415
4be885f6
A
416 <rdar://problem/6578416> -dead_strip inhibits weak coalescing in no_dead_strip section
417 * src/ld/ld.cpp: in markDead() remove from fLiveRootAtoms
77cc3118 418
2f2f92e4 419
4be885f6 4202009-03-17 Nick Kledzik <kledzik@apple.com>
a61fdf0a 421
4be885f6
A
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
a61fdf0a 425
55e3d2f6 426
4be885f6 427----- Tagged ld64-95.8
55e3d2f6 428
4be885f6 4292009-02-09 Nick Kledzik <kledzik@apple.com>
55e3d2f6 430
4be885f6
A
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
a61fdf0a 433
a61fdf0a 434
4be885f6 435----- Tagged ld64-95.7
a61fdf0a 436
4be885f6 4372009-02-06 Nick Kledzik <kledzik@apple.com>
a61fdf0a 438
4be885f6 439 * src/ld/ObjectFile.h: make fAddCompactUnwindEncoding false by default
a61fdf0a
A
440
441
4be885f6 4422009-02-06 Nick Kledzik <kledzik@apple.com>
a61fdf0a 443
4be885f6
A
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
55e3d2f6 449
a61fdf0a 450
4be885f6 4512009-02-05 Nick Kledzik <kledzik@apple.com>
a61fdf0a 452
4be885f6
A
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
a61fdf0a 456
55e3d2f6 457
4be885f6 4582009-01-27 Nick Kledzik <kledzik@apple.com>
55e3d2f6 459
4be885f6
A
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
a61fdf0a
A
462
463
4be885f6 464----- Tagged ld64-95.6
a61fdf0a 465
4be885f6 4662009-01-25 Nick Kledzik <kledzik@apple.com>
a61fdf0a 467
4be885f6
A
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
a61fdf0a 473
a61fdf0a 474
4be885f6 475----- Tagged ld64-95.5
a61fdf0a 476
4be885f6 4772009-01-15 Nick Kledzik <kledzik@apple.com>
a61fdf0a 478
4be885f6 479 * src/ld/MachOWriterExecutable.hpp: in hasPageCrossingBranches() ignore branches preceeded by a branch
a61fdf0a 480
a61fdf0a 481
4be885f6 482----- Tagged ld64-95.4
a61fdf0a 483
4be885f6 4842009-01-15 Nick Kledzik <kledzik@apple.com>
55e3d2f6 485
4be885f6 486 * src/ld/Options.cpp: handle -kext and -r the same for fPreventPageCrossingBranches
55e3d2f6 487
55e3d2f6 488
4be885f6 489----- Tagged ld64-95.3
55e3d2f6 490
4be885f6 4912009-01-14 Nick Kledzik <kledzik@apple.com>
55e3d2f6 492
4be885f6
A
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
55e3d2f6
A
497
498
fb24a050
A
499----- Tagged ld64-95.2.10
500
5012009-04-02 Nick Kledzik <kledzik@apple.com>
502
503 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
504 * src/ld/ld.cpp: change Section constructor to copy segment and section names
505
506
507----- Tagged ld64-95.2.9
508
5092009-04-02 Nick Kledzik <kledzik@apple.com>
510
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
513
514
515----- Tagged ld64-95.2.8
516
5172009-03-24 Nick Kledzik <kledzik@apple.com>
518
519 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
520 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
521
522
523----- Tagged ld64-95.2.7
524
5252009-03-11 Nick Kledzik <kledzik@apple.com>
526
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
531
532
5332009-03-10 Nick Kledzik <kledzik@apple.com>
534
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
539
540
5412009-03-10 Nick Kledzik <kledzik@apple.com>
542
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
546
547
548----- Tagged ld64-95.2.6
549
5502009-02-27 Nick Kledzik <kledzik@apple.com>
551
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
556
557
558----- Tagged ld64-95.2.5
559
5602009-02-24 Nick Kledzik <kledzik@apple.com>
561
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
565
566
567----- Tagged ld64-95.2.4
568
5692009-02-23 Nick Kledzik <kledzik@apple.com>
570
571 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
572
573
5742009-02-18 Nick Kledzik <kledzik@apple.com>
575
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
578
579
5802009-02-18 Nick Kledzik <kledzik@apple.com>
581
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
588
589
5902009-02-16 Nick Kledzik <kledzik@apple.com>
591
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
594
595
5962009-02-15 Nick Kledzik <kledzik@apple.com>
597
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
601
602
6032009-02-12 Nick Kledzik <kledzik@apple.com>
604
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
608
609
6102009-02-12 Nick Kledzik <kledzik@apple.com>
611
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
616
617
6182009-02-06 Nick Kledzik <kledzik@apple.com>
619
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
622
623
624----- Tagged ld64-95.2.3
625
6262009-02-04 Nick Kledzik <kledzik@apple.com>
627
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
630
631
632----- Tagged ld64-95.2.2
633
6342009-02-02 Nick Kledzik <kledzik@apple.com>
635
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
639
640
641----- Tagged ld64-95.2.1
642
643----- Tagged ld64-95.2.10
644
6452009-04-02 Nick Kledzik <kledzik@apple.com>
646
647 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
648 * src/ld/ld.cpp: change Section constructor to copy segment and section names
649
650
651----- Tagged ld64-95.2.9
652
6532009-04-02 Nick Kledzik <kledzik@apple.com>
654
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
657
658
659----- Tagged ld64-95.2.8
660
6612009-03-24 Nick Kledzik <kledzik@apple.com>
662
663 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
664 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
665
666
667----- Tagged ld64-95.2.7
668
6692009-03-11 Nick Kledzik <kledzik@apple.com>
670
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
675
676
6772009-03-10 Nick Kledzik <kledzik@apple.com>
678
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
683
684
6852009-03-10 Nick Kledzik <kledzik@apple.com>
686
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
690
691
692----- Tagged ld64-95.2.6
693
6942009-02-27 Nick Kledzik <kledzik@apple.com>
695
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
700
701
702----- Tagged ld64-95.2.5
703
7042009-02-24 Nick Kledzik <kledzik@apple.com>
705
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
709
710
711----- Tagged ld64-95.2.4
712
7132009-02-23 Nick Kledzik <kledzik@apple.com>
714
715 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
716
717
7182009-02-18 Nick Kledzik <kledzik@apple.com>
719
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
722
723
7242009-02-18 Nick Kledzik <kledzik@apple.com>
725
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
732
733
7342009-02-16 Nick Kledzik <kledzik@apple.com>
735
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
738
739
7402009-02-15 Nick Kledzik <kledzik@apple.com>
741
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
745
746
7472009-02-12 Nick Kledzik <kledzik@apple.com>
748
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
752
753
7542009-02-12 Nick Kledzik <kledzik@apple.com>
755
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
760
761
7622009-02-06 Nick Kledzik <kledzik@apple.com>
763
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
766
767
768----- Tagged ld64-95.2.3
769
7702009-02-04 Nick Kledzik <kledzik@apple.com>
771
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
774
775
776----- Tagged ld64-95.2.2
777
7782009-02-02 Nick Kledzik <kledzik@apple.com>
779
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
783
784
785----- Tagged ld64-95.2.1
786
7872009-01-29 Nick Kledzik <kledzik@apple.com>
788
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
792
793
55e3d2f6
A
794----- Tagged ld64-95.2
795
7962009-01-06 Nick Kledzik <kledzik@apple.com>
797
798 <rdar://problem/6476760> strip -S fails with "new trie is larger than original"
fb24a050
A
799 * src/other/PruneTrie.cpp: don't align trie more than original trie was aligned
800
801
802----- Tagged ld64-95.1
803
8042008-12-21 Nick Kledzik <kledzik@apple.com>
805
806 * src/ld/MachOWriterExecutable.hpp: in new linkedit format, make sure only exported symbols
807 make it into weak binding info
808
809
810----- Tagged ld64-95
811
8122008-12-18 Nick Kledzik <kledzik@apple.com>
813
814 * src/ld/Options.cpp: move check for fSharedRegionEligible until fPrebind has stabilized
815
816
8172008-12-18 Nick Kledzik <kledzik@apple.com>
818
819 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
820 * src/ld/Options.cpp: turn on compressed LINKEDIT by default
821
822
823----- Tagged ld64-94.1
824
8252008-12-16 Nick Kledzik <kledzik@apple.com>
826
827 * src/ld/Options.cpp: Fix -F handling in buildSearchPaths()
828
829
830----- Tagged ld64-94
831
8322008-12-15 Nick Kledzik <kledzik@apple.com>
833
834 * doc/man/man1/ld.1: document new options
835
836
8372008-12-15 Nick Kledzik <kledzik@apple.com>
838
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
844
845
8462008-12-15 Nick Kledzik <kledzik@apple.com>
847
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.
851
852
8532008-12-15 Nick Kledzik <kledzik@apple.com>
854
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
859
860
8612008-12-15 Nick Kledzik <kledzik@apple.com>
862
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
866
867
868----- Tagged ld64-93
869
8702008-12-11 Nick Kledzik <kledzik@apple.com>
871
872 * src/ld/ObjectFile.h: add fIPhoneVersionMin to track min iPhoneOS version
873 * src/ld/Options.cpp: use fIPhoneVersionMin
874
875
8762008-12-11 Nick Kledzik <kledzik@apple.com>
877
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
881
882
8832008-12-11 Nick Kledzik <kledzik@apple.com>
884
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
890
891
8922008-12-11 Nick Kledzik <kledzik@apple.com>
893
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
896
897
8982008-12-11 Nick Kledzik <kledzik@apple.com>
899
900 * src/ld/MachOReaderRelocatable.hpp: Fix getDescription() to work when direct reference is to anonymous atom
901
902
9032008-12-10 Nick Kledzik <kledzik@apple.com>
904
905 * src/ld/Options.cpp: enable LD_FORCE_NO_PREBIND to be used with arm
906
907
9082008-12-10 Nick Kledzik <kledzik@apple.com>
909
910 <rdar://problem/6258169> Developer tool to print the new compressed LINKEDIT information
911 * src/other/dyldinfo.cpp: fix typo in usage()
912
913
9142008-12-05 Nick Kledzik <kledzik@apple.com>
915
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
919
920
9212008-12-04 Nick Kledzik <kledzik@apple.com>
922
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
925
926
9272008-12-04 Nick Kledzik <kledzik@apple.com>
928
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
933
934
9352008-12-02 Nick Kledzik <kledzik@apple.com>
936
937 * src/ld/debugline.c: fix error handling in line_open()
938
939
9402008-11-26 Nick Kledzik <kledzik@apple.com>
941
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
945
946
9472008-11-26 Nick Kledzik <kledzik@apple.com>
948
949 * src/ld/Option.cpp: Fix how crashreporterBuffer is created to not miss some arguments
950
951
9522008-11-24 Nick Kledzik <kledzik@apple.com>
953
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
957
958
959----- Tagged ld64-92
960
9612008-11-21 Nick Kledzik <kledzik@apple.com>
962
963 * src/ld/MachOReaderDylib.hpp: if export_size is zero, no need to parse trie
964 * src/abstraction/MachOTrie.hpp: gracefully handle empty trie
965
966
9672008-11-21 Nick Kledzik <kledzik@apple.com>
968
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()
973
974
9752008-11-21 Nick Kledzik <kledzik@apple.com>
976
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
979
980
9812008-11-20 Nick Kledzik <kledzik@apple.com>
982
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
992
993
9942008-11-20 Nick Kledzik <kledzik@apple.com>
995
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()
998
999
10002008-11-19 Nick Kledzik <kledzik@apple.com>
1001
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
1008
1009
10102008-11-19 Nick Kledzik <kledzik@apple.com>
1011
1012 <rdar://problem/6378110> LTO doesn't like dtrace symbols
1013 * src/ld/LTOReader.hpp: ignore __dtrace_probe undefines in bitcode files
1014
1015
10162008-11-14 Nick Kledzik <kledzik@apple.com>
1017
1018 * src/abstraction/MachOFileAbstraction.hpp: fix to work with 10.5 headers
1019
1020
1021----- Tagged ld64-91
1022
10232008-11-07 Nick Kledzik <kledzik@apple.com>
1024
1025 Remove COMPACT_UNWIND_SUPPORT conditionalizing
1026
1027
10282008-11-06 Nick Kledzik <kledzik@apple.com>
1029
1030 Reorganize source layout. ld sources are now in "ld",
1031 and other tools are in "other".
1032
1033
10342008-11-05 Nick Kledzik <kledzik@apple.com>
1035
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
1039
1040
10412008-11-05 Nick Kledzik <kledzik@apple.com>
1042
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
1045
1046
10472008-11-05 Nick Kledzik <kledzik@apple.com>
1048
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
1054
1055
10562008-11-05 Nick Kledzik <kledzik@apple.com>
1057
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
1061
1062
10632008-11-04 Nick Kledzik <kledzik@apple.com>
1064
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
1068
1069
10702008-11-03 Nick Kledzik <kledzik@apple.com>
1071
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
1075
10762008-10-31 Devang Patel <dpatel@apple.com>
1077
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.
1081
10822008-10-30 Nick Kledzik <kledzik@apple.com>
1083
1084 * src/MachOReaderRelocatable.hpp: support all encodings in getEncodedP()
1085
1086
1087----- Tagged ld64-90
1088
10892008-10-30 Nick Kledzik <kledzik@apple.com>
1090
1091 <rdar://problem/6327584> icc has dwarf unwind info that is different than gcc
1092 * src/MachOReaderRelocatable.hpp: support more encodings in getEncodedP()
1093
1094
10952008-10-23 Nick Kledzik <kledzik@apple.com>
1096
1097 <rdar://problem/6088653> build ld64 for x86_64
1098 * ld64.xcodeproj/project.pbxproj: add X86_64 to valid archs
1099
1100
11012008-10-23 Nick Kledzik <kledzik@apple.com>
1102
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.
1105
1106
11072008-10-23 Nick Kledzik <kledzik@apple.com>
1108
1109 <rdar://problem/6273617> Linker warning not shown in the Xcode build log
1110 * src/Options.cpp: add colon to format string in warning()
1111
1112
1113----- Tagged ld64-89.3
1114
11152008-10-24 Nick Kledzik <kledzik@apple.com>
1116
1117 <rdar://problem/6317985> ld64-89 broke TOT OpenGL libProgrammability x86_64 build
1118 * src/MachOReaderRelocatable.hpp: add cast in getEncodedP()
1119
1120
1121----- Tagged ld64-89.2
1122
11232008-10-23 Nick Kledzik <kledzik@apple.com>
1124
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.
1128
1129
1130----- Tagged ld64-89.1
1131
11322008-10-22 Nick Kledzik <kledzik@apple.com>
1133
1134 * src/MachOReaderRelocatable.hpp: for x86_64 __eh_frame force direct references
1135
1136
11372008-10-21 Nick Kledzik <kledzik@apple.com>
1138
1139 * src/ObjectDump.cpp: Use getContentType() to see if content type is a cstring
1140
1141
1142----- Tagged ld64-89
1143
11442008-10-21 Nick Kledzik <kledzik@apple.com>
1145
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
1152
1153
1154----- Tagged ld64-88.1
1155
11562008-10-16 Nick Kledzik <kledzik@apple.com>
1157
1158 * src/MachOReaderRelocatable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
1159 * src/MachOWriterExecutable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
1160
1161
11622008-09-30 Nick Kledzik <kledzik@apple.com>
1163
1164 <rdar://problem/6255983> OBJC2: Reorder __DATA,__objc_* sections by writedness
1165 * src/ld.cpp: change sorting order of Sections
1166
1167
11682008-09-29 Nick Kledzik <kledzik@apple.com>
1169
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
1172
1173
1174----- Tagged ld64-88
1175
11762008-09-25 Nick Kledzik <kledzik@apple.com>
1177
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
1184
1185
11862008-09-25 Nick Kledzik <kledzik@apple.com>
1187
1188 <rdar://problem/6052546> ld invoking wrong ld_classic
1189 * src/Options.cpp: first look for ld_classic relative to ld itself
1190
1191
11922008-09-25 Nick Kledzik <kledzik@apple.com>
1193
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
1200
1201
12022008-09-25 Nick Kledzik <kledzik@apple.com>
1203
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
1213
1214
12152008-09-25 Nick Kledzik <kledzik@apple.com>
1216
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
1221
1222
12232008-09-24 Nick Kledzik <kledzik@apple.com>
1224
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()
1228
1229
12302008-09-24 Nick Kledzik <kledzik@apple.com>
1231
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
1234
1235
12362008-09-24 Nick Kledzik <kledzik@apple.com>
1237
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
1241
1242
12432008-09-24 Nick Kledzik <kledzik@apple.com>
1244
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
1247
1248
12492008-09-24 Nick Kledzik <kledzik@apple.com>
1250
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
1254
1255
12562008-09-23 Nick Kledzik <kledzik@apple.com>
1257
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
1260
1261
12622008-09-23 Nick Kledzik <kledzik@apple.com>
1263
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
1266
1267
12682008-09-23 Nick Kledzik <kledzik@apple.com>
1269
1270 * src/MachOReaderRelocatable.hpp: add warning if dwarf cannot be encoded as compact unwind
1271
1272
12732008-09-18 Nick Kledzik <kledzik@apple.com>
1274
1275 * src/LTOReader.hpp: re-enable use of lto_codegen_debug_options()
1276
1277
12782008-09-16 Nick Kledzik <kledzik@apple.com>
1279
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
1283
1284
12852008-09-10 Nick Kledzik <kledzik@apple.com>
1286
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
1289
1290
12912008-09-08 Nick Kledzik <kledzik@apple.com>
1292
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
1295
1296
12972008-09-02 Nick Kledzik <kledzik@apple.com>
1298
1299 * src/MachOReaderRelocatable.hpp: fix compact unwind personality for dyld and -slow_stubs
1300
1301
13022008-08-29 Nick Kledzik <kledzik@apple.com>
1303
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
1307
1308
13092008-08-29 Nick Kledzik <kledzik@apple.com>
1310
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
1314
1315
13162008-08-27 Nick Kledzik <kledzik@apple.com>
1317
1318 * src/Options.cpp: back out <rdar://problem/6174493>
1319
1320
1321----- Tagged ld64-87.5
1322
13232008-08-26 Nick Kledzik <kledzik@apple.com>
1324
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
1327
1328
1329----- Tagged ld64-87.4
1330
13312008-08-25 Nick Kledzik <kledzik@apple.com>
1332
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
1335
1336
13372008-08-15 Nick Kledzik <kledzik@apple.com>
1338
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
1341
1342
1343----- Tagged ld64-87.3.1
1344
13452008-09-08 Nick Kledzik <kledzik@apple.com>
1346
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
1349
1350
1351----- Tagged ld64-87.3
1352
13532008-08-09 Nick Kledzik <kledzik@apple.com>
1354
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
1360
1361----- Tagged ld64-87.2
1362
13632008-08-07 Nick Kledzik <kledzik@apple.com>
1364
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
1368
1369
1370----- Tagged ld64-87.1
1371
13722008-08-03 Nick Kledzik <kledzik@apple.com>
1373
1374 * src/LTOReader.hpp: Don't use lto_codegen_debug_options until newer libLTO.dylib is available
1375
1376
1377----- Tagged ld64-87
1378
13792008-07-21 Nick Kledzik <kledzik@apple.com>
1380
1381 * src/Options.cpp: Always set fAutoOrderInitializers=false for dyld
1382
1383
13842008-07-21 Nick Kledzik <kledzik@apple.com>
1385
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
1388
1389
13902008-07-21 Nick Kledzik <kledzik@apple.com>
1391
1392 * ld64.xcodeproj/project.pbxproj: don't allow ld to build for x86_64 until libdtrace.dylib is available
1393
1394
13952008-07-18 Nick Kledzik <kledzik@apple.com>
1396
1397 * src/MachOReaderRelocatable.hpp: don't crash if debug_line section has no line table
1398
1399
14002008-07-18 Nick Kledzik <kledzik@apple.com>
1401
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
1407
1408
14092008-07-15 Nick Kledzik <kledzik@apple.com>
1410
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
1418
14192008-07-15 Nick Kledzik <kledzik@apple.com>
1420
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
1424
1425
14262008-07-14 Nick Kledzik <kledzik@apple.com>
1427
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
1431
1432
14332008-07-11 Nick Kledzik <kledzik@apple.com>
1434
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
1437
14382008-07-10 Nick Kledzik <kledzik@apple.com>
1439
1440 * src/LTOReader.hpp: improve missing symbol error message
1441
1442
14432008-07-09 Nick Kledzik <kledzik@apple.com>
1444
1445 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
1446 * src/ld.cpp: first phase, order sections
1447
1448
14492008-07-08 Nick Kledzik <kledzik@apple.com>
1450
1451 * src/MachOReaderRelocatable.hpp: remove "coal" sections when creating a final linked image
1452
1453
14542008-07-08 Nick Kledzik <kledzik@apple.com>
1455
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
1464
1465
14662008-07-07 Nick Kledzik <kledzik@apple.com>
1467
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
1470
1471
14722008-07-03 Nick Kledzik <kledzik@apple.com>
1473
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
1476
1477
14782008-07-03 Nick Kledzik <kledzik@apple.com>
1479
1480 <rdar://problem/6016809> ld crashes when bad ppc relocs are found
1481 * src/MachOReaderRelocatable.hpp: change all missing PAIR warnings to errors
1482
1483
14842008-07-02 Nick Kledzik <kledzik@apple.com>
1485
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
1489
1490
14912008-07-02 Nick Kledzik <kledzik@apple.com>
1492
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
1496
1497
14982008-06-26 Nick Kledzik <kledzik@apple.com>
1499
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
1503
1504
1505----- Tagged ld64-86.3
1506
15072008-06-17 Nick Kledzik <kledzik@apple.com>
1508
1509 * src/ld.cpp: fix loadUndefines() to double check undefine symbol was not already loaded
1510
1511
1512----- Tagged ld64-86.2
1513
15142008-06-14 Nick Kledzik <kledzik@apple.com>
1515
1516 * srd/ld.cpp: Add NULL check in getTentativesNames()
1517
1518
1519----- Tagged ld64-86.1
1520
15212008-06-06 Nick Kledzik <kledzik@apple.com>
1522
1523 * src/MachOWriterExecutable.hpp: fix header padding calculation for dyld
1524
1525
1526----- Tagged ld64-86
1527
15282008-06-04 Nick Kledzik <kledzik@apple.com>
1529
1530 * src/LTOReader.hpp: if lto_codegen_add_module() fails, add explanation to error message
1531
1532
15332008-06-04 Nick Kledzik <kledzik@apple.com>
1534
1535 * src/ObjectFile.h: add deadAtoms parameter to optimize()
1536 * src/ld.cpp: ditto
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
1541
1542
15432008-06-04 Nick Kledzik <kledzik@apple.com>
1544
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
1548
1549
15502008-06-03 Nick Kledzik <kledzik@apple.com>
1551
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
1556
1557
15582008-06-03 Nick Kledzik <kledzik@apple.com>
1559
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
1564
1565
15662008-06-03 Nick Kledzik <kledzik@apple.com>
1567
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
1571
1572
15732008-06-02 Nick Kledzik <kledzik@apple.com>
1574
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
1580
1581
15822008-06-02 Nick Kledzik <kledzik@apple.com>
1583
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
1593
1594
15952008-06-02 Nick Kledzik <kledzik@apple.com>
1596
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
1600
1601
16022008-05-30 Nick Kledzik <kledzik@apple.com>
1603
1604 * unit-tests: fixes to build all tests with with gcc-4.2 on SnowLeopard
1605
1606
16072008-05-30 Nick Kledzik <kledzik@apple.com>
1608
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
1617
1618
16192008-05-30 Nick Kledzik <kledzik@apple.com>
1620
1621 <rdar://problem/4431008> ld should warn if passed -r and also dylibs
1622 * src/ld.cpp: check for spurious dylibs in Linker::addDylib()
1623
1624
1625----- Tagged ld64-85.6
1626
16272008-11-01 Nick Kledzik <kledzik@apple.com>
1628
1629 <rdar://problem/6254202> support increased branch range in Thumb-2
1630 * src/MachOWriterExecutable.hpp: in fixUpReferenceFinal() support new longer branch range
1631
1632
16332008-11-01 Nick Kledzik <kledzik@apple.com>
1634
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
1637
1638
1639----- Tagged ld64-85.5
1640
16412008-09-17 Nick Kledzik <kledzik@apple.com>
1642
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.
1646
1647
1648----- Tagged ld64-85.4
1649
16502008-08-11 Nick Kledzik <kledzik@apple.com>
1651
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
1654
1655----- Tagged ld64-85.3
1656
16572008-07-14 Nick Kledzik <kledzik@apple.com>
1658
1659 <rdar://problem/6060912> Prebinding busted in DTSB
1660 * src/Options.cpp: check for libstdc++.6.0.[49] in seg_addr_table
1661
1662
1663----- Tagged ld64-85.2
1664
16652008-05-06 Nick Kledzik <kledzik@apple.com>
1666
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
1669
1670
16712008-05-06 Nick Kledzik <kledzik@apple.com>
1672
1673 <rdar://problem/5914343> encryptable images may not be signable
1674 * src/MachOWriterExecutable.hpp: use minimum header padding when aligning __text section
1675
1676
1677----- Tagged ld64-85 (Xcode 3.1)
1678
16792008-04-29 Nick Kledzik <kledzik@apple.com>
1680
1681 * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
1682
1683
16842008-04-29 Nick Kledzik <kledzik@apple.com>
1685
1686 <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
1687 * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
1688
1689
16902008-04-29 Nick Kledzik <kledzik@apple.com>
1691
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
1695
1696
16972008-04-17 Nick Kledzik <kledzik@apple.com>
1698
1699 * src/MachOReaderRelocatable.hpp: better cpu subtype support
1700
1701
17022008-04-14 Nick Kledzik <kledzik@apple.com>
1703
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
1706
1707
17082008-04-10 Nick Kledzik <kledzik@apple.com>
1709
1710 * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
1711
1712
1713----- Tagged ld64-84.4
1714
17152008-04-10 Nick Kledzik <kledzik@apple.com>
1716
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
1723
1724
1725----- Tagged ld64-84.3
1726
17272008-04-09 Nick Kledzik <kledzik@apple.com>
1728
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
1732
1733
1734----- Tagged ld64-84.2
1735
17362008-04-04 Nick Kledzik <kledzik@apple.com>
1737
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
1740
1741
1742----- Tagged ld64-84.1
1743
17442008-03-28 Nick Kledzik <kledzik@apple.com>
1745
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
1750
1751
1752----- Tagged ld64-84
1753
17542008-03-28 Nick Kledzik <kledzik@apple.com>
1755
1756 * src/LTOReader.hpp: don't print lto version, if lto is unavailable
1757
1758
17592008-03-26 Nick Kledzik <kledzik@apple.com>
1760
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
1763
1764
17652008-03-26 Nick Kledzik <kledzik@apple.com>
1766
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
1773
1774
17752008-03-25 Nick Kledzik <kledzik@apple.com>
1776
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
1783
1784
17852008-03-25 Nick Kledzik <kledzik@apple.com>
1786
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
1794
1795
17962008-03-25 Nick Kledzik <kledzik@apple.com>
1797
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
1800
1801
18022008-03-24 Nick Kledzik <kledzik@apple.com>
1803
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.
1806
1807
18082008-03-21 Nick Kledzik <kledzik@apple.com>
1809
1810 * src/Options.cpp: warn if -seg1addr value is not page aligned
1811
1812
18132008-03-21 Nick Kledzik <kledzik@apple.com>
1814
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
1825
1826
1827----- Tagged ld64-83.2
1828
18292008-03-15 Nick Kledzik <kledzik@apple.com>
1830
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
1834
1835
1836----- Tagged ld64-83.1
1837
18382008-03-14 Nick Kledzik <kledzik@apple.com>
1839
1840 <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
1841 * src/Options.cpp: support -iphoneos_version_min as well
1842
1843
1844----- Tagged ld64-83
1845
18462008-03-10 Nick Kledzik <kledzik@apple.com>
1847
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
1850
1851
18522008-03-04 Nick Kledzik <kledzik@apple.com>
1853
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
1863
1864
1865----- Tagged ld64-82.7
1866
18672008-03-07 Nick Kledzik <kledzik@apple.com>
1868
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
1872
1873
1874----- Tagged ld64-82.6
1875
18762008-03-04 Nick Kledzik <kledzik@apple.com>
1877
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
1881
18822008-03-04 Nick Kledzik <kledzik@apple.com>
1883
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
1886
1887
18882008-02-29 Nick Kledzik <kledzik@apple.com>
1889
1890 <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
1891 * src/Options.cpp: only splitseg if prebound
1892
1893
18942008-02-29 Nick Kledzik <kledzik@apple.com>
1895
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
1899
1900
19012008-02-29 Nick Kledzik <kledzik@apple.com>
1902
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
1906
1907
19082008-02-25 Nick Kledzik <kledzik@apple.com>
1909
1910 <rdar://problem/5366363> ld -r -x
1911 * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
1912
1913
1914----- Tagged ld64-82.5
1915
19162008-02-12 Nick Kledzik <kledzik@apple.com>
1917
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
1921
1922
1923----- Tagged ld64-82.4
1924
19252008-02-06 Nick Kledzik <kledzik@apple.com>
1926
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
1930
1931
19322008-02-06 Devang Patel <dpatel@apple.com>
1933
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.
1940
19412008-02-05 Nick Kledzik <kledzik@apple.com>
1942
1943 * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used
1944
1945----- Tagged ld64-82.3
1946
19472008-02-04 Nick Kledzik <kledzik@apple.com>
1948
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$
1953
1954
1955----- Tagged ld64-82.2
1956
19572008-01-30 Devang Patel <dpatel@apple.com>
1958
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.
1965
1966----- Tagged ld64-82.1
1967
19682008-01-23 Nick Kledzik <kledzik@apple.com>
1969
1970 * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
1971
1972
19732008-01-22 Nick Kledzik <kledzik@apple.com>
1974
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
1979
1980
1981----- Tagged ld64-82
1982
19832008-01-18 Nick Kledzik <kledzik@apple.com>
1984
1985 <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
1986 * src/ld.cpp: fix typo in warning string
1987
1988
19892008-01-16 Nick Kledzik <kledzik@apple.com>
1990
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
1995
1996
19972008-01-16 Nick Kledzik <kledzik@apple.com>
1998
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
2001
2002
20032008-01-16 Nick Kledzik <kledzik@apple.com>
2004
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.
2008
2009
20102008-01-16 Devang Patel <dpatel@apple.com>
2011
2012 * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
2013
2014
20152008-01-16 Nick Kledzik <kledzik@apple.com>
2016
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
2021
2022
20232008-01-15 Nick Kledzik <kledzik@apple.com>
2024
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
2028
2029----- Tagged ld64-81.5
2030
20312008-01-14 Devang Patel <dpatel@apple.com>
2032
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
2035 after optimization.
2036 * src/ld.cpp: Resolve additional unbounded references after optimization.
2037
2038
20392008-01-14 Nick Kledzik <kledzik@apple.com>
2040
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
2044
2045
20462008-01-11 Nick Kledzik <kledzik@apple.com>
2047
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
2051
2052
20532008-01-11 Nick Kledzik <kledzik@apple.com>
2054
2055 * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
2056
2057
20582008-01-11 Nick Kledzik <kledzik@apple.com>
2059
2060 <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
2061 * doc/man/man1/ld.1: make meaning of "suffix" more explicit
2062
2063
20642008-01-11 Nick Kledzik <kledzik@apple.com>
2065
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
2069
2070
20712008-01-11 Nick Kledzik <kledzik@apple.com>
2072
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
2075
2076
20772008-01-11 Devang Patel <dpatel@apple.com>
2078
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
2081 visibility info.
2082
20832000-01-10 Nick Kledzik <kledzik@apple.com>
2084
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
2088
2089
20902008-01-03 Nick Kledzik <kledzik@apple.com>
2091
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
2103
2104----- Tagged ld64-81.4.1
2105
21062007-12-19 Devang Patel <dpatel@apple.com>
2107
2108 * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
2109
21102007-12-19 Devang Patel <dpatel@apple.com>
2111
2112 * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
2113
21142007-12-19 Devang Patel <dpatel@apple.com>
2115
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.
2119
21202007-12-19 Devang Patel <dpatel@apple.com>
2121
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.
2125
2126----- Tagged ld64-81.4
2127
21282007-12-18 Devang Patel <dpatel@apple.com>
2129
2130 * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
2131
2132----- Tagged ld64-81.3
2133
21342007-12-17 Nick Kledzik <kledzik@apple.com>
2135
2136 * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
2137
2138
21392007-12-17 Devang Patel <dpatel@apple.com>
2140
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.
2143
2144
21452007-12-14 Nick Kledzik <kledzik@apple.com>
2146
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
2150
2151
21522007-12-14 Devang Patel <dpatel@apple.com>
2153
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.
2159
2160
21612007-12-13 Nick Kledzik <kledzik@apple.com>
2162
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
2165
2166----- Tagged ld64-81.2
2167
2168
2169
21702007-12-07 Nick Kledzik <kledzik@apple.com>
2171
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
2177
2178
2179----- Tagged ld64-81.1
2180
21812007-12-06 Nick Kledzik <kledzik@apple.com>
2182
2183 * src/MachOReaderDylib.hpp: rework cycle detection to remove some false positives
2184
2185
21862007-12-05 Nick Kledzik <kledzik@apple.com>
2187
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
2191
2192
21932007-12-05 Nick Kledzik <kledzik@apple.com>
2194
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
2197
2198
2199----- Tagged ld64-81
2200
22012007-11-15 Nick Kledzik <kledzik@apple.com>
2202
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
2210
2211
22122007-11-08 Devang Patel <dpatel@apple.com>
2213
2214 * ld64.xcodeproj/project.pbxproj: add new build phase "build configure.h" for
2215 ld target.
2216 * src/ld.cpp: Include "configure.h"
2217
2218
2219----- Tagged ld64-80.11
2220
22212008-02-12 Nick Kledzik <kledzik@apple.com>
2222
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
2225
2226----- Tagged ld64-80.10
2227
22282008-02-11 Nick Kledzik <kledzik@apple.com>
2229
2230 <rdar://problem/5733578> ld64 does not support -aspen_version_min 2.0
2231 * src/Options.cpp: allow 2.x for -aspen_version_min
2232
2233
22342008-02-11 Nick Kledzik <kledzik@apple.com>
2235
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
2238
2239
2240----- Tagged ld64-80.9
2241
22422008-01-29 Nick Kledzik <kledzik@apple.com>
2243
2244 <rdar://problem/5713054> -iphone_version_min ==> -aspen_version_min
2245 * src/Options.cpp: support -aspen_version_min
2246
2247
2248----- Tagged ld64-80.8
2249
22502008-01-10 Nick Kledzik <kledzik@apple.com>
2251
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.
2254
2255
2256----- Tagged ld64-80.7
2257
22582008-01-02 Nick Kledzik <kledzik@apple.com>
2259
2260 <rdar://problem/5572168> BigBear5A18 isn't fully prebound
2261 * src/Options.cpp: make fNeedsModuleTable true for arm
2262
2263----- Tagged ld64-80.6
2264
22652007-11-30 Nick Kledzik <kledzik@apple.com>
2266
2267 <rdar://problem/5620976> -iphone_version_min
2268 * src/Options.cpp: handle -iphone_version_min option
2269
2270
2271----- Tagged ld64-80.5
2272
22732007-11-26 Nick Kledzik <kledzik@apple.com>
2274
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
2277
2278
2279----- Tagged ld64-80.4
2280
22812007-11-06 Nick Kledzik <kledzik@apple.com>
2282
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
2285
2286----- Tagged ld64-80.3
2287
22882007-11-03 Nick Kledzik <kledzik@apple.com>
2289
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
2292
2293----- Tagged ld64-80.2
2294
22952007-11-01 Nick Kledzik <kledzik@apple.com>
2296
2297 * src/ld.cpp: hack my own prototype for log2() until math.h is cleaned up
2298
2299
2300----- Tagged ld64-80.1
2301
23022007-11-01 Nick Kledzik <kledzik@apple.com>
2303
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
2307
2308
23092007-10-26 Nick Kledzik <kledzik@apple.com>
2310
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
2314
2315
2316----- Tagged ld64-80
2317
23182007-10-24 Nick Kledzik <kledzik@apple.com>
2319
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
2324
2325
23262007-10-24 Nick Kledzik <kledzik@apple.com>
2327
2328 * src/MachOWriterExecutable.hpp: keep old style dtrace probes externel for kernel builds
2329
2330
23312007-10-23 Nick Kledzik <kledzik@apple.com>
2332
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
2342
2343
23442007-10-23 Devang Patel <dpatel@apple.com>
2345
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.
2354
2355
23562007-10-22 Nick Kledzik <kledzik@apple.com>
2357
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
2360
2361
23622007-10-22 Nick Kledzik <kledzik@apple.com>
2363
2364 * src/Options.cpp: have -static arm code link with ld_classic (for now)
2365
2366
23672007-10-22 Nick Kledzik <kledzik@apple.com>
2368
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
2372
2373
23742007-10-19 Nick Kledzik <kledzik@apple.com>
2375
2376 * src/*: merge in arm support
2377 * unit-tests/test-cases/*: fix to work for arm and thumb
2378
2379----- Tagged ld64-79
2380
23812007-10-16 Nick Kledzik <kledzik@apple.com>
2382
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
2386
2387
23882007-10-16 Nick Kledzik <kledzik@apple.com>
2389
2390 * src/MachOWriterExecutable.hpp: fix edge case in branch island generation
2391
2392
23932007-10-12 Nick Kledzik <kledzik@apple.com>
2394
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
2399
2400
24012007-10-12 Nick Kledzik <kledzik@apple.com>
2402
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
2406
2407
24082007-10-11 Nick Kledzik <kledzik@apple.com>
2409
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
2415
2416
24172007-10-11 Nick Kledzik <kledzik@apple.com>
2418
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
2423
2424
24252007-10-10 Nick Kledzik <kledzik@apple.com>
2426
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
2430
2431
24322007-10-10 Nick Kledzik <kledzik@apple.com>
2433
2434 <rdar://problem/5504954> linker does not error when dylib ordinal exceeds 250
2435 * src/MachOWriterExecutable.hpp: error out if ordinals exceed max allowed
2436
2437
24382007-10-10 Nick Kledzik <kledzik@apple.com>
2439
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
2447
2448
24492007-10-05 Nick Kledzik <kledzik@apple.com>
2450
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
2456
2457
24582007-10-05 Nick Kledzik <kledzik@apple.com>
2459
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
2463
2464
24652007-10-05 Nick Kledzik <kledzik@apple.com>
2466
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
2471
2472
24732007-10-04 Nick Kledzik <kledzik@apple.com>
2474
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
2478
2479
24802007-10-04 Nick Kledzik <kledzik@apple.com>
2481
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
2485
2486
2487----- Tagged ld64-78
2488
24892007-09-27 Nick Kledzik <kledzik@apple.com>
2490
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
2494
2495
24962007-09-27 Nick Kledzik <kledzik@apple.com>
2497
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
2500
2501
25022007-09-27 Nick Kledzik <kledzik@apple.com>
2503
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
2507
2508
25092007-09-26 Nick Kledzik <kledzik@apple.com>
2510
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
2514
2515
25162007-09-26 Nick Kledzik <kledzik@apple.com>
2517
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
2521
2522
25232007-09-26 Nick Kledzik <kledzik@apple.com>
2524
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.
2527
2528
2529----- Tagged ld64-77 (Xcode 3.0)
2530
25312007-07-23 Nick Kledzik <kledzik@apple.com>
2532
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
2535
2536
25372007-07-20 Nick Kledzik <kledzik@apple.com>
2538
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.
2542
2543
25442007-07-20 Nick Kledzik <kledzik@apple.com>
2545
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.
2549
2550
2551----- Tagged ld64-76
2552
25532007-06-29 Nick Kledzik <kledzik@apple.com>
2554
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
2558
2559
25602007-06-27 Nick Kledzik <kledzik@apple.com>
2561
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
2570
2571
25722007-06-27 Nick Kledzik <kledzik@apple.com>
2573
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
2577
2578
25792007-06-27 Nick Kledzik <kledzik@apple.com>
2580
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
2586
2587
25882007-06-26 Nick Kledzik <kledzik@apple.com>
2589
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
2594
2595
25962007-06-26 Nick Kledzik <kledzik@apple.com>
2597
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
2600
2601
26022007-06-26 Nick Kledzik <kledzik@apple.com>
2603
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
2607
2608
2609----- Tagged ld64-75
2610
26112007-05-31 Nick Kledzik <kledzik@apple.com>
2612
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
2615
2616
2617----- Tagged ld64-74.5
2618
26192007-05-31 Nick Kledzik <kledzik@apple.com>
2620
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
2623
2624
26252007-05-30 Nick Kledzik <kledzik@apple.com>
2626
2627 <rdar://problem/5224676> BUILD_STABS now causes ld of xnu to bus error
2628 * src/ld.cpp: Change || to && in collectStabs()
2629
2630
2631----- Tagged ld64-74.4
2632
26332007-05-18 Nick Kledzik <kledzik@apple.com>
2634
2635 <rdar://problem/5211667> static probes don't work with libraries in dyld shared cache
2636 * src/OpaqueSection.hpp: the __TEXT segment is executable
2637
2638
2639----- Tagged ld64-74.3
2640
26412007-05-16 Nick Kledzik <kledzik@apple.com>
2642
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
2647
2648
26492007-05-16 Nick Kledzik <kledzik@apple.com>
2650
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
2654
2655
26562007-05-15 Nick Kledzik <kledzik@apple.com>
2657
2658 <rdar://problem/5198807> ld64 drops fix&continue bit in __OBJC, __image_info.
2659 * src/MachOReaderRelocatable.hpp: implement objcReplacementClasses()
2660
2661
26622007-05-15 Nick Kledzik <kledzik@apple.com>
2663
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
2667
2668
26692007-05-15 Nick Kledzik <kledzik@apple.com>
2670
2671 * unit-tests/include/common.makefile: set COMPILER_PATH so harness works with latest compiler
2672
2673
2674----- Tagged ld64-74.2
2675
26762007-05-11 Nick Kledzik <kledzik@apple.com>
2677
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
2680
2681
2682----- Tagged ld64-74.1
2683
26842007-05-09 Nick Kledzik <kledzik@apple.com>
2685
2686 * src/Options.h: add emitWarnings()
2687 * src/Options.cpp: wire up -w to emitWarnings()
2688
2689
26902007-05-09 Nick Kledzik <kledzik@apple.com>
2691
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
2696
2697
26982007-05-08 Nick Kledzik <kledzik@apple.com>
2699
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
2707
2708
27092007-05-03 Nick Kledzik <kledzik@apple.com>
2710
2711 <rdar://problem/5181105> typo in error message for linking -pie
2712 * src/MachOWriterExecutable.hpp: fix typo in error messages
2713
2714
2715----- Tagged ld64-74
2716
27172007-05-03 Nick Kledzik <kledzik@apple.com>
2718
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
2725
2726
27272007-05-02 Nick Kledzik <kledzik@apple.com>
2728
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
2735
2736
27372007-05-02 Nick Kledzik <kledzik@apple.com>
2738
2739 <rdar://problem/5177848> typo in message, frameowrk
2740 * src/Options.cpp: fix typo
2741
2742
27432007-05-01 Nick Kledzik <kledzik@apple.com>
2744
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
2747
2748
27492007-05-01 Nick Kledzik <kledzik@apple.com>
2750
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
2755
2756
27572007-04-30 Nick Kledzik <kledzik@apple.com>
2758
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
2761
2762
27632007-04-30 Nick Kledzik <kledzik@apple.com>
2764
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
2771
2772
27732007-04-27 Nick Kledzik <kledzik@apple.com>
2774
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
2778
2779
27802007-04-27 Nick Kledzik <kledzik@apple.com>
2781
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
2784
2785
27862007-04-25 Nick Kledzik <kledzik@apple.com>
2787
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
2793
2794
27952007-04-24 Nick Kledzik <kledzik@apple.com>
2796
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
2800
2801
28022007-04-24 Nick Kledzik <kledzik@apple.com>
2803
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
2807
2808
28092007-04-24 Nick Kledzik <kledzik@apple.com>
2810
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
2813
2814
28152007-04-24 Nick Kledzik <kledzik@apple.com>
2816
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
2819
2820
28212007-04-24 Nick Kledzik <kledzik@apple.com>
2822
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
2825
2826
2827
2828----- Tagged ld64-73.7
2829
28302007-05-10 Nick Kledzik <kledzik@apple.com>
2831
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
2835
2836
28372007-05-09 Nick Kledzik <kledzik@apple.com>
2838
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
2842
2843
2844----- Tagged ld64-73.6
2845
28462007-04-17 Nick Kledzik <kledzik@apple.com>
2847
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
2854
2855
2856----- Tagged ld64-73.5
2857
28582007-04-17 Nick Kledzik <kledzik@apple.com>
2859
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
2862
2863
28642007-04-16 Nick Kledzik <kledzik@apple.com>
2865
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
2869
2870
28712007-04-13 Nick Kledzik <kledzik@apple.com>
2872
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
2880
2881
2882----- Tagged ld64-73.4
2883
28842007-04-12 Nick Kledzik <kledzik@apple.com>
2885
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
2890
2891
2892----- Tagged ld64-73.3.1
2893
28942007-04-13 Nick Kledzik <kledzik@apple.com>
2895
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
2898
2899
2900----- Tagged ld64-73.3
2901
29022007-04-03 Nick Kledzik <kledzik@apple.com>
2903
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
2906
2907
29082007-04-02 Nick Kledzik <kledzik@apple.com>
2909
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
2914
2915
2916----- Tagged ld64-73.2
2917
29182007-03-31 Nick Kledzik <kledzik@apple.com>
2919
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
2922
29232007-03-31 Nick Kledzik <kledzik@apple.com>
2924
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
2930
2931
2932----- Tagged ld64-73.1
2933
29342007-03-30 Nick Kledzik <kledzik@apple.com>
2935
2936 * src/MachOWriterExecutable.hpp: back out use of LC_REEXPORT_DYLIB until rdar://problem/5009909 is in build fleet
2937
2938
2939----- Tagged ld64-73
2940
29412007-03-30 Nick Kledzik <kledzik@apple.com>
2942
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
2953
2954
29552007-03-30 Nick Kledzik <kledzik@apple.com>
2956
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
2959
29602007-03-30 Nick Kledzik <kledzik@apple.com>
2961
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.
2965
2966
29672007-03-29 Nick Kledzik <kledzik@apple.com>
2968
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
2984 is not in the atom.
2985
2986
29872007-03-27 Nick Kledzik <kledzik@apple.com>
2988
2989 <rdar://problem/5085863> Typo in ld man page (-exported_symbols_list)
2990 * doc/man/man1/ld.1: fix typo
2991
2992
29932007-03-26 Nick Kledzik <kledzik@apple.com>
2994
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
2999
3000
30012007-03-24 Nick Kledzik <kledzik@apple.com>
3002
3003 * src/MachOWriterExecutable.hpp: restructure writeAtoms() to copy all atoms in memory if possible
3004
3005
30062007-03-24 Nick Kledzik <kledzik@apple.com>
3007
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
3012
3013
30142007-03-23 Nick Kledzik <kledzik@apple.com>
3015
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
3019
3020
30212007-03-23 Nick Kledzik <kledzik@apple.com>
3022
3023 * src/ld.cpp: fix -print_statistics when using -dead_strip
3024
3025
30262007-03-23 Nick Kledzik <kledzik@apple.com>
3027
3028 * src/MachOReaderRelocatable.hpp: generate better names for non-lazy pointers to the interior of atoms
3029
3030
30312007-03-16 Nick Kledzik <kledzik@apple.com>
3032
3033 * src/MachOWriterExecutable.hpp: speed up ld -r a little by reversing relocs en mas
3034
3035
30362007-03-16 Nick Kledzik <kledzik@apple.com>
3037
3038 <rdar://problem/4975277> ld Bus Error on missing command line arguments
3039 * src/Options.cpp: check next argv[] is not NULL
3040
3041
30422007-03-16 Nick Kledzik <kledzik@apple.com>
3043
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
3047
3048
30492007-03-16 Nick Kledzik <kledzik@apple.com>
3050
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
3057
3058
30592007-03-16 Nick Kledzik <kledzik@apple.com>
3060
3061 <rdar://problem/4592484> Linker returns success although exported symbols are undefined.
3062 * src/ld.cpp: turn missing symbols back into an error
3063
3064
30652007-03-16 Nick Kledzik <kledzik@apple.com>
3066
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
3069
3070
30712007-03-16 Nick Kledzik <kledzik@apple.com>
3072
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
3087
3088
30892007-03-14 Nick Kledzik <kledzik@apple.com>
3090
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
3095
3096
3097----- Tagged ld64-72
3098
30992007-03-06 Nick Kledzik <kledzik@apple.com>
3100
3101 * src/Options.cpp: ignore .objc_category_name_* symbols in .exp files
3102
3103
31042007-03-06 Nick Kledzik <kledzik@apple.com>
3105
3106 * src/Options.cpp: stop special casing mach_kernel and instead requre kernel to be built with -new_linker
3107
3108
31092007-03-06 Nick Kledzik <kledzik@apple.com>
3110
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
3113
3114
31152007-03-06 Nick Kledzik <kledzik@apple.com>
3116
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
3120
3121
31222007-03-06 Nick Kledzik <kledzik@apple.com>
3123
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
3126
3127
31282007-03-06 Nick Kledzik <kledzik@apple.com>
3129
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
3133
3134
31352007-03-01 Nick Kledzik <kledzik@apple.com>
3136
3137 * doc/man/man1/ld.1: Add descriptions to all "rarely used options"
3138
3139
31402007-03-01 Nick Kledzik <kledzik@apple.com>
3141
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
3145
3146
31472007-03-01 Nick Kledzik <kledzik@apple.com>
3148
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
3154
3155
31562007-03-01 Nick Kledzik <kledzik@apple.com>
3157
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.
3177
3178
31792007-02-23 Nick Kledzik <kledzik@apple.com>
3180
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
3183
3184
31852007-02-22 Nick Kledzik <kledzik@apple.com>
3186
3187 * src/MachOWriterExecutable.hpp: rework how padding after load commands is calculated
3188
3189
31902007-02-21 Nick Kledzik <kledzik@apple.com>
3191
3192 * src/MachOWriterExecutable.hpp: extend special case of __mh_execute_header to static executables too
3193
3194
31952007-02-21 Nick Kledzik <kledzik@apple.com>
3196
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
3202
3203
32042007-02-19 Nick Kledzik <kledzik@apple.com>
3205
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
3213
3214
3215----- Tagged ld64-71.2
3216
32172007-02-13 Nick Kledzik <kledzik@apple.com>
3218
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()
3223
3224
32252007-02-13 Nick Kledzik <kledzik@apple.com>
3226
3227 <rdar://problem/4988068> i386 -stack_addr doesn't work
3228 * src/MachOWriterExecutable.hpp: use correct offset into thread state record
3229
3230
3231----- Tagged ld64-71.1
3232
32332007-02-07 Nick Kledzik <kledzik@apple.com>
3234
3235 * src/ld.cpp: sort __OBJC2 segment to be next to __OBJC segment
3236
3237
32382007-02-07 Nick Kledzik <kledzik@apple.com>
3239
3240 * src/Options.cpp: change missing -seg_addr_table from an error to a warning
3241
3242
32432007-02-06 Nick Kledzik <kledzik@apple.com>
3244
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
3251
3252
32532007-02-05 Nick Kledzik <kledzik@apple.com>
3254
3255 * src/MachOReaderDylib.hpp: don't warn about zero size __image_info sections
3256
3257
32582007-02-04 Rick Balocca <rbalocca@apple.com>
3259 Enable the failing cases for missing command line arguments
3260
32612007-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
3264
32652007-02-04 Rick Balocca <rbalocca@apple.com>
3266 Fix an endian problem with machochecker
3267 Fix blank-stubs Makefile
3268
3269----- Tagged ld64-71
3270
32712007-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
3274
32752007-02-01 Rick Balocca <rbalocca@apple.com>
3276 make cpu-sub-types test more robust
3277
32782007-02-01 Rick Balocca <rbalocca@apple.com>
3279 auto-arch tests were resulting in a false FAILs
3280
32812007-02-01 Rick Balocca <rbalocca@apple.com>
3282 test cpu-sub-types was resulting in a false FAIL
3283
32842007-02-01 Nick Kledzik <kledzik@apple.com>
3285
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
3288
32892007-02-01 Nick Kledzik <kledzik@apple.com>
3290
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
3293
32942007-01-31 Nick Kledzik <kledzik@apple.com>
3295
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
3299
3300----- Tagged ld64-70.1
3301
33022007-01-31 Nick Kledzik <kledzik@apple.com>
3303
3304 * src/MachOWriterExecutable.hpp: in addObjectRelocs_powerpc() mask scattered r_address to 16-bits
3305
3306----- Tagged ld64-70
3307
3308
33092007-01-30 Nick Kledzik <kledzik@apple.com>
3310
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
3318
3319
33202007-01-28 Nick Kledzik <kledzik@apple.com>
3321
3322 src/*: remove ObjectFile::requiresFollowOnAtom() method
3323
3324
33252007-01-28 Nick Kledzik <kledzik@apple.com>
3326
3327 src/ld.cpp: enable LLVM_SUPPORT by default
3328 src/LLVMReader.hpp: don't use absolute paths for llvm headers and libraries
3329
3330
33312007-01-26 Rick Balocca <rbalocca@apple.com>
3332 * src/ObjectDump.cpp: The usage() message was incorrect.
3333
3334
33352007-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.
3338
3339
33402007-01-24 Nick Kledzik <kledzik@apple.com>
3341
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
3346
3347
33482007-01-19 Nick Kledzik <kledzik@apple.com>
3349
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
3353
3354
33552007-01-16 Eric Christopher <echristo@apple.com>
3356
3357 <rdar://problem/4856341> ld64 --help isn't recognized
3358 * src/Options.cpp (Options::parse): Support --help and -help.
3359
3360
33612007-01-15 Nick Kledzik <kledzik@apple.com>
3362
3363 * src/MachOFileAbstraction.hpp: add range checking on macho_scattered_relocation_info::set_r_address()
3364
3365
33662007-01-14 Nick Kledzik <kledzik@apple.com>
3367
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
3373
3374
33752007-01-10 Nick Kledzik <kledzik@apple.com>
3376
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
3383
3384
3385----- Tagged ld64-69.8
3386
33872007-01-30 Nick Kledzik <kledzik@apple.com>
3388
3389 <rdar://problem/4964508> Support LD_FORCE_NO_SEG_ADDR_TABLE
3390 * src/Options.cpp: Support LD_FORCE_NO_SEG_ADDR_TABLE
3391
3392
3393----- Tagged ld64-69.7
3394
33952007-01-25 Nick Kledzik <kledzik@apple.com>
3396
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()
3399
3400
3401----- Tagged ld64-69.6
3402
34032007-01-24 Nick Kledzik <kledzik@apple.com>
3404
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()
3407
3408
3409----- Tagged ld64-69.5
3410
34112007-01-22 Nick Kledzik <kledzik@apple.com>
3412
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
3415
3416
3417----- Tagged ld64-69.4
3418
34192007-01-17 Nick Kledzik <kledzik@apple.com>
3420
3421 <rdar://problem/4925645> QTComponents does not link with ld64
3422 * src/MachOReaderRelocatable.hpp: handle N_RSYM and N_PSYM stabs
3423
3424
3425----- Tagged ld64-69.3
3426
34272007-01-03 Nick Kledzik <kledzik@apple.com>
3428
3429 * src/Options.cpp: If the same dylib is specified twice and the second is specified weak, make it weak
3430
3431
3432----- Tagged ld64-69.2
3433
34342006-12-18 Nick Kledzik <kledzik@apple.com>
3435
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
3439
3440
34412006-12-18 Nick Kledzik <kledzik@apple.com>
3442
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
3447
3448
3449----- Tagged ld64-69.1
3450
34512006-12-15 Nick Kledzik <kledzik@apple.com>
3452
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.
3456
3457
34582006-12-15 Nick Kledzik <kledzik@apple.com>
3459
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
3463
3464
3465----- Tagged ld64-69
3466
34672006-12-13 Nick Kledzik <kledzik@apple.com>
3468
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
3472
3473
34742006-12-09 Nick Kledzik <kledzik@apple.com>
3475
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
3479
3480
34812006-12-09 Nick Kledzik <kledzik@apple.com>
3482
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
3486
3487
34882006-12-08 Nick Kledzik <kledzik@apple.com>
3489
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
3492
3493
34942006-12-08 Nick Kledzik <kledzik@apple.com>
3495
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.
3500
3501----- Tagged ld64-68.3
3502
35032006-12-05 Nick Kledzik <kledzik@apple.com>
3504
3505 * src/ld.cpp: allow umbrella frameworks to have variant install names (e.g. CoreServices_profile) and still link
3506
3507
3508----- Tagged ld64-68.2
3509
35102006-12-05 Nick Kledzik <kledzik@apple.com>
3511
3512 * src/MachOWriterExecutable.cpp: Use N_PBUD in the symbol table for undefined symbols in prebound dylibs
3513
3514
3515----- Tagged ld64-68.1
3516
35172006-12-01 Nick Kledzik <kledzik@apple.com>
3518
3519 * src/Options.cpp: always generate module tables for 32-bit architectures so that ld_classic
3520 can link against them
3521
3522
3523----- Tagged ld64-68
3524
35252006-12-01 Nick Kledzik <kledzik@apple.com>
3526
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
3529
3530
35312006-12-01 Nick Kledzik <kledzik@apple.com>
3532
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
3536
3537
35382006-11-29 Nick Kledzik <kledzik@apple.com>
3539
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
3543
3544
35452006-11-28 Nick Kledzik <kledzik@apple.com>
3546
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
3554
35552006-11-27 Nick Kledzik <kledzik@apple.com>
3556
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
3559
3560
3561----- Tagged ld64-67
3562
35632006-11-17 Nick Kledzik <kledzik@apple.com>
3564
3565 * src/MachOWriterExecutable.hpp: support __IMPORT segment being slide independently of __DATA segment in shared cache
3566
3567
35682006-11-16 Nick Kledzik <kledzik@apple.com>
3569
3570 <rdar://problem/4838262> 9a303: ld -filelist Bus Error
3571 * src/Options.cpp: add check that -filelist is followed by an argument
3572
3573
35742006-11-16 Nick Kledzik <kledzik@apple.com>
3575
3576 * src/MachOWriterExecutable.hpp: when building split-seg dylibs, LINKEDIT goes in read-only side
3577
3578
35792006-11-15 Nick Kledzik <kledzik@apple.com>
3580
3581 * src/MachOWriterExecutable.hpp: set proper attributes for __eh_frame in ld -r mode
3582 * unit-tests/test-cases/eh_frame: added test case
3583
3584
35852006-11-10 Nick Kledzik <kledzik@apple.com>
3586
3587 * src/MachOReaderRelocatable.hpp: redirect references to static weak stubs to the real target
3588
3589
35902006-11-09 Nick Kledzik <kledzik@apple.com>
3591
3592 * src/MachOWriterExecutable.hpp: r_address is offset from first LC_SEGMENT vmaddr - not from segment with lowest address
3593
3594
3595----- Tagged ld64-66.1
3596
35972006-11-09 Nick Kledzik <kledzik@apple.com>
3598
3599 * src/MachOWriterExecutable.hpp: initialize fModuleInfoAtom to zero
3600
3601
36022006-11-08 Nick Kledzik <kledzik@apple.com>
3603
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
3606
3607----- Tagged ld64-66
3608
36092006-11-07 Nick Kledzik <kledzik@apple.com>
3610
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
3615
3616
36172006-11-03 Nick Kledzik <kledzik@apple.com>
3618
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
3623
3624
36252006-11-02 Nick Kledzik <kledzik@apple.com>
3626
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
3629
3630
36312006-11-02 Nick Kledzik <kledzik@apple.com>
3632
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
3636
3637
3638----- Tagged ld64-65
3639
36402006-10-30 Nick Kledzik <kledzik@apple.com>
3641
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
3644
3645
36462006-10-30 Nick Kledzik <kledzik@apple.com>
3647
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
3652
3653
36542006-10-27 Nick Kledzik <kledzik@apple.com>
3655
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
3658
3659
36602006-10-26 Nick Kledzik <kledzik@apple.com>
3661
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
3664
3665
36662006-10-26 Devang Patel <dpatel@apple.com>
3667
3668 * src/LLVMReader.hpp: Supply final output file path to optimizer.
3669
36702006-10-26 Devang Patel <dpatel@apple.com>
3671
3672 * src/ObjectFile.h: Make setSection* methods virtual.
3673 * src/LLVMReader.hpp: Override setSection* methods.
3674
36752006-10-26 Devang Patel <dpatel@apple.com>
3676
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.
3680
36812006-10-26 Devang Patel <dpatel@apple.com>
3682
3683 * src/options.h, src/options.cpp: Add -save-temps command line option.
3684 * src/LLVMReader.hpp: Use saveTemps option.
3685
3686
36872006-10-26 Devang Patel <dpatel@apple.com>
3688
3689 * src/LLVMReader.hpp: Remove invalid module from memory.
3690
36912006-10-26 Devang Patel <dpatel@apple.com>
3692
3693 * src/LLVMReader.hpp: Collect symbol alignment info from LLVM optimizer.
3694
36952006-10-21 Eric Christopher <echristo@apple.com>
3696
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
3700 and pic.
3701 * unit-tests/test-cases/static-executable/Makefile: Skip for 64-bit. Add
3702 -dead_strip to command line.
3703
3704----- Tagged ld64-64.2
3705
37062006-10-19 Nick Kledzik <kledzik@apple.com>
3707
3708 * ld64.xcodeproj/project.pbxproj: stop copying LLVMReader.hpp into man1 directory
3709
3710----- Tagged ld64-64.1
3711
37122006-10-19 Nick Kledzik <kledzik@apple.com>
3713
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()
3721
3722
37232006-10-18 Eric Christopher <echristo@apple.com>
3724
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
3727 present.
3728
37292006-10-18 Nick Kledzik <kledzik@apple.com>
3730
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
3738
3739
37402006-10-06 Nick Kledzik <kledzik@apple.com>
3741
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
3745
3746----- Tagged ld64-64
3747
37482006-10-06 Nick Kledzik <kledzik@apple.com>
3749
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
3752
3753
37542006-10-06 Nick Kledzik <kledzik@apple.com>
3755
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
3758
3759
37602006-10-06 Nick Kledzik <kledzik@apple.com>
3761
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
3764
3765
37662006-10-06 Nick Kledzik <kledzik@apple.com>
3767
3768 * src/MachOReaderRelocatable.hpp: rework dwarf line parsing to fix warnings that starting
3769 showing up with gcc-5421
3770
3771
37722006-10-05 Eric Christopher <echristo@apple.com>
3773
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.
3777
37782006-10-03 Eric Christopher <echristo@apple.com>
3779
3780 * src/Options.cpp (Options::gotoClassicLinker): Use execvp
3781 to call ld_classic.
3782
37832006-10-03 Eric Christopher <echristo@apple.com>
3784
3785 * unit-tests/test-cases/tentative-to-real/Makefile: Clean up after tests.
3786
37872006-10-03 Eric Christopher <echristo@apple.com>
3788
3789 * unit-tests/include/common.makefile (VALID_ARCHS): Add x86_64.
3790 (OTOOL): Remove munging based on ARCH.
3791
37922006-09-29 Nick Kledzik <kledzik@apple.com>
3793
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
3800
3801
38022006-09-28 Nick Kledzik <kledzik@apple.com>
3803
3804 src/Options.h/.cpp: add support for -segaddr option
3805 src/MachOWriterExecutable.hpp: In Writer::assignFileOffsets(), use -segaddr info
3806
3807
38082006-09-28 Nick Kledzik <kledzik@apple.com>
3809
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
3812
3813
38142006-09-28 Devang Patel <dpatel@apple.com>
3815
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.
3820
38212006-09-27 Nick Kledzik <kledzik@apple.com>
3822
3823 ld64.xcodeproj/project.pbxproj: remove accidental install of source file into man1
3824
3825
38262006-09-25 Nick Kledzik <kledzik@apple.com>
3827
3828 src/Architectures.hpp: add kPointerDiff16 for ppc and ppc64
3829 src/MachOReaderRelocatable.hpp: support kPointerDiff16
3830 src/MachOWriterExecutable.hpp: support kPointerDiff16
3831
3832----- Tagged ld64-63.1
3833
38342006-09-22 Nick Kledzik <kledzik@apple.com>
3835
3836 src/MachOWriterExecutable.hpp: include stubs in LC_SEGMENT_SPLIT_INFO
3837
3838
38392006-09-21 Nick Kledzik <kledzik@apple.com>
3840
3841 src/Options.cpp: disable split-seg dylibs for 64-bit architectures
3842
3843
38442006-09-19 Nick Kledzik <kledzik@apple.com>
3845
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
3848
3849
38502006-09-19 Nick Kledzik <kledzik@apple.com>
3851
3852 src/MachOWriterExecutable.hpp: rework encoding of LC_SEGMENT_SPLIT_INFO
3853
3854
38552006-09-19 Nick Kledzik <kledzik@apple.com>
3856
3857 src/Options.cpp: check for -search_paths_first in first pass
3858
3859
3860----- Tagged ld64-63
3861
38622006-09-15 Nick Kledzik <kledzik@apple.com>
3863
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
3867
3868
38692006-09-15 Nick Kledzik <kledzik@apple.com>
3870
3871 src/Options.cpp: support -r -static
3872 src/MachOWriterExecutable.hpp: support -r -static an don't generate LC_DYSYMTAB
3873
3874
38752006-09-14 Nick Kledzik <kledzik@apple.com>
3876
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.
3879
3880
38812006-09-13 Nick Kledzik <kledzik@apple.com>
3882
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
3886
3887
38882006-09-12 Nick Kledzik <kledzik@apple.com>
3889
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
3894
3895
38962006-09-11 Nick Kledzik <kledzik@apple.com>
3897
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
3900
3901
39022006-09-11 Nick Kledzik <kledzik@apple.com>
3903
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()
3907
3908
39092006-09-11 Nick Kledzik <kledzik@apple.com>
3910
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
3916
3917
39182006-09-07 Nick Kledzik <kledzik@apple.com>
3919
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
3930
3931
39322006-09-01 Nick Kledzik <kledzik@apple.com>
3933
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
3939
3940
39412006-08-31 Nick Kledzik <kledzik@apple.com>
3942
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
3946
3947
39482006-08-28 Nick Kledzik <kledzik@apple.com>
3949
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
3954
3955
39562006-08-28 Nick Kledzik <kledzik@apple.com>
3957
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
3965
3966
39672006-08-25 Nick Kledzik <kledzik@apple.com>
3968
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
3973
3974----- Tagged ld64-62
3975
39762006-08-15 Nick Kledzik <kledzik@apple.com>
3977
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
3981
3982
39832006-08-15 Nick Kledzik <kledzik@apple.com>
3984
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
3992
3993
39942006-08-11 Nick Kledzik <kledzik@apple.com>
3995
3996 remove OPEN_SOURCE conditionals around x86_64 support
3997
3998
39992006-07-31 Nick Kledzik <kledzik@apple.com>
4000
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
4004
4005
40062006-07-31 Nick Kledzik <kledzik@apple.com>
4007
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
4012
4013
40142006-07-18 Nick Kledzik <kledzik@apple.com>
4015
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
4018
4019
40202006-07-17 Nick Kledzik <kledzik@apple.com>
4021
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
4027
4028
40292006-07-17 Nick Kledzik <kledzik@apple.com>
4030
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
4033
4034----- Tagged ld64-61.1
4035
40362006-07-11 Nick Kledzik <kledzik@apple.com>
4037
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
4040
40412006-07-11 Nick Kledzik <kledzik@apple.com>
4042
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
4046
4047----- Tagged ld64-61
4048
40492006-06-29 Nick Kledzik <kledzik@apple.com>
4050
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
4056
4057----- Tagged ld64-60
4058
40592006-06-28 Nick Kledzik <kledzik@apple.com>
4060
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
4065 only when done
4066
40672006-06-28 Nick Kledzik <kledzik@apple.com>
4068
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
4072
40732006-06-27 Nick Kledzik <kledzik@apple.com>
4074
4075 src/MachOReaderRelocatable.hpp: handle N_GSYM without ending :G() since that is how
4076 dwarf debug notes are formed.
4077
40782006-06-23 Nick Kledzik <kledzik@apple.com>
4079
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
4083
4084
40852006-06-23 Nick Kledzik <kledzik@apple.com>
4086
4087 <rdar://problem/4313369> ld64 doesn't support variant linking -framework fw,_debug
4088 src/Options.cpp: enhance findFramework() to support suffixes
4089
4090----- Tagged ld64-59
4091
40922006-06-22 Nick Kledzik <kledzik@apple.com>
4093
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
4097
40982006-06-21 Nick Kledzik <kledzik@apple.com>
4099
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
4102
41032006-06-21 Nick Kledzik <kledzik@apple.com>
4104
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
4107
4108
4109----- Tagged ld64-58
4110
41112006-06-16 Nick Kledzik <kledzik@apple.com>
4112
4113 src/rebase.cpp: fix page alignment problem
4114 src/rebase.cpp: fix endianess problem with local non-lazy pointers
4115
41162006-06-15 Nick Kledzik <kledzik@apple.com>
4117
4118 src/rebase.cpp: fix to build in CurryWeed
4119 ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
4120
41212006-06-15 Nick Kledzik <kledzik@apple.com>
4122
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
4128
41292006-06-15 Nick Kledzik <kledzik@apple.com>
4130
4131 <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
4132 src/MachOWriterExecutable.hpp: add section attribute for sections with code
4133
41342006-06-15 Nick Kledzik <kledzik@apple.com>
4135
4136 <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
4137 src/MachOReaderRelocatable.hpp: only special case Apple objc runtime objc classes
4138
41392006-06-15 Nick Kledzik <kledzik@apple.com>
4140
4141 <rdar://problem/4582999> x86_64: ".align" directive not honored
4142 src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
4143
41442006-06-14 Nick Kledzik <kledzik@apple.com>
4145
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
4149
41502006-06-13 Nick Kledzik <kledzik@apple.com>
4151
4152 src/Options.cpp: allow -image_base as an alias for -seg1addr
4153
41542006-06-13 Nick Kledzik <kledzik@apple.com>
4155
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
4161
41622006-06-13 Nick Kledzik <kledzik@apple.com>
4163
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
4171
41722006-06-12 Nick Kledzik <kledzik@apple.com>
4173
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
4176
4177
41782006-06-10 Nick Kledzik <kledzik@apple.com>
4179
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
4185
4186
41872006-06-10 Nick Kledzik <kledzik@apple.com>
4188
4189 src/machochecker.cpp: add some ppc reloc sanity checking
4190
4191----- Tagged ld64-57
4192
41932006-06-06 Nick Kledzik <kledzik@apple.com>
4194
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 /
4198
41992006-06-06 Nick Kledzik <kledzik@apple.com>
4200
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
4205
42062006-06-04 Eric Christopher <echristo@apple.com>
4207
4208 Radar 4560240
4209 Radar 3964999
4210 * src/ld.cpp (createReader): Fixed error message.
4211 (resolve): Ditto.
4212 (resolveFrom): Ditto.
4213 (checkUndefines): Ditto.
4214
4215----- Tagged ld64-56
4216
42172006-05-23 Nick Kledzik <kledzik@apple.com>
4218
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
4221
42222006-05-22 Nick Kledzik <kledzik@apple.com>
4223
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
4226
42272006-05-22 Nick Kledzik <kledzik@apple.com>
4228
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
4232
42332006-05-19 Nick Kledzik <kledzik@apple.com>
4234
4235 <rdar://problem/4544001> ld64 does not honor -arch_multiple
4236 * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
4237
42382006-05-19 Nick Kledzik <kledzik@apple.com>
4239
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
4243
42442006-05-19 Nick Kledzik <kledzik@apple.com>
4245
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
4248
4249----- Tagged ld64-55
4250
42512006-05-18 Nick Kledzik <kledzik@apple.com>
4252
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
4255
42562006-05-18 Nick Kledzik <kledzik@apple.com>
4257
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
4260
42612006-05-18 Nick Kledzik <kledzik@apple.com>
4262
4263 <rdar://problem/4553555> ld64: .section defaults to read-only
4264 * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
4265
42662006-05-18 Nick Kledzik <kledzik@apple.com>
4267
4268 <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
4269 * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
4270
42712006-05-12 Nick Kledzik <kledzik@apple.com>
4272
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
4276
4277----- Tagged ld64-54
4278
42792006-05-11 Nick Kledzik <kledzik@apple.com>
4280
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
4283
42842006-05-11 Nick Kledzik <kledzik@apple.com>
4285
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
4288
4289
42902006-05-10 Nick Kledzik <kledzik@apple.com>
4291
4292 <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
4293 * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
4294
4295
42962006-05-08 Nick Kledzik <kledzik@apple.com>
4297
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
4304
4305----- Tagged ld64-53
4306
43072006-05-05 Nick Kledzik <kledzik@apple.com>
4308
4309 * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
4310
43112006-05-05 Nick Kledzik <kledzik@apple.com>
4312
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
4316
43172006-05-05 Nick Kledzik <kledzik@apple.com>
4318
4319 * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
4320
4321
43222006-05-02 Nick Kledzik <kledzik@apple.com>
4323
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.
4329
43302006-05-02 Nick Kledzik <kledzik@apple.com>
4331
4332 * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
4333 overlaps shared region
4334
4335----- Tagged ld64-52.1
4336
43372006-05-01 Nick Kledzik <kledzik@apple.com>
4338
4339 * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
4340 the __data section too.
4341
4342----- Tagged ld64-52
4343
43442006-04-28 Nick Kledzik <kledzik@apple.com>
4345
4346 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
4347 * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
4348
43492006-04-28 Nick Kledzik <kledzik@apple.com>
4350
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
4353
4354
4355
43562006-04-21 Nick Kledzik <kledzik@apple.com>
4357
4358 * src/Options.cpp: fix default address for ppc64 custom stack
4359 * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
4360
4361
43622006-04-14 Nick Kledzik <kledzik@apple.com>
4363
4364 * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
4365
4366----- Tagged ld64-51.1
4367
43682006-04-13 Nick Kledzik <kledzik@apple.com>
4369
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
4374
4375
4376----- Tagged ld64-51
4377
43782006-04-11 Nick Kledzik <kledzik@apple.com>
4379
4380 <rdar://problem/4499168> exported symbols not properly stripped
4381 * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
4382
43832006-03-31 Nick Kledzik <kledzik@apple.com>
4384
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
4388
4389
43902006-03-31 Nick Kledzik <kledzik@apple.com>
4391
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
4394
4395
4396----- Tagged ld64-50
4397
4398
43992006-03-29 Nick Kledzik <kledzik@apple.com>
4400
4401 * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
4402 * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
4403
44042006-03-28 Nick Kledzik <kledzik@apple.com>
4405
4406 * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
4407
4408----- Tagged ld64-49.1
4409
44102006-03-25 Nick Kledzik <kledzik@apple.com>
4411
4412 * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
4413
4414----- Tagged ld64-49
4415
44162006-03-24 Nick Kledzik <kledzik@apple.com>
4417
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
4421
44222006-03-23 Nick Kledzik <kledzik@apple.com>
4423
4424 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
4425 external relocation
4426
44272006-03-23 Nick Kledzik <kledzik@apple.com>
4428
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
4433
4434----- Tagged ld64-48
4435
44362006-03-21 Nick Kledzik <kledzik@apple.com>
4437
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.
4441
44422006-03-21 Nick Kledzik <kledzik@apple.com>
4443
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
4448
44492006-03-21 Nick Kledzik <kledzik@apple.com>
4450
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
4454
4455
4456----- Tagged ld64-47.1
4457
4458
4459----- Tagged ld64-47
4460
4461
4462----- Tagged ld64-46
4463
44642006-03-10 Nick Kledzik <kledzik@apple.com>
4465
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
4472
4473
44742006-03-09 Nick Kledzik <kledzik@apple.com>
4475
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
4482
44832006-03-09 Nick Kledzik <kledzik@apple.com>
4484
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
4487
44882006-03-06 Nick Kledzik <kledzik@apple.com>
4489
4490 * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
4491
4492----- Tagged ld64-45
4493
4494
44952006-03-06 Nick Kledzik <kledzik@apple.com>
4496
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
4499
4500
4501----- Tagged ld64-44
4502
45032006-03-04 Nick Kledzik <kledzik@apple.com>
4504
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.
4507
45082006-03-02 Nick Kledzik <kledzik@apple.com>
4509
4510 * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
4511
4512----- Tagged ld64-43
4513
4514
45152006-03-02 Nick Kledzik <kledzik@apple.com>
4516
4517 * src/MachOReaderRelocatable.hpp: <rdar://problem/4464370> tighten detection of anonymous non-lazy-pointer
4518
4519----- Tagged ld64-42
4520
45212006-02-28 Nick Kledzik <kledzik@apple.com>
4522
4523 * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment
4524
45252006-02-28 Nick Kledzik <kledzik@apple.com>
4526
4527 <rdar://problem/4461240> SWB: ld64-37 (can't resolve symbol ___dso_handle)
4528 * src/MachOWriterExecutable.hpp: add class DsoHandleAtom
4529
45302006-02-28 Nick Kledzik <kledzik@apple.com>
4531
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
4537
4538----- Tagged ld64-41
4539
45402006-02-24 Nick Kledzik <kledzik@apple.com>
4541
4542 * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options.
4543 Fix -weak-l option.
4544
4545----- Tagged ld64-40
4546
45472006-02-24 Nick Kledzik <kledzik@apple.com>
4548
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
4553
45542006-02-24 Nick Kledzik <kledzik@apple.com>
4555
4556 * src/Options.cpp: <rdar://problem/4456093> ld64 doesn't realpath(3) B&I tracing paths
4557
45582006-02-24 Nick Kledzik <kledzik@apple.com>
4559
4560 * src/Options.cpp: <rdar://problem/4457078> 9A110: ld64 can't deal with section names >16 chars
4561
45622006-02-23 Nick Kledzik <kledzik@apple.com>
4563
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
4569
45702006-02-23 Nick Kledzik <kledzik@apple.com>
4571
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
4575
45762006-02-23 Nick Kledzik <kledzik@apple.com>
4577
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
4583
45842006-02-22 Nick Kledzik <kledzik@apple.com>
4585
4586 * src/Options.cpp: <rdar://problem/4453468> chnage printf on unknown arg to a throw
4587
4588----- Tagged ld64-39
4589
45902006-02-20 Nick Kledzik <kledzik@apple.com>
4591
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
4595
45962006-02-20 Nick Kledzik <kledzik@apple.com>
4597
4598 * unit-tests/test-cases/stabs-coalesce: added new test case
4599 * src/ld.cpp.hpp: <rdar://problem/4449226> in collectStabs removed unused stabs
4600
4601----- Tagged ld64-38
4602
46032006-02-17 Nick Kledzik <kledzik@apple.com>
4604
4605 * src/MachOWriterExecutable.hpp: <rdar://problem/4434578> set correct n_sect field of stabs
4606
46072006-02-15 Nick Kledzik <kledzik@apple.com>
4608
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
4611
4612----- Tagged ld64-37
4613
46142006-02-13 Eric Christopher <echristo@apple.com>
4615
4616 * src/MachOWriterExecutable.hpp (assignFileOffsets): Simplify. Add comments.
4617 Adjust whitespace.
4618
46192006-02-13 Nick Kledzik <kledzik@apple.com>
4620
4621 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceRelocatable() fix kPCRel32 for external case
4622
46232006-02-13 Nick Kledzik <kledzik@apple.com>
4624
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
4628
46292006-02-12 Nick Kledzik <kledzik@apple.com>
4630
4631 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440880> fix use of first zero-length c-string in .o file
4632
46332006-02-12 Nick Kledzik <kledzik@apple.com>
4634
4635 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440905> fix uninitialized fAlignment
4636
46372006-02-12 Nick Kledzik <kledzik@apple.com>
4638
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
4643
4644----- Tagged ld64-36
4645
46462006-02-08 Nick Kledzik <kledzik@apple.com>
4647
4648 * src/MachOReaderRelocatable.cpp: rdar://problem/4438677 Handle when a .o file dwarf line info entries but no functions
4649
46502006-02-08 Nick Kledzik <kledzik@apple.com>
4651
4652 * src/MachOWriterExecutable.cpp: Properly set address of first TEXT section
4653 Keep S_COALESCED attribute for __eh_frame
4654
46552006-02-08 Nick Kledzik <kledzik@apple.com>
4656
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
4660
46612006-02-08 Nick Kledzik <kledzik@apple.com>
4662
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
4665
46662006-02-08 Nick Kledzik <kledzik@apple.com>
4667
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
4671
46722006-02-07 Nick Kledzik <kledzik@apple.com>
4673
4674 * src/MachOWriterExecutable.hpp: fix calculation of file offsets in ld -r mode
4675 * src/machochecker.cpp: verify segment file offsets are within file
4676
4677----- Tagged ld64-35
4678
46792006-02-06 Nick Kledzik <kledzik@apple.com>
4680
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
4683
46842006-02-04 Nick Kledzik <kledzik@apple.com>
4685
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
4689
4690----- Tagged ld64-34
4691
46922006-02-04 Nick Kledzik <kledzik@apple.com>
4693
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
4700
47012006-02-03 Nick Kledzik <kledzik@apple.com>
4702
4703 * src/machochecker.cpp: add code to check load command alignment
4704 * src/MachOWriterExecutable.hpp: make load command alignment depend on architecture
4705
47062006-02-03 Nick Kledzik <kledzik@apple.com>
4707
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
4710
4711----- Tagged ld64-33
4712
47132006-02-02 Nick Kledzik <kledzik@apple.com>
4714
4715 * src/MachOReaderRelocatable.hpp: properly coalesce 8-byte literals
4716 * src/MachOWriterExecutable.hpp: support ppc64::kPointerDiff32
4717
4718----- Tagged ld64-32
4719
47202006-02-02 Nick Kledzik <kledzik@apple.com>
4721
4722 * src/MachOReaderRelocatable.hpp: support anonymous zero fill atoms
4723
47242006-02-02 Nick Kledzik <kledzik@apple.com>
4725
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
4730
47312006-02-01 Nick Kledzik <kledzik@apple.com>
4732
4733 * src/MachOReaderRelocatable.hpp: Support -macosx_version_min 10.5
4734
47352006-02-01 Nick Kledzik <kledzik@apple.com>
4736
4737 * src/MachOReaderRelocatable.hpp: don't try to parse debug_line dwarf if no symboled atoms
4738
4739----- Tagged ld64-31
4740
47412006-02-01 Eric Christopher <echristo@apple.com>
4742
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.
4758 (fUUIDAtom): New.
4759 (UUIDLoadCommandAtom): Emit LC_UUID if fEmit. New function emit. Size
4760 to zero at start.
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
4763 0.
4764 (UUIDLoadCommandAtom::copyRawContent): Depend on fEmit.
4765
4766
47672006-01-31 Nick Kledzik <kledzik@apple.com>
4768
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
4772
47732006-01-31 Nick Kledzik <kledzik@apple.com>
4774
4775 * ld64.xcodeproj/project.pbxproj : Make buildable on Leopard
4776 * src/MachOFileAbstraction.hpp: make buildable without latest cctools headers
4777
47782006-01-31 Nick Kledzik <kledzik@apple.com>
4779
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
4786
47872006-01-30 Eric Christopher <echristo@apple.com>
4788
4789 * src/ExecutableFile.h: Indent.
4790
47912006-01-30 Nick Kledzik <kledzik@apple.com>
4792
4793 * src/MachOReaderRelocatable.hpp: performance improvements
4794 * src/ld.cpp: now that stubs are synthesized in write, don't need to special case anymore
4795
47962006-01-30 Nick Kledzik <kledzik@apple.com>
4797
4798 * src/MachOReaderRelocatable.hpp: fix parsing of pcc relocs
4799 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add test case for above
4800
48012006-01-29 Nick Kledzik <kledzik@apple.com>
4802
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
4811
48122006-01-29 Nick Kledzik <kledzik@apple.com>
4813
4814 * src/Options.cpp: verify -allow_stack_execute is only used on main executables
4815
48162006-01-29 Nick Kledzik <kledzik@apple.com>
4817
4818 * src/MachOReaderRelocatable.hpp: sync with latest dwarf reader from Geoff
4819 * src/debugline.c: sync with latest dwarf reader from Geoff
4820
48212006-01-27 Eric Christopher <echristo@apple.com>
4822
4823 * src/ld.cpp (Linker::syntesizeStabs): Correct spelling. Update all uses.
4824
48252006-01-27 Eric Christopher <echristo@apple.com>
4826
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.
4835
48362006-01-27 Nick Kledzik <kledzik@apple.com>
4837
4838 * src/MachOFileAbstraction.hpp: rely on latest system headers
4839 * src/MachOWriterExecutable.hpp: fix ppc stubs.
4840 wrote new relocationNeededInFinalLinkedImage() to replace common code
4841
48422006-01-27 Eric Christopher <echristo@apple.com>
4843
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.
4852
48532006-01-26 Nick Kledzik <kledzik@apple.com>
4854
4855 * src/MachOWriterExecutable.hpp: handle NULL strings in SO debug notes
4856
48572006-01-26 Nick Kledzik <kledzik@apple.com>
4858
4859 * src/MachOWriterExecutable.hpp: fix header padding calculation and thread state
4860
48612006-01-26 Nick Kledzik <kledzik@apple.com>
4862
4863 Rewrite all stabs processing.
4864 Move sythesize of debug notes into ld.cpp
4865
48662006-01-26 Nick Kledzik <kledzik@apple.com>
4867
4868 * src/MachOWriterExecutable.hpp: fix ppc and ppc64 stub relocs
4869
48702006-01-25 Nick Kledzik <kledzik@apple.com>
4871
4872 * ld64.xcodeproj/project.pbxproj: special case building in Curry
4873
48742006-01-25 Nick Kledzik <kledzik@apple.com>
4875
4876 * src/MachOWriterExecutable.hpp: fix bugs in stub/lazy-pointer synthesis
4877
48782006-01-24 Eric Christopher <echristo@apple.com>
4879
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.
4890
48912006-01-24 Nick Kledzik <kledzik@apple.com>
4892
4893 * src/MachOReaderRelocatable.hpp: better C++ eh parsing
4894
48952006-01-23 Eric Christopher <echristo@apple.com>
4896
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.
4913
49142006-01-23 Nick Kledzik <kledzik@apple.com>
4915
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
4919
49202006-01-23 Nick Kledzik <kledzik@apple.com>
4921
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.
4927 add StubAtomHelper.
4928 * unit-tests/test-cases/relocs-literals/test.c: add more interesting edge cases
4929
49302006-01-17 Nick Kledzik <kledzik@apple.com>
4931
4932 * src/MachOReaderRelocatable.hpp: tweaks to synthesizing debug notes
4933
49342006-01-16 Nick Kledzik <kledzik@apple.com>
4935
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
4941
49422006-01-11 Nick Kledzik <kledzik@apple.com>
4943
4944 * src/MachOReaderRelocatable.hpp: support Tiger crt1.o build with old ld64
4945 * src/ObjectDump.hpp: Support -arch option
4946
49472006-01-10 Nick Kledzik <kledzik@apple.com>
4948
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
4954
49552006-01-10 Nick Kledzik <kledzik@apple.com>
4956
4957 * src/MachOReaderRelocatable.hpp: warn if dwarf can't be parsed
4958 * src/MachOReaderArchive.hpp: modTime for OSO stabs from archives is .a modTime
4959
49602006-01-09 Nick Kledzik <kledzik@apple.com>
4961
4962 * track modification time of .o files so that sythesized OSO stab will have it
4963
49642006-01-09 Nick Kledzik <kledzik@apple.com>
4965
4966 * src/MachOFileAbstraction.hpp: add macho_uuid_command
4967 * src/MachOWriterExecutable.cpp: add UUID load command to generated files
4968
49692006-01-09 Nick Kledzik <kledzik@apple.com>
4970
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
4973
49742006-01-05 Nick Kledzik <kledzik@apple.com>
4975
4976 * src/MachOReaderRelocatable.hpp: support new relocations
4977
49782006-01-05 Nick Kledzik <kledzik@apple.com>
4979
4980 * src/MachOReaderDylib.hpp: support MH_DYLIB_STUB
4981 * src/MachOReaderRelocatable.hpp: Add Geoff's comp unit extractor
4982
49832006-01-05 Nick Kledzik <kledzik@apple.com>
4984
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
4992
49932006-01-03 Eric Christopher <echristo@apple.com>
4994
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
5009 options.
5010
50112006-01-02 Nick Kledzik <kledzik@apple.com>
5012
5013 * Refactor: move Atom::writeContent() to Writer
5014
50152005-12-23 Nick Kledzik <kledzik@apple.com>
5016
5017 * Reworked, simplify, and document test harness
5018 * unit-tests/README: Added
5019
50202005-12-23 Nick Kledzik <kledzik@apple.com>
5021
5022 * src/MachOReaderRelocatable.hpp: fixes for Objective-C
5023 * unit-tests/test-cases/relocs-objc: Added
5024
50252005-12-22 Nick Kledzik <kledzik@apple.com>
5026
5027 * src/MachOReaderRelocatable.hpp: fix check that next reloc is pair
5028 * src/MachOReaderRelocatable.hpp: Add code to synthesize essential stabs from dwarf
5029
50302005-12-21 Nick Kledzik <kledzik@apple.com>
5031
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
5035
50362005-12-15 Eric Christopher <echristo@apple.com>
5037
5038 * src/Options.h (enum Treatment): New.
5039 (enum PICTreatment): Delete.
5040 (enum VersionMin): New.
5041 (prebind): Declare.
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.
5050 (fPrebind): Ditto.
5051 (fVersionMin): Ditto.
5052 (fPICTreatment): Change type.
5053 (fMultiplyDefined): New.
5054 (fMultiplyDefinedUnused): Ditto.
5055 (fLimitUndefinedSymbols): Ditto.
5056
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.
5066
50672005-12-15 Nick Kledzik <kledzik@apple.com>
5068
5069 * src/MachOReaderRelocatable.hpp: Add comments about dwarf
5070
50712005-12-14 Nick Kledzik <kledzik@apple.com>
5072
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
5077
50782005-12-13 Nick Kledzik <kledzik@apple.com>
5079
5080 * src/MachOReaderRelocatable.hpp: check for S_ATTR_DEBUG and ignore those sections
5081 * unit-tests/test-cases/dwarf-ignore: added
5082
50832005-12-12 Nick Kledzik <kledzik@apple.com>
5084
5085 * Added test harness and three initial tests:
5086 relocs-asm, relocs-c, and hello-world
5087
50882005-12-12 Nick Kledzik <kledzik@apple.com>
5089
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.
5095
50962005-12-12 Nick Kledzik <kledzik@apple.com>
5097
5098 * src/ObjectDump.cpp: Add command line options: -no_content, -stabs, -no_sort
5099
51002005-12-11 Eric Christopher <echristo@apple.com>
5101
5102 * src/Options.cpp: Reformat.
5103 * src/Options.h: Ditto.
5104
51052005-12-07 Eric Christopher <echristo@apple.com>
5106
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.
5110
51112005-12-06 Nick Kledzik <kledzik@apple.com>
5112
5113 * src/Options.cpp src/Options.h: Add design comments
5114
51152005-12-05 Eric Christopher <echristo@apple.com>
5116
5117 * src/ld.cpp (Linker::createWriter): Uncomment ppc64 and
5118 i386 linkers.
5119
51202005-12-05 Eric Christopher <echristo@apple.com>
5121
5122 * ChangeLog: New file.
5123
51242005-12-02 Nick Kledzik <kledzik@apple.com>
5125
5126 * src/ObjectFile.h: Add design comments
5127
51282005-11-30 Nick Kledzik <kledzik@apple.com>
5129
5130 * Fix uses of __OPEN_SOURCE__
5131
51322005-11-28 Nick Kledzik <kledzik@apple.com>
5133
5134 * Refactor Atom to use getDefinitionKind()
5135
51362005-11-21 Nick Kledzik <kledzik@apple.com>
5137
5138 * src/MachOWriterExecutable.hpp: don't generate section for commons in -r mode
5139
51402005-11-18 Nick Kledzik <kledzik@apple.com>
5141
5142 * x86 tweaks
5143
51442005-11-18 Nick Kledzik <kledzik@apple.com>
5145
5146 * src/ObjectDump.cpp: make work with command line arguments
5147
51482005-11-18 Nick Kledzik <kledzik@apple.com>
5149
5150 * Massive rework to remove preprocessor conditionals and use templates
5151
51522005-11-14 Nick Kledzik <kledzik@apple.com>
5153
5154 * Created new Subversion repository for ld64 from cvs tag ld64-27.2