
----- Tagged ld64-59

2006-06-22      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4596726> ld64 lost DWARF debug notes
	MachOReaderRelocatable.hpp: add fHasUUID so kDebugInfoStabsUUID can be set later
	unit-tests/test-cases/dwarf-debug-notes-r: added test case
	
2006-06-21      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4567995> python 64-bit address miscalculation
	src/MachOReaderRelocatable.hpp: change getTargetOffset() to sign extend the 32-bit value to 64-bits
	
2006-06-21      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4535036> ld64 seems to offset things incorrectly when using -r
	src/MachOWriterExecutable.hpp: in -r mode, virtual sections don't increment address


----- Tagged ld64-58

2006-06-16      Nick Kledzik    <kledzik@apple.com>

	src/rebase.cpp: fix page alignment problem
	src/rebase.cpp: fix endianess problem with local non-lazy pointers

2006-06-15      Nick Kledzik    <kledzik@apple.com>

	src/rebase.cpp: fix to build in CurryWeed
	ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed 

2006-06-15      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4495309> Support .objc_class_name_* symbols	
	src/ObjectFile.h: Add kSymbolTableInAsAbsolute
	src/MachOReaderRelocatable.hpp: synthesize references to required objc classes
	src/MachOWriterExecutable.hpp: write objc_class_name as absolute symbol
	unit-tests/test-cases/objc-references: added

2006-06-15      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4484369> SECTION_ATTRIBUTES unset in ppc64 mach-o header
	src/MachOWriterExecutable.hpp: add section attribute for sections with code

2006-06-15      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4569407> ld64 bogus duplicate symbol name linking GNU libobjc
	src/MachOReaderRelocatable.hpp: only special case Apple's objc runtime objc classes

2006-06-15      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4582999> x86_64: ".align" directive not honored
	src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size

2006-06-14      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4585335> jump table into middle of weak symbol causes error
	src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols
	src/MachOWriterExecutable.hpp: don't error on absolute references to interior of weak symbols

2006-06-13      Nick Kledzik    <kledzik@apple.com>

	src/Options.cpp: allow -image_base as an alias for -seg1addr

2006-06-13      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4585115> implement -d
	src/Options.h: add fMakeTentativeDefinitionsReal
	src/Options.cpp: set fMakeTentativeDefinitionsReal if -d option is found
	src/MachOWriterExecutable.hpp: turn tentative into real definition if makeTentativeDefinitionsReal
	unit-tests/test-cases/btentative-to-real: added test case

2006-06-13      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4584355> implement -bundle_loader
	src/Options.h: add fBundleLoader bit to DynamicLibraryOptions
	src/Options.cpp: handle -bundle_loader
	src/ld.cpp: pass fBundleLoader bit to MachOReaderDylib
	src/MachOReaderDylib.hpp: support reading MH_EXECUTE files if fBundleLoader is set
	src/MachOWriterExecutable.hpp: set bundle loader ordinal as EXECUTABLE_ORDINAL
	unit-tests/test-cases/bundle_loader: added test case

2006-06-12      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4583347> -syslibroot can cause "can't find ordinal for imported" error
	src/MachOReaderDylib.hpp: in  Reader::reExports() compare install path in addition to load path


2006-06-10      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4548935> Need rebasing tool
	src/rebase.cpp: added
	unit-tests/test-cases/rebase-basic: added
	doc/man/man1/rebase.1: added
	ld64.xcodeproj/project.pbxproj:  added rebase target.  changed all targets to build with dwarf
	

2006-06-10      Nick Kledzik    <kledzik@apple.com>

	src/machochecker.cpp: add some ppc reloc sanity checking

----- Tagged ld64-57

2006-06-06      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4565088> ld64 is not adding a final '/' char on the initial directory-name SO stab debug map entry
	ld.cpp: Change Linker::synthesizeStabs() to assure directory SO always has a trailing slash
	unit-tests/test-cases/dwarf-debug-notes/expected-stabs: update with trailing /
	
