Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section
[external/binutils.git] / ld / ChangeLog
1 2012-05-05  Alan Modra  <amodra@gmail.com>
2
3         * pe-dll.c (process_def_file_and_drectve): Use bfd_und_section_ptr.
4         (generate_reloc): Use bfd_abs_section_ptr.
5
6 2012-05-04  H.J. Lu  <hongjiu.lu@intel.com>
7
8         * configure.tgt: Support x86_64-*-linux-gnux32.
9
10 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
11
12         * Makefile.am (ALL_EMULATIONS): Added new emulation for XGATE
13         and XGATE (elf).
14         * Makefile.in: Rebuild.
15         * configure.tgt: Recognize XGATE.
16         * scripttempl/elfxgate.sc: New file, mostly cloned from m68hc12.
17         * emulparams/xgateelf: New emulation, mostly cloned from m68hc12.
18         * NEWS: Mention new support.
19
20 2012-04-26  Hans-Peter Nilsson  <hp@axis.com>
21
22         Make bfd asserts cause linker errors.
23         * ldmain.c (default_bfd_assert_handler): New variable.
24         (ld_bfd_assert_handler): New function.
25         (main): Call bfd_set_assert_handler.
26
27 2012-04-24  Alan Modra  <amodra@gmail.com>
28
29         * ld/ldlang.c (size_input_section): Use sec_info_type rather than
30         usrdata->flags.just_syms.
31         * ld/ldwrite.c (build_link_order): Likewise.
32         * ld/emultempl/hppaelf.em (build_section_lists): Likewise.
33         * ld/emultempl/ppc64elf.em (build_toc_list): Likewise.
34         * ld/emultempl/armelf.em (build_section_lists): Likewise.
35         (after_allocation): Update for renamed sec_info_type value.
36         * ld/emultempl/tic6xdsbt.em: Likewise.
37
38 2012-04-12  Roland McGrath  <mcgrathr@google.com>
39
40         * configure.tgt (arm*-*-nacl*, arm*b-*-nacl*): Handle them.
41         * emulparams/armelf_nacl.sh: New file.
42         * emulparams/armelfb_nacl.sh: New file.
43         * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_nacl.c
44         and earmelfb_nacl.c here.
45         (earmelf_nacl.c, earmelfb_nacl.c): New targets.
46         * Makefile.in: Regenerated.
47
48 2012-04-11  Tristan Gingold  <gingold@adacore.com>
49
50         * scripttempl/ia64vms.sc: New file.
51         * emultempl/vms.em (_before_parse): Support for ia64.
52         (elf64-ia64-vms): New fragment for ia64.
53         * emulparams/elf64_ia64_vms.sh: New file.
54         * configure.tgt (ia64-*-*vms*): Add.
55         * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c
56         (eelf64_ia64_vms.c): New rule.
57         * Makefile.in: Regenerate.
58
59 2012-04-06  Roland McGrath  <mcgrathr@google.com>
60
61         * configure.in (AC_CHECK_HEADERS): Add locale.h.
62         * config.in: Regenerate.
63         * configure: Regenerate.
64
65 2012-04-05  Nick Clifton  <nickc@redhat.com>
66
67         * configure.in (AC_CHECK_FUNCS): Add setlocale.
68         (AM_LC_MESSAGES): Add.
69         * aclocal.m4: Regenerate.
70         * config.in: Regenerate.
71         * configure: Regenerate.
72
73 2012-04-03  Roland McGrath  <mcgrathr@google.com>
74
75         * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
76         * emulparams/elf_nacl.sh: New file.
77         * emulparams/elf_i386_nacl.sh: New file.
78         * emulparams/elf32_x86_64_nacl.sh: New file.
79         * emulparams/elf_x86_64_nacl.sh: New file.
80         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
81         (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
82         eelf_x86_64_nacl.c here.
83         (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
84         New targets.
85         * Makefile.in: Regenerated.
86
87         * scripttempl/elf.sc: Handle SEPARATE_CODE cases.
88
89 2012-04-02  Mike Frysinger  <vapier@gentoo.org>
90
91         * ldmisc.c (vfinfo): Assign new local str to fmt.  Delete
92         putc call.  If str and fmt are different, call fwrite on
93         the difference.
94
95 2012-03-30  Nick Clifton  <nickc@redhat.com>
96
97         * po/vi.po: Updated Vietnamese translation.
98
99 2012-03-27  Roland McGrath  <mcgrathr@google.com>
100
101         * configure.in: Set want64 on a 64-bit host regardless of
102         --enable-targets=all.
103         * configure: Regenerated.
104
105 2012-03-26  Tristan Gingold  <gingold@adacore.com>
106
107         * lexsup.c (parse_args): Add a missing '\n'.
108
109 2012-03-25  Alan Modra  <amodra@gmail.com>
110
111         * ldemul.c (before_allocation_default): Revert last change.
112         ldlang.c (lang_add_section): Likewise.
113         (strip_excluded_output_sections): Don't strip output sections with
114         user input sections when emitrelocations, unless all are SEC_EXCLUDE.
115
116 2012-03-23  Alan Modra  <amodra@gmail.com>
117
118         * ldemul.c (before_allocation_default): When emitrelocations,
119         don't strip sections..
120         * ldlang.c (lang_add_section): ..and don't set up map_head, map_tail.
121
122 2012-03-14  Kai Tietz  <ktietz@redhat.com>
123             Pascal Obry  <pascal@obry.net>
124
125         * pe-dll.c (found_sym): New static variable.
126         (undef_count): Likewise.
127         (key_value): New structure.
128         (undef_sort_cmp): Compare routine for qsort/bsearch.
129         (pe_find_cdecl_alias_match): Add new argument.
130         (pe_undef_alias_cdecl_match): Removed.
131         (pe_undef_count): New helper routine.
132         (pe_create_undef_table): Likewise.
133         (pe_process_import_defs): Use pe_create_undef_table and
134         new pe_undef_alias_cdecl_match function.
135
136 2012-03-14  Alan Modra  <amodra@gmail.com>
137
138         PR ld/13839
139         * ldexp.c (fold_name): Ignore undefined symbols when assigning to
140         dot in mark phase.
141         (exp_fold_tree_1): Evaluate assignment to dot expressions even when
142         discarding result, for side effects.  Fix typo in error message.
143
144 2012-03-08  Tristan Gingold  <gingold@adacore.com>
145
146         * ldexp.c (exp_print_tree): Special case for SEGMENT_START.
147         (exp_print_token): Constify.
148
149 2012-03-08  Alan Modra  <amodra@gmail.com>
150
151         PR ld/10340
152         * ldfile.c (is_sysrooted_pathname): Remove notsame param.
153         (ldfile_add_library_path): Don't set sysrooted flag.
154         (ldfile_open_file_search): Likewise, and don't copy them.
155         (try_open): Delete exten and code handling such.  Add sysrooted
156         param and return whether path is in sysroot.
157         (ldfile_find_command_file): Delete extend param.  Add sysrooted
158         param.  Rename local var.  Update try_open calls.
159         (ldfile_open_command_file_1): Pass sysrooted to lex_push_file.
160         * ldfile.h (search_dirs_type): Remove sysrooted field.
161         * ldlang.c (new_afile): Always set sysrooted from input_flags.
162         (load_symbols): Don't set input_flags.sysrooted.
163         * ldlang.h (struct lang_input_statement_flags): Revise sysrooted
164         comment.
165         * ldlex.h (lex_push_file): Update prototype.
166         * ldlex.l (sysrooted_stack): New array.
167         (EOF): Pop input_flags.sysrooted.
168         (lex_push_file): Add sysrooted param.  Save and set
169         input_flags.sysrooted.
170
171 2012-03-06  Alan Modra  <amodra@gmail.com>
172
173         * ldlang.h (struct lang_input_statement_flags): New, extract from..
174         (lang_input_statement_type): ..here.  New field "flags".
175         (input_flags): Declare.
176         (missing_file): Delete.
177         * ldmain.h (whole_archive): Delete.
178         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
179         * ld.h (ld_config_type <dynamic_link>): Delete.
180         * ldmain.c (whole_archive): Delete.
181         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
182         * ldlang.c (missing_file, ldlang_sysrooted_script): Delete.
183         (input_flags): New variable.  Replace all uses of config.dynamic_link,
184         missing_file, ldlang_sysrooted_script, whole_archive,
185         add_DT_NEEDED_for_regular and add_DT_NEEDED_for_dynamic with fields
186         from here.
187         * ldfile.c: Likewise.
188         * ldgram.y: Likewise.
189         * ldmain.c: Likewise.
190         * ldwrite.c: Likewise.
191         * lexsup.c: Likewise.
192         * plugin.c: Likewise.
193         * emultempl/aix.em: Likewise.
194         * emultempl/armelf.em: Likewise.
195         * emultempl/elf32.em: Likewise.
196         * emultempl/hppaelf.em: Likewise.
197         * emultempl/linux.em: Likewise.
198         * emultempl/pe.em: Likewise.
199         * emultempl/pep.em: Likewise.
200         * emultempl/ppc64elf.em: Likewise.
201         * emultempl/scoreelf.em: Likewise.
202         * emultempl/spuelf.em: Likewise.
203         * emultempl/sunos.em: Likewise.
204         * emultempl/vms.em: Likewise.
205         * ldlang.c (new_afile): Use memset to init zero fields.
206         (load_symbols): Simplify save and restore of flags around command
207         file processing.
208         * ldfile.c (is_sysrooted_pathname): Tidy.
209
210 2012-03-05  Hans-Peter Nilsson  <hp@axis.com>
211
212         * configure.tgt (mips64*el-*-freebsd*, mips64*-*-freebsd*)
213         (mips*el-*-freebsd*, mips*-*-freebsd*): Correct triplets by
214         replacing trailing "-*" with "*".
215
216 2012-02-25  Walter Lee  <walt@tilera.com>
217
218         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx_be.c.
219         (ALL_64_EMULATION_SOURCES): Add eelf64tilegx_be.c.
220         (eelf32tilegx_be.c): Add rule to build this file.
221         (eelf64tilegx_be.c): Ditto.
222         * Makefile.in: Regenerate.
223         * configure.tgt (tilegx-*-*): Support big endian.
224         (tilegxbe-*-*): New.
225         * emulparams/elf32tilegx.sh (OUTPUT_FORMAT): Rename.
226         (BIG_OUTPUT_FORMAT): Define.
227         (LITTLE_OUTPUT_FORMAT): Define.
228         * emulparams/elf32tilegx_be.sh: New.
229         * emulparams/elf64tilegx.sh (OUTPUT_FORMAT): Rename.
230         (BIG_OUTPUT_FORMAT): Define.
231         (LITTLE_OUTPUT_FORMAT): Define.
232         * emulparams/elf64tilegx_be.sh: New.
233
234 2012-02-24  Kai Tietz  <ktietz@redhat.com>
235
236         PR binutils/13710
237         * deffilep.y (keyword_as_name): Disable LIBRARY
238         keyword.
239
240 2012-02-22  Alan Modra  <amodra@gmail.com>
241
242         PR ld/13683
243         * ldlang.c (lang_process): Rerun lang_do_assignments before
244         starting garbage collection.
245         * ldexp.c (fold_name): Generate a reloc for defined symbols
246         found without an associated output section during the mark phase.
247         (exp_fold_tree_1): Continue processing an expression, even if we
248         are unable to fold it, if we are in the first two evaluation
249         phases.
250         * ldexp.h (enum lang_phase_type): Add descriptions of the phases.
251
252 2012-02-19  Kai Tietz  <ktietz@redhat.com>
253
254         * deffilep.y (cmp_import_elem): Sort first by module name.
255         * pe-dll.c (process_def_file_and_drectve): Free strings
256         from removed export-element.
257         (add_bfd_to_link): Optimize loop on import-elements and lower
258         allocated memory.
259         (pe_implied_import_dll): Pass NULL instead of 0 for pointer
260         argument.
261
262 2012-02-18  Hans-Peter Nilsson  <hp@axis.com>
263
264         * ldmisc.c (vfinfo <%S>): Use same type and avoid cast for
265         temporary variable node used for NULL argument.
266
267 2012-02-18  Alan Modra  <amodra@gmail.com>
268
269         PR ld/13343
270         * ld.h (parsing_defsym): Delete.
271         * ldexp.c (exp_intop, exp_bigintop, exp_relop): Set type.filename.
272         (fold_binary, fold_name, exp_fold_tree_1, exp_get_vma, exp_get_fill,
273         exp_get_abs_int): Add tree arg for %S in error messages.  Don't
274         fudge lineno.
275         (exp_binop, exp_unop, exp_nameop, exp_assop, exp_assert): Copy
276         type.filename from sub-tree.
277         (exp_trinop): Likewise, and use "cond" rather than "lhs".
278         * ldexp.h (node_type): Add filename field to struct.
279         * ldfile.c (ldfile_input_filename): Delete.  Remove all refs.
280         * ldfile.h (ldfile_input_filename): Delete.
281         * ldgram.y (phdr_type, phdr_qualifiers, yyerror): Add NULL arg for
282         %S in error messages.
283         * ldemul.c (syslib_default, hll_default): Likewise.
284         * ldlang.c (lang_memory_region_lookup, lang_memory_region_alias,
285         lang_get_regions, lang_new_phdr): Likewise.
286         (lang_size_sections_1): Pass addr_tree for %S.
287         * ldlex.h (lex_redirect): Update prototype.
288         (ldlex_filename): Declare.
289         * ldlex.l (<EOF>): Don't set ldfile_input_filename.
290         (lex_redirect): Add fake_filename and count params.  Push
291         fake_filename to file_name_stack and init lineno from count.
292         (ldlex_filename): New function.
293         (lex_warn_invalid): Use above.
294         * ldmain.c (main): Update lex_redirect call.
295         * ldmisc.c (vfinfo <%S>): Take file name and line number from
296         etree_type arg, or use current if arg is NULL.
297         * lexsup.c (parsing_defsym): Delete.
298         (parse_args <OPTION_DEFSYM>): Update lex_redirect call.
299
300 2012-02-13  Kai Tietz  <ktietz@redhat.com>
301
302         * deffilep.y (find_export_in_list): Set is_indent for
303         first or last element, if identical.
304         (find_import_in_list): Likewise.
305
306 2012-02-11  Kai Tietz  <ktietz@redhat.com>
307
308         * deffilep.y (%union): New type id_const.
309         (opt_name2): New rule.
310         (keyword_as_name): New rule.
311         (dot_name): Replaced by opt_name2 rule.
312         (opt_name): Adjust rule.
313         (opt_equal_name): Likewise.
314
315 2012-02-11  Pascal Obry  <pascal@obry.net>
316
317         * pe-dll.c (auto_export): Use bsearch to speed up scan of exports
318         table.
319         (process_def_file_and_drectve): Maintain sorting of exports table
320         after stripping leading @ signs.
321
322 2012-02-09  Alan Modra  <amodra@gmail.com>
323
324         * ldgram.y (input_section_spec_no_keep): Don't ignore sect_flags.
325
326 2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
327
328         PR ld/13616
329         * emulparams/elf32_x86_64.sh: Remove NOP.
330         * emulparams/elf_i386.sh: Likewise.
331         * emulparams/elf_i386_be.sh: Likewise.
332         * emulparams/elf_i386_ldso.sh: Likewise.
333         * emulparams/elf_i386_vxworks.sh: Likewise.
334         * emulparams/elf_k1om.sh: Likewise.
335         * emulparams/elf_l1om.sh: Likewise.
336         * emulparams/elf_x86_64.sh: Likewise.
337
338         * ldlang.c (zero_fill): Initialized to 0.
339
340         * ldwrite.c (build_link_order): Set data size to linker odrder
341         size when they are the same.
342
343         * scripttempl/elf.sc: Don't specify fill if NOP is undefined.
344
345 2012-01-17  Alan Modra  <amodra@gmail.com>
346
347         * ldver.c (ldversion): Update copyright message year.
348
349 2012-01-15  Alan Modra  <amodra@gmail.com>
350
351         PR ld/12758
352         * ldlang.c (lang_process): Don't reopen all files, just those
353         newly added by plugin.
354
355 2012-01-11  Alan Modra  <amodra@gmail.com>
356
357         * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE,
358         PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
359         PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and
360         --{no-,}plt-align.
361         (plt_thread_safe, plt_stub_align): New vars.
362         (gld${EMULATION_NAME}_after_allocation): Pass them to
363         ppc64_elf_size_stubs.  Align stub sections according to plt_stub_align.
364         * ld.texinfo: Document new command line options, and an old
365         undocumented option.
366
367 2012-01-09  Roland McGrath  <mcgrathr@google.com>
368
369         * configure.in: Use AM_ZLIB.
370         * configure: Regenerated.
371
372 For older changes see ChangeLog-2011
373 \f
374 Local Variables:
375 mode: change-log
376 left-margin: 8
377 fill-column: 74
378 version-control: never
379 End: