X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/d696c285d331ab577dcabd00419d8c30336673da..74cfe461234fcf76aadb30ed686f281f06b555cd:/ChangeLog diff --git a/ChangeLog b/ChangeLog index d028e47..ce470b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,496 @@ +2006-09-22 Nick Kledzik + + ld64.xcodeproj/project.pbxproj: change install name back to ld64 + src/Options.cpp: remove support for rolling over to ld_classic + src/ld.cpp: remove support for rolling over to ld_classic + + +----- Tagged ld64-62 + +2006-08-15 Nick Kledzik + + wrong error message when symbol is found in unused indirect library + src/ld.cpp: remove indirect libraries if they are not re-exported + unit-tests/test-cases/indirect-dylib: added test case + + +2006-08-15 Nick Kledzik + + alignment needs to be richer + src/ObjectFile.h: define ObjectFile::Alignment class for tracking rich alignment info + src/ld.cpp: modify SymbolTable::add() to work with new Alignment type + src/MachOReaderRelocatable.hpp: use new Alignment type. Remove alignAtLeast() and handleAnonymousNonLazyPointers() + src/MachOWriterExecutable.hpp: update for new Alignment type, use modulus when calculating layout address + src/ObjectDump.cpp: print richer Alignment info + unit-tests/test-cases/align-modulus: added test case + + +2006-08-11 Nick Kledzik + + remove OPEN_SOURCE conditionals around x86_64 support + + +2006-07-31 Nick Kledzik + + ld64 while linking cc1 [ when dead_strip is ON] + src/ld.cpp: Add ivar fAtomsWithUnresolvedReferences to track atoms not initially resolvable + unit-tests/test-cases/dead_strip-archive: added test case + + +2006-07-31 Nick Kledzik + + x86_64: instructions with immediate and rip-relative operands need to use new relocation types + src/MachOWriterExecutable.hpp: generate new reloc types in -r mode + src/MachOReaderRelocatable.hpp: parse new reloc types + unit-tests/test-cases/relocs-asm/relocs-asm.s: add test cases for new reloc type + + +2006-07-18 Nick Kledzik + + src/MachOReaderRelocatable.hpp: suppress warning about dwarf info parsing for one benign no-op case + the compiler emits when there are not functions in the __text section + + +2006-07-17 Nick Kledzik + + faster debug note generateion + src/ld.cpp: rework collectDebugInfo() to produce all debug notes in one pass, intead of a + pass per .o file. Added timing info for collectDebugInfo() to -print_statistics + unit-tests/test-cases/dwarf-debug-notes-r/Makefile: add expliced -arch to ld -r + unit-tests/test-cases/dwarf-debug-notes-r/expected-stabs: alter for new debug notes order + + +2006-07-17 Nick Kledzik + + ld64 VSIZE is 1.18GB when building Finder ppc64 + src/ld.cpp: fixed typo in createReader() that prevented dylibs from being unmapped + +----- Tagged ld64-61.1 + +2006-07-11 Nick Kledzik + + ld64-61: gcc DejaGnu tests failing due to -arch followed by unknown architecture name + src/Options.cpp: map ppc750, ppc7400, ppc7450, and ppc970 to ppc. Improve error message + +2006-07-11 Nick Kledzik + + If -arch is missing, rollover to ld_classic does not happen + src/Options.h: make gotoClassicLinker() public + src/ld.cpp: call gotoClassicLinker() if the inferred architecture is ppc or i386 + +----- Tagged ld64-61 + +2006-06-29 Nick Kledzik + + ld64 should be renamed to ld + src/Options.cpp: exec() ld_classic if -arch ppc or -arch i386 is seen + src/ld.cpp: alter version string + ld64.xcodeproj/project.pbxproj: change install location to /usr/bin/ld, add symlink from /usr/bin/ld64 + doc/man/man1/ld.1: added + +----- Tagged ld64-60 + +2006-06-28 Nick Kledzik + + Can't link large ppc64 program: ld64 says "bl out of range" + MachOWriterExecutable.hpp: fix branch island generation to work for weak_import functions + and properly chain together branch islands + MachOReaderRelocatable.hpp: improve performance of huge .o file reading by sorted references + only when done + +2006-06-28 Nick Kledzik + + MySQL-36 fails to build with ld64-59 + src/MachOReaderRelocatable.hpp: back out fix for 4585335 + src/MachOWriterExecutable.hpp: back out fix for 4585335 + +2006-06-27 Nick Kledzik + + src/MachOReaderRelocatable.hpp: handle N_GSYM without ending :G() since that is how + dwarf debug notes are formed. + +2006-06-23 Nick Kledzik + + + + ld64 doesn't support variant linking -framework fw,_debug + src/Options.cpp: enhance findFramework() to support suffixes + +----- Tagged ld64-59 + +2006-06-22 Nick Kledzik + + ld64 lost DWARF debug notes + src/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 + + 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 + + ld64 seems to offset things incorrectly when using -r + src/MachOWriterExecutable.hpp: in -r mode, virtual sections should not increment address + + +----- Tagged ld64-58 + +2006-06-16 Nick Kledzik + + src/rebase.cpp: fix page alignment problem + src/rebase.cpp: fix endianess problem with local non-lazy pointers + +2006-06-15 Nick Kledzik + + src/rebase.cpp: fix to build in CurryWeed + ld64.xcodeproj/project.pbxproj: fix to build properly in CurryWeed + +2006-06-15 Nick Kledzik + + 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 + + SECTION_ATTRIBUTES unset in ppc64 mach-o header + src/MachOWriterExecutable.hpp: add section attribute for sections with code + +2006-06-15 Nick Kledzik + + ld64 bogus duplicate symbol name linking GNU libobjc + src/MachOReaderRelocatable.hpp: only special case Apple objc runtime objc classes + +2006-06-15 Nick Kledzik + + x86_64: ".align" directive not honored + src/MachOReaderRelocatable.hpp: change code alignment to not depend on atom size + +2006-06-14 Nick Kledzik + + jump table into middle of weak symbol causes error + src/MachOReaderRelocatable.hpp: create direct references to the interior of weak symbols + src/MachOWriterExecutable.hpp: do not error on absolute references to interior of weak symbols + +2006-06-13 Nick Kledzik + + src/Options.cpp: allow -image_base as an alias for -seg1addr + +2006-06-13 Nick Kledzik + + 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 + + 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 + + -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 + + 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 + + src/machochecker.cpp: add some ppc reloc sanity checking + +----- Tagged ld64-57 + +2006-06-06 Nick Kledzik + + 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 + + -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 + + 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 + + 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 + + ld64 spends much time in mach_o::relocatable::Reader::findAtomByName + * src/MachOReaderRelocatable.hpp: add makeReferenceToSymbol() so that x86_64 does not need to do by-name lookups + +2006-05-22 Nick Kledzik + + 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 + + ld64 does not honor -arch_multiple + * ld.cpp: If fOptions.printArchPrefix(), add architecture name to error message + +2006-05-19 Nick Kledzik + + 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 + + "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 + + 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 + + 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 + + ld64: .section defaults to read-only + * src/MachOReaderRelocatable.hpp: default unknown segments to r/w + +2006-05-18 Nick Kledzik + + -fvisibility=hidden causes crashes for x86_64 + * src/MachOWriterExecutable.hpp: properly handle RIP relative tentative definitions + +2006-05-12 Nick Kledzik + + * 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 + + CF-393 failes to link for x86_64 + * src/MachOWriterExecutable.cpp: fix sign extension for Rel32 relocs in Writer::fixUpReferenceRelocatable + +2006-05-11 Nick Kledzik + + 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 + + x86_64: .objc_class_name symbol names scrambled + * src/MachOReaderRelocatable.hpp: properly compute alignment of __OBJC __class sections + + +2006-05-08 Nick Kledzik + + 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 + + * src/Options.cpp: make 10.4 be minimum OS version for newer architectures + +2006-05-05 Nick Kledzik + + 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 + + * MachOWriterExecutable.hpp: fix end FUN stab to have length of function + + +2006-05-02 Nick Kledzik + + 64-bit main executables should have 4GB zero page by default + * src/Opptions.cpp: change default pagezero_size to 4GB for ppc64 + 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 + + * 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 + + * src/MachOReaderRelocatable.cpp: rework handleAnonymousNonLazyPointers() to handle anl's in the middle + the __data section too. + +----- Tagged ld64-52 + +2006-04-28 Nick Kledzik + + 64-bit: 9A152 TextEdit crashes in dlopen on bring-up + * src/MachOReaderRelocatable.cpp: rework anonymous non-lazy-pointer detection + +2006-04-28 Nick Kledzik + + 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-21 Nick Kledzik + + * 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 + + * 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 + + 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 + + exported symbols not properly stripped + * src/MachOReaderRelocatable.hpp: enable AnonymousAtom::setScope() + +2006-03-31 Nick Kledzik + + 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 + + ld64 should remove generated file if link errors out + * src/MachOWriterExecutable.hpp: catch exceptions in Writer::write(), delete output file, and rethrow + + +----- Tagged ld64-50 + + +2006-03-29 Nick Kledzik + + * 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 + + * src/MachOReaderRelocatable.hpp: fix spurious warning about dwarf line info + +----- Tagged ld64-49.1 + +2006-03-25 Nick Kledzik + + * MachOWriterExecutable.hpp : don't complain about ppc64 dyld being based > 4GB + +----- Tagged ld64-49 + +2006-03-24 Nick Kledzik + + * src/MachOWriterExecutable.hpp: dyld is allowed to have synthesized non-lazy pointers + 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 + + * src/MachOWriterExecutable.hpp: in Writer::fixUpReferenceFinal() fix when x86::kPointer is for an + external relocation + +2006-03-23 Nick Kledzik + + * 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 + + 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 + + .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 + + 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.1 + + ----- Tagged ld64-47 @@ -6,11 +498,11 @@ 2006-03-10 Nick Kledzik - ld64 should figure out architecture from .o files + 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/MachOWriterExecutable.hpp: stop using fOptions.architecture() * src/Options.cpp: stop defaulting to ppc64 @@ -22,7 +514,7 @@ * 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 crash in stub with 2GB pagezero @@ -40,7 +532,7 @@ LP64/9A122: ld64: hang when trying to link DiscRecording framework * src/Options.cpp: addSectionAlignment, warn on zero. Use log2() for alignment conversion - + ----- Tagged ld64-44 2006-03-04 Nick Kledzik @@ -54,6 +546,7 @@ ----- Tagged ld64-43 + 2006-03-02 Nick Kledzik * src/MachOReaderRelocatable.hpp: tighten detection of anonymous non-lazy-pointer @@ -62,7 +555,7 @@ 2006-02-28 Nick Kledzik - * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment + * src/MachOReaderRelocatable.hpp: fix x86 __IMPORT permissions for class Segment 2006-02-28 Nick Kledzik @@ -81,7 +574,7 @@ 2006-02-24 Nick Kledzik - * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options. + * src/Options.cpp: Warning about -no_dead_strip_inits_and_terms and -i options. Fix -weak-l option. ----- Tagged ld64-40 @@ -111,7 +604,7 @@ 2006-02-23 Nick Kledzik - ld64 creates corrupt executables (and has malloc errors) with -headerpad option + ld64 creates corrupt executables (and has malloc errors) with -headerpad option * src/MachOWriterExecutable.hpp: Change LoadCommandsPaddingAtom::setSize() to update fLargestAtomSize * unit-tests/test-cases/header-pad: added @@ -120,7 +613,7 @@ ld64 creates invalid static executables * src/MachOWriterExecutable.hpp: Change MachHeaderAtom::copyRawContent() to create correct header for static executables. Change SymbolTableLoadCommandsAtom to skip LC_DYSYMTAB for static executables - * src/machochecker.cpp: Add tests that static executables are well formed + * src/machochecker.cpp: Add tests that static executables are well formed * unit-tests/test-cases/static-executable: added 2006-02-22 Nick Kledzik @@ -148,7 +641,7 @@ 2006-02-15 Nick Kledzik - * src/MachOReaderArchive.hpp: with -all_load skip over both kinds of SYMDEFs + * src/MachOReaderArchive.hpp: with -all_load skip over both kinds of SYMDEFs * unit-tests/test-cases/archive-basic/Makefile: add -all_load test case ----- Tagged ld64-37 @@ -615,6 +1108,7 @@ * src/ELFFileAbstraction.hpp: Added * src/ELFReaderRelocatable.hpp: Added * Lot of fixes for new architecture + * Added __OPEN_SOURCE__ to "Preprocessor Macros" to disable new architecture support by default 2005-12-13 Nick Kledzik @@ -666,6 +1160,10 @@ * src/ObjectFile.h: Add design comments +2005-11-30 Nick Kledzik + + * Fix uses of __OPEN_SOURCE__ + 2005-11-28 Nick Kledzik * Refactor Atom to use getDefinitionKind()