Don't hardcode .got.plt into DATA_SEGMENT_RELRO_END evaluation
[external/binutils.git] / ld / ChangeLog
1 2012-06-11  Alan Modra  <amodra@gmail.com>
2
3         PR ld/14215
4         * ldexp.c (fold_name <SIZEOF, ALIGNOF>): Allow forward section
5         references.
6         * emulparams/elf32_x86_64.sh (SEPARATE_GOTPLT): Depend on size of
7         .got.plt.
8         * emulparams/elf32mb_linux.sh (SEPARATE_GOTPLT): Likewise.
9         * emulparams/elf32tilegx.sh (SEPARATE_GOTPLT): Likewise.
10         * emulparams/elf32tilepro.sh (SEPARATE_GOTPLT): Likewise.
11         * emulparams/elf64tilegx.sh (SEPARATE_GOTPLT): Likewise.
12         * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Likewise.
13         * emulparams/elf_k1om.sh (SEPARATE_GOTPLT): Likewise.
14         * emulparams/elf_l1om.sh (SEPARATE_GOTPLT): Likewise.
15         * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Likewise.
16
17 2012-06-07  Georg-Johann Lay  <avr@gjlay.de>
18
19         PR 13697
20         * scripttempl/avr.sc (.data): Keep it.
21
22 2012-06-02  Andreas Schwab  <schwab@linux-m68k.org>
23
24         * Makefile.am (TEXINFO_TEX): Remove $(top_srcdir) prefix.
25         * Makefile.in: Regenerate.
26
27 2012-05-30  Alan Modra  <amodra@gmail.com>
28
29         * ldlang.h (lang_output_section_statement_type): Rename
30         "section_relative_symbol" field to "update_dot".
31         * ldlang.c: Update all uses.
32         (strip_excluded_output_sections): Don't test update_dot_tree here..
33         (lang_leave_overlay): ..set update_dot here.
34
35 2012-05-26  Alan Modra  <amodra@gmail.com>
36
37         * ldlex.h (enum option_values): Move from..
38         * lexsup.c: ..here.
39         * emultempl/ppc32elf.em: Include ldlex.h.
40         (PARSE_AND_LIST_ARGS_CASES): Disable optimisations when
41         --traditional-format.
42         * emultempl/ppc64elf.em: Likewise.
43
44 2012-05-25  Alan Modra  <amodra@gmail.com>
45
46         PR ld/13909
47         * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
48         multiple .eh_frame sections attached to bfd.
49
50 2012-05-23  Cary Coutant  <ccoutant@google.com>
51
52         * scripttempl/armbpabi.sc: Match .data.rel.ro.* sections more
53         carefully.  Fix typo where .rela.data.rel.ro matches
54         .rel.data.rel.ro.
55         * scripttempl/mep.sc: Likewise.
56         * scripttempl/elf.sc: Match .data.rel.ro.* sections more carefully.
57         * scripttempl/elf64hppa.sc: Likewise.
58         * scripttempl/elfxtensa.sc: Likewise.
59
60 2012-05-17  Daniel Richard G.  <skunk@iskunk.org>
61             Nick Clifton  <nickc@redhat.com>
62
63         PR 14072
64         * configure.in: Add check that sysdep.h has been included before
65         any system header files.
66         * configure: Regenerate.
67         * config.in: Regenerate.
68         * sysdep.h: Generate an error if included before config.h.
69
70 2012-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
71
72         * emultempl/m68hc1xelf.em (hook_in_stub): Pass proper `bfd'
73         as the first argument for `bfd_get_section_name'.
74
75 2012-05-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>
76
77         PR ld/14069
78         * emultempl/elf32.em: Include *-*-gnu* targets in ld.so.conf
79         support.
80
81 2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
82
83         * NEWS: Mention the support for S12X processors.
84
85 2012-05-14  James Lemke  <jwlemke@codesourcery.com>
86
87         * ldlang.c (walk_wild_consider_section): Don't copy section_flag_list.
88         Pass it to callback.
89         (walk_wild_section_general): Pass section_flag_list to callback.
90         (lang_add_section): Add sflag_list parm.
91         Move out logic to keep / omit a section & call bfd_lookup_section_flags.
92         (output_section_callback_fast): Add sflag_list parm.
93         Add new parm to lang_add_section calls.
94         (output_section_callback): Likewise.
95         (check_section_callback): Add sflag_list parm.
96         (lang_place_orphans): Add new parm to lang_add_section calls.
97         (gc_section_callback): Add sflag_list parm.
98         (find_relro_section_callback): Likewise.
99         * ldlang.h (callback_t): Add flag_info parm.
100         (lang_add_section): Add sflag_list parm.
101         * emultempl/armelf.em (elf32_arm_add_stub_section):
102         Add lang_add_section parm.
103         * emultempl/beos.em (gld*_place_orphan): Likewise.
104         * emultempl/elf32.em (gld*_place_orphan): Likewise.
105         * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
106         * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
107         * emultempl/mipself.em (mips_add_stub_section): Likewise.
108         * emultempl/mmo.em (mmo_place_orphan): Likewise.
109         * emultempl/pe.em (gld_*_place_orphan): Likewise.
110         * emultempl/pep.em (gld_*_place_orphan): Likewise.
111         * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
112         * emultempl/spuelf.em (spu_place_special_section): Likewise.
113         * emultempl/vms.em (vms_place_orphan): Likewise.
114
115 2012-05-14  Catherine Moore  <clm@codesourcery.com>
116
117         * NEWS:  Mention PowerPC VLE port.
118
119 2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
120
121         PR binutils/14028
122         * configure.in: Invoke ACX_HEADER_STRING.
123         * configure: Regenerate.
124         * config.in: Regenerate.
125         * sysdep.h: If STRINGS_WITH_STRING is defined then include both
126         string.h and strings.h.
127
128 2012-05-08  Alan Modra  <amodra@gmail.com>
129
130         * Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
131         LC and LANG environment vars.
132         * Makefile.in: Regenerate.
133
134 2012-05-07  Tristan Gingold  <gingold@adacore.com>
135
136         * pe-dll.c (udef_table): Make it static.
137
138 2012-05-05  Alan Modra  <amodra@gmail.com>
139
140         * pe-dll.c (process_def_file_and_drectve): Use bfd_und_section_ptr.
141         (generate_reloc): Use bfd_abs_section_ptr.
142
143 2012-05-04  H.J. Lu  <hongjiu.lu@intel.com>
144
145         * configure.tgt: Support x86_64-*-linux-gnux32.
146
147 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
148
149         * Makefile.am (ALL_EMULATIONS): Added new emulation for XGATE
150         and XGATE (elf).
151         * Makefile.in: Rebuild.
152         * configure.tgt: Recognize XGATE.
153         * scripttempl/elfxgate.sc: New file, mostly cloned from m68hc12.
154         * emulparams/xgateelf: New emulation, mostly cloned from m68hc12.
155         * NEWS: Mention new support.
156
157 2012-04-26  Hans-Peter Nilsson  <hp@axis.com>
158
159         Make bfd asserts cause linker errors.
160         * ldmain.c (default_bfd_assert_handler): New variable.
161         (ld_bfd_assert_handler): New function.
162         (main): Call bfd_set_assert_handler.
163
164 2012-04-24  Alan Modra  <amodra@gmail.com>
165
166         * ldlang.c (size_input_section): Use sec_info_type rather than
167         usrdata->flags.just_syms.
168         * ldwrite.c (build_link_order): Likewise.
169         * emultempl/hppaelf.em (build_section_lists): Likewise.
170         * emultempl/ppc64elf.em (build_toc_list): Likewise.
171         * emultempl/armelf.em (build_section_lists): Likewise.
172         (after_allocation): Update for renamed sec_info_type value.
173         * emultempl/tic6xdsbt.em: Likewise.
174
175 2012-04-12  Roland McGrath  <mcgrathr@google.com>
176
177         * configure.tgt (arm*-*-nacl*, arm*b-*-nacl*): Handle them.
178         * emulparams/armelf_nacl.sh: New file.
179         * emulparams/armelfb_nacl.sh: New file.
180         * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_nacl.c
181         and earmelfb_nacl.c here.
182         (earmelf_nacl.c, earmelfb_nacl.c): New targets.
183         * Makefile.in: Regenerated.
184
185 2012-04-11  Tristan Gingold  <gingold@adacore.com>
186
187         * scripttempl/ia64vms.sc: New file.
188         * emultempl/vms.em (_before_parse): Support for ia64.
189         (elf64-ia64-vms): New fragment for ia64.
190         * emulparams/elf64_ia64_vms.sh: New file.
191         * configure.tgt (ia64-*-*vms*): Add.
192         * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c
193         (eelf64_ia64_vms.c): New rule.
194         * Makefile.in: Regenerate.
195
196 2012-04-06  Roland McGrath  <mcgrathr@google.com>
197
198         * configure.in (AC_CHECK_HEADERS): Add locale.h.
199         * config.in: Regenerate.
200         * configure: Regenerate.
201
202 2012-04-05  Nick Clifton  <nickc@redhat.com>
203
204         * configure.in (AC_CHECK_FUNCS): Add setlocale.
205         (AM_LC_MESSAGES): Add.
206         * aclocal.m4: Regenerate.
207         * config.in: Regenerate.
208         * configure: Regenerate.
209
210 2012-04-03  Roland McGrath  <mcgrathr@google.com>
211
212         * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
213         * emulparams/elf_nacl.sh: New file.
214         * emulparams/elf_i386_nacl.sh: New file.
215         * emulparams/elf32_x86_64_nacl.sh: New file.
216         * emulparams/elf_x86_64_nacl.sh: New file.
217         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
218         (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
219         eelf_x86_64_nacl.c here.
220         (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
221         New targets.
222         * Makefile.in: Regenerated.
223
224         * scripttempl/elf.sc: Handle SEPARATE_CODE cases.
225
226 2012-04-02  Mike Frysinger  <vapier@gentoo.org>
227
228         * ldmisc.c (vfinfo): Assign new local str to fmt.  Delete
229         putc call.  If str and fmt are different, call fwrite on
230         the difference.
231
232 2012-03-30  Nick Clifton  <nickc@redhat.com>
233
234         * po/vi.po: Updated Vietnamese translation.
235
236 2012-03-27  Roland McGrath  <mcgrathr@google.com>
237
238         * configure.in: Set want64 on a 64-bit host regardless of
239         --enable-targets=all.
240         * configure: Regenerated.
241
242 2012-03-26  Tristan Gingold  <gingold@adacore.com>
243
244         * lexsup.c (parse_args): Add a missing '\n'.
245
246 2012-03-25  Alan Modra  <amodra@gmail.com>
247
248         * ldemul.c (before_allocation_default): Revert last change.
249         * ldlang.c (lang_add_section): Likewise.
250         (strip_excluded_output_sections): Don't strip output sections with
251         user input sections when emitrelocations, unless all are SEC_EXCLUDE.
252
253 2012-03-23  Alan Modra  <amodra@gmail.com>
254
255         * ldemul.c (before_allocation_default): When emitrelocations,
256         don't strip sections..
257         * ldlang.c (lang_add_section): ..and don't set up map_head, map_tail.
258
259 2012-03-14  Kai Tietz  <ktietz@redhat.com>
260             Pascal Obry  <pascal@obry.net>
261
262         * pe-dll.c (found_sym): New static variable.
263         (undef_count): Likewise.
264         (key_value): New structure.
265         (undef_sort_cmp): Compare routine for qsort/bsearch.
266         (pe_find_cdecl_alias_match): Add new argument.
267         (pe_undef_alias_cdecl_match): Removed.
268         (pe_undef_count): New helper routine.
269         (pe_create_undef_table): Likewise.
270         (pe_process_import_defs): Use pe_create_undef_table and
271         new pe_undef_alias_cdecl_match function.
272
273 2012-03-14  Alan Modra  <amodra@gmail.com>
274
275         PR ld/13839
276         * ldexp.c (fold_name): Ignore undefined symbols when assigning to
277         dot in mark phase.
278         (exp_fold_tree_1): Evaluate assignment to dot expressions even when
279         discarding result, for side effects.  Fix typo in error message.
280
281 2012-03-08  Tristan Gingold  <gingold@adacore.com>
282
283         * ldexp.c (exp_print_tree): Special case for SEGMENT_START.
284         (exp_print_token): Constify.
285
286 2012-03-08  Alan Modra  <amodra@gmail.com>
287
288         PR ld/10340
289         * ldfile.c (is_sysrooted_pathname): Remove notsame param.
290         (ldfile_add_library_path): Don't set sysrooted flag.
291         (ldfile_open_file_search): Likewise, and don't copy them.
292         (try_open): Delete exten and code handling such.  Add sysrooted
293         param and return whether path is in sysroot.
294         (ldfile_find_command_file): Delete extend param.  Add sysrooted
295         param.  Rename local var.  Update try_open calls.
296         (ldfile_open_command_file_1): Pass sysrooted to lex_push_file.
297         * ldfile.h (search_dirs_type): Remove sysrooted field.
298         * ldlang.c (new_afile): Always set sysrooted from input_flags.
299         (load_symbols): Don't set input_flags.sysrooted.
300         * ldlang.h (struct lang_input_statement_flags): Revise sysrooted
301         comment.
302         * ldlex.h (lex_push_file): Update prototype.
303         * ldlex.l (sysrooted_stack): New array.
304         (EOF): Pop input_flags.sysrooted.
305         (lex_push_file): Add sysrooted param.  Save and set
306         input_flags.sysrooted.
307
308 2012-03-06  Alan Modra  <amodra@gmail.com>
309
310         * ldlang.h (struct lang_input_statement_flags): New, extract from..
311         (lang_input_statement_type): ..here.  New field "flags".
312         (input_flags): Declare.
313         (missing_file): Delete.
314         * ldmain.h (whole_archive): Delete.
315         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
316         * ld.h (ld_config_type <dynamic_link>): Delete.
317         * ldmain.c (whole_archive): Delete.
318         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
319         * ldlang.c (missing_file, ldlang_sysrooted_script): Delete.
320         (input_flags): New variable.  Replace all uses of config.dynamic_link,
321         missing_file, ldlang_sysrooted_script, whole_archive,
322         add_DT_NEEDED_for_regular and add_DT_NEEDED_for_dynamic with fields
323         from here.
324         * ldfile.c: Likewise.
325         * ldgram.y: Likewise.
326         * ldmain.c: Likewise.
327         * ldwrite.c: Likewise.
328         * lexsup.c: Likewise.
329         * plugin.c: Likewise.
330         * emultempl/aix.em: Likewise.
331         * emultempl/armelf.em: Likewise.
332         * emultempl/elf32.em: Likewise.
333         * emultempl/hppaelf.em: Likewise.
334         * emultempl/linux.em: Likewise.
335         * emultempl/pe.em: Likewise.
336         * emultempl/pep.em: Likewise.
337         * emultempl/ppc64elf.em: Likewise.
338         * emultempl/scoreelf.em: Likewise.
339         * emultempl/spuelf.em: Likewise.
340         * emultempl/sunos.em: Likewise.
341         * emultempl/vms.em: Likewise.
342         * ldlang.c (new_afile): Use memset to init zero fields.
343         (load_symbols): Simplify save and restore of flags around command
344         file processing.
345         * ldfile.c (is_sysrooted_pathname): Tidy.
346
347 2012-03-05  Hans-Peter Nilsson  <hp@axis.com>
348
349         * configure.tgt (mips64*el-*-freebsd*, mips64*-*-freebsd*)
350         (mips*el-*-freebsd*, mips*-*-freebsd*): Correct triplets by
351         replacing trailing "-*" with "*".
352
353 2012-02-25  Walter Lee  <walt@tilera.com>
354
355         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx_be.c.
356         (ALL_64_EMULATION_SOURCES): Add eelf64tilegx_be.c.
357         (eelf32tilegx_be.c): Add rule to build this file.
358         (eelf64tilegx_be.c): Ditto.
359         * Makefile.in: Regenerate.
360         * configure.tgt (tilegx-*-*): Support big endian.
361         (tilegxbe-*-*): New.
362         * emulparams/elf32tilegx.sh (OUTPUT_FORMAT): Rename.
363         (BIG_OUTPUT_FORMAT): Define.
364         (LITTLE_OUTPUT_FORMAT): Define.
365         * emulparams/elf32tilegx_be.sh: New.
366         * emulparams/elf64tilegx.sh (OUTPUT_FORMAT): Rename.
367         (BIG_OUTPUT_FORMAT): Define.
368         (LITTLE_OUTPUT_FORMAT): Define.
369         * emulparams/elf64tilegx_be.sh: New.
370
371 2012-02-24  Kai Tietz  <ktietz@redhat.com>
372
373         PR binutils/13710
374         * deffilep.y (keyword_as_name): Disable LIBRARY
375         keyword.
376
377 2012-02-22  Alan Modra  <amodra@gmail.com>
378
379         PR ld/13683
380         * ldlang.c (lang_process): Rerun lang_do_assignments before
381         starting garbage collection.
382         * ldexp.c (fold_name): Generate a reloc for defined symbols
383         found without an associated output section during the mark phase.
384         (exp_fold_tree_1): Continue processing an expression, even if we
385         are unable to fold it, if we are in the first two evaluation
386         phases.
387         * ldexp.h (enum lang_phase_type): Add descriptions of the phases.
388
389 2012-02-19  Kai Tietz  <ktietz@redhat.com>
390
391         * deffilep.y (cmp_import_elem): Sort first by module name.
392         * pe-dll.c (process_def_file_and_drectve): Free strings
393         from removed export-element.
394         (add_bfd_to_link): Optimize loop on import-elements and lower
395         allocated memory.
396         (pe_implied_import_dll): Pass NULL instead of 0 for pointer
397         argument.
398
399 2012-02-18  Hans-Peter Nilsson  <hp@axis.com>
400
401         * ldmisc.c (vfinfo <%S>): Use same type and avoid cast for
402         temporary variable node used for NULL argument.
403
404 2012-02-18  Alan Modra  <amodra@gmail.com>
405
406         PR ld/13343
407         * ld.h (parsing_defsym): Delete.
408         * ldexp.c (exp_intop, exp_bigintop, exp_relop): Set type.filename.
409         (fold_binary, fold_name, exp_fold_tree_1, exp_get_vma, exp_get_fill,
410         exp_get_abs_int): Add tree arg for %S in error messages.  Don't
411         fudge lineno.
412         (exp_binop, exp_unop, exp_nameop, exp_assop, exp_assert): Copy
413         type.filename from sub-tree.
414         (exp_trinop): Likewise, and use "cond" rather than "lhs".
415         * ldexp.h (node_type): Add filename field to struct.
416         * ldfile.c (ldfile_input_filename): Delete.  Remove all refs.
417         * ldfile.h (ldfile_input_filename): Delete.
418         * ldgram.y (phdr_type, phdr_qualifiers, yyerror): Add NULL arg for
419         %S in error messages.
420         * ldemul.c (syslib_default, hll_default): Likewise.
421         * ldlang.c (lang_memory_region_lookup, lang_memory_region_alias,
422         lang_get_regions, lang_new_phdr): Likewise.
423         (lang_size_sections_1): Pass addr_tree for %S.
424         * ldlex.h (lex_redirect): Update prototype.
425         (ldlex_filename): Declare.
426         * ldlex.l (<EOF>): Don't set ldfile_input_filename.
427         (lex_redirect): Add fake_filename and count params.  Push
428         fake_filename to file_name_stack and init lineno from count.
429         (ldlex_filename): New function.
430         (lex_warn_invalid): Use above.
431         * ldmain.c (main): Update lex_redirect call.
432         * ldmisc.c (vfinfo <%S>): Take file name and line number from
433         etree_type arg, or use current if arg is NULL.
434         * lexsup.c (parsing_defsym): Delete.
435         (parse_args <OPTION_DEFSYM>): Update lex_redirect call.
436
437 2012-02-13  Kai Tietz  <ktietz@redhat.com>
438
439         * deffilep.y (find_export_in_list): Set is_indent for
440         first or last element, if identical.
441         (find_import_in_list): Likewise.
442
443 2012-02-11  Kai Tietz  <ktietz@redhat.com>
444
445         * deffilep.y (%union): New type id_const.
446         (opt_name2): New rule.
447         (keyword_as_name): New rule.
448         (dot_name): Replaced by opt_name2 rule.
449         (opt_name): Adjust rule.
450         (opt_equal_name): Likewise.
451
452 2012-02-11  Pascal Obry  <pascal@obry.net>
453
454         * pe-dll.c (auto_export): Use bsearch to speed up scan of exports
455         table.
456         (process_def_file_and_drectve): Maintain sorting of exports table
457         after stripping leading @ signs.
458
459 2012-02-09  Alan Modra  <amodra@gmail.com>
460
461         * ldgram.y (input_section_spec_no_keep): Don't ignore sect_flags.
462
463 2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
464
465         PR ld/13616
466         * emulparams/elf32_x86_64.sh: Remove NOP.
467         * emulparams/elf_i386.sh: Likewise.
468         * emulparams/elf_i386_be.sh: Likewise.
469         * emulparams/elf_i386_ldso.sh: Likewise.
470         * emulparams/elf_i386_vxworks.sh: Likewise.
471         * emulparams/elf_k1om.sh: Likewise.
472         * emulparams/elf_l1om.sh: Likewise.
473         * emulparams/elf_x86_64.sh: Likewise.
474
475         * ldlang.c (zero_fill): Initialized to 0.
476
477         * ldwrite.c (build_link_order): Set data size to linker odrder
478         size when they are the same.
479
480         * scripttempl/elf.sc: Don't specify fill if NOP is undefined.
481
482 2012-01-17  Alan Modra  <amodra@gmail.com>
483
484         * ldver.c (ldversion): Update copyright message year.
485
486 2012-01-15  Alan Modra  <amodra@gmail.com>
487
488         PR ld/12758
489         * ldlang.c (lang_process): Don't reopen all files, just those
490         newly added by plugin.
491
492 2012-01-11  Alan Modra  <amodra@gmail.com>
493
494         * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE,
495         PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
496         PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and
497         --{no-,}plt-align.
498         (plt_thread_safe, plt_stub_align): New vars.
499         (gld${EMULATION_NAME}_after_allocation): Pass them to
500         ppc64_elf_size_stubs.  Align stub sections according to plt_stub_align.
501         * ld.texinfo: Document new command line options, and an old
502         undocumented option.
503
504 2012-01-09  Roland McGrath  <mcgrathr@google.com>
505
506         * configure.in: Use AM_ZLIB.
507         * configure: Regenerated.
508
509 For older changes see ChangeLog-2011
510 \f
511 Local Variables:
512 mode: change-log
513 left-margin: 8
514 fill-column: 74
515 version-control: never
516 End: