3 * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run pcrel-lo-addend test.
4 * testsuite/ld-riscv-elf/pcrel-lo-addend.d: New.
5 * testsuite/ld-riscv-elf/pcrel-lo-addend.s: New.
10 * testsuite/ld-i386/i386.exp: Run PR ld/22842 tests.
11 * testsuite/ld-x86-64/x86-64.exp: Likewise.
12 * testsuite/ld-i386/pr22842a.c: New file.
13 * testsuite/ld-i386/pr22842b.S: Likewise.
14 * testsuite/ld-x86-64/pr22842a.c: Likewise.
15 * testsuite/ld-x86-64/pr22842a.rd: Likewise.
16 * testsuite/ld-x86-64/pr22842b.S: Likewise.
17 * testsuite/ld-x86-64/pr22842b.rd: Likewise.
21 * ldlex.h (ldlex_command): Remove prototype.
25 * testsuite/ld-x86-64/x86-64.exp: Replace pr22393-2a.so and
26 pr22393-2a-now.so with pr22393-3a.so and pr22393-3a-now.so.
31 * testsuite/ld-elf/pr22836-1.s: New file.
32 * testsuite/ld-elf/pr22836-1a.d: Likewise.
33 * testsuite/ld-elf/pr22836-1b.d: Likewise.
38 * testsuite/ld-x86-64/mpx1c.rd: Updated.
39 * testsuite/ld-x86-64/pr22791-1.err: New file.
40 * testsuite/ld-x86-64/pr22791-1a.c: Likewise.
41 * testsuite/ld-x86-64/pr22791-1b.s: Likewise.
42 * testsuite/ld-x86-64/pr22791-2.rd: Likewise.
43 * testsuite/ld-x86-64/pr22791-2a.s: Likewise.
44 * testsuite/ld-x86-64/pr22791-2b.c: Likewise.
45 * testsuite/ld-x86-64/pr22791-2c.s: Likewise.
46 * testsuite/ld-x86-64/x86-64.exp: Run PR ld/22791 tests.
51 * testsuite/ld-elf/pr22836-2.d,
52 * testsuite/ld-elf/pr22836-2.s: New test.
56 * testsuite/ld-x86-64/pr14207.d: Adjust relro p_filesz.
61 * emultempl/ppc32elf.em: Remove --speculate-indirect-jumps support.
62 * emultempl/ppc64elf.em: Likesize
63 * ld.texinfo: Likewise
64 * testsuite/ld-powerpc/elfv2exe.d,
65 * testsuite/ld-powerpc/elfv2so.d,
66 * testsuite/ld-powerpc/relbrlt.d,
67 * testsuite/ld-powerpc/powerpc.exp: Likewise.
71 * testsuite/ld-elf/tls.exp (AFLAGS_PIC): Define on SPARC.
72 (pr22263-1): Pass AFLAGS_PIC to the assembler.
73 * testsuite/ld-sparc/tlspie32.s: Add test for other 3 transitions.
74 * testsuite/ld-sparc/tlspie32.dd: Adjust to above.
75 * testsuite/ld-sparc/tlspie64.s: Add test for other 3 transitions.
76 * testsuite/ld-sparc/tlspie64.dd: Adjust to above.
81 * testsuite/ld-aarch64/emit-relocs-258.s: Define symbol as an address.
82 * testsuite/ld-aarch64/emit-relocs-259.s: Likewise.
83 * testsuite/ld-aarch64/pr22764.s: New.
84 * testsuite/ld-aarch64/pr22764.d: New.
89 * testsuite/ld-i386/discarded1.s: Replace mov with div.
90 * testsuite/ld-x86-64/discarded1.s: Likewise.
91 * testsuite/ld-i386/i386.exp: Run pr22782.
92 * testsuite/ld-i386/load1-nacl.d: Updated for removing
93 _GLOBAL_OFFSET_TABLE_ from output.
94 * testsuite/ld-i386/load1.d: Likewise.
95 * testsuite/ld-x86-64/load1a-nacl.d: Likewise.
96 * testsuite/ld-x86-64/load1a.d: Likewise.
97 * testsuite/ld-x86-64/load1b-nacl.d: Likewise.
98 * testsuite/ld-x86-64/load1b.d: Likewise.
99 * testsuite/ld-i386/pr22782.d: New file.
100 * testsuite/ld-i386/pr22782.s: Likewise.
101 * testsuite/ld-x86-64/pr22782.s: Likewise.
102 * testsuite/ld-x86-64/pr22782a.d: Likewise.
103 * testsuite/ld-x86-64/pr22782b.d: Likewise.
104 * testsuite/ld-x86-64/x86-64.exp: Run pr22782a and pr22782b.
108 * po/pt_BR.po: Updated Brazilian Portuguese translation.
112 * testsuite/ld-i386/lea1d.d: Replace -Sw with -SW.
113 * testsuite/ld-i386/lea1e.d: Likewise.
114 * testsuite/ld-i386/lea1f.d: Likewise.
115 * testsuite/ld-x86-64/lea1g.d: Likewise.
116 * testsuite/ld-x86-64/lea1h.d: Likewise.
117 * testsuite/ld-x86-64/lea1i.d: Likewise.
118 * testsuite/ld-x86-64/lea1j.d: Likewise.
119 * testsuite/ld-x86-64/lea1k.d: Likewise.
120 * testsuite/ld-x86-64/lea1l.d: Likewise.
125 * scripttempl/pe.sc: Remove PROVIDE()s from __CTOR_LIST__ and
126 __DTOR_LIST__ symbols. Add a comment explaining why this is
128 * scripttemp/pep.sc: Likewise.
129 * ld.texinfo (PROVIDE): Add a note about the effect of common
134 * emulparams/nios2elf.sh (GENERATE_SHLIB_SCRIPT): Don't set.
138 * testsuite/ld-elf/shared.exp: Add $AFLAGS_PIC throughout to PIC
139 assembly builds where missing and remove `tic6x-*-*' XFAIL
140 markings accordingly.
144 * ldexp.c (fold_name, exp_fold_tree_1): Avoid pointer arithmetic
149 * testsuite/ld-elf/pr21964-5.c (my_var): Mark as used.
153 * testsuite/ld-elf/shared.exp: Fix a typo s/scrip/script/.
157 * testsuite/ld-elf/comm-data.exp: Pass `-call_shared' to links
158 involving a shared library for `mips*vr4100*-*-elf*',
159 `mips*vr4300*-*-elf*' and `mips*vr5000*-*-elf*' targets.
160 * testsuite/ld-elf/provide-hidden.exp: Likewise.
161 * testsuite/ld-elf/shared.exp: Likewise.
162 * testsuite/ld-gc/gc.exp: Likewise.
163 * testsuite/ld-mips-elf/comm-data.exp: Likewise.
167 * testsuite/ld-elf/elf.exp: Move shared library tests over to...
168 * testsuite/ld-elf/shared.exp: ... here.
172 * testsuite/ld-elf/pr21964-5.c: New test.
173 * testsuite/ld-elf/shared.exp: Run it.
178 * testsuite/ld-elf/pr21964-4.c: New file.
179 * testsuite/ld-elf/shared.exp: Run pr21964-4 test on Linux.
183 * testsuite/ld-gc/stop.d,
184 * testsuite/ld-gc/stop.s: New test.
185 * testsuite/ld-gc/gc.exp: Run it.
190 * testsuite/ld-elf/pr22649-2ab-mips.msg: New stderr output.
191 * testsuite/ld-elf/pr22649-2cd-mips.msg: New stderr output.
192 * testsuite/ld-elf/shared.exp: Use the new outputs with
197 * testsuite/ld-elf/comm-data1.sd: Alternatively accept
198 `PRC[0xff02]' in place of a regular section index.
199 * testsuite/ld-elf/pr21703-shared.sd: Likewise `PRC[0xff01]'.
203 * testsuite/ld-elf/pr21964-3a.c: New file.
204 * testsuite/ld-elf/pr21964-3c.c: New file.
205 * testsuite/ld-elf/shared.exp: Run new __start/__stop testcase.
209 * testsuite/ld-elf/shared.exp (AFLAGS_PIC): Define on SPARC.
210 (pr22269-1): Pass AFLAGS_PIC to the assembler.
214 * testsuite/ld-elf/pr22450.d: Remove reference to SPARC64.
218 * testsuite/ld-mips-elf/comm-data.exp: Correct support for
219 targets using non-traditional MIPS emulation or having a limited
220 selection of ABIs available. Don't force big endianness, use
226 * testsuite/config/default.exp (STATIC_LDFLAGS): New. Set to
227 "-static" if target compiler supports it.
228 * testsuite/ld-bootstrap/bootstrap.exp: Skip static executable
229 tests if target compiler doesn't support it.
230 * testsuite/ld-ifunc/ifunc.exp: Likewise.
231 * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Likewise.
232 (run_cc_link_tests): Likewise.
237 * testsuite/config/default.exp (INT128_CFLAGS): New.
238 * testsuite/ld-plugin/lto.exp (INT128_CFLAGS): New.
240 * testsuite/ld-plugin/pr22751.c: New file.
241 * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Add
247 * ldlang.c (find_rescan_insertion): Look past bfds with claim_archive
252 * emulparams/elf32mipswindiss.sh (EXTRA_EM_FILE): Set to
257 * testsuite/ld-sparc/sparc.exp (32-bit: Helper shared library):
258 Link with a version script.
259 (32-bit: TLS -fpie): New test.
260 (64-bit: Helper shared library): Link with a version script.
261 (64-bit: TLS -fpie): New test.
262 (64-bit: GOTDATA relocations): Pass -Av9 to the assembler.
263 * testsuite/ld-sparc/tlslib.ver: New file.
264 * testsuite/ld-sparc/tlspie32.dd: Likewise.
265 * testsuite/ld-sparc/tlspie32.s: Likewise.
266 * testsuite/ld-sparc/tlspie64.dd: Likewise.
267 * testsuite/ld-sparc/tlspie64.s: Likewise.
268 * testsuite/ld-sparc/tlssunbin32.dd: Adjust for versioned symbol.
269 * testsuite/ld-sparc/tlssunbin32.rd: Likewise.
270 * testsuite/ld-sparc/tlssunbin32.sd: Likewise.
271 * testsuite/ld-sparc/tlssunbin64.dd: Likewise.
272 * testsuite/ld-sparc/tlssunbin64.rd: Likewise.
273 * testsuite/ld-sparc/tlssunbin64.sd: Likewise.
277 * testsuite/ld-aarch64/aarch64-elf.exp: Run new testes.
278 * testsuite/ld-aarch64/emit-relocs-287.s: Fix test case.
279 * testsuite/ld-aarch64/emit-relocs-287.d: Fix expected output.
280 * testsuite/ld-aarch64/emit-relocs-287-overflow.s: New.
281 * testsuite/ld-aarch64/emit-relocs-287-overflow.d: New.
282 * testsuite/ld-aarch64/emit-relocs-288.d: New.
283 * testsuite/ld-aarch64/emit-relocs-288.s: New.
284 * testsuite/ld-aarch64/emit-relocs-289.d: New.
285 * testsuite/ld-aarch64/emit-relocs-289.s: New.
286 * testsuite/ld-aarch64/emit-relocs-289-overflow.s: New.
287 * testsuite/ld-aarch64/emit-relocs-289-overflow.d: New.
288 * testsuite/ld-aarch64/emit-relocs-290.d: New.
289 * testsuite/ld-aarch64/emit-relocs-290.s: New.
290 * testsuite/ld-aarch64/emit-relocs-291.d: New.
291 * testsuite/ld-aarch64/emit-relocs-291.s: New.
292 * testsuite/ld-aarch64/emit-relocs-291-overflow.s: New.
293 * testsuite/ld-aarch64/emit-relocs-291-overflow.d: New.
294 * testsuite/ld-aarch64/emit-relocs-292.d: New.
295 * testsuite/ld-aarch64/emit-relocs-292.s: New.
296 * testsuite/ld-aarch64/emit-relocs-293.d: New.
297 * testsuite/ld-aarch64/emit-relocs-293.s: New.
302 * testsuite/ld-plugin/lto.exp: Run PR ld/22721 tests.
303 * testsuite/ld-plugin/pr22721.t: New file.
304 * testsuite/ld-plugin/pr22721a.s: Likewise.
305 * testsuite/ld-plugin/pr22721b.c: Likewise.
309 * testsuite/ld-elf/group1.d: Also xfail Solaris.
313 * testsuite/ld-elf/linkinfo1a.d: Updated for slightly different
314 PLT/GOT order/layout for Solaris/x86 targets.
315 * testsuite/ld-elf/linkinfo1b.d: Likewise.
320 * emultempl/solaris2.em (elf_solaris2_after_allocation): Fold
322 (elf_solaris2_before_allocation): This.
323 (LDEMUL_AFTER_ALLOCATION): Removed.
327 * emultempl/ppc32elf.em: Support optional --plt-align arg.
328 * emultempl/ppc64elf.em: Support negative --plt-align arg.
332 * emultempl/ppc32elf.em (params): Init new field.
333 (OPTION_SPECULATE_INDIRECT_JUMPS): Define.
334 (OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define.
335 (PARSE_AND_LIST_LONGOPTS): Handle new options.
336 (PARSE_AND_LIST_ARGS_CASES): Likewise.
337 (PARSE_AND_LIST_OPTIONS): Likewise.
338 * emultempl/ppc64elf.em (params): Init new field.
339 (OPTION_SPECULATE_INDIRECT_JUMPS): Define.
340 (OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define.
341 (PARSE_AND_LIST_LONGOPTS): Handle --speculate-indirect-jumps.
342 (PARSE_AND_LIST_OPTIONS): Likewise.
343 (PARSE_AND_LIST_ARGS_CASES): Likewise.
344 * ld.texinfo (--no-plt-thread-safe): Correct itemx.
345 (--speculate-indirect-jumps): Document.
346 * testsuite/ld-powerpc/elfv2exe.d,
347 * testsuite/ld-powerpc/elfv2so.d,
348 * testsuite/ld-powerpc/relbrlt.d,
349 * testsuite/ld-powerpc/powerpc.exp: Disable plt alignment and
350 speculation barriers on various tests.
354 * emultempl/ppc32elf.em (params): Init new field.
355 (enum ppc32_opt): New enum to define OPTION_* values. Add
356 OPTION_PLT_ALIGN and OPTION_NO_PLT_ALIGN.
357 (PARSE_AND_LIST_LONGOPTS): Handle new options.
358 (PARSE_AND_LIST_ARGS_CASES): Likewise.
359 (PARSE_AND_LIST_OPTIONS): Likewise. Break up help output.
360 * emultempl/ppc64elf.em (ppc_add_stub_section): Init alignment
361 correctly for negative --plt-stub-align.
362 * testsuite/ld-powerpc/elfv2exe.d,
363 * testsuite/ld-powerpc/elfv2so.d,
364 * testsuite/ld-powerpc/relbrlt.d,
365 * testsuite/ld-powerpc/relbrlt.s,
366 * testsuite/ld-powerpc/tlsexe.d,
367 * testsuite/ld-powerpc/tlsexe.r,
368 * testsuite/ld-powerpc/tlsexe32.d,
369 * testsuite/ld-powerpc/tlsexe32.g,
370 * testsuite/ld-powerpc/tlsexe32.r,
371 * testsuite/ld-powerpc/tlsexetoc.d,
372 * testsuite/ld-powerpc/tlsexetoc.r,
373 * testsuite/ld-powerpc/tlsopt5_32.d,
374 * testsuite/ld-powerpc/tlsso.d,
375 * testsuite/ld-powerpc/tlstocso.d: Update for changed stub order.
379 * po/pt_BR.po: Updated Brazilian Portuguese translation.
383 * po/uk.po: Updated Ukranian translation.
387 * po/ld.pot: Regenerated.
391 * configure: Regenerate.
396 * NEWS: Add marker for 2.30.
400 * testsuite/ld-elf/elf.exp: xfail "pr22374 function pointer
401 initialization" for currently failing targets.
406 * testsuite/ld-elf/pr22649.msg: Allow other messages.
407 * testsuite/ld-elf/shared.exp: Check that --gc-sections is
408 supported before running ld/22649 tests.
412 * emultempl/elf32.em (_handle_option): Add support for "-z undefs"
413 as the opposite of "-z defs".
414 * ld.texinfo: Document the new option. Update the description of
415 the -z defs option to make it clear that it does generate an error
416 if an undefined symbol reference is found in an object file whilst
417 creating a shared library.
418 * NEWS: Document this new feature.
422 * testsuite/ld-elf/pr22393-2a.rd: Replace "-z textonly" with
424 * testsuite/ld-elf/pr22393-2b.rd: Likewise.
425 * testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
426 * testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
431 * testsuite/ld-x86-64/pr22393-3a.c: New file.
432 * testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
433 * testsuite/ld-x86-64/pr22393-3b.c: Likewise.
434 * testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
435 * testsuite/ld-x86-64/x86-64.exp: Run tests for -z separate-code
436 -z max-page-size=0x1000.
441 * testsuite/ld-elf/pr16322.d: Add -z noseparate-code.
442 * testsuite/ld-elf/pr22393-1.s: New file.
443 * testsuite/ld-elf/pr22393-1a.d: Likewise.
444 * testsuite/ld-elf/pr22393-1b.d: Likewise.
445 * testsuite/ld-elf/pr22393-1c.d: Likewise.
446 * testsuite/ld-elf/pr22393-1d.d: Likewise.
447 * testsuite/ld-elf/pr22393-1e.d: Likewise.
448 * testsuite/ld-elf/pr22393-1f.d: Likewise.
449 * testsuite/ld-elf/pr22393-2a.c: Likewise.
450 * testsuite/ld-elf/pr22393-2a.rd: Likewise.
451 * testsuite/ld-elf/pr22393-2b.c: Likewise.
452 * testsuite/ld-elf/pr22393-2b.rd: Likewise.
453 * testsuite/ld-elf/shared.exp: Run tests for -z separate-code.
458 * NEWS: Mention "-z separate-code".
459 * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Get
460 builtin linker scripts and return linker scripts from disk for
462 (gld${EMULATION_NAME}_handle_option): Handle "-z separate-code"
463 and "-z noseparate-code".
464 * genscripts.sh: Generate linker scripts for "-z separate-code".
465 (LD_FLAG): Set to *textonly for "-z separate-code".
466 * ld.texinfo: Document "-z separate-code".
467 * lexsup.c (elf_shlib_list_options): Add linker help messsages
468 for "-z separate-code" and "-z noseparate-code".
469 * scripttempl/elf.sc (SEPARATE_TEXT): New
470 (TEXT_SEGMENT_ALIGN): Likewise.
471 Use ${TEXT_SEGMENT_ALIGN} to align and pad text segment to
477 * testsuite/ld-elf/pr22649-1.s: New file.
478 * testsuite/ld-elf/pr22649-2a.s: Likewise.
479 * testsuite/ld-elf/pr22649-2b.s: Likewise.
480 * testsuite/ld-elf/pr22649.msg: Likewise.
481 * testsuite/ld-elf/shared.exp: Run ld/22649 tests.
486 * scripttempl/elf.sc (PREINIT_ARRAY): New.
487 Don't add .preinit_array for ld -r.
488 * testsuite/ld-elf/pr22677.d: New file.
489 * testsuite/ld-elf/pr22677.s: Likewise.
493 * ldexp.h (union etree_union): Remove defsym field.
494 * ldexp.c (exp_assop): Remove defsym parameter, and use of defsym
496 (exp_assign): Remove passing of defsym parameter.
497 (exp_defsym): Likewise.
498 (exp_provide): Likewise.
502 * ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
503 nodes are ignored in the tree walk, and move the location at which
504 we change provide nodes into provided nodes.
505 (exp_init_os): Add etree_provided.
506 * testsuite/ld-scripts/provide-6.d: New file.
507 * testsuite/ld-scripts/provide-6.t: New file.
508 * testsuite/ld-scripts/provide-7.d: New file.
509 * testsuite/ld-scripts/provide-7.t: New file.
510 * testsuite/ld-scripts/provide-8.d: New file.
511 * testsuite/ld-scripts/provide-8.t: New file.
515 * testsuite/ld-scripts/provide-3.d: Add xfail directive.
516 * testsuite/ld-scripts/provide-4.d: Use new map file name.
517 * testsuite/ld-scripts/provide-5.d: Use new map file name.
518 * testsuite/ld-scripts/provide-4-map.d: Renamed to...
519 * testsuite/ld-scripts/provide-4.map: ...this.
520 * testsuite/ld-scripts/provide-5-map.d: Renamed to...
521 * testsuite/ld-scripts/provide-5.map: ...this.
522 * testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
523 file, and run tests in a loop.
527 * ldexp.c (exp_print_tree): Use '=' instead of ',' when printing
529 * testsuite/ld-scripts/provide-4.map: Update expected output.
530 * testsuite/ld-scripts/provide-5.map: Likewise.
535 * scripttempl/elf.sc: Fix the order of SHLIB_RODATA_ADDR.
539 * testsuite/ld-elf/eh-frame-hdr.d (#xfail): Delete
540 (#alltargets): Renamed from #target. Add shared.
541 * testsuite/lib/ld-lib.exp (run_dump_test): Document shared target.
542 Document alltargets option. Add support for alltargets option.
543 (istarget): Add support for shared target.
547 * testsuite/ld-riscv-elf/c-lui.d: Don't use -shared. Check for _start
549 * testsuite/ld-riscv-elf/c-lui.s: Add _start label.
550 * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Before __global_pointer$
551 tests, add call to check_shared_lib_support.
555 * testsuite/ld-riscv-elf/disas-jalr.d: New.
556 * testsuite/ld-riscv-elf/disas-jalr.s: New.
557 * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run new testcase.
559 * emulparams/elf32lriscv-defs.sh (GENERATE_SHLIB_SCRIPT): Move inside
560 case on $target, and don't set for riscv*-elf targets.
561 (GENERATE_PIE_SCRIPT): Likewise.
565 Update year range in copyright notice of all files.
567 For older changes see ChangeLog-2017
569 Copyright (C) 2018 Free Software Foundation, Inc.
571 Copying and distribution of this file, with or without modification,
572 are permitted in any medium without royalty provided the copyright
573 notice and this notice are preserved.
579 version-control: never