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