4 * plugin.c (is_visible_from_outside): Symbol may be visible
5 from outside if dynamic_ref_after_ir_def is set.
6 (plugin_notice): Set dynamic_ref_after_ir_def if the symbol is
7 defined in an IR object and referenced in a dynamic object.
8 * testsuite/ld-plugin/lto.exp: Run PR ld/21382 tests.
9 * testsuite/ld-plugin/pr21382a.c: New file.
10 * testsuite/ld-plugin/pr21382b.c: Likewise.
15 * testsuite/ld-ifunc/ifunc.exp: Add a libtest-2-now.so test with
20 * ld.texinfo (dynamic-undefined-weak): Document.
21 (nodynamic-undefined-weak): Document that this option now can
22 be used with shared libs.
23 * emulparams/dynamic_undefined_weak.sh: Support -z
24 dynamic-undefined-weak.
25 * emulparams/elf32ppccommon.sh: Include dynamic_undefined_weak.sh.
26 * testsuite/ld-undefined/weak-undef.exp (undef_weak_so),
27 (undef_weak_exe): New. Use them. Add -z dynamic-undefined-weak
28 and -z nodynamic-undefined-weak tests.
29 * Makefile.am: Update powerpc dependencies.
30 * Makefile.in: Regenerate.
35 * testsuite/ld-elf/pr21389.map: New file.
36 * testsuite/ld-elf/pr21389.s: Likewise.
37 * testsuite/ld-elf/pr21389a.d: Likewise.
38 * testsuite/ld-elf/pr21389b.d: Likewise.
39 * testsuite/ld-elf/pr21389c.d: Likewise.
43 * testsuite/ld-elf/indirect5a.c,
44 * testsuite/ld-elf/indirect5b.c,
45 * testsuite/ld-elf/indirect5.map,
46 * testsuite/ld-elf/indirect5.out: New test.
47 * testsuite/ld-elf/indirect6a.c: Likewise.
48 * testsuite/ld-elf/indirect.exp (check_dynamic_syms): New proc.
49 Run new tests and check dynsyms.
55 * emultempl/pe.em (pe_find_data_imports): Don't use fixed size
56 symbol buffer. Instead, xmalloc max size needed with space for
57 prefix. Wrap overlong lines. Formatting. Pass symbol buffer
58 copy of name to pe_walk_relocs_of_symbol.
59 (make_inport_fixup): Add "name" param, pass to pe_create_import_fixup.
60 * emultempl/pe.em (pep_find_data_imports): As for pe_find_data_imports.
61 (make_import_fixup): Add "name" param, pass to pep_create_import_fixup.
62 Use bfd_get_signed_* and remove unnecessary casts. Formatting.
63 * pe-dll.c (pe_walk_relocs_of_symbol): Add "name" param. Pass to
65 (make_import_fixup_mark): Add "name" param. Make use of prefix
66 space rather than xmalloc here.
67 (pe_create_import_fixup): Likewise.
68 * pe-dll.h (pe_walk_relocs_of_symbol): Update prototype.
69 (pe_create_import_fixup): Likewise.
70 * pep-dll.h (pep_walk_relocs_of_symbol): Likewise.
71 (pep_create_import_fixup): Likewise.
75 * ld.texinfo (--strip-discarded): Document.
76 (--embedded-relocs): Document.
77 (--spare-dynamic-tags): Document.
78 (--task-link): Document.
83 * testsuite/ld-elf/init-fini-arrays.d: Match INIT_ARRAY and FINI_ARRAY.
84 * testsuite/ld-elf/init-fini-arrays.s: Use %init_array and %fini_array
86 * testsuite/lib/ld-lib.exp (default_ld_compile): Trim assembler
87 warnings about "ignoring incorrect section type".
88 (run_ld_link_exec_tests, run_cc_link_tests): Delete old comment.
92 * testsuite/ld-elfvsb/elfvsb.exp (visibility_run): Delete
93 sh1p.o, sh2p.o, sh1np.o and sh2np.o before compiling. Use
94 remote_file host exists rather than file exists.
99 * testsuite/ld-x86-64/x86-64.exp (undefined_weak): Use
100 NOPIE_CFLAGS and NOPIE_LDFLAGS to disable PIE for the non-pie
107 * testsuite/ld-elf/pr19579a.c (main): Updated.
112 * testsuite/ld-x86-64/x86-64.exp (undefined_weak): Explicitly
113 disable PIE for the non-pie version of the test.
117 * testsuite/ld-elf/mbind2a.s: Don't use @, the ARM comment char.
119 2017-04-07 gingold <gingold@gingold-Precision-7510>
121 * testsuite/ld-pe/pe.exp: New test.
122 * testsuite/ld-pe/weakdef-1.s: New test source.
123 * testsuite/ld-pe/weakdef-1.d: New test.
127 * testsuite/ld-elf/mbind1a.d: Remove matches for PT_LOAD segments.
128 * testsuite/ld-elf/mbind1b.d: Likewise.
129 * testsuite/ld-elf/mbind1c.d: Likewise.
134 * testsuite/ld-elf/shared.exp: Change xfails to kfails and fix
135 indentation issue introduced with last commit.
140 * testsuite/ld-elf/shared.exp: Xfail all PR21233 tests but the
141 first test for cris*-*-*.
146 * ldlang.c (insert_undefined): Set `mark' for ELF symbols.
147 * testsuite/ld-elf/pr21233.sd: New test.
148 * testsuite/ld-elf/pr21233-l.sd: New test.
149 * testsuite/ld-elf/pr21233.ld: New test linker script.
150 * testsuite/ld-elf/pr21233-e.ld: New test linker script.
151 * testsuite/ld-elf/pr21233.s: New test source.
152 * testsuite/ld-elf/pr21233-l.s: New test source.
153 * testsuite/ld-elf/shared.exp: Run the new tests.
157 * NEWS: Mention support for ELF SHF_GNU_MBIND and
159 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
160 input GNU_MBIND sections with the same type, attributes and
161 sh_info field into a single output GNU_MBIND section.
162 * testsuite/ld-elf/elf.exp: Run mbind2a and mbind2b.
163 * testsuite/ld-elf/mbind1.s: New file.
164 * testsuite/ld-elf/mbind1a.d: Likewise.
165 * testsuite/ld-elf/mbind1b.d: Likewise.
166 * testsuite/ld-elf/mbind1c.d: Likewise.
167 * testsuite/ld-elf/mbind2a.s: Likewise.
168 * testsuite/ld-elf/mbind2b.c: Likewise.
172 * NEWS: Mention support for ELF GNU program properties.
173 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
174 ELF setup_gnu_properties.
175 * testsuite/ld-i386/i386.exp: Run property tests for Linux/i386.
176 * testsuite/ld-i386/pass.c: New file.
177 * testsuite/ld-i386/property-1.r: Likewise.
178 * testsuite/ld-i386/property-2.r: Likewise.
179 * testsuite/ld-i386/property-3.r: Likewise.
180 * testsuite/ld-i386/property-4.r: Likewise.
181 * testsuite/ld-i386/property-5.r: Likewise.
182 * testsuite/ld-i386/property-6.r: Likewise.
183 * testsuite/ld-i386/property-6a.c: Likewise.
184 * testsuite/ld-i386/property-6b.c: Likewise.
185 * testsuite/ld-i386/property-6c.S: Likewise.
186 * testsuite/ld-i386/property-7.r: Likewise.
187 * testsuite/ld-i386/property-no-copy.S: Likewise.
188 * testsuite/ld-i386/property-stack.S: Likewise.
189 * testsuite/ld-i386/property-unsorted-1.S: Likewise.
190 * testsuite/ld-i386/property-unsorted-2.S: Likewise.
191 * testsuite/ld-i386/property-x86-1.S: Likewise.
192 * testsuite/ld-i386/property-x86-2.S: Likewise.
193 * testsuite/ld-x86-64/pass.c: Likewise.
194 * testsuite/ld-x86-64/property-1.r: Likewise.
195 * testsuite/ld-x86-64/property-2.r: Likewise.
196 * testsuite/ld-x86-64/property-3.r: Likewise.
197 * testsuite/ld-x86-64/property-4.r: Likewise.
198 * testsuite/ld-x86-64/property-5.r: Likewise.
199 * testsuite/ld-x86-64/property-6.r: Likewise.
200 * testsuite/ld-x86-64/property-6a.c: Likewise.
201 * testsuite/ld-x86-64/property-6b.c: Likewise.
202 * testsuite/ld-x86-64/property-6c.S: Likewise.
203 * testsuite/ld-x86-64/property-7.r: Likewise.
204 * testsuite/ld-x86-64/property-no-copy.S: Likewise.
205 * testsuite/ld-x86-64/property-stack.S: Likewise.
206 * testsuite/ld-x86-64/property-unsorted-1.S: Likewise.
207 * testsuite/ld-x86-64/property-unsorted-2.S: Likewise.
208 * testsuite/ld-x86-64/property-x86-1.S: Likewise.
209 * testsuite/ld-x86-64/property-x86-2.S: Likewise.
210 * testsuite/ld-x86-64/x86-64.exp: Run property tests for
216 * testsuite/ld-cris/pr16044.d, testsuite/ld-cris/dso-1c.s,
217 testsuite/ld-cris/dso-2b.s, testsuite/ld-cris/dso-4.s: New test.
221 * testsuite/lib/ld-lib.exp (check_shared_lib_support): Return
222 false for nios2-*-elf.
224 2017-03-21 gingold <gingold@gingold-Precision-7510>
226 * ldlang.c (lang_check_section_addresses): Check only for
231 * testsuite/ld-elf/sec64k.exp: Don't run on h8300 and ip2k.
235 * testsuite/ld-checks/checks.exp (overflow_check): Disable for
240 * ldlang.c (lang_check_section_addresses): Use addr_mask to
246 * testsuite/ld-aarch64/ifunc-5r-local.d: Update regexp.
250 * ldlang.c (lang_check_section_addresses): Check for address space
252 * testsuite/ld-checks/checks.exp (overflow_check): New procedure
253 * testsuite/ld-checks/over.s: New test source.
254 * testsuite/ld-checks/over.d: New test.
255 * testsuite/ld-checks/over2.s: New test source.
256 * testsuite/ld-checks/over2.d: New test.
260 * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Set from target
265 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Add
266 sysroot for -rpath search.
270 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Rewrite.
271 Only prefix absolute paths with sysroot. Handle DOS paths.
272 (gld${EMULATION_NAME}_check_ld_elf_hints): Constify variable.
273 (gld${EMULATION_NAME}_check_ld_so_conf): Likewise.
274 (gld${EMULATION_NAME}_after_open): Short-circuit NULL path
275 searches. Rename variable. Simplify get_runpath search.
279 * testsuite/ld-elf/shared.exp: Use -Wl,-export-dynamic rather
284 * ld.texinfo (Orphan Sections): Mention that not all targets
286 * testsuite/ld-elf/orphan-9.d: Don't run for i860 and i960.
287 * testsuite/ld-elf/orphan-10.d: Likewise.
291 * ldlang.c (lang_size_sections_1): Shortcut loop only after
292 tracking changes to the default regions LMA.
293 * testsuite/ld-elf/orphan-9.ld: Extend header comment.
294 * testsuite/ld-elf/orphan-10.d: New file.
295 * testsuite/ld-elf/orphan-10.s: New file.
296 * NEWS: Mention change in behaviour.
300 * ldlang.c (lang_leave_output_section_statement): Move lma_region
302 (lang_propagate_lma_regions): ...this new function.
303 (lang_process): Call new function.
304 * testsuite/ld-elf/orphan-9.d: New file.
305 * testsuite/ld-elf/orphan-9.ld: New file.
306 * testsuite/ld-elf/orphan-9.s: New file.
307 * NEWS: Mention change in behaviour.
311 * ldlang.c (open_input_bfds): Check that lang_assignment_statement
312 is not an assert before referencing defsym.
316 * testsuite/ld-elf/eh3.d: Adjust for eh_frame alignment change.
317 * testsuite/ld-elf/eh6.d: Likewise.
318 * testsuite/ld-alpha/tlsbin.dd: Likewise.
319 * testsuite/ld-alpha/tlsbin.td: Likewise.
320 * testsuite/ld-alpha/tlsbinr.dd: Likewise.
321 * testsuite/ld-alpha/tlspic.dd: Likewise.
322 * testsuite/ld-alpha/tlspic.rd: Likewise.
323 * testsuite/ld-alpha/tlspic.sd: Likewise.
324 * testsuite/ld-alpha/tlspic.td: Likewise.
325 * testsuite/ld-mips-elf/eh-frame1-n64.d: Likewise.
326 * testsuite/ld-mips-elf/eh-frame2-n64.d: Likewise.
327 * testsuite/ld-mips-elf/eh-frame3.d: Likewise.
328 * testsuite/ld-x86-64/pr20830a.d: Likewise.
329 * testsuite/ld-x86-64/pr21038a.d: Likewise.
330 * testsuite/ld-x86-64/pr21038b.d: Likewise.
331 * testsuite/ld-x86-64/pr21038c.d: Likewise.
336 * pe-dll.c (generate_edata): Fail if the input file(s) require too
341 * testsuite/ld-elf/shared.exp: Pass -ansi when compiling new.cc
346 * testsuite/ld-elf/merge.d: xfail for nios.
350 * testsuite/ld-powerpc/addpcis.d: Define ext1 and ext2 at
351 limits of addpcis range.
355 * testsuite/ld-mips-elf/jalr4.dd: Adjust for `jalr $0, $25'
357 * testsuite/ld-mips-elf/jalr4-r6.dd: New test.
358 * testsuite/ld-mips-elf/mips-elf.exp: Run the new test.
363 * scripttempl/avrtiny.sc (__RODATA_PM_OFFSET__): New define.
364 (.rodata): New section.
365 (.data): Remove .rodata*.
369 * testsuite/ld-elf/elf.exp: Xfail pr20995 tests on hppa64-hpux.
370 Set up HPUX defsym. Run pr14170 tests and build symbol3 objects,
371 defining HPUX where necessary. Define HPUX for implib tests.
372 * testsuite/ld-elf/comm-data4.d: Run for hpux.
373 * testsuite/ld-elf/endsym.d: Likewise.
374 * testsuite/ld-elf/linkoncerdiff.d: Likewise.
375 * testsuite/ld-elf/comm-data4.s: Add alternate .comm when HPUX.
376 * testsuite/ld-elf/comm-data5.s: Likewise.
377 * testsuite/ld-elf/endsym.s: Likewise.
378 * testsuite/ld-elf/pr14170c.s: Likewise.
379 * testsuite/ld-elf/symbol3.s: Likewise.
380 * testsuite/ld-elf/implib.s: Likewise. Don't start directives
382 * testsuite/ld-elf/linkoncerdiff2.s: Don't use numeric labels.
383 * testsuite/ld-elf/warn3.d: Run for hpux.
384 * testsuite/ld-scripts/rgn-at10.d: Xfail for hpux.
385 * testsuite/ld-scripts/rgn-at11.d: Likewise.
386 * testsuite/ld-scripts/size-2.d: Remove xfail for hpux.
390 * testsuite/ld-elf/ver_def.vd: New test.
391 * testsuite/ld-elf/ver_def-tic6x.vd: New test.
392 * testsuite/ld-elf/ver_def.ld: New test linker script.
393 * testsuite/ld-elf/ver_def.ver: New test version script.
394 * testsuite/ld-elf/ver_def.s: New test source.
395 * testsuite/ld-elf/readelf.exp: New test script.
399 * testsuite/ld-mips-elf/relax-jalr-n32.d: Remove `--relax'
401 * testsuite/ld-mips-elf/relax-jalr-n32-shared.d: Likewise.
402 * testsuite/ld-mips-elf/relax-jalr-n64.d: Likewise.
403 * testsuite/ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
407 * testsuite/ld-mips-elf/jalr4.dd: New test.
408 * testsuite/ld-mips-elf/mips-elf.exp: Run the new test.
413 * testsuite/ld-powerpc/vle-reloc-2.s: Use r6 for last insn of
415 * testsuite/ld-powerpc/vle-reloc-2.d: Update for above change
416 and sdarel reloc fix.
421 * testsuite/ld-elf/pr20828-d.sd: New test.
422 * testsuite/ld-elf/pr20828-e.sd: New test.
423 * testsuite/ld-elf/pr20828-v.od: New test.
424 * testsuite/ld-elf/pr20828-v.ver: New test version script.
425 * testsuite/ld-elf/pr20828-v.ld: New test linker script.
426 * testsuite/ld-elf/pr20828.ld: Add `.gnu.version' and
428 * testsuite/ld-elf/shared.exp: Run the new tests.
432 * testsuite/ld-ifunc/pr18808b.c (bar): Fix compile time warning
433 about non-void function returning without a result.
438 * scripttempl/pe.sc: Don't combine sections for ld -r.
439 * scripttempl/pep.sc: Likewise.
444 * emulparams/elf32m32c.sh: Define STACK_ADDR and STACK_SENTINEL
445 rather than using OTHER_SECTIONS.
446 * emulparams/elf32mt.sh: Likewise.
447 * emulparams/elf32rx.sh: Likewise.
448 * emulparams/elf32rl78.sh: Likewise. Use OTHER_SYMBOLS to
450 * emulparams/shelf.sh: Define STACK_ADDR and STACK_SENTINEL
451 rather than using OTHER_SECTIONS.
452 * emulparams/shelf32.sh: Likewise. Use OTHER_SECTIONS for .cranges.
453 * emulparams/shelf64.sh: Unset OTHER_SECTIONS.
454 * emulparams/shelf_nbsd.sh: Unset STACK_ADDR not OTHER_SECTIONS.
455 * emulparams/shelf_uclinux.sh: Likewise.
456 * emulparams/shlsymbian.sh: Unset STACK_ADDR. Use OTHER_SYMBOLS
457 to define _stack, not OTHER_SECTIONS.
458 * scripttempl/elf.sc: Move STACK, TINY_DATA_SECTION, and
459 TINY_BSS_SECTION before debug sections. Add STACK_SENTINEL.
460 * scripttempl/arclinux.sc: Likewise.
461 * scripttempl/elf64hppa.sc: Likewise.
462 * scripttempl/elfxtensa.sc: Likewise.
463 * scripttempl/nds32elf.sc: Likewise.
464 * scripttempl/armbpabi.sc: Move STACK before debug sections.
465 * scripttempl/elf_chaos.sc: Likewise.
466 * scripttempl/elfarc.sc: Delete STACK.
467 * scripttempl/epiphany_4x4.sc: Delete STACK. Move TINY_DATA_SECTION,
468 TINY_BSS_SECTION, and .stack before debug sections.
473 * ld.texinfo (Options): Add missing @item entry for --pop-state.
477 * testsuite/ld-elf/dwarf2.err: Accept other errors between the
478 multiple definition errors.
482 * testsuite/ld-elf/dwarf2.err: Add missing newline at end.
483 * testsuite/ld-elf/dwarf3.err: Likewise. Allow match without filename.
487 * testsuite/ld-elf/shared.exp: Update expected results.
488 * testsuite/ld-elf/dwarf2.err: Likewise
492 * testsuite/ld-elf/dwarf.exp (build_tests): Add new tests.
493 * testsuite/ld-elf/dwarf2.err: New file.
494 * testsuite/ld-elf/dwarf2a.c: New file.
495 * testsuite/ld-elf/dwarf2b.c: New file.
496 * testsuite/ld-elf/dwarf3.c: New file.
497 * testsuite/ld-elf/dwarf3.err: New file.
501 * testsuite/lib/ld-lib.exp (run_cc_link_tests): Add warning,
502 error, warning_output, and error_output actions. Remove separate
504 * testsuite/ld-elf/shared.exp (build_tests): Updated to use
506 * testsuite/ld-plugin/lto.exp (lto_link_tests): Likewise.
510 * testsuite/ld-elf/check-ptr-eq.c (check_ptr_eq): Change params
511 from void pointers to function pointers.
512 * testsuite/ld-elf/pr18718.c: Update to suit.
513 * testsuite/ld-elf/pr18720a.c: Update to suit.
518 * testsuite/ld-elf/loadaddr1.d: Adjust for hppa file offsets.
519 * testsuite/ld-elf/loadaddr2.d: Likewise.
520 * testsuite/ld-elf/loadaddr3a.d: Likewise.
521 * testsuite/ld-scripts/rgn-at5.d: Likewise.
525 * testsuite/ld-powerpc/vxworks1-lib.s: Correct addi to addic.
526 * testsuite/ld-powerpc/vxworks1-lib.dd: Adjust to suit.
531 * testsuite/ld-i386/i386.exp: Run pr21168.
532 * testsuite/ld-i386/pr21168a.c: New file.
533 * testsuite/ld-i386/pr21168b.S: Likewise.
538 * testsuite/ld-i386/i386.exp: Run pr20244-4a, pr20244-4b and
540 * testsuite/ld-i386/pr20244-4.s: New file.
541 * testsuite/ld-i386/pr20244-4a.d: Likewise.
542 * testsuite/ld-i386/pr20244-4b.d: Likewise.
543 * testsuite/ld-i386/pr20244-4c.d: Likewise.
547 * ldmisc.c (vfinfo): Don't print the function name again either
548 if no source file name has been found both now and previously.
549 * testsuite/ld-cris/tls-err-20x.d: Adjust accordingly.
550 * testsuite/ld-mips-elf/mode-change-error-1.d: Likewise.
551 * testsuite/ld-mips-elf/unaligned-branch.d: Likewise.
552 * testsuite/ld-mips-elf/unaligned-branch-mips16.d: Likewise.
553 * testsuite/ld-mips-elf/unaligned-branch-micromips.d: Likewise.
554 * testsuite/ld-mips-elf/unaligned-branch-r6-1.d: Likewise.
555 * testsuite/ld-mips-elf/unaligned-branch-2.d: Likewise.
556 * testsuite/ld-mips-elf/unaligned-branch-r6-2.d: Likewise.
557 * testsuite/ld-mips-elf/unaligned-branch-ignore-2.d: Likewise.
558 * testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d:
560 * testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d:
562 * testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d:
564 * testsuite/ld-mips-elf/unaligned-jalx-addend-1.d: Likewise.
565 * testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d:
567 * testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d:
569 * testsuite/ld-mips-elf/unaligned-jalx-addend-3.d: Likewise.
570 * testsuite/ld-mips-elf/unaligned-jump.d: Likewise.
571 * testsuite/ld-mips-elf/unaligned-jump-mips16.d: Likewise.
572 * testsuite/ld-mips-elf/unaligned-jump-micromips.d: Likewise.
573 * testsuite/ld-mips-elf/unaligned-lwpc-1.d: Likewise.
574 * testsuite/ld-mips-elf/unaligned-ldpc-1.d: Likewise.
575 * testsuite/ld-powerpc/tocopt.out: Likewise.
576 * testsuite/ld-powerpc/tocopt7.out: Likewise.
580 * ldmisc.c (vfinfo) <'H'>: Remove static NULL initializers.
584 * testsuite/ld-scripts/sysroot-prefix.exp
585 (get_base_dir_for_scripts): New function.
586 (run_sysroot_prefix_test): Use get_base_dir_for_scripts.
590 * emulparams/elf32lriscv-defs.sh (SDATA_START_SYMBOLS): Change
591 _gp to __global_pointer$
595 * configure.tgt (arc*-*-linux*): Change the default linker
596 emulation based on --with-cpu selection.
597 * NEWS: Mention new configuration option.
601 * testsuite/ld-elf/compress.exp: Don't print to stdout for all
606 * testsuite/ld-cris/tls-err-20x.d: Fix a typo, s/n/\n/.
610 * ld/testsuite/lib/ld-lib.exp (run_dump_test): Fix a typo,
615 * testsuite/lib/ld-lib.exp (check_libdl_available): New function.
616 * testsuite/ld-elf/shared.exp (run_tests): Split tests which require
617 dlopen support into "dlopen_run_tests". These tests include dl1*main
619 (dlopen_run_tests): New and only run it when check_libdl_available
620 returns true. XFAIL on *-*-netbsdelf*.
624 * testsuite/ld-mips-elf/vxworks-forced-local-1.d: Correct the
625 presentation of relocation addends.
626 * testsuite/ld-mips-elf/vxworks1-lib.rd: Likewise.
627 * testsuite/ld-mips-elf/vxworks1.dd: Likewise.
628 * testsuite/ld-mips-elf/vxworks1.rd: Likewise.
632 * testsuite/ld-mips-elf/tls-multi-got-1-1.s: Place `tlsvar_ld'
634 * testsuite/ld-mips-elf/tls-multi-got-1.got: Adjust accordingly.
635 * testsuite/ld-mips-elf/tls-multi-got-1.r: Likewise.
639 * testsuite/ld-unique/unique.exp (Could not link a dynamic executable):
640 Append $board_cflags to link commands.
644 * testsuite/ld-scripts/print-memory-usage-1.l: Relax
645 check for digit in second decimal place.
650 * testsuite/ld-elf/shared.exp: Correct PR ld/20828 test
655 * ldmain.c (add_archive_element): Eliminate string buffer.
656 * ldlang.c (lang_print_asneeded): Likewise.
660 * emultempl/mipself.em (ignore_branch_isa): New variable.
661 (mips_create_output_section_statements): Rename
662 `_bfd_mips_elf_insn32' called to `_bfd_mips_elf_linker_flags',
663 add `ignore_branch_isa' argument.
664 (PARSE_AND_LIST_PROLOGUE): Add OPTION_IGNORE_BRANCH_ISA and
665 OPTION_NO_IGNORE_BRANCH_ISA enum values.
666 (PARSE_AND_LIST_LONGOPTS): Add "ignore-branch-isa" and
667 "no-ignore-branch-isa" options.
668 (PARSE_AND_LIST_OPTIONS): Add `--ignore-branch-isa' and
669 `--no-ignore-branch-isa'.
670 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_IGNORE_BRANCH_ISA and
671 OPTION_NO_IGNORE_BRANCH_ISA.
673 * ld.texinfo (Options specific to MIPS targets): Add
674 `--ignore-branch-isa' and `--no-ignore-branch-isa' options.
675 (ld and the MIPS family): Likewise.
677 * testsuite/ld-mips-elf/bal-jalx-pic-ignore.d: New test.
678 * testsuite/ld-mips-elf/bal-jalx-pic-ignore-n32.d: New test.
679 * testsuite/ld-mips-elf/bal-jalx-pic-ignore-n64.d: New test.
680 * testsuite/ld-mips-elf/unaligned-branch-ignore-2.d: New test.
681 * testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1: New test.
682 * testsuite/ld-mips-elf/unaligned-branch-ignore-mips16: New
684 * testsuite/ld-mips-elf/unaligned-branch-ignore-micromips: New
686 * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
691 Fix long-standing buglet and fallout from now-default initfini-array.
692 * emulparams/criself.sh (USER_LABEL_PREFIX): Define.
693 (OTHER_END_SYMBOLS, ENTRY): Delete now-redundant defines.
697 * testsuite/ld-elf/elf.exp ("pr20995-2", "Build pr20995-2.so"): XFAIL on
704 * ld.texinfo (Options): Extend documentation of the --plugin
705 option. Include a description of where the plugins should be
710 * po/sr.po: New Serbian translation.
711 * configure.ac (ALL_LINGUAS): Add sr.
712 * configure: Regenerate.
716 * configure.tgt (arm-*-rtems*): Move to (arm*-*-eabi*).
717 (bfin-*-rtems*): Move to (bfin*-*-elf*).
718 (i[3-7]86-*-rtems*): Move to (i[3-7]86*-*-elf*).
719 (m68*-*-rtems*): Move to (m68*-*-elf*).
720 (mips*-*-rtems*): Move to (mips*-*-elf*).
721 (or1k*-*-rtems*): Move to (or1k*-*-elf*).
722 (powerpc*-*-rtems*): Move to (powerpc*-*-elf*).
723 (sparc*-*-rtems*): Move to (sparc*-*-elf*).
724 (sparc64*-*-rtems*): Move to (sparc64*-*-elf*).
728 * configure.tgt (h8300-*-rtemscoff*): Remove.
729 (i960-*-rtems*): Likewise.
730 (m68*-*-rtemscoff*): Likewise.
731 (sh-*-rtemscoff*): Likewise.
735 * emultempl/solaris2.em (elf_solaris2_before_allocation): Do not
736 add implicit version nodes if an anonymous version tag is being
741 * testsuite/ld-plugin/lto.exp (lto_link_elf_tests): Move "Compile 7",
742 "Compile 8a", "Compile 8b"...
743 (lto_compile_elf_tests): ...to here. Always run these tests.
744 (lto_run_elf_tests): Move "LTO 7"...
745 (lto_run_elf_shared_tests): ...to here. Restrict these tests on
746 environment where share library is supported.
750 * testsuite/ld-powerpc/tlsexe.r: Update for fewer dynamic relocs
752 * testsuite/ld-powerpc/tlsexe.d: Likewise.
753 * testsuite/ld-powerpc/tlsexe.g: Likewise.
757 * testsuite/ld-aarch64/aarch64-elf.exp: Run new tests.
758 * testsuite/ld-aarch64/tls-desc-ie-ilp32.d: New test.
759 * testsuite/ld-aarch64/tls-relax-all-ilp32.d: New test.
760 * testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d: New test.
761 * testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d: New test.
762 * testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d: New test.
763 * testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d: New test.
764 * testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d: New test.
765 * testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d: New test.
766 * testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d: New test.
767 * testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d: New test.
768 * testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d: New test.
769 * testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d: New test.
773 * po/ga.po: Updated Irish translation.
778 * testsuite/ld-elf/pr20828.ld: Add `.plt'.
783 * testsuite/ld-elf/pr20828.ld: Rename `_fdata' and `_edata' to
784 `fdata' and `edata' respectively.
785 * testsuite/ld-elf/pr20828.ver: Adjust accordingly.
786 * testsuite/ld-elf/pr20828-a.sd: Likewise.
787 * testsuite/ld-elf/pr20828-b.sd: Likewise.
788 * testsuite/ld-elf/pr20828-c.sd: Likewise.
793 * testsuite/ld-elf/pr20828-1.sd: Remove test.
794 * testsuite/ld-elf/pr20828-a.sd: New test.
795 * testsuite/ld-elf/pr20828-2a.sd: Rename test to...
796 * testsuite/ld-elf/pr20828-b.sd: ... this.
797 * testsuite/ld-elf/pr20828-2b.sd: Rename test to...
798 * testsuite/ld-elf/pr20828-c.sd: ... this.
799 * testsuite/ld-elf/shared.exp: Adjust accordingly.
803 * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Append
804 board_cflags as gcc is used as linker driver.
805 * testsuite/ld-unique/unique.exp: Likewise
809 * testsuite/ld-aarch64/aarch64-elf.exp (aarch64elflinktests): New tests.
810 * testsuite/ld-aarch64/func-in-so.s: New test source file.
811 * testsuite/ld-aarch64/func-sym-hash-opt.s: Likewise.
812 * testsuite/ld-aarch64/func-sym-hash-opt.d: New expected test result.
816 * testsuite/ld-elf/eh-frame-hdr.d: Update expected results.
821 * testsuite/ld-elf/elf.exp: Set GAS flags correctly for the
822 `mips*-*-*' target and `pr20995' and `pr20995-2' tests.
827 * testsuite/ld-elf/pr20828-1.sd: New test.
828 * testsuite/ld-elf/pr20828-2a.sd: New test.
829 * testsuite/ld-elf/pr20828-2b.sd: New test.
830 * testsuite/ld-elf/pr20828.ld: New test linker script.
831 * testsuite/ld-elf/pr20828.ver: New test version script.
832 * testsuite/ld-elf/pr20828.s: New test source.
833 * testsuite/ld-elf/shared.exp: Run the new test.
838 * testsuite/ld-mips-elf/mips-elf.exp: Add PIC comdat GOT16/LO16
839 relocation pairing link test.
843 * testsuite/ld-unique/unique.exp: Filter shared lib cases in
844 uniqeue.exp, as not all targets have such support.
848 * po/sv.po: Updated Swedish translation.
853 * testsuite/ld-x86-64/pr21038b.d: Updated.
854 * testsuite/ld-x86-64/pr21038c.d: New file.
855 * testsuite/ld-x86-64/pr21038c.s: Likewise.
856 * testsuite/ld-x86-64/x86-64.exp: Run pr21038c.
861 * testsuite/ld-x86-64/pr21038a.d: New file.
862 * testsuite/ld-x86-64/pr21038a.s: Likewise.
863 * testsuite/ld-x86-64/pr21038b.d: Likewise.
864 * testsuite/ld-x86-64/pr21038b.s: Likewise.
865 * testsuite/ld-x86-64/x86-64.exp: Run pr21038a and pr21038b.
869 * configure.tgt: Add entries for x86-redox and x86_64-redox.
873 * testsuite/ld-x86-64/pr20830b.d: Updated.
877 * emulparams/elf32_x86_64.sh (TINY_READONLY_SECTION): New.
878 * testsuite/ld-x86-64/pr20830.d: Renamed to ...
879 * testsuite/ld-x86-64/pr20830a.d: This. Updated.
880 * testsuite/ld-x86-64/pr20830b.d: New file.
881 * testsuite/ld-x86-64/x86-64.exp: Rename pr20830 to pr20830a.
887 * testsuite/ld-i386/i386.exp: Run pr20830.
888 * testsuite/ld-x86-64/x86-64.exp: Likewise.
889 * testsuite/ld-i386/pr20830.d: New file.
890 * testsuite/ld-i386/pr20830.s: Likewise.
891 * testsuite/ld-x86-64/pr20830.d: Likewise.
892 * testsuite/ld-x86-64/pr20830.s: Likewise.
896 * testsuite/ld-i386/i386.exp: Pass -Wl,-R,tmpdir and
897 -Wl,--as-needed to $CC.
898 * testsuite/ld-i386/tls.exp: Likewise.
902 * po/sv.po: Updated Swedish translation.
907 * Makefile.am: Add earclinux_nps.c target and add to
908 ALL_EMULATION_SOURCES.
909 * Makefile.in: Likewise, regenerated.
910 * configure.tgt: Add arclinux_nps as an extra emulation for
911 arc*-*-elf* and arc*-*-linux*.
912 * emulparams/arc-nps.sh: New file.
913 * emulparams/arclinux_nps.sh: New file.
914 * testsuite/ld-arc/arclinux-nps.d,
915 * testsuite/ld-arc/arclinux-nps.s: New test.
920 * ldlex.l (option): Add noyywrap
922 * ldlex.h (yywrap): Delete prototype.
926 * testsuite/ld-elf/audit.exp: Check for shared lib support.
927 * testsuite/ld-elf/compress.exp: Likewise.
928 * testsuite/ld-elf/dwarf.exp: Likewise.
929 * testsuite/ld-elf/shared.exp: Likewise.
930 * testsuite/ld-elf/wrap.exp: Likewise.
931 * testsuite/ld-ifunc/ifunc.exp: Likewise.
932 * testsuite/ld-plugin/lto.exp: Check $CXX exists.
936 * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Do not
937 allow test to continue after compilation errors.
938 (run_cc_link_tests): Likewise.
942 * Makefile.am (ALL_EMULATION_SOURCES): Add epruelf.c.
943 (epruelf.c): Remove unneeded dependencies.
944 * Makefile.in: Regenerate
948 * testsuite/ld-elf/shared.exp: Add -rpath-link and -no-as-needed
950 * testsuite/ld-elfweak/elfweak.exp: Likewise.
951 * testsuite/ld-elfvers/vers.exp (vers19): Fix -rpath-link option.
955 * testsuite/ld-elf/elf.exp: Check that $CC exists before C tests.
956 * testsuite/ld-pie/pie.exp: Likewise.
957 * testsuite/ld-plugin/lto.exp: Likewise.
961 * Makefile.am (bootstrap): Delete rule.
962 (ld-partial, ld1, ld1-full, ld2, ld3): Likewise.
963 (HOSTING_CRT0, HOSTING_SCRT0): Don't define.
964 (HOSTING_LIBS, HOSTING_SLIBS, HOSTING_EMU): Likewise.
965 * configure.ac (HOSTING_CRT0, HOSTING_SCRT0): Don't define.
966 (HOSTING_LIBS, HOSTING_SLIBS): Likewise.
967 * configure.host (HOSTING_CRT0, HOSTING_LIBS): Don't define.
968 * Makefile.in: Regenerate.
969 * configure: Regenerate.
970 * testsuite/config/default.exp (get_link_files): Delete.
971 (HOSTING_CRT0, HOSTING_SCRT0, HOSTING_LIBS, HOSTING_SLIBS): Don't
973 (ld_simple_link): Delete.
974 * testsuite/lib/ld-lib.exp (default_ld_link): Delete
975 (default_ld_simple_link): Rename to default_ld_link.
976 (ld_simple_link_defsyms): Rename to ld_link_defsyms.
977 (run_ld_link_tests): Use ld_link, not ld_simple_link.
978 (run_cc_link_tests): Likewise.
979 (run_ld_link_exec_tests): Use $CC or $CXX to link, not $ld.
980 Don't run exe when not native, and return unsupported.
981 * testsuite/ld-bootstrap/bootstrap.exp: Create gccld1 etc. dirs.
982 Link ld1 etc. using $CC.
983 * testsuite/ld-cdtest/cdtest.exp: Link cdtest using $CC.
984 * testsuite/ld-checks/checks.exp: Use ld_link, not ld_simple_link.
985 * testsuite/ld-cygwin/exe-export.exp: Likewise.
986 * testsuite/ld-elf/binutils.exp: Likewise.
987 * testsuite/ld-elf/eh-group.exp: Likewise.
988 * testsuite/ld-elf/exclude.exp: Likewise.
989 * testsuite/ld-elf/frame.exp: Likewise.
990 * testsuite/ld-elf/sec-to-seg.exp: Likewise.
991 * testsuite/ld-elf/tls_common.exp: Likewise.
992 * testsuite/ld-elfcomm/elfcomm.exp: Likewise.
993 * testsuite/ld-fastcall/fastcall.exp: Likewise.
994 * testsuite/ld-gc/gc.exp: Likewise.
995 * testsuite/ld-ifunc/binutils.exp: Likewise.
996 * testsuite/ld-mep/mep.exp: Likewise.
997 * testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise.
998 * testsuite/ld-mn10300/mn10300.exp: Likewise.
999 * testsuite/ld-nios2/nios2.exp: Likewise.
1000 * testsuite/ld-pe/pe-compile.exp: Likewise.
1001 * testsuite/ld-pe/pe-run.exp: Likewise.
1002 * testsuite/ld-pe/pe-run2.exp: Likewise.
1003 * testsuite/ld-plugin/plugin.exp: Likewise.
1004 * testsuite/ld-scripts/align.exp: Likewise.
1005 * testsuite/ld-scripts/alignof.exp: Likewise.
1006 * testsuite/ld-scripts/assert.exp: Likewise.
1007 * testsuite/ld-scripts/defined.exp: Likewise.
1008 * testsuite/ld-scripts/extern.exp: Likewise.
1009 * testsuite/ld-scripts/log2.exp: Likewise.
1010 * testsuite/ld-scripts/map-address.exp: Likewise.
1011 * testsuite/ld-scripts/phdrs.exp: Likewise.
1012 * testsuite/ld-scripts/phdrs2.exp: Likewise.
1013 * testsuite/ld-scripts/script.exp: Likewise.
1014 * testsuite/ld-scripts/section-flags.exp: Likewise.
1015 * testsuite/ld-scripts/sizeof.exp: Likewise.
1016 * testsuite/ld-scripts/sysroot-prefix.exp: Likewise.
1017 * testsuite/ld-scripts/weak.exp: Likewise.
1018 * testsuite/ld-selective/selective.exp: Likewise.
1019 * testsuite/ld-sh/sh.exp: Likewise.
1020 * testsuite/ld-sh/sh64/relax.exp: Likewise.
1021 * testsuite/ld-sh/sh64/relfail.exp: Likewise.
1022 * testsuite/ld-srec/srec.exp: Likewise.
1023 * testsuite/ld-tic6x/tic6x.exp: Likewise.
1024 * testsuite/ld-undefined/weak-undef.exp: Likewise.
1025 * testsuite/ld-versados/versados.exp: Likewise.
1026 * testsuite/ld-x86-64/dwarfreloc.exp: Likewise.
1027 * testsuite/ld-xtensa/coalesce.exp: Likewise.
1028 * testsuite/ld-xtensa/diff_overflow.exp: Likewise.
1029 * testsuite/ld-xtensa/lcall.exp: Likewise.
1030 * testsuite/ld-elf/audit.exp: Run non-native too.
1031 * testsuite/ld-elf/compress.exp: Likewise. Replace ld options with
1033 * testsuite/ld-elf/dwarf.exp: Run non-native too. Use ld_link,
1034 not ld_simple_link. Add -Wl,--no-as-needed to some tests.
1035 * testsuite/ld-elf/elf.exp: Run non-native too. Formatting.
1036 * testsuite/ld-elf/indirect.exp: Run non-native too. Add
1037 -Wl,--no-as-needed to most tests.
1038 * testsuite/ld-elf/shared.exp: Run non-native too. Use braces
1039 to simplify quoting. Set run_tests using [list] rather than
1040 brace assignment to expand $extralibs. Add -Wl,--no-as-needed
1041 to many test. Prefix ld options with -Wl,.
1042 (mix_pic_and_non_pic): Don't run exe if not native.
1043 * testsuite/ld-elf/wrap.exp: Run non-native too. Add
1044 -Wl,--no-as-needed and prefix ld options with -Wl,.
1045 * testsuite/ld-elfvers/vers.exp: Run non-native too. Use ld_link,
1047 * testsuite/ld-elfvsb/elfvsb.exp: Likewise.
1048 (visibility_test): Don't run exe if not native.
1049 * testsuite/ld-elfweak/elfweak.exp: Run non-native too. Use ld_link,
1051 (build_exec): Don't run exe if not native.
1052 * testsuite/ld-ifunc/ifunc.exp: Run non-native too. Use ld_link,
1053 not ld_simple_link. Link using $CC. Add -Wl,--no-as-needed
1054 to some tests and prefix ld options with -Wl,. Expect GNU
1055 for hppa-linux even when no ifuncs. Delete cleanup.
1056 * testsuite/ld-pie/pie.exp: Run non-native too.
1057 * testsuite/ld-plugin/lto.exp: Likewise.
1058 * testsuite/ld-shared/shared.exp: Likewise. Use ld_link,
1060 (shared_test): Don't run exe if not native.
1061 * testsuite/ld-size/size.exp: Run non-native too. Add
1062 -Wl,--no-as-needed to some tests. Prefix ld options with -Wl,.
1063 * testsuite/ld-unique/unique.exp: Run non-native too. Use ld_link,
1064 not ld_simple_link. Link using $CC. Add -Wl,--no-as-needed
1065 to some tests and prefix ld options with -Wl,. Expect GNU
1066 for hppa-linux even when no unique syms. Delete cleanup.
1067 * testsuite/ld-x86-64/tls.exp: Add -Wl,--no-as-needed to some
1068 tests and prefix ld options with -Wl,.
1069 * testsuite/ld-x86-64/x86-64.exp: Use ld_link, not ld_simple_link.
1070 Add -Wl,--no-as-needed to some tests. Prefix ld options with -Wl,.
1074 * emulparams/elf32metag.sh (COMMONPAGESIZE): Define.
1079 * emulparams/hppalinux.sh (DATA_ADDR, SHLIB_DATA_ADDR): Don't define.
1080 (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END, DATA_SEGMENT_RELRO_END): Define.
1081 * scripttempl/elf.sc: Don't define the above if DATA_SEGMENT_ALIGN
1086 Update year range in copyright notice of all files.
1088 For older changes see ChangeLog-2016
1090 Copyright (C) 2017 Free Software Foundation, Inc.
1092 Copying and distribution of this file, with or without modification,
1093 are permitted in any medium without royalty provided the copyright
1094 notice and this notice are preserved.
1100 version-control: never