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