As you can see on the ContribSoftware page, the version of GNU Binutils in FreeBSD has not been updated for quite some time; we are still at version 2.15, as of 2004-05-23 (approximately, some small fixes were backported).
Some time ago I started a project to import the last GPLv2 version of binutils into -current, which is version 2.17.50, as of 2007-07-03. The project can be found here in the Subversion repository.
Apart from bugfixes (and new bugs
), this version brings the following new features:
gas
Changes in 2.17.50:
- Added gas .reloc pseudo. This is a low-level interface for creating relocations.
- Add support for x86_64 PE+ target.
- Add support for Score target.
Changes in 2.17:
- Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
- Support for ms2 architecture has been added.
- Support for the Z80 processor family has been added.
Add support for the "@<file>" syntax to the command line, so that extra switches can be read from <file>.
- The SH target supports a new command line switch --enable-reg-prefix which, if enabled, will allow register names to be optionally prefixed with a $ character. This allows register names to be distinguished from label names.
- Macros with a variable number of arguments are now supported. See the documentation for how this works.
Added --reduce-memory-overheads switch to reduce the size of the hash tables used, at the expense of longer assembly times, and --hash-size=<NUMBER> to set the size of the hash tables used by gas.
- Macro names and macro parameter names can now be any identifier that would also be legal as a symbol elsewhere. For macro parameter names, this is known to cause problems in certain sources when the respective target uses characters inconsistently, and thus macro parameter references may no longer be recognized as such (see the documentation for details).
- Support the .f_floating, .d_floating, .g_floating and .h_floating directives for the VAX target in order to be more compatible with the VAX MACRO assembler.
- New command line option -mtune=[itanium1|itanium2] for IA64 targets.
Changes in 2.16:
- Redefinition of macros now results in an error.
- New command line option -mhint.b=[ok|warning|error] for IA64 targets.
- New command line option -munwind-check=[warning|error] for IA64 targets.
- The IA64 port now uses automatic dependency violation removal as its default mode.
- Port to MAXQ processor contributed by HCL Tech.
- Added support for generating unwind tables for ARM ELF targets.
- Add a -g command line option to generate debug information in the target's preferred debug format.
- Support for the crx-elf target added.
- Support for the sh-symbianelf target added.
- Added a pseudo-op (.secrel32) to generate 32 bit section relative relocations on pe[i]-i386; required for this target's DWARF 2 support.
- Support for Motorola MCF521x/5249/547x/548x added.
Support for ColdFire EMAC instructions added and Motorola syntax for MAC/EMAC instructions.
- New command line option -mno-shared for MIPS ELF targets.
- New command line option --alternate and pseudo-ops .altmacro and .noaltmacro added to enter (and leave) alternate macro syntax mode.
ld
Changes in 2.17.50:
- -l:foo now searches the library path for a filename called foo, without converting it to libfoo.a or libfoo.so.
- Add a new command line option '--default-script=FILE' or '-dT FILE' which specifies a replacement for the built in, default linker script.
- ELF: Add -Bsymbolic-functions, --dynamic-list-cpp-new, which puts C++ operator new and delete on the dynamic list, and --dynamic-list-data, builtin list for --dynamic-list, which puts global data symbols on the dynamic list.
- Add support for x86_64 PE+ target.
- Add support for Score target.
- ELF: Add --dynamic-list option to specify a list of global symbols whose references shouldn't be bound to the definition within the shared library, or a list of symbols which should be added to the symbol table in the executable.
- The default output section LMA has changed for allocatable sections from being equal to VMA, to keeping the difference between LMA and VMA the same as the previous output section in the same region. This is a more useful default when using overlays and other cases where you specify an LMA differing from the VMA for some sections.
- New switch: --print-gc-sections to list any sections removed by garabge collection.
- ARM: Added --vfp11-denorm-fix option to work around an erratum in current VFP11 coprocessors.
Changes in 2.17:
- Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
- Modify the Linux linker search order to better match ld.so search order. Look for DT_NEEDED libraries in paths specified by ld.so.conf before searching the default directories, rather than vice versa. Use $prefix/etc/ld.so.conf if it exists, otherwise /etc/ld.so.conf.
- PE-COFF: Forward exports from DLL's can now be specified in .def files passed directly to ld.
- Support for the Z80 processor family has been added.
Add support for the "@<file>" syntax to the command line, so that extra switches can be read from <file>.
Changes in 2.16:
- Support for the R_ARM_V4BX relocation as defined in the ARM AAELF specification has been added via the --fix-v4bx command-line option.
- New linker script construct AS_NEEDED(), which sets the --as-needed flag for input files listed inside of it.
- A new command-line option, --sysroot, can be used to override the default sysroot location. It only applies to toolchains that were configured using --with-sysroot.
- New linker script functions: ORIGIN() and LENGTH() which return information about a specified memory region.
- Port to MAXQ processor contributed by HCL Tech.
- Added SEGMENT_START to the linker script language to permit the user to override the base address for a segment from the command-line.
- ELF: --warn-shared-textrel option to warn if adding a DT_TEXTREL to a shared object.
- Added SORT_BY_NAME and SORT_BY_ALIGNMENT to the linker script language to permit sorting sections by section name or section maximum alignment.
- Added a new linker command line switch, --sort-section name|alignment, to sort sections by section name or maximum alignment.
- ELF: --add-needed/--no-add-needed options to control if a DT_NEEDED tag should be added when a shared library comes from DT_NEEDED tags.
- Support for the crx-elf target added.
- Support for the sh-symbianelf target added.
A new linker command line switch has been added which allows the hash table size to be set to a suitable prime value near to its argument. This switch is --hash-size=<NUMBER>. Also if the switch --reduce-memory-overheads is used, and --hash-size has not been used, then the default value will be set to 1021.
- Linker map files are now generated with an O(N) algorithm for finding symbols that are defined in each section. This uses about 40% more memory for symbols than the old O(N^2) algorithm. You can use the new --reduce-memory-overheads option to select the old algorithm; this option might also be used in the future to select similar tradeoffs.
other binutils
Changes in 2.17.50:
- Add --extract-symbol command line option to objcopy, which will strip everything out of an ordinary object file or executable except for its symbol table. Files containing just symbols can be useful to some OSes.
Changes in 2.17:
- Add "-x NAME" to readelf in addition to "-x NUMBER".
- Add -i and -t switches to cxxfilt. -i disables the display of implementation specific extra demangling information (if any) and -t disables the demangling of types.
Add support for the "@<file>" syntax to the command lines of all tools, so that extra switches can be read from <file>.
- Add "-W/--dwarf" to objdump to display the contents of the DWARF debug sections.
- Add "-t/--section-details" to readelf to display section details. "-N/--full-section-name" is deprecated.
- powerpc-linux ld now supports a variant form of PLT and GOT for the security conscious. This form will automatically be chosen when ld detects that all code in regular object files was generated by gcc -msecure-plt. The old PLT and GOT may be forced by a new ld option, --bss-plt.
- Add "-i/--inlines" to addr2line to print enclosing scope information for inlined function chains, back to first non-inlined function.
- Add "-N/--full-section-name" to readelf to display full section name.
Add "-M entry:<addr>" switch to objdump to specify a function entry address when disassembling VAX binaries.
Add "--globalize-symbol <name>" and "--globalize-symbols <filename>" switches to objcopy to convert local symbols into global symbols.
- gprof now allows input files to have histogram records for several memory ranges, provided those ranges are disjoint.
Changes in 2.16:
- Add "-g/--section-groups" to readelf to display section groups.
- objcopy recognizes two new options --strip-unneeded-symbol and --strip-unneeded-symbols, namely for use together with the wildcard matching the original --strip-symbol/--strip-symbols provided, but retaining any symbols matching but needed by relocations.
- readelf can now display address ranges from .debug_range sections. This happens automatically when a DW_AT_range attribute is encountered. The command line switch --debug-dump=Ranges (or -wR) can also be used to display the contents of the .debug_range section.
- nm and objdump now have a switch "--special-syms" to enable the displaying of symbols which the target considers to be special. By default these symbols are no longer displayed. Currently the only special symbols are the Mapping symbols used by the ARM port to mark transitions between text and data and between ARM and THUMB code.
dlltool has a switch "--ext-prefix-alias <prefix>" to generate additional import and export symbols with <preifx> prepended to them.