Localize varible to avoid warning
[external/binutils.git] / ld / ChangeLog
1 2014-05-24  Alan Modra  <amodra@gmail.com>
2
3         * ldlang.c (base): Move variable to..
4         * mri.c: ..here, and make static.
5         * ldlang.h (base): Delete declaration.
6
7 2014-05-20  Hans-Peter Nilsson  <hp@axis.com>
8
9         * Makefile.am (ALL_EMULATION_SOURCES): Add missing eelf32mbel_linux.c.
10         * Makefile.in: Regenerate.
11
12 2014-05-20  Alan Modra  <amodra@gmail.com>
13
14         PR 16952
15         * emulparams/elf32ppccommon.sh (_SDA_BASE_, _SDA2_BASE_): Delete.
16         * emultempl/ppc32elf.em (ppc_before_allocation): Call
17         ppc_elf_maybe_strip_sdata_syms.
18         * ldlang.c (size_input_section): Correct output_offset value
19         for excluded input sections.
20
21 2014-05-16  John Marino  <binutils@marino.st>
22
23         * configure.tgt: Add /lib to dragonfly NATIVE_LIB_DIRS.
24
25 2014-05-11  Chung-Lin Tang  <cltang@codesourcery.com>
26
27         * emulparams/nios2linux.sh (OTHER_GOT_SYMBOLS): Wrap _gp in HIDDEN(),
28         and gp in PROVIDE_HIDDEN.
29
30 2014-05-10  Hans-Peter Nilsson  <hp@bitrange.com>
31
32         * ldlang.c (lang_finish): Don't call bfd_link_hash_table_free here.
33         (output_bfd_hash_table_free_fn): New variable.
34         (open_output): Save the _bfd_link_hash_table_free function for the
35         output_bfd into output_bfd_hash_table_free_fn.
36         * ldmain.c (ld_cleanup): If set, call output_bfd_hash_table_free_fn
37         on link_info.hash.
38         * ldlang.h (output_bfd_hash_table_free_fn): Declare.
39
40 2014-05-02  Alan Modra  <amodra@gmail.com>
41
42         * emultempl/metagelf.em: Update bfd target vector naming.
43         * emultempl/nios2elf.em: Likewise.
44         * emultempl/spuelf.em: Likewise.
45         * emultempl/tic6xdsbt.em: Likewise.
46
47 2014-04-22  Christian Svensson  <blue@cmd.nu>
48
49         * Makefile.am: Remove openrisc and or32 support.  Add support for or1k.
50         * configure.tgt: Likewise.
51         * emulparams/elf32or1k.sh: New file.
52         * emulparams/elf32or1k_linux.sh: New file.
53         * emulparams/elf32openrisc.sh: Delete.
54         * emulparams/or32.sh: Delete.
55         * emulparams/or32elf.sh: Delete.
56         * scripttempl/or32.sc: Delete.
57         * Makefile.in: Regenerate.
58
59 2014-04-21  Richard Henderson  <rth@redhat.com>
60
61         * emultempl/alphaelf.em (alpha_after_parse): Enable 2 relax passes.
62
63 2014-04-16  Steve Ellcey  <sellcey@mips.com>
64
65         * emultempl/elf32.em: Include safe-ctype.h.
66
67 2014-04-16  Steve Ellcey  <sellcey@mips.com>
68
69         * ldbuildid.c (generate_build_id): Add ATTRIBUTE_UNUSED to size arg.
70
71 2014-04-09  Nick Clifton  <nickc@redhat.com>
72
73         * Makefile.am (default-manifest.o): Remove rule.
74         (EMUL_EXTRA_BINARIES): Delete.
75         (ALL_EMUL_EXTRA_BINARIES): Delete.
76         (ld_new_DEPENDENCIES): Remove EMUL_EXTRA_BINARIES.
77         (install-data-local): Remove EMUL_EXTRA_BINARIES.
78         * Makefile.in: Regenerate.
79         * configure.in (all_emul_extra_binaries): Delete.
80         (EMUL_EXTRA_BINARIES): Remove.
81         * configure: Regenerate.
82         * configure.tgt (target_extra_binaries): Delete.
83         * emultempl/default-manifest.rc: Delete.
84         * ld.texinfo: Remove discussion of default manifest.
85         * emulparams/i386pe.sh (DEFAULT_MANIFEST): Delete.
86         * emulparams/i386pep.sh (DEFAULT_MANIFEST): Delete.
87
88 2014-04-09  Alan Modra  <amodra@gmail.com>
89
90         * emultempl/spuelf.em: Include safe-ctype.h, remove duplicate errno.h.
91         * emultempl/nds32elf.em: Include bfd_stdint.h.
92         * po/POTFILES.in: Regenerate.
93
94 2014-04-09  Alan Modra  <amodra@gmail.com>
95
96         * emultempl/ppc32elf.em (no_zero_padding, ppc_finish): New functions.
97         (LDEMUL_FINISH): Define.
98
99 2014-04-08  Nick Clifton  <nickc@redhat.com>
100
101         * scripttempl/pe.sc (R_RSRC): Remove default manifest.
102         * scripttempl/pep.sc (R_RSRC): Remove default manifest.
103
104 2014-04-08  Jon TURNEY  <jon.turney@dronecode.org.uk>
105
106         * emultempl/elf32.em (id_note_section_size, read_hex, write_build_id):
107         Move code for parsing build-id option and calculating the build-id to...
108         * ldbuildid.c: New file.
109         * ldbuildid.h: New file.
110         * Makefile.am (CFILES, HFILES, OFILES, ld_new_SOURCES): Add new
111         files.
112         * Makefile.in: Regenerate.
113         * ld.texinfo: Update --build-id description to mention COFF
114         support.
115         * NEWS: Mention support for COFF build ids.
116         * emultempl/pe.em (gld${EMULATION_NAME}_handle_option):
117         (pecoff_checksum_contents, write_build_id, setup_build_id)
118         (gld_${EMULATION_NAME}_after_open):  Handle and implement
119         build-id option.
120         * emultempl/pep.em: Likewise.
121
122 2014-04-04  Cary Coutant  <ccoutant@google.com>
123
124         PR gold/16804
125         * ld.texinfo: Document optional comma following output section
126         command and overlay command.
127
128 2014-04-04  Alan Modra  <amodra@gmail.com>
129
130         * ldlang.c (lang_size_sections_1 <lang_input_section_enum>): Use
131         current "fill", not "output_section_statement->fill".
132
133 2014-03-31  Nick Clifton  <nickc@redhat.com>
134
135         PR ld/16744
136         * emultempl/elf32.em (_after_open): Create a .note.GNU-stack
137         section when performing a relocatable link with -z [no]execstack
138         specified.
139
140 2014-03-27  H.J. Lu  <hongjiu.lu@intel.com>
141
142         PR ld/16756
143         * ldmain.c (symbol_warning): New function.
144         (warning_callback): Use it.  Scan all input files for a reference
145         to SYMBOL.
146
147 2014-03-21  Christopher Faylor  <me.cygwin2013@cgf.cx>
148
149         * ld.texinfo: Document change in handling of --enable-auto-image-base.
150         * emultempl/pe.em (pe_auto_image_base): Set to default base.
151         (gld_${EMULATION_NAME}_list_options): Change usage message to reflect
152         optional --enable-auto-image-base argument.
153         (gld${EMULATION_NAME}_handle_option): Handle optional
154         --enable-auto-image-base argument.
155         (compute_dll_image_base): Eliminate constant.  Use pe_auto_image_base.
156
157 2014-03-19  Nick Clifton  <nickc@redhat.com>
158
159         * Makefile.am (default-manifest.o): Use WINDRES_FOR_TARGET.
160         * Makefile.in: Regenerate.
161         * emultempl/default-manifest.rc: Fix typo.
162         * scripttempl/pe.sc (R_RSRC): Fix default-manifest exclusion.
163         (.rsrc): Add SUBALIGN(4).  Remove SORT.
164         * scripttempl/pep.sc: Likewise.
165
166 2014-03-17  Christopher Faylor  <me.cygwin2014@cgf.cx>
167
168         * Makefile.am: Use host version of windres.
169         * Makefile.in: Regenerate.
170
171 2014-03-14  Romain Geissler  <romain.geissler@amadeus.com>
172             Alan Modra  <amodra@gmail.com>
173
174         * ldlang.h (full_name_provided): New input flag.
175         * ldlang.c (new_afile): Don't use lang_input_file_is_search_file_enum
176         for -l:namespec.  Instead use lang_input_file_is_l_enum with
177         full_name_provided flag.
178         * ldlfile.c (ldfile_open_file_search): Don't complete lib name if
179         full_name_provided flag is set.
180         * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
181         Handle full_name_provided libraries.  Tidy EXTRA_SHLIB_EXTENSION
182         support.  Set DT_NEEDED for -l:namespec as namespec.
183         * emultempl/aix.em (ppc_after_open_output): Handle full_name_provided.
184         * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
185         Don't handle full_name_provided libraries.
186         * emultempl/pe.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto.
187         * emultempl/pep.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto.
188         * emultempl/vms.em (gld${EMULATION_NAME}_open_dynamic_archive): Ditto.
189
190 2014-03-12  Alan Modra  <amodra@gmail.com>
191
192         * Makefile.in: Regenerate.
193
194 2014-03-05  Alan Modra  <amodra@gmail.com>
195
196         Update copyright years.
197
198 2014-03-04  Nick Clifton  <nickc@redhat.com>
199
200         * Makefile.am (ALL_EMUL_EXTRA_BINARIES): Remove default-manifest.
201         * Makefile.in: Regenerate.
202
203 2014-02-27  Yuri Gribov  <y.gribov@samsung.com>
204
205         * emultempl/armelf.em (OPTION_LONG_PLT): Define.
206         (PARSE_AND_LIST_LONGOPTS): Add long-plt.
207         (PARSE_AND_LIST_OPTIONS): Likewise.
208         (PARSE_AND_LIST_ARGS_CASES): Handle long-plt.
209         * ld.texinfo: Document --long-plt.
210
211 2014-02-27  Alan Modra  <amodra@gmail.com>
212
213         * emulparams/elf32ppcvxworks.sh: Source plt_unwind.sh and
214         use ppc32elf.em.
215         * emultempl/ppc32elf.em (ppc_after_open): Don't compile for
216         vxworks.
217         (LDEMUL_AFTER_OPEN): Don't set for vxworks.
218         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Exclude
219         -secure-plt, -bss-plt and -sdata-got when vxworks.
220
221 2014-02-27  Nick Clifton  <nickc@redhat.com>
222
223         * configure.in (all_emul_extra_binaries): New variable.  Populated
224         by invoking configure.tgt.
225         (EMUL_EXTRA_BINARIES): New substitution.
226         * configure: Regenerate.
227         * configure.tgt (target_extra_binaries): New variable.  Set to
228         default-manifest.o for Cygwin and MinGW targets.
229         * Makefile.am (EMUL_EXTRA_BINARIES): New variable.  Initialised
230         by the configure script.
231         (ALL_EMUL_EXTRA_BINARIES): New variable.
232         (default-manifest.o): New rule to build the default manifest.
233         (ld_new_DEPENDENCIES): Add EMUL_EXTRA_BINARIES.
234         (install-data-local): Add EMUL_EXTRA_BINARIES.
235         * Makefile.in: Regenerate.
236         * ld.texinfo: Document default manifest support.
237         * emulparams/i386pe.sh (DEFAULT_MANIFEST): Define.
238         * emulparams/i386pep.sh (DEFAULT_MANIFEST): Define.
239         * emultempl/default-manifest.rc: New file.
240         * scripttempl/pe.sc (R_RSRC): Include DEFAULT_MANIFEST, if defined.
241         * scripttempl/pep.sc (R_RSRC): Likewise.
242
243 2014-02-26  Dan Mick  <dan.mick@inktank.com>
244
245         PR ld/16569
246         * ldcref.c (cref_sort_array): Compare unmangled names unless
247         demanglng has been requiested.
248         (output_one_cref): Output unmangled name unless demangling has
249         been requested.
250
251 2014-02-19  Igor Zamyatin  <igor.zamyatin@intel.com>
252             H.J. Lu  <hongjiu.lu@intel.com>
253
254         * emulparams/elf_x86_64.sh (TINY_READONLY_SECTION): New.
255
256 2014-02-19  Alan Modra  <amodra@gmail.com>
257
258         * emultempl/ppc64elf.em (params): Init new field.
259         (ppc_create_output_section_statements): Set params.save_restore_funcs
260         default.
261         (PARSE_AND_LIST_*): Add support for --save-restore-funcs and
262         --no-save-restore-funcs.
263
264 2014-02-17  Alan Modra  <amodra@gmail.com>
265
266         * emultemps/ppc64elf.em (params): New static struct replacing
267         various other static vars.  Adjust code throughout file.
268
269 2014-02-17  Alan Modra  <amodra@gmail.com>
270
271         * emultempl/ppc32elf.em (ppc_after_open_output): Really enable
272         ppc476 workaround for ld -r.
273
274 2014-02-12  Alan Modra  <amodra@gmail.com>
275
276         * emultempl/ppc32elf.em (pagesize): New static var.
277         (ppc_after_open_output): Set params.pagesize_p2 from pagesize.
278         (PARSE_AND_LIST_ARGS_CASES): Adjust to use pagesize.
279
280 2014-02-11  Andrew Pinski  <apinski@cavium.com>
281
282         * emulparams/aarch64linux32.sh (LIBPATH_SUFFIX): Change to ilp32.
283         (ELF_INTERPRETER_NAME): Define.
284         * emulparams/aarch64linux32b.sh (ELF_INTERPRETER_NAME): Define.
285
286 2014-02-10  Alan Modra  <amodra@gmail.com>
287
288         * po/ld.pot: Regenerate.
289
290 2014-02-03  Alan Modra  <amodra@gmail.com>
291
292         * emultempl/ppc32elf.em (no_tls_get_addr_opt, emit_stub_syms)
293         plt_style): Delete.  Adjust all refs to instead use..
294         (params): ..this.  New variable.
295         (ppc_after_open_output): New function.  Tweak params and pass to
296         ppc_elf_link_params.
297         (ppc_after_open): Adjust ppc_elf_select_plt_layout call.
298         (ppc_before_allocation): Adjust ppc_elf_tls_setup call.  Enable
299         relaxation for ppc476 workaround.
300         (PARSE_AND_LIST_*): Add --{no-,}ppc476-workaround support.
301         (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
302
303 2014-02-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
304
305         * ld/ld.texinfo: Change ALIGN_WITH_INPUT documentation.
306         * ld/ldlang.c (lang_size_sections_1): Add dotdelta
307         variable which reflects the VMA change due to alignment
308         requirements.  Use dotdelta do change the LMA if
309         ALIGN_WITH_INPUT is requested.
310
311 2014-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
312
313         * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in
314         call to bfd_set_section_vma exposed by recent bfd_set_section_vma
315         change.
316
317 2014-01-30  Sandra Loosemore  <sandra@codesourcery.com>
318
319         * Makefile.am (enios2elf.c, enios2linux.c): Update dependencies.
320         * Makefile.in: Regenerated.
321         * emulparams/nios2elf.sh (EXTRA_EM_FILE): Set.
322         * emulparams/nios2linux.sh (EXTRA_EM_FILE): Set.
323         * emultempl/nios2elf.em: New file.
324         * gen-doc.texi (NIOSII): Set.
325         * ld.texinfo (NIOSII): Set.
326
327 2014-01-28  Nick Clifton  <nickc@redhat.com>
328
329         * Makefile.am: Remove obsolete MSP430 emulations.
330         * configure.tgt: Likewise.
331         * emulparams/msp430all.sh: Likewise.
332         * Makefile.in: Regenerate.
333
334 2014-01-24  H.J. Lu  <hongjiu.lu@intel.com>
335
336         PR ld/16498
337         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Improve
338         orphaned TLS section handling.
339
340 2014-01-24  Alan Modra  <amodra@gmail.com>
341
342         * ldlang.c (lang_output_section_find_by_flags): Be careful to
343         test look->bfd_section->flags if available rather than
344         look->flags.  Separate SEC_THREAD_LOCAL handling from
345         SEC_READONLY loop, and rewrite.
346
347 2014-01-22  Alan Modra  <amodra@gmail.com>
348
349         * ldlang.c (asneeded_list_head, asneeded_list_tail): New vars.
350         (lang_init): Initialise them.
351         (lang_print_asneeded): New function.
352         (lang_process): Call lang_print_asneeded.
353         * ldlang.h (struct asneeded_minfo): New.
354         (asneeded_list_tail): Declare.
355         * ldmain.c (add_archive_element): Improve archive map heading.
356         * ldmisc.c (minfo): Stash --as-needed info.
357
358 2014-01-22  Alan Modra  <amodra@gmail.com>
359
360         * ld.h (struct map_symbol_def): Move to..
361         * ldlang.h: ..here.
362         * ldlang.c (print_assignment): Don't set expld.assign_name to dot.
363
364 2014-01-22  Alan Modra  <amodra@gmail.com>
365
366         * ld.texinfo (Output Section Discarding): Mention assigning to dot
367         as a way of keeping otherwise empty sections.
368         * ldexp.c (is_dot, is_value, is_sym_value, is_dot_ne_0,
369         is_dot_plus_0, is_align_conditional): New predicates.
370         (exp_fold_tree_1): Set SEC_KEEP when assigning to dot inside an
371         output section, except for some special cases.
372         * scripttempl/elfmicroblaze.sc: Use canonical form to align at
373         end of .heap and .stack.
374
375 2014-01-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
376
377         * emulparams/aarch64linuxb.sh (ELF_INTERPRETER_NAME): Define.
378
379 2014-01-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
380
381         * emulparams/aarch64linux.sh (ELF_INTERPRETER_NAME): Define.
382
383 2014-01-20  Alan Modra  <amodra@gmail.com>
384
385         * ldlang.h (struct lang_definedness_hash_entry): Add by_object and
386         by_script.  Make iteration a single bit field.
387         (lang_track_definedness, lang_symbol_definition_iteration): Delete.
388         (lang_symbol_defined): Declare.
389         * ldlang.c (lang_statement_iteration): Expand comment a little.
390         (lang_init <lang_definedness_table>): Make it bigger.
391         (lang_track_definedness, lang_symbol_definition): Delete.
392         (lang_definedness_newfunc): Update.
393         (lang_symbol_defined): New function.
394         (lang_update_definedness): Create entries here.  Do track whether
395         script definition of symbol is valid, even when also defined in
396         an object file.
397         * ldexp.c (fold_name <DEFINED>): Update.
398         (fold_name <NAME>): Allow self-assignment for absolute symbols
399         defined in a linker script.
400
401 2014-01-20  Guy Martin <gmsoft@tuxicoman.be>
402             Alan Modra  <amodra@gmail.com>
403
404         * ldlang.h (lang_output_section_get): Define.
405         * ldlang.c (lang_output_section_get): Likewise.
406         (init_os): Set the output_section userdata to the output
407         section statement.
408         * emultempl/hppaelf.em: Use lang_output_section_get instead of
409         lang_output_section_find where applicable.
410         * emultempl/aarch64elf.em: Likewise.
411         * emultempl/aix.em: Likewise.
412         * emultempl/armelf.em: Likewise.
413         * emultempl/m68hc1xelf.em: Likewise.
414         * emultempl/metagelf.em: Likewise.
415         * emultempl/mipself.em: Likewise.
416         * emultempl/ppc64elf.em: Likewise.
417         * emultempl/spuelf.em: Likewise.
418
419 2014-01-17  Alan Modra  <amodra@gmail.com>
420
421         * genscripts.sh (COMPILE_IN): Don't set if already set.
422         * emulparams/nds32elf.sh: Don't clear EMULATION_LIBPATH, set
423         COMPILE_IN=no.
424         * emulparams/nds32elf16m.sh: Likewise.
425         * emulparams/nds32elf_linux.sh: Likewise.
426         * emultempl/aix.em: Test COMPILE_IN value is "yes".
427         * emultempl/armcoff.em: Likewise.
428         * emultempl/elf32.em: Likewise.
429         * emultempl/generic.em: Likewise.
430         * emultempl/gld960.em: Likewise.
431         * emultempl/gld960c.em: Likewise.
432         * emultempl/linux.em: Likewise.
433         * emultempl/lnk960.em: Likewise.
434         * emultempl/m68kcoff.em: Likewise.
435         * emultempl/sunos.em: Likewise.
436         * emultempl/ticoff.em: Likewise.
437
438 2014-01-16  H.J. Lu  <hongjiu.lu@intel.com>
439
440         PR ld/16456
441         * genscripts.sh: Don't search directory with LIBPATH_SUFFIX_SKIP
442         suffix.
443         * emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX_SKIP): Set to 64
444         for elf32_x86_64 emulation.
445         * emulparams/elf_i386.sh (LIBPATH_SUFFIX_SKIP): Set to 64
446         for elf_i386 emulation.
447
448 2014-01-16  Alan Modra  <amodra@gmail.com>
449
450         * ld.h (fat_section_userdata_type, get_userdata): Move to..
451         * ldlang.h (input_section_userdata_type, get_userdata): ..here.
452         * ldlang.c (init_map_userdata): Delete.  Fold into..
453         (sort_def_symbol): ..here.  Don't attach input section userdata
454         to output sections or global bfd sections.
455         (lang_map): Don't pre-allocate input section userdata.
456         (init_os): Don't allocate userdata for output sections.
457         (print_all_symbols): Update.
458
459 2014-01-15  H.J. Lu  <hongjiu.lu@intel.com>
460
461         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
462         Silence uninitialized warning on ehdr_start_save with older
463         GCC.
464
465 2014-01-15  Alan Modra  <amodra@gmail.com>
466
467         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
468         __ehdr_start before size_dynamic_sections and restore afterwards.
469
470 2014-01-10  Alan Modra  <amodra@gmail.com>
471
472         PR ld/14207
473         PR ld/16322
474         PR binutils/16323
475         * ldlang.c (lang_size_sections): Remove unneeded RELRO base
476         adjust.  Tidy comments.
477         * ld.texinfo (DATA_SEGMENT_RELRO_END): Correct description.
478
479 2014-01-10  Hans-Peter Nilsson  <hp@axis.com>
480
481         * emulparams/crislinux.sh (COMMONPAGESIZE): Define.
482
483 2014-01-08  H.J. Lu  <hongjiu.lu@intel.com>
484
485         PR ld/14207
486         PR ld/16322
487         PR binutils/16323
488         * ldlang.c (lang_size_sections): Properly align RELRO base.
489
490 2014-01-08  H.J. Lu  <hongjiu.lu@intel.com>
491
492         * ldver.c (ldversion): Update copyright year to 2014.
493
494 For older changes see ChangeLog-2013
495 \f
496 Copyright (C) 2014 Free Software Foundation, Inc.
497
498 Copying and distribution of this file, with or without modification,
499 are permitted in any medium without royalty provided the copyright
500 notice and this notice are preserved.
501
502 Local Variables:
503 mode: change-log
504 left-margin: 8
505 fill-column: 74
506 version-control: never
507 End: