6bfd3025b2e397ea824913fb0deebe4b41556b17
[external/binutils.git] / ld / ChangeLog
1 2018-02-04  H.J. Lu  <hongjiu.lu@intel.com>
2
3         * testsuite/ld-i386/lea1d.d: Replace -Sw with -SW.
4         * testsuite/ld-i386/lea1e.d: Likewise.
5         * testsuite/ld-i386/lea1f.d: Likewise.
6         * testsuite/ld-x86-64/lea1g.d: Likewise.
7         * testsuite/ld-x86-64/lea1h.d: Likewise.
8         * testsuite/ld-x86-64/lea1i.d: Likewise.
9         * testsuite/ld-x86-64/lea1j.d: Likewise.
10         * testsuite/ld-x86-64/lea1k.d: Likewise.
11         * testsuite/ld-x86-64/lea1l.d: Likewise.
12
13 2018-02-03  Nick Clifton  <nickc@redhat.com>
14
15         PR 22762
16         * scripttempl/pe.sc: Remove PROVIDE()s from __CTOR_LIST__ and
17         __DTOR_LIST__ symbols.  Add a comment explaining why this is
18         necessary.
19         * scripttemp/pep.sc: Likewise.
20         * ld.texinfo (PROVIDE): Add a note about the effect of common
21         symbols.
22
23 2018-02-03  Sandra Loosemore  <sandra@codesourcery.com>
24
25         * emulparams/nios2elf.sh (GENERATE_SHLIB_SCRIPT): Don't set.
26
27 2018-02-02  Maciej W. Rozycki  <macro@mips.com>
28
29         * testsuite/ld-elf/shared.exp: Add $AFLAGS_PIC throughout to PIC
30         assembly builds where missing and remove `tic6x-*-*' XFAIL
31         markings accordingly.
32
33 2018-02-01  Simon Marchi  <simon.marchi@ericsson.com>
34
35         * ldexp.c (fold_name, exp_fold_tree_1): Avoid pointer arithmetic
36         on NULL pointer.
37
38 2018-01-31  H.J. Lu  <hongjiu.lu@intel.com>
39
40         * testsuite/ld-elf/pr21964-5.c (my_var): Mark as used.
41
42 2018-01-31  Maciej W. Rozycki  <macro@mips.com>
43
44         * testsuite/ld-elf/shared.exp: Fix a typo s/scrip/script/.
45
46 2018-01-31  Maciej W. Rozycki  <macro@mips.com>
47
48         * testsuite/ld-elf/comm-data.exp: Pass `-call_shared' to links
49         involving a shared library for `mips*vr4100*-*-elf*',
50         `mips*vr4300*-*-elf*' and `mips*vr5000*-*-elf*' targets.
51         * testsuite/ld-elf/provide-hidden.exp: Likewise.
52         * testsuite/ld-elf/shared.exp: Likewise.
53         * testsuite/ld-gc/gc.exp: Likewise.
54         * testsuite/ld-mips-elf/comm-data.exp: Likewise.
55
56 2018-01-31  Maciej W. Rozycki  <macro@mips.com>
57
58         * testsuite/ld-elf/elf.exp: Move shared library tests over to...
59         * testsuite/ld-elf/shared.exp: ... here.
60
61 2018-01-31  Michael Matz  <matz@suse.de>
62
63         * testsuite/ld-elf/pr21964-5.c: New test.
64         * testsuite/ld-elf/shared.exp: Run it.
65
66 2018-01-31  H.J. Lu  <hongjiu.lu@intel.com>
67
68         PR ld/21964
69         * testsuite/ld-elf/pr21964-4.c: New file.
70         * testsuite/ld-elf/shared.exp: Run pr21964-4 test on Linux.
71
72 2018-01-30  Alan Modra  <amodra@gmail.com>
73
74         * testsuite/ld-gc/stop.d,
75         * testsuite/ld-gc/stop.s: New test.
76         * testsuite/ld-gc/gc.exp: Run it.
77
78 2018-01-30  Maciej W. Rozycki  <macro@mips.com>
79
80         PR ld/22649
81         * testsuite/ld-elf/pr22649-2ab-mips.msg: New stderr output.
82         * testsuite/ld-elf/pr22649-2cd-mips.msg: New stderr output.
83         * testsuite/ld-elf/shared.exp: Use the new outputs with
84         `mips*-*-*' targets.
85
86 2018-01-30  Maciej W. Rozycki  <macro@mips.com>
87
88         * testsuite/ld-elf/comm-data1.sd: Alternatively accept
89         `PRC[0xff02]' in place of a regular section index.
90         * testsuite/ld-elf/pr21703-shared.sd: Likewise `PRC[0xff01]'.
91
92 2018-01-29  Alan Modra  <amodra@gmail.com>
93
94         * testsuite/ld-elf/pr21964-3a.c: New file.
95         * testsuite/ld-elf/pr21964-3c.c: New file.
96         * testsuite/ld-elf/shared.exp: Run new __start/__stop testcase.
97
98 2018-01-29  Eric Botcazou  <ebotcazou@adacore.com>
99
100         * testsuite/ld-elf/shared.exp (AFLAGS_PIC): Define on SPARC.
101         (pr22269-1): Pass AFLAGS_PIC to the assembler.
102
103 2018-01-29  Eric Botcazou  <ebotcazou@adacore.com>
104
105         * testsuite/ld-elf/pr22450.d: Remove reference to SPARC64.
106
107 2018-01-29  Maciej W. Rozycki  <macro@mips.com>
108
109         * testsuite/ld-mips-elf/comm-data.exp: Correct support for
110         targets using non-traditional MIPS emulation or having a limited
111         selection of ABIs available.  Don't force big endianness, use
112         defaults.
113
114 2018-01-29  H.J. Lu  <hongjiu.lu@intel.com>
115
116         PR ld/22732
117         * testsuite/config/default.exp (STATIC_LDFLAGS): New.  Set to
118         "-static" if target compiler supports it.
119         * testsuite/ld-bootstrap/bootstrap.exp: Skip static executable
120         tests if target compiler doesn't support it.
121         * testsuite/ld-ifunc/ifunc.exp: Likewise.
122         * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Likewise.
123         (run_cc_link_tests): Likewise.
124
125 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
126
127         PR ld/22751
128         * testsuite/config/default.exp (INT128_CFLAGS): New.
129         * testsuite/ld-plugin/lto.exp (INT128_CFLAGS): New.
130         Run ld/22751 tests.
131         * testsuite/ld-plugin/pr22751.c: New file.
132         * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Add
133         ld trailing options.
134
135 2018-01-28  Alan Modra  <amodra@gmail.com>
136
137         PR 22751
138         * ldlang.c (find_rescan_insertion): Look past bfds with claim_archive
139         set.
140
141 2018-01-26  Maciej W. Rozycki  <macro@mips.com>
142
143         * emulparams/elf32mipswindiss.sh (EXTRA_EM_FILE): Set to
144         `mipself'.
145
146 2018-01-25  Eric Botcazou  <ebotcazou@adacore.com>
147
148         * testsuite/ld-sparc/sparc.exp (32-bit: Helper shared library):
149         Link with a version script.
150         (32-bit: TLS -fpie): New test.
151         (64-bit: Helper shared library): Link with a version script.
152         (64-bit: TLS -fpie): New test.
153         (64-bit: GOTDATA relocations): Pass -Av9 to the assembler.
154         * testsuite/ld-sparc/tlslib.ver: New file.
155         * testsuite/ld-sparc/tlspie32.dd: Likewise.
156         * testsuite/ld-sparc/tlspie32.s: Likewise.
157         * testsuite/ld-sparc/tlspie64.dd: Likewise.
158         * testsuite/ld-sparc/tlspie64.s: Likewise.
159         * testsuite/ld-sparc/tlssunbin32.dd: Adjust for versioned symbol.
160         * testsuite/ld-sparc/tlssunbin32.rd: Likewise.
161         * testsuite/ld-sparc/tlssunbin32.sd: Likewise.
162         * testsuite/ld-sparc/tlssunbin64.dd: Likewise.
163         * testsuite/ld-sparc/tlssunbin64.rd: Likewise.
164         * testsuite/ld-sparc/tlssunbin64.sd: Likewise.
165
166 2018-01-24  Renlin Li  <renlin.li@arm.com>
167
168         * testsuite/ld-aarch64/aarch64-elf.exp: Run new testes.
169         * testsuite/ld-aarch64/emit-relocs-287.s: Fix test case.
170         * testsuite/ld-aarch64/emit-relocs-287.d: Fix expected output.
171         * testsuite/ld-aarch64/emit-relocs-287-overflow.s: New.
172         * testsuite/ld-aarch64/emit-relocs-287-overflow.d: New.
173         * testsuite/ld-aarch64/emit-relocs-288.d: New.
174         * testsuite/ld-aarch64/emit-relocs-288.s: New.
175         * testsuite/ld-aarch64/emit-relocs-289.d: New.
176         * testsuite/ld-aarch64/emit-relocs-289.s: New.
177         * testsuite/ld-aarch64/emit-relocs-289-overflow.s: New.
178         * testsuite/ld-aarch64/emit-relocs-289-overflow.d: New.
179         * testsuite/ld-aarch64/emit-relocs-290.d: New.
180         * testsuite/ld-aarch64/emit-relocs-290.s: New.
181         * testsuite/ld-aarch64/emit-relocs-291.d: New.
182         * testsuite/ld-aarch64/emit-relocs-291.s: New.
183         * testsuite/ld-aarch64/emit-relocs-291-overflow.s: New.
184         * testsuite/ld-aarch64/emit-relocs-291-overflow.d: New.
185         * testsuite/ld-aarch64/emit-relocs-292.d: New.
186         * testsuite/ld-aarch64/emit-relocs-292.s: New.
187         * testsuite/ld-aarch64/emit-relocs-293.d: New.
188         * testsuite/ld-aarch64/emit-relocs-293.s: New.
189
190 2018-01-20  H.J. Lu  <hongjiu.lu@intel.com>
191
192         PR ld/22721
193         * testsuite/ld-plugin/lto.exp: Run PR ld/22721 tests.
194         * testsuite/ld-plugin/pr22721.t: New file.
195         * testsuite/ld-plugin/pr22721a.s: Likewise.
196         * testsuite/ld-plugin/pr22721b.c: Likewise.
197
198 2018-01-18  H.J. Lu  <hongjiu.lu@intel.com>
199
200         * testsuite/ld-elf/group1.d: Also xfail Solaris.
201
202 2018-01-18  H.J. Lu  <hongjiu.lu@intel.com>
203
204         * testsuite/ld-elf/linkinfo1a.d: Updated for slightly different
205         PLT/GOT order/layout for Solaris/x86 targets.
206         * testsuite/ld-elf/linkinfo1b.d: Likewise.
207
208 2018-01-18  H.J. Lu  <hongjiu.lu@intel.com>
209
210         PR ld/22728
211         * emultempl/solaris2.em (elf_solaris2_after_allocation): Fold
212         into ...
213         (elf_solaris2_before_allocation): This.
214         (LDEMUL_AFTER_ALLOCATION): Removed.
215
216 2018-01-18  Alan Modra  <amodra@gmail.com>
217
218         * emultempl/ppc32elf.em: Support optional --plt-align arg.
219         * emultempl/ppc64elf.em: Support negative --plt-align arg.
220
221 2018-01-17  Alan Modra  <amodra@gmail.com>
222
223         * emultempl/ppc32elf.em (params): Init new field.
224         (OPTION_SPECULATE_INDIRECT_JUMPS): Define.
225         (OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define.
226         (PARSE_AND_LIST_LONGOPTS): Handle new options.
227         (PARSE_AND_LIST_ARGS_CASES): Likewise.
228         (PARSE_AND_LIST_OPTIONS): Likewise.
229         * emultempl/ppc64elf.em (params): Init new field.
230         (OPTION_SPECULATE_INDIRECT_JUMPS): Define.
231         (OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define.
232         (PARSE_AND_LIST_LONGOPTS): Handle --speculate-indirect-jumps.
233         (PARSE_AND_LIST_OPTIONS): Likewise.
234         (PARSE_AND_LIST_ARGS_CASES): Likewise.
235         * ld.texinfo (--no-plt-thread-safe): Correct itemx.
236         (--speculate-indirect-jumps): Document.
237         * testsuite/ld-powerpc/elfv2exe.d,
238         * testsuite/ld-powerpc/elfv2so.d,
239         * testsuite/ld-powerpc/relbrlt.d,
240         * testsuite/ld-powerpc/powerpc.exp: Disable plt alignment and
241         speculation barriers on various tests.
242
243 2018-01-17  Alan Modra  <amodra@gmail.com>
244
245         * emultempl/ppc32elf.em (params): Init new field.
246         (enum ppc32_opt): New enum to define OPTION_* values.  Add
247         OPTION_PLT_ALIGN and OPTION_NO_PLT_ALIGN.
248         (PARSE_AND_LIST_LONGOPTS): Handle new options.
249         (PARSE_AND_LIST_ARGS_CASES): Likewise.
250         (PARSE_AND_LIST_OPTIONS): Likewise.  Break up help output.
251         * emultempl/ppc64elf.em (ppc_add_stub_section): Init alignment
252         correctly for negative --plt-stub-align.
253         * testsuite/ld-powerpc/elfv2exe.d,
254         * testsuite/ld-powerpc/elfv2so.d,
255         * testsuite/ld-powerpc/relbrlt.d,
256         * testsuite/ld-powerpc/relbrlt.s,
257         * testsuite/ld-powerpc/tlsexe.d,
258         * testsuite/ld-powerpc/tlsexe.r,
259         * testsuite/ld-powerpc/tlsexe32.d,
260         * testsuite/ld-powerpc/tlsexe32.g,
261         * testsuite/ld-powerpc/tlsexe32.r,
262         * testsuite/ld-powerpc/tlsexetoc.d,
263         * testsuite/ld-powerpc/tlsexetoc.r,
264         * testsuite/ld-powerpc/tlsopt5_32.d,
265         * testsuite/ld-powerpc/tlsso.d,
266         * testsuite/ld-powerpc/tlstocso.d: Update for changed stub order.
267
268 2018-01-16  Nick Clifton  <nickc@redhat.com>
269
270         * po/pt_BR.po: Updated Brazilian Portugese translation.
271
272 2018-01-15  Nick Clifton  <nickc@redhat.com>
273
274         * po/uk.po: Updated Ukranian translation.
275
276 2018-01-13  Nick Clifton  <nickc@redhat.com>
277
278         * po/ld.pot: Regenerated.
279
280 2018-01-13  Nick Clifton  <nickc@redhat.com>
281
282         * configure: Regenerate.
283
284 2018-01-13  Nick Clifton  <nickc@redhat.com>
285
286         2.30 branch created.
287         * NEWS: Add marker for 2.30.
288
289 2018-01-12  Alan Modra  <amodra@gmail.com>
290
291         * testsuite/ld-elf/elf.exp: xfail "pr22374 function pointer
292         initialization" for currently failing targets.
293
294 2018-01-12  Alan Modra  <amodra@gmail.com>
295
296         PR ld/22649
297         * testsuite/ld-elf/pr22649.msg: Allow other messages.
298         * testsuite/ld-elf/shared.exp: Check that --gc-sections is
299         supported before running ld/22649 tests.
300
301 2018-01-12  Nick Clifton  <nickc@redhat.com>
302
303         * emultempl/elf32.em (_handle_option): Add support for "-z undefs"
304         as the opposite of "-z defs".
305         * ld.texinfo: Document the new option.  Update the description of
306         the -z defs option to make it clear that it does generate an error
307         if an undefined symbol reference is found in an object file whilst
308         creating a shared library.
309         * NEWS: Document this new feature.
310
311 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
312
313         * testsuite/ld-elf/pr22393-2a.rd: Replace "-z textonly" with
314         "-z separate-code".
315         * testsuite/ld-elf/pr22393-2b.rd: Likewise.
316         * testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
317         * testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
318
319 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
320
321         PR ld/22393
322         * testsuite/ld-x86-64/pr22393-3a.c: New file.
323         * testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
324         * testsuite/ld-x86-64/pr22393-3b.c: Likewise.
325         * testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
326         * testsuite/ld-x86-64/x86-64.exp: Run tests for -z separate-code
327         -z max-page-size=0x1000.
328
329 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
330
331         PR ld/22393
332         * testsuite/ld-elf/pr16322.d: Add -z noseparate-code.
333         * testsuite/ld-elf/pr22393-1.s: New file.
334         * testsuite/ld-elf/pr22393-1a.d: Likewise.
335         * testsuite/ld-elf/pr22393-1b.d: Likewise.
336         * testsuite/ld-elf/pr22393-1c.d: Likewise.
337         * testsuite/ld-elf/pr22393-1d.d: Likewise.
338         * testsuite/ld-elf/pr22393-1e.d: Likewise.
339         * testsuite/ld-elf/pr22393-1f.d: Likewise.
340         * testsuite/ld-elf/pr22393-2a.c: Likewise.
341         * testsuite/ld-elf/pr22393-2a.rd: Likewise.
342         * testsuite/ld-elf/pr22393-2b.c: Likewise.
343         * testsuite/ld-elf/pr22393-2b.rd: Likewise.
344         * testsuite/ld-elf/shared.exp: Run tests for -z separate-code.
345
346 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
347
348         PR ld/22393
349         * NEWS: Mention "-z separate-code".
350         * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Get
351         builtin linker scripts and return linker scripts from disk for
352         "-z separate-code".
353         (gld${EMULATION_NAME}_handle_option): Handle "-z separate-code"
354         and "-z noseparate-code".
355         * genscripts.sh: Generate linker scripts for "-z separate-code".
356         (LD_FLAG): Set to *textonly for "-z separate-code".
357         * ld.texinfo: Document "-z separate-code".
358         * lexsup.c (elf_shlib_list_options): Add linker help messsages
359         for "-z separate-code" and "-z noseparate-code".
360         * scripttempl/elf.sc (SEPARATE_TEXT): New
361         (TEXT_SEGMENT_ALIGN): Likewise.
362         Use ${TEXT_SEGMENT_ALIGN} to align and pad text segment to
363         ${MAXPAGESIZE}.
364
365 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
366
367         PR ld/22649
368         * testsuite/ld-elf/pr22649-1.s: New file.
369         * testsuite/ld-elf/pr22649-2a.s: Likewise.
370         * testsuite/ld-elf/pr22649-2b.s: Likewise.
371         * testsuite/ld-elf/pr22649.msg: Likewise.
372         * testsuite/ld-elf/shared.exp: Run ld/22649 tests.
373
374 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
375
376         PR ld/22677
377         * scripttempl/elf.sc (PREINIT_ARRAY): New.
378         Don't add .preinit_array for ld -r.
379         * testsuite/ld-elf/pr22677.d: New file.
380         * testsuite/ld-elf/pr22677.s: Likewise.
381
382 2018-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>
383
384         * ldexp.h (union etree_union): Remove defsym field.
385         * ldexp.c (exp_assop): Remove defsym parameter, and use of defsym
386         parameter.
387         (exp_assign): Remove passing of defsym parameter.
388         (exp_defsym): Likewise.
389         (exp_provide): Likewise.
390
391 2018-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>
392
393         * ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
394         nodes are ignored in the tree walk, and move the location at which
395         we change provide nodes into provided nodes.
396         (exp_init_os): Add etree_provided.
397         * testsuite/ld-scripts/provide-6.d: New file.
398         * testsuite/ld-scripts/provide-6.t: New file.
399         * testsuite/ld-scripts/provide-7.d: New file.
400         * testsuite/ld-scripts/provide-7.t: New file.
401         * testsuite/ld-scripts/provide-8.d: New file.
402         * testsuite/ld-scripts/provide-8.t: New file.
403
404 2018-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>
405
406         * testsuite/ld-scripts/provide-3.d: Add xfail directive.
407         * testsuite/ld-scripts/provide-4.d: Use new map file name.
408         * testsuite/ld-scripts/provide-5.d: Use new map file name.
409         * testsuite/ld-scripts/provide-4-map.d: Renamed to...
410         * testsuite/ld-scripts/provide-4.map: ...this.
411         * testsuite/ld-scripts/provide-5-map.d: Renamed to...
412         * testsuite/ld-scripts/provide-5.map: ...this.
413         * testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
414         file, and run tests in a loop.
415
416 2018-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>
417
418         * ldexp.c (exp_print_tree): Use '=' instead of ',' when printing
419         PROVIDE statements.
420         * testsuite/ld-scripts/provide-4.map: Update expected output.
421         * testsuite/ld-scripts/provide-5.map: Likewise.
422
423 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
424
425         PR ld/22696
426         * scripttempl/elf.sc: Fix the order of SHLIB_RODATA_ADDR.
427
428 2018-01-09  Jim Wilson  <jimw@sifive.com>
429
430         * testsuite/ld-elf/eh-frame-hdr.d (#xfail): Delete
431         (#alltargets): Renamed from #target.  Add shared.
432         * testsuite/lib/ld-lib.exp (run_dump_test): Document shared target.
433         Document alltargets option.  Add support for alltargets option.
434         (istarget): Add support for shared target.
435
436 2018-01-08  Jim Wilson  <jimw@sifive.com>
437
438         * testsuite/ld-riscv-elf/c-lui.d: Don't use -shared.  Check for _start
439         instead of .text.
440         * testsuite/ld-riscv-elf/c-lui.s: Add _start label.
441         * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Before __global_pointer$
442         tests, add call to check_shared_lib_support.
443
444 2018-01-05  Jim Wilson  <jimw@sifive.com>
445
446         * testsuite/ld-riscv-elf/disas-jalr.d: New.
447         * testsuite/ld-riscv-elf/disas-jalr.s: New.
448         * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run new testcase.
449
450         * emulparams/elf32lriscv-defs.sh (GENERATE_SHLIB_SCRIPT): Move inside
451         case on $target, and don't set for riscv*-elf targets.
452         (GENERATE_PIE_SCRIPT): Likewise.
453
454 2018-01-03  Alan Modra  <amodra@gmail.com>
455
456         Update year range in copyright notice of all files.
457
458 For older changes see ChangeLog-2017
459 \f
460 Copyright (C) 2018 Free Software Foundation, Inc.
461
462 Copying and distribution of this file, with or without modification,
463 are permitted in any medium without royalty provided the copyright
464 notice and this notice are preserved.
465
466 Local Variables:
467 mode: change-log
468 left-margin: 8
469 fill-column: 74
470 version-control: never
471 End: