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