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