]> git.saurik.com Git - apple/ld64.git/blob - ChangeLog
79dcc59fe645223c92ca61590e3d8f1ee34e4360
[apple/ld64.git] / ChangeLog
1
2 ----- Tagged ld64-95.2.12
3
4 2009-07-02 Nick Kledzik <kledzik@apple.com>
5
6 <rdar://problem/6836647> creation of __unwind_info section can fail if hundreds of functions cannot be compact encoded
7
8
9 ----- Tagged ld64-95.2.11
10
11 2009-06-19 Nick Kledzik <kledzik@apple.com>
12
13 <rdar://problem/6960981> Link Time Optimization errors out when targeting < 10.6
14
15
16 ----- Tagged ld64-95.2.10
17
18 2009-04-02 Nick Kledzik <kledzik@apple.com>
19
20 <rdar://problem/6805002> corrupt metaclass entry in dynamic library
21 * src/ld/ld.cpp: change Section constructor to copy segment and section names
22
23
24 ----- Tagged ld64-95.2.9
25
26 2009-04-02 Nick Kledzik <kledzik@apple.com>
27
28 <rdar://problem/6744267> Update ld64 for new triples introduced in 6654669 to support ARM LLVM
29 * src/ld/LTOReader.hpp: change "arm-" to "arm" so matching works for new triples
30
31
32 ----- Tagged ld64-95.2.8
33
34 2009-03-24 Nick Kledzik <kledzik@apple.com>
35
36 <rdar://problem/6713931> anonymous functions have the compact unwind info computed wrong
37 * ld/MachOReaderRelocatable.hpp: use new compact unwind function in AnonymousAtom
38
39
40 ----- Tagged ld64-95.2.7
41
42 2009-03-11 Nick Kledzik <kledzik@apple.com>
43
44 <rdar://problem/6670421> AddressBook incorrectly gets _objc_msgSend from WebKit
45 * src/ld/MachOReaderDylib.hpp: fix processIndirectLibraries() to not force a private re-export of a dylib
46 that is already explictly or implicitly linked.
47 * unit-tests/test-cases/re-export-optimizations-indirect: add test case
48
49
50 2009-03-10 Nick Kledzik <kledzik@apple.com>
51
52 <rdar://problem/6665853> dyld weak linking optimization leaves some symbols unbound
53 * src/ld/MachOWriterExecutable.hpp: be sure to create bind entry for a reference
54 to a symbol in a dylib that is a weak definition
55 * unit-tests/test-cases/coalesce_weak_def_in_dylib: add test case
56
57
58 2009-03-10 Nick Kledzik <kledzik@apple.com>
59
60 <rdar://problem/6666004> many OS i386 OS dylibs still have __IMPORT segment
61 * ld/MachOReaderRelocatable.hpp: moved where __IMPORT/__pointer is changed to __DATA/__nl_symbol_ptr
62 * unit-tests/test-cases/stripped-indirect-symbol-table: updated to test for this problem
63
64
65 ----- Tagged ld64-95.2.6
66
67 2009-02-27 Nick Kledzik <kledzik@apple.com>
68
69 <rdar://problem/6633530> ld might set MH_WEAK_DEFINES when it should not
70 * src/ld/MachOWriterExecutable.hpp: only consider atoms in fRegularDefAtomsThatOverrideADylibsWeakDef
71 that will be exported when computing MH_WEAK_DEFINES
72 * unit-tests/test-cases/operator-new: updated to reproduce issue
73
74
75 ----- Tagged ld64-95.2.5
76
77 2009-02-24 Nick Kledzik <kledzik@apple.com>
78
79 <rdar://problem/6605499> x86_64 obj-c runtime confused when static lib is stripped
80 * src/ld/MachOWriterExecutable.hpp: in setLocalNlist() don't use 'l' labels for x86_64 strings
81 * unit-tests/test-cases/objc-literal-pointers-strip: added test case
82
83
84 ----- Tagged ld64-95.2.4
85
86 2009-02-23 Nick Kledzik <kledzik@apple.com>
87
88 * src/ld/MachOReaderRelocatable.hpp: ignore ARM_THUMB_32BIT_BRANCH relocs
89
90
91 2009-02-18 Nick Kledzik <kledzik@apple.com>
92
93 <rdar://problem/6583555> Writer<A>::symbolIndex() uses a linear search and does not scale
94 * src/ld/MachOWriterExecutable.hpp: build a std::map so symbolIndex() scales better
95
96
97 2009-02-18 Nick Kledzik <kledzik@apple.com>
98
99 <rdar://problem/6312070> Use new compact encodings that handle all register permutations
100 * src/ld/Architectures.hpp: add kSectionOffset24
101 * src/ld/ObjectFile.h: add getFDE()
102 * src/ld/MachOReaderRelocatable.hpp: use new libunwind functions to get new compact encoding
103 * src/ld/MachOWriterExecutable.hpp: use new compact encoding which includes offset in dwarf if needed
104 * src/other/unwinddump.cpp: update unwinddump output to display register save set
105
106
107 2009-02-16 Nick Kledzik <kledzik@apple.com>
108
109 <rdar://problem/6511619> runtime error with bundle for 10.5 that has weak external symols
110 * src/ld/ld.cpp: fix hybrid (10.5) compressed linkedit info for data pointing to weak definitions
111
112
113 2009-02-15 Nick Kledzik <kledzik@apple.com>
114
115 <rdar://problem/6583757> i386 relocation error with negative offsets from local labels
116 * src/ld/MachOReaderRelocatable.hpp: handle when base addr of scattered relocation does not point to a label
117 * unit-tests/test-cases/relocs-neg-from-local: add test case
118
119
120 2009-02-12 Nick Kledzik <kledzik@apple.com>
121
122 <rdar://problem/6578360> -dead_strip inhibits weak coalescing in no_dead_strip section
123 * src/ld/ld.cpp: remove atoms coalesced away from fLiveRootAtoms
124 * unit-tests/test-cases/dead_strip-weak-coalesce: added test case
125
126
127 2009-02-12 Nick Kledzik <kledzik@apple.com>
128
129 <rdar://problem/6581809> x86_64 weak_import broken for initialized data
130 * src/ld/MachOReaderRelocatable.hpp: use isWeakImportSymbol() in Reader<x86_64>::addRelocReference()
131 * src/other/dyldinfo.cpp: update to display weak_import attribute
132 * unit-tests/test-cases/weak_import: updated test case
133
134
135 2009-02-06 Nick Kledzik <kledzik@apple.com>
136
137 <rdar://problem/6541812> ld parsing of __eh_frame unwind information is slow
138 * src/ld/MachOReaderRelocatable.hpp: build a std::map of all __eh_frame relocations for x86_64
139
140
141 ----- Tagged ld64-95.2.3
142
143 2009-02-04 Nick Kledzik <kledzik@apple.com>
144
145 <rdar://problem/6545406> ld: warning: can't add line info to anonymous symbol
146 * src/ld/MachOReaderRelocatable.hpp: don't warn about line info in dyld stubs
147
148
149 ----- Tagged ld64-95.2.2
150
151 2009-02-02 Nick Kledzik <kledzik@apple.com>
152
153 <rdar://problem/6548268> ld -r does not preserve the N_NO_DEAD_STRIP bit
154 * src/ld/MachOWriterExecutable.hpp: set N_NO_DEAD_STRIP based on dontDeadStrip()
155 * unit-tests/test-cases/dead_strip-r_symbol_desc: added test case
156
157
158 ----- Tagged ld64-95.2.1
159
160 2009-01-29 Nick Kledzik <kledzik@apple.com>
161
162 <rdar://problem/6535736> ld coalesces C strings in different segments
163 * src/ld/MachOReaderRelocatable.hpp: only do standard coalescing on __cstring section if is in __TEXT segment
164 * unit-tests/test-cases/cstring-alt-segment: add test case
165
166
167 2009-01-29 Nick Kledzik <kledzik@apple.com>
168
169 <rdar://problem/6532377> gcc DejaGnu failure: building longcall/dylib library
170 * src/ld/MachOWriterExecutable.hpp: if no __DATA sections insert non-lazy pointers at end of __TEXT segment
171 * unit-tests/test-cases/no-data-bundle: added test case
172
173
174 ----- Tagged ld64-95.2
175
176 2009-01-06 Nick Kledzik <kledzik@apple.com>
177
178 <rdar://problem/6476760> strip -S fails with "new trie is larger than original"
179 * src/other/PruneTrie.cpp: don't align trie more than original trie was aligned
180
181
182 ----- Tagged ld64-95.1
183
184 2008-12-21 Nick Kledzik <kledzik@apple.com>
185
186 * src/ld/MachOWriterExecutable.hpp: in new linkedit format, make sure only exported symbols
187 make it into weak binding info
188
189
190 ----- Tagged ld64-95
191
192 2008-12-18 Nick Kledzik <kledzik@apple.com>
193
194 * src/ld/Options.cpp: move check for fSharedRegionEligible until fPrebind has stabilized
195
196
197 2008-12-18 Nick Kledzik <kledzik@apple.com>
198
199 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
200 * src/ld/Options.cpp: turn on compressed LINKEDIT by default
201
202
203 ----- Tagged ld64-94.1
204
205 2008-12-16 Nick Kledzik <kledzik@apple.com>
206
207 * src/ld/Options.cpp: Fix -F handling in buildSearchPaths()
208
209
210 ----- Tagged ld64-94
211
212 2008-12-15 Nick Kledzik <kledzik@apple.com>
213
214 * doc/man/man1/ld.1: document new options
215
216
217 2008-12-15 Nick Kledzik <kledzik@apple.com>
218
219 <rdar://problem/6134468> linker should enforce all .o files have same sub-type, and ignore sub-type of dylibs
220 * doc/man/man1/ld.1: update man page about -allow_sub_type_mismatches
221 * src/ld/ld.cpp: call validFile() with new arguments
222 * src/ld/MachOReaderRelocatable.hpp: add new arguments to validFile()
223 * src/ld/Options.cpp: Support LD_ALLOW_CPU_SUBTYPE_MISMATCHES and -allow_sub_type_mismatches
224
225
226 2008-12-15 Nick Kledzik <kledzik@apple.com>
227
228 <rdar://problem/6438270> -syslibroot should skip standard search paths not in the SDK
229 * src/ld/Options.cpp: in buildSearchPaths() if an SDK is specified don't add
230 standard search paths not in the SDK.
231
232
233 2008-12-15 Nick Kledzik <kledzik@apple.com>
234
235 <rdar://problem/6406609> ld: remove "can't make compact unwind encoding" warning
236 * src/ld/ObjectFile.h: add fWarnCompactUnwind
237 * src/ld/Options.cpp: -warn_compact_unwind --> fWarnCompactUnwind
238 * src/ld/MachOReaderRelocatable.hpp: test fWarnCompactUnwind before warning
239
240
241 2008-12-15 Nick Kledzik <kledzik@apple.com>
242
243 <rdar://problem/6442926> Add dtrace usdt support for arm to ld64
244 * src/ld/MachOWriterExecutable.hpp: handle arm::kDtraceIsEnabledSite
245 * unit-tests/test-cases/dtrace-static-probes: use is-enabled in test case
246
247
248 ----- Tagged ld64-93
249
250 2008-12-11 Nick Kledzik <kledzik@apple.com>
251
252 * src/ld/ObjectFile.h: add fIPhoneVersionMin to track min iPhoneOS version
253 * src/ld/Options.cpp: use fIPhoneVersionMin
254
255
256 2008-12-11 Nick Kledzik <kledzik@apple.com>
257
258 <rdar://problem/6431277> non-lazy pointer to non-global tentative definition encoded wrong
259 * src/ld/MachOWriterExecutable.hpp: don't use INDIRECT_SYMBOL_LOCAL for tentative definitions
260 * unit-tests/test-cases/non-lazy-r: updated test case
261
262
263 2008-12-11 Nick Kledzik <kledzik@apple.com>
264
265 <rdar://problem/6437667> kernel fails to boot when ld64 used for intermediate ld -r step
266 * src/ld/MachOWriterExecutable.hpp: in -r mode when generating a scattered sect-diff reloc for
267 i386/arm, special case when from target is not the atom
268 the relocation is in.
269 * unit-tests/test-cases/relocs-asm: update test case
270
271
272 2008-12-11 Nick Kledzik <kledzik@apple.com>
273
274 * src/ld/ld.cpp: handle new __program_vars section
275 * src/ld/MachOWriterExecutable.hpp: handle inserting synthesized sections when there is no __dyld section
276
277
278 2008-12-11 Nick Kledzik <kledzik@apple.com>
279
280 * src/ld/MachOReaderRelocatable.hpp: Fix getDescription() to work when direct reference is to anonymous atom
281
282
283 2008-12-10 Nick Kledzik <kledzik@apple.com>
284
285 * src/ld/Options.cpp: enable LD_FORCE_NO_PREBIND to be used with arm
286
287
288 2008-12-10 Nick Kledzik <kledzik@apple.com>
289
290 <rdar://problem/6258169> Developer tool to print the new compressed LINKEDIT information
291 * src/other/dyldinfo.cpp: fix typo in usage()
292
293
294 2008-12-05 Nick Kledzik <kledzik@apple.com>
295
296 <rdar://problem/6308882> SnowLeopard kernel should compile warning free
297 * src/ld/MachOReaderRelocatable.hpp: correct parse two global labels at end of section and make one an alias
298 * unit-tests/test-cases/end-label: update test case
299
300
301 2008-12-04 Nick Kledzik <kledzik@apple.com>
302
303 <rdar://problem/6342245> Better warning than "PPC_RELOC_JBSR should not be using an external relocation"
304 * src/ld/MachOReaderRelocatable.hpp: issue warning with .o path if it was compiled with -mlong-branch
305
306
307 2008-12-04 Nick Kledzik <kledzik@apple.com>
308
309 <rdar://problem/6408832> linker should not map __pointers -> __nl_symbol_ptr unless actually making new LINKEDIT
310 * src/ld/ObjectFile.h: add fMakeCompressedDyldInfo for readers to see
311 * src/ld/Options.cpp: set fMakeCompressedDyldInfo for readers to see
312 * src/ld/MachOReaderRelocatable.hpp: check fMakeCompressedDyldInfo
313
314
315 2008-12-02 Nick Kledzik <kledzik@apple.com>
316
317 * src/ld/debugline.c: fix error handling in line_open()
318
319
320 2008-11-26 Nick Kledzik <kledzik@apple.com>
321
322 <rdar://problem/6401277> vtable with thumb entries broke after ld -r
323 * src/ld/MachOReaderRelocatable.hpp: if target of reloc is thumb, mask thumb bit off addend
324 * unit-tests/test-cases/thumb-pointer: added test case
325
326
327 2008-11-26 Nick Kledzik <kledzik@apple.com>
328
329 * src/ld/Option.cpp: Fix how crashreporterBuffer is created to not miss some arguments
330
331
332 2008-11-24 Nick Kledzik <kledzik@apple.com>
333
334 <rdar://problem/6398605> Security.framework has some duplicate FDEs for some functions
335 * src/ld/ld.cpp: remove fDeadAtoms from fLiveAtoms when there are weak atoms overriden by late loads
336 * unit-tests/test-cases/dead_strip-archive-eh: added test case
337
338
339 ----- Tagged ld64-92
340
341 2008-11-21 Nick Kledzik <kledzik@apple.com>
342
343 * src/ld/MachOReaderDylib.hpp: if export_size is zero, no need to parse trie
344 * src/abstraction/MachOTrie.hpp: gracefully handle empty trie
345
346
347 2008-11-21 Nick Kledzik <kledzik@apple.com>
348
349 <rdar://problem/6257854> strip(1) support for new compressed LINKEDIT information
350 * ld64.xcodeproj/project.pbxproj: build and install new libprunetrie.a
351 * src/other/prune_trie.h: added
352 * src/other/PruneTrie.cpp: implements prune_trie()
353
354
355 2008-11-21 Nick Kledzik <kledzik@apple.com>
356
357 * src/ld/ld.cpp: if an export file is used and all weak symbols are masked, don't set WEAK_DEFINES
358 * unit-tests/test-cases/weak-def-flag: added test case
359
360
361 2008-11-20 Nick Kledzik <kledzik@apple.com>
362
363 <rdar://problem/6305021> Generate new compressed LINKEDIT when targeting 10.6
364 * src/ld/MachOWriterExecutable.hpp: support generating new compressed format
365 * src/ld/MachOReaderRelocatable.hpp: new compress format implies non-lazy pointers in __DATA for i386
366 * src/ld/MachOReaderDylib.hpp: support linking aginst new format
367 * src/ld/Options.cpp: suppport -exported_symbols_order and -no_compact_linkedit
368 * src/ld/ld.cpp: track which atoms have weak counter parts in dylibs
369 * src/other/dyldinfo.cpp: added tool to display new LINKEDIT format
370 * ld64.xcodeproj/project.pbxproj: add dyldinfo tool
371 * unit-tests/*: lots of fixes to work with new format
372
373
374 2008-11-20 Nick Kledzik <kledzik@apple.com>
375
376 <rdar://problem/6389316> ld64 should preserve N_WEAK_REF when linking MH_KEXT_BUNDLEs
377 * src/ld/MachOWriterExecutable.hpp: set up fWeakImportMap in synthesizeKextGOT()
378
379
380 2008-11-19 Nick Kledzik <kledzik@apple.com>
381
382 <rdar://problem/6342406> VideoToolbox.framework has bad __TEXT.__eh_frame info
383 * src/ld/Options.cpp: add -no_eh_labels option for use with -r
384 * src/ld/MachOWriterExecutable.hpp: generate correct x86_64 labeless relocs in -r mode
385 * src/ld/MachOReaderRelocatable.hpp: now ignore all labels and relocations in
386 __TEXT/__eh_frame section and rely on getCFIs() from libunwind
387 * unit-tests/test-cases/eh-coalescing-no-labels: add test case
388
389
390 2008-11-19 Nick Kledzik <kledzik@apple.com>
391
392 <rdar://problem/6378110> LTO doesn't like dtrace symbols
393 * src/ld/LTOReader.hpp: ignore __dtrace_probe undefines in bitcode files
394
395
396 2008-11-14 Nick Kledzik <kledzik@apple.com>
397
398 * src/abstraction/MachOFileAbstraction.hpp: fix to work with 10.5 headers
399
400
401 ----- Tagged ld64-91
402
403 2008-11-07 Nick Kledzik <kledzik@apple.com>
404
405 Remove COMPACT_UNWIND_SUPPORT conditionalizing
406
407
408 2008-11-06 Nick Kledzik <kledzik@apple.com>
409
410 Reorganize source layout. ld sources are now in "ld",
411 and other tools are in "other".
412
413
414 2008-11-05 Nick Kledzik <kledzik@apple.com>
415
416 * ld64.xcodeproj/project.pbxproj: start installing unwinddump tool
417 * src/UnwindDump.cpp: support -arch option
418 * doc/man/man1/unwinddump.1: create man page
419
420
421 2008-11-05 Nick Kledzik <kledzik@apple.com>
422
423 <rdar://problem/6337329> linker should put cpusubtype in n_sect field of nlist entry for N_OSO debug note entries
424 * src/ld.cpp: in synthesizeDebugNotes() set other field of OSO to be subtype
425
426
427 2008-11-05 Nick Kledzik <kledzik@apple.com>
428
429 <rdar://problem/3738966> Need a linker option to load all objects from one library
430 * src/Options.cpp: support -force_load option
431 * src/ArchiveReader.hpp: Add fForceLoad ivar
432 * doc/man/man1/ld.1: update man page with -force_load option
433 * unit-tests/test-cases/archive-force-load: add test case
434
435
436 2008-11-05 Nick Kledzik <kledzik@apple.com>
437
438 <rdar://problem/6308882> Dtrace Probe Warnings: SnowLeopard kernel should compile warning free
439 * src/ld.cpp: don't generate GSYM stabs for old style __dtrace_probe
440 * src/MachOReaderRelocatable.hpp: fix test for deciding if a symbol is an alias
441
442
443 2008-11-04 Nick Kledzik <kledzik@apple.com>
444
445 <rdar://problem/6294378> ADOBE: XCODE: ld: duplicate typeinfo in executable
446 * src/ld.cpp: in dead-strip mode, record overriden symbols and later rebind all uses
447 * unit-tests/test-cases/dead_strip-archive-weak: add test case
448
449
450 2008-11-03 Nick Kledzik <kledzik@apple.com>
451
452 <rdar://problem/6254202> support increased branch range in Thumb-2
453 * src/MachOReaderRelocatable.hpp: handle full branch range in addRelocReference()
454 * unit-tests/test-cases/branch-distance: added test case
455
456 2008-10-31 Devang Patel <dpatel@apple.com>
457
458 <rdar://problem/5725712> Sqlite 3.5.4 built with lvm-gcc-4.2 -O4 fails regression test
459 * src/LTOReader.hpp: Use real atom scope when real atom is available.
460 Preserve globals while optimizing an executable.
461
462 2008-10-30 Nick Kledzik <kledzik@apple.com>
463
464 * src/MachOReaderRelocatable.hpp: support all encodings in getEncodedP()
465
466
467 ----- Tagged ld64-90
468
469 2008-10-30 Nick Kledzik <kledzik@apple.com>
470
471 <rdar://problem/6327584> icc has dwarf unwind info that is different than gcc
472 * src/MachOReaderRelocatable.hpp: support more encodings in getEncodedP()
473
474
475 2008-10-23 Nick Kledzik <kledzik@apple.com>
476
477 <rdar://problem/6088653> build ld64 for x86_64
478 * ld64.xcodeproj/project.pbxproj: add X86_64 to valid archs
479
480
481 2008-10-23 Nick Kledzik <kledzik@apple.com>
482
483 * ld64.xcodeproj/project.pbxproj: use generated @$(DERIVED_FILE_DIR)/linker_opts for extra
484 linker options. This allows linker to be built if LTO headers and libs are missing.
485
486
487 2008-10-23 Nick Kledzik <kledzik@apple.com>
488
489 <rdar://problem/6273617> Linker warning not shown in the Xcode build log
490 * src/Options.cpp: add colon to format string in warning()
491
492
493 ----- Tagged ld64-89.3
494
495 2008-10-24 Nick Kledzik <kledzik@apple.com>
496
497 <rdar://problem/6317985> ld64-89 broke TOT OpenGL libProgrammability x86_64 build
498 * src/MachOReaderRelocatable.hpp: add cast in getEncodedP()
499
500
501 ----- Tagged ld64-89.2
502
503 2008-10-23 Nick Kledzik <kledzik@apple.com>
504
505 <rdar://problem/6312895> SnowLeopard: Libsystem built with ld64-89.1 causes crashes
506 * src/MachOReaderRelocatable.hpp: when FDE information causes __text atom to be split, make the
507 atoms follow-on pairs.
508
509
510 ----- Tagged ld64-89.1
511
512 2008-10-22 Nick Kledzik <kledzik@apple.com>
513
514 * src/MachOReaderRelocatable.hpp: for x86_64 __eh_frame force direct references
515
516
517 2008-10-21 Nick Kledzik <kledzik@apple.com>
518
519 * src/ObjectDump.cpp: Use getContentType() to see if content type is a cstring
520
521
522 ----- Tagged ld64-89
523
524 2008-10-21 Nick Kledzik <kledzik@apple.com>
525
526 <rdar://problem/6253171> 10A180 with QT-1119 roots: iTunes and QuickTime cannot play back purchased videos
527 <rdar://problem/5950453> linker should not need .eh labels
528 * src/MachOWriterExecutable.hpp: use kCFIType to set section attributes
529 * src/MachOReaderRelocatable.hpp: use libunwind's CFITuple to parse __eh_frame content
530 * src/ld.cpp: Add adjustScope() phase instead of demoting scope within symboltable.add()
531 * unit-tests/test-cases/eh-stripped-symbols: added test case
532
533
534 ----- Tagged ld64-88.1
535
536 2008-10-16 Nick Kledzik <kledzik@apple.com>
537
538 * src/MachOReaderRelocatable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
539 * src/MachOWriterExecutable.hpp: Fix uses of COMPACT_UNWIND_SUPPORT
540
541
542 2008-09-30 Nick Kledzik <kledzik@apple.com>
543
544 <rdar://problem/6255983> OBJC2: Reorder __DATA,__objc_* sections by writedness
545 * src/ld.cpp: change sorting order of Sections
546
547
548 2008-09-29 Nick Kledzik <kledzik@apple.com>
549
550 <rdar://problem/6159479> Executable produced by XCode 3.2 on 10.6 crashes on 10.3.9
551 * src/MachOWriterExecutable.hpp: set objc_module_info_addr field of module table
552
553
554 ----- Tagged ld64-88
555
556 2008-09-25 Nick Kledzik <kledzik@apple.com>
557
558 <rdar://problem/5935708> kexts need to be built as MH_BUNDLE mach-o files
559 * src/ld.cpp: use getUndefinedProxyAtom() with kKextBundle
560 * src/MachOFileAbstraction.hpp: add MH_KEXT_BUNDLE
561 * src/Options.cpp: support -kext for all architectures
562 * src/MachOWriterExecutable.hpp: support kKextBundle to make a bundle like kext
563 * unit-tests/test-cases/kext-basic: added test case
564
565
566 2008-09-25 Nick Kledzik <kledzik@apple.com>
567
568 <rdar://problem/6052546> ld invoking wrong ld_classic
569 * src/Options.cpp: first look for ld_classic relative to ld itself
570
571
572 2008-09-25 Nick Kledzik <kledzik@apple.com>
573
574 <rdar://problem/5855588> ld fails to link references from 32 bit code into 64 bit code
575 <rdar://problem/5955200> Desired 32-bit absolute relocation
576 * src/Architectures.hpp: add x86_64::kPointer32
577 * src/MachOReaderRelocatable.hpp: support X86_64_RELOC_UNSIGNED with length=2
578 * src/MachOWriterExecutable.hpp: support x86_64::kPointer32
579 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added 32-bit pointer tests
580
581
582 2008-09-25 Nick Kledzik <kledzik@apple.com>
583
584 <rdar://problem/6075323> Should be able to mark dylibs as auto-dead-dylib-strip
585 * src/Options.h: add fMarkDeadStrippableDylib
586 * src/MachOReaderDylib.hpp: check MH_DEAD_STRIPPABLE_DYLIB
587 * src/ObjectFile.h: add deadStrippable()
588 * src/MachOFileAbstraction.hpp: add MH_DEAD_STRIPPABLE_DYLIB
589 * src/Options.cpp: support -mark_dead_strippable_dylib
590 * src/MachOWriterExecutable.hpp: test reader->deadStrippable(), set MH_DEAD_STRIPPABLE_DYLIB
591 * doc/man/man1/ld.1: update man page
592 * unit-tests/test-cases/dead_strippable_dylib: added test case
593
594
595 2008-09-25 Nick Kledzik <kledzik@apple.com>
596
597 <rdar://problem/6197601> ER: Add -seg_page_size option
598 * src/Options.cpp: add -seg_page_size option
599 * src/MachOWriterExecutable.hpp: use new page size info when laying out segments
600 * doc/man/man1/ld.1: update man page
601
602
603 2008-09-24 Nick Kledzik <kledzik@apple.com>
604
605 <rdar://problem/5798786> -arch_errors_fatal not working
606 * src/ld.cpp: check fOptions.errorOnOtherArchFiles()
607 * src/Options.cpp: turn -arch_errors_fatal into fOptions.errorOnOtherArchFiles()
608
609
610 2008-09-24 Nick Kledzik <kledzik@apple.com>
611
612 <rdar://problem/6161215> CrashTracer: [USER] 1 crash in ld at ld: 0x5ce02
613 * src/ld.cpp: abort if resolve() finds an unresolved reference, rather than allow a future crash
614
615
616 2008-09-24 Nick Kledzik <kledzik@apple.com>
617
618 <rdar://problem/6157989> linker crashes linking X86-64 with -fwritable-strings
619 * src/MachOReaderRelocatable.hpp: handle unbound cfstring references
620 * unit-tests/test-cases/cfstring-coalesce: update test case
621
622
623 2008-09-24 Nick Kledzik <kledzik@apple.com>
624
625 <rdar://problem/6213035> ld64: bl out of range (-17147704 max is +/-16M) on ppc
626 * src/MachOWriterExecutable.hpp: tweak branch island regions to be every 14MB instead of 15MB
627
628
629 2008-09-24 Nick Kledzik <kledzik@apple.com>
630
631 <rdar://problem/5907981> -filelist fails with comma in path
632 * src/Options.cpp: in loadFileList() first try without special comma meaning
633 * unit-tests/test-cases/filelist/Makefile: update test case
634
635
636 2008-09-23 Nick Kledzik <kledzik@apple.com>
637
638 <rdar://problem/6203068> nop not used when aligning functions in -r mode
639 * src/MachOWriterExecutable.hpp: change check for when to pad with nops to not test segment's name
640
641
642 2008-09-23 Nick Kledzik <kledzik@apple.com>
643
644 <rdar://problem/6238329> "-pie can only be used when linking a main executable" should be a warning, not an error
645 * src/Options.cpp: make -pie on a dylib or bundle be a warning instead of an error
646
647
648 2008-09-23 Nick Kledzik <kledzik@apple.com>
649
650 * src/MachOReaderRelocatable.hpp: add warning if dwarf cannot be encoded as compact unwind
651
652
653 2008-09-18 Nick Kledzik <kledzik@apple.com>
654
655 * src/LTOReader.hpp: re-enable use of lto_codegen_debug_options()
656
657
658 2008-09-16 Nick Kledzik <kledzik@apple.com>
659
660 <rdar://problem/6219054> ld does not always set S_CSTRING_LITERALS on __TEXT,__cstring
661 * src/MachOReaderRelocatable.hpp: add getContentType() to SymbolAtom
662 * src/MachOWriterExecutable.hpp: for x86_64 don't override named cstrings with LC* name
663
664
665 2008-09-10 Nick Kledzik <kledzik@apple.com>
666
667 * Options.cpp: add __crashreporter_info__ to communicate command line to crash reporter
668 * ld64.xcodeproj/project.pbxproj: leave local symbols in ld to provide better crash reports
669
670
671 2008-09-08 Nick Kledzik <kledzik@apple.com>
672
673 <rdar://problem/6126637> 161569 GCC 4.2 - breakpoints no longer work for a large number of functions
674 * src/MachOReaderRelocatable.hpp: support DW_FORM_strp out-of-line strings when parsing line table
675
676
677 2008-09-02 Nick Kledzik <kledzik@apple.com>
678
679 * src/MachOReaderRelocatable.hpp: fix compact unwind personality for dyld and -slow_stubs
680
681
682 2008-08-29 Nick Kledzik <kledzik@apple.com>
683
684 <rdar://problem/6186838> -weak_library no longer forces uses to be weak_import
685 * src/MachOWriterExecutable.hpp: use fWeakImport on dylib to force proxy atoms into fWeakImportMap
686 * unit-tests/test-cases/weak_import-force: added test case
687
688
689 2008-08-29 Nick Kledzik <kledzik@apple.com>
690
691 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
692 * src/Options.cpp: add fOrderData and support -no_data_order
693 * src/ld.cpp: modify tweakLayout() to sort atoms with relocations to start of __data section
694
695
696 2008-08-27 Nick Kledzik <kledzik@apple.com>
697
698 * src/Options.cpp: back out <rdar://problem/6174493>
699
700
701 ----- Tagged ld64-87.5
702
703 2008-08-26 Nick Kledzik <kledzik@apple.com>
704
705 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
706 * src/Options.cpp: swap any early symlinks to libSystem with libgcc_s
707
708
709 ----- Tagged ld64-87.4
710
711 2008-08-25 Nick Kledzik <kledzik@apple.com>
712
713 <rdar://problem/6174493> some projects show _Unwind_Resume coming from libSystem.B.dylib
714 * src/Options.cpp: swap any early libSystem with libgcc_s
715
716
717 2008-08-15 Nick Kledzik <kledzik@apple.com>
718
719 <rdar://problem/5898326> Unable to build ppc debug builds (linker out of range error)
720 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands() look ahead so large atoms don't push out branch islands
721
722
723 ----- Tagged ld64-87.3.1
724
725 2008-09-08 Nick Kledzik <kledzik@apple.com>
726
727 <rdar://problem/6204202> i386 dylibs have incorrect personality pointers when put in dyld shared cache
728 * src/MachOWriterExecutable.hpp: in addCrossSegmentRef() handle kImageOffset32 to __IMPORT segment
729
730
731 ----- Tagged ld64-87.3
732
733 2008-08-09 Nick Kledzik <kledzik@apple.com>
734
735 <rdar://problem/6125381> work around compiler gcc_except_table alignment
736 * src/ObjectFile.h: change getLSDA() to return a reference instead of an atom
737 * src/MachOReaderRelocatable.hpp: special case __eh_frame 64-bit pointer diff relocations
738 * src/MachOWriterExecutable.hpp: track lsda offset when creating __unwind_info section
739 * src/UnwindDump.cpp: log when LDSA content does not start with 0xFF
740
741 ----- Tagged ld64-87.2
742
743 2008-08-07 Nick Kledzik <kledzik@apple.com>
744
745 <rdar://problem/6131559> 10A141: libuwind falls back to dwarf and makes whole system super slow
746 * src/MachOWriterExecutable.hpp: Fix sign extension bug with x86_64::kPointerDiff24
747 * src/UnwindDump.cpp: warn about mangled LSDA entries when dumping unwind section
748
749
750 ----- Tagged ld64-87.1
751
752 2008-08-03 Nick Kledzik <kledzik@apple.com>
753
754 * src/LTOReader.hpp: Don't use lto_codegen_debug_options until newer libLTO.dylib is available
755
756
757 ----- Tagged ld64-87
758
759 2008-07-21 Nick Kledzik <kledzik@apple.com>
760
761 * src/Options.cpp: Always set fAutoOrderInitializers=false for dyld
762
763
764 2008-07-21 Nick Kledzik <kledzik@apple.com>
765
766 * src/MachOWriterExecutable.hpp: fix when regular vs compressed __unwind_info pages are generated
767 * src/UnwindDump.cpp: fix function name decoding in regular pages
768
769
770 2008-07-21 Nick Kledzik <kledzik@apple.com>
771
772 * ld64.xcodeproj/project.pbxproj: don't allow ld to build for x86_64 until libdtrace.dylib is available
773
774
775 2008-07-18 Nick Kledzik <kledzik@apple.com>
776
777 * src/MachOReaderRelocatable.hpp: don't crash if debug_line section has no line table
778
779
780 2008-07-18 Nick Kledzik <kledzik@apple.com>
781
782 <rdar://problem/5628149> Duplicate probe firings in Security.framework
783 * src/LTOReader.hpp: optimize() now returns atoms optimized away
784 * src/ObjectFile.h: optimize() should return if it did anything
785 * src/ArchiveReader.hpp: pass through optimize() result
786 * src/ld.cpp: rework dtrace probe processing as a new pass to prevent double counting
787
788
789 2008-07-15 Nick Kledzik <kledzik@apple.com>
790
791 <rdar://problem/6061904> automatically order initializers to start of __TEXT
792 * src/Options.cpp: add -no_order_inits option
793 * src/MachOReaderRelocatable.hpp: merge __StaticInit into __text
794 * src/ObjectFile.h: add fAutoOrderInitializers
795 * src/ld.cpp: sort initializer to start of __text and terminators to end
796 * doc/man/man1/ld.1: add doc about -no_order_inits
797 * unit-tests/test-cases/init-order: add test case
798
799 2008-07-15 Nick Kledzik <kledzik@apple.com>
800
801 <rdar://problem/6073697> Only add LC_SEGMENT_SPLIT_INFO to dylibs that might be in the shared cache
802 * src/MachOWriterExecutable.hpp: re-layout load commands after split-seg data computed
803 * src/Options.cpp: non-public install name will disable split-seg load command
804
805
806 2008-07-14 Nick Kledzik <kledzik@apple.com>
807
808 <rdar://problem/6069861> ld -r for x86_64 is changing visibility of cstring constants
809 * src/MachOWriterExecutable.hpp: force x86_64 cstring labels to be local in -r mode
810 * unit-tests/test-cases/cstring-label: added test case
811
812
813 2008-07-11 Nick Kledzik <kledzik@apple.com>
814
815 <rdar://problem/6070190> ld not adding updating LC_SEGMENT_SPLIT_INFO with __unwind_info section
816 * src/MachOWriterExecutable.hpp: run createSplitSegContent() after __unwind_info section is created
817
818 2008-07-10 Nick Kledzik <kledzik@apple.com>
819
820 * src/LTOReader.hpp: improve missing symbol error message
821
822
823 2008-07-09 Nick Kledzik <kledzik@apple.com>
824
825 <rdar://problem/6061558> linker should order __DATA segment to reduce dyld dirtied pages
826 * src/ld.cpp: first phase, order sections
827
828
829 2008-07-08 Nick Kledzik <kledzik@apple.com>
830
831 * src/MachOReaderRelocatable.hpp: remove "coal" sections when creating a final linked image
832
833
834 2008-07-08 Nick Kledzik <kledzik@apple.com>
835
836 <rdar://problem/6054476> ld: add support for mllvm LTO options
837 * src/Options.cpp: support -mllvm option
838 * src/LTOReader.hpp: call lto_codegen_debug_options() with -mllvm options
839 * src/ld.cpp: pass llvmOptions to optimize()
840 * src/Options.h: add fLLVMOptions
841 * src/ArchiveReader.hpp: add llvmOptions parameter to optimize()
842 * src/ObjectFile.h: add llvmOptions parameter to optimize()
843 * unit-tests/test-cases/lto-llvm-options: add test case
844
845
846 2008-07-07 Nick Kledzik <kledzik@apple.com>
847
848 <rdar://problem/6054296> Linker fails with: 24-bit pointer diff out of range in unwind info in unwind info from...
849 * src/MachOWriterExecutable.hpp: fix when to fallback to uncompressed unwind info
850
851
852 2008-07-03 Nick Kledzik <kledzik@apple.com>
853
854 <rdar://problem/6001472> ld crash with gcc-4.0 code that uses a zero sized array
855 * src/MachOReaderRelocatable.hpp: handle zero size atom in a zero sized section
856
857
858 2008-07-03 Nick Kledzik <kledzik@apple.com>
859
860 <rdar://problem/6016809> ld crashes when bad ppc relocs are found
861 * src/MachOReaderRelocatable.hpp: change all missing PAIR warnings to errors
862
863
864 2008-07-02 Nick Kledzik <kledzik@apple.com>
865
866 <rdar://problem/5881324> when linking a kext the static linker should leave a pad in the headers to allow code signing
867 * src/MachOWriterExecutable.hpp: add padding for load commands in object files
868 * unit-tests/test-cases/code-signed-object-file: added test case
869
870
871 2008-07-02 Nick Kledzik <kledzik@apple.com>
872
873 <rdar://problem/6048484> LC_SEGMENT_64 filesize incorrect for MH_OBJECT filetype
874 * src/MachOWriterExecutable.hpp: correctly set segment size info in object files
875 * unit-tests/test-cases/no-object-symbols: add test case
876
877
878 2008-06-26 Nick Kledzik <kledzik@apple.com>
879
880 * ld64.xcodeproj/project.pbxproj: enable ld and rebase targets to build for x86_64
881 * src/rebase.cpp: remove unused fRelocBase field that was not 64-bit clean
882 * src/MachOReaderRelocatable.hpp: fix getEncodedP() to be 64-bit clean
883
884
885 ----- Tagged ld64-86.3
886
887 2008-06-17 Nick Kledzik <kledzik@apple.com>
888
889 * src/ld.cpp: fix loadUndefines() to double check undefine symbol was not already loaded
890
891
892 ----- Tagged ld64-86.2
893
894 2008-06-14 Nick Kledzik <kledzik@apple.com>
895
896 * srd/ld.cpp: Add NULL check in getTentativesNames()
897
898
899 ----- Tagged ld64-86.1
900
901 2008-06-06 Nick Kledzik <kledzik@apple.com>
902
903 * src/MachOWriterExecutable.hpp: fix header padding calculation for dyld
904
905
906 ----- Tagged ld64-86
907
908 2008-06-04 Nick Kledzik <kledzik@apple.com>
909
910 * src/LTOReader.hpp: if lto_codegen_add_module() fails, add explanation to error message
911
912
913 2008-06-04 Nick Kledzik <kledzik@apple.com>
914
915 * src/ObjectFile.h: add deadAtoms parameter to optimize()
916 * src/ld.cpp: ditto
917 * src/ArchiveReader.hpp: ditto
918 * src/MachOReaderRelocatable.hpp: handle llvm use of 0x1B pointer encodings in CIEs
919 * src/LTOReader.hpp: make sure libLTO.dylib knows about any llvm symbol coalesced away
920 * unit-tests/test-cases/lto-weak-native-override: add test case
921
922
923 2008-06-04 Nick Kledzik <kledzik@apple.com>
924
925 <rdar://problem/5935600> LTO : 176.gcc and 177.mesa build failure at -O4
926 * src/LTOReader.hpp: make sure internal is returned by getAtoms()
927 * unit-tests/test-cases/lto-archive-dylib: update test case
928
929
930 2008-06-03 Nick Kledzik <kledzik@apple.com>
931
932 <rdar://problem/5894163> fix for 5613343 need to search for definitions for common symbols is broken
933 * src/ld.cpp: modify loadUndefines() to check for undefines in all files and tentative definitions but only in archives
934 * src/machochecker.cpp: check for undefine symbols and external symbols with same name
935 * unit-tests/test-cases/tentative-and-archive: update test case
936
937
938 2008-06-03 Nick Kledzik <kledzik@apple.com>
939
940 <rdar://problem/5935237> linker produces wrong result for 16-bit call relocations
941 * src/MachOReaderRelocatable.hpp: properly parse i386 scattered relocs for word sized pc-rel vanilla
942 * src/MachOWriterExecutable.hpp: propery compute displacement for x86::kPCRel16
943 * unit-tests/test-cases/relocs-asm: update test case with callw instructions
944
945
946 2008-06-03 Nick Kledzik <kledzik@apple.com>
947
948 <rdar://problem/5905900> Building kext x86_64 with unexported symbols file causes linking problems
949 * src/MachOWriterExecutable.hpp: better check when creating undefined proxy atoms
950 * unit-tests/test-cases/unexported_symbols_list-r: added test case
951
952
953 2008-06-02 Nick Kledzik <kledzik@apple.com>
954
955 <rdar://problem/5659338> S_CSTRING_LITERALS section type not preserved in executable
956 * src/ObjectFile.h: added ContentType
957 * src/MachOReaderRelocatable.hpp: set ContentType for anonymous string literals
958 * src/MachOWriterExecutable.hpp: set S_CSTRING_LITERALS if ContentType is kCStringType
959 * unit-tests/test-cases/cstring-custom-section: added test case
960
961
962 2008-06-02 Nick Kledzik <kledzik@apple.com>
963
964 <rdar://problem/5980194> linker should produce __unwind_info section in final linked images
965 * src/ld.cpp: sort __unwind_info then __eh_frame section to end of __TEXT
966 * src/Architectures.hpp: add kImageOffset32 and kPointerDiff24
967 * src/ObjectFile.h: add compact unwind info support
968 * src/MachOReaderRelocatable.hpp: add compact unwind info support
969 * src/MachOFileAbstraction.hpp: add C++ wrappers for unwind section layout
970 * src/UnwindDump.cpp: new tool for dumping __unwind_info section
971 * src/MachOWriterExecutable.hpp: create __unwind_info section when needed
972 * src/ObjectDump.cpp: print unwind info
973
974
975 2008-06-02 Nick Kledzik <kledzik@apple.com>
976
977 * unit-tests/test-cases/llvm-integration: split out some test cases
978 * unit-tests/test-cases/lto-preload-pie: added
979 * unit-tests/test-cases/lto-archive-dylib: added
980
981
982 2008-05-30 Nick Kledzik <kledzik@apple.com>
983
984 * unit-tests: fixes to build all tests with with gcc-4.2 on SnowLeopard
985
986
987 2008-05-30 Nick Kledzik <kledzik@apple.com>
988
989 <rdar://problem/5536348> support -preload option to generate MH_PRELOAD binaries compatible with mtoc(1) and EFI
990 * src/ld.cpp: add entryPoint parameter to optimize()
991 * src/ArchiveReader.hpp: ditto
992 * src/ObjectFile.h: ditto
993 * src/LTOReader.hpp: use entryPoint parameter to optimize()
994 * src/Options.h: add kPreload and segment alignment
995 * src/Options.cpp: support -preload and -segalign
996 * src/MachOWriterExecutable.hpp: support kPreload and non-page aligned segments
997
998
999 2008-05-30 Nick Kledzik <kledzik@apple.com>
1000
1001 <rdar://problem/4431008> ld should warn if passed -r and also dylibs
1002 * src/ld.cpp: check for spurious dylibs in Linker::addDylib()
1003
1004
1005 ----- Tagged ld64-85.6
1006
1007 2008-11-01 Nick Kledzik <kledzik@apple.com>
1008
1009 <rdar://problem/6254202> support increased branch range in Thumb-2
1010 * src/MachOWriterExecutable.hpp: in fixUpReferenceFinal() support new longer branch range
1011
1012
1013 2008-11-01 Nick Kledzik <kledzik@apple.com>
1014
1015 <rdar://problem/6104368> ld warning: unknown option to -iphoneos_version_min, not 1.x or 2.x
1016 * src/Options.cpp: In setIPhoneVersionMin() support 3.x
1017
1018
1019 ----- Tagged ld64-85.5
1020
1021 2008-09-17 Nick Kledzik <kledzik@apple.com>
1022
1023 <rdar://problem/6162415> vtable pointers can be missing thumb bit
1024 * src/MachOWriterExecutable.hpp: Writer<arm>::fixUpReferenceFinal() OR in the 1 bit if the target
1025 of a arm::kReadOnlyPointer is thumb.
1026
1027
1028 ----- Tagged ld64-85.4
1029
1030 2008-08-11 Nick Kledzik <kledzik@apple.com>
1031
1032 <rdar://problem/6138961> ld should ignore LD_PREBIND when processing a static archive
1033 * src/MachOWriterExecutable.hpp: in setImportNlist() never use N_PBUD for object files
1034
1035 ----- Tagged ld64-85.3
1036
1037 2008-07-14 Nick Kledzik <kledzik@apple.com>
1038
1039 <rdar://problem/6060912> Prebinding busted in DTSB
1040 * src/Options.cpp: check for libstdc++.6.0.[49] in seg_addr_table
1041
1042
1043 ----- Tagged ld64-85.2
1044
1045 2008-05-06 Nick Kledzik <kledzik@apple.com>
1046
1047 <rdar://problem/5905889> ARM ld should take W bit off of maxprot for __TEXT segment
1048 * src/MachOWriterExecutable.hpp: for iPhone always set maxprot to be initprot in all segments
1049
1050
1051 2008-05-06 Nick Kledzik <kledzik@apple.com>
1052
1053 <rdar://problem/5914343> encryptable images may not be signable
1054 * src/MachOWriterExecutable.hpp: use minimum header padding when aligning __text section
1055
1056
1057 ----- Tagged ld64-85 (Xcode 3.1)
1058
1059 2008-04-29 Nick Kledzik <kledzik@apple.com>
1060
1061 * ld64.xcodeproj/project.pbxproj: <llvm-c/lto.h> is moving from /usr/local/include to /Developer/usr/local/include
1062
1063
1064 2008-04-29 Nick Kledzik <kledzik@apple.com>
1065
1066 <rdar://problem/5829579> ld doesn't honor "rightmost" -syslibroot argument
1067 * src/Options.cpp: if last -syslibroot is /, then ignore all syslibroots
1068
1069
1070 2008-04-29 Nick Kledzik <kledzik@apple.com>
1071
1072 <rdar://problem/5866582> GLRendererFloat has bad __eh_frame section caused by mixing llvm-gcc and gcc object files
1073 * src/MachOReaderRelocatable.hpp: make all atoms in __eh_frame section have 1-byte alignment
1074 * src/MachOWriterExecutable.hpp: make __eh_frame section have pointer sized alignment
1075
1076
1077 2008-04-17 Nick Kledzik <kledzik@apple.com>
1078
1079 * src/MachOReaderRelocatable.hpp: better cpu subtype support
1080
1081
1082 2008-04-14 Nick Kledzik <kledzik@apple.com>
1083
1084 <rdar://problem/5733759> ld64 has bad ARM branch island check
1085 * src/MachOWriterExecutable.hpp: in addBranchIslands() don't force large arm programs to fail
1086
1087
1088 2008-04-10 Nick Kledzik <kledzik@apple.com>
1089
1090 * src/MachOWriterExecutable.hpp: fix stubs used with lazy dylibs
1091
1092
1093 ----- Tagged ld64-84.4
1094
1095 2008-04-10 Nick Kledzik <kledzik@apple.com>
1096
1097 <rdar://problem/5847206> SPEC2000/eon built with -mdynamic-no-pic won't run
1098 * src/Architectures.hpp: added arm::kReadOnlyPointer
1099 * src/MachOReaderRelocatable.hpp: generate arm::kReadOnlyPointer
1100 * src/MachOWriterExecutable.hpp: use arm::kReadOnlyPointer
1101 * src/machochecker.cpp: allow MH_PIE bit
1102 * unit-tests/test-cases/switch-jump-table: added test cases
1103
1104
1105 ----- Tagged ld64-84.3
1106
1107 2008-04-09 Nick Kledzik <kledzik@apple.com>
1108
1109 <rdar://problem/5852023> -undefined dynamic_lookup busted
1110 * src/ld.cpp: don't create proxy atom when scanning for dylib duplicates
1111 * unit-tests/test-cases/tentative-and-archive: use -undefined dynamic_lookup
1112
1113
1114 ----- Tagged ld64-84.2
1115
1116 2008-04-04 Nick Kledzik <kledzik@apple.com>
1117
1118 * src/ld.cpp: don't add .eh symbols to symbol table in -r mode
1119 * unit-tests/test-cases/eh-coalescing-r: update to test out of order coalescing
1120
1121
1122 ----- Tagged ld64-84.1
1123
1124 2008-03-28 Nick Kledzik <kledzik@apple.com>
1125
1126 <rdar://problem/5720961> ld should prefer architecture-specific variant over generic in fat object file
1127 * src/Options.cpp: fully process -arch arguments into fArchitecture and fSubArchitecture
1128 * src/ld.cpp: when -arch with a subtype is used, try to find the exact subtype from fat files
1129 * unit-tests/test-cases/cpu-sub-types-preference: added test cases for arm and ppc
1130
1131
1132 ----- Tagged ld64-84
1133
1134 2008-03-28 Nick Kledzik <kledzik@apple.com>
1135
1136 * src/LTOReader.hpp: don't print lto version, if lto is unavailable
1137
1138
1139 2008-03-26 Nick Kledzik <kledzik@apple.com>
1140
1141 <rdar://problem/5575399> Add LD_WARN_COMMONS to BigBear builds
1142 * src/Options.cpp: Add support for LD_WARN_FILE which copies all warnings to a side file
1143
1144
1145 2008-03-26 Nick Kledzik <kledzik@apple.com>
1146
1147 <rdar://problem/5797713> Need encryption tag in mach-o file
1148 <rdar://problem/5811920> linker should adjust arm final linked images so __text is never on the same page as the load commands
1149 * src/MachOFileAbstraction.hpp: add support for encryption_info_command
1150 * src/Options.cpp: add support for LD_NO_ENCRYPT and -no_encryption
1151 * src/MachOWriterExecutable.hpp: add EncryptionLoadCommandsAtom
1152 * src/machochecker.cpp: validate LC_ENCRYPTION_INFO
1153
1154
1155 2008-03-25 Nick Kledzik <kledzik@apple.com>
1156
1157 <rdar://problem/5712533> ld64 does not recognize LLVM bitcode archive files
1158 * src/MachOReaderArchive.hpp: renamed to src/ArchiveReader.hpp
1159 * src/ArchiveReader.hpp: sniff each member and instantiate correct reader
1160 * src/ld.cpp: rename mach_o::archive::Reader to archive::Reader
1161 * ld64.xcodeproj/project.pbxproj: rename MachOReaderArchive.hpp to ArchiveReader.hpp
1162 * unit-tests/test-cases/llvm-integration: added test case
1163
1164
1165 2008-03-25 Nick Kledzik <kledzik@apple.com>
1166
1167 <rdar://problem/5771658> ld64 should switch to new libLTO.dylib interface
1168 <rdar://problem/5675690> Produce llvm bc file in 'ld -r' mode if all .o files are llvm bc
1169 * src/LTOReader.hpp: rewrite from LLVMReader.hpp to use new lto_* C interface
1170 * unit-tests/test-cases/llvm-integration: update and comment
1171 * ld64.xcodeproj/project.pbxproj: update to lazy load libLTO.dylib
1172 * src/ld.cpp: rework and simplify Linker::optimize()
1173 * src/ObjectDump.cpp: Add -nm option
1174
1175
1176 2008-03-25 Nick Kledzik <kledzik@apple.com>
1177
1178 * src/MachOReaderRelocatable.cpp: Fix some .objc_class_name_ off by one problem
1179 * src/MachOWriterExecutable.cpp: Fix some .objc_class_name_ off by one problem
1180
1181
1182 2008-03-24 Nick Kledzik <kledzik@apple.com>
1183
1184 <rdar://problem/5814613> Xcode 3.1 breaks linkage of libgcj.9.dylib from gcc 4.3.0
1185 * src/MachOWriterExecutable.cpp: Make sure all ivars in Writer are initialized.
1186
1187
1188 2008-03-21 Nick Kledzik <kledzik@apple.com>
1189
1190 * src/Options.cpp: warn if -seg1addr value is not page aligned
1191
1192
1193 2008-03-21 Nick Kledzik <kledzik@apple.com>
1194
1195 <rdar://problem/5806437> Move ARM support outside of __OPEN_SOURCE__
1196 * src/ld.cpp: remove __OPEN_SOURCE__ around arm support
1197 * src/LLVMReader.hpp: remove __OPEN_SOURCE__ around arm support
1198 * src/MachOReaderDylib.hpp: remove __OPEN_SOURCE__ around arm support
1199 * src/ObjectFile.h: remove __OPEN_SOURCE__ around arm support
1200 * src/MachOReaderRelocatable.hpp: remove __OPEN_SOURCE__ around arm support
1201 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
1202 * src/MachOWriterExecutable.hpp: remove __OPEN_SOURCE__ around arm support
1203 * src/ObjectDump.cpp: remove __OPEN_SOURCE__ around arm support
1204 * ld64.xcodeproj/project.pbxproj: remove ARM_SUPPORT from config.h
1205
1206
1207 ----- Tagged ld64-83.2
1208
1209 2008-03-15 Nick Kledzik <kledzik@apple.com>
1210
1211 <rdar://problem/5801620> ld64-83 removes OBJC_CLASS_$ symbols from projects, causes catastrophic results
1212 * src/Options.cpp: restore "case CPU_TYPE_ARM" in switch statement for .objc_class symbols in .exp files
1213 * unit-tests/test-cases/objc-exported_symbols_list: added test case
1214
1215
1216 ----- Tagged ld64-83.1
1217
1218 2008-03-14 Nick Kledzik <kledzik@apple.com>
1219
1220 <rdar://problem/5800466> -iphone_version_min ==> -iphoneos_version_min
1221 * src/Options.cpp: support -iphoneos_version_min as well
1222
1223
1224 ----- Tagged ld64-83
1225
1226 2008-03-10 Nick Kledzik <kledzik@apple.com>
1227
1228 <rdar://problem/5791543> ld needs to strip iphone_version_min option if invoking ld_classic
1229 * src/Options.cpp: suppress -iphone_version_min from being passed to ld_classic
1230
1231
1232 2008-03-04 Nick Kledzik <kledzik@apple.com>
1233
1234 <rdar://problem/4171253> ADOBE XCODE: Linker option to lazy load frameworks (cause dyld is too slow)
1235 * src/MachOWriterExecutable.hpp: create lazy stubs and LC_LAZY_LOAD_DYLIB for lazy load dylibs
1236 * src/Options.cpp: support -lazy-l, -lazy_library, and -lazy_framework
1237 * src/MachOFileAbstraction.hpp: add LC_LAZY_LOAD_DYLIB and S_LAZY_DYLIB_SYMBOL_POINTERS until in cctools
1238 * src/MachOReaderDylib.hpp: add isLazyLoadedDylib()
1239 * src/ld.cpp: pass lazy helper atom to writer
1240 * doc/man/man1/ld.1: document new options
1241 * unit-tests/test-cases/lazy-dylib-objc: add test case
1242 * unit-tests/test-cases/lazy-dylib: add test case
1243
1244
1245 ----- Tagged ld64-82.7
1246
1247 2008-03-07 Nick Kledzik <kledzik@apple.com>
1248
1249 <rdar://problem/5787149> duplicate symbol literal-pointer@__OBJC@__message_refs@...
1250 * src/MachOReaderRelocatable.hpp: AnonymousAtom from S_LITERAL_POINTERS section should be weak
1251 * unit-tests/test-cases/objc-selector-coalescing: added test case
1252
1253
1254 ----- Tagged ld64-82.6
1255
1256 2008-03-04 Nick Kledzik <kledzik@apple.com>
1257
1258 <rdar://problem/5779681> ld crashes building XsanFS for Snow Leopard Builds
1259 * src/ld.cpp: add bool dylibsOnly parameter to addJustInTimeAtoms()
1260 * unit-tests/test-cases/tentative-and-archive: added test case
1261
1262 2008-03-04 Nick Kledzik <kledzik@apple.com>
1263
1264 <rdar://problem/5775822> ld64 should not force building with gcc 4.0
1265 * ld64.xcodeproj/project.pbxproj: change rules to use "system" compiler instead of 4.0
1266
1267
1268 2008-02-29 Nick Kledzik <kledzik@apple.com>
1269
1270 <rdar://problem/5774730> Simulator frameworks are being build split-seg and not prebound
1271 * src/Options.cpp: only splitseg if prebound
1272
1273
1274 2008-02-29 Nick Kledzik <kledzik@apple.com>
1275
1276 <rdar://problem/5774231> Linker should not make GSYM debug note for .objc_category_* symbols
1277 * src/ld.cpp: suppress GSYM debug notes for absolute symbols
1278 * unit-tests/test-cases/objc-category-debug-notes: added test case
1279
1280
1281 2008-02-29 Nick Kledzik <kledzik@apple.com>
1282
1283 <rdar://problem/5768970> non-ASCII CFString support is broken
1284 * src/MachOReaderRelocatable.hpp: only name and coalesce cfstring constants if they use a __cstring
1285 * unit-tests/test-cases/cfstring-utf16: add test case
1286
1287
1288 2008-02-25 Nick Kledzik <kledzik@apple.com>
1289
1290 <rdar://problem/5366363> ld -r -x
1291 * doc/man/man1/ld.1: update man page to explain -r -x produces auto-stripped labels
1292
1293
1294 ----- Tagged ld64-82.5
1295
1296 2008-02-12 Nick Kledzik <kledzik@apple.com>
1297
1298 <rdar://problem/5738023> x86_64: -stack_size failure when large __bss is used
1299 * src/ld.cpp: only move section already in __DATA segment to new __huge section
1300 * unit-tests/test-cases/stack_size_no_addr: updated test case to add large bss section
1301
1302
1303 ----- Tagged ld64-82.4
1304
1305 2008-02-06 Nick Kledzik <kledzik@apple.com>
1306
1307 <rdar://problem/5726215> comdat warnings with ld -r of C++ .o files
1308 * unit-tests/test-cases/eh-coalescing-r: added test case
1309 * src/ld.cpp: in ld -r mode don't warn about if .eh symbols are not static
1310
1311
1312 2008-02-06 Devang Patel <dpatel@apple.com>
1313
1314 <rdar://problem/5724990> LTO of Bom framework with -dead_strip causes ld(1) crash
1315 * src/LLVMReader.hpp: Check fAtom while determining LLVMReference target binding.
1316 * unit-tests/test-cases/llvm-integration/Makefile: Add new test case.
1317 * unit-tests/test-cases/llvm-integration/a15.c: New.
1318 * unit-tests/test-cases/llvm-integration/b15.c: New.
1319 * unit-tests/test-cases/llvm-integration/c15.c: New.
1320
1321 2008-02-05 Nick Kledzik <kledzik@apple.com>
1322
1323 * src/ld.cpp: fix for -arch ppc -mdynamic-no-pic -pie so PPC_RELOC_HA16 reloc is used
1324
1325 ----- Tagged ld64-82.3
1326
1327 2008-02-04 Nick Kledzik <kledzik@apple.com>
1328
1329 <rdar://problem/5721186> ld doesn't seem to understand $ld$add$os... and $ld$hide$os... for 10.6 moves
1330 * src/ObjectFile.h: add 10.6
1331 * src/Options.cpp: add 10.6 support
1332 * src/MachOReaderDylib.hpp: recognize $os10.6$
1333
1334
1335 ----- Tagged ld64-82.2
1336
1337 2008-01-30 Devang Patel <dpatel@apple.com>
1338
1339 <rdar://problem/5714833> Can't build 64-bit Intel binaries with LTO
1340 <rdar://problem/5714787> ld64 fails to build with llvm-gcc-4.2
1341 * src/LLVMReader.hpp: Fix character count typo in strncmp call.
1342 Use const char * to initialize temp. string.
1343 * ld64.xcodeproj/project.pbxproj: use $(DEVELOPER_DIR) in header search construction
1344 instead of hard coding /Developer.
1345
1346 ----- Tagged ld64-82.1
1347
1348 2008-01-23 Nick Kledzik <kledzik@apple.com>
1349
1350 * src/MachOReaderRelocatable.hpp: don't bus error if S_LITERAL_POINTERS is missing relocs
1351
1352
1353 2008-01-22 Nick Kledzik <kledzik@apple.com>
1354
1355 <rdar://problem/5695496> ld uses 32-bits in some places to hold addresses when parsing 64-bit mach-o files
1356 * src/MachOReaderRelocatable.hpp: use AddrToAtomMap type that switch address to 64-bits for 64-bit archs
1357 * src/MachOWriterExecutable.hpp: verify BR14 does not overflow for external relocs
1358 * unit-tests/test-cases/relocs-c: update test case to slide addresses to verify x86_64 .o files
1359
1360
1361 ----- Tagged ld64-82
1362
1363 2008-01-18 Nick Kledzik <kledzik@apple.com>
1364
1365 <rdar://problem/5694612> Bad grammar used in ld warning: cannot exported hidden symbol
1366 * src/ld.cpp: fix typo in warning string
1367
1368
1369 2008-01-16 Nick Kledzik <kledzik@apple.com>
1370
1371 <rdar://problem/5565074> Bundle Loader does not work anymore when loader is a bundle
1372 <rdar://problem/5590203> ld warns of incorrect architecture when linking a bundle to a bundle
1373 * src/MachOReaderDylib.hpp: support linking against bundles via -bundle_loader. Clean up error messages
1374 * unit-tests/test-cases/bundle_loader: update test case
1375
1376
1377 2008-01-16 Nick Kledzik <kledzik@apple.com>
1378
1379 <rdar://problem/5366363> ld -r -x creates debug notes (stabs) when it should not with -x (keep only global symbols)
1380 * src/Options.cpp: in reconfigureDefaults() if -r and -x then -S
1381
1382
1383 2008-01-16 Nick Kledzik <kledzik@apple.com>
1384
1385 <rdar://problem/5566068> if ld crashes while writing output file, it should delete the half written file
1386 * src/MachOWriterExecutable.hpp: wrap open/write/close in try block and add signal handlers all to delete
1387 output file on failure.
1388
1389
1390 2008-01-16 Devang Patel <dpatel@apple.com>
1391
1392 * src/LLVMReader.hpp: Use __gnu_cxx::hash_map instead of hash supported by LLVM.
1393
1394
1395 2008-01-16 Nick Kledzik <kledzik@apple.com>
1396
1397 <rdar://problem/5593537> GC-supported library can't be linked into GC-required executable
1398 * src/ld.cpp: loosen constraint that all objc code must be compiled with same GC settings and
1399 allow gc-compatible code to be linked into anything.
1400 * unit-tests/test-cases/objc-gc-checks: update test case
1401
1402
1403 2008-01-15 Nick Kledzik <kledzik@apple.com>
1404
1405 <rdar://problem/5687976> no debug notes for custom named data
1406 * src/ld.cpp: in synthesizeDebugNotes() check getSymbolTableInclusion() instead of for leading underscore
1407 * unit-tests/test-cases/dwarf-debug-notes: update test case
1408
1409 ----- Tagged ld64-81.5
1410
1411 2008-01-14 Devang Patel <dpatel@apple.com>
1412
1413 <rdar://problem/5683813> llvm-gcc-4.2 fails to build Sqlite 3.5.4 with -O4
1414 * src/LLVMReader.hpp: Resolve proxy references. Collect new unbounded references
1415 after optimization.
1416 * src/ld.cpp: Resolve additional unbounded references after optimization.
1417
1418
1419 2008-01-14 Nick Kledzik <kledzik@apple.com>
1420
1421 <rdar://problem/5655246> PPC Leopard (Xcode 3.0) linker ld gets "Bus error" sometimes
1422 * src/MachOReaderRelocatable.hpp: use same code as x86 to parse ppc and arm sect-diff relocs
1423 * src/MachOWriterExecutable.hpp: use same code as x86 to write ppc and arm sect-diff relocs
1424
1425
1426 2008-01-11 Nick Kledzik <kledzik@apple.com>
1427
1428 <rdar://problem/5637618> PPC Leopard (Xcode 3.0) linker ld reports "unknown scattered relocation type 4"
1429 * src/MachOReaderRelocatable.hpp: add PPC_RELOC_HI16 to scattered reloc parsing
1430 * unit-tests/test-cases/relocs-asm/relocs-asm.s: added tests for scattered hi/lo instructions
1431
1432
1433 2008-01-11 Nick Kledzik <kledzik@apple.com>
1434
1435 * doc/man/man1/ld.1: add doc for -no_implicit_dylibs, -read_only_stubs, -slow_stubs, -interposable_list
1436
1437
1438 2008-01-11 Nick Kledzik <kledzik@apple.com>
1439
1440 <rdar://problem/4800212> ld64(1) man page uses ambiguous term "suffix"
1441 * doc/man/man1/ld.1: make meaning of "suffix" more explicit
1442
1443
1444 2008-01-11 Nick Kledzik <kledzik@apple.com>
1445
1446 <rdar://problem/5633081> Obj-C Symbols in Leopard Can't Be Weak Linked
1447 * src/MachOWriterExecutable.hpp: set weak and lazy attributes on dummy .objc_class_name undefines
1448 to dylibs to support Mac OS X 10.3.x dyld
1449
1450
1451 2008-01-11 Nick Kledzik <kledzik@apple.com>
1452
1453 <rdar://problem/5669751> Unknown error with linker (dyld: unknown external relocation type)
1454 * src/ld.cpp: fix crash when SO stabs are not balanced
1455
1456
1457 2008-01-11 Devang Patel <dpatel@apple.com>
1458
1459 <rdar://problem/5667433> LTO does not work if expected output is a dynamic library
1460 * src/LLVMReader.hpp: Supply arguments describing output kind to optimizer. Communicate
1461 visibility info.
1462
1463 2000-01-10 Nick Kledzik <kledzik@apple.com>
1464
1465 <rdar://problem/5680988> __cls_refs section is losing S_LITERAL_POINTERS section type
1466 * src/MachOWriterExecutable.hpp: special case __cls_refs section
1467 * unit-tests/test-cases/objc-literal-pointers: add test case
1468
1469
1470 2008-01-03 Nick Kledzik <kledzik@apple.com>
1471
1472 <rdar://problem/5667688> wrong EH information might be used
1473 Created new kGroupSubordinate reference kind to model group comdat. The "signature" atom
1474 has kGroupSubordinate references to the other atoms in the group. If the signature atom
1475 is coalesced away, the linker follows kGroupSubordinate references and throws away the
1476 other members of the group.
1477 * unit-tests/test-cases/eh-coalescing: added test case
1478 * src/ld.cpp: added markDead() and use propagate to subordinates
1479 * src/Architectures.hpp: added kGroupSubordinate
1480 * src/MachOReaderRelocatable.hpp: add kGroupSubordinate reference from a function to its .eh atom
1481 and if used, from .eh atom to its LSDA atom.
1482 * src/MachOWriterExecutable.hpp: handle kGroupSubordinate like kNoFixUp
1483
1484 ----- Tagged ld64-81.4.1
1485
1486 2007-12-19 Devang Patel <dpatel@apple.com>
1487
1488 * src/LLVMReader.hpp: Add LLVM_LTO_VERSION #ifdef check.
1489
1490 2007-12-19 Devang Patel <dpatel@apple.com>
1491
1492 * src/LLVMReader.hpp: Add fOptimizer NULL check before calling printVersion().
1493
1494 2007-12-19 Devang Patel <dpatel@apple.com>
1495
1496 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
1497 * src/LLVMReader.hpp: Add printLLVMVersion() to print llvm version string in verbose mode.
1498 * src/Options.cpp: Use printLLVMVersion() in verbose mode.
1499
1500 2007-12-19 Devang Patel <dpatel@apple.com>
1501
1502 <rdar://problem/5655956> print LLVM LTO version number in verbose mode
1503 * src/Options.h: Add verbose() method to check fVerbose flag.
1504 * src/LLVMReader.hpp: Print LLVM version string in verbose mode.
1505
1506 ----- Tagged ld64-81.4
1507
1508 2007-12-18 Devang Patel <dpatel@apple.com>
1509
1510 * src/LLVMReader.hpp: Invalidate input architecture when optimizer is not available.
1511
1512 ----- Tagged ld64-81.3
1513
1514 2007-12-17 Nick Kledzik <kledzik@apple.com>
1515
1516 * ld64.xcodeproj/project.pbxproj: remove extraneous header search paths
1517
1518
1519 2007-12-17 Devang Patel <dpatel@apple.com>
1520
1521 * src/LLVMReader.hpp: Do not throw exception if LLVMReader is not able to
1522 dlopen LTO library. Instead just flag input file as an invalid LLVM bitcode file.
1523
1524
1525 2007-12-14 Nick Kledzik <kledzik@apple.com>
1526
1527 <rdar://problem/5645908> gcc DejaGnu failure: gcc.dg/20020312-2.c (test for excess errors) (-fstack-protector-all)
1528 * src/MachOWriterExecutable.hpp: fix Writer<x86>::generatesExternalTextReloc() to allow text relocs
1529 * unit-tests/test-cases/read-only-relocs: updated test case to link a dynamic main executable compiled with -static
1530
1531
1532 2007-12-14 Devang Patel <dpatel@apple.com>
1533
1534 <rdar://problem/5648438> Enable Link Time Optimization in Opal
1535 * src/LLVMReader.hpp: Locate LLVMlto.dylib relative to ld location in Developer folder.
1536 * ld64.xcodeproj/project.pbxproj: Add {DEVELOPER_DIR}/usr/include in header search path.
1537 * unit-tests/run-all-unit-tests: Set DYLD_FALLBACK_LIBRARY_PATH to find LLVMlto.dylib during unit testing.
1538 * unit-tests/testcases/llvm-integration/Makefile: Point LLVMGCC and LLVMGXX to llvm-gcc-4.2 in Developer folder during unit testing.
1539
1540
1541 2007-12-13 Nick Kledzik <kledzik@apple.com>
1542
1543 <rdar://problem/5645446> SWB: failures due to ld: pointer in read-only segment not allowed in slidable image, used in ...
1544 * src/MachOReaderRelocatable.hpp: in Reader<x86>::addRelocReference() handle weak pc-rel 32-bit vanilla relocs properly
1545
1546 ----- Tagged ld64-81.2
1547
1548
1549
1550 2007-12-07 Nick Kledzik <kledzik@apple.com>
1551
1552 <rdar://problem/5615298> support 8-bit relocations for i386
1553 * src/Architectures.hpp: add kPCRel8
1554 * src/MachOReaderRelocatable.hpp: support 8-bit pc-rel relocations for intel
1555 * src/MachOWriterExecutable.hpp: support 8-bit pc-rel relocations for intel
1556 * unit-tests/test-cases/relocs-asm: add test cases
1557
1558
1559 ----- Tagged ld64-81.1
1560
1561 2007-12-06 Nick Kledzik <kledzik@apple.com>
1562
1563 * src/MachOReaderDylib.hpp: rework cycle detection to remove some false positives
1564
1565
1566 2007-12-05 Nick Kledzik <kledzik@apple.com>
1567
1568 <rdar://problem/5628149> Duplicate probe firings in Security.framework
1569 * src/ld.cpp: check dtrace probe sites are not in fDeadAtoms before using
1570 * unit-tests/test-cases/dtrace-static-probes-coalescing: add test case
1571
1572
1573 2007-12-05 Nick Kledzik <kledzik@apple.com>
1574
1575 * src/MachOReaderRelocatable.hpp: fix CFString coalescing to work with -fwritable-strings
1576 * unit-tests/test-cases/cfstring-coalesce: add -fwritable-strings to test case
1577
1578
1579 ----- Tagged ld64-81
1580
1581 2007-11-15 Nick Kledzik <kledzik@apple.com>
1582
1583 <rdar://problem/4196067> ld64 should support runtime text relocations
1584 * src/MachOWriterExecutable.hpp: add generatesLocalTextReloc() and generatesExternalTextReloc()
1585 * src/Options.cpp: process -read_only_relocs option
1586 * src/Options.h: add allowTextRelocs() and warnAboutTextRelocs()
1587 * src/MachOReaderRelocatable.hpp: add hasLongBranchStubs()
1588 * src/machochecker.cpp: allow relocs in read only segments, if section flags are set
1589 * unit-tests/test-cases/read-only-relocs: update test case
1590
1591
1592 2007-11-08 Devang Patel <dpatel@apple.com>
1593
1594 * ld64.xcodeproj/project.pbxproj: add new build phase "build configure.h" for
1595 ld target.
1596 * src/ld.cpp: Include "configure.h"
1597
1598
1599 ----- Tagged ld64-80.11
1600
1601 2008-02-12 Nick Kledzik <kledzik@apple.com>
1602
1603 <rdar://problem/5741312> Wrong section name for objc info for ARM when OBJC2 is used
1604 * src/MachOWriterExecutable.hpp: switch segment/section name for ARM objc2 image info
1605
1606 ----- Tagged ld64-80.10
1607
1608 2008-02-11 Nick Kledzik <kledzik@apple.com>
1609
1610 <rdar://problem/5733578> ld64 does not support -aspen_version_min 2.0
1611 * src/Options.cpp: allow 2.x for -aspen_version_min
1612
1613
1614 2008-02-11 Nick Kledzik <kledzik@apple.com>
1615
1616 <rdar://problem/5733575> ld_classic: unknown flag: -aspen_version_min
1617 * src/Options.cpp: change -aspen_version_min x.x to -macosx_version_min 10.5 when invoking ld_classic
1618
1619
1620 ----- Tagged ld64-80.9
1621
1622 2008-01-29 Nick Kledzik <kledzik@apple.com>
1623
1624 <rdar://problem/5713054> -iphone_version_min ==> -aspen_version_min
1625 * src/Options.cpp: support -aspen_version_min
1626
1627
1628 ----- Tagged ld64-80.8
1629
1630 2008-01-10 Nick Kledzik <kledzik@apple.com>
1631
1632 * src/Options.cpp: support transition to new objc ABI for ARM by allowing old .objc_class_name_*
1633 style names in export files and map them to new _OBJC_CLASS_$_ style names.
1634
1635
1636 ----- Tagged ld64-80.7
1637
1638 2008-01-02 Nick Kledzik <kledzik@apple.com>
1639
1640 <rdar://problem/5572168> BigBear5A18 isn't fully prebound
1641 * src/Options.cpp: make fNeedsModuleTable true for arm
1642
1643 ----- Tagged ld64-80.6
1644
1645 2007-11-30 Nick Kledzik <kledzik@apple.com>
1646
1647 <rdar://problem/5620976> -iphone_version_min
1648 * src/Options.cpp: handle -iphone_version_min option
1649
1650
1651 ----- Tagged ld64-80.5
1652
1653 2007-11-26 Nick Kledzik <kledzik@apple.com>
1654
1655 <rdar://problem/5601142> need to special case some dylibs in seg_addr_table
1656 * src/Options.cpp: retry seg_add_table lookup for a couple of unusual dylibs
1657
1658
1659 ----- Tagged ld64-80.4
1660
1661 2007-11-06 Nick Kledzik <kledzik@apple.com>
1662
1663 * src/MachOReaderRelocatable.hpp: fix parsing of external and scattered thumb branch22 relocs
1664 * unit-tests/test-cases/thumb-blx: add test case to keep blx issues from coming back
1665
1666 ----- Tagged ld64-80.3
1667
1668 2007-11-03 Nick Kledzik <kledzik@apple.com>
1669
1670 * src/MachOReaderRelocatable.hpp: remove recalc of dstAddr which could cause thumb branches to be +2
1671 * src/MachOWriterExecutable.hpp: remove incorrect test for relocateableExternal
1672
1673 ----- Tagged ld64-80.2
1674
1675 2007-11-01 Nick Kledzik <kledzik@apple.com>
1676
1677 * src/ld.cpp: hack my own prototype for log2() until math.h is cleaned up
1678
1679
1680 ----- Tagged ld64-80.1
1681
1682 2007-11-01 Nick Kledzik <kledzik@apple.com>
1683
1684 * ld64.xcodeproj/project.pbxproj: add HEADER_SEARCH_PATHS for cross builds
1685 * src/ld.cpp: temporarily disable LLVM_SUPPORT
1686 * src/MachOWriterExecutable.hpp: Don't use CC_MD5() directly
1687
1688
1689 2007-10-26 Nick Kledzik <kledzik@apple.com>
1690
1691 <rdar://problem/5556038> Cannot build with libm_static.a statically linked
1692 * src/MachOWriterExecutable.hpp: Fix makesExternalRelocatableReference() for -r -d case
1693 * unit-tests/test-cases/tentative-to-real-hidden: add test case
1694
1695
1696 ----- Tagged ld64-80
1697
1698 2007-10-24 Nick Kledzik <kledzik@apple.com>
1699
1700 <rdar://problem/4222696> linker should probably warn about trying to export a hidden symbol
1701 * src/ld.cpp: if using -exported_symbols_list check each hidden atom as it is added to symbol table
1702 * src/Options.h,.cpp: add hasExportMaskList()
1703 * unit-tests/test-cases/exported_symbols_list-hidden: added test case
1704
1705
1706 2007-10-24 Nick Kledzik <kledzik@apple.com>
1707
1708 * src/MachOWriterExecutable.hpp: keep old style dtrace probes externel for kernel builds
1709
1710
1711 2007-10-23 Nick Kledzik <kledzik@apple.com>
1712
1713 <rdar://problem/4556199> unify error and warning messages
1714 <rdar://problem/5546450> -w should suppress warnings
1715 * src/ld.cpp: use warning() function
1716 * src/Options.h: remove emitWarnings()
1717 * src/MachOReaderDylib.hpp: use warning() function
1718 * src/MachOReaderRelocatable.hpp: use warning() function
1719 * src/Options.cpp: use and implement warning()
1720 * src/MachOWriterExecutable.hpp: use warning() function
1721 * unit-tests/test-cases/visibility-warning: verify -w suppresses warnings
1722
1723
1724 2007-10-23 Devang Patel <dpatel@apple.com>
1725
1726 * src/ld.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
1727 * src/LLVMReader.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
1728 * src/MachOReaderDylib.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
1729 * src/ObjectFile.h: Cover arm support inside __OPEN_SOURCE__ macro check.
1730 * src/MachOReaderRelocatable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
1731 * src/OpaqueSection.hpp: Cover arm support inside __OPEN_SOURCE__ macro check
1732 * src/MachOWriterExecutable.hpp: Cover arm support inside __OPEN_SOURCE__ macro check.
1733 * src/ObjectDump.cpp: Cover arm support inside __OPEN_SOURCE__ macro check.
1734
1735
1736 2007-10-22 Nick Kledzik <kledzik@apple.com>
1737
1738 * src/Options.cpp: add support for LD_DEAD_STRIP and LD_WARN_COMMONS
1739 * src/MachOReaderRelocatable.hpp: fix problem with -dead_strip of ObjC literal pointers
1740
1741
1742 2007-10-22 Nick Kledzik <kledzik@apple.com>
1743
1744 * src/Options.cpp: have -static arm code link with ld_classic (for now)
1745
1746
1747 2007-10-22 Nick Kledzik <kledzik@apple.com>
1748
1749 <rdar://problem/5396826> Recognize all arm architectures
1750 * src/MachOReaderRelocatable.hpp: add support for all ARM sub-types
1751 * unit-tests/test-cases/cpu-sub-types: add test cases for all combinations of ARM sub-types
1752
1753
1754 2007-10-19 Nick Kledzik <kledzik@apple.com>
1755
1756 * src/*: merge in arm support
1757 * unit-tests/test-cases/*: fix to work for arm and thumb
1758
1759 ----- Tagged ld64-79
1760
1761 2007-10-16 Nick Kledzik <kledzik@apple.com>
1762
1763 * src/MachOWriterExecutable.hpp: if -r mode, always set custom alignment (SET_COMM_ALIGN) on common symbols
1764 * unit-tests/test-cases/visibility-warning-dylib-v-archive/Makefile: fix warning
1765 * unit-tests/test-cases/static-executable/Makefile: fix spurious failure
1766
1767
1768 2007-10-16 Nick Kledzik <kledzik@apple.com>
1769
1770 * src/MachOWriterExecutable.hpp: fix edge case in branch island generation
1771
1772
1773 2007-10-12 Nick Kledzik <kledzik@apple.com>
1774
1775 <rdar://problem/5323449> Add option to create old, slow stubs for i386
1776 * src/ObjectFile.h/.cpp: support -read_only_stubs
1777 * src/MachOWriterExecutable.hpp: enhance StubAtom<x86> to support old style __symbol_stub/__la_symbol_ptr stubs
1778 * unit-tests/test-cases/slow-x86-stubs: add test case
1779
1780
1781 2007-10-12 Nick Kledzik <kledzik@apple.com>
1782
1783 <rdar://problem/5427952> ld64's re-export cycle detection logic prevents use of X11 libGL on Leopard
1784 * src/Options.cpp: in findFileUsingPaths() don't search for embedded dylibs
1785 * unit-tests/test-cases/indirect-path-search/Makefile: added case for a dylib embedded in a framework
1786
1787
1788 2007-10-11 Nick Kledzik <kledzik@apple.com>
1789
1790 <rdar://problem/5451987> add option to disable implicit load commands for indirectly used public dylibs
1791 * src/Options.cpp: add support for -no_implicit_dylibs
1792 * src/ObjectFile.h: add fImplicitlyLinkPublicDylibs
1793 * src/MachOReaderDylib.hpp: test fImplicitlyLinkPublicDylibs before hoisting an implicitly linked dylib
1794 * unit-tests/test-cases/implicit_dylib: add test case
1795
1796
1797 2007-10-11 Nick Kledzik <kledzik@apple.com>
1798
1799 <rdar://problem/5254413> -interposable_list
1800 * src/Options.h/cpp: Add fInterposeList and fInterposeMode to support -interposable_list
1801 * src/MachOWriterExecutable.hpp: pass symbol name to fOptions.interposable()
1802 * unit-tests/test-cases/interposable_list: add test case
1803
1804
1805 2007-10-10 Nick Kledzik <kledzik@apple.com>
1806
1807 <rdar://problem/5529626> If only weak_import symbols are used, linker should use LD_LOAD_WEAK_DYLIB
1808 * src/MachOWriterExecutable.hpp: automatically use LC_LOAD_WEAK_DYLIB if all symbols used from a dylib are weak_import
1809 * unit-tests/test-cases/weak_dylib: added test case
1810
1811
1812 2007-10-10 Nick Kledzik <kledzik@apple.com>
1813
1814 <rdar://problem/5504954> linker does not error when dylib ordinal exceeds 250
1815 * src/MachOWriterExecutable.hpp: error out if ordinals exceed max allowed
1816
1817
1818 2007-10-10 Nick Kledzik <kledzik@apple.com>
1819
1820 <rdar://problem/4067110> overriding 'operator new' or 'operator delete' fails if no weak symbols are present
1821 * src/ld.cpp: at end of checkUndefines() search dylibs for weak versions of any global external symbols
1822 * src/ObjectFile.h: add hasWeakExternals() method to Reader
1823 * src/MachOReaderDylib.hpp: implement hasWeakExternals() method in Reader
1824 * src/ExecutableFile.h: add overridesDylibWeakDefines parameter to write()
1825 * src/MachOWriterExecutable.hpp: use overridesDylibWeakDefines parameter to write()
1826 * unit-tests/test-cases/operator-new: add test case
1827
1828
1829 2007-10-05 Nick Kledzik <kledzik@apple.com>
1830
1831 <rdar://problem/5048861> No warning about tentative definition conflicting with dylib definition
1832 <rdar://problem/5132652> .comm variables in shared library, worked with XCode 2.4.1, broken with XCode 3?
1833 * src/ld.cpp: at end of checkUndefines() verify if any remaining commons conflict with dylibs
1834 * doc/man/man1/ld.1: document -commons and -warn_commons options
1835 * unit-tests/test-cases/tentative-and-dylib: added test case
1836
1837
1838 2007-10-05 Nick Kledzik <kledzik@apple.com>
1839
1840 <rdar://problem/5346331> NS/CFString constants are not dead strippable
1841 * src/MachOReaderRelocatable.hpp: break up __cfstring section into one atom per cfstring, make them coalesable
1842 * unit-tests/test-cases/cfstring-coalesce: added test case
1843
1844
1845 2007-10-05 Nick Kledzik <kledzik@apple.com>
1846
1847 <rdar://problem/5524973> Dead stripping + exported symbols list using wildcards doesn't seem to do the right thing
1848 * src/Options.cpp/h: add hasWildCardExportRestrictList()
1849 * src/ld.cpp: if dead stripping code and have wildcard exports, add all global atoms matching wildcards as roots
1850 * unit-tests/test-cases/exported-symbols-wildcards-dead_strip: added test case
1851
1852
1853 2007-10-04 Nick Kledzik <kledzik@apple.com>
1854
1855 <rdar://problem/5433882> ld shouldn't search /Network/Library/Frameworks by default
1856 * src/Options.cpp: remove /Network/Library/Frameworks/ from default search path
1857 * doc/man/man1/ld.1: document the change
1858
1859
1860 2007-10-04 Nick Kledzik <kledzik@apple.com>
1861
1862 <rdar://problem/5341567> all binaries should get LD_UUID load commands, not just those with DWARF symbols
1863 * src/ld.cpp: default fCreateUUID to be true for non object file output types
1864 * unit-tests/test-cases/no-uuid/Makefile: update test case to match new rules
1865
1866
1867 ----- Tagged ld64-78
1868
1869 2007-09-27 Nick Kledzik <kledzik@apple.com>
1870
1871 <rdar://problem/5476313> range check load commands
1872 * src/MachOReaderDylib.hpp: check that load commands all fit in load command size from header
1873 * src/MachOReaderRelocatable.hpp: check that load commands all fit in load command size from header
1874
1875
1876 2007-09-27 Nick Kledzik <kledzik@apple.com>
1877
1878 <rdar://problem/5433355> Xc8M2540a: ld64 crashes when linking Pascal program
1879 * src/ld.cpp: fix findAtomAndOffset() to handle where there are no function atoms
1880
1881
1882 2007-09-27 Nick Kledzik <kledzik@apple.com>
1883
1884 <rdar://problem/5241179> ADOBE Xcode 3: ld -dead_strip does not work with -init from an archive
1885 * src/ld.cpp: add bool parameter to entryPoint() so -init atom not looked for too soon
1886 * unit-tests/test-cases/dead_strip-init-archive: added test case
1887
1888
1889 2007-09-26 Nick Kledzik <kledzik@apple.com>
1890
1891 <rdar://problem/5459546> Spurious link warnings for inline members of C++ template classes
1892 * src/ld.cpp: check definition kinds before warning about visibility mismatches
1893 * unit-tests/test-cases/visibility-warning: added test case
1894
1895
1896 2007-09-26 Nick Kledzik <kledzik@apple.com>
1897
1898 <rdar://problem/5394172> an empty .o file with zero load commands will crash linker
1899 * src/MachOReaderRelocatable.hpp: have Reader constructor return early of no load commands
1900 * unit-tests/test-cases/empty-object: added test case
1901
1902
1903 2007-09-26 Nick Kledzik <kledzik@apple.com>
1904
1905 <rdar://problem/5453384> 9a527: ppc64 branch islands fail with 4GB pagezeo
1906 * src/MachOWriterExecutable.hpp: start range calculations at start of __text not at zero.
1907
1908
1909 ----- Tagged ld64-77 (Xcode 3.0)
1910
1911 2007-07-23 Nick Kledzik <kledzik@apple.com>
1912
1913 <rdar://problem/5351380> Kernel is linked with some global symbols unsorted
1914 * src/MachOWriterExecutable.hpp: Add NListNameSorter to allow global atoms and extra labels to be sorted
1915
1916
1917 2007-07-20 Nick Kledzik <kledzik@apple.com>
1918
1919 <rdar://problem/5254468> Can't do objc_msgSendSuper dispatches after loading a Fix&Continue bundle
1920 * src/MachOWriterExecutable.hpp: when calculating what kind of reloc to use, never use an
1921 external reloc to reference 32-bit ObjC symbols.
1922
1923
1924 2007-07-20 Nick Kledzik <kledzik@apple.com>
1925
1926 <rdar://problem/5349847> Runtime crash with ICC math library on Leopard
1927 * src/MachOReaderRelocatable.hpp: detect if section starts with a symbol that is not
1928 aligned to section and correct it.
1929
1930
1931 ----- Tagged ld64-76
1932
1933 2007-06-29 Nick Kledzik <kledzik@apple.com>
1934
1935 <rdar://problem/5303718> export hiding does not work for frameworks
1936 * src/MachOReaderDylib.hpp: fix checks in isPublicLocation()
1937 * unit-tests/test-cases/symbol-moving: update to test frameworks as well as dylibs
1938
1939
1940 2007-06-27 Nick Kledzik <kledzik@apple.com>
1941
1942 <rdar://problem/5299907> linker should use undefines from flat dylibs when linking a main flat
1943 * src/ObjectFile.h: added fLinkingMainExecutable
1944 * src/Options.cpp: set up fLinkingMainExecutable
1945 * src/MachOReaderDylib.hpp: when linking a main executable for flat namespace, the reader for
1946 any loaded flat namespace dylib will have a new atoms that has references to all undefined
1947 symbols in the dylib
1948 * unit-tests/test-cases/flat-indirect-undefines: added test case
1949 * doc/man/man1/ld.1: update man page to describe when dylib undefines are used
1950
1951
1952 2007-06-27 Nick Kledzik <kledzik@apple.com>
1953
1954 <rdar://problem/5277857> OpenGL.framework and X11 both have a libGL.dylib which can cause ld to segfault if both are found
1955 * src/MachOReaderDylib.hpp: add assertNoReExportCycles() method
1956 * unit-tests/test-cases/dylib-re-export-cycle: added test case
1957
1958
1959 2007-06-27 Nick Kledzik <kledzik@apple.com>
1960
1961 <rdar://problem/5286462> ld64 has slightly different warning message formats than the old ld
1962 * src/ld.cpp: standardize all warning messages to start with "ld: warning"
1963 * src/MachOWriterExecutable.hpp: ditto
1964 * src/MachOReaderRelocatable.hpp: ditto
1965 * src/MachOReaderDylib.hpp:ditto
1966
1967
1968 2007-06-26 Nick Kledzik <kledzik@apple.com>
1969
1970 <rdar://problem/5297034> -dead_strip can cause duplicate external commons
1971 * src/ld.cpp: don't use discarded coalesced global atoms as dead strip roots
1972 * src/machochecker.cpp: error if duplicate external symbols
1973 * unit-tests/test-cases/commons-coalesced-dead_strip: added test case
1974
1975
1976 2007-06-26 Nick Kledzik <kledzik@apple.com>
1977
1978 <rdar://problem/4135857> update man page that linker does not search indirect libraries with two-level namespace
1979 * doc/man/man1/ld.1: add new "Indirect dynamic libraries" section to man page
1980
1981
1982 2007-06-26 Nick Kledzik <kledzik@apple.com>
1983
1984 <rdar://problem/5285473> Xc9A466: Exports file cannot use Mac line ends
1985 * src/Options.cpp: check for \r or \n when parsing .exp files
1986 * unit-tests/test-cases/exported_symbols_list-eol: added test case
1987
1988
1989 ----- Tagged ld64-75
1990
1991 2007-05-31 Nick Kledzik <kledzik@apple.com>
1992
1993 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
1994 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
1995
1996
1997 ----- Tagged ld64-74.5
1998
1999 2007-05-31 Nick Kledzik <kledzik@apple.com>
2000
2001 <rdar://problem/5241902> set OSO timestamp to zero for when building in buildit
2002 * src/ld.cpp: check for RC_RELEASE and if exists set all OSO timestamps to zero
2003
2004
2005 2007-05-30 Nick Kledzik <kledzik@apple.com>
2006
2007 <rdar://problem/5224676> BUILD_STABS now causes ld of xnu to bus error
2008 * src/ld.cpp: Change || to && in collectStabs()
2009
2010
2011 ----- Tagged ld64-74.4
2012
2013 2007-05-18 Nick Kledzik <kledzik@apple.com>
2014
2015 <rdar://problem/5211667> static probes don't work with libraries in dyld shared cache
2016 * src/OpaqueSection.hpp: the __TEXT segment is executable
2017
2018
2019 ----- Tagged ld64-74.3
2020
2021 2007-05-16 Nick Kledzik <kledzik@apple.com>
2022
2023 <rdar://problem/5201463> ppc: linker adds stubs to cstring references
2024 * src/MachOWriterExecutable.hpp: update ppc stubableReference() to only allow high/low references
2025 to be stubed if they reference a symbol in some other dylib.
2026 * unit-tests/test-cases/stub-generation: added test case
2027
2028
2029 2007-05-16 Nick Kledzik <kledzik@apple.com>
2030
2031 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2032 * src/MachOWriterExecutable.hpp: factored local tests into indirectSymbolIsLocal()
2033 * unit-tests/test-cases/non-lazy-r: added test case
2034
2035
2036 2007-05-15 Nick Kledzik <kledzik@apple.com>
2037
2038 <rdar://problem/5198807> ld64 drops fix&continue bit in __OBJC, __image_info.
2039 * src/MachOReaderRelocatable.hpp: implement objcReplacementClasses()
2040
2041
2042 2007-05-15 Nick Kledzik <kledzik@apple.com>
2043
2044 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2045 * src/MachOReaderRelocatable.hpp: use strncmp() for __objc_imageinfo since it is 16 bytes long
2046 * src/MachOWriterExecutable.hpp: specialize segment/section names for synthesized objc image info section
2047
2048
2049 2007-05-15 Nick Kledzik <kledzik@apple.com>
2050
2051 * unit-tests/include/common.makefile: set COMPILER_PATH so harness works with latest compiler
2052
2053
2054 ----- Tagged ld64-74.2
2055
2056 2007-05-11 Nick Kledzik <kledzik@apple.com>
2057
2058 <rdar://problem/5195447> ld64-74.1 breaks libstdc++ DejaGnu test (G5 only)
2059 * src/MachOWriterExecutable.hpp: don't stub a reference if the target offset is non-zero
2060
2061
2062 ----- Tagged ld64-74.1
2063
2064 2007-05-09 Nick Kledzik <kledzik@apple.com>
2065
2066 * src/Options.h: add emitWarnings()
2067 * src/Options.cpp: wire up -w to emitWarnings()
2068
2069
2070 2007-05-09 Nick Kledzik <kledzik@apple.com>
2071
2072 <rdar://problem/5137285> ld64 won't link wine (regression from Tiger)
2073 * src/Architectures.hpp: add x86::kPointerDiff16 and x86::kPCRel16
2074 * src/MachOReaderRelocatable.hpp: add support to parse new relocs
2075 * src/MachOWriterExecutable.hpp: add support fo new relocs
2076
2077
2078 2007-05-08 Nick Kledzik <kledzik@apple.com>
2079
2080 <rdar://problem/5182537> need way for ld and dyld to see different exported symbols in a dylib
2081 * src/MachOReaderDylib.hpp: update parse and use $ld$ symbols
2082 * src/Options.h: move VersionMin to ReaderOptions
2083 * src/ObjectFile.h: move VersionMin to ReaderOptions
2084 * src/Options.cpp: move VersionMin to ReaderOptions
2085 * src/MachOWriterExecutable.hpp: move VersionMin to ReaderOptions
2086 * unit-tests/test-cases/symbol-moving: added test case
2087
2088
2089 2007-05-03 Nick Kledzik <kledzik@apple.com>
2090
2091 <rdar://problem/5181105> typo in error message for linking -pie
2092 * src/MachOWriterExecutable.hpp: fix typo in error messages
2093
2094
2095 ----- Tagged ld64-74
2096
2097 2007-05-03 Nick Kledzik <kledzik@apple.com>
2098
2099 <rdar://problem/5171880> ld64 can't find @executable _path relative dylibs from our umbrella frameworks
2100 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
2101 * src/ObjectFile.h: add from parameter to findDylib()
2102 * src/MachOReaderDylib.hpp: supply from parameter to findDylib()
2103 * src/ld.cpp: use from parameter for @loader_path substitution in findDylib()
2104 * unit-tests/test-cases/re-export-relative-paths: added test case
2105
2106
2107 2007-05-02 Nick Kledzik <kledzik@apple.com>
2108
2109 * src/ObjectFile.h: add fLogObjectFiles and fLogAllFiles
2110 * src/Options.cpp: hook up -t to fLogAllFiles and -whatsloaded to fLogObjectFiles
2111 * src/MachOReaderDylib.hpp: log if fLogAllFiles
2112 * src/MachOReaderRelocatable.hpp: log if fLogObjectFiles or fLogAllFiles
2113 * src/MachOReaderArchive.hpp: log if fLogAllFiles
2114 * doc/man/man1/ld.1: update man page
2115
2116
2117 2007-05-02 Nick Kledzik <kledzik@apple.com>
2118
2119 <rdar://problem/5177848> typo in message, frameowrk
2120 * src/Options.cpp: fix typo
2121
2122
2123 2007-05-01 Nick Kledzik <kledzik@apple.com>
2124
2125 <rdar://problem/4977301> "ld" man page is missing the description for many options
2126 * doc/man/man1/ld.1: add documentation on all obsolete options
2127
2128
2129 2007-05-01 Nick Kledzik <kledzik@apple.com>
2130
2131 <rdar://problem/5113424> ld doesn't handle -mlong-branch .o files that have had local symbols stripped
2132 <rdar://problem/4965359> warning about dwarf line info with -mlong-branch
2133 * src/MachOReaderRelocatable.hpp: don't lop -mlong-branch stubs off end of functions
2134 * src/MachOWriterExecutable.hpp: allow code references besides BR24 to be stubable
2135
2136
2137 2007-04-30 Nick Kledzik <kledzik@apple.com>
2138
2139 <rdar://problem/5065659> unable to link VTK because __textcoal_nt too large
2140 * src/MachOReaderRelocatable.hpp: when doing a final link map __textcoal_nt to __text
2141
2142
2143 2007-04-30 Nick Kledzik <kledzik@apple.com>
2144
2145 <rdar://problem/5062685> ld does not report error when -r is used and exported symbols are not defined.
2146 <rdar://problem/4637139> ld leaves global common symbols not in exported symbols list.
2147 * src/ld.cpp: stop special casing -r mode in checkUndefines()
2148 * src/MachOWriterExecutable.hpp: don't create proxy atom in -r mode if it is supposed to be exported.
2149 mark tentative definitions are private extern in -r mode even without -keep_private_externs
2150 * unit-tests/test-cases/exported_symbols_list-r: added test case
2151
2152
2153 2007-04-27 Nick Kledzik <kledzik@apple.com>
2154
2155 <rdar://problem/5137732> ld should keep looking when it finds a weak definition in a dylib
2156 * src/ld.cpp: modified addJustInTimeAtoms() to keep looking when a weak defintion is found
2157 * unit-tests/test-cases/weak-def-ordinal: added test case
2158
2159
2160 2007-04-27 Nick Kledzik <kledzik@apple.com>
2161
2162 <rdar://problem/5166572> better error message for indirect dylibs missing required architecture
2163 * src/ld.cpp: when loading indirect dylib add path to error messages
2164
2165
2166 2007-04-25 Nick Kledzik <kledzik@apple.com>
2167
2168 <rdar://problem/5109373> the i386 slice of dyld does not need __IMPORT segment
2169 * src/ObjectFile.h: add fForDyld
2170 * src/Options.cpp: set up fForDyld
2171 * src/MachOReaderRelocatable.hpp: if fForDyld, change __IMPORT segment to __DATA
2172 * src/MachOWriterExecutable.hpp: recognize __DATA/__pointers in dyld as a non-lazy section
2173
2174
2175 2007-04-24 Nick Kledzik <kledzik@apple.com>
2176
2177 <rdar://problem/5008421> ppc64: need to make LOCAL indirect symbol table entry for now local symbol
2178 * src/MachOWriterExecutable.hpp: use INDIRECT_SYMBOL_LOCAL for any non-global symbol
2179 * unit-tests/test-cases/strip_local: update test case
2180
2181
2182 2007-04-24 Nick Kledzik <kledzik@apple.com>
2183
2184 <rdar://problem/5150407> ld64 -sectorder and -order_file files don't accept white space following the :
2185 * src/Options.cpp: prune white space after colon and before symbol name
2186 * unit-tests/test-cases/order_file: update test case to have a space after the colon
2187
2188
2189 2007-04-24 Nick Kledzik <kledzik@apple.com>
2190
2191 <rdar://problem/5055233> ld64 corrupts debug symbol table entries, nm doesn't print them
2192 * src/MachOWriterExecutable.hpp: properly set ilocalsym in module table
2193
2194
2195 2007-04-24 Nick Kledzik <kledzik@apple.com>
2196
2197 <rdar://problem/5066152> support __image_info in __DATA segment for 64-bits
2198 * src/MachOReaderRelocatable.hpp: look for new objc info section name too
2199
2200
2201 2007-04-24 Nick Kledzik <kledzik@apple.com>
2202
2203 * src/MachOWriterExecutable.hpp: fix -non_global_symbols_strip_list to work with -r
2204 * unit-tests/test-cases/local-symbol-partial-stripping: update test case
2205
2206
2207
2208 ----- Tagged ld64-73.7
2209
2210 2007-05-10 Nick Kledzik <kledzik@apple.com>
2211
2212 <rdar://problem/5194804> can't use dtrace static probes in x86_64 dylib
2213 * src/MachOWriterExecutable.hpp: x86_64:kPointerDiff32 is ok in shared region
2214 * unit-tests/test-cases/dtrace-static-probes: update to build dylib too
2215
2216
2217 2007-05-09 Nick Kledzik <kledzik@apple.com>
2218
2219 <rdar://problem/5191610> 9A430: using -dead_strip with static dtrace probes causes ld to crash
2220 * src/ld.cpp: fix markLive() to look at right name in dtrace probe refernce
2221 * unit-tests/test-cases/dtrace-static-probes: added -dead_strip case
2222
2223
2224 ----- Tagged ld64-73.6
2225
2226 2007-04-17 Nick Kledzik <kledzik@apple.com>
2227
2228 <rdar://problem/5140897> Add options to do partial stripping of local symbols
2229 * src/MachOWriterExecutable.hpp: use fOptions.keepLocalSymbol()
2230 * src/Options.cpp: implement -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2231 * src/Options.h: replace stripLocalSymbols() with localSymbolHandling() and keepLocalSymbol()
2232 * doc/man/man1/ld.1: document -non_global_symbols_no_strip_list and -non_global_symbols_strip_list
2233 * unit-tests/test-cases/local-symbol-partial-stripping: added test case
2234
2235
2236 ----- Tagged ld64-73.5
2237
2238 2007-04-17 Nick Kledzik <kledzik@apple.com>
2239
2240 <rdar://problem/5129379> ld64-73.3 XBS logging incorrectly reporting "direct" dynamic libraries
2241 * src/ld.cpp: restore direct vs indirect library for LD_TRACE_DYLIBS logging
2242
2243
2244 2007-04-16 Nick Kledzik <kledzik@apple.com>
2245
2246 <rdar://problem/5067034> data initialized to a weak imported symbol is missing relocation
2247 * src/MachOWriterExecutable.hpp: check for A::kPointerWeakImport in buildExecutableFixups()
2248 * unit-tests/test-cases/weak_import: updated test case to catch this problem
2249
2250
2251 2007-04-13 Nick Kledzik <kledzik@apple.com>
2252
2253 <rdar://problem/5071047> Support -U
2254 * src/MachOWriterExecutable.hpp: create proxies for -U symbols
2255 * src/Options.cpp: process -U
2256 * src/Options.h: add allowedUndefined() and someAllowedUndefines()
2257 * src/ld.cpp: create proxies for -U symbols
2258 * doc/man/man1/ld.1: document -U and -undefined options
2259 * unit-tests/test-cases/undefined-dynamic-lookup: added test case
2260
2261
2262 ----- Tagged ld64-73.4
2263
2264 2007-04-12 Nick Kledzik <kledzik@apple.com>
2265
2266 <rdar://problem/5125280> ld changes needed to support read-only DOF
2267 * src/Options.cpp: remove -read_only_dof
2268 * src/Options.h: remove fReadOnlyDOFs
2269 * src/ld.cpp: only generate read-only DOF sections
2270
2271
2272 ----- Tagged ld64-73.3.1
2273
2274 2007-04-13 Nick Kledzik <kledzik@apple.com>
2275
2276 <rdar://problem/5130496> -framework vecLib -framework Accelerate causes bad ordinals
2277 * src/MachOWriterExecutable.hpp: fix bug optimizeDylibReferences() when there are two readers with same install name
2278
2279
2280 ----- Tagged ld64-73.3
2281
2282 2007-04-03 Nick Kledzik <kledzik@apple.com>
2283
2284 * src/ld.cpp: read-only-dofs should use 32-bit offsets for x86_64
2285 * src/MachOReaderDylib.hpp: if "public" re-export is not marked implict, still mark it as re-exported
2286
2287
2288 2007-04-02 Nick Kledzik <kledzik@apple.com>
2289
2290 <rdar://problem/5105971> if replacement file for -dylib_file is missing, warn instead of error
2291 * src/ld.cpp: a try/catch to turn -dylib_file error into a warning.
2292 * unit-tests/test-cases/dylib_file-missing: add test case
2293 * doc/man/man1/ld.1: update man page about -dead_strip_dylibs
2294
2295
2296 ----- Tagged ld64-73.2
2297
2298 2007-03-31 Nick Kledzik <kledzik@apple.com>
2299
2300 <rdar://problem/5102873> ld64-73: atom sorting error with duplicate zero sized bss symbols
2301 * src/MachOReaderRelocatable.hpp: suppress warning on sorting zero size zero fill atoms
2302
2303 2007-03-31 Nick Kledzik <kledzik@apple.com>
2304
2305 <rdar://problem/5102845> ld64-73 fails anything linking with -lm
2306 * src/ld.cpp: when processing dylbs that are sylinks ensure that fDylibMap contains all paths
2307 * src/MachOWriterExecutable.hpp: when dead stripping dylibs and renumbering ordinals make sure
2308 aliases dylib get renumbered too
2309 * unit-tests/test-cases/dylib-aliases: added
2310
2311
2312 ----- Tagged ld64-73.1
2313
2314 2007-03-30 Nick Kledzik <kledzik@apple.com>
2315
2316 * src/MachOWriterExecutable.hpp: back out use of LC_REEXPORT_DYLIB until rdar://problem/5009909 is in build fleet
2317
2318
2319 ----- Tagged ld64-73
2320
2321 2007-03-30 Nick Kledzik <kledzik@apple.com>
2322
2323 <rdar://problem/4175790> ER: -dead_strip_dylibs
2324 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
2325 * src/ObjectFile.h: change dylib reader interface to implictly/explicitlyLinked
2326 * src/ld.cpp: use new dylib reader interface
2327 * src/Options.h: add deadStripDylibs()
2328 * src/Options.cpp: support -dead_strip_dylibs
2329 * src/MachOReaderDylib.hpp: use new dylib reader interface
2330 * src/MachOWriterExecutable.hpp: remove dylib load commands for unused dylibs and alter ordinals
2331 * unit-tests/test-cases/re-export-optimizations: added
2332 * unit-tests/test-cases/dead_strip_dylibs: added
2333
2334
2335 2007-03-30 Nick Kledzik <kledzik@apple.com>
2336
2337 * src/Options.cpp: enable -lfoo to search for libfoo.so as well as libfoo.dylib,
2338 remove seg addr table hack for transitioning to new linker
2339
2340 2007-03-30 Nick Kledzik <kledzik@apple.com>
2341
2342 <rdar://problem/5073800> ADOBE XCODE3: Linker is slow with large C++ .o files
2343 * src/MachOReaderRelocatable.hpp: the compiler generates stubs to weak functions in the
2344 same translation unit. Don't treat those like the spurios stubs to static functions.
2345
2346
2347 2007-03-29 Nick Kledzik <kledzik@apple.com>
2348
2349 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
2350 * src/MachOReaderRelocatable.hpp: To handle duplicate labels properly, rework how atoms sizes are set
2351 by iterating through sorted fAtoms rather than fAddrToAtom, . Change default alignment of commons
2352 to be the natural alignment of the size rounded up to the closest power of two and max it at 12.
2353 Build atoms in reverse symbol table order so that global atoms are constructed before locals.
2354 This assures that if there is a global and local label at the same location, the global label
2355 will become the atom's name and the local will be an alias. Properly handle a label
2356 at the end of a section. Handle R_ABS in relocations. Handle sect-diff relocs with addends.
2357 Don't auto-strip 'l' symbols in static executables (mach_kernel).
2358 * src/OpaqueSection.hpp: opaque_section now has an ordinal
2359 * src/ld.cpp: opaque_section now requires an ordinal
2360 * src/ObjectFile.h: add ReaderOptions.fForStatic
2361 * src/Options.cpp: set fForStatic when building a static executable
2362 * src/MachOWriterExecutable.hpp: add from atom to StubAtom<ppc>. Properly write out i386
2363 sect-diff relocs with addends. properly write out ppc PICbase relocs where pic base
2364 is not in the atom.
2365
2366
2367 2007-03-27 Nick Kledzik <kledzik@apple.com>
2368
2369 <rdar://problem/5085863> Typo in ld man page (-exported_symbols_list)
2370 * doc/man/man1/ld.1: fix typo
2371
2372
2373 2007-03-26 Nick Kledzik <kledzik@apple.com>
2374
2375 <rdar://problem/4727750> consider generating LC_UUID from a checksum of the file
2376 * src/Options.h: change emitUUID() to getUUIDMode()
2377 * src/Options.cpp: support -random_uuid
2378 * src/MachOWriterExecutable.hpp: set uuid to be md5 hash of entire output file
2379
2380
2381 2007-03-24 Nick Kledzik <kledzik@apple.com>
2382
2383 * src/MachOWriterExecutable.hpp: restructure writeAtoms() to copy all atoms in memory if possible
2384
2385
2386 2007-03-24 Nick Kledzik <kledzik@apple.com>
2387
2388 <rdar://problem/5082603> ld -r of stripped .o file can incorrectly merge non-lazy pointers
2389 * src/MachOWriterExecutable.hpp: when generating a .o file, non-lazy pointer with target offsets should be
2390 encoded as LOCAL in the indirect symbol table
2391 * unit-tests/test-cases/stripped-indirect-symbol-table: added test case
2392
2393
2394 2007-03-23 Nick Kledzik <kledzik@apple.com>
2395
2396 <rdar://problem/5084564> SWB: ld64-72 errors building with gcc-4.2
2397 * src/MachOReaderDylib.hpp: add curly brackets in switch cases
2398 * src/MachOWriterExecutable.hpp: rearrange classes so there are no template specialization forward references
2399
2400
2401 2007-03-23 Nick Kledzik <kledzik@apple.com>
2402
2403 * src/ld.cpp: fix -print_statistics when using -dead_strip
2404
2405
2406 2007-03-23 Nick Kledzik <kledzik@apple.com>
2407
2408 * src/MachOReaderRelocatable.hpp: generate better names for non-lazy pointers to the interior of atoms
2409
2410
2411 2007-03-16 Nick Kledzik <kledzik@apple.com>
2412
2413 * src/MachOWriterExecutable.hpp: speed up ld -r a little by reversing relocs en mas
2414
2415
2416 2007-03-16 Nick Kledzik <kledzik@apple.com>
2417
2418 <rdar://problem/4975277> ld Bus Error on missing command line arguments
2419 * src/Options.cpp: check next argv[] is not NULL
2420
2421
2422 2007-03-16 Nick Kledzik <kledzik@apple.com>
2423
2424 <rdar://problem/4832049> need to be able to order symbols in anonymous namespaces
2425 * src/ld.cpp: add logic to do fuzzy matching of symbols with anonymous namespace usage
2426 * unit-tests/test-cases/order_file-ans: added test case
2427
2428
2429 2007-03-16 Nick Kledzik <kledzik@apple.com>
2430
2431 <rdar://problem/5042552> headerpad_max_install_names deprecated for 64-bit
2432 * src/ld.cpp: make sure dylib load command order matches command line order
2433 * src/Options.h: add maxMminimumHeaderPad()
2434 * src/Options.cpp: add maxMminimumHeaderPad() set by -headerpad_max_install_names
2435 * src/src/MachOWriterExecutable.hpp: check maxMminimumHeaderPad()
2436 * doc/man/man1/ld.1: update man page about -headerpad_max_install_names
2437
2438
2439 2007-03-16 Nick Kledzik <kledzik@apple.com>
2440
2441 <rdar://problem/4592484> Linker returns success although exported symbols are undefined.
2442 * src/ld.cpp: turn missing symbols back into an error
2443
2444
2445 2007-03-16 Nick Kledzik <kledzik@apple.com>
2446
2447 <rdar://problem/4019497> ld64 should handle linking against dylibs that have @loader_path based dylib load commands
2448 * unit-tests/test-cases/loader_path: added test case
2449
2450
2451 2007-03-16 Nick Kledzik <kledzik@apple.com>
2452
2453 <rdar://problem/3904828> linker should add implicit load commands for indirectly used public dylibs
2454 <rdar://problem/4142277> Indirect libraries should be found using -F and -L options
2455 <rdar://problem/4607755> Simplier, generalized way to re-export dylibs: LC_REEXPORT_DYLIB
2456 * src/ld.cpp: reworked all dylib processing. Readers can now add the dylib list.
2457 * src/Options.h: add findFileUsingPaths()
2458 * src/MachOReaderDylib.hpp: look in re-exported children instead of requring linker to do that
2459 * src/ObjectFile.h: add processIndirectLibraries(), remove getDependentLibraryPaths()
2460 * src/machochecker.cpp: support LC_REEXPORT_DYLIB
2461 * src/ExecutableFile.h: simplify DyLibUsed
2462 * src/Options.cpp: add findFileUsingPaths(). add new re-export options
2463 * src/MachOWriterExecutable.hpp: Use LC_REEXPORT_DYLIB when targetting 10.5
2464 * doc/man/man1/ld.1: updated with new re-export options
2465 * unit-tests/test-cases/indirect-path-search: added tests that -F and -L work with indirect dylibs
2466 * unit-tests/test-cases/re-export-cases: added tests for all combinations of re-exporting
2467
2468
2469 2007-03-14 Nick Kledzik <kledzik@apple.com>
2470
2471 <rdar://problem/4982400> sort external relocations to optimize dyld performance
2472 * src/MachOWriterExecutable.hpp: added ExternalRelocSorter
2473 * src/machochecker.cpp: verify external relocations are grouped by symbol number
2474 * unit-tests/test-cases/external-reloc-sorting: added test case
2475
2476
2477 ----- Tagged ld64-72
2478
2479 2007-03-06 Nick Kledzik <kledzik@apple.com>
2480
2481 * src/Options.cpp: ignore .objc_category_name_* symbols in .exp files
2482
2483
2484 2007-03-06 Nick Kledzik <kledzik@apple.com>
2485
2486 * src/Options.cpp: stop special casing mach_kernel and instead requre kernel to be built with -new_linker
2487
2488
2489 2007-03-06 Nick Kledzik <kledzik@apple.com>
2490
2491 <rdar://problem/5044253> ld64-72 (experimental) is causing DejaGnu test failures
2492 * src/MachOWriterExecutable.hpp: add optimizableGOTReferenceKind() to track GOT uses that cannot be optimized
2493
2494
2495 2007-03-06 Nick Kledzik <kledzik@apple.com>
2496
2497 <rdar://problem/5026135> minimum header padding should be 32 to allow code signing
2498 * src/Options.cpp: initialize fMinimumHeaderPad to 32
2499 * src/MachOWriterExecutable.hpp: better calculation of header padding
2500
2501
2502 2007-03-06 Nick Kledzik <kledzik@apple.com>
2503
2504 <rdar://problem/5033206> Linker crashes with -flat_namespace against two-level dylibs that might have re-exports
2505 * src/ld.cpp: flat namespace should not allow NULL indirect readers
2506
2507
2508 2007-03-06 Nick Kledzik <kledzik@apple.com>
2509
2510 * src/MachOReaderRelocatable.hpp: don't error on S_COALESCED sections with anonymous atoms
2511 * src/MachOWriterExecutable.hpp: set MH_PIE bit when linking -pie
2512 * ld64.xcodeproj/project.pbxproj: don't echo environment when running unit test
2513
2514
2515 2007-03-01 Nick Kledzik <kledzik@apple.com>
2516
2517 * doc/man/man1/ld.1: Add descriptions to all "rarely used options"
2518
2519
2520 2007-03-01 Nick Kledzik <kledzik@apple.com>
2521
2522 <rdar://problem/4971033> Remove support for Essential Symbols: Warn about use of -Sp option; remove man page entry
2523 * src/Options.cpp: make -Sp obsolete
2524 * doc/man/man1/ld.1: make -Sp obsolete
2525
2526
2527 2007-03-01 Nick Kledzik <kledzik@apple.com>
2528
2529 <rdar://problem/5040314> Support -pie
2530 * src/Options.h: Add positionIndependentExecutable()
2531 * src/Options.cpp: Support -pie option to set positionIndependentExecutable()
2532 * src/MachOWriterExecutable: if -pie is used, add extra local relocations and error if any
2533 absolute addressing is used
2534
2535
2536 2007-03-01 Nick Kledzik <kledzik@apple.com>
2537
2538 <rdar://problem/4739044> ld64 should link mach_kernel during xnu builds to support dtrace
2539 * src/ld.cpp: Ensure segments are laid out in discovery order. Add support for kAbsoluteSymbol.
2540 Warn when merging symbols of different visiblity. Warn when a tentative definition
2541 is replaced by one a real definition with a smaller size. Lay out __common section
2542 so that ones built with -fno-commons come before regular commons.
2543 * src/ObjectFile.h: remove SegmentOffset ivar and getter/setters
2544 * src/machochecker.cpp: allow images with no r/w segments
2545 * src/MachOReaderRelocatable: Add AbsoluteAtom. Sort tentative definitions by name instead of by size
2546 Add support for custom commons alignment.
2547 * src/Options.cpp: Fix spurious -sectalign warnings. Don't use ld_classic when linking mach_kernel
2548 * src/MachOWriterExecutable.hpp: Support kAbsoluteSymbol atoms. In -r mode, set custom alignment
2549 for commons if alignment is not its size. Support global __dtrace_probe labels.
2550 * src/ObjectDump.cpp: add support for kAbsoluteSymbol atoms.
2551 * unit-tests/test-cases/commons-alignment: Added test case for custom commons alignment
2552 * unit-tests/test-cases/absolute-symbol: Added test case for basic absolute symbols
2553 * unit-tests/test-cases/segment-order: Added test case that segments lay out in discovery order
2554 * unit-tests/test-cases/commons-order: Added test case that commons lay out correctly
2555 * unit-tests/test-cases/end-label: Added test case that a label used to mark the end of a section does not
2556 get associcated with the next section.
2557
2558
2559 2007-02-23 Nick Kledzik <kledzik@apple.com>
2560
2561 <rdar://problem/3965017> gcc-5005: DejaGnu failures due to -frepo
2562 * src/ld.cpp: Add quotes to referenced from name to make collect2 and -frepo happy
2563
2564
2565 2007-02-22 Nick Kledzik <kledzik@apple.com>
2566
2567 * src/MachOWriterExecutable.hpp: rework how padding after load commands is calculated
2568
2569
2570 2007-02-21 Nick Kledzik <kledzik@apple.com>
2571
2572 * src/MachOWriterExecutable.hpp: extend special case of __mh_execute_header to static executables too
2573
2574
2575 2007-02-21 Nick Kledzik <kledzik@apple.com>
2576
2577 <rdar://problem/3882294> gcc link map option ( "-M" ) should be redirectable to file
2578 * doc/man/man1/ld.1: added -map option description
2579 * src/Options.h: added generatedMapPath()
2580 * src/Options.cpp: set up generatedMapPath() if -map option is used
2581 * src/MachOWriterExecutable.hpp: add writeMap() method to generate map file
2582
2583
2584 2007-02-19 Nick Kledzik <kledzik@apple.com>
2585
2586 <rdar://problem/4557734> Implement GOT Load elimination optimization
2587 * src/ld.cpp: track size of all atoms and if > 2GB sort large zero-fill atoms to end
2588 * src/MachOWriterExecutable.hpp: If image size < 2GB, only generate GOT entries if value must be
2589 updatable by dyld. If > 2GB, only eliminate GOT entries to non-zero-fill atoms. Any use
2590 of an eliminated GOT entry has its code changed from MOVQ _foo@GOT(%rip) to LEAQ _foo(%rip).
2591 * unit-tests/test-cases/large-data: added
2592 * unit-tests/test-cases/got-elimination: added
2593
2594
2595 ----- Tagged ld64-71.2
2596
2597 2007-02-13 Nick Kledzik <kledzik@apple.com>
2598
2599 <rdar://problem/4995303> new ld ignores -segprot option
2600 * src/Options.h: expose customSegmentProtections()
2601 * src/Options.cpp: parse -segprot option and populate customSegmentProtections()
2602 * src/MachOWriterExecutable.hpp: use customSegmentProtections()
2603
2604
2605 2007-02-13 Nick Kledzik <kledzik@apple.com>
2606
2607 <rdar://problem/4988068> i386 -stack_addr doesn't work
2608 * src/MachOWriterExecutable.hpp: use correct offset into thread state record
2609
2610
2611 ----- Tagged ld64-71.1
2612
2613 2007-02-07 Nick Kledzik <kledzik@apple.com>
2614
2615 * src/ld.cpp: sort __OBJC2 segment to be next to __OBJC segment
2616
2617
2618 2007-02-07 Nick Kledzik <kledzik@apple.com>
2619
2620 * src/Options.cpp: change missing -seg_addr_table from an error to a warning
2621
2622
2623 2007-02-06 Nick Kledzik <kledzik@apple.com>
2624
2625 <rdar://problem/4977311> Leopard 9A357: -dylib_file broken?
2626 * src/MachOWriterExecutable.hpp: remove use of fInstallPathOverride
2627 * src/Options.cpp: wire up -dylib_file option
2628 * src/Options.h: remove fInstallPathOverride. add fDylibOverrides
2629 * src/ld.cpp: check dylibOverrides() for indirect libraries
2630 * unit-tests/test-cases/dylib_file: add test case
2631
2632
2633 2007-02-05 Nick Kledzik <kledzik@apple.com>
2634
2635 * src/MachOReaderDylib.hpp: don't warn about zero size __image_info sections
2636
2637
2638 2007-02-04 Rick Balocca <rbalocca@apple.com>
2639 Enable the failing cases for missing command line arguments
2640
2641 2007-02-04 Rick Balocca <rbalocca@apple.com>
2642 Make sure that all .o's are checked by ObjectDump
2643 and all macho are checked by machochecker
2644
2645 2007-02-04 Rick Balocca <rbalocca@apple.com>
2646 Fix an endian problem with machochecker
2647 Fix blank-stubs Makefile
2648
2649 ----- Tagged ld64-71
2650
2651 2007-02-02 Rick Balocca <rbalocca@apple.com>
2652 blank-stubs test case: handle the case of a native ppc compile--this
2653 sets the subtype, which must be passed to lipo
2654
2655 2007-02-01 Rick Balocca <rbalocca@apple.com>
2656 make cpu-sub-types test more robust
2657
2658 2007-02-01 Rick Balocca <rbalocca@apple.com>
2659 auto-arch tests were resulting in a false FAILs
2660
2661 2007-02-01 Rick Balocca <rbalocca@apple.com>
2662 test cpu-sub-types was resulting in a false FAIL
2663
2664 2007-02-01 Nick Kledzik <kledzik@apple.com>
2665
2666 <rdar://problem/4969335> STD:VSC: c99 -o writes to file that does not have write permission
2667 * src/MachOWriterExecutable.hpp: check file is writable before using it
2668
2669 2007-02-01 Nick Kledzik <kledzik@apple.com>
2670
2671 <rdar://problem/4965743> debug map (N_OSO) timestamps for object files in ranlib archive are incorrect
2672 * src/MachOReaderArchive.hpp: parse modTime for .o files out of archive header
2673
2674 2007-01-31 Nick Kledzik <kledzik@apple.com>
2675
2676 <rdar://problem/4967535> 9A354: ld -all_load does *NOT* produce the same dSYM as *.o or -u
2677 * src/ld.cpp: when using -all_load don't assume that all atoms have same reader
2678 * unit-tests/test-cases/dwarf-archive-all_load: added
2679
2680 ----- Tagged ld64-70.1
2681
2682 2007-01-31 Nick Kledzik <kledzik@apple.com>
2683
2684 * src/MachOWriterExecutable.hpp: in addObjectRelocs_powerpc() mask scattered r_address to 16-bits
2685
2686 ----- Tagged ld64-70
2687
2688
2689 2007-01-30 Nick Kledzik <kledzik@apple.com>
2690
2691 <rdar://problem/4810668> linker should verify GC consistency of modules being linked into library
2692 <rdar://problem/4474195> Support cpu-sub-types for ppc
2693 * src/ObjectFile.h: Add getObjCConstraint() and getCpuConstraint()
2694 * src/MachOReaderRelocatable.hpp: don't make atom for __image_info section, instead parse constaints
2695 * src/MachOReaderDylib.hpp: look at __image_info content to get constaints
2696 * src/ld.cpp: add updateContraints() and checkObjc()
2697 * src/MachOWriterExecutable.hpp: add ObjCInfoAtom to sythesize __image_info content
2698
2699
2700 2007-01-28 Nick Kledzik <kledzik@apple.com>
2701
2702 src/*: remove ObjectFile::requiresFollowOnAtom() method
2703
2704
2705 2007-01-28 Nick Kledzik <kledzik@apple.com>
2706
2707 src/ld.cpp: enable LLVM_SUPPORT by default
2708 src/LLVMReader.hpp: don't use absolute paths for llvm headers and libraries
2709
2710
2711 2007-01-26 Rick Balocca <rbalocca@apple.com>
2712 * src/ObjectDump.cpp: The usage() message was incorrect.
2713
2714
2715 2007-01-25 Rick Balocca <rbalocca@apple.com>
2716 * unit-tests/test-cases/zero-fill3: It was reporting FAIL on ld64 error return.
2717 It should have been checking for non-error return.
2718
2719
2720 2007-01-24 Nick Kledzik <kledzik@apple.com>
2721
2722 <rdar://problem/4952297> x86 fast stubs should not cross 64-byte boundries
2723 * src/MachOWriterExecutable.hpp: for x86, 64-byte align __jump_table section
2724 and make 64-btye crossing stubs be empty entries with indirect symbol table
2725 entry of INDIRECT_SYMBOL_ABS
2726
2727
2728 2007-01-19 Nick Kledzik <kledzik@apple.com>
2729
2730 * src/Options.h: add readOnlyx86Stubs()
2731 * src/Options.cpp: support -read_only_stubs
2732 * src/MachOWriterExecutable.hpp: make __IMPORT segment not writable if -read_only_stubs is used
2733
2734
2735 2007-01-16 Eric Christopher <echristo@apple.com>
2736
2737 <rdar://problem/4856341> ld64 --help isn't recognized
2738 * src/Options.cpp (Options::parse): Support --help and -help.
2739
2740
2741 2007-01-15 Nick Kledzik <kledzik@apple.com>
2742
2743 * src/MachOFileAbstraction.hpp: add range checking on macho_scattered_relocation_info::set_r_address()
2744
2745
2746 2007-01-14 Nick Kledzik <kledzik@apple.com>
2747
2748 <rdar://problem/4514409> Support wildcards in contents of -exported_symbols_list
2749 * src/Options.h: add SetWithWildcards class
2750 * src/Options.cpp: add -exported_symbol and -unexported_symbol and use SetWithWildcards
2751 * doc/man/man1/ld.1: add -exported_symbol and wildcard explanation
2752 * unit-tests/test-cases/exported-symbols-wildcards: added test case
2753
2754
2755 2007-01-10 Nick Kledzik <kledzik@apple.com>
2756
2757 <rdar://problem/4868270> [U]SDT probes should use C calling convention
2758 * src/Options.cpp: Add -read_only_dof
2759 * src/ld.cpp: create __dof section(s) based on probe and isenabled sites
2760 * src/MachOReaderRelocatable.hpp: parse new sdt 2.0 probes encoded in .o files
2761 * src/MachOWriterExecutable.hpp: handle regenerating dtrace probes into .o files
2762 * unit-tests/test-cases/dtrace-static-probes: added test case
2763
2764
2765 ----- Tagged ld64-69.8
2766
2767 2007-01-30 Nick Kledzik <kledzik@apple.com>
2768
2769 <rdar://problem/4964508> Support LD_FORCE_NO_SEG_ADDR_TABLE
2770 * src/Options.cpp: Support LD_FORCE_NO_SEG_ADDR_TABLE
2771
2772
2773 ----- Tagged ld64-69.7
2774
2775 2007-01-25 Nick Kledzik <kledzik@apple.com>
2776
2777 <rdar://problem/4949507> Leopard9A351: CFM Apps Are Broken because CFM glue is missing
2778 * src/MachOReaderRelocatable.hpp: check S_ATTR_NO_DEAD_STRIP in dontDeadStrip()
2779
2780
2781 ----- Tagged ld64-69.6
2782
2783 2007-01-24 Nick Kledzik <kledzik@apple.com>
2784
2785 <rdar://problem/4947347> LD_TRACE_ARCHIVES should only print out when a .o is actually used from an archive
2786 * src/ld.cpp: create and use logArchive()
2787
2788
2789 ----- Tagged ld64-69.5
2790
2791 2007-01-22 Nick Kledzik <kledzik@apple.com>
2792
2793 <rdar://problem/4946075> 9A350: can't link ppc programs with ld_classic
2794 * src/Options.cpp: Remove support for LD_NO_CLASSIC_LINKER. Add support for -classic_linker
2795
2796
2797 ----- Tagged ld64-69.4
2798
2799 2007-01-17 Nick Kledzik <kledzik@apple.com>
2800
2801 <rdar://problem/4925645> QTComponents does not link with ld64
2802 * src/MachOReaderRelocatable.hpp: handle N_RSYM and N_PSYM stabs
2803
2804
2805 ----- Tagged ld64-69.3
2806
2807 2007-01-03 Nick Kledzik <kledzik@apple.com>
2808
2809 * src/Options.cpp: If the same dylib is specified twice and the second is specified weak, make it weak
2810
2811
2812 ----- Tagged ld64-69.2
2813
2814 2006-12-18 Nick Kledzik <kledzik@apple.com>
2815
2816 <rdar://problem/4889729> -dead_strip without -exported_symbols_list should not strip global functions from archives
2817 * src/ld.cpp: when adding a .o file from an archive, add all its global symbols to live roots
2818 * unit-tests/test-cases/dead_strip-archive: added
2819
2820
2821 2006-12-18 Nick Kledzik <kledzik@apple.com>
2822
2823 <rdar://problem/4889409> flat_namespace main executables do not need to indirect interior references
2824 * src/MachOWriterExecutable.hpp: don't indirect references to global symbols in main executables
2825 * unit-tests/test-cases/flat-main: updated to test for indirection
2826 * unit-tests/test-cases/flat-dylib: added
2827
2828
2829 ----- Tagged ld64-69.1
2830
2831 2006-12-15 Nick Kledzik <kledzik@apple.com>
2832
2833 <rdar://problem/4886721> -flat_namespace does not work with -mdynamic-no-pic
2834 * src/MachOWriterExecutable.hpp: rework checking for use of ppc absolute addressing to allow them as long as
2835 the target is within the same linkage unit.
2836
2837
2838 2006-12-15 Nick Kledzik <kledzik@apple.com>
2839
2840 <rdar://problem/4886652> -ObjC should only load .o with .objc_ symbols
2841 * src/Options.cpp: remove warning from -ObjC and have it instead set fLoadAllObjcObjectsFromArchives
2842 * src/MachOReaderArchive.hpp: when -ObjC is used, preload all .o files from archives that contain .objc_ symbols
2843
2844
2845 ----- Tagged ld64-69
2846
2847 2006-12-13 Nick Kledzik <kledzik@apple.com>
2848
2849 <rdar://problem/4879913> prebound interior pointers must be non-zero
2850 * src/MachOWriterExecutable.hpp: in fixUpReference_powerpc() set lazy pointers bound to with the dylib to
2851 their target value. Properly set REFERENCE_FLAG_UNDEFINED_* flags in reference table and n_desc
2852
2853
2854 2006-12-09 Nick Kledzik <kledzik@apple.com>
2855
2856 <rdar://problem/4868738> ld64 fails to detect error that ld_classic does
2857 * src/MachOWriterExecutable.hpp: check for absolute reloc to an external symbol
2858 * src/MachOReaderRelocatable.hpp: ignore -mlong-branch stubs in .o files
2859
2860
2861 2006-12-09 Nick Kledzik <kledzik@apple.com>
2862
2863 <rdar://problem/4874209> symbols with REFERENCED_DYNAMICALLY should never be stripped
2864 * src/MachOWriterExecutable.hpp: update Writer<A>::shouldExport() to check for kSymbolTableInAndNeverStrip
2865 * unit-tests/test-cases/main-stripped: add test that dynamically referenced symbol cannot be stripped
2866
2867
2868 2006-12-08 Nick Kledzik <kledzik@apple.com>
2869
2870 * unit-tests/test-cases/allowable-client: add variant test cases (e.g. CoreServices_profile)
2871 * src/ld.cpp: allow frameworks with variant install names (e.g. CoreServices_profile) to be private clients
2872
2873
2874 2006-12-08 Nick Kledzik <kledzik@apple.com>
2875
2876 * doc/man/man1/ld.1: rewrite man page
2877 * src/Options.h: add warnObsolete()
2878 * src/Options.cpp: use warnObsolete() on many options. Make nonWeak the weak-mis-match default.
2879 Make -ObjC mean -all_load.
2880
2881 ----- Tagged ld64-68.3
2882
2883 2006-12-05 Nick Kledzik <kledzik@apple.com>
2884
2885 * src/ld.cpp: allow umbrella frameworks to have variant install names (e.g. CoreServices_profile) and still link
2886
2887
2888 ----- Tagged ld64-68.2
2889
2890 2006-12-05 Nick Kledzik <kledzik@apple.com>
2891
2892 * src/MachOWriterExecutable.cpp: Use N_PBUD in the symbol table for undefined symbols in prebound dylibs
2893
2894
2895 ----- Tagged ld64-68.1
2896
2897 2006-12-01 Nick Kledzik <kledzik@apple.com>
2898
2899 * src/Options.cpp: always generate module tables for 32-bit architectures so that ld_classic
2900 can link against them
2901
2902
2903 ----- Tagged ld64-68
2904
2905 2006-12-01 Nick Kledzik <kledzik@apple.com>
2906
2907 <rdar://problem/4858299> seg_addr_table needs matching fuzziness
2908 * src/Options.cpp: special case a how a dozen dylib are looked up in the seg_addr_table
2909
2910
2911 2006-12-01 Nick Kledzik <kledzik@apple.com>
2912
2913 * src/Options.cpp: have all -static links for 32-bit archs roll over to ld_classic unless
2914 LD_NO_CLASSIC_LINKER_STATIC is set.
2915 * unit-tests/bin/make-recursive.pl: set LD_NO_CLASSIC_LINKER_STATIC for unit tests
2916
2917
2918 2006-11-29 Nick Kledzik <kledzik@apple.com>
2919
2920 <rdar://problem/4855542> ld64-67: QTComponents fails to build
2921 * src/MachOReaderRelocatable.hpp: don't error out when a local non-lazy pointer does not point to a symbol
2922 * unit-tests/test-cases/strip_local: added test case
2923
2924
2925 2006-11-28 Nick Kledzik <kledzik@apple.com>
2926
2927 <rdar://problem/4433496> Need a way to mark libraries usable by dynamic linker but unusable by static linker
2928 * src/Options.cpp: allow -client_name to be used with main executables
2929 * src/ld.cpp: generalize -allowable_client. Any dylib can now restrict who can link against it. As a convention
2930 linking with -allowable_client '!' will mean no one can statically link with the dylib. It can still be loaded
2931 dynamically, or by any existing clients, but no new clients can link with it.
2932 * unit-tests/test-cases/allowable-client/Makefile: enable previously commented out test cases. Add test cases
2933 of a dylib that allows no clients and just one client
2934
2935 2006-11-27 Nick Kledzik <kledzik@apple.com>
2936
2937 <rdar://problem/4795615> -final_output should be used if -install_name not used
2938 * src/Options.cpp: fall back to using -final_output for install name
2939
2940
2941 ----- Tagged ld64-67
2942
2943 2006-11-17 Nick Kledzik <kledzik@apple.com>
2944
2945 * src/MachOWriterExecutable.hpp: support __IMPORT segment being slide independently of __DATA segment in shared cache
2946
2947
2948 2006-11-16 Nick Kledzik <kledzik@apple.com>
2949
2950 <rdar://problem/4838262> 9a303: ld -filelist Bus Error
2951 * src/Options.cpp: add check that -filelist is followed by an argument
2952
2953
2954 2006-11-16 Nick Kledzik <kledzik@apple.com>
2955
2956 * src/MachOWriterExecutable.hpp: when building split-seg dylibs, LINKEDIT goes in read-only side
2957
2958
2959 2006-11-15 Nick Kledzik <kledzik@apple.com>
2960
2961 * src/MachOWriterExecutable.hpp: set proper attributes for __eh_frame in ld -r mode
2962 * unit-tests/test-cases/eh_frame: added test case
2963
2964
2965 2006-11-10 Nick Kledzik <kledzik@apple.com>
2966
2967 * src/MachOReaderRelocatable.hpp: redirect references to static weak stubs to the real target
2968
2969
2970 2006-11-09 Nick Kledzik <kledzik@apple.com>
2971
2972 * src/MachOWriterExecutable.hpp: r_address is offset from first LC_SEGMENT vmaddr - not from segment with lowest address
2973
2974
2975 ----- Tagged ld64-66.1
2976
2977 2006-11-09 Nick Kledzik <kledzik@apple.com>
2978
2979 * src/MachOWriterExecutable.hpp: initialize fModuleInfoAtom to zero
2980
2981
2982 2006-11-08 Nick Kledzik <kledzik@apple.com>
2983
2984 <rdar://problem/4821985> FSF GCC's libjava doesn't link with Ochre ld64
2985 * src/MachOReaderRelocatable.hpp: ignore debug_line section if debug_info section is missing or empty
2986
2987 ----- Tagged ld64-66
2988
2989 2006-11-07 Nick Kledzik <kledzik@apple.com>
2990
2991 <rdar://problem/4824368> SWB: d64-65 does not built usage split-seg dylibs
2992 * src/MachOWriterExecutable.hpp: when prebinding split-seg correctly set r_address fields and on
2993 disk values for external relocations
2994 * unit-tests/test-cases/prebound-split-seg: added test case
2995
2996
2997 2006-11-03 Nick Kledzik <kledzik@apple.com>
2998
2999 * src/MachOReaderDylib.hpp: don't report dependent libraries if MH_NO_REEXPORTED_DYLIBS bit is set
3000 * src/MachOWriterExecutable.hpp: set MH_NO_REEXPORTED_DYLIBS bit if dylib does not logically re-export any other dylibs
3001 * unit-tests/test-cases/re-export-flag: added test case
3002 * src/machochecker.cpp: validate use of MH_NO_REEXPORTED_DYLIBS
3003
3004
3005 2006-11-02 Nick Kledzik <kledzik@apple.com>
3006
3007 <rdar://problem/4814565> Mysterious messages from ld64 with MACOSX_DEPLOYMENT_TARGET = 10.5
3008 * src/MachOWriterExecutable.hpp: kPointerWeakImport is a valid reference type to cross segments
3009
3010
3011 2006-11-02 Nick Kledzik <kledzik@apple.com>
3012
3013 * src/Options.cpp,h: Add support for -rpath
3014 * src/MachOFileAbstraction.hpp: add macho_rpath_command
3015 * src/MachOWriterExecutable.hpp: add RPathLoadCommandsAtom to create LC_RPATH for each -rpath
3016
3017
3018 ----- Tagged ld64-65
3019
3020 2006-10-30 Nick Kledzik <kledzik@apple.com>
3021
3022 <rdar://problem/4729162> x86_64 default stack_addr is wrong
3023 * src/Options.cpp: change default 64-bit stack location when using -stack_size
3024
3025
3026 2006-10-30 Nick Kledzik <kledzik@apple.com>
3027
3028 <rdar://problem/4474316> dylibs need modules for 10.3 and for ld_classic in Salt
3029 * src/MachOWriterExecutable.hpp: add ModuleInfoLinkEditAtom to create module table stuff
3030 * src/Options.cpp,h: Add needsModuleTable()
3031 * src/MachOFileAbstraction.hpp: Add macho_dylib_module, macho_dylib_reference, and macho_dylib_table_of_contents
3032
3033
3034 2006-10-27 Nick Kledzik <kledzik@apple.com>
3035
3036 * unit-tests/test-cases/no-uuid/Makefile: add -gstabs+ to be compatible with latest compiler
3037 * unit-tests/test-cases/stabs-coalesce/Makefile: add -gstabs+ to be compatible with latest compiler
3038
3039
3040 2006-10-26 Nick Kledzik <kledzik@apple.com>
3041
3042 <rdar://problem/4585230> i386 -mdynamic-no-pic switch statement jump table is out of line
3043 * src/MachOWriterExecutable.hpp: for i386 don't check for direct references to weak symbols
3044
3045
3046 2006-10-26 Devang Patel <dpatel@apple.com>
3047
3048 * src/LLVMReader.hpp: Supply final output file path to optimizer.
3049
3050 2006-10-26 Devang Patel <dpatel@apple.com>
3051
3052 * src/ObjectFile.h: Make setSection* methods virtual.
3053 * src/LLVMReader.hpp: Override setSection* methods.
3054
3055 2006-10-26 Devang Patel <dpatel@apple.com>
3056
3057 * unit-tests/test-case/llvm-integration/a13.h: New.
3058 * unit-tests/test-case/llvm-integration/a13.cc: New.
3059 * unit-tests/test-case/llvm-integration/main13.cc: New.
3060
3061 2006-10-26 Devang Patel <dpatel@apple.com>
3062
3063 * src/options.h, src/options.cpp: Add -save-temps command line option.
3064 * src/LLVMReader.hpp: Use saveTemps option.
3065
3066
3067 2006-10-26 Devang Patel <dpatel@apple.com>
3068
3069 * src/LLVMReader.hpp: Remove invalid module from memory.
3070
3071 2006-10-26 Devang Patel <dpatel@apple.com>
3072
3073 * src/LLVMReader.hpp: Collect symbol alignment info from LLVM optimizer.
3074
3075 2006-10-21 Eric Christopher <echristo@apple.com>
3076
3077 * src/ld.cpp (Linker::Linker): Check for LD_NO_CLASSIC_LINKER before
3078 invoking ld_classic.
3079 * unit-tests/test-cases/relocs-literals/Makefile: Run for -mdynamic-no-pic
3080 and pic.
3081 * unit-tests/test-cases/static-executable/Makefile: Skip for 64-bit. Add
3082 -dead_strip to command line.
3083
3084 ----- Tagged ld64-64.2
3085
3086 2006-10-19 Nick Kledzik <kledzik@apple.com>
3087
3088 * ld64.xcodeproj/project.pbxproj: stop copying LLVMReader.hpp into man1 directory
3089
3090 ----- Tagged ld64-64.1
3091
3092 2006-10-19 Nick Kledzik <kledzik@apple.com>
3093
3094 <rdar://problem/4791643> ld64-63.1 erroneously coalesces an empty string with a non-empty string
3095 * src/MachOReaderRelocatable.hpp: rework cstring parsing to not assume all strings are start
3096 at section alignment boundaries, and when coalescing empty strings always use one with greatest
3097 alignment requirement
3098 * src/MachOWriterExecutable.hpp: in -r mode, don't pad end of cstring section
3099 * src/ObjectFile.h: correctly name leadingZeros() as trailingZeros()
3100 * src/ld.cpp: leadingZeros() --> trailingZeros()
3101
3102
3103 2006-10-18 Eric Christopher <echristo@apple.com>
3104
3105 * unit-tests/test-cases/read-only-relocs/Makefile: Skip for x86_64.
3106 * unit-tests/test-cases/llvm-integration/Makefile: Skip if llvm isn't
3107 present.
3108
3109 2006-10-18 Nick Kledzik <kledzik@apple.com>
3110
3111 <rdar://problem/4783853> ld64 change required to go with assembler cstring change
3112 <rdar://problem/4732996> ld64 should error when a local relocation references an address outside its section
3113 * src/MachOReaderRelocatable.hpp: for x86_64 in order to work with local or external relocations to cstrings
3114 change parser to allow atoms with a pending name that is resolved after references are instantiated.
3115 Make direct references to kRegularDefinition atoms.
3116 * src/MachOWriterExecutable.hpp: in -r mode for x86_64 generate L* labels for cstrings and use external relocations
3117 * unit-tests/test-cases/relocs-literals/test.c: add two cases of cstring literal plus addend
3118
3119
3120 2006-10-06 Nick Kledzik <kledzik@apple.com>
3121
3122 <rdar://problem/4786250> check MACOSX_DEPLOYMENT_TARGET if -macosx_version_min is not used
3123 * src/Options.cpp: if -macosx_version_min is not used, check MACOSX_DEPLOYMENT_TARGET, if
3124 that is unused, default to 10.5
3125
3126 ----- Tagged ld64-64
3127
3128 2006-10-06 Nick Kledzik <kledzik@apple.com>
3129
3130 <rdar://problem/4756806> crash in ppc64 program - bl to saveFP, but saveFP is too far away?
3131 * src/MachOWriterExecutable.hpp: in addPPCBranchIslands(), properly account for growth of __text
3132
3133
3134 2006-10-06 Nick Kledzik <kledzik@apple.com>
3135
3136 <rdar://problem/4769120> Linker-defined alias converts reference into definition and generates error.
3137 * src/MachOReaderRelocatable.hpp: only alias symbols actually in the symbol table
3138
3139
3140 2006-10-06 Nick Kledzik <kledzik@apple.com>
3141
3142 * unit-tests/test-cases/dwarf-debug-notes/Makefile: crt1.o no longer has stabs, so don't need to strip it
3143 * unit-tests/test-cases/dwarf-debug-notes-r/Makefile: crt1.o no longer has stabs, so don't need to strip it
3144
3145
3146 2006-10-06 Nick Kledzik <kledzik@apple.com>
3147
3148 * src/MachOReaderRelocatable.hpp: rework dwarf line parsing to fix warnings that starting
3149 showing up with gcc-5421
3150
3151
3152 2006-10-05 Eric Christopher <echristo@apple.com>
3153
3154 <rdar://problem/4760935> ld64 needs to support libtool options
3155 * src/Options.cpp (Options::parse): Add -noall_load, -install_name,
3156 -current_version and -compatibility_version.
3157
3158 2006-10-03 Eric Christopher <echristo@apple.com>
3159
3160 * src/Options.cpp (Options::gotoClassicLinker): Use execvp
3161 to call ld_classic.
3162
3163 2006-10-03 Eric Christopher <echristo@apple.com>
3164
3165 * unit-tests/test-cases/tentative-to-real/Makefile: Clean up after tests.
3166
3167 2006-10-03 Eric Christopher <echristo@apple.com>
3168
3169 * unit-tests/include/common.makefile (VALID_ARCHS): Add x86_64.
3170 (OTOOL): Remove munging based on ARCH.
3171
3172 2006-09-29 Nick Kledzik <kledzik@apple.com>
3173
3174 <rdar://problem/4743925> problem merging .o files built with and without -fno-common
3175 src/Options.*: make MakeTentativeDefinitionsReal a reader option
3176 src/ObjectFile.h: make MakeTentativeDefinitionsReal a reader option
3177 src/MachOWriterExecutable.hpp: make MakeTentativeDefinitionsReal a reader option
3178 src/MachOReaderRelocatable.hpp: only assign a section name of __common to
3179 tentative defintions when making a final linked image
3180
3181
3182 2006-09-28 Nick Kledzik <kledzik@apple.com>
3183
3184 src/Options.h/.cpp: add support for -segaddr option
3185 src/MachOWriterExecutable.hpp: In Writer::assignFileOffsets(), use -segaddr info
3186
3187
3188 2006-09-28 Nick Kledzik <kledzik@apple.com>
3189
3190 <rdar://problem/4587349> Emit new CPU subtypes for ppc64 and x86-64 when targeting 10.5 or later
3191 src/MachOWriterExecutable.hpp: set high bit of cpusubtype of 64-bit main executables when targeting 10.5 or later
3192
3193
3194 2006-09-28 Devang Patel <dpatel@apple.com>
3195
3196 Add LLVM LTO support
3197 src/LLVMReader.hpp: New file.
3198 src/ld.cpp: Add optimization phase. Use LLVM LTO.
3199 unit-tests/test-cases/llvm-integration: New tests.
3200
3201 2006-09-27 Nick Kledzik <kledzik@apple.com>
3202
3203 ld64.xcodeproj/project.pbxproj: remove accidental install of source file into man1
3204
3205
3206 2006-09-25 Nick Kledzik <kledzik@apple.com>
3207
3208 src/Architectures.hpp: add kPointerDiff16 for ppc and ppc64
3209 src/MachOReaderRelocatable.hpp: support kPointerDiff16
3210 src/MachOWriterExecutable.hpp: support kPointerDiff16
3211
3212 ----- Tagged ld64-63.1
3213
3214 2006-09-22 Nick Kledzik <kledzik@apple.com>
3215
3216 src/MachOWriterExecutable.hpp: include stubs in LC_SEGMENT_SPLIT_INFO
3217
3218
3219 2006-09-21 Nick Kledzik <kledzik@apple.com>
3220
3221 src/Options.cpp: disable split-seg dylibs for 64-bit architectures
3222
3223
3224 2006-09-19 Nick Kledzik <kledzik@apple.com>
3225
3226 src/MachOReaderRelocatable.hpp: rework __cstring parsing to better handle mixed alignment cstrings
3227 src/MachOWriterExecutable.hpp: in -r mode, make all __cstrings aligned to section alignment
3228
3229
3230 2006-09-19 Nick Kledzik <kledzik@apple.com>
3231
3232 src/MachOWriterExecutable.hpp: rework encoding of LC_SEGMENT_SPLIT_INFO
3233
3234
3235 2006-09-19 Nick Kledzik <kledzik@apple.com>
3236
3237 src/Options.cpp: check for -search_paths_first in first pass
3238
3239
3240 ----- Tagged ld64-63
3241
3242 2006-09-15 Nick Kledzik <kledzik@apple.com>
3243
3244 src/Options.cpp: since the ld64 will repeatedly search an archive, and some project list archives
3245 multiple times on command line to work with traditional linkers, automatically ignore duplicate libraries
3246 unit-tests/test-cases/archive-duplicate: added test case
3247
3248
3249 2006-09-15 Nick Kledzik <kledzik@apple.com>
3250
3251 src/Options.cpp: support -r -static
3252 src/MachOWriterExecutable.hpp: support -r -static an don't generate LC_DYSYMTAB
3253
3254
3255 2006-09-14 Nick Kledzik <kledzik@apple.com>
3256
3257 src/MachOWriterExecutable.hpp: in -r mode references to weak symbols should not create external relocations
3258 as that can cause nmedit to errror later.
3259
3260
3261 2006-09-13 Nick Kledzik <kledzik@apple.com>
3262
3263 <rdar://problem/4718189> ld64: Handle .objc_class_name exports specially
3264 src/Options.cpp: add hack so that .objc_class_name_XXX in -exported_symbols_list imples _OBJC_CLASS_$_XXX
3265 src/ld.cpp: add hack to supporess errors about .objc_class_name_XXX or _OBJC_CLASS_$_XXX being undefined
3266
3267
3268 2006-09-12 Nick Kledzik <kledzik@apple.com>
3269
3270 <rdar://problem/4474172> Support -prebind when targeting ppc and OS < 10.4
3271 src/Options.h: add splitSeg() and baseWritableAddress()
3272 src/Options.cpp: Add support for -seg_addr_table and LD_SEG_ADDR_TABLE, and -prebind and LD_PREBIND.
3273 src/src/MachOWriterExecutable.hpp: support split-seg and canonical prebound files to be generated
3274
3275
3276 2006-09-11 Nick Kledzik <kledzik@apple.com>
3277
3278 <rdar://problem/4464904> Linking a dylib or binary from identical binaries should produce the same output
3279 src/MachOWriterExecutable.hpp: set the timestamps to be constant
3280
3281
3282 2006-09-11 Nick Kledzik <kledzik@apple.com>
3283
3284 <rdar://problem/4070025> Linker support for ordering all sections and symbols
3285 src/Options.cpp: Add -order_file_statistics. Allow architecture prefixes in order files
3286 src/ld.cpp: Use fOptions.printOrderFileStatistics()
3287
3288
3289 2006-09-11 Nick Kledzik <kledzik@apple.com>
3290
3291 <rdar://problem/3894079> Support -sectorder
3292 unit-tests/test-cases/order_file: added test case
3293 src/ld.cpp: Implement order file support in Linker::sortAtoms()
3294 src/Options.h: add Options.orderedSymbols()
3295 src/Options.cpp: add parseOrderFile(), implement -order_file
3296
3297
3298 2006-09-07 Nick Kledzik <kledzik@apple.com>
3299
3300 <rdar://problem/4637023> need -i for 64-bit (or equivalent)
3301 <rdar://problem/4014529> Support -i for aliasing exported symbols
3302 unit-tests/test-cases/alias-objects: added
3303 unit-tests/test-cases/alias-command-line: added
3304 src/ObjectFile.h: Added Atom::getOrdinal() as new way to sort atoms. Added ReaderOptions.fAliases
3305 src/MachOReaderRelocatable.hpp: Added SymbolAliasAtom to handle multiple symbols to same address
3306 src/MachOReaderArchive.hpp: implement Atom::getOrdinal() to space out atom ordinals across member objects
3307 src/Options.cpp: support -i, -alias, -alias_list. Move search of /Network/Library/Frameworks to after /System/Library/Frameworks
3308 src/MachOWriterExecutable.hpp: pad out seg_info data. Implement getOrdinal().
3309 src/ObjectDump.cpp: call constructors directly instead of using make() wrapper
3310
3311
3312 2006-09-01 Nick Kledzik <kledzik@apple.com>
3313
3314 <rdar://problem/4458878> Need the ability to tag libraries/plug-ins with security attributes
3315 src/MachOReaderDylib.hpp: add warning if using -root_safe or -setuid_safe and link against dylib that is not
3316 src/ObjectFile.h: add ReaderOption fRootSafe and fSetuidSafe
3317 src/Options.cpp: handle -root_safe or -setuid_safe command line options
3318 src/MachOWriterExecutable.hpp: set MH_ROOT_SAFE and MH_SETUID_SAFE flags
3319
3320
3321 2006-08-31 Nick Kledzik <kledzik@apple.com>
3322
3323 src/ld.cpp: Add Linker::processDTrace() for processing dtrace static probes
3324 src/OpaqueSection.hpp: renamed, add symbol name, add ability to add references
3325 ld64.xcodeproj/project.pbxproj: remove SectCreate.cpp, add OpaqueSection.hpp
3326
3327
3328 2006-08-28 Nick Kledzik <kledzik@apple.com>
3329
3330 <rdar://problem/4571042> Add convention for removing symbols at link time
3331 <rdar://problem/3962731> Assembler -L option causes ld64 to split stubs
3332 unit-tests/test-cases/special-labels: added test case
3333 src/MachOReaderRelocatable.hpp: ignore L* labels, make l* labels as kSymbolTableNotIn
3334
3335
3336 2006-08-28 Nick Kledzik <kledzik@apple.com>
3337
3338 src/lObjectFile.h: refactor isTargetUnbound() into getTargetBinding()
3339 src/ld.cpp: create __dof section in final linked images from dtrace static probes
3340 src/Architectures.hpp: add kDtraceProbe
3341 src/Options.h/cpp: Add support for -dtrace
3342 src/machochecker.cpp: support LC_SEGMENT_SPLIT_INFO
3343 src/MachOWriterExecutable.hpp: support kDtraceProbe
3344 src/MachOReaderRelocatable.hpp: suppport kDtraceProbe
3345
3346
3347 2006-08-25 Nick Kledzik <kledzik@apple.com>
3348
3349 <rdar://problem/4701529> generate LC_SEGMENT_SPLIT_INFO for 10.5 or later dylibs
3350 src/Options.h&.cpp: implement sharedRegionEligible() to control when LC_SEGMENT_SPLIT_INFO is added
3351 src/MachOFileAbstraction.hpp: add macho_linkedit_data_command
3352 src/MachOWriterExecutable.hpp: generate LC_SEGMENT_SPLIT_INFO load command and linkedit content
3353
3354 ----- Tagged ld64-62
3355
3356 2006-08-15 Nick Kledzik <kledzik@apple.com>
3357
3358 <rdar://problem/4681062> wrong error message when symbol is found in unused indirect library
3359 src/ld.cpp: remove indirect libraries if they are not re-exported
3360 unit-tests/test-cases/indirect-dylib: added test case
3361
3362
3363 2006-08-15 Nick Kledzik <kledzik@apple.com>
3364
3365 <rdar://problem/3930461> alignment needs to be richer
3366 src/ObjectFile.h: define ObjectFile::Alignment class for tracking rich alignment info
3367 src/ld.cpp: modify SymbolTable::add() to work with new Alignment type
3368 src/MachOReaderRelocatable.hpp: use new Alignment type. Remove alignAtLeast() and handleAnonymousNonLazyPointers()
3369 src/MachOWriterExecutable.hpp: update for new Alignment type, use modulus when calculating layout address
3370 src/ObjectDump.cpp: print richer Alignment info
3371 unit-tests/test-cases/align-modulus: added test case
3372
3373
3374 2006-08-11 Nick Kledzik <kledzik@apple.com>
3375
3376 remove OPEN_SOURCE conditionals around x86_64 support
3377
3378
3379 2006-07-31 Nick Kledzik <kledzik@apple.com>
3380
3381 <rdar://problem/4654131> ld64 while linking cc1 [ when dead_strip is ON]
3382 src/ld.cpp: Add ivar fAtomsWithUnresolvedReferences to track atoms not initially resolvable
3383 unit-tests/test-cases/dead_strip-archive: added test case
3384
3385
3386 2006-07-31 Nick Kledzik <kledzik@apple.com>
3387
3388 <rdar://problem/4656617> x86_64: instructions with immediate and rip-relative operands need to use new relocation types
3389 src/MachOWriterExecutable.hpp: generate new reloc types in -r mode
3390 src/MachOReaderRelocatable.hpp: parse new reloc types
3391 unit-tests/test-cases/relocs-asm/relocs-asm.s: add test cases for new reloc type
3392
3393
3394 2006-07-18 Nick Kledzik <kledzik@apple.com>
3395
3396 src/MachOReaderRelocatable.hpp: suppress warning about dwarf info parsing for one benign no-op case
3397 the compiler emits when there are not functions in the __text section
3398
3399
3400 2006-07-17 Nick Kledzik <kledzik@apple.com>
3401
3402 <rdar://problem/4634840> faster debug note generation
3403 src/ld.cpp: rework collectDebugInfo() to produce all debug notes in one pass, intead of a
3404 pass per .o file. Added timing info for collectDebugInfo() to -print_statistics
3405 unit-tests/test-cases/dwarf-debug-notes-r/Makefile: add expliced -arch to ld -r
3406 unit-tests/test-cases/dwarf-debug-notes-r/expected-stabs: alter for new debug notes order
3407
3408
3409 2006-07-17 Nick Kledzik <kledzik@apple.com>
3410
3411 <rdar://problem/4623994> ld64 VSIZE is 1.18GB when building Finder ppc64
3412 src/ld.cpp: fixed typo in createReader() that prevented dylibs from being unmapped
3413
3414 ----- Tagged ld64-61.1
3415
3416 2006-07-11 Nick Kledzik <kledzik@apple.com>
3417
3418 <rdar://problem/4622049> ld64-61: gcc DejaGnu tests failing due to -arch followed by unknown architecture name
3419 src/Options.cpp: map ppc750, ppc7400, ppc7450, and ppc970 to ppc. Improve error message
3420
3421 2006-07-11 Nick Kledzik <kledzik@apple.com>
3422
3423 <rdar://problem/4622769> If -arch is missing, rollover to ld_classic does not happen
3424 src/Options.h: make gotoClassicLinker() public
3425 src/ld.cpp: call gotoClassicLinker() if the inferred architecture is ppc or i386
3426
3427 ----- Tagged ld64-61
3428
3429 2006-06-29 Nick Kledzik <kledzik@apple.com>
3430
3431 <rdar://problem/4606628> ld64 should be renamed to ld
3432 src/Options.cpp: exec() ld_classic if -arch ppc or -arch i386 is seen
3433 src/ld.cpp: alter version string
3434 ld64.xcodeproj/project.pbxproj: change install location to /usr/bin/ld, add symlink from /usr/bin/ld64
3435 doc/man/man1/ld.1: added
3436
3437 ----- Tagged ld64-60
3438
3439 2006-06-28 Nick Kledzik <kledzik@apple.com>
3440
3441 <rdar://problem/4604539> Can't link large ppc64 program: ld64 says "bl out of range"
3442 MachOWriterExecutable.hpp: fix branch island generation to work for weak_import functions
3443 and properly chain together branch islands
3444 MachOReaderRelocatable.hpp: improve performance of huge .o file reading by sorted references
3445 only when done
3446
3447 2006-06-28 Nick Kledzik <kledzik@apple.com>
3448
3449 <rdar://problem/4603454> MySQL-36 fails to build with ld64-59
3450 src/MachOReaderRelocatable.hpp: back out fix for 4585335
3451 src/MachOWriterExecutable.hpp: back out fix for 4585335
3452
3453 2006-06-27 Nick Kledzik <kledzik@apple.com>
3454
3455 src/MachOReaderRelocatable.hpp: handle N_GSYM without ending :G() since that is how
3456 dwarf debug notes are formed.
3457
3458 2006-06-23 Nick Kledzik <kledzik@apple.com>
3459
3460 <rdar://problem/4599239 objc class with no superclass causes bad undefined symbol
3461 src/MachOReaderRelocatable.hpp: handle NULL superclass in objc_class
3462 unit-tests/test-cases/relocs-objc/test.m: add case with no super class
3463
3464
3465 2006-06-23 Nick Kledzik <kledzik@apple.com>
3466
3467 <rdar://problem/4313369> ld64 doesn't support variant linking -framework fw,_debug
3468 src/Options.cpp: enhance findFramework() to support suffixes
3469
3470 ----- Tagged ld64-59
3471
3472 2006-06-22 Nick Kledzik <kledzik@apple.com>
3473
3474 <rdar://problem/4596726> ld64 lost DWARF debug notes
3475 src/MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
3476 unit-tests/test-cases/dwarf-debug-notes-r: added test case
3477
3478 2006-06-21 Nick Kledzik <kledzik@apple.com>
3479
3480 <rdar://problem/4567995> python 64-bit address miscalculation
3481 src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
3482
3483 2006-06-21 Nick Kledzik <kledzik@apple.com>
3484
3485 <rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
3486 src/MachOWriterExecutable.hpp: in -r mode, virtual sections should not increment address
3487
3488
3489 ----- Tagged ld64-58
3490
3491 2006-06-16 Nick Kledzik <kledzik@apple.com>
3492
3493 src/rebase.cpp: fix page alignment problem
3494 src/rebase.cpp: fix endianess problem with local non-lazy pointers
3495
3496 2006-06-15 Nick Kledzik <kledzik@apple.com>
3497
3498 src/rebase.cpp: fix to build in CurryWeed
3499 ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
3500
3501 2006-06-15 Nick Kledzik <kledzik@apple.com>
3502
3503 <rdar://problem/4495309> Support .objc_class_name_* symbols
3504 src/ObjectFile.h: Add kSymbolTableInAsAbsolute
3505 src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
3506 src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
3507 unit-tests/test-cases/objc-references: added
3508
3509 2006-06-15 Nick Kledzik <kledzik@apple.com>
3510
3511 <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
3512 src/MachOWriterExecutable.hpp: add section attribute for sections with code
3513
3514 2006-06-15 Nick Kledzik <kledzik@apple.com>
3515
3516 <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
3517 src/MachOReaderRelocatable.hpp: only special case Apple objc runtime objc classes
3518
3519 2006-06-15 Nick Kledzik <kledzik@apple.com>
3520
3521 <rdar://problem/4582999> x86_64: ".align" directive not honored
3522 src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
3523
3524 2006-06-14 Nick Kledzik <kledzik@apple.com>
3525
3526 <rdar://problem/4585335> jump table into middle of weak symbol causes error
3527 src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
3528 src/MachOWriterExecutable.hpp: do not error on absolute references to interior of weak symbols
3529
3530 2006-06-13 Nick Kledzik <kledzik@apple.com>
3531
3532 src/Options.cpp: allow -image_base as an alias for -seg1addr
3533
3534 2006-06-13 Nick Kledzik <kledzik@apple.com>
3535
3536 <rdar://problem/4585115> implement -d
3537 src/Options.h: add fMakeTentativeDefinitionsReal
3538 src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
3539 src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
3540 unit-tests/test-cases/btentative-to-real: added test case
3541
3542 2006-06-13 Nick Kledzik <kledzik@apple.com>
3543
3544 <rdar://problem/4584355> implement -bundle_loader
3545 src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
3546 src/Options.cpp: handle -bundle_loader
3547 src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
3548 src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
3549 src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
3550 unit-tests/test-cases/bundle_loader: added test case
3551
3552 2006-06-12 Nick Kledzik <kledzik@apple.com>
3553
3554 <rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
3555 src/MachOReaderDylib.hpp: in Reader::reExports() compare install path in addition to load path
3556
3557
3558 2006-06-10 Nick Kledzik <kledzik@apple.com>
3559
3560 <rdar://problem/4548935> Need rebasing tool
3561 src/rebase.cpp: added
3562 unit-tests/test-cases/rebase-basic: added
3563 doc/man/man1/rebase.1: added
3564 ld64.xcodeproj/project.pbxproj: added rebase target. changed all targets to build with dwarf
3565
3566
3567 2006-06-10 Nick Kledzik <kledzik@apple.com>
3568
3569 src/machochecker.cpp: add some ppc reloc sanity checking
3570
3571 ----- Tagged ld64-57
3572
3573 2006-06-06 Nick Kledzik <kledzik@apple.com>
3574
3575 <rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
3576 ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
3577 unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
3578
3579 2006-06-06 Nick Kledzik <kledzik@apple.com>
3580
3581 <rdar://problem/4572702> -sectcreate of a 0-byte section fails
3582 MachOWriterExecutable.cpp: Don't error out on zero length segments
3583 MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
3584 there is a writable segment >4GB from base address
3585
3586 2006-06-04 Eric Christopher <echristo@apple.com>
3587
3588 Radar 4560240
3589 Radar 3964999
3590 * src/ld.cpp (createReader): Fixed error message.
3591 (resolve): Ditto.
3592 (resolveFrom): Ditto.
3593 (checkUndefines): Ditto.
3594
3595 ----- Tagged ld64-56
3596
3597 2006-05-23 Nick Kledzik <kledzik@apple.com>
3598
3599 <rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
3600 ld.cpp: don't limit debug notes to functions starting with underscore
3601
3602 2006-05-22 Nick Kledzik <kledzik@apple.com>
3603
3604 <rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
3605 * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups
3606
3607 2006-05-22 Nick Kledzik <kledzik@apple.com>
3608
3609 <rdar://problem/4535044> remove inferring warning
3610 * ld.cpp: Remove "inferring" warning. If a link failed and now arch was specifed add which arch was
3611 inferred to error message
3612
3613 2006-05-19 Nick Kledzik <kledzik@apple.com>
3614
3615 <rdar://problem/4544001> ld64 does not honor -arch_multiple
3616 * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
3617
3618 2006-05-19 Nick Kledzik <kledzik@apple.com>
3619
3620 <rdar://problem/4555973> Support S_16BYTE_LITERALS section types
3621 * src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
3622 * src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS
3623
3624 2006-05-19 Nick Kledzik <kledzik@apple.com>
3625
3626 <rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
3627 * src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing
3628
3629 ----- Tagged ld64-55
3630
3631 2006-05-18 Nick Kledzik <kledzik@apple.com>
3632
3633 <rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
3634 * src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64
3635
3636 2006-05-18 Nick Kledzik <kledzik@apple.com>
3637
3638 <rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
3639 * src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references
3640
3641 2006-05-18 Nick Kledzik <kledzik@apple.com>
3642
3643 <rdar://problem/4553555> ld64: .section defaults to read-only
3644 * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
3645
3646 2006-05-18 Nick Kledzik <kledzik@apple.com>
3647
3648 <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
3649 * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
3650
3651 2006-05-12 Nick Kledzik <kledzik@apple.com>
3652
3653 * src/Architectures.hpp: add x86::kAbsolute32
3654 * src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
3655 * src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind
3656
3657 ----- Tagged ld64-54
3658
3659 2006-05-11 Nick Kledzik <kledzik@apple.com>
3660
3661 <rdar://problem/4545108> CF-393 failes to link for x86_64
3662 * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable
3663
3664 2006-05-11 Nick Kledzik <kledzik@apple.com>
3665
3666 <rdar://problem/4501434> warning arch x86_64 not found using i386
3667 * src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs
3668
3669
3670 2006-05-10 Nick Kledzik <kledzik@apple.com>
3671
3672 <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
3673 * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
3674
3675
3676 2006-05-08 Nick Kledzik <kledzik@apple.com>
3677
3678 <rdar://problem/3894083> Support -dead_strip
3679 * src/Options.h/cpp: implement -why_load and -why_live. Enable -dead_strip.
3680 * src/MachOReaderArchive.hpp: implement -why_load
3681 * src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
3682 * src/ld.cpp: implement dead code stripping
3683 * unit-tests/test-cases/dead_strip: added
3684
3685 ----- Tagged ld64-53
3686
3687 2006-05-05 Nick Kledzik <kledzik@apple.com>
3688
3689 * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
3690
3691 2006-05-05 Nick Kledzik <kledzik@apple.com>
3692
3693 <rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
3694 * src/ld.cpp: for SO stabs, associate first and last atom in the SO range
3695 * src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value
3696
3697 2006-05-05 Nick Kledzik <kledzik@apple.com>
3698
3699 * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
3700
3701
3702 2006-05-02 Nick Kledzik <kledzik@apple.com>
3703
3704 <rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
3705 * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
3706 <rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
3707 * src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
3708 is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.
3709
3710 2006-05-02 Nick Kledzik <kledzik@apple.com>
3711
3712 * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
3713 overlaps shared region
3714
3715 ----- Tagged ld64-52.1
3716
3717 2006-05-01 Nick Kledzik <kledzik@apple.com>
3718
3719 * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
3720 the __data section too.
3721
3722 ----- Tagged ld64-52
3723
3724 2006-04-28 Nick Kledzik <kledzik@apple.com>
3725
3726 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
3727 * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
3728
3729 2006-04-28 Nick Kledzik <kledzik@apple.com>
3730
3731 <rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
3732 * src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol
3733
3734
3735
3736 2006-04-21 Nick Kledzik <kledzik@apple.com>
3737
3738 * src/Options.cpp: fix default address for ppc64 custom stack
3739 * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
3740
3741
3742 2006-04-14 Nick Kledzik <kledzik@apple.com>
3743
3744 * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
3745
3746 ----- Tagged ld64-51.1
3747
3748 2006-04-13 Nick Kledzik <kledzik@apple.com>
3749
3750 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
3751 * src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
3752 that points to static or global symbols
3753 * src/ld.cpp: print version of ld64 in error messages
3754
3755
3756 ----- Tagged ld64-51
3757
3758 2006-04-11 Nick Kledzik <kledzik@apple.com>
3759
3760 <rdar://problem/4499168> exported symbols not properly stripped
3761 * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
3762
3763 2006-03-31 Nick Kledzik <kledzik@apple.com>
3764
3765 <rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
3766 * src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
3767 * src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that
3768
3769
3770 2006-03-31 Nick Kledzik <kledzik@apple.com>
3771
3772 <rdar://problem/4496499> ld64 should remove generated file if link errors out
3773 * src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow
3774
3775
3776 ----- Tagged ld64-50
3777
3778
3779 2006-03-29 Nick Kledzik <kledzik@apple.com>
3780
3781 * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
3782 * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
3783
3784 2006-03-28 Nick Kledzik <kledzik@apple.com>
3785
3786 * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
3787
3788 ----- Tagged ld64-49.1
3789
3790 2006-03-25 Nick Kledzik <kledzik@apple.com>
3791
3792 * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
3793
3794 ----- Tagged ld64-49
3795
3796 2006-03-24 Nick Kledzik <kledzik@apple.com>
3797
3798 * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
3799 <rdar://problem/4488113> ld64 is after processing bad GSYM stabs
3800 * src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it
3801
3802 2006-03-23 Nick Kledzik <kledzik@apple.com>
3803
3804 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
3805 external relocation
3806
3807 2006-03-23 Nick Kledzik <kledzik@apple.com>
3808
3809 * src/Options.cpp: change macosx-min-version to default to a per-architecture setting
3810 add warning if -pagezero_size is not page aligned
3811 * src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
3812 * src/machochecker.cpp: sanity check relocation records
3813
3814 ----- Tagged ld64-48
3815
3816 2006-03-21 Nick Kledzik <kledzik@apple.com>
3817
3818 <rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
3819 * src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
3820 match it to a STAB symbol.
3821
3822 2006-03-21 Nick Kledzik <kledzik@apple.com>
3823
3824 <rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
3825 * src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
3826 * src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
3827 * src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image
3828
3829 2006-03-21 Nick Kledzik <kledzik@apple.com>
3830
3831 <rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
3832 * unit-tests/test-cases/filelist: added
3833 * src/Options.cpp: in Options::loadFileList() handle comma option
3834
3835
3836 ----- Tagged ld64-47.1
3837
3838
3839 ----- Tagged ld64-47
3840
3841
3842 ----- Tagged ld64-46
3843
3844 2006-03-10 Nick Kledzik <kledzik@apple.com>
3845
3846 <rdar://problem/4419505> ld64 should figure out architecture from .o files
3847 * unit-tests/test-cases/auto-arch: added
3848 * src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
3849 * src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
3850 * src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
3851 * src/Options.cpp: stop defaulting to ppc64
3852
3853
3854 2006-03-09 Nick Kledzik <kledzik@apple.com>
3855
3856 <rdar://problem/4465004> Need "intentionally left blank" dylib stubs
3857 * unit-tests/include/common.makefile: add VALID_ARCHS
3858 * unit-tests/run-all-unit-tests: set up VALID_ARCHS
3859 * unit-tests/test-cases/blank-stubs: add test case
3860 * src/ld.cpp: in addDylib(), detect and ignore blank stubs
3861 * src/MachOReaderDylib.hpp: in constructor, handle blank stubs
3862
3863 2006-03-09 Nick Kledzik <kledzik@apple.com>
3864
3865 <rdar://problem/4471424> crash in stub with 2GB pagezero
3866 * src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used
3867
3868 2006-03-06 Nick Kledzik <kledzik@apple.com>
3869
3870 * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
3871
3872 ----- Tagged ld64-45
3873
3874
3875 2006-03-06 Nick Kledzik <kledzik@apple.com>
3876
3877 <rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
3878 * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion
3879
3880
3881 ----- Tagged ld64-44
3882
3883 2006-03-04 Nick Kledzik <kledzik@apple.com>
3884
3885 * src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
3886 Error out if .o file contains old __DWARFA style dwarf.
3887
3888 2006-03-02 Nick Kledzik <kledzik@apple.com>
3889
3890 * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
3891
3892 ----- Tagged ld64-43
3893
3894
3895 2006-03-02 Nick Kledzik <kledzik@apple.com>
3896
3897 * src/MachOReaderRelocatable.hpp: <rdar://problem/4464370> tighten detection of anonymous non-lazy-pointer
3898
3899 ----- Tagged ld64-42
3900
3901 2006-02-28 Nick Kledzik <kledzik@apple.com>
3902
3903 * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment
3904
3905 2006-02-28 Nick Kledzik <kledzik@apple.com>
3906
3907 <rdar://problem/4461240> SWB: ld64-37 (can't resolve symbol ___dso_handle)
3908 * src/MachOWriterExecutable.hpp: add class DsoHandleAtom
3909
3910 2006-02-28 Nick Kledzik <kledzik@apple.com>
3911
3912 * unit-tests/test-cases/literals-coalesce-alignment: added test case
3913 * src/ld.cpp: when coalescing strings pick one with greater alignment
3914 <rdar://problem/4458660> ld64: CG link failed because lo14 reference to anonymous non-lazy-pointer not aligned
3915 * unit-tests/test-cases/relocs-c/test.c: tweak to fail like 4458660
3916 * src/MachOReaderRelocatable.hpp: detect anonymous non-lazy-pointer and transform into real non-lazy-pointers
3917
3918 ----- Tagged ld64-41
3919
3920 2006-02-24 Nick Kledzik <kledzik@apple.com>
3921
3922 * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options.
3923 Fix -weak-l option.
3924
3925 ----- Tagged ld64-40
3926
3927 2006-02-24 Nick Kledzik <kledzik@apple.com>
3928
3929 <rdar://problem/4454698> Leopard9A113: ppc64 libstdc++.dylib initializer crashes in pthread_once
3930 * unit-tests/test-cases/multiple-entry-points: added
3931 * src/MachOReaderRelocatable.hpp: make sure that if there are multiple symbols with the same
3932 address, that we properly make zero length atoms for all but last symbol
3933
3934 2006-02-24 Nick Kledzik <kledzik@apple.com>
3935
3936 * src/Options.cpp: <rdar://problem/4456093> ld64 doesn't realpath(3) B&I tracing paths
3937
3938 2006-02-24 Nick Kledzik <kledzik@apple.com>
3939
3940 * src/Options.cpp: <rdar://problem/4457078> 9A110: ld64 can't deal with section names >16 chars
3941
3942 2006-02-23 Nick Kledzik <kledzik@apple.com>
3943
3944 * src/MachOWriterExecutable.hpp: use vector.reserve() to minimize re-allocations
3945 * src/Options.cpp: use vector.reserve() to minimize re-allocations
3946 * src/MachOReaderRelocatable.hpp: use vector.reserve() to minimize re-allocations
3947 * src/MachOReaderDylib.hpp: use vector.reserve() to minimize re-allocations
3948 * src/ld.cpp: use vector.reserve() to minimize re-allocations
3949
3950 2006-02-23 Nick Kledzik <kledzik@apple.com>
3951
3952 <rdar://problem/4455927> ld64 creates corrupt executables (and has malloc errors) with -headerpad option
3953 * src/MachOWriterExecutable.hpp: Change LoadCommandsPaddingAtom<A>::setSize() to update fLargestAtomSize
3954 * unit-tests/test-cases/header-pad: added
3955
3956 2006-02-23 Nick Kledzik <kledzik@apple.com>
3957
3958 <rdar://problem/4455192> ld64 creates invalid static executables
3959 * src/MachOWriterExecutable.hpp: Change MachHeaderAtom<A>::copyRawContent() to create correct header
3960 for static executables. Change SymbolTableLoadCommandsAtom to skip LC_DYSYMTAB for static executables
3961 * src/machochecker.cpp: Add tests that static executables are well formed
3962 * unit-tests/test-cases/static-executable: added
3963
3964 2006-02-22 Nick Kledzik <kledzik@apple.com>
3965
3966 * src/Options.cpp: <rdar://problem/4453468> chnage printf on unknown arg to a throw
3967
3968 ----- Tagged ld64-39
3969
3970 2006-02-20 Nick Kledzik <kledzik@apple.com>
3971
3972 * unit-tests/test-cases/read-only-relocs: added new test case
3973 * src/MachOWriterExecutable.hpp: <rdar://problem/4448922> detect and error on relocs in read-only sections
3974 * src/MachOReaderRelocatable.hpp: fix parsing of i386 absolute addressing relocs
3975
3976 2006-02-20 Nick Kledzik <kledzik@apple.com>
3977
3978 * unit-tests/test-cases/stabs-coalesce: added new test case
3979 * src/ld.cpp.hpp: <rdar://problem/4449226> in collectStabs removed unused stabs
3980
3981 ----- Tagged ld64-38
3982
3983 2006-02-17 Nick Kledzik <kledzik@apple.com>
3984
3985 * src/MachOWriterExecutable.hpp: <rdar://problem/4434578> set correct n_sect field of stabs
3986
3987 2006-02-15 Nick Kledzik <kledzik@apple.com>
3988
3989 * src/MachOReaderArchive.hpp: <rdar://problem/4441920> with -all_load skip over both kinds of SYMDEFs
3990 * unit-tests/test-cases/archive-basic/Makefile: add -all_load test case
3991
3992 ----- Tagged ld64-37
3993
3994 2006-02-13 Eric Christopher <echristo@apple.com>
3995
3996 * src/MachOWriterExecutable.hpp (assignFileOffsets): Simplify. Add comments.
3997 Adjust whitespace.
3998
3999 2006-02-13 Nick Kledzik <kledzik@apple.com>
4000
4001 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceRelocatable() fix kPCRel32 for external case
4002
4003 2006-02-13 Nick Kledzik <kledzik@apple.com>
4004
4005 * unit-tests/test-cases/zero-fill: added
4006 * src/machochecker.cpp: check that S_ZEROFILL have no file offset
4007 * src/MachOWriterExecutable.hpp: rework assignFileOffsets() to fix rdar://problem/4441145
4008
4009 2006-02-12 Nick Kledzik <kledzik@apple.com>
4010
4011 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440880> fix use of first zero-length c-string in .o file
4012
4013 2006-02-12 Nick Kledzik <kledzik@apple.com>
4014
4015 * src/MachOReaderRelocatable.hpp: <rdar://problem/4440905> fix uninitialized fAlignment
4016
4017 2006-02-12 Nick Kledzik <kledzik@apple.com>
4018
4019 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add pointer-diff cases
4020 * src/Architectures.hpp: make size explicit in ppc/ppc64 kPointerDiff
4021 * src/MachOReaderRelocatable.hpp: don't allow kPointerDiff64 for ppc (just ppc64)
4022 * src/MachOWriterExecutable.cpp: set proper r_length for ld -r of kPointerDiff
4023
4024 ----- Tagged ld64-36
4025
4026 2006-02-08 Nick Kledzik <kledzik@apple.com>
4027
4028 * src/MachOReaderRelocatable.cpp: rdar://problem/4438677 Handle when a .o file dwarf line info entries but no functions
4029
4030 2006-02-08 Nick Kledzik <kledzik@apple.com>
4031
4032 * src/MachOWriterExecutable.cpp: Properly set address of first TEXT section
4033 Keep S_COALESCED attribute for __eh_frame
4034
4035 2006-02-08 Nick Kledzik <kledzik@apple.com>
4036
4037 * src/ld.cpp: Temporarily turn allowable client errors into warnings
4038 * unit-tests/test-cases/allowable-clientMakefile: Temporarily let warnings be ok for above
4039 * src/MachOWriterExecutable.hpp: fix ld -r to not use external relocations for symbols make static
4040
4041 2006-02-08 Nick Kledzik <kledzik@apple.com>
4042
4043 * src/ld.cpp: A sibling in an umbrella can always link with its other siblings
4044 * unit-tests/test-cases/allowable-client: add test case for above
4045
4046 2006-02-08 Nick Kledzik <kledzik@apple.com>
4047
4048 * src/MachOReaderRelocatable.hpp: support LOCAL non-lazy pointers to hidden symbols
4049 * src/machochecker.cpp: verify indirect symbol table
4050 * unit-tests/test-cases/private-non-lazy: added test case
4051
4052 2006-02-07 Nick Kledzik <kledzik@apple.com>
4053
4054 * src/MachOWriterExecutable.hpp: fix calculation of file offsets in ld -r mode
4055 * src/machochecker.cpp: verify segment file offsets are within file
4056
4057 ----- Tagged ld64-35
4058
4059 2006-02-06 Nick Kledzik <kledzik@apple.com>
4060
4061 * ld.cpp: allow parent of sub-framework to link
4062 * unit-tests/test-cases/allowable-client/Makefile: added cases for parent and clients of parent
4063
4064 2006-02-04 Nick Kledzik <kledzik@apple.com>
4065
4066 * unit-tests/test-cases/relocs-c/test.c: added some array cases
4067 * src/MachOReaderRelocatable.hpp: factor out makeReferenceToEH()
4068 * src/MachOWriterExecutable.hpp: add initial support for non-lazy pointer synthesis
4069
4070 ----- Tagged ld64-34
4071
4072 2006-02-04 Nick Kledzik <kledzik@apple.com>
4073
4074 * src/ld.cpp: <rdar://problem/4432917> fix -no_arch_warnings
4075 <rdar://problem/4432932> fix -undefined warning
4076 Do BINCL/EINCL optimization for gfull stabs
4077 Implement "essential symbols" for stabs (-Sp)
4078 Fix allowable clients to only test on direct libraries
4079 * src/MachOReaderRelocatable.hpp: support BINCL/EINCL stabs
4080
4081 2006-02-03 Nick Kledzik <kledzik@apple.com>
4082
4083 * src/machochecker.cpp: add code to check load command alignment
4084 * src/MachOWriterExecutable.hpp: make load command alignment depend on architecture
4085
4086 2006-02-03 Nick Kledzik <kledzik@apple.com>
4087
4088 * unit-tests/test-cases/literals-coalesce: added
4089 * src/MachOReaderRelocatable.hpp: assure all targets of low14 ppc relocs are at least 4-byte alignmented
4090
4091 ----- Tagged ld64-33
4092
4093 2006-02-02 Nick Kledzik <kledzik@apple.com>
4094
4095 * src/MachOReaderRelocatable.hpp: properly coalesce 8-byte literals
4096 * src/MachOWriterExecutable.hpp: support ppc64::kPointerDiff32
4097
4098 ----- Tagged ld64-32
4099
4100 2006-02-02 Nick Kledzik <kledzik@apple.com>
4101
4102 * src/MachOReaderRelocatable.hpp: support anonymous zero fill atoms
4103
4104 2006-02-02 Nick Kledzik <kledzik@apple.com>
4105
4106 * src/ld.cpp: A weak definition is good enough, do not search archives for a non-weak one
4107 * unit-tests/test-cases/archive-weak: add test case for above
4108 * src/MachOReaderRelocatable.hpp: an atom should never have a by-name reference to itself
4109 * src/Options.cpp: prevent .eh symbols from being exported via a -exported_symbols_list
4110
4111 2006-02-01 Nick Kledzik <kledzik@apple.com>
4112
4113 * src/MachOReaderRelocatable.hpp: Support -macosx_version_min 10.5
4114
4115 2006-02-01 Nick Kledzik <kledzik@apple.com>
4116
4117 * src/MachOReaderRelocatable.hpp: don't try to parse debug_line dwarf if no symboled atoms
4118
4119 ----- Tagged ld64-31
4120
4121 2006-02-01 Eric Christopher <echristo@apple.com>
4122
4123 * unit-tests/test-cases/allow-stack-execute/Makefile: Move otool handling...
4124 * unit-tests/include/common.makefile: ... here.
4125 * unit-tests/bin/fail-if-stdin.pl: New.
4126 * unit-tests/test-cases/no-uuid: Ditto.
4127 * src/ld.cpp (Linker::) Add fCreateUUID.
4128 (::Linker): Initialize.
4129 (::collectStabs): Use. Set if dwarf or we have a UUID already.
4130 (::writeOutput): Pass as argument to Writer::write along with option.
4131 * src/Options.h (Option::emitUUID): Declare.
4132 (Option::fEmitUUID): Ditto.
4133 * src/Options.cpp (Option::emitUUID): New.
4134 (parse): Handle -no_uuid.
4135 * src/MachOReaderRelocatable (Reader::Reader): Handle LC_UUID.
4136 * src/ExecutableFile.h (Writer::Write): Add createUUID boolean.
4137 * src/MachOWriterExecutable: Add UUID forward declaration.
4138 (fUUIDAtom): New.
4139 (UUIDLoadCommandAtom): Emit LC_UUID if fEmit. New function emit. Size
4140 to zero at start.
4141 (Writer::writer): Add handle for LC_UUID. If createUUID emit LC_UUID.
4142 (MachHeaderAtom::copyRawContent): Don't count a load command if its size is
4143 0.
4144 (UUIDLoadCommandAtom::copyRawContent): Depend on fEmit.
4145
4146
4147 2006-01-31 Nick Kledzik <kledzik@apple.com>
4148
4149 * unit-tests/test-cases/dwarf-debug-notes : Added
4150 * src/ld.cpp: don't generate debug note for .eh symbols
4151 * src/MachOReaderRelocatable.hpp: make dwarf line info to atom matching faster and better
4152
4153 2006-01-31 Nick Kledzik <kledzik@apple.com>
4154
4155 * ld64.xcodeproj/project.pbxproj : Make buildable on Leopard
4156 * src/MachOFileAbstraction.hpp: make buildable without latest cctools headers
4157
4158 2006-01-31 Nick Kledzik <kledzik@apple.com>
4159
4160 * src/MachOReaderRelocatable.hpp: better error message for bad relocs
4161 * src/ObjectDump.cpp: add emacs tab settings
4162 * src/SectCreate.h: ditto
4163 * src/SectCreate.cpp: ditto
4164 * src/machochecker.cpp: ditto
4165 * src/ExecutableFile.h: ditto
4166
4167 2006-01-30 Eric Christopher <echristo@apple.com>
4168
4169 * src/ExecutableFile.h: Indent.
4170
4171 2006-01-30 Nick Kledzik <kledzik@apple.com>
4172
4173 * src/MachOReaderRelocatable.hpp: performance improvements
4174 * src/ld.cpp: now that stubs are synthesized in write, don't need to special case anymore
4175
4176 2006-01-30 Nick Kledzik <kledzik@apple.com>
4177
4178 * src/MachOReaderRelocatable.hpp: fix parsing of pcc relocs
4179 * unit-tests/test-cases/relocs-asm/relocs-asm.s: add test case for above
4180
4181 2006-01-29 Nick Kledzik <kledzik@apple.com>
4182
4183 * unit-tests/test-cases/weak_import: added test case
4184 * src/ld.cpp: move code for weak_import mismatch to writer
4185 * src/ObjectFile.h: remove ImportWeakness methods
4186 * src/MachOReaderDylib.hpp: ditto
4187 * src/SectCreate.cpp: ditto
4188 * src/Architectures.hpp: add new ReferenceKinds for weak_imports
4189 * src/MachOReaderRelocatable.hpp: implement new ReferenceKinds
4190 * src/MachOWriterExecutable.hpp: handle new ReferenceKinds and weak_import mismatches
4191
4192 2006-01-29 Nick Kledzik <kledzik@apple.com>
4193
4194 * src/Options.cpp: verify -allow_stack_execute is only used on main executables
4195
4196 2006-01-29 Nick Kledzik <kledzik@apple.com>
4197
4198 * src/MachOReaderRelocatable.hpp: sync with latest dwarf reader from Geoff
4199 * src/debugline.c: sync with latest dwarf reader from Geoff
4200
4201 2006-01-27 Eric Christopher <echristo@apple.com>
4202
4203 * src/ld.cpp (Linker::syntesizeStabs): Correct spelling. Update all uses.
4204
4205 2006-01-27 Eric Christopher <echristo@apple.com>
4206
4207 * src/Options.h (Options): Add hasExecutableStack, fExecutableStack.
4208 * src/Options.cpp (Options::hasExecutableStack): New.
4209 (Options::parse): Parse -allow_stack_execute.
4210 * src/MachOWriterExecutable.hpp (MachHeaderAtom::copyRawContent):
4211 Implement MH_ALLOW_STACK_EXECUTION.
4212 * unit-tests/include/common.makefile (FAIL_IF_EMPTY): New.
4213 * unit-tests/bin/fail-if-no-stdin.pl: New file.
4214 * unit-tests/test-cases/allow-stack-execute: New directory.
4215
4216 2006-01-27 Nick Kledzik <kledzik@apple.com>
4217
4218 * src/MachOFileAbstraction.hpp: rely on latest system headers
4219 * src/MachOWriterExecutable.hpp: fix ppc stubs.
4220 wrote new relocationNeededInFinalLinkedImage() to replace common code
4221
4222 2006-01-27 Eric Christopher <echristo@apple.com>
4223
4224 * src/ld.cpp (logTraceInfo): New.
4225 (Linker::addArchive): Use.
4226 (Linker::addDylib): Ditto.
4227 * src/ObjectFile (ReaderOptions::fTraceOutputFile): New.
4228 * src/MachOReaderArchive.hpp (Reader::Reader): Move trace
4229 logging to Linker::addArchive.
4230 * src/Options.cpp (parsePreCommandLineEnvironment): Check
4231 LD_PRINT_FILE if tracing dylibs or archives.
4232
4233 2006-01-26 Nick Kledzik <kledzik@apple.com>
4234
4235 * src/MachOWriterExecutable.hpp: handle NULL strings in SO debug notes
4236
4237 2006-01-26 Nick Kledzik <kledzik@apple.com>
4238
4239 * src/MachOWriterExecutable.hpp: fix header padding calculation and thread state
4240
4241 2006-01-26 Nick Kledzik <kledzik@apple.com>
4242
4243 Rewrite all stabs processing.
4244 Move sythesize of debug notes into ld.cpp
4245
4246 2006-01-26 Nick Kledzik <kledzik@apple.com>
4247
4248 * src/MachOWriterExecutable.hpp: fix ppc and ppc64 stub relocs
4249
4250 2006-01-25 Nick Kledzik <kledzik@apple.com>
4251
4252 * ld64.xcodeproj/project.pbxproj: special case building in Curry
4253
4254 2006-01-25 Nick Kledzik <kledzik@apple.com>
4255
4256 * src/MachOWriterExecutable.hpp: fix bugs in stub/lazy-pointer synthesis
4257
4258 2006-01-24 Eric Christopher <echristo@apple.com>
4259
4260 * src/ld.cpp (Linker::createReaders): Change logging title to XBS.
4261 (Linker::addDylib): Ditto.
4262 * src/MachOReaderArchive.hpp (Reader::Reader): Ditto.
4263 * src/Options.h (fPrintOptions): New.
4264 * src/Options.cpp (Options::Options): Initialize above.
4265 (Options::checkForFile): Change logging title to XBS.
4266 (Options::findFramework): Ditto.
4267 (Options::parse): Add log for options.
4268 (Options::parsePreCommandLineEnvironmentSettings): Add LD_TRACE_ARCHIVES,
4269 LD_TRACE_DYLIBS, and LD_PRINT_OPTIONS.
4270
4271 2006-01-24 Nick Kledzik <kledzik@apple.com>
4272
4273 * src/MachOReaderRelocatable.hpp: better C++ eh parsing
4274
4275 2006-01-23 Eric Christopher <echristo@apple.com>
4276
4277 * unit-tests/bin/fail-if-exit-zero.pl: New.
4278 * unit-tests/include/common.makefile (FAIL_IF_SUCCESS): Use.
4279 * unit-tests/allowable-client: New test.
4280 * src/ld.cpp (Linker::addDylib): Check allowable clients before adding dylib.
4281 * src/Options.h (allowableClients): New.
4282 (clientName): Ditto.
4283 (fAllowableClients): Ditto.
4284 (fClientName): Ditto.
4285 * src/Options.cpp: Implement above.
4286 (parse): Handle -allowable_client and -client_name.
4287 * src/MachOReaderDylib.hpp (getAllowableClients): New.
4288 (fAllowableClients): Ditto.
4289 (Reader): Process LC_SUB_CLIENT load command.
4290 * src/ObjectFile.h (parentUmbrella): New.
4291 (getAllowableClients): New.
4292 * src/MachOWriterExecutable.hpp (AllowableClientLoadCommandsAtom): New.
4293
4294 2006-01-23 Nick Kledzik <kledzik@apple.com>
4295
4296 * unit-tests/test-cases/archive-basic: added
4297 * src/ld.cpp: fix shadowed local variable
4298 * src/FileAbstraction.hpp: <rdar://problem/4417372> ld64 shouldn't inline when building debug
4299
4300 2006-01-23 Nick Kledzik <kledzik@apple.com>
4301
4302 * src/ld.cpp: fix symbol not found error message
4303 * src/MachOReaderDylib.hpp: add logging to hash table
4304 * src/MachOReaderRelocatable.hpp: enable stabs processing. Handle static functions with stubs
4305 handle labeled cstrings.
4306 * src/MachOWriterExecutable.hpp: properly suppress atoms not in symbol table. fix low14 error check.
4307 add StubAtomHelper.
4308 * unit-tests/test-cases/relocs-literals/test.c: add more interesting edge cases
4309
4310 2006-01-17 Nick Kledzik <kledzik@apple.com>
4311
4312 * src/MachOReaderRelocatable.hpp: tweaks to synthesizing debug notes
4313
4314 2006-01-16 Nick Kledzik <kledzik@apple.com>
4315
4316 * src/debugline.{sh}: added
4317 * src/MachOReaderRelocatable.hpp: synthesize debug notes SOL from dwarf
4318 * src/MachOWriterExecutable.hpp: fix lazy pointer section
4319 * src/ObjectDump.hpp: Fix conditionalization
4320 * unit-tests/test-cases/dwarf-strip: added
4321
4322 2006-01-11 Nick Kledzik <kledzik@apple.com>
4323
4324 * src/MachOReaderRelocatable.hpp: support Tiger crt1.o build with old ld64
4325 * src/ObjectDump.hpp: Support -arch option
4326
4327 2006-01-10 Nick Kledzik <kledzik@apple.com>
4328
4329 * src/MachOWriterExecutable.hpp: fix stubs for ppc64
4330 * src/MachOFileAbstraction.hpp: fix typo for macho_routines
4331 * ld64.xcodeproj/project.pbxproj: add machochecker target
4332 * src/machochecker.cpp: new skeleton for checking mach-o file bit
4333 * unit-tests/: Add support for running machochecker
4334
4335 2006-01-10 Nick Kledzik <kledzik@apple.com>
4336
4337 * src/MachOReaderRelocatable.hpp: warn if dwarf can't be parsed
4338 * src/MachOReaderArchive.hpp: modTime for OSO stabs from archives is .a modTime
4339
4340 2006-01-09 Nick Kledzik <kledzik@apple.com>
4341
4342 * track modification time of .o files so that sythesized OSO stab will have it
4343
4344 2006-01-09 Nick Kledzik <kledzik@apple.com>
4345
4346 * src/MachOFileAbstraction.hpp: add macho_uuid_command
4347 * src/MachOWriterExecutable.cpp: add UUID load command to generated files
4348
4349 2006-01-09 Nick Kledzik <kledzik@apple.com>
4350
4351 * src/MachOReaderDylib.hpp: no longer keep dylib memory mapped
4352 * src/ld.cpp: don't track dylib sizes because they are not longer memory mapped
4353
4354 2006-01-05 Nick Kledzik <kledzik@apple.com>
4355
4356 * src/MachOReaderRelocatable.hpp: support new relocations
4357
4358 2006-01-05 Nick Kledzik <kledzik@apple.com>
4359
4360 * src/MachOReaderDylib.hpp: support MH_DYLIB_STUB
4361 * src/MachOReaderRelocatable.hpp: Add Geoff's comp unit extractor
4362
4363 2006-01-05 Nick Kledzik <kledzik@apple.com>
4364
4365 refactor: transform Atom::dontStripName() to getSymbolTableInclusion()
4366 * src/ld.cpp: pass dyld_stub_binding_helper to writer
4367 * src/MachOReaderRelocatable.hpp: update synthesized stabs
4368 Ignore stubs and lazy pointers in .o files
4369 Support initializers and terminators
4370 * src/MachOWriterExecutable.hpp: synthesize stubs and lazy pointers as needed
4371 * ld64.xcodeproj/project.pbxproj: change Release target to build with dwarf
4372
4373 2006-01-03 Eric Christopher <echristo@apple.com>
4374
4375 * src/Options.h (multipleDefinitionsInDylibs): Declare.
4376 (overridingDefinitionInDependentDylib): Ditto.
4377 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
4378 (multiplyDefined): Remove.
4379 (multiplyDefinedUnused): Ditto.
4380 (fMultiplyDefined): Ditto.
4381 (fWarnOnMultiplyDefined): New.
4382 (fMultiplyDefinedDynamic): Ditto.
4383 * src/Options.cpp (Options::Options): Initialize above.
4384 (overridingDefinitionInDependentDylib): New.
4385 (multipleDefinitionsInDylibs): Ditto.
4386 (warnOnMultipleDefinitionsInObjectFiles): Ditto.
4387 (parse): Update comments. Fix parsing of -y option.
4388 Update error message for -dead_strip. Parse above
4389 options.
4390
4391 2006-01-02 Nick Kledzik <kledzik@apple.com>
4392
4393 * Refactor: move Atom::writeContent() to Writer
4394
4395 2005-12-23 Nick Kledzik <kledzik@apple.com>
4396
4397 * Reworked, simplify, and document test harness
4398 * unit-tests/README: Added
4399
4400 2005-12-23 Nick Kledzik <kledzik@apple.com>
4401
4402 * src/MachOReaderRelocatable.hpp: fixes for Objective-C
4403 * unit-tests/test-cases/relocs-objc: Added
4404
4405 2005-12-22 Nick Kledzik <kledzik@apple.com>
4406
4407 * src/MachOReaderRelocatable.hpp: fix check that next reloc is pair
4408 * src/MachOReaderRelocatable.hpp: Add code to synthesize essential stabs from dwarf
4409
4410 2005-12-21 Nick Kledzik <kledzik@apple.com>
4411
4412 * src/MachOReaderRelocatable.hpp: Fix parsing of literal sections
4413 * src/MachOWriterExecutable.hpp: Fix writing of literal sections
4414 * unit-tests/test-cases/relocs-literals: Added
4415
4416 2005-12-15 Eric Christopher <echristo@apple.com>
4417
4418 * src/Options.h (enum Treatment): New.
4419 (enum PICTreatment): Delete.
4420 (enum VersionMin): New.
4421 (prebind): Declare.
4422 (macosxVersionMin): Ditto.
4423 (multiplyDefined): Ditto.
4424 (multiplyDefinedUnused): Ditto.
4425 (setVersionMin): Ditto.
4426 (setPICTreatment): Delete.
4427 (setReadOnlyRelocTreatment): Ditto.
4428 (picTreatment): Adjust return type.
4429 (parseTreatment): New.
4430 (fPrebind): Ditto.
4431 (fVersionMin): Ditto.
4432 (fPICTreatment): Change type.
4433 (fMultiplyDefined): New.
4434 (fMultiplyDefinedUnused): Ditto.
4435 (fLimitUndefinedSymbols): Ditto.
4436
4437 * src/Options.cpp: Fix whitespace. Add comments on options.
4438 (Options::Options): Add initializers for new variables.
4439 (Options::prebind): New.
4440 (Options::macosxVersionMin): Ditto.
4441 (Options::parseTreatment): Ditto.
4442 (Options::setVersionMin): Ditto.
4443 (Options::setReadOnlyRelocTreatment): Delete.
4444 (Options::setPICTreatment): Ditto.
4445 (Options::Parse): Update for above. Add comments.
4446
4447 2005-12-15 Nick Kledzik <kledzik@apple.com>
4448
4449 * src/MachOReaderRelocatable.hpp: Add comments about dwarf
4450
4451 2005-12-14 Nick Kledzik <kledzik@apple.com>
4452
4453 * src/ELFFileAbstraction.hpp: Added
4454 * src/ELFReaderRelocatable.hpp: Added
4455 * Lot of fixes for new architecture
4456 * Added __OPEN_SOURCE__ to "Preprocessor Macros" to disable new architecture support by default
4457
4458 2005-12-13 Nick Kledzik <kledzik@apple.com>
4459
4460 * src/MachOReaderRelocatable.hpp: check for S_ATTR_DEBUG and ignore those sections
4461 * unit-tests/test-cases/dwarf-ignore: added
4462
4463 2005-12-12 Nick Kledzik <kledzik@apple.com>
4464
4465 * Added test harness and three initial tests:
4466 relocs-asm, relocs-c, and hello-world
4467
4468 2005-12-12 Nick Kledzik <kledzik@apple.com>
4469
4470 * src/MachOReaderRelocatable.hpp: Massive refactoring:
4471 Now there are three Atom classes, Chopping into Atoms
4472 is done on label boundaries or by knowledge of special
4473 sections, Share lots of ppc/ppc64 code.
4474 Stabs process code is temporarily disabled.
4475
4476 2005-12-12 Nick Kledzik <kledzik@apple.com>
4477
4478 * src/ObjectDump.cpp: Add command line options: -no_content, -stabs, -no_sort
4479
4480 2005-12-11 Eric Christopher <echristo@apple.com>
4481
4482 * src/Options.cpp: Reformat.
4483 * src/Options.h: Ditto.
4484
4485 2005-12-07 Eric Christopher <echristo@apple.com>
4486
4487 * src/MachOReaderRelocatable.hpp (Atom::getAlignment):
4488 When calculating alignment of an Atom, take into account
4489 the alignment from which we pulled the Atom.
4490
4491 2005-12-06 Nick Kledzik <kledzik@apple.com>
4492
4493 * src/Options.cpp src/Options.h: Add design comments
4494
4495 2005-12-05 Eric Christopher <echristo@apple.com>
4496
4497 * src/ld.cpp (Linker::createWriter): Uncomment ppc64 and
4498 i386 linkers.
4499
4500 2005-12-05 Eric Christopher <echristo@apple.com>
4501
4502 * ChangeLog: New file.
4503
4504 2005-12-02 Nick Kledzik <kledzik@apple.com>
4505
4506 * src/ObjectFile.h: Add design comments
4507
4508 2005-11-30 Nick Kledzik <kledzik@apple.com>
4509
4510 * Fix uses of __OPEN_SOURCE__
4511
4512 2005-11-28 Nick Kledzik <kledzik@apple.com>
4513
4514 * Refactor Atom to use getDefinitionKind()
4515
4516 2005-11-21 Nick Kledzik <kledzik@apple.com>
4517
4518 * src/MachOWriterExecutable.hpp: don't generate section for commons in -r mode
4519
4520 2005-11-18 Nick Kledzik <kledzik@apple.com>
4521
4522 * x86 tweaks
4523
4524 2005-11-18 Nick Kledzik <kledzik@apple.com>
4525
4526 * src/ObjectDump.cpp: make work with command line arguments
4527
4528 2005-11-18 Nick Kledzik <kledzik@apple.com>
4529
4530 * Massive rework to remove preprocessor conditionals and use templates
4531
4532 2005-11-14 Nick Kledzik <kledzik@apple.com>
4533
4534 * Created new Subversion repository for ld64 from cvs tag ld64-27.2