4 2006-06-22 Nick Kledzik <kledzik@apple.com>
6 <rdar://problem/4596726> ld64 lost DWARF debug notes
7 MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
8 unit-tests/test-cases/dwarf-debug-notes-r: added test case
10 2006-06-21 Nick Kledzik <kledzik@apple.com>
12 <rdar://problem/4567995> python 64-bit address miscalculation
13 src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
15 2006-06-21 Nick Kledzik <kledzik@apple.com>
17 <rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
18 src/MachOWriterExecutable.hpp: in -r mode, virtual sections don't increment address
23 2006-06-16 Nick Kledzik <kledzik@apple.com>
25 src/rebase.cpp: fix page alignment problem
26 src/rebase.cpp: fix endianess problem with local non-lazy pointers
28 2006-06-15 Nick Kledzik <kledzik@apple.com>
30 src/rebase.cpp: fix to build in CurryWeed
31 ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed
33 2006-06-15 Nick Kledzik <kledzik@apple.com>
35 <rdar://problem/4495309> Support .objc_class_name_* symbols
36 src/ObjectFile.h: Add kSymbolTableInAsAbsolute
37 src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
38 src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
39 unit-tests/test-cases/objc-references: added
41 2006-06-15 Nick Kledzik <kledzik@apple.com>
43 <rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
44 src/MachOWriterExecutable.hpp: add section attribute for sections with code
46 2006-06-15 Nick Kledzik <kledzik@apple.com>
48 <rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
49 src/MachOReaderRelocatable.hpp: only special case Apple's objc runtime objc classes
51 2006-06-15 Nick Kledzik <kledzik@apple.com>
53 <rdar://problem/4582999> x86_64: ".align" directive not honored
54 src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size
56 2006-06-14 Nick Kledzik <kledzik@apple.com>
58 <rdar://problem/4585335> jump table into middle of weak symbol causes error
59 src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
60 src/MachOWriterExecutable.hpp: don't error on absolute references to interior of weak symbols
62 2006-06-13 Nick Kledzik <kledzik@apple.com>
64 src/Options.cpp: allow -image_base as an alias for -seg1addr
66 2006-06-13 Nick Kledzik <kledzik@apple.com>
68 <rdar://problem/4585115> implement -d
69 src/Options.h: add fMakeTentativeDefinitionsReal
70 src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
71 src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
72 unit-tests/test-cases/btentative-to-real: added test case
74 2006-06-13 Nick Kledzik <kledzik@apple.com>
76 <rdar://problem/4584355> implement -bundle_loader
77 src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
78 src/Options.cpp: handle -bundle_loader
79 src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
80 src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
81 src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
82 unit-tests/test-cases/bundle_loader: added test case
84 2006-06-12 Nick Kledzik <kledzik@apple.com>
86 <rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
87 src/MachOReaderDylib.hpp: in Reader::reExports() compare install path in addition to load path
90 2006-06-10 Nick Kledzik <kledzik@apple.com>
92 <rdar://problem/4548935> Need rebasing tool
94 unit-tests/test-cases/rebase-basic: added
95 doc/man/man1/rebase.1: added
96 ld64.xcodeproj/project.pbxproj: added rebase target. changed all targets to build with dwarf
99 2006-06-10 Nick Kledzik <kledzik@apple.com>
101 src/machochecker.cpp: add some ppc reloc sanity checking
105 2006-06-06 Nick Kledzik <kledzik@apple.com>
107 <rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
108 ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
109 unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
111 2006-06-06 Nick Kledzik <kledzik@apple.com>
113 <rdar://problem/4572702> -sectcreate of a 0-byte section fails
114 MachOWriterExecutable.cpp: Don't error out on zero length segments
115 MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
116 there is a writable segment >4GB from base address
118 2006-06-04 Eric Christopher <echristo@apple.com>
122 * src/ld.cpp (createReader): Fixed error message.
124 (resolveFrom): Ditto.
125 (checkUndefines): Ditto.
129 2006-05-23 Nick Kledzik <kledzik@apple.com>
131 <rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
132 ld.cpp: don't limit debug notes to functions starting with underscore
134 2006-05-22 Nick Kledzik <kledzik@apple.com>
136 <rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
137 * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups
139 2006-05-22 Nick Kledzik <kledzik@apple.com>
141 <rdar://problem/4535044> remove inferring warning
142 * ld.cpp: Remove "inferring" warning. If a link failed and now arch was specifed add which arch was
143 inferred to error message
145 2006-05-19 Nick Kledzik <kledzik@apple.com>
147 <rdar://problem/4544001> ld64 does not honor -arch_multiple
148 * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message
150 2006-05-19 Nick Kledzik <kledzik@apple.com>
152 <rdar://problem/4555973> Support S_16BYTE_LITERALS section types
153 * src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
154 * src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS
156 2006-05-19 Nick Kledzik <kledzik@apple.com>
158 <rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
159 * src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing
163 2006-05-18 Nick Kledzik <kledzik@apple.com>
165 <rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
166 * src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64
168 2006-05-18 Nick Kledzik <kledzik@apple.com>
170 <rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
171 * src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references
173 2006-05-18 Nick Kledzik <kledzik@apple.com>
175 <rdar://problem/4553555> ld64: .section defaults to read-only
176 * src/MachOReaderRelocatable.hpp: default unknown segments to r/w
178 2006-05-18 Nick Kledzik <kledzik@apple.com>
180 <rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
181 * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions
183 2006-05-12 Nick Kledzik <kledzik@apple.com>
185 * src/Architectures.hpp: add x86::kAbsolute32
186 * src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
187 * src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind
191 2006-05-11 Nick Kledzik <kledzik@apple.com>
193 <rdar://problem/4545108> CF-393 failes to link for x86_64
194 * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable
196 2006-05-11 Nick Kledzik <kledzik@apple.com>
198 <rdar://problem/4501434> warning arch x86_64 not found using i386
199 * src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs
202 2006-05-10 Nick Kledzik <kledzik@apple.com>
204 <rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
205 * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections
208 2006-05-08 Nick Kledzik <kledzik@apple.com>
210 <rdar://problem/3894083> Support -dead_strip
211 * src/Options.h/cpp: implement -why_load and -why_live. Enable -dead_strip.
212 * src/MachOReaderArchive.hpp: implement -why_load
213 * src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
214 * src/ld.cpp: implement dead code stripping
215 * unit-tests/test-cases/dead_strip: added
219 2006-05-05 Nick Kledzik <kledzik@apple.com>
221 * src/Options.cpp: make 10.4 be minimum OS version for newer architectures
223 2006-05-05 Nick Kledzik <kledzik@apple.com>
225 <rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
226 * src/ld.cpp: for SO stabs, associate first and last atom in the SO range
227 * src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value
229 2006-05-05 Nick Kledzik <kledzik@apple.com>
231 * MachOWriterExecutable.hpp: fix end FUN stab to have length of function
234 2006-05-02 Nick Kledzik <kledzik@apple.com>
236 <rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
237 * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
238 <rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
239 * src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
240 is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.
242 2006-05-02 Nick Kledzik <kledzik@apple.com>
244 * src/Opptions.cpp: remove warning about -stack_addr not specified. Add warning if 32-bit stack
245 overlaps shared region
247 ----- Tagged ld64-52.1
249 2006-05-01 Nick Kledzik <kledzik@apple.com>
251 * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
252 the __data section too.
256 2006-04-28 Nick Kledzik <kledzik@apple.com>
258 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
259 * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection
261 2006-04-28 Nick Kledzik <kledzik@apple.com>
263 <rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
264 * src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol
267 2006-04-27 Nick Kledzik <kledzik@apple.com>
269 <rdar://problem/4498971> dyld crashes ungracefully on x86_64 when there is an internal exception
270 * src/MachOWriterExecutable.cpp: allow non-zero PCRELGOT addends (used by C++ eh frames)
272 2006-04-21 Nick Kledzik <kledzik@apple.com>
274 * src/Options.cpp: fix default address for ppc64 custom stack
275 * src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack
278 2006-04-14 Nick Kledzik <kledzik@apple.com>
280 * src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name
282 ----- Tagged ld64-51.1
284 2006-04-13 Nick Kledzik <kledzik@apple.com>
286 <rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
287 * src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
288 that points to static or global symbols
289 * src/ld.cpp: print version of ld64 in error messages
294 2006-04-11 Nick Kledzik <kledzik@apple.com>
296 <rdar://problem/4499168> exported symbols not properly stripped
297 * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()
299 2006-03-31 Nick Kledzik <kledzik@apple.com>
301 <rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
302 * src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
303 * src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that
306 2006-03-31 Nick Kledzik <kledzik@apple.com>
308 <rdar://problem/4496499> ld64 should remove generated file if link errors out
309 * src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow
314 2006-03-29 Nick Kledzik <kledzik@apple.com>
316 * src/MachOWriterExecutable.hpp: fix x86_64 addends when -multi_module forces an external relocation
318 2006-03-29 Nick Kledzik <kledzik@apple.com>
320 * src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
321 * src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space
323 2006-03-28 Nick Kledzik <kledzik@apple.com>
325 * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info
327 ----- Tagged ld64-49.1
329 2006-03-25 Nick Kledzik <kledzik@apple.com>
331 * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB
335 2006-03-24 Nick Kledzik <kledzik@apple.com>
337 * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
338 <rdar://problem/4488113> ld64 is after processing bad GSYM stabs
339 * src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it
341 2006-03-23 Nick Kledzik <kledzik@apple.com>
343 * src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
346 2006-03-23 Nick Kledzik <kledzik@apple.com>
348 * src/Options.cpp: change macosx-min-version to default to a per-architecture setting
349 add warning if -pagezero_size is not page aligned
350 * src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
351 * src/machochecker.cpp: sanity check relocation records
355 2006-03-21 Nick Kledzik <kledzik@apple.com>
357 <rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
358 * src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
359 match it to a STAB symbol.
361 2006-03-21 Nick Kledzik <kledzik@apple.com>
363 <rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
364 * src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
365 * src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
366 * src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image
368 2006-03-21 Nick Kledzik <kledzik@apple.com>
370 <rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
371 * unit-tests/test-cases/filelist: added
372 * src/Options.cpp: in Options::loadFileList() handle comma option
380 2006-03-10 Nick Kledzik <kledzik@apple.com>
382 <rdar://problem/4419505> ld64 should figure out architecture from .o files
383 * unit-tests/test-cases/auto-arch: added
384 * src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
385 * src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
386 * src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
387 * src/Options.cpp: stop defaulting to ppc64
390 2006-03-09 Nick Kledzik <kledzik@apple.com>
392 <rdar://problem/4465004> Need "intentionally left blank" dylib stubs
393 * unit-tests/include/common.makefile: add VALID_ARCHS
394 * unit-tests/run-all-unit-tests: set up VALID_ARCHS
395 * unit-tests/test-cases/blank-stubs: add test case
396 * src/ld.cpp: in addDylib(), detect and ignore blank stubs
397 * src/MachOReaderDylib.hpp: in constructor, handle blank stubs
399 2006-03-09 Nick Kledzik <kledzik@apple.com>
401 <rdar://problem/4471424> crash in stub with 2GB pagezero
402 * src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used
404 2006-03-06 Nick Kledzik <kledzik@apple.com>
406 * src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two
410 2006-03-06 Nick Kledzik <kledzik@apple.com>
412 <rdar://problem/4466930> <rdar://problem/4467982> ld64 failed: rel32 out of range when linking a dylib
413 * src/MachOWriterExecutable.cpp: in Writer<x86_64>::fixUpReferenceFinal add (int32_t) cast
415 2006-03-06 Nick Kledzik <kledzik@apple.com>
417 <rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
418 * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion
420 2006-03-06 Nick Kledzik <kledzik@apple.com>
422 <rdar://problem/4457818> x86_THREAD_STATE64_COUNT will change, ld64 must adapt
423 * src/MachOWriterExecutable.hpp: update ThreadsLoadCommandsAtom<x86_64> for new thread status layout
427 2006-03-04 Nick Kledzik <kledzik@apple.com>
429 * src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
430 Error out if .o file contains old __DWARFA style dwarf.
432 2006-03-02 Nick Kledzik <kledzik@apple.com>
434 * src/ld.cpp: only re-map page aligned sub-parts of a fat file. A conformat mmap() requires alignment.
438 2006-03-03 Nick Kledzik <kledzik@apple.com>
440 <rdar://problem/4465443> RIP-relative offsets aren't handled properly when the instruction has immediate operands
441 * src/Architectures.hpp: add x86_64::kPCRel32_*
442 * src/MachOReaderRelocatable.hpp: generate x86_64::kPCRel32_*
443 * src/MachOWriterExecutable.hpp: process x86_64::kPCRel32_*