What's new in MCLinker 2.6.0
Jan 15, 2014
- Executive Summary:
- 1. Support ARM ELF Attribute
- 2. Refine I/O memory management to improve linking speed
- 3. Enhance EH Frame to reduce eh_frame section size
- 4. Support garbage collection
- 5. Enhance linker script
- 6. Migrate to LLVM r195092
- Command Line Options and Building System:
- 1. Support -x and -X
- 2. Support -gc-sections
- 3. Support --no-warn-mismatch
- 4. Support --(no-)ld-generated-unwind-info
- Linker Script:
- 1. Support --no-warn-mismatch
- 2. SectionMap: Add "Input Section Keep" attribute
- Garbage Collection:
- 1. Add class GarbageCollection to support --gc-sections
- 2. TargetLDBackend: Add API setUpReachedSectionsForGC
- 3. ARM: GC .ARM.exidx
- 4. Add ResolveInfo::InDyn
- EH Frame Enhancement:
- 1. EhFrame: In EhFrame::merge identical eh_frame CIE and discard the FDE for Ignore sections
- 2. X86LDBackend: Add eh_frame entry for x86/x86_64 PLT
- Target Backends:
- 1. Target: add ELF attribute support
- 2. ARM: add ARM ELF attribute support
- 3. ARM: support more relocation types: R_ARM_V4BX and R_ARM_THM_JUMP19
- 4. GOT/PLT/OutputRelocSection: remove the concept "reserve" and "consume". In ARM, X86 and Hexagon backends, reserve and consume entries at the same time
- 5. TargetLDBackend: add getEntry to get the entry point of an executable
- Architectural Changes:
- 1. Deprecate bcc
- 2. Add ObjectLinker::dataStrippingOpt for the data stripping optimizations
- 3. Change the include guard naming to ___H
- 4. Refine I/O memory management to improve linking speed
- 5. Add ObjectLinker::addSymbolsToOutput to add symbols to output symbol table at once after all input symbols have been resolved
New in MCLinker 2.3.1-1 (May 7, 2013)
- Executive Summary:
- Add three new backends - x86_64, x32 and Hexagon.
- Support MinGW platform
- Support Mips multiple global offset tables.
- Support variant-length relocation entry. (Mips/x32/x86_64)
- Export libmcld library
- Migrate to LLVM r176038
- Command Line Options and Building System:
- Support -m option.
- Support --defsym option.
- ./configure script supports --target options. (Conform to binutils)
- New Features:
- Support weak alias symbols in shared libraries.
- Support 64-bit architecture.
- Support GNU linkonce sections.
- Support GNU excluded sections.
- Able to link ELF objects with GNU LTO sections.
- Support empty eh_frame section.
New in MCLinker 2.0.1 (Nov 27, 2012)
New in MCLinker 2.0.0 (Nov 23, 2012)
- Executive Summary:
- Improve linking speed about x30 via new algorithm and architecture.
- Enhance GNU ld compatibility. MCLinker is able to link all libraries and programs of Android. (Few libraries have to revise their linking options)
- Enhance GNU ld compatibility. MCLinker is able to link all libraries and programs of BSD base system 4.3. (Some options that needed by 4.4 are unsupported yet).
- Support ARM EH ABI.
- Provide IRBuilder. Users can customize the content of input file and make their customized linker by IRBuilder.
- Add basic elements for support partial linking in the future.
- Command Line Options:
- Support --strip-debug/-S
- Add --relocatable/-r option. MCLinker does not fully support -r yet.
- Add some fake options to compatible with GNU ld.
- Target/TargetMachine, LD/ELFObjectFileFormat, LD/ELFObjectWriter, Target/GNULDBackend, CodeGen/MCLDTargetMachine:
- Add CGFT_PARTIAL code generation type.
- Add ELFObjectFileFormat to initialize the output format of -r.
- Add ELFObjectWriter to write the output of partial linking.
- Add GNULDBackend::createObjectWriter().
- rename CodeGen/LLVMTargetMachine as CodeGen/MCLDTargetMachine.
- Support R_386_TLS_GOTIE relocation
- Define __exidx_start and __exidx_end ARM standard symbols
- Define __DYNAMIC symbol
- For GNU ld compatibility, check if a symbol is a C identifier in GNULDBackend.
- New Architecture:
- Add FragmentRef::Create/Destroy. Use factory method instead of simple factory.
- Add LDSymbol::Create/Destroy and ResolveInfo::Create/Destroy
- Add LDSection::Create/Restroy
- Reduce the functionalities of Layout. Let layout to focus on section order.
- Calculate Fragments' offset when appending them into section data.
- Remove SectionMerger.
- Move SectionMap to LinkerConfig
- Rewrite EhFrame. Separate origin EhFrame into EhFrameReader and EhFrame data.
- Let ObjectReader controls EhFrame::treatAsRegularSection() flag.
- Add Null objects for ResolveInfo, FragmentRef, and LDSymbol.
- Add RelocData to store relocation entries.
- LDSection can point to either a SectionData, a RelocData or a EhFrame.
- Add ObjectLinker and ObjectBuilder. ObjectBuilder is used to build target and format independent data structure. ObjectLinker is used to link object with target and format dependent behaviors.
- Remove section-related methods in FragmentLinker. Move them into builders.
- Separate the `read relocation' stage into `read' and `scan' stages.
- Add Environment.h. Provide Initialize() and Finalize() to simplify the initiliazation of MCLinker.
- Add Linker.h. A modular linker. The core of MCLinker.
New in MCLinker 1.6.0 (Oct 5, 2012)
- Executive Summary:
- Add TLS support and X86 implementation.
- Enhance GNU ld compatibility.
- Add instruction relaxation pass and ARM implementation.
- MC/SymbolCategory, Target/GNULDBackend, Target/ARMLDBackend, Target/X86LDBackend, Target/MipsLDBackend, Target/TargetLDBackend, Target/ELFDynamic:
- Handle tdata and tbss sections and symbols.
- Setup dynamic flags such as DF_TEXTREL and DF_STATIC_TLS.
- Target/X86/X86LDBackend, Target/X86/X86RelocationFactory:
- Add X86 relocation support for R_386_TLS_GD, R_386_TLS_LE, and R_386_TLS_IE.
- LD/GroupReader, Object/ObjectLinker, LD/GNUArchiveReader:
- Support archives group. (i.e., --start-group ARCHIVES --end-group)
- Target/GNULDBackend, Target/GNULDBackend, Fragment/Fragment, Fragment/Stub, Fragment/FragmentRef, LD/StubFactory, LD/BranchIsland, LD/BranchIslandFactory, LD/ELFWriter, Object/ObjectLinker:
- Add relaxation interface.
- Target/ARMLDBackend, Target/ARMToARMStub, Target/ARMToTHMStub, Target/THMToTHMStub, Target/THMToTHMStub, Target/ARMRelocationFactory: 1. Add ARM relaxation implementation and ARM stubs.
- Fragment/Fragment, Fragment/NullFragment, LD/Layout, LD/ELFWriter, Target/ARMLDBackend:
- Add NullFragment for some special symbols (e.g., dvmCompilerTemplateEnd) that refer to an "end" fragment.
- mcld/GeneralOptions, mcld/ScriptOptions, tools/llvm-mcld, Target/GNULDBackend:
- Support -Ttext, -Tdata, and -Tbss options.
- Support --section-start SECTION=ADDRESS option.
New in MCLinker 1.5.0 (Sep 11, 2012)
- Executive Summary:
- Migrate on LLVM r162314
- Large scale architecture refactoring.
- No new features; No functional changes.
- Remove two architecture weaknesses in alone::Linker.
- Separate MCLinker into three layers:
- MCLinker - handle with input files. The adapter to LLVM.
- ObjectLinker - handle with object file format.
- FragmentLinker - handle with piece of code or data.
- Provide mcld::Module as the intermediate representation:
- Remove mcld::Output. Move all fields of mcld::Output into mcld::Module.
- Move NamePool from FragmentLinker to Module.
- Move Relocation Table from FragmentLinker to Module.
- Move SymbolCategory from FragmentLinker to Module.
- Move InputTree from MCLinker to Module.
- Separate MCLDInfo into LinkerConfig and InputBuilder:
- All fields in MCLDInfo that can be constant are moved into LinkerConfig.
- MemoryAreaFactory, ContextFactory and InputFactory are moved into LinkerConfig.
- Action-based linkers:
- MCLinker uses FileActions and CommandActions to build up the input tree.
- Remove SectLinkerOption, PositionDependentOption and DerivedPositionDependentOption.
- Remove ugly type castings.
- Add new file stream and file utilies:
- raw_mem_ostream - an MemoryArea adapter to llvm::raw_ostream.
- ToolOutputFile - an raw_mem_ostream adapter to llvm::tool_output_file.
- Hide less-frequently-used classes:
- Hide RegionFactory. MemoryArea becomes a wrapper of RegionFactory.
- Hide ContextFactory and MemoryAreaFactory. Move them into InputBuilder.