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