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