]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/NEWS
4dee2301158a2f06ac76169409c2823413e0b77d
[thirdparty/binutils-gdb.git] / ld / NEWS
1 -*- text -*-
2
3 * The linker now accepts a command line option of --remap-inputs
4 <PATTERN>=<FILE> to relace any input file that matches <PATTERN> with
5 <FILE>. In addition the option --remap-inputs-file=<FILE> can be used to
6 specify a file containing any number of these remapping directives.
7
8 * The linker command line option --print-map-locals can be used to include
9 local symbols in a linker map. (ELF targets only).
10
11 * For most ELF based targets, if the --enable-linker-version option is used
12 then the version of the linker will be inserted as a string into the .comment
13 section.
14
15 * The linker script syntax has a new command for output sections: ASCIZ "string"
16 This will insert a zero-terminated string at the current location.
17
18 Changes in 2.40:
19
20 * The linker has a new command line option to suppress the generation of any
21 warning or error messages. This can be useful when there is a need to create
22 a known non-working binary. The option is -w or --no-warnings.
23
24 * ld now supports zstd compressed debug sections. The new option
25 --compress-debug-sections=zstd compresses debug sections with zstd.
26
27 * Add --enable-default-compressed-debug-sections-algorithm={zlib,zstd}
28 that selects the default compression algorithm
29 for --enable-compressed-debug-sections.
30
31 * Remove support for -z bndplt (MPX prefix instructions).
32
33 Changes in 2.39:
34
35 * The ELF linker will now generate a warning message if the stack is made
36 executable. By default this warning is not issued if the user has
37 specifically requested an executable stack via the "-z execstack"
38 command line option, but the warning can be forced via the new
39 "--warn-execstack" option. Alternatively all warnings about creating
40 an executable stack can be suppressed via the "--no-warn-execstack"
41 option.
42
43 In addition the ELF linker will also warn if it creates a memory resident
44 segment with all three of the Read, Write and eXecute permissions set, or
45 if it creates a thread local data segment with the eXecute permission set.
46 These warnings can be disabled via --no-warn-rwx-segments option and
47 re-enabled via the --warn-rwx-segments option.
48
49 New configure options can also control these new features:
50
51 --enable-warn-execstack=no
52 will disable the warnings about creating an executable stack.
53
54 --enable-warn-execstack=yes
55 will make --warn-execstack enabled by default.
56
57 --enable-warn-rwx-segments=no
58 will make --no-warn-rwx-segments enabled by default.
59
60 --enable-default-execstack=no
61 will stop the creation of an executable stack simply because an input file
62 is missing a .note.GNU-stack section, even on architectures where this
63 behaviour is the default.
64
65 * TYPE=<type> is now supported in an output section description to set the
66 section type value.
67
68 * Remove (rudimentary) support for the x86-64 sub-architectures Intel L1OM and
69 Intel K1OM.
70
71 * The ELF linker now supports a new --package-metadata option that allows
72 embedding a JSON payload in accordance to the Package Metadata specification.
73 If support for libjansson is enabled at build time, the linker will use it to
74 validate the input. This can be enabled with --enable-jansson.
75 For more details, see: https://systemd.io/ELF_PACKAGE_METADATA/
76
77 Changes in 2.38:
78
79 * Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
80 linker to pack relative relocations in the DT_RELR section.
81
82 * Add support for the LoongArch architecture.
83
84 * Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
85 linker to control canonical function pointers and copy relocation.
86
87 * Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
88 bytes.
89
90 Changes in 2.37:
91
92 * arm-symbianelf support removed.
93
94 * Add -z report-relative-reloc to x86 ELF linker to report dynamic
95 relative relocations.
96
97 * Add -z start-stop-gc to disable special treatment of __start_*/__stop_*
98 references when --gc-sections.
99
100 * Add -Bno-symbolic to cancel -Bsymbolic and -Bsymbolic-functions.
101
102 Changes in 2.36:
103
104 * Add libdep plugin, for linking dependencies of static libraries that
105 were recorded by ar in the __.LIBDEP archive member.
106
107 * Add --error-handling-script=<NAME> command line option to allow a helper
108 script to be invoked when an undefined symbol or a missing library is
109 encountered. This option can be suppressed via the configure time
110 switch: --enable-error-handling-script=no.
111
112 * Add -z lam-u48 to x86-64 ELF linker to generate LAM_U48 property.
113
114 * Add -z lam-u57 to x86-64 ELF linker to enerate LAM_U57 property.
115
116 * Add -z lam-u48-report=[none|warning|error] to report missing LAM_U48
117 property.
118
119 * Add -z lam-u57-report=[none|warning|error] to report missing LAM_U57
120 property.
121
122 * Add -z lam-report=[none|warning|error] to report missing LAM_U48 and
123 LAM_U57 properties.
124
125 * Add -z x86-64-{baseline|v[234]} to the x86 ELF linker to mark
126 x86-64-{baseline|v[234]} ISA level as needed.
127
128 * Add -z unique-symbol to avoid duplicated local symbol names.
129
130 * The creation of PE format DLLs now defaults to using a more secure set of DLL
131 characteristics.
132
133 * The linker now deduplicates the types in .ctf sections. The new
134 command-line option --ctf-share-types describes how to do this:
135 its default value, share-unconflicted, produces the most compact
136 output.
137
138 * The linker now omits the "variable section" from .ctf sections by
139 default, saving space. This is almost certainly what you want
140 unless you are working on a project that has its own analogue
141 of symbol tables that are not reflected in the ELF symtabs.
142
143 * Add support for the SHF_GNU_RETAIN ELF section flag.
144 This flag specifies that the section should not be garbage collected by the
145 linker.
146
147 Changes in 2.35:
148
149 * X86 NaCl target support is removed.
150
151 * Add ELF linker command-line options, --export-dynamic-symbol and
152 --export-dynamic-symbol-list, to make symbols dynamic.
153
154 * Add a configure option, --enable-textrel-check=[no|yes|warning|error],
155 to decide what ELF linker should do by default with DT_TEXTREL in an
156 executable or shared library. Default to yes for Linux/x86 targets.
157
158 * The -Map=<filename> command line option has been extended so that if
159 <filename> is a directory then <filename>/<output-filename>.map will be
160 created.
161
162 * Add a command-line option for ELF linker, --warn-textrel, to warn that
163 DT_TEXTREL is set in a position-independent executable or shared object.
164
165 * Add command-line options --enable-non-contiguous-regions and
166 --enable-non-contiguous-regions-warnings.
167
168 * Add command-line option --imagic for the pdp11-aout target to output format
169 IMAGIC (0411) for separate instruction and data spaces, and change the
170 default format option for pdp11-aout to be --omagic.
171
172 * Relative pathnames in INPUT() and GROUP() directives in linker scripts are
173 searched relative to the directory of the linker script before other search
174 paths.
175
176 * Add ELF linker command-line option `-z start-stop-visibility=...' to control
177 the visibility of synthetic `__start_SECNAME` and `__stop_SECNAME` symbols.
178
179 * Add command-line option --dependency-file to write a Make-style dependency
180 file listing the input files consulted by the linker, like the files written
181 by the compiler's -M -MP options.
182
183 Changes in 2.34:
184
185 * The ld check for "PHDR segment not covered by LOAD segment" is more
186 effective, catching cases that were wrongly allowed by previous versions of
187 ld. If you see this error it is likely you are linking with a bad linker
188 script or the binary you are building is not intended to be loaded by a
189 dynamic loader. In the latter case --no-dynamic-linker is appropriate.
190
191 * cr16c support removed.
192
193 * Add support for z80-elf.
194
195 * Add support for relocation of each byte or word of multibyte value to Z80
196 targets.
197
198 * Add support for Zilog eZ80 (both ADL and Z80 mode) and Zilog Z180 CPUs.
199
200 Changes in 2.33:
201
202 * Add command-line option --no-print-map-discarded.
203
204 * The Cortex-A53 Erratum 843419 workaround now supports a choice of which
205 workaround to use. The option --fix-cortex-a53-843419 now takes an
206 optional argument --fix-cortex-a53-843419[=full|adr|adrp] which can be
207 used to force a particular workaround to be used. See --help for AArch64
208 for more details.
209
210 * Add target handlers for AArch64 for ELF GNU program properties.
211
212 * Add support for GNU_PROPERTY_AARCH64_FEATURE_1_BTI in ELF GNU program
213 properties in the AArch64 ELF linker.
214
215 * Add support for GNU_PROPERTY_AARCH64_FEATURE_1_PAC in ELF GNU program
216 properties in the AArch64 ELF linker.
217
218 * Add -z force-bti for AArch64 to enable GNU_PROPERTY_AARCH64_FEATURE_1_BTI
219 on output while warning about missing GNU_PROPERTY_AARCH64_FEATURE_1_BTI
220 on inputs and use PLTs protected with BTI.
221
222 * Add -z pac-plt for AArch64 to pick PAC enabled PLTs.
223
224 Changes in 2.32:
225
226 * Report property change in linker map file when merging GNU properties.
227
228 * Add support for the C-SKY processor series.
229
230 * -t now doesn't report members within archives, unless -t is given twice.
231 A single -t is now more useful when generating a list of files that should be
232 packaged for a linker bug report. For example:
233 gcc hello.c -save-temps -Wl,-t | xargs realpath | sort | uniq > files
234 tar cJf test.tar.xz `cat files`
235
236 Changes in 2.31:
237
238 * Speed up direct linking with DLLs for Cygwin and Mingw targets.
239
240 * Add a configure option --enable-separate-code to decide whether
241 -z separate-code should be enabled in ELF linker by default. Default
242 to yes for Linux/x86 targets. Note that -z separate-code can increase
243 disk and memory size.
244
245 Changes in 2.30:
246
247 * Add -z separate-code to generate separate code PT_LOAD segment.
248
249 * Add "-z undefs" command-line option as the inverse of the "-z defs" option.
250
251 * Add -z globalaudit command-line option to force audit libraries to be run
252 for every dynamic object loaded by an executable - provided that the loader
253 supports this functionality.
254
255 * Tighten linker script grammar around file name specifiers to prevent the use
256 of SORT_BY_ALIGNMENT and SORT_BY_INIT_PRIORITY on filenames. These would
257 previously be accepted but had no effect.
258
259 * The EXCLUDE_FILE directive can now be placed within any SORT_* directive
260 within input section lists.
261
262 Changes in 2.29:
263
264 * Support for -z shstk in the x86 ELF linker to generate
265 GNU_PROPERTY_X86_FEATURE_1_SHSTK in ELF GNU program properties.
266
267 * Add support for GNU_PROPERTY_X86_FEATURE_1_SHSTK in ELF GNU program
268 properties in the x86 ELF linker.
269
270 * Add support for GNU_PROPERTY_X86_FEATURE_1_IBT in ELF GNU program
271 properties in the x86 ELF linker.
272
273 * Support for -z ibtplt in the x86 ELF linker to generate IBT-enabled
274 PLT.
275
276 * Support for -z ibt in the x86 ELF linker to generate IBT-enabled
277 PLT as well as GNU_PROPERTY_X86_FEATURE_1_IBT in ELF GNU program
278 properties.
279
280 * Add support for ELF SHF_GNU_MBIND and PT_GNU_MBIND_XXX.
281
282 * Add support for ELF GNU program properties.
283
284 * Add support for the Texas Instruments PRU processor.
285
286 * When configuring for arc*-*-linux* targets the default linker emulation will
287 change if --with-cpu=nps400 is used at configure time.
288
289 * Improve assignment of LMAs to orphan sections in some edge cases where a
290 mixture of both AT>LMA_REGION and AT(LMA) are used.
291
292 * Orphan sections placed after an empty section that has an AT(LMA) will now
293 take an load memory address starting from LMA.
294
295 * Section groups can now be resolved (the group deleted and the group members
296 placed like normal sections) at partial link time either using the new linker
297 option --force-group-allocation or by placing FORCE_GROUP_ALLOCATION into the
298 linker script.
299
300 Changes in 2.28:
301
302 * The EXCLUDE_FILE linker script construct can now be applied outside of the
303 section list in order for the exclusions to apply over all input sections in
304 the list.
305
306 * Add support for the RISC-V architecture.
307
308 * The command-line option --no-eh-frame-hdr can now be used in ELF based
309 linkers to disable the automatic generation of .eh_frame_hdr sections.
310
311 * Add --in-implib=<infile> to the ARM linker to enable specifying a set of
312 Secure Gateway veneers that must exist in the output import library specified
313 by --out-implib=<outfile> and the address they must have. As such,
314 --in-implib is only supported in combination with --cmse-implib.
315
316 * Extended the --out-implib=<file> option, previously restricted to x86 PE
317 targets, to any ELF based target. This allows the generation of an import
318 library for an ELF executable, which can then be used by another application
319 to link against the executable.
320
321 Changes in 2.27:
322
323 * Add a configure option --enable-relro to decide whether -z relro should
324 be enabled in ELF linker by default. Default to yes for all Linux
325 targets except FRV, HPPA, IA64 and MIPS. Note that -z relro can increase
326 disk and memory size.
327
328 * Support for -z noreloc-overflow in the x86-64 ELF linker to disable
329 relocation overflow check.
330
331 * Add -z common/-z nocommon options for ELF targets to control whether to
332 convert common symbols to the STT_COMMON type during a relocatable link.
333
334 * Support for -z nodynamic-undefined-weak in the x86 ELF linker, which
335 avoids dynamic relocations against undefined weak symbols in executable.
336
337 * The NOCROSSREFSTO command was added to the linker script language.
338
339 * Add --no-apply-dynamic-relocs to the AArch64 linker to do not apply link-time
340 values for dynamic relocations.
341
342 Changes in 2.26:
343
344 * Add --fix-stm32l4xx-629360 to the ARM linker to enable a link-time
345 workaround for a bug in the bus matrix / memory controller for some of
346 the STM32 Cortex-M4 based products (STM32L4xx)
347
348 * Add a configure option --enable-compressed-debug-sections={all,ld} to
349 decide whether DWARF debug sections should be compressed by default.
350
351 * Add support for the ARC EM/HS, and ARC600/700 architectures.
352
353 * Experimental support for linker garbage collection (--gc-sections)
354 has been enabled for COFF and PE based targets.
355
356 * New command-line option for ELF targets to compress DWARF debug
357 sections, --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi].
358
359 * New command-line option, --orphan-handling=[place|warn|error|discard], to
360 adjust how orphan sections are handled. The default is 'place' which gives
361 the current behaviour, 'warn' and 'error' issue a warning or error
362 respectively when orphan sections are found, and 'discard' will discard all
363 orphan sections.
364
365 * Add support for LLVM plugin.
366
367 * Add --print-memory-usage option to report memory blocks usage.
368
369 * Add --require-defined option, it's like --undefined except the new symbol
370 must be defined by the end of the link.
371
372 Changes in 2.25:
373
374 * PE binaries now once again contain real timestamps by default. To disable
375 the inclusion of a timestamp in a PE binary, use the --no-insert-timestamp
376 command-line option.
377
378 * Replace support for openrisc and or32 with support for or1k.
379
380 * Add support for the --build-id command-line option to COFF based targets.
381
382 * x86/x86_64 pe-coff now supports the --build-id option.
383
384 * Add support for the Andes NDS32.
385
386 Changes in 2.24:
387
388 * Add LOG2CEIL() builtin function to the linker script language
389
390 * Add support for the Texas Instruments MSP430X processor.
391
392 * Add support for Altera Nios II.
393
394 * Add support for the V850E3V5 architecture.
395
396 * Add support for the Imagination Technologies Meta processor.
397
398 * --enable-new-dtags no longer generates old dtags in addition to new dtags.
399
400 * Remove linker support for MIPS ECOFF targets.
401
402 * Add ALIGN_WITH_INPUT to the linker script language to force the alignment of
403 an output section to use the maximum alignment of all its input sections.
404
405 Changes in 2.23:
406
407 * Enable compressed debug section feature for x86/x86_64 pe-coff.
408
409 * Add support for the 64-bit ARM architecture: AArch64.
410
411 * Added SORT_NONE to the linker script language to disable section sorting.
412
413 * Add a linker-provided symbol when producing ELF output, '__ehdr_start'
414 to point to the ELF file header (and nearby program headers) in the
415 program's memory image.
416
417 * Add support for S12X processor.
418
419 * Add support for the VLE extension to the PowerPC architecture.
420
421 * Add support for the Freescale XGATE architecture.
422
423 * Add option -f FILE on AIX (for response file).
424
425 * Add support for the Renesas RL78 architecture.
426
427 * Add support for the Adapteva EPIPHANY architecture.
428
429 Changes in 2.22:
430
431 * --copy-dt-needed-entries is no longer enabled by default. Instead
432 --no-copy-dt-needed-entries is the default.
433
434 * INPUT_SECTION_FLAGS has been added to the linker script language
435 to allow selection of input sections by section header section flags.
436
437 * Add support for the Tilera TILEPro and TILE-Gx architectures.
438
439 * Added SORT_BY_INIT_PRIORITY to the linker script language to permit
440 sorting sections by numerical value of the GCC init_priority attribute
441 encoded in the section name.
442
443 Changes in 2.21:
444
445 * Linker script expression evaluation is somewhat more sane. This may
446 break scripts that depend on quirks of the old expression evaluation.
447
448 * Turn off underscoring for x86_64 PE+-COFF targets. For old behavior the
449 option --enable-leading-mingw64-underscores can be used on configure of
450 bfd.
451
452 * Add support for the TMS320C6000 (TI C6X) processor family.
453
454 * --add-needed renamed to --copy-dt-needed-entries in order to avoid confusion
455 with --as-needed option.
456
457 * Extend .def file syntax by '== <ID>' for imports and exports. This allows
458 to alias the import/export table name written in PE image.
459
460 * Add --exclude-all-symbols option to PE based linkers. This prevents all
461 symbols from automatically being exported.
462
463 * Add support for the Renesas RX processor.
464
465 * Add support for alpha-vms target.
466
467 Changes in 2.20:
468
469 * GNU/Linux targets now support the STB_GNU_UNIQUE symbol binding. This is a
470 GNU extension to the standard set of ELF symbol bindings. The binding will
471 be passed on to the dynamic linker which will make sure that in the entire
472 process there is just one symbol with the given name and type in use.
473
474 * PE targets now support a GNU extension to allow the alignment of common
475 common symbols to be specified. This support uses custom options in
476 the .drectve section, which will be disregarded by the native tools.
477
478 * PE targets now add primitive support for ELF version scripts; symbols
479 are not versioned, but the local and global symbol visibility directives
480 are respected when filtering symbols in auto-export mode.
481
482 * New option --no-export-dynamic to undo the effect of the -E and
483 --export-dynamic options.
484
485 * ELF: --warn-alternate-em option to warn if an object has alternate
486 ELF machine code.
487
488 * New script function REGION_ALIAS to add alias names to memory regions.
489
490 * PE targets no longer make use of the long section names PE extension to
491 the COFF format when generating executable images, by default. The old
492 (slightly non-conformant) behaviour can still be invoked by using the
493 new '--enable-long-section-names' command-line option. It is also enabled
494 automatically in the presence of un-stripped debug information, as GDB
495 needs to be able to find the debug info sections by their full names.
496
497 * For GNU/Linux systems the linker will now avoid processing any relocations
498 made against symbols of the STT_GNU_IFUNC type and instead emit them into
499 the resulting binary for processing by the loader.
500
501 * --as-needed now links in a dynamic library if it satisfies undefined
502 symbols in regular objects, or in other dynamic libraries. In the
503 latter case the library is not linked if it is found in a DT_NEEDED
504 entry of one of the libraries already linked.
505
506 * Add a new command-line option, -Ttext-segment ADDR, for ELF targets
507 to set the address of the first byte of the text segment.
508
509 * Add support for Sunplus score architecture.
510
511 * Add new option --use-nul-prefixed-import-tables to ld for PE targets to
512 allow fallback to old import table generation with null element prefix.
513
514 * Windows PE systems now support a new --exclude-modules-for-implib option,
515 allowing users to partition object files and archive members between a DLL
516 and its associated import library as they are generated during linking.
517
518 * Add support for Lattice Mico32 (lm32) architecture.
519
520 * Add CR16 ELF --embedded-relocs (used to embedded relocations into binaries
521 for Embedded-PIC code) option.
522
523 * Add to the PE/PE+ targets the support of two different kinds of
524 pseudo-relocations. They can be selected by the switches
525 --enable-runtime-pseudo-reloc-v1 and --enable-runtime-pseudo-reloc-v2.
526 For the switch --enable-runtime-pseudo-reloc it uses for 32-bit
527 runtime pseudo relocation version one, for 64-bit the version two.
528
529 Changes in 2.19:
530
531 * Linker scripts support a new INSERT command that makes it easier to
532 augment the default script.
533
534 * Linker script input section filespecs may now specify a file within an
535 archive by writing "archive:file".
536
537 * The --sort-common switch now has an optional argument which specifies the
538 direction of sorting.
539
540 * The M68K linker now supports multiple GOT generation schemes controlled via
541 the --got=<type> command-line option.
542
543 * The ARM EABI linker will now generate stubs for function calls to symbols
544 that are too far away. The placement of the stubs is controlled by a new
545 linker command-line option: --stub-group-size=N.
546
547 Changes in 2.18:
548
549 * Linker sources now released under version 3 of the GNU General Public
550 License.
551
552 * ELF: New --build-id option to generate a unique per-binary identifier
553 embedded in a note section.
554
555 * Added support for National Semicondutor CompactRISC (ie CR16) target.
556
557 * -l:foo now searches the library path for a filename called foo,
558 without converting it to libfoo.a or libfoo.so.
559
560 * Add a new command-line option '--default-script=FILE' or '-dT FILE'
561 which specifies a replacement for the built in, default linker
562 script.
563
564 * ELF: Add -Bsymbolic-functions, --dynamic-list-cpp-new, which puts C++
565 operator new and delete on the dynamic list, and --dynamic-list-data,
566 builtin list for --dynamic-list, which puts global data symbols on the
567 dynamic list.
568
569 * Add support for x86_64 PE+ target.
570
571 * Add support for Score target.
572
573 * ELF: Add --dynamic-list option to specify a list of global symbols
574 whose references shouldn't be bound to the definition within the
575 shared library, or a list of symbols which should be added to the
576 symbol table in the executable.
577
578 * The default output section LMA has changed for allocatable sections from
579 being equal to VMA, to keeping the difference between LMA and VMA the same as
580 the previous output section in the same region. This is a more useful
581 default when using overlays and other cases where you specify an LMA
582 differing from the VMA for some sections.
583
584 * New switch: --print-gc-sections to list any sections removed by garabge
585 collection.
586
587 * ARM: Added --vfp11-denorm-fix option to work around an erratum in current
588 VFP11 coprocessors.
589
590 Changes in 2.17:
591
592 * Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
593
594 * Modify the Linux linker search order to better match ld.so search order.
595 Look for DT_NEEDED libraries in paths specified by ld.so.conf before
596 searching the default directories, rather than vice versa.
597 Use $prefix/etc/ld.so.conf if it exists, otherwise /etc/ld.so.conf.
598
599 * PE-COFF: Forward exports from DLL's can now be specified in .def files
600 passed directly to ld.
601
602 * Support for the Z80 processor family has been added.
603
604 * Add support for the "@<file>" syntax to the command line, so that extra
605 switches can be read from <file>.
606
607 Changes in 2.16:
608
609 * Support for the R_ARM_V4BX relocation as defined in the ARM AAELF
610 specification has been added via the --fix-v4bx command-line option.
611
612 * New linker script construct AS_NEEDED(), which sets the --as-needed flag
613 for input files listed inside of it.
614
615 * A new command-line option, --sysroot, can be used to override the
616 default sysroot location. It only applies to toolchains that were
617 configured using --with-sysroot.
618
619 * New linker script functions: ORIGIN() and LENGTH() which return information
620 about a specified memory region.
621
622 * Port to MAXQ processor contributed by HCL Tech.
623
624 * Added SEGMENT_START to the linker script language to permit the user to
625 override the base address for a segment from the command-line.
626
627 * ELF: --warn-shared-textrel option to warn if adding a DT_TEXTREL to a shared
628 object.
629
630 * Added SORT_BY_NAME and SORT_BY_ALIGNMENT to the linker script
631 language to permit sorting sections by section name or section
632 maximum alignment.
633
634 * Added a new linker command-line switch, --sort-section name|alignment,
635 to sort sections by section name or maximum alignment.
636
637 * ELF: --add-needed/--no-add-needed options to control if a DT_NEEDED tag
638 should be added when a shared library comes from DT_NEEDED tags.
639
640 * Support for the crx-elf target added.
641
642 * Support for the sh-symbianelf target added.
643
644 * A new linker command-line switch has been added which allows the hash table
645 size to be set to a suitable prime value near to its argument. This switch
646 is --hash-size=<NUMBER>. Also if the switch --reduce-memory-overheads is
647 used, and --hash-size has not been used, then the default value will be set
648 to 1021.
649
650 * Linker map files are now generated with an O(N) algorithm for finding symbols
651 that are defined in each section. This uses about 40% more memory for
652 symbols than the old O(N^2) algorithm. You can use the new
653 --reduce-memory-overheads option to select the old algorithm; this option
654 might also be used in the future to select similar tradeoffs.
655
656 Changes in 2.15:
657
658 * ELF: --as-needed/--no-as-needed options to control if a DT_NEEDED tag should
659 be added only when a shared library is referenced.
660
661 * PE: --large-address-aware option to indicate executables support virtual
662 addresses greater than 2 gigabytes.
663
664 * DWARF 2 support for i386pe added.
665
666 * The linker script operator DEFINED() will now yield 1 only for a symbol that
667 is defined before the statement where DEFINED is used.
668
669 * The MIPS --embedded-relocs (used to embed relocations into binaries for
670 Embedded-PIC code) is deprecated and will be removed in a future release.
671
672 * cr16c support added by NSC.
673
674 * m32r Linux (ELF) support added by Renesas.
675
676 * Improved linker's handling of unresolved symbols. The switch
677 --unresolved-symbols=<method> has been added to tell the linker when it
678 should report them and the switch --warn-unresolved-symbols has been added to
679 make reports be issued as warning messages rather than errors.
680
681 Changes in 2.14:
682
683 * Added support for Xtensa architecture.
684
685 * Added --with-sysroot configure switch to specify a target system root, for
686 linking against a target filesystem image.
687
688 * Added --accept-unknown-linker-format to restore old linker behaviour (pre
689 2.14) of silently accepting and linking in any files in an unknown binary
690 file format.
691
692 * Added --no-omagic to undo the effects of the -N option.
693
694 * Support for Texas Instruments TMS320C4x and TMS320C3x series of
695 DSP's contributed by Michael Hayes and Svein E. Seldal.
696
697 * Added --with-lib-path configure switch to specify default value for
698 LIB_PATH.
699
700 * ARM port to QNX operating system added by Graeme Peterson.
701
702 * IP2K support added by Denis Chertykov.
703
704 Changes in 2.13:
705
706 * Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400
707 and FR500 included.
708
709 Changes in version 2.13:
710
711 * DEC VAX ELF support, by Matt Thomas.
712
713 Changes in version 2.12:
714
715 * Support for Don Knuth's MMIX, by Hans-Peter Nilsson.
716
717 * Support for the OpenRISC 32-bit embedded processor by OpenCores.
718
719 * Support for -z nocopyreloc in the x86 ELF linker, which disables
720 production of copy relocs. Warning: using this option may result in
721 non-sharable applications.
722
723 * Support for -z combreloc in the ELF linker, which puts dynamic
724 relocations against the same symbol together, so that dynamic linker
725 can use an one-entry symbol lookup cache.
726
727 * Support for ELF SHF_MERGE section merging, by Jakub Jelinek.
728
729 Changes in version 2.11:
730
731 * Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
732
733 * Support added for eliminating duplicate DWARF2 debug information by
734 having the compiler generate the information in sections called
735 .gnu.linkonce.wi.XXXX where XXXX is a checksum for the contents. The
736 linker then merges these sections together into the normal .debug_info
737 section.
738
739 * The native ELF linker now searches the directories in DT_RUNPATH or
740 DT_RPATH of a shared library for shared libraries needed by it.
741
742 * TI C54x support, by Timothy Wall.
743
744 * Added command-line switch --section-start to set the start address of any
745 specified section.
746
747 * Added ability to emit full relocation information in linked executables,
748 enabled by --emit-relocs. Some post-linkage optimization tools need
749 this information in order to be able to correctly identify and perform
750 symbol relative addressing in the event of changes in section contents
751 (instructions being added or deleted, extending data sections, etc.)
752
753 * Support for i860, by Jason Eckhardt (preliminary, alpha quality).
754
755 * Support for CRIS (Axis Communications ETRAX series).
756
757 * Support for PDP-11 and 2.11BSD a.out format, by Lars Brinkhoff.
758
759 Changes in version 2.10:
760
761 * Added AT> to the linker script language to allow load-time allocation of
762 sections into regions.
763
764 * Added garbage collection of unused sections, enabled by --gc-sections.
765 It does require a bit of backend support; currently implemented are
766 arm-elf, avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf,
767 mcore-elf, mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf.
768 Others will ignore the option.
769
770 * Added SORT to the linker script language to permit sorting sections by file
771 name or section name.
772
773 * Added EXTERN to the linker script language as an equivalent to the -u
774 command-line option.
775
776 * Added ASSERT to the linker script language.
777
778 * Added EXCLUDE_FILE to the linker script language for further control over
779 wildcard file names.
780
781 * Added -O option to optimize linker output (as of this writing, this only
782 affects ELF shared library generation).
783
784 * The -e option now accepts a number as well as a symbol name.
785
786 * Added --no-undefined option to disallow undefined symbols when creating a
787 shared library.
788
789 * The linker now issues a warning, not an error, for an undefined symbol when
790 using -Bsymbolic; use the new --no-undefined option to get the old
791 behaviour.
792
793 * Added --demangle and --no-demangle options.
794
795 Changes in version 2.9:
796
797 * Added SQUAD to the linker script language.
798
799 * New option --no-warn-mismatch.
800
801 * The MEMORY command now parses the attributes to determine where sections that
802 are not placed in a specific memory region are placed.
803
804 Changes in version 2.8:
805
806 * Linker scripts may now contain shell wildcard characters for file and section
807 names.
808
809 * The linker now supports symbol versions in ELF.
810
811 * The NOCROSSREFS command was added to the linker script language.
812
813 * The LOADADDR expression was added to the linker script language.
814
815 * MAX and MIN functions were added to the linker script language.
816
817 * The OVERLAY construct was added to the linker script language.
818
819 * New option --warn-section-align to warn when the address of an output section
820 changes due to alignment of an input section.
821
822 * New options --filter/-F and --auxiliary/-f.
823
824 Changes in version 2.7:
825
826 * New option --cref to print out a cross reference table.
827
828 * New option --wrap SYMBOL.
829
830 * New option --no-whole-archive, to turn off the effect of --whole-archive.
831
832 * Input sections assigned to the output section /DISCARD/ in the linker script
833 are not included in the output file.
834
835 * The SunOS and ELF linkers now merge stabs debugging information which uses
836 the N_BINCL and N_EINCL stab types. This reduces the amount of debugging
837 information generated.
838
839 Changes in version 2.6:
840
841 * When an ELF section name is representable as a C identifier (this is not true
842 of most ELF section names), the linker will automatically define symbols
843 __start_SECNAME and __stop_SECNAME, where SECNAME is the section name, at the
844 beginning and the end of the section. This is used by glibc.
845
846 Addendum: Current versions of the linker (at least for version 2.18 onwards
847 and possibly much earlier as well) place two restrictions on this feature: The
848 symbols are only implemented for orphaned sections, not for explicitly placed
849 sections and they are PROVIDEd rather than being defined.
850
851 * When an ELF section named .gnu.warning is encountered in an input file, the
852 contents of the section are displayed as an error message, and the section is
853 not copied into the output file. This is used by glibc.
854
855 * When an ELF section named .gnu.warning.SYMBOL is encountered in an input
856 file, and the symbol SYMBOL is referenced by some object file, the contents of
857 the section are displayed as an error message. The section is not copied into
858 the output file, unless doing a relocatable or shared link. This is used by
859 glibc.
860
861 * New options -split-by-reloc and -split-by-file.
862
863 * The linker now supports linking PIC compiled code on SPARC SunOS. It can
864 also create SPARC SunOS shared libraries, and, like the native SunOS linker,
865 will do so whenever there is an undefined symbol in the link and neither the -e
866 nor the -r option was used.
867
868 * The -rpath option may be used on SunOS to set the list of directories to be
869 searched at run time. This overrides the default of building the list from the
870 -L options.
871
872 * The COFF linker now combines debugging information for structs, unions, and
873 enums, so that even if the same type is defined in multiple input files it will
874 only be defined once in the output file. The --traditional-format switch will
875 prevent this optimization.
876
877 Changes in version 2.5:
878
879 * The linker now supports linking against SunOS shared libraries. It still can
880 not link SunOS PIC (Position Independent Code) files, so it can not be used to
881 generate shared libraries.
882
883 * The linker now supports linking against ELF shared libraries for the i386
884 (UnixWare) and SPARC (Solaris). It can also link ELF PIC files, and can be
885 used to generate shared libraries. Shared library generation is not well
886 tested; please report any problems encountered. The linker is now enabled for
887 Solaris again.
888
889 * Eric Youngdale has contributed Linux support code, including linking against
890 Linux a.out shared libraries. The linker produces Linux QMAGIC binaries.
891
892 * The ELF backend has been converted to the new linker code. To use the new
893 ELF linker, each particular target requires a relocation function. So far,
894 this function has been written for i386 (UnixWare), SPARC (Solaris) MIPS (Irix
895 5), and HPPA ELF targets.
896
897 * The -( (--start-group) and -) (--end-group) options have been added to
898 support searching a group of archives as though they were a single archive.
899 This can also be used in a linker script, as GROUP ( files ).
900
901 * When a file is named on the command line, and the linker does not recognize
902 it as an object file, the linker will now treat the file as a linker script
903 file. A linker script named in this way augments, but does not replace, the
904 default linker script.
905
906 * The -warn-once option was added. It causes the linker to only warn once per
907 undefined symbol, rather than once per reference.
908
909 * The COFF backend has been converted to the new linker code. As with ELF, to
910 use the new linker, each particular target requires a relocation function. So
911 far, this function has been written for the i386, m68k, a29k and SH targets.
912
913 * The -V flag was made a synonym for -v, for SVR4 compatibility. The old -V
914 behaviour is available via --verbose.
915
916 Changes in version 2.4:
917
918 * New linker code, by Steve Chamberlain and Ian Taylor. For a.out and ecoff
919 formats (so far), this should result in considerable savings in time
920 and memory used while linking; slightly poorer performance than
921 before for formats not converted yet.
922
923 * Command-line parsing is no longer done with flex. This means
924 oddball characters in filenames won't get treated as argument
925 separators.
926
927 * HP-PA ELF support, by Jeff Law. (No SOM support yet.)
928
929 * Mach i386 support, by David Mackenzie.
930
931 * Irix 4 shared libraries are now supported (Irix 5 uses ELF, and ELF shared
932 libraries are not yet supported).
933
934 * COFF shared libraries (as on SCO) should work as well.
935
936 * The linker is disabled for Solaris. (Actually, it was in 2.3 also, I just
937 forgot to note it.) Some of their C library routines don't work when
938 statically linked, and the GNU linker doesn't support dynamic linking yet.
939
940 Changes in version 2.3:
941
942 * Weak symbols are now supported.
943
944 * ELF support has been added. The linker has been bootstrapped on
945 UnixWare and Solaris.
946
947 * Alpha OSF/1 support has been added (non dynamic linking only).
948
949 Changes in version 2.2:
950
951 * The `bfd' library has been updated to reduce a.out-format string
952 table size. The effect of this is that files linked from many input
953 files with duplicate symbols (`-g' debugging records, or identical
954 static symbols) should be much smaller.
955
956 Changes in version 2.1:
957
958 * The ld -ySYMBOL flag (to trace references to SYMBOL) is now implemented.
959
960 * There is now support for writing ECOFF files, so ld and the
961 other utilities should work on Risc/Ultrix and Irix.
962
963 \f
964 Copyright (C) 2012-2023 Free Software Foundation, Inc.
965
966 Copying and distribution of this file, with or without modification,
967 are permitted in any medium without royalty provided the copyright
968 notice and this notice are preserved.
969
970 Local variables:
971 fill-column: 79
972 End: