mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
68b007788a
Linker generated relative relocations don't have symbol info: [hjl@gnu-cfl-2 tmpdir]$ readelf -rW dump Relocation section '.rela.dyn' at offset 0x180 contains 2 entries: Offset Info Type Sym. Value Symbol's Name + Addend 00002f70 00000008 R_X86_64_RELATIVE 1000 00002f68 00000025 R_X86_64_IRELATIVE 1007 [hjl@gnu-cfl-2 tmpdir]$ Add -z report-relative-reloc to x86 ELF linker to report dynamic relative relocations: [hjl@gnu-cfl-2 tmpdir]$ ../ld-new -pie -melf32_x86_64 -z report-relative-reloc -o dump report-reloc-1.o dump: R_X86_64_IRELATIVE (offset: 0x00002f68, info: 0x00000025, addend: 0x00001007) against 'ifunc' for section '.data.rel.ro.local' in report-reloc-1.o dump: R_X86_64_RELATIVE (offset: 0x00002f70, info: 0x00000008, addend: 0x00001000) against '_start' for section '.data.rel.ro.local' in report-reloc-1.o [hjl@gnu-cfl-2 tmpdir]$ It can be used to map relative relocations to corresponding symbols. bfd/ * elf-linker-x86.h (elf_linker_x86_params): Add report_relative_reloc. * elf32-i386.c (elf_i386_relocate_section): Call _bfd_x86_elf_link_report_relative_reloc to report relative relocations for -z report-relative-reloc. (elf_i386_finish_dynamic_symbol): Likewse. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse. (elf_x86_64_finish_dynamic_symbol): Likewse. * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New function. * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New prototype. ld/ * NEWS: Mention -z report-relative-reloc. * ld.texi: Document -z report-relative-reloc. * emulparams/elf32_x86_64.sh: Source x86-report-relative.sh. * emulparams/elf_i386.sh: Likewse. * emulparams/elf_x86_64.sh: Likewse. * emulparams/x86-report-relative.sh: New file. * testsuite/ld-i386/report-reloc-1.d: Likewse. * testsuite/ld-i386/report-reloc-1.l: Likewse. * testsuite/ld-i386/report-reloc-1.s: Likewse. * testsuite/ld-x86-64/report-reloc-1-x32.d: Likewse. * testsuite/ld-x86-64/report-reloc-1.d: Likewse. * testsuite/ld-x86-64/report-reloc-1.l: Likewse. * testsuite/ld-x86-64/report-reloc-1.s: Likewse. * testsuite/ld-i386/i386.exp: Run report-reloc-1. * testsuite/ld-x86-64/x86-64.exp: Run report-reloc-1 and report-reloc-1-x32.
877 lines
33 KiB
Plaintext
877 lines
33 KiB
Plaintext
-*- text -*-
|
||
|
||
* Add -z report-relative-reloc to x86 ELF linker to report dynamic
|
||
relative relocations.
|
||
|
||
Changes in 2.36:
|
||
|
||
* Add libdep plugin, for linking dependencies of static libraries that
|
||
were recorded by ar in the __.LIBDEP archive member.
|
||
|
||
* Add --error-handling-script=<NAME> command line option to allow a helper
|
||
script to be invoked when an undefined symbol or a missing library is
|
||
encountered. This option can be suppressed via the configure time
|
||
switch: --enable-error-handling-script=no.
|
||
|
||
* Add -z lam-u48 to x86-64 ELF linker to generate LAM_U48 property.
|
||
|
||
* Add -z lam-u57 to x86-64 ELF linker to enerate LAM_U57 property.
|
||
|
||
* Add -z lam-u48-report=[none|warning|error] to report missing LAM_U48
|
||
property.
|
||
|
||
* Add -z lam-u57-report=[none|warning|error] to report missing LAM_U57
|
||
property.
|
||
|
||
* Add -z lam-report=[none|warning|error] to report missing LAM_U48 and
|
||
LAM_U57 properties.
|
||
|
||
* Add -z x86-64-{baseline|v[234]} to the x86 ELF linker to mark
|
||
x86-64-{baseline|v[234]} ISA level as needed.
|
||
|
||
* Add -z unique-symbol to avoid duplicated local symbol names.
|
||
|
||
* The creation of PE format DLLs now defaults to using a more secure set of DLL
|
||
characteristics.
|
||
|
||
* The linker now deduplicates the types in .ctf sections. The new
|
||
command-line option --ctf-share-types describes how to do this:
|
||
its default value, share-unconflicted, produces the most compact
|
||
output.
|
||
|
||
* The linker now omits the "variable section" from .ctf sections by
|
||
default, saving space. This is almost certainly what you want
|
||
unless you are working on a project that has its own analogue
|
||
of symbol tables that are not reflected in the ELF symtabs.
|
||
|
||
* Add support for the SHF_GNU_RETAIN ELF section flag.
|
||
This flag specifies that the section should not be garbage collected by the
|
||
linker.
|
||
|
||
Changes in 2.35:
|
||
|
||
* X86 NaCl target support is removed.
|
||
|
||
* Add ELF linker command-line options, --export-dynamic-symbol and
|
||
--export-dynamic-symbol-list, to make symbols dynamic.
|
||
|
||
* Add a configure option, --enable-textrel-check=[no|yes|warning|error],
|
||
to decide what ELF linker should do by default with DT_TEXTREL in an
|
||
executable or shared library. Default to yes for Linux/x86 targets.
|
||
|
||
* The -Map=<filename> command line option has been extended so that if
|
||
<filename> is a directory then <filename>/<output-filename>.map will be
|
||
created.
|
||
|
||
* Add a command-line option for ELF linker, --warn-textrel, to warn that
|
||
DT_TEXTREL is set in a position-independent executable or shared object.
|
||
|
||
* Add command-line options --enable-non-contiguous-regions and
|
||
--enable-non-contiguous-regions-warnings.
|
||
|
||
* Add command-line option --imagic for the pdp11-aout target to output format
|
||
IMAGIC (0411) for separate instruction and data spaces, and change the
|
||
default format option for pdp11-aout to be --omagic.
|
||
|
||
* Relative pathnames in INPUT() and GROUP() directives in linker scripts are
|
||
searched relative to the directory of the linker script before other search
|
||
paths.
|
||
|
||
* Add ELF linker command-line option `-z start-stop-visibility=...' to control
|
||
the visibility of synthetic `__start_SECNAME` and `__stop_SECNAME` symbols.
|
||
|
||
* Add command-line option --dependency-file to write a Make-style dependency
|
||
file listing the input files consulted by the linker, like the files written
|
||
by the compiler's -M -MP options.
|
||
|
||
Changes in 2.34:
|
||
|
||
* The ld check for "PHDR segment not covered by LOAD segment" is more
|
||
effective, catching cases that were wrongly allowed by previous versions of
|
||
ld. If you see this error it is likely you are linking with a bad linker
|
||
script or the binary you are building is not intended to be loaded by a
|
||
dynamic loader. In the latter case --no-dynamic-linker is appropriate.
|
||
|
||
* cr16c support removed.
|
||
|
||
* Add support for z80-elf.
|
||
|
||
* Add support for relocation of each byte or word of multibyte value to Z80
|
||
targets.
|
||
|
||
* Add support for Zilog eZ80 (both ADL and Z80 mode) and Zilog Z180 CPUs.
|
||
|
||
Changes in 2.33:
|
||
|
||
* Add command-line option --no-print-map-discarded.
|
||
|
||
* The Cortex-A53 Erratum 843419 workaround now supports a choice of which
|
||
workaround to use. The option --fix-cortex-a53-843419 now takes an
|
||
optional argument --fix-cortex-a53-843419[=full|adr|adrp] which can be
|
||
used to force a particular workaround to be used. See --help for AArch64
|
||
for more details.
|
||
|
||
* Add target handlers for AArch64 for ELF GNU program properties.
|
||
|
||
* Add support for GNU_PROPERTY_AARCH64_FEATURE_1_BTI in ELF GNU program
|
||
properties in the AArch64 ELF linker.
|
||
|
||
* Add support for GNU_PROPERTY_AARCH64_FEATURE_1_PAC in ELF GNU program
|
||
properties in the AArch64 ELF linker.
|
||
|
||
* Add -z force-bti for AArch64 to enable GNU_PROPERTY_AARCH64_FEATURE_1_BTI
|
||
on output while warning about missing GNU_PROPERTY_AARCH64_FEATURE_1_BTI
|
||
on inputs and use PLTs protected with BTI.
|
||
|
||
* Add -z pac-plt for AArch64 to pick PAC enabled PLTs.
|
||
|
||
Changes in 2.32:
|
||
|
||
* Report property change in linker map file when merging GNU properties.
|
||
|
||
* Add support for the C-SKY processor series.
|
||
|
||
* -t now doesn't report members within archives, unless -t is given twice.
|
||
A single -t is now more useful when generating a list of files that should be
|
||
packaged for a linker bug report. For example:
|
||
gcc hello.c -save-temps -Wl,-t | xargs realpath | sort | uniq > files
|
||
tar cJf test.tar.xz `cat files`
|
||
|
||
Changes in 2.31:
|
||
|
||
* Speed up direct linking with DLLs for Cygwin and Mingw targets.
|
||
|
||
* Add a configure option --enable-separate-code to decide whether
|
||
-z separate-code should be enabled in ELF linker by default. Default
|
||
to yes for Linux/x86 targets. Note that -z separate-code can increase
|
||
disk and memory size.
|
||
|
||
Changes in 2.30:
|
||
|
||
* Add -z separate-code to generate separate code PT_LOAD segment.
|
||
|
||
* Add "-z undefs" command-line option as the inverse of the "-z defs" option.
|
||
|
||
* Add -z globalaudit command-line option to force audit libraries to be run
|
||
for every dynamic object loaded by an executable - provided that the loader
|
||
supports this functionality.
|
||
|
||
* Tighten linker script grammar around file name specifiers to prevent the use
|
||
of SORT_BY_ALIGNMENT and SORT_BY_INIT_PRIORITY on filenames. These would
|
||
previously be accepted but had no effect.
|
||
|
||
* The EXCLUDE_FILE directive can now be placed within any SORT_* directive
|
||
within input section lists.
|
||
|
||
Changes in 2.29:
|
||
|
||
* Support for -z shstk in the x86 ELF linker to generate
|
||
GNU_PROPERTY_X86_FEATURE_1_SHSTK in ELF GNU program properties.
|
||
|
||
* Add support for GNU_PROPERTY_X86_FEATURE_1_SHSTK in ELF GNU program
|
||
properties in the x86 ELF linker.
|
||
|
||
* Add support for GNU_PROPERTY_X86_FEATURE_1_IBT in ELF GNU program
|
||
properties in the x86 ELF linker.
|
||
|
||
* Support for -z ibtplt in the x86 ELF linker to generate IBT-enabled
|
||
PLT.
|
||
|
||
* Support for -z ibt in the x86 ELF linker to generate IBT-enabled
|
||
PLT as well as GNU_PROPERTY_X86_FEATURE_1_IBT in ELF GNU program
|
||
properties.
|
||
|
||
* Add support for ELF SHF_GNU_MBIND and PT_GNU_MBIND_XXX.
|
||
|
||
* Add support for ELF GNU program properties.
|
||
|
||
* Add support for the Texas Instruments PRU processor.
|
||
|
||
* When configuring for arc*-*-linux* targets the default linker emulation will
|
||
change if --with-cpu=nps400 is used at configure time.
|
||
|
||
* Improve assignment of LMAs to orphan sections in some edge cases where a
|
||
mixture of both AT>LMA_REGION and AT(LMA) are used.
|
||
|
||
* Orphan sections placed after an empty section that has an AT(LMA) will now
|
||
take an load memory address starting from LMA.
|
||
|
||
* Section groups can now be resolved (the group deleted and the group members
|
||
placed like normal sections) at partial link time either using the new linker
|
||
option --force-group-allocation or by placing FORCE_GROUP_ALLOCATION into the
|
||
linker script.
|
||
|
||
Changes in 2.28:
|
||
|
||
* The EXCLUDE_FILE linker script construct can now be applied outside of the
|
||
section list in order for the exclusions to apply over all input sections in
|
||
the list.
|
||
|
||
* Add support for the RISC-V architecture.
|
||
|
||
* The command-line option --no-eh-frame-hdr can now be used in ELF based
|
||
linkers to disable the automatic generation of .eh_frame_hdr sections.
|
||
|
||
* Add --in-implib=<infile> to the ARM linker to enable specifying a set of
|
||
Secure Gateway veneers that must exist in the output import library specified
|
||
by --out-implib=<outfile> and the address they must have. As such,
|
||
--in-implib is only supported in combination with --cmse-implib.
|
||
|
||
* Extended the --out-implib=<file> option, previously restricted to x86 PE
|
||
targets, to any ELF based target. This allows the generation of an import
|
||
library for an ELF executable, which can then be used by another application
|
||
to link against the executable.
|
||
|
||
Changes in 2.27:
|
||
|
||
* Add a configure option --enable-relro to decide whether -z relro should
|
||
be enabled in ELF linker by default. Default to yes for all Linux
|
||
targets except FRV, HPPA, IA64 and MIPS. Note that -z relro can increase
|
||
disk and memory size.
|
||
|
||
* Support for -z noreloc-overflow in the x86-64 ELF linker to disable
|
||
relocation overflow check.
|
||
|
||
* Add -z common/-z nocommon options for ELF targets to control whether to
|
||
convert common symbols to the STT_COMMON type during a relocatable link.
|
||
|
||
* Support for -z nodynamic-undefined-weak in the x86 ELF linker, which
|
||
avoids dynamic relocations against undefined weak symbols in executable.
|
||
|
||
* The NOCROSSREFSTO command was added to the linker script language.
|
||
|
||
* Add --no-apply-dynamic-relocs to the AArch64 linker to do not apply link-time
|
||
values for dynamic relocations.
|
||
|
||
Changes in 2.26:
|
||
|
||
* Add --fix-stm32l4xx-629360 to the ARM linker to enable a link-time
|
||
workaround for a bug in the bus matrix / memory controller for some of
|
||
the STM32 Cortex-M4 based products (STM32L4xx)
|
||
|
||
* Add a configure option --enable-compressed-debug-sections={all,ld} to
|
||
decide whether DWARF debug sections should be compressed by default.
|
||
|
||
* Add support for the ARC EM/HS, and ARC600/700 architectures.
|
||
|
||
* Experimental support for linker garbage collection (--gc-sections)
|
||
has been enabled for COFF and PE based targets.
|
||
|
||
* New command-line option for ELF targets to compress DWARF debug
|
||
sections, --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi].
|
||
|
||
* New command-line option, --orphan-handling=[place|warn|error|discard], to
|
||
adjust how orphan sections are handled. The default is 'place' which gives
|
||
the current behaviour, 'warn' and 'error' issue a warning or error
|
||
respectively when orphan sections are found, and 'discard' will discard all
|
||
orphan sections.
|
||
|
||
* Add support for LLVM plugin.
|
||
|
||
* Add --print-memory-usage option to report memory blocks usage.
|
||
|
||
* Add --require-defined option, it's like --undefined except the new symbol
|
||
must be defined by the end of the link.
|
||
|
||
Changes in 2.25:
|
||
|
||
* PE binaries now once again contain real timestamps by default. To disable
|
||
the inclusion of a timestamp in a PE binary, use the --no-insert-timestamp
|
||
command-line option.
|
||
|
||
* Replace support for openrisc and or32 with support for or1k.
|
||
|
||
* Add support for the --build-id command-line option to COFF based targets.
|
||
|
||
* x86/x86_64 pe-coff now supports the --build-id option.
|
||
|
||
* Add support for the Andes NDS32.
|
||
|
||
Changes in 2.24:
|
||
|
||
* Add LOG2CEIL() builtin function to the linker script language
|
||
|
||
* Add support for the Texas Instruments MSP430X processor.
|
||
|
||
* Add support for Altera Nios II.
|
||
|
||
* Add support for the V850E3V5 architecture.
|
||
|
||
* Add support for the Imagination Technologies Meta processor.
|
||
|
||
* --enable-new-dtags no longer generates old dtags in addition to new dtags.
|
||
|
||
* Remove linker support for MIPS ECOFF targets.
|
||
|
||
* Add ALIGN_WITH_INPUT to the linker script language to force the alignment of
|
||
an output section to use the maximum alignment of all its input sections.
|
||
|
||
Changes in 2.23:
|
||
|
||
* Enable compressed debug section feature for x86/x86_64 pe-coff.
|
||
|
||
* Add support for the 64-bit ARM architecture: AArch64.
|
||
|
||
* Added SORT_NONE to the linker script language to disable section sorting.
|
||
|
||
* Add a linker-provided symbol when producing ELF output, '__ehdr_start'
|
||
to point to the ELF file header (and nearby program headers) in the
|
||
program's memory image.
|
||
|
||
* Add support for S12X processor.
|
||
|
||
* Add support for the VLE extension to the PowerPC architecture.
|
||
|
||
* Add support for the Freescale XGATE architecture.
|
||
|
||
* Add option -f FILE on AIX (for response file).
|
||
|
||
* Add support for the Renesas RL78 architecture.
|
||
|
||
* Add support for the Adapteva EPIPHANY architecture.
|
||
|
||
Changes in 2.22:
|
||
|
||
* --copy-dt-needed-entries is no longer enabled by default. Instead
|
||
--no-copy-dt-needed-entries is the default.
|
||
|
||
* INPUT_SECTION_FLAGS has been added to the linker script language
|
||
to allow selection of input sections by section header section flags.
|
||
|
||
* Add support for the Tilera TILEPro and TILE-Gx architectures.
|
||
|
||
* Added SORT_BY_INIT_PRIORITY to the linker script language to permit
|
||
sorting sections by numerical value of the GCC init_priority attribute
|
||
encoded in the section name.
|
||
|
||
Changes in 2.21:
|
||
|
||
* Linker script expression evaluation is somewhat more sane. This may
|
||
break scripts that depend on quirks of the old expression evaluation.
|
||
|
||
* Turn off underscoring for x86_64 PE+-COFF targets. For old behavior the
|
||
option --enable-leading-mingw64-underscores can be used on configure of
|
||
bfd.
|
||
|
||
* Add support for the TMS320C6000 (TI C6X) processor family.
|
||
|
||
* --add-needed renamed to --copy-dt-needed-entries in order to avoid confusion
|
||
with --as-needed option.
|
||
|
||
* Extend .def file syntax by '== <ID>' for imports and exports. This allows
|
||
to alias the import/export table name written in PE image.
|
||
|
||
* Add --exclude-all-symbols option to PE based linkers. This prevents all
|
||
symbols from automatically being exported.
|
||
|
||
* Add support for the Renesas RX processor.
|
||
|
||
* Add support for alpha-vms target.
|
||
|
||
Changes in 2.20:
|
||
|
||
* GNU/Linux targets now support the STB_GNU_UNIQUE symbol binding. This is a
|
||
GNU extension to the standard set of ELF symbol bindings. The binding will
|
||
be passed on to the dynamic linker which will make sure that in the entire
|
||
process there is just one symbol with the given name and type in use.
|
||
|
||
* PE targets now support a GNU extension to allow the alignment of common
|
||
common symbols to be specified. This support uses custom options in
|
||
the .drectve section, which will be disregarded by the native tools.
|
||
|
||
* PE targets now add primitive support for ELF version scripts; symbols
|
||
are not versioned, but the local and global symbol visibility directives
|
||
are respected when filtering symbols in auto-export mode.
|
||
|
||
* New option --no-export-dynamic to undo the effect of the -E and
|
||
--export-dynamic options.
|
||
|
||
* ELF: --warn-alternate-em option to warn if an object has alternate
|
||
ELF machine code.
|
||
|
||
* New script function REGION_ALIAS to add alias names to memory regions.
|
||
|
||
* PE targets no longer make use of the long section names PE extension to
|
||
the COFF format when generating executable images, by default. The old
|
||
(slightly non-conformant) behaviour can still be invoked by using the
|
||
new '--enable-long-section-names' command-line option. It is also enabled
|
||
automatically in the presence of un-stripped debug information, as GDB
|
||
needs to be able to find the debug info sections by their full names.
|
||
|
||
* For GNU/Linux systems the linker will now avoid processing any relocations
|
||
made against symbols of the STT_GNU_IFUNC type and instead emit them into
|
||
the resulting binary for processing by the loader.
|
||
|
||
* --as-needed now links in a dynamic library if it satisfies undefined
|
||
symbols in regular objects, or in other dynamic libraries. In the
|
||
latter case the library is not linked if it is found in a DT_NEEDED
|
||
entry of one of the libraries already linked.
|
||
|
||
* Add a new command-line option, -Ttext-segment ADDR, for ELF targets
|
||
to set the address of the first byte of the text segment.
|
||
|
||
* Add support for Sunplus score architecture.
|
||
|
||
* Add new option --use-nul-prefixed-import-tables to ld for PE targets to
|
||
allow fallback to old import table generation with null element prefix.
|
||
|
||
* Windows PE systems now support a new --exclude-modules-for-implib option,
|
||
allowing users to partition object files and archive members between a DLL
|
||
and its associated import library as they are generated during linking.
|
||
|
||
* Add support for Lattice Mico32 (lm32) architecture.
|
||
|
||
* Add CR16 ELF --embedded-relocs (used to embedded relocations into binaries
|
||
for Embedded-PIC code) option.
|
||
|
||
* Add to the PE/PE+ targets the support of two different kinds of
|
||
pseudo-relocations. They can be selected by the switches
|
||
--enable-runtime-pseudo-reloc-v1 and --enable-runtime-pseudo-reloc-v2.
|
||
For the switch --enable-runtime-pseudo-reloc it uses for 32-bit
|
||
runtime pseudo relocation version one, for 64-bit the version two.
|
||
|
||
Changes in 2.19:
|
||
|
||
* Linker scripts support a new INSERT command that makes it easier to
|
||
augment the default script.
|
||
|
||
* Linker script input section filespecs may now specify a file within an
|
||
archive by writing "archive:file".
|
||
|
||
* The --sort-common switch now has an optional argument which specifies the
|
||
direction of sorting.
|
||
|
||
* The M68K linker now supports multiple GOT generation schemes controlled via
|
||
the --got=<type> command-line option.
|
||
|
||
* The ARM EABI linker will now generate stubs for function calls to symbols
|
||
that are too far away. The placement of the stubs is controlled by a new
|
||
linker command-line option: --stub-group-size=N.
|
||
|
||
Changes in 2.18:
|
||
|
||
* Linker sources now released under version 3 of the GNU General Public
|
||
License.
|
||
|
||
* ELF: New --build-id option to generate a unique per-binary identifier
|
||
embedded in a note section.
|
||
|
||
* Added support for National Semicondutor CompactRISC (ie CR16) target.
|
||
|
||
* -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.
|
||
|
||
Changes in 2.15:
|
||
|
||
* ELF: --as-needed/--no-as-needed options to control if a DT_NEEDED tag should
|
||
be added only when a shared library is referenced.
|
||
|
||
* PE: --large-address-aware option to indicate executables support virtual
|
||
addresses greater than 2 gigabytes.
|
||
|
||
* DWARF 2 support for i386pe added.
|
||
|
||
* The linker script operator DEFINED() will now yield 1 only for a symbol that
|
||
is defined before the statement where DEFINED is used.
|
||
|
||
* The MIPS --embedded-relocs (used to embed relocations into binaries for
|
||
Embedded-PIC code) is deprecated and will be removed in a future release.
|
||
|
||
* cr16c support added by NSC.
|
||
|
||
* m32r Linux (ELF) support added by Renesas.
|
||
|
||
* Improved linker's handling of unresolved symbols. The switch
|
||
--unresolved-symbols=<method> has been added to tell the linker when it
|
||
should report them and the switch --warn-unresolved-symbols has been added to
|
||
make reports be issued as warning messages rather than errors.
|
||
|
||
Changes in 2.14:
|
||
|
||
* Added support for Xtensa architecture.
|
||
|
||
* Added --with-sysroot configure switch to specify a target system root, for
|
||
linking against a target filesystem image.
|
||
|
||
* Added --accept-unknown-linker-format to restore old linker behaviour (pre
|
||
2.14) of silently accepting and linking in any files in an unknown binary
|
||
file format.
|
||
|
||
* Added --no-omagic to undo the effects of the -N option.
|
||
|
||
* Support for Texas Instruments TMS320C4x and TMS320C3x series of
|
||
DSP's contributed by Michael Hayes and Svein E. Seldal.
|
||
|
||
* Added --with-lib-path configure switch to specify default value for
|
||
LIB_PATH.
|
||
|
||
* ARM port to QNX operating system added by Graeme Peterson.
|
||
|
||
* IP2K support added by Denis Chertykov.
|
||
|
||
Changes in 2.13:
|
||
|
||
* Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400
|
||
and FR500 included.
|
||
|
||
Changes in version 2.13:
|
||
|
||
* DEC VAX ELF support, by Matt Thomas.
|
||
|
||
Changes in version 2.12:
|
||
|
||
* Support for Don Knuth's MMIX, by Hans-Peter Nilsson.
|
||
|
||
* Support for the OpenRISC 32-bit embedded processor by OpenCores.
|
||
|
||
* Support for -z nocopyreloc in the x86 ELF linker, which disables
|
||
production of copy relocs. Warning: using this option may result in
|
||
non-sharable applications.
|
||
|
||
* Support for -z combreloc in the ELF linker, which puts dynamic
|
||
relocations against the same symbol together, so that dynamic linker
|
||
can use an one-entry symbol lookup cache.
|
||
|
||
* Support for ELF SHF_MERGE section merging, by Jakub Jelinek.
|
||
|
||
Changes in version 2.11:
|
||
|
||
* Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
|
||
|
||
* Support added for eliminating duplicate DWARF2 debug information by
|
||
having the compiler generate the information in sections called
|
||
.gnu.linkonce.wi.XXXX where XXXX is a checksum for the contents. The
|
||
linker then merges these sections together into the normal .debug_info
|
||
section.
|
||
|
||
* The native ELF linker now searches the directories in DT_RUNPATH or
|
||
DT_RPATH of a shared library for shared libraries needed by it.
|
||
|
||
* TI C54x support, by Timothy Wall.
|
||
|
||
* Added command-line switch --section-start to set the start address of any
|
||
specified section.
|
||
|
||
* Added ability to emit full relocation information in linked executables,
|
||
enabled by --emit-relocs. Some post-linkage optimization tools need
|
||
this information in order to be able to correctly identify and perform
|
||
symbol relative addressing in the event of changes in section contents
|
||
(instructions being added or deleted, extending data sections, etc.)
|
||
|
||
* Support for i860, by Jason Eckhardt (preliminary, alpha quality).
|
||
|
||
* Support for CRIS (Axis Communications ETRAX series).
|
||
|
||
* Support for PDP-11 and 2.11BSD a.out format, by Lars Brinkhoff.
|
||
|
||
Changes in version 2.10:
|
||
|
||
* Added AT> to the linker script language to allow load-time allocation of
|
||
sections into regions.
|
||
|
||
* Added garbage collection of unused sections, enabled by --gc-sections.
|
||
It does require a bit of backend support; currently implemented are
|
||
arm-elf, avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf,
|
||
mcore-elf, mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf.
|
||
Others will ignore the option.
|
||
|
||
* Added SORT to the linker script language to permit sorting sections by file
|
||
name or section name.
|
||
|
||
* Added EXTERN to the linker script language as an equivalent to the -u
|
||
command-line option.
|
||
|
||
* Added ASSERT to the linker script language.
|
||
|
||
* Added EXCLUDE_FILE to the linker script language for further control over
|
||
wildcard file names.
|
||
|
||
* Added -O option to optimize linker output (as of this writing, this only
|
||
affects ELF shared library generation).
|
||
|
||
* The -e option now accepts a number as well as a symbol name.
|
||
|
||
* Added --no-undefined option to disallow undefined symbols when creating a
|
||
shared library.
|
||
|
||
* The linker now issues a warning, not an error, for an undefined symbol when
|
||
using -Bsymbolic; use the new --no-undefined option to get the old
|
||
behaviour.
|
||
|
||
* Added --demangle and --no-demangle options.
|
||
|
||
Changes in version 2.9:
|
||
|
||
* Added SQUAD to the linker script language.
|
||
|
||
* New option --no-warn-mismatch.
|
||
|
||
* The MEMORY command now parses the attributes to determine where sections that
|
||
are not placed in a specific memory region are placed.
|
||
|
||
Changes in version 2.8:
|
||
|
||
* Linker scripts may now contain shell wildcard characters for file and section
|
||
names.
|
||
|
||
* The linker now supports symbol versions in ELF.
|
||
|
||
* The NOCROSSREFS command was added to the linker script language.
|
||
|
||
* The LOADADDR expression was added to the linker script language.
|
||
|
||
* MAX and MIN functions were added to the linker script language.
|
||
|
||
* The OVERLAY construct was added to the linker script language.
|
||
|
||
* New option --warn-section-align to warn when the address of an output section
|
||
changes due to alignment of an input section.
|
||
|
||
* New options --filter/-F and --auxiliary/-f.
|
||
|
||
Changes in version 2.7:
|
||
|
||
* New option --cref to print out a cross reference table.
|
||
|
||
* New option --wrap SYMBOL.
|
||
|
||
* New option --no-whole-archive, to turn off the effect of --whole-archive.
|
||
|
||
* Input sections assigned to the output section /DISCARD/ in the linker script
|
||
are not included in the output file.
|
||
|
||
* The SunOS and ELF linkers now merge stabs debugging information which uses
|
||
the N_BINCL and N_EINCL stab types. This reduces the amount of debugging
|
||
information generated.
|
||
|
||
Changes in version 2.6:
|
||
|
||
* When an ELF section name is representable as a C identifier (this is not true
|
||
of most ELF section names), the linker will automatically define symbols
|
||
__start_SECNAME and __stop_SECNAME, where SECNAME is the section name, at the
|
||
beginning and the end of the section. This is used by glibc.
|
||
|
||
Addendum: Current versions of the linker (at least for version 2.18 onwards
|
||
and possibly much earlier as well) place two restrictions on this feature: The
|
||
symbols are only implemented for orphaned sections, not for explicitly placed
|
||
sections and they are PROVIDEd rather than being defined.
|
||
|
||
* When an ELF section named .gnu.warning is encountered in an input file, the
|
||
contents of the section are displayed as an error message, and the section is
|
||
not copied into the output file. This is used by glibc.
|
||
|
||
* When an ELF section named .gnu.warning.SYMBOL is encountered in an input
|
||
file, and the symbol SYMBOL is referenced by some object file, the contents of
|
||
the section are displayed as an error message. The section is not copied into
|
||
the output file, unless doing a relocatable or shared link. This is used by
|
||
glibc.
|
||
|
||
* New options -split-by-reloc and -split-by-file.
|
||
|
||
* The linker now supports linking PIC compiled code on SPARC SunOS. It can
|
||
also create SPARC SunOS shared libraries, and, like the native SunOS linker,
|
||
will do so whenever there is an undefined symbol in the link and neither the -e
|
||
nor the -r option was used.
|
||
|
||
* The -rpath option may be used on SunOS to set the list of directories to be
|
||
searched at run time. This overrides the default of building the list from the
|
||
-L options.
|
||
|
||
* The COFF linker now combines debugging information for structs, unions, and
|
||
enums, so that even if the same type is defined in multiple input files it will
|
||
only be defined once in the output file. The --traditional-format switch will
|
||
prevent this optimization.
|
||
|
||
Changes in version 2.5:
|
||
|
||
* The linker now supports linking against SunOS shared libraries. It still can
|
||
not link SunOS PIC (Position Independent Code) files, so it can not be used to
|
||
generate shared libraries.
|
||
|
||
* The linker now supports linking against ELF shared libraries for the i386
|
||
(UnixWare) and SPARC (Solaris). It can also link ELF PIC files, and can be
|
||
used to generate shared libraries. Shared library generation is not well
|
||
tested; please report any problems encountered. The linker is now enabled for
|
||
Solaris again.
|
||
|
||
* Eric Youngdale has contributed Linux support code, including linking against
|
||
Linux a.out shared libraries. The linker produces Linux QMAGIC binaries.
|
||
|
||
* The ELF backend has been converted to the new linker code. To use the new
|
||
ELF linker, each particular target requires a relocation function. So far,
|
||
this function has been written for i386 (UnixWare), SPARC (Solaris) MIPS (Irix
|
||
5), and HPPA ELF targets.
|
||
|
||
* The -( (--start-group) and -) (--end-group) options have been added to
|
||
support searching a group of archives as though they were a single archive.
|
||
This can also be used in a linker script, as GROUP ( files ).
|
||
|
||
* When a file is named on the command line, and the linker does not recognize
|
||
it as an object file, the linker will now treat the file as a linker script
|
||
file. A linker script named in this way augments, but does not replace, the
|
||
default linker script.
|
||
|
||
* The -warn-once option was added. It causes the linker to only warn once per
|
||
undefined symbol, rather than once per reference.
|
||
|
||
* The COFF backend has been converted to the new linker code. As with ELF, to
|
||
use the new linker, each particular target requires a relocation function. So
|
||
far, this function has been written for the i386, m68k, a29k and SH targets.
|
||
|
||
* The -V flag was made a synonym for -v, for SVR4 compatibility. The old -V
|
||
behaviour is available via --verbose.
|
||
|
||
Changes in version 2.4:
|
||
|
||
* New linker code, by Steve Chamberlain and Ian Taylor. For a.out and ecoff
|
||
formats (so far), this should result in considerable savings in time
|
||
and memory used while linking; slightly poorer performance than
|
||
before for formats not converted yet.
|
||
|
||
* Command-line parsing is no longer done with flex. This means
|
||
oddball characters in filenames won't get treated as argument
|
||
separators.
|
||
|
||
* HP-PA ELF support, by Jeff Law. (No SOM support yet.)
|
||
|
||
* Mach i386 support, by David Mackenzie.
|
||
|
||
* Irix 4 shared libraries are now supported (Irix 5 uses ELF, and ELF shared
|
||
libraries are not yet supported).
|
||
|
||
* COFF shared libraries (as on SCO) should work as well.
|
||
|
||
* The linker is disabled for Solaris. (Actually, it was in 2.3 also, I just
|
||
forgot to note it.) Some of their C library routines don't work when
|
||
statically linked, and the GNU linker doesn't support dynamic linking yet.
|
||
|
||
Changes in version 2.3:
|
||
|
||
* Weak symbols are now supported.
|
||
|
||
* ELF support has been added. The linker has been bootstrapped on
|
||
UnixWare and Solaris.
|
||
|
||
* Alpha OSF/1 support has been added (non dynamic linking only).
|
||
|
||
Changes in version 2.2:
|
||
|
||
* The `bfd' library has been updated to reduce a.out-format string
|
||
table size. The effect of this is that files linked from many input
|
||
files with duplicate symbols (`-g' debugging records, or identical
|
||
static symbols) should be much smaller.
|
||
|
||
Changes in version 2.1:
|
||
|
||
* The ld -ySYMBOL flag (to trace references to SYMBOL) is now implemented.
|
||
|
||
* There is now support for writing ECOFF files, so ld and the
|
||
other utilities should work on Risc/Ultrix and Irix.
|
||
|
||
|
||
Copyright (C) 2012-2021 Free Software Foundation, Inc.
|
||
|
||
Copying and distribution of this file, with or without modification,
|
||
are permitted in any medium without royalty provided the copyright
|
||
notice and this notice are preserved.
|
||
|
||
Local variables:
|
||
fill-column: 79
|
||
End:
|