2006-06-06      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4572702> -sectcreate of a 0-byte section fails	
	MachOWriterExecutable.cpp: Don't error out on zero length segments
	MachOWriterExecutable.cpp: For ppc64 reloc base address is the first writable segment iff
	 there is a writable segment >4GB from base address

2006-06-04  Eric Christopher  <echristo@apple.com>

	Radar 4560240
	Radar 3964999
	* src/ld.cpp (createReader): Fixed error message.
	(resolve): Ditto.
	(resolveFrom): Ditto.
	(checkUndefines): Ditto.

----- Tagged ld64-56

2006-05-23      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4558079> No debug notes for ObjC methods when linking with ld64
	ld.cpp: don't limit debug notes to functions starting with underscore

2006-05-22      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4556982> ld64 spends much time in mach_o::relocatable::Reader<x86_64>::findAtomByName
	* src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups

2006-05-22      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4535044> remove inferring warning
	* ld.cpp: Remove "inferring" warning.  If a link failed and now arch was specifed add which arch was
	inferred to error message

2006-05-19      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4544001> ld64 does not honor -arch_multiple
	* ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message

2006-05-19      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4555973> Support S_16BYTE_LITERALS section types
	* src/MachOReaderRelocatable.hpp: support S_16BYTE_LITERALS
	* src/MachOWriterExecutable.hpp: support S_16BYTE_LITERALS

2006-05-19      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4548803> "warning can't parse dwarf compilation unit info" warnings building debug
	* src/MachOReaderRelocatable.hpp: fix bugs in dwarf line table parsing

----- Tagged ld64-55

2006-05-18      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4534339> Default the pagezero size to 4GB for x86-64
	* src/Options.cpp: Chnage default the pagezero size to 4GB for x86-64

2006-05-18      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4552825> x86_64 CarbonCore fails to link with "atom not found in symbolIndex"
	* src/MachOWriterExecutable.hpp: in buildObjectFileFixups() don't call addObjectRelocs() on kNoFixUp references

2006-05-18      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4553555> ld64: .section defaults to read-only
	* src/MachOReaderRelocatable.hpp: default unknown segments to r/w

2006-05-18      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4551990> -fvisibility=hidden causes crashes for x86_64
	* src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions

2006-05-12      Nick Kledzik    <kledzik@apple.com>

	* src/Architectures.hpp: add x86::kAbsolute32
	* src/MachOReaderRelocatable.hpp: generate x86::kAbsolute32 for mdynamic-no-pic instructions
	* src/MachOWriterExecutable.hpp: process x86::kAbsolute32 reference kind

----- Tagged ld64-54

2006-05-11      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4545108> CF-393 failes to link for x86_64
	* src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer<x86_64>::fixUpReferenceRelocatable

2006-05-11      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4501434> warning arch x86_64 not found using i386
	* src/ld.cpp: remove hack to allow x86_64 to link against i386 dylibs


2006-05-10      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4543754> x86_64: .objc_class_name symbol names scrambled
	* src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections


2006-05-08      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/3894083> Support -dead_strip
	* src/Options.h/cpp: implement -why_load and -why_live.  Enable -dead_strip.
	* src/MachOReaderArchive.hpp: implement -why_load
	* src/MachOReaderRelocatable.hpp: suppress GCC_except_table* symbols in final output
	* src/ld.cpp: implement dead code stripping
	* unit-tests/test-cases/dead_strip: added

----- Tagged ld64-53

2006-05-05      Nick Kledzik    <kledzik@apple.com>

	* src/Options.cpp: make 10.4 be minimum OS version for newer architectures

2006-05-05      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4147604> N_SO symbols in 64-bit builds have a zero address for n.n_value
	* src/ld.cpp: for SO stabs, associate first and last atom in the SO range
	* src/MachOWriterExecutable.hpp: use atom associated with SO stab to set ins n_value

2006-05-05      Nick Kledzik    <kledzik@apple.com>

	* MachOWriterExecutable.hpp: fix end FUN stab to have length of function


