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