daily update
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2013-04-09 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2
3 PR ld/12494
4 * bfd/elf32-avr.c: Consider all sections to determine if linker
5 relaxation can safely delete a ret after a call/jmp
6
7 2013-04-09 Mingjie Xing <mingjie.xing@gmail.com>
8
9 * bfd.c (typedef bfd, Error reporting, Miscellaneous): Add
10 INODEs.
11
12 2013-04-08 Tom Tromey <tromey@redhat.com>
13
14 * som.c (bfd_section_from_som_symbol): No longer static.
15 * som.h (bfd_section_from_som_symbol): Declare.
16
17 2013-04-06 Alan Modra <amodra@gmail.com>
18
19 * elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
20 * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
21
22 2013-04-05 Nick Clifton <nickc@redhat.com>
23
24 * elflink.c (elf_link_add_object_symbols): Revert accidental commit.
25
26 2013-04-04 Alan Modra <amodra@gmail.com>
27
28 * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
29 * bfd-in2.h: Regenerate.
30 * elflink.c (elf_link_add_object_symbols): Use new error.
31
32 2013-04-03 Nick Clifton <nickc@redhat.com>
33
34 * elf32-v850.c (v850_elf_is_target_special_symbol): New function.
35 (bfd_elf32_bfd_is_target_special_symbol): Define.
36
37 2013-04-03 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
38
39 * elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
40 elf64_aarch64_locals to get local GOT reference counts.
41
42 2013-04-02 DJ Delorie <dj@redhat.com>
43
44 * elf32-rl78.c (GET_RELOC): Assert that there are relocs to get.
45 (rl78_elf_relax_section): Only fetch the next reloc if there is
46 one expected.
47
48 2013-03-30 Alan Modra <amodra@gmail.com>
49
50 PR ld/15323
51 * elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
52 global symbols referenced by relocs.
53 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
54 * elf32-bfin.c (bfin_check_relocs): Likewise.
55 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
56 * elf32-cris.c (cris_elf_check_relocs): Likewise.
57 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
58 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
59 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
60 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
61 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
62 * elf32-i370.c (i370_elf_check_relocs): Likewise.
63 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
64 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
65 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
66 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
67 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
68 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
69 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
70 * elf32-metag.c (elf_metag_check_relocs): Likewise.
71 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
72 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
73 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
74 * elf32-mt.c (mt_elf_check_relocs): Likewise.
75 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
76 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
77 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
78 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
79 * elf32-s390.c (elf_s390_check_relocs): Likewise.
80 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
81 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
82 * elf32-sh.c (sh_elf_check_relocs): Likewise.
83 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
84 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
85 * elf32-v850.c (v850_elf_check_relocs): Likewise.
86 * elf32-vax.c (elf_vax_check_relocs): Likewise.
87 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
88 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
89 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
90 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
91 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
92 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
93 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
94 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
95 * elf64-s390.c (elf_s390_check_relocs): Likewise.
96 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
97 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
98 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
99 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
100 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't
101 test indirect/warning links for NULL.
102
103 2013-03-29 H.J. Lu <hongjiu.lu@intel.com>
104
105 PR ld/15323
106 * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
107 symbol is referenced by a non-shared object.
108 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
109
110 2013-03-28 Joe Seymour <jseymour@codesourcery.com>
111
112 * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
113 R_SH_REL32 relocations against undefined weak symbols.
114
115 2013-03-28 Alan Modra <amodra@gmail.com>
116
117 * elf64-ppc.c (struct ppc_dyn_relocs): New.
118 (ppc64_elf_check_relocs): Separate dynrel counts for local syms
119 into ifunc and non-ifunc.
120 (dec_dynrel_count): Pass in sym rather than sym_sec. Handle
121 separate ifunc/non-ifunc dynrel counts.
122 (allocate_got): Always use reliplt for ifunc.
123 (allocate_dynrelocs): Likewise.
124 (ppc64_elf_size_dynamic_sections): Likewise.
125 (ppc64_elf_layout_multitoc): Likewise.
126 (ppc64_elf_relocate_section): Likewise.
127
128 2013-03-28 Alan Modra <amodra@gmail.com>
129
130 * elf32-ppc.c (struct ppc_dyn_relocs): New.
131 (ppc_elf_check_relocs): Separate dynrel counts for local syms
132 into ifunc and non-ifunc.
133 (allocate_dynrelocs): Always put ifunc relocs into reliplt.
134 (ppc_elf_size_dynamic_sections): Likewise.
135 (ppc_elf_relocate_section): Likewise.
136
137 2013-03-28 Alan Modra <amodra@gmail.com>
138
139 * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
140 (struct elf_backend_data <elf_backed_reloc_type_class>): Add
141 bfd_link_info* and asection* params.
142 (_bfd_elf_reloc_type_class): Likewise.
143 * elf.c (_bfd_elf_reloc_type_class): Likewise.
144 * elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
145 (elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
146 * elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
147 for any reliplt reloc. Don't return reloc_class_plt for
148 R_PPC_REL24 and R_PPC_ADDR24.
149 * elf64-ppc.c (allocate_got): Formatting.
150 (ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
151 reliplt reloc.
152 * elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
153 * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
154 * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
155 * elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
156 * elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
157 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
158 * elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
159 Add extra params to the various reloc_type_class functions.
160
161 2013-03-27 Alan Modra <amodra@gmail.com>
162
163 * elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
164 masks for all local ifunc syms.
165 (allocate_dynrelocs): Don't use htab->relgot for ifunc.
166 (ppc_elf_size_dynamic_sections): Likewise.
167 (ppc_elf_relocate_section): Likewise.
168
169 2013-03-27 Will Newton <will.newton@linaro.org>
170
171 * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
172 dynamic reloc for symbols with dynindx == -1.
173 (allocate_dynrelocs_for_symbol): Avoid allocating space for a
174 dynamic reloc for symbols with dynindx == -1.
175
176 2013-03-27 Will Newton <will.newton@linaro.org>
177
178 * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
179 dynamic reloc for non-default visibility undefined weaks.
180 (allocate_dynrelocs_for_symbol): Avoid allocating space for a
181 dynamic reloc for non-default visibility undefined weaks.
182
183 2013-03-26 Alan Modra <amodra@gmail.com>
184
185 * elflink.c (_bfd_elf_add_default_symbol): Preserve section
186 over _bfd_elf_merge_symbol calls.
187
188 2013-03-26 Alan Modra <amodra@gmail.com>
189
190 * elflink.c (elf_link_add_object_symbols): Add assertion for
191 common override alignment check code. Formatting.
192
193 2013-03-25 Alan Modra <amodra@gmail.com>
194
195 * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
196 usual common symbols as well as for dynamic. Add poldbfd param.
197 Save old bfd. Adjust callers.
198 (_bfd_elf_add_default_symbol): Add poldbfd param. Pass "section"
199 and "value" by value, not pointer. Adjust caller.
200 (elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
201 Delete code to set same. Use old_bfd and old_alignment from
202 _bfd_elf_merge_symbol instead. Add default symbol before
203 alignment and size checks. Wrap overlong lines.
204
205 2013-03-25 Alan Modra <amodra@gmail.com>
206
207 * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
208 (elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
209 when override is true.
210
211 2013-03-25 Alan Modra <amodra@gmail.com>
212
213 * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
214 of *sym_hash.
215
216 2013-03-25 Alan Modra <amodra@gmail.com>
217
218 * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
219 Wrap long lines.
220 (elf_link_add_object_symbols): Discard TLS symbols for --just-syms
221 early in symbol loop.
222
223 2013-03-25 Alan Modra <amodra@gmail.com>
224
225 * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
226 (_bfd_elf_init_reloc_shdr): Delete.
227 * elf.c (_bfd_elf_init_reloc_shdr): Make static.
228 * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
229 just what is needed.
230 * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
231
232 2013-03-23 Alan Modra <amodra@gmail.com>
233
234 * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
235 * elflink.c (_bfd_elf_merge_symbol): Make static.
236 * elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
237 _bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
238
239 2013-03-23 Alan Modra <amodra@gmail.com>
240
241 PR ld/15270
242 * elflink.c (elf_link_add_object_symbols): Don't set def_regular
243 or ref_regular for BFD_PLUGIN owned syms, or have them affect
244 def_dynamic/ref_dynamic.
245 (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
246 owned syms.
247
248 2013-03-22 David S. Miller <davem@davemloft.net>
249
250 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Set type of
251 hwcaps attribute.
252
253 2013-03-22 Achille Fouilleul <achille.fouilleul+binutils@gadz.org>
254
255 PR ld/14902
256 * elf32-h8300.c (elf32_h8_relax_delete_bytes): Fix off by one
257 errors adjusting relocs and symbols.
258
259 2013-03-21 Michael Schewe <michael.schewe@gmx.net>
260
261 * elf32-h8300 (h8_relax_section): Add new relaxation of mov
262 @(disp:32,ERx) to mov @(disp:16,ERx).
263 (R_H8_DISP32A16): New reloc.
264 Comments added and corrected.
265 * reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
266 * bfd-in2.h: Regenerate.
267 * libbfd.h: Regenerate.
268
269 2013-03-21 Kai Tietz <ktietz@redhat.com>
270
271 * coffgen.c (coff_real_object_p): Make global.
272 * peicode.h (coff_real_object_p): Add prototype.
273 (FILHDR): Defined for COFF_IMAGE_WITH_PE as
274 external_PEI_IMAGE_hdr structure.
275 (coff_swap_filehdr_in): Handle variable header-size.
276 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount
277 of directory-entiries as specified in pe-header.
278
279 2013-03-21 Nick Clifton <nickc@redhat.com>
280
281 PR sim/15286
282 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
283 iWMMXt and iWMMXt2 processors from attributes.
284
285 2013-03-20 Alan Modra <amodra@gmail.com>
286
287 * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
288 sh_type according to is_rela.
289
290 2013-03-18 Alan Modra <amodra@gmail.com>
291
292 PR ld/12549
293 * elflink.c (elf_link_add_object_symbols): Exclude weak refs when
294 considering whether an --as-needed library is needed.
295
296 2013-03-14 Tom Tromey <tromey@redhat.com>
297
298 * opncls.c (bfd_get_debug_link_info): Rename from
299 get_debug_link_info. Export. Update comment.
300 (find_separate_debug_file): Update.
301 * bfd-in2.h: Rebuild.
302
303 2013-03-08 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
304
305 * elf64-aarch64.c (elf_backend_can_gc_sections): Enable gc-section
306 support.
307 (elf64_aarch64_gc_sweep_hook): Handle GOT, TLS and PLT related
308 relocs.
309
310 2013-03-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
311
312 * elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
313 * elf.c (elfcore_write_s390_tdb): New function.
314 (elfcore_write_register_note): Call it.
315 (elfcore_grok_s390_tdb): New function.
316 (elfcore_grok_note): Call it.
317
318 2013-03-08 Maciej W. Rozycki <macro@codesourcery.com>
319
320 * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type.
321
322 2013-03-05 Corinna Vinschen <vinschen@redhat.com>
323
324 * config.bfd: Add x86_64-*-cygwin to list of supported targets.
325
326 2013-03-04 Alan Modra <amodra@gmail.com>
327
328 * elf32-ppc.c (ppc_elf_relocate_section <R_PPC_PLTREL24>): Adjust
329 non-zero addends when relocatable, rather than addends >= 32768.
330 Always zero "addend" before applying relocation.
331
332 2013-03-04 Nick Clifton <nickc@redhat.com>
333
334 * archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
335 file pointer offsets for thin archives.
336
337 2013-02-28 Nathan Sidwell <nathan@codesourcery.com>
338
339 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
340 elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
341
342 2013-02-27 DJ Delorie <dj@redhat.com>
343
344 * reloc.c (BFD_RELOC_RL78_CODE): Add.
345 * libbfd.h: Regenerate.
346 * bfd-in2.h: Regenerate.
347 * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
348 references in compuated relocs.
349
350 2013-02-26 Anthony Green <green@moxielogic.com>
351
352 * config.bfd: Extend moxie-rtems target triplet name support.
353
354 2013-02-21 H.J. Lu <hongjiu.lu@intel.com>
355
356 PR ld/15167
357 * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
358 unique_global only for definition.
359 * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
360 here.
361 (elf_link_add_object_symbols): Set unique_global only
362 for definition.
363
364 2013-02-21 Alan Modra <amodra@gmail.com>
365
366 * elf-bfd.h (struct elf_build_id): Extracted from..
367 (struct elf_build_id_info): ..here. Delete.
368 (struct output_elf_obj_tdata): New, extracted from..
369 (struct elf_obj_tdata): ..here. Reorganize for better packing.
370 Add "o" field.
371 (elf_program_header_size): Reference tdata->o.
372 (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
373 elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec,
374 elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise.
375 * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata
376 when opening bfd in any mode that might write.
377 (_bfd_elf_write_object_contents): Use build_id field in
378 output_elf_obj_tdata.
379 (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test.
380 (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes.
381
382 2013-02-21 Alan Modra <amodra@gmail.com>
383
384 * elf-bfd.h (struct core_elf_obj_tdata): New.
385 (struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
386 core_program, and core_command. Add "core".
387 * elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
388 Update all refs to tdata core fields.
389 * elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
390 * elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
391 * elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
392 * elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
393 * elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
394 * elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
395 * elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
396 to tdata core fields.
397
398 2013-02-21 Alan Modra <amodra@gmail.com>
399
400 * elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
401 Delete num_locals and num_globals.
402 (elf_num_locals, elf_num_globals): Don't define.
403 (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
404 elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
405 * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
406 * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
407 * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
408 * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
409 accessor macros.
410 * elf.c (elf_map_symbols): Add pnum_locals param. Return
411 number of locals syms via new param.
412 (swap_out_syms): Adjust to suit elf_map_symbols change.
413
414 2013-02-19 Maciej W. Rozycki <macro@codesourcery.com>
415
416 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clear
417 STO_MICROMIPS annotation.
418
419 2013-02-19 Alan Modra <amodra@gmail.com>
420
421 * configure.in: Bump version to 2.23.52.
422 * elf-bfd.h (struct elf_build_id_info): New.
423 (struct elf_obj_tdata): Delete after_write_object_contents,
424 after_write_object_contents_info and build_id_size. Make build_id
425 a pointer to struct elf_build_id_info.
426 * elf.c (_bfd_elf_write_object_contents): Style. Update
427 after_write_ibject_contents invocation.
428 (elfobj_grok_gnu_build_id): Update for new build_id struct. Don't
429 allow zero size notes.
430 * configure: Regenerate.
431
432 2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
433
434 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
435 R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
436 (micromips_elf64_howto_table_rela): Likewise.
437 (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
438 * elfn32-mips.c (elf_micromips_howto_table_rel): Add
439 R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
440 (elf_micromips_howto_table_rela): Likewise.
441 (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
442
443 2013-02-18 Paul Brook <paul@codesourcery.com>
444
445 * elfxx-mips.c (MICROMIPS_P): New macro.
446 (_bfd_mips_elf_symbol_processing): Use it.
447
448 2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
449
450 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
451 comment on _PROCEDURE_LINKAGE_TABLE_ creation.
452
453 2013-02-18 Alan Modra <amodra@gmail.com>
454
455 PR ld/12549
456 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
457 (_bfd_elf_strtab_clear_all_refs): Declare.
458 (_bfd_elf_strtab_resize): Declare.
459 * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
460 (_bfd_elf_strtab_clear_all_refs): New function.
461 (_bfd_elf_strtab_resize): Likewise.
462 * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
463
464 2013-02-18 Alan Modra <amodra@gmail.com>
465
466 * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
467 local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section,
468 and elf_text_section to..
469 * elfxx-mips.c (struct mips_elf_obj_tdata): ..here. Update all refs.
470 * elf64-alpha.c (struct mips_elf_find_line): Rename to..
471 (struct alpha_elf_find_line): ..this.
472 (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
473
474 2013-02-16 H.J. Lu <hongjiu.lu@intel.com>
475
476 PR ld/15146
477 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
478 for references from the dummy bfd.
479
480 2013-02-16 H.J. Lu <hongjiu.lu@intel.com>
481
482 PR ld/15149
483 * elflink.c (elf_link_add_object_symbols): Also track weak
484 references.
485
486 2013-02-15 H.J. Lu <hongjiu.lu@intel.com>
487
488 PR binutils/15151
489 * archive.c (_bfd_find_nested_archive): Don't allow a nested
490 archive pointing to itself.
491 (_bfd_get_elt_at_filepos): Revert the last 2 changes.
492
493 2013-02-15 Nick Clifton <nickc@redhat.com>
494
495 PR binutils/15140
496 * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
497 accessing a corrupt nested archive.
498
499 2013-02-13 Richard Sandiford <rdsandiford@googlemail.com>
500
501 * elfxx-mips.c (mips_got_page_ref): New structure.
502 (mips_got_page_entry): Use a section rather than a (bfd, symndx)
503 pair to represent the anchor point.
504 (mips_got_info): Add a got_page_refs field.
505 (mips_elf_link_hash_table): Add a sym_cache field.
506 (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
507 (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
508 new anchor representation.
509 (mips_elf_create_got_info): Create got_page_refs rather than
510 got_page_entries.
511 (mips_elf_record_got_page_ref): New function.
512 (mips_elf_pages_for_range): Move further down file.
513 (mips_elf_record_got_page_entry): Likewise. Take a got as argument.
514 Use a section rather than a (bfd, symndx) pair to represent the
515 anchor point.
516 (mips_elf_resolve_got_page_ref): New function.
517 (mips_elf_resolve_final_got_entries): Use it to populate
518 got_page_entries.
519 (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
520 rather than mips_elf_record_got_page_entry. Only nullify h
521 afterwards.
522 (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
523 earlier.
524
525 2013-02-12 Richard Sandiford <rdsandiford@googlemail.com>
526
527 * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
528 in g->relocs.
529
530 2013-02-12 Alan Modra <amodra@gmail.com>
531
532 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
533 suitable definition when using generic linker hash table.
534
535 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
536
537 * elfxx-mips.c (mips_elf_count_got_entries): Delete.
538 (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
539 mips_elf_traverse_got_arg. Count GOT entries.
540 (mips_elf_resolve_final_got_entries): Take the bfd_link_info
541 as argument. Update after above changes.
542 (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
543 mips_elf_count_got_entries. Update the calls to
544 mips_elf_resolve_final_got_entries.
545
546 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
547
548 * elfxx-mips.c (mips_got_tls_type): New enum.
549 (mips_got_entry): Add tls_initialized.
550 (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
551 (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
552 GOT_TLS_TYPE masks.
553 (mips_elf_reloc_tls_type, mips_tls_got_entries)
554 (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
555 (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
556 than GOT_NORMAL.
557 (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
558 arguments with a GOT entry. Remove GOT_TLS_TYPE masks. Use
559 tls_initialized rather than GOT_TLS_DONE.
560 (mips_tls_got_index): Delete.
561 (mips_elf_local_got_index, mips_elf_global_got_index): Use
562 mips_elf_initialize_tls_slots rather than mips_tls_got_index.
563 (mips_elf_record_got_entry): Initialize tls_initialized.
564
565 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
566
567 * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
568 (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
569 tls_ie_got_offset and tls_gd_got_offset.
570 (mips_elf_link_hash_newfunc): Remove initialization.
571 (mips_elf_create_got_info): Likewise.
572 (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
573 (mips_tls_single_got_index): Delete.
574 (mips_elf_local_got_index): Always use the GOT entry to track
575 GOT indices.
576 (mips_elf_global_got_index): Likewise.
577 (mips_elf_create_local_got_entry): Assert that TLS entries have
578 already been allocated.
579 (mips_elf_record_global_got_symbol): Don't initialize
580 tls_ie_type or tls_gd_type.
581 (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
582 (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
583 entry.
584 (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
585 the GOT entries.
586 (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
587 have been allocated.
588 (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
589 tls_ie_type and tls_gd_type.
590
591 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
592
593 * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid
594 aliasing violation. Check for htab allocation failures.
595
596 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
597
598 * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
599 split out from...
600 (mips_elf_global_got_index): ...here. Reorder arguments so that
601 the output bfd and info come first.
602 (mips_elf_calculate_relocation): Update the call to
603 mips_elf_global_got_index accordingly.
604 (_bfd_mips_elf_finish_dynamic_symbol): Use
605 mips_elf_primary_global_got_index rather than
606 mips_elf_global_got_index.
607 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
608
609 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
610
611 * elfxx-mips.c (mips_got_entry): Update comments.
612 (mips_elf_multi_got_entry_eq): Rename to...
613 (mips_elf_got_entry_eq): ...this, deleting the old definition.
614 (mips_elf_create_got_info): Remove master_got_p argument.
615 Always use mips_elf_got_entry_eq.
616 (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
617 Update calls accordingly.
618
619 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
620
621 * elfxx-mips.c (mips_got_info): Remove bfd2got.
622 (mips_elf_bfd2got_hash): Delete.
623 (mips_elf_got_per_bfd_arg): Remove bfd2got.
624 (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
625 (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
626 g->next to test for the multigot case. Use mips_elf_bfd_got rather
627 than mips_elf_got_for_ibfd.
628 (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
629 (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
630 (mips_elf_make_got_per_bfd): Replace with...
631 (mips_elf_add_got_entry): ...this new function.
632 (mips_elf_make_got_pages_per_bfd): Replace with...
633 (mips_elf_add_got_page_entry): ...this new function.
634 (mips_elf_merge_got_with): Replace bfd2got argument with separate
635 bfd and GOT arguments. Use mips_elf_add_got_entry and
636 mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
637 and mips_elf_make_got_pages_per_bfd. Use mips_elf_replace_bfd_got
638 to set the BFD's GOT and free the old table.
639 (mips_elf_merge_got): Replace bfd2got argument with separate
640 bfd and GOT arguments. Apply mips_elf_resolve_final_got_entries.
641 Use mips_elf_count_got_entries to count the number of entries in
642 each GOT. Update the calls to mips_elf_merge_got_with.
643 (mips_elf_adjust_gp): Use g->next to test for the multigot case.
644 Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
645 (mips_elf_multi_got): Don't create the bfd2got hash table.
646 Replace hash table traversal with a walk over the input bfds,
647 updating the call to mips_elf_merge_got. Use mips_elf_replace_bfd_got
648 to set the output bfd's GOT.
649 (mips_elf_lay_out_got): Rename "sub" to "ibfd". Record that all
650 bfds use the master GOT in the single-GOT case.
651 (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
652 rather than mips_elf_got_for_ibfd.
653
654 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
655
656 * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
657 (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
658 (mips_elf_record_global_got_symbol): Update the hash entry before
659 adding the mips_got_entry. Use mips_elf_record_got_entry to do
660 the latter.
661 (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
662 (mips_elf_record_got_page_entry): Record the entry in both the
663 master and bfd GOTs.
664
665 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
666
667 * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
668 create another one if necessary.
669 (mips_elf_set_gotidx): New function.
670 (mips_elf_set_global_gotidx): Use it.
671 (mips_elf_initialize_tls_index): Likewise. Take a
672 mips_elf_traverse_got_arg as argument.
673 (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
674 (mips_elf_multi_got): Likewise. Cope with error returns from
675 mips_elf_set_global_gotidx.
676
677 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
678
679 * elfxx-mips.c (mips_got_info): Add relocs field.
680 (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
681 with...
682 (mips_elf_traverse_got_arg): ...this new structure.
683 (mips_elf_count_local_tls_relocs): Delete.
684 (mips_elf_count_global_tls_relocs): Likewise.
685 (mips_elf_count_got_entry): New function.
686 (mips_elf_count_local_got_entries): Likewise.
687 (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
688 rather than a mips_elf_count_tls_arg. Count both relocs and entries.
689 (mips_elf_record_local_got_symbol): Don't count got entries here.
690 (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
691 (mips_elf_set_global_got_offset): Split into...
692 (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
693 new functions. Take a mips_elf_traverse_got_arg rather than a
694 mips_elf_set_global_got_offset_arg. Don't count TLS relocs here.
695 Use g->relocs to record the number of relocs needed for global GOT
696 entries.
697 (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
698 mips_elf_set_global_got_offset_arg. Use the relocs field to count
699 relocations. Update for above function split.
700 (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
701 to count both the number of GOT entries and the number of TLS
702 relocs required by local entries. Likewise
703 mips_elf_count_global_tls_entries and global entries.
704 Remove uses of mips_elf_count_local_tls_relocs and
705 mips_elf_count_global_tls_relocs.
706
707 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
708
709 * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
710 to say that each structure represents only one type of TLS reference.
711 (GOT_TLS_TYPE): New define.
712 (mips_elf_link_hash_entry): Temporarily split tls_type and
713 tls_got_offset into two variables each.
714 (mips_elf_link_hash_newfunc): Update accordingly.
715 (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
716 (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
717 (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
718 (mips_tls_got_relocs): Use a switch statement.
719 (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
720 (mips_elf_initialize_tls_slots): Use a switch statement. Avoid
721 local "offset" variable.
722 (mips_tls_got_index): Remove r_type argument and assert. Remove
723 code that handled entries with two TLS types; always use the
724 original got_index instead.
725 (mips_tls_single_got_index): New function.
726 (mips_elf_local_got_index): Use entry->tls_type to check for
727 TLS entries. Use mips_tls_single_got_index. Update call to
728 mips_tls_got_index.
729 (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
730 Use p->tls_type to check for TLS entries. Update call to
731 mips_tls_got_index. Use mips_tls_single_got_index.
732 (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
733 Use entry.tls_type to check for TLS entries.
734 (mips_elf_record_global_got_symbol): Replace tls_flag argument
735 with r_type argument. Use mips_elf_reloc_tls_type.
736 Set up the new hash entry fields.
737 (mips_elf_record_local_got_symbol): Replace tls_flag argument
738 with r_type argument. Use mips_elf_reloc_tls_type and
739 mips_tls_got_entries. Remove code that handled entries
740 with multiple TLS types.
741 (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
742 (mips_elf_initialize_tls_index): Handle new hash entry fields.
743 Use equality rather than masks when checking for specific TLS types.
744 Use mips_tls_got_entries. Remove code that handled entries
745 with multiple TLS types.
746 (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
747 testing the hash table entry.
748 (_bfd_mips_elf_check_relocs): Update calls to
749 mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
750 (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
751 (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
752
753 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
754
755 * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
756 (mips_elf_got_entry_hash): ...this, deleting the old version.
757 (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
758 both types of GOT.
759
760 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
761
762 * elfxx-mips.c (mips_elf_create_got_info): New function.
763 (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
764 (mips_elf_create_got_section): Likewise.
765
766 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
767
768 * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
769 gotidx to -1.
770
771 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
772
773 * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
774
775 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
776
777 * elfxx-mips.c (mips_got_info): Move global_gotsym to...
778 (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
779
780 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
781
782 * elfxx-mips.c (mips_elf_count_global_tls_entries)
783 (mips_elf_count_global_tls_relocs): Don't count indirect or
784 warning symbols.
785 (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
786 number of TLS entries were allocated.
787
788 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
789
790 * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
791
792 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
793
794 * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
795 if there are TLS relocations.
796
797 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
798
799 * elfxx-mips.c (mips_elf_recreate_got): Remove free.
800 (mips_elf_resolve_final_got_entries): Remove bogus comment.
801
802 2013-02-11 Alan Modra <amodra@gmail.com>
803
804 * elfcode.h (elf_checksum_contents): Free contents.
805 * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
806 * elflink.c (_bfd_elf_link_hash_table_free): New function.
807 (elf_final_link_free): New function, extracted from..
808 (bfd_elf_final_link): ..here. Always call
809 _bfd_elf_write_section_eh_frame_hdr.
810 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
811 _bfd_elf_link_hash_table_free.
812 * libbfd-in.h (_bfd_merge_sections_free): Declare.
813 * libbfd.h: Regenerate.
814 * merge.c (_bfd_merge_sections_free): New function.
815 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
816 hdr_info->array.
817 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
818 _bfd_elf_link_hash_table_free.
819 * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
820 * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
821 * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
822 * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
823 * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
824 * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
825 * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
826 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
827 * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
828 * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
829 * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
830 * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
831 * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
832 * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
833 (bfd_elf32_bfd_link_hash_table_free): Don't define.
834 * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
835 (bfd_elf32_bfd_link_hash_table_free): Dont' define.
836
837 2013-02-10 Alan Modra <amodra@gmail.com>
838
839 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
840 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
841 * m68klinux.c (linux_link_hash_table_create): Likewise.
842 * sparclinux.c (linux_link_hash_table_create): Likewise.
843 * sunos.c (sunos_link_hash_table_create): Likewise.
844 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
845 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
846 * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
847 * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
848 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
849 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
850 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
851 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
852 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
853 * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
854 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
855 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
856 * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
857 * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
858 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
859 * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
860 * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
861 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
862 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
863 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
864 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
865 * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
866 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
867 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
868 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
869 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
870 * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
871 (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
872
873 2013-02-10 Alan Modra <amodra@gmail.com>
874
875 * i386linux.c (linux_link_hash_table_create): Allocate table
876 with bfd_zmalloc, not bfd_alloc.
877 * pdp11.c (link_hash_table_create): Allocate table with
878 bfd_malloc, not bfd_alloc.
879 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
880 with bfd_zmalloc, not bfd_zalloc.
881 (bfin_link_hash_table_create): Likewise.
882 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
883 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
884
885 2013-02-10 Alan Modra <amodra@gmail.com>
886
887 PR ld/15113
888 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
889
890 2013-02-08 Markos Chandras <markos.chandras@imgtec.com>
891
892 * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
893 sections.
894 (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
895 symbol.
896
897 2013-02-08 Yufeng Zhang <yufeng.zhang@arm.com>
898
899 * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
900 288 to 272.
901
902 2013-02-08 Alan Modra <amodra@gmail.com>
903
904 PR binutils/15106
905 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
906 * elf.c (elf_find_function): Revert last change. Use new
907 tdata field rather than static vars for cache.
908
909 2013-02-07 H.J. Lu <hongjiu.lu@intel.com>
910
911 PR ld/15107
912 * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
913 symbol is defined in regular object.
914
915 2013-02-07 Roberto Agostino Vitillo <ra.vitillo@gmail.com>
916
917 PR binutils/15106
918 * elf.c (elf_find_function): Don't cache if symbols change.
919
920 2013-02-07 Alan Modra <amodra@gmail.com>
921
922 PR binutils/14873
923 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
924 copy attributes from or to non-ELF.
925
926 2013-02-06 H.J. Lu <hongjiu.lu@intel.com>
927
928 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
929 for non-zero TLS symbol.
930 (elf_i386_relocate_section): Don't resolve size relocation against
931 non-zero TLS symbol.
932 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
933 pc_count for non-zero TLS symbol.
934 (elf_x86_64_relocate_section): Don't resolve size relocation
935 against non-zero TLS symbol.
936
937 2013-02-06 Sandra Loosemore <sandra@codesourcery.com>
938 Andrew Jenner <andrew@codesourcery.com>
939
940 Based on patches from Altera Corporation.
941
942 * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
943 (ALL_MACHINES_CFILES): Add cpu-nios2.c.
944 (BFD_BACKENDS): Add elf32-nios2.lo.
945 (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
946 * Makefile.in: Regenerated.
947 * configure.in: Add entries for bfd_elf32_bignios2_vec and
948 bfd_elf32_littlenios2_vec.
949 * configure: Regenerated.
950 * config.bfd: Add cases for nios2.
951 * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
952 (bfd_mach_nios2): Define.
953 (bfd_nios2_arch): Declare.
954 (bfd_archures_list): Add bfd_nios2_arch.
955 * targets.c (bfd_elf32_bignios2_vec): Declare.
956 (bfd_elf32_littlenios2_vec): Declare.
957 (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
958 bfd_elf32_littlenios2_vec.
959 * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
960 * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
961 * bfd-in2.h: Regenerated.
962 * libbfd.h: Regenerated.
963 * cpu-nios2.c: New file.
964 * elf32-nios2.c: New file.
965
966 2013-02-06 Alan Modra <amodra@gmail.com>
967
968 * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
969 stubs in stub_bfd.
970
971 2013-02-06 Alan Modra <amodra@gmail.com>
972
973 * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
974 * Makefile.in: Regenerate.
975
976 2013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
977 Pedro Alves <palves@redhat.com>
978
979 * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
980 * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
981 declaration.
982 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
983 (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
984 * elf-linux-psinfo.h: New file.
985 * elf.c: Include elf-linux-psinfo.h.
986 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
987 New functions.
988 * elf32-ppc.c: Include `elf-linux-psinfo.h'.
989 (elf_external_ppc_linux_prpsinfo32): New structure declaration.
990 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
991 (elfcore_write_ppc_linux_prpsinfo32): New function.
992
993 2013-02-04 Tristan Gingold <gingold@adacore.com>
994
995 * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
996 start address.
997
998 2013-02-04 Alan Modra <amodra@gmail.com>
999
1000 * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
1001 (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
1002 * Makefile.in: Regenerate.
1003 * po/SRC-POTFILES.in: Regenerate.
1004
1005 2013-02-04 Alan Modra <amodra@gmail.com>
1006
1007 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
1008 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
1009
1010 2013-02-01 Alan Modra <amodra@gmail.com>
1011
1012 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
1013 clears def_regular.
1014
1015 2013-01-31 Tristan Gingold <gingold@adacore.com>
1016
1017 * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
1018 earlier. Fix status checking of bfd_mach_o_scan_start_address.
1019 (bfd_mach_o_scan_start_address): Handle LC_MAIN.
1020
1021 2013-01-31 Alan Modra <amodra@gmail.com>
1022 David S. Miller <davem@davemloft.net>
1023
1024 PR ld/15056
1025 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
1026 references to __tls_get_addr.
1027 * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct
1028 vtinherit and vtentry reloc handling too.
1029 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
1030
1031 2013-01-31 Alan Modra <amodra@gmail.com>
1032
1033 * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
1034
1035 2013-01-31 Alan Modra <amodra@gmail.com>
1036
1037 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
1038
1039 2013-01-28 Alan Modra <amodra@gmail.com>
1040
1041 * elf64-ppc.c: Use %T to print symbols names and remove redundant
1042 "relocation" in error messages throughout file.
1043 (ppc64_elf_relocate_section): Remove sibling call error message,
1044 replace with "call lacks nop". Specially report errors for
1045 branches to function entry points via OPD lookup and branches
1046 to stubs. Remove NULL symbol handling now done by %T.
1047
1048 2013-01-28 Alan Modra <amodra@gmail.com>
1049
1050 * archive.c (bfd_generic_archive_p): Return target and keep
1051 ardata on partial matches.
1052 * format.c (bfd_check_format_matches): Adjust for above
1053 change. Remove bfd_error_file_ambiguously_recognized dead
1054 code.
1055
1056 2013-01-26 Alan Modra <amodra@gmail.com>
1057
1058 * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
1059 bfd_preserve_finish): Move to..
1060 * format.c: ..here, splitting out..
1061 (bfd_reinit): ..this. New function.
1062 (bfd_check_format_matches): Use bfd_preserve_save/restore to
1063 keep bfd state for a match.
1064 * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
1065 * elfcore.h (elf_core_file_p): Likewise.
1066 * mach-o.c (bfd_mach_o_header_p): Likewise.
1067 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
1068 * xsym.c (bfd_sym_object_p): Likewise.
1069 * mmo.c (mmo_scan): Clear abfd->symcount.
1070 * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
1071 * section.c (bfd_section_list_clear): Clear section_htab.count.
1072 * bfd-in2.h: Regenerate.
1073
1074 2013-01-25 Michael Schewe <michael.schewe@gmx.net>
1075
1076 * elf32-h8300.c (elf32_h8_relax_section): When checking for a
1077 second reloc, make sure that the reloc potentially exists first.
1078
1079 2013-01-24 Nick Clifton <nickc@redhat.com>
1080
1081 * archures.c: Add bfd_mach_v850e3v5.
1082 * bfd-in2.h: Regenerate.
1083 * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
1084 * cpu-v850_rh850.c: Likewise.
1085 * elf32-v850.c: Add support for v850e3v5 architecture.
1086
1087 2013-01-23 Markos Chandras <markos.chandras@imgtec.com>
1088
1089 * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
1090
1091 2013-01-23 Leif Ekblad <leif@rdos.net>
1092
1093 * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
1094
1095 2013-01-18 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
1098 non-zero TLS symbol.
1099 (elf_i386_relocate_section): Resolve size relocation against
1100 non-zero TLS symbol.
1101 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
1102 for non-zero TLS symbol.
1103 (elf_x86_64_relocate_section): Resolve size relocation against
1104 non-zero TLS symbol.
1105
1106 2013-01-18 Mike Frysinger <vapier@gentoo.org>
1107
1108 * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
1109 when new_dtags is false. Only add DT_RUNPATH when new_dtags is
1110 true.
1111
1112 2013-01-17 H.J. Lu <hongjiu.lu@intel.com>
1113
1114 * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
1115 PC-relative relocation.
1116 * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
1117 as PC-relative relocation.
1118
1119 2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
1122 check.
1123 (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
1124
1125 * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
1126 and R_X86_64_SIZE64 check.
1127 (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
1128 nor R_X86_64_SIZE64.
1129
1130 2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
1131
1132 * bfd-in2.h: Regenerated.
1133 * libbfd.h: Likewise.
1134
1135 * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
1136 (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
1137 (elf_i386_check_relocs): Handle R_386_SIZE32.
1138 (elf_i386_gc_sweep_hook): Likewise.
1139 (elf_i386_relocate_section): Likewise.
1140
1141 * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
1142 and R_X86_64_SIZE64 entries.
1143 (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
1144 (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
1145 (elf_x86_64_reloc_name_lookup): Likewise.
1146 (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
1147 R_X86_64_SIZE64.
1148 (elf_x86_64_gc_sweep_hook): Likewise.
1149 (elf_x86_64_relocate_section): Likewise.
1150
1151 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
1152 BFD_RELOC_SIZE64.
1153
1154 2013-01-15 H.J. Lu <hongjiu.lu@intel.com>
1155
1156 * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
1157 with R_X86_64_RELATIVE64.
1158
1159 2013-01-15 Nick Clifton <nickc@redhat.com>
1160
1161 * elf32-msp430.c: Fix spelling typo.
1162
1163 2013-01-15 Alan Modra <amodra@gmail.com>
1164
1165 * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
1166 plt-thread-safe.
1167
1168 2013-01-14 Alan Modra <amodra@gmail.com>
1169
1170 PR binutils/14813
1171 * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
1172 (memory_bclose): Likewise. Return 0 on success.
1173 * cache.c (cache_bclose): Likewise.
1174 * opncls.c (opncls_bclose, bfd_close): Likewise.
1175 * vms-lib.c (vms_lib_bclose): Likewise.
1176 * libbfd.h: Regenerate.
1177
1178 2013-01-13 Alan Modra <amodra@gmail.com>
1179
1180 * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
1181 Add ref_dynamic_nonweak.
1182 * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
1183 (_bfd_elf_merge_symbol): Don't call above function. Move
1184 setting of ref_dynamic_nonweak and dynamic_def earlier. Don't
1185 clear dynamic_def.
1186 (elf_link_add_object_symbols): Delete redundant "override" test.
1187 Don't set dynamic_def here.
1188 (elf_link_output_extsym): Update.
1189
1190 2013-01-12 H.J. Lu <hongjiu.lu@intel.com>
1191
1192 * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
1193 normal and TLS symbol access.
1194 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1195
1196 2013-01-12 Alan Modra <amodra@gmail.com>
1197
1198 * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
1199 * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
1200 * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
1201
1202 2013-01-12 Alan Modra <amodra@gmail.com>
1203
1204 PR ld/12549
1205 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
1206 (_bfd_elf_strtab_clear_all_refs): Define.
1207 * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
1208 (_bfd_elf_strtab_clear_all_refs): Delete.
1209 * elflink.c (elf_link_add_object_symbols): Clear out added
1210 strtab refs. Correct handling of warning common symbols.
1211
1212 2013-01-10 H.J. Lu <hongjiu.lu@intel.com>
1213
1214 * aout0.c: Remove trailing white spaces.
1215 * archive.c: Likewise.
1216 * archures.c: Likewise.
1217 * bfd-in.h: Likewise.
1218 * bfd-in2.h: Likewise.
1219 * coff-alpha.c: Likewise.
1220 * coff-i860.c: Likewise.
1221 * coff-mips.c: Likewise.
1222 * coff-ppc.c: Likewise.
1223 * coff-tic80.c: Likewise.
1224 * coff-x86_64.c: Likewise.
1225 * coff-z80.c: Likewise.
1226 * coffcode.h: Likewise.
1227 * coffgen.c: Likewise.
1228 * cofflink.c: Likewise.
1229 * compress.c: Likewise.
1230 * corefile.c: Likewise.
1231 * cpu-arm.c: Likewise.
1232 * cpu-avr.c: Likewise.
1233 * cpu-bfin.c: Likewise.
1234 * cpu-cr16.c: Likewise.
1235 * cpu-cr16c.c: Likewise.
1236 * cpu-crx.c: Likewise.
1237 * cpu-h8300.c: Likewise.
1238 * cpu-i386.c: Likewise.
1239 * cpu-lm32.c: Likewise.
1240 * cpu-m68k.c: Likewise.
1241 * cpu-moxie.c: Likewise.
1242 * cpu-msp430.c: Likewise.
1243 * cpu-sh.c: Likewise.
1244 * cpu-xc16x.c: Likewise.
1245 * dwarf2.c: Likewise.
1246 * ecofflink.c: Likewise.
1247 * ecoffswap.h: Likewise.
1248 * elf-ifunc.c: Likewise.
1249 * elf-m10300.c: Likewise.
1250 * elf-vxworks.c: Likewise.
1251 * elf32-avr.c: Likewise.
1252 * elf32-avr.h: Likewise.
1253 * elf32-cr16.c: Likewise.
1254 * elf32-cr16c.c: Likewise.
1255 * elf32-cris.c: Likewise.
1256 * elf32-crx.c: Likewise.
1257 * elf32-frv.c: Likewise.
1258 * elf32-hppa.c: Likewise.
1259 * elf32-i860.c: Likewise.
1260 * elf32-ip2k.c: Likewise.
1261 * elf32-iq2000.c: Likewise.
1262 * elf32-m32c.c: Likewise.
1263 * elf32-m68hc1x.c: Likewise.
1264 * elf32-msp430.c: Likewise.
1265 * elf32-mt.c: Likewise.
1266 * elf32-ppc.c: Likewise.
1267 * elf32-rl78.c: Likewise.
1268 * elf32-s390.c: Likewise.
1269 * elf32-score.h: Likewise.
1270 * elf32-sh-symbian.c: Likewise.
1271 * elf32-sh.c: Likewise.
1272 * elf32-spu.c: Likewise.
1273 * elf32-tic6x.c: Likewise.
1274 * elf32-v850.c: Likewise.
1275 * elf32-xc16x.c: Likewise.
1276 * elf32-xtensa.c: Likewise.
1277 * elf64-alpha.c: Likewise.
1278 * elf64-hppa.c: Likewise.
1279 * elf64-ppc.c: Likewise.
1280 * elf64-s390.c: Likewise.
1281 * elfcore.h: Likewise.
1282 * elflink.c: Likewise.
1283 * elfxx-mips.c: Likewise.
1284 * elfxx-sparc.c: Likewise.
1285 * elfxx-tilegx.c: Likewise.
1286 * ieee.c: Likewise.
1287 * libcoff.h: Likewise.
1288 * libpei.h: Likewise.
1289 * libxcoff.h: Likewise.
1290 * linker.c: Likewise.
1291 * mach-o-i386.c: Likewise.
1292 * mach-o-target.c: Likewise.
1293 * mach-o.c: Likewise.
1294 * mach-o.h: Likewise.
1295 * mmo.c: Likewise.
1296 * opncls.c: Likewise.
1297 * pdp11.c: Likewise.
1298 * pe-x86_64.c: Likewise.
1299 * peXXigen.c: Likewise.
1300 * pef-traceback.h: Likewise.
1301 * pei-x86_64.c: Likewise.
1302 * peicode.h: Likewise.
1303 * plugin.c: Likewise.
1304 * reloc.c: Likewise.
1305 * riscix.c: Likewise.
1306 * section.c: Likewise.
1307 * som.c: Likewise.
1308 * syms.c: Likewise.
1309 * tekhex.c: Likewise.
1310 * ticoff.h: Likewise.
1311 * vaxbsd.c: Likewise.
1312 * xcofflink.c: Likewise.
1313 * xtensa-isa.c: Likewise.
1314
1315 2013-01-10 Will Newton <will.newton@imgtec.com>
1316
1317 * Makefile.am: Add Meta.
1318 * Makefile.in: Regenerate.
1319 * archures.c (bfd_mach_metag): New.
1320 * bfd-in2.h: Regenerate.
1321 * config.bfd: Add Meta.
1322 * configure: Regenerate.
1323 * configure.in: Add Meta.
1324 * cpu-metag.c: New file.
1325 * elf-bfd.h: Add Meta.
1326 * elf32-metag.c: New file.
1327 * elf32-metag.h: New file.
1328 * libbfd.h: Regenerate.
1329 * reloc.c: Add Meta relocations.
1330 * targets.c: Add Meta.
1331
1332 2013-01-08 Yufeng Zhang <yufeng.zhang@arm.com>
1333
1334 * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
1335 (elfcore_write_aarch_hw_break): Likewise.
1336 (elfcore_write_aarch_hw_watch): Likewise.
1337 * elf.c (elfcore_grok_aarch_tls): New function.
1338 (elfcore_grok_aarch_hw_break): Likewise.
1339 (elfcore_grok_aarch_hw_watch): Likewise.
1340 (elfcore_grok_note): Call the new functions to handle the
1341 corresponding notes.
1342 (elfcore_write_aarch_tls): New function.
1343 (elfcore_write_aarch_hw_break): Likewise.
1344 (elfcore_write_aarch_hw_watch): Likewise.
1345 (elfcore_write_register_note): Call the new functions to handle the
1346 corresponding pseudo sections.
1347
1348 2013-01-07 Tom Tromey <tromey@redhat.com>
1349
1350 * section.c (_bfd_std_section): Rename from std_section.
1351 (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
1352 (STD_SECTION): Update.
1353 * bfd-in2.h: Rebuild.
1354
1355 2013-01-04 Juergen Urban <JuergenUrban@gmx.de>
1356
1357 * archures.c (bfd_mach_mips5900): Define.
1358 * bfd-in2.h: Regenerate.
1359 * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
1360 * cpu-mips.c: Add support for MIPS r5900.
1361 * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
1362
1363 2013-01-03 Nickolai Zeldovich <nickolai@csail.mit.edu>
1364 Nick Clifton <nickc@redhat.com>
1365
1366 * elflink.c (get_value): Prevent the use of an undefined shift
1367 operation. Add sanity checks.
1368
1369 2013-01-02 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
1370
1371 * config.bfd (cr16*-*-uclinux*): New target support.
1372
1373
1374 For older changes see ChangeLog-2012
1375 \f
1376 Copyright (C) 2013 Free Software Foundation, Inc.
1377
1378 Copying and distribution of this file, with or without modification,
1379 are permitted in any medium without royalty provided the copyright
1380 notice and this notice are preserved.
1381
1382 Local Variables:
1383 mode: change-log
1384 left-margin: 8
1385 fill-column: 74
1386 version-control: never
1387 End:
This page took 0.05666 seconds and 4 git commands to generate.