2006-05-02      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4496250> 64-bit main executables should have 4GB zero page by default
	* src/Opptions.cpp: change default pagezero_size to 4GB for ppc64
	<rdar://problem/4492850> 64 bit: apps with -mdynamic-no-pic seg fault when page zero > 4GB
	* src/MachOWriterExecutable.cpp: rework pagezero for ppc64 so that if any mdynamic-no-pic code
	is found, the code is kept in the low 2GB, and a new segment is create to map away up to 4GB.

2006-05-02      Nick Kledzik    <kledzik@apple.com>

	* src/Opptions.cpp: remove warning about -stack_addr not specified.  Add warning if 32-bit stack
	overlaps shared region

----- Tagged ld64-52.1

2006-05-01      Nick Kledzik    <kledzik@apple.com>

	* src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle
	the __data section too.

----- Tagged ld64-52

2006-04-28      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
	* src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection

2006-04-28      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4528054> 64 Bit: Development build of ppc64 TextEdit gets confused about static variables
	* src/MachOReaderRelocatable.cpp: mark non-lazy-pointer atoms as scopeTranslationUnit if targetting a static symbol


2006-04-27      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4498971> dyld crashes ungracefully on x86_64 when there is an internal exception
	* src/MachOWriterExecutable.cpp: allow non-zero PCRELGOT addends (used by C++ eh frames)

2006-04-21      Nick Kledzik    <kledzik@apple.com>

	* src/Options.cpp: fix default address for ppc64 custom stack
	* src/MachOWriterExecutable.cpp: fix set up of ppc64 custom stack


2006-04-14      Nick Kledzik    <kledzik@apple.com>

	* src/Options.cpp: fix -sub_library processing to work it dylib is specifed with leaf name

----- Tagged ld64-51.1

2006-04-13      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4513304> 64-bit: 9A152 TextEdit crashes in dlopen on bring-up
	* src/MachOReaderRelocatable.hpp: when detecting anonymous non-lazy-pointers disqualify data
	that points to static or global symbols
	* src/ld.cpp: print version of ld64 in error messages


----- Tagged ld64-51

2006-04-11      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4499168> exported symbols not properly stripped
	* src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope()

2006-03-31      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4498391> ld64 fails when linking debug ppc64 HIToolbox
	* src/MachOReaderRelocatable.hpp: handle anonymous non-lazy pointers encoded with local relocations
	* src/MachOWriterExecutable.hpp: in -r mode, only generated INDIRECT_SYMBOL_LOCAL for non-lazy targets that


2006-03-31      Nick Kledzik    <kledzik@apple.com>

	<rdar://problem/4496499> ld64 should remove generated file if link errors out
	* src/MachOWriterExecutable.hpp: catch exceptions in Writer<A>::write(), delete output file, and rethrow


----- Tagged ld64-50

2006-03-29      Nick Kledzik    <kledzik@apple.com>

	* src/MachOWriterExecutable.hpp: fix x86_64 addends when -multi_module forces an external relocation

2006-03-29      Nick Kledzik    <kledzik@apple.com>

	* src/MachOReaderRelocatable.hpp: synthesize .objc_class_name symbols
	* src/MachOFileAbstraction.hpp: use strncpy for sect/seg names to zero fill trailing space

2006-03-28      Nick Kledzik    <kledzik@apple.com>

	* src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info

----- Tagged ld64-49.1

2006-03-25      Nick Kledzik    <kledzik@apple.com>

	* MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB

----- Tagged ld64-49

2006-03-24	Nick Kledzik	<kledzik@apple.com>

	* src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers
	<rdar://problem/4488113> ld64 is after processing bad GSYM stabs
	* src/MachOReaderRelocatable.hpp: if a GSYM is found that does not match any data symbol, suppress it

2006-03-23	Nick Kledzik	<kledzik@apple.com>

	* src/MachOWriterExecutable.hpp: in Writer<x86>::fixUpReferenceFinal() fix when x86::kPointer is for an
	external relocation

2006-03-23	Nick Kledzik	<kledzik@apple.com>

	* src/Options.cpp: change macosx-min-version to default to a per-architecture setting
	  add warning if -pagezero_size is not page aligned
	* src/MachOWriterExecutable.hpp: properly handle external relocations for ppc64 with 4GB pagezero
	* src/machochecker.cpp: sanity check relocation records

----- Tagged ld64-48

2006-03-21	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4481406> 64bit: passing function pointer to another function passes the wrong function address
	* src/MachOReaderRelocatable.hpp: when processing a non-lazy pointer to a static function, don't accidentally
	match it to a STAB symbol.

2006-03-21	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4180168> .eh symbols make up 13% of libstdc++'s stripped binary size
	* src/ObjectFile.h: add ReaderOptions.fForFinalLinkedImage
	* src/Options.cpp: setup ReaderOptions.fForFinalLinkedImage
	* src/MachOReaderRelocatable.hpp: mark .eh symbols kSymbolTableNotIn when building final linked image

2006-03-21	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4473742> ld64 does not parse optional second argument to -filelist
	* unit-tests/test-cases/filelist: added
	* src/Options.cpp: in Options::loadFileList() handle comma option


----- Tagged ld64-47


----- Tagged ld64-46

2006-03-10	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4419505> ld64 should figure out architecture from .o files
	* unit-tests/test-cases/auto-arch: added
	* src/ld.cpp: added Linker::inferArchitecture() to scan .o files are infer architecture to link
	* src/MachOReaderArchive.hpp: enhanced validFile() to look deeper into archive and really valdate
	* src/MachOWriterExecutable.hpp: stop using fOptions.architecture()
	* src/Options.cpp: stop defaulting to ppc64


2006-03-09	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4465004> Need "intentionally left blank" dylib stubs
	* unit-tests/include/common.makefile: add VALID_ARCHS
	* unit-tests/run-all-unit-tests: set up VALID_ARCHS
	* unit-tests/test-cases/blank-stubs: add test case
	* src/ld.cpp: in addDylib(), detect and ignore blank stubs
	* src/MachOReaderDylib.hpp: in constructor, handle blank stubs

2006-03-09	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4471424> crash in stub with 2GB pagezero
	* src/MachOWriterExecutable.hpp: StubAtom<ppc64> can't be no-pic if a large zero-page is used

2006-03-06	Nick Kledzik	<kledzik@apple.com>

	* src/Options.cpp: addSectionAlignment, warn if -sectalign alignment is not a power of two

----- Tagged ld64-45

2006-03-06	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4466930> <rdar://problem/4467982> ld64 failed: rel32 out of range when linking a dylib
	* src/MachOWriterExecutable.cpp: in  Writer<x86_64>::fixUpReferenceFinal add (int32_t) cast

2006-03-06	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4466930> LP64/9A122: ld64: hang when trying to link DiscRecording framework
	* src/Options.cpp: addSectionAlignment, warn on zero.  Use log2() for alignment conversion

2006-03-06	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4457818> x86_THREAD_STATE64_COUNT will change, ld64 must adapt
	* src/MachOWriterExecutable.hpp: update ThreadsLoadCommandsAtom<x86_64> for new thread status layout

----- Tagged ld64-44

2006-03-04	Nick Kledzik	<kledzik@apple.com>

	* src/MachOReaderRelocatable.hpp: fix again test for detection of anonymous non-lazy-pointer.
	Error out if .o file contains old __DWARFA style dwarf.

2006-03-02	Nick Kledzik	<kledzik@apple.com>

	* src/ld.cpp: only re-map page aligned sub-parts of a fat file.  A conformat mmap() requires alignment.

----- Tagged ld64-43

2006-03-03	Nick Kledzik	<kledzik@apple.com>

	<rdar://problem/4465443> RIP-relative offsets aren't handled properly when the instruction has immediate operands
	* src/Architectures.hpp: add x86_64::kPCRel32_*
	* src/MachOReaderRelocatable.hpp: generate x86_64::kPCRel32_*
	* src/MachOWriterExecutable.hpp: process x86_64::kPCRel32_*
