* elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2011-06-08 Alan Modra <amodra@gmail.com>
2
3 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
4 indirect links here.
5
6 2011-06-07 Joel Brobecker <brobecker@adacore.com>
7
8 * irix-core.c (irix_core_vec): Add match_priority field.
9
10 2011-06-06 Alan Modra <amodra@gmail.com>
11
12 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
13 Add match_priority.
14 * configure.in: Bump bfd version.
15 * elfcode.h (elf_object_p): Delete hacks preventing match of
16 EM_NONE and ELFOSABI_NONE targets when a better match exists.
17 * elfxx-target.h (elf_match_priority): Define and use.
18 * format.c (bfd_check_format_matches): Use target match_priority
19 to choose best of multiple matching targets. In cases with multiple
20 matches rerun _bfd_check_format if we don't choose the last match.
21 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
22 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
23 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
24 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
25 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
26 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
27 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
28 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
29 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
30 * vms-lib.c, * xsym.c: Init match_priority field.
31 * configure: Regenerate.
32 * bfd-in2.h: Regenerate.
33
34 2011-06-04 H.J. Lu <hongjiu.lu@intel.com>
35
36 PR ld/12842
37 * elfcode.h (elf_object_p): Revert the last change.
38
39 2011-06-04 Alan Modra <amodra@gmail.com>
40
41 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
42 return the other arch.
43 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
44 target.
45
46 2011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
47
48 PR ld/12682
49 * hash.c (higher_primer_number): Add more, small, prime numbers.
50 (bfd_hash_set_default_size): Likewise.
51
52 2011-06-02 Nick Clifton <nickc@redhat.com>
53
54 * coff-mcore.c: Fix spelling typo.
55 * coff-stgo32.c: Likewise.
56 * elf32-arm.c: Likewise.
57 * elf32-avr.c: Likewise.
58 * elf-m68hc1x.c: Likewise.
59 * elf32-mcore.c: Likewise.
60 * elf32-mep.c: Likewise.
61 * elf32-mt.c: Likewise.
62 * elf32-ppc.c: Likewise.
63 * elf32-xtensa.c: Likewise.
64 * elf64-ppc.c: Likewise.
65 * elfxx-mips.c: Likewise.
66 * netbsd.h: Likewise.
67 * nlmcode.h: Likewise.
68 * vms-alpha.c: Likewise.
69 * po/bfd.pot: Regenerate.
70 * po/SRC-POTFILES.in: Regenerate.
71
72 2011-06-01 DJ Delorie <dj@redhat.com>
73
74 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
75 * target.c: Likewise.
76 * configure.in: Likewise.
77 * configure.in: Regenerate.
78 * elf32-rx.c: Add elf32-rx-be-ns target.
79 (rx_elf_object_p): Never allow the be-ns target by default,
80 only allow it if the user requests it.
81
82 2011-06-01 H.J. Lu <hongjiu.lu@intel.com>
83
84 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
85 relocation in readonly section in a shared object.
86 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
87
88 2011-05-31 Nick Clifton <nickc@redhat.com>
89
90 * archive.c (adjust_relative_path): Fix comment to prevent it
91 corrupting the auto-generated bfd.h.
92
93 2011-05-31 Paul Brook <paul@codesourcery.com>
94
95 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
96 for known functions.
97 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
98 symbols.
99
100 2011-05-31 Paul Brook <paul@codesourcery.com>
101
102 * elf32-arm.c (arm_stub_is_thumb): Add
103 arm_stub_long_branch_v4t_thumb_tls_pic.
104 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
105 Handle Thumb stubs.
106
107 2011-05-27 Nick Clifton <nickc@redhat.com>
108
109 PR binutils/12710
110 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
111 unable to read a file pointed to by an entry in a thin archive.
112 (adjust_relative_path): Use lrealpath to canonicalize paths.
113 Handle the case where the reference path is above the current
114 path in the directory tree.
115
116 2011-05-26 H.J. Lu <hongjiu.lu@intel.com>
117
118 PR ld/12809
119 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
120 R_X86_64_TPOFF64 in executable.
121
122 2011-05-26 Alan Modra <amodra@gmail.com>
123
124 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
125 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
126 local_protected comment.
127
128 2011-05-25 Tristan Gingold <gingold@adacore.com>
129
130 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
131 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
132 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
133 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
134 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
135 (elf32-ia64.c): Created from elfnn-ia64.c
136 (elf64-ia64.c): Likewise.
137 * elfxx-ia64.h: New file.
138 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
139 functions.Includes elfxx-ia64.h.
140 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
141 (IA64_HOWTO): Adjust.
142 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
143 (elfNN_ia64_reloc_type_lookup): Renames to
144 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
145 (elfNN_ia64_reloc_name_lookup): Renames to
146 ia64_elf_reloc_name_lookup. Make it public.
147 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
148 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
149 public.
150 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
151 Move it and make it public. Move prototype to elfxx-ia64.h
152 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
153 Move prototype to elfxx-ia64.h
154 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
155 (elfNN_ia64_info_to_howto): Adjust calls.
156 (elfNN_ia64_relax_section): Adjust calls.
157 (count_dyn_reloc): Fix typo.
158 (elfNN_ia64_relocate_section): Adjust calls.
159 (elfNN_ia64_finish_dynamic_symbol): Likewise.
160 (bfd_elfNN_bfd_reloc_type_lookup)
161 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
162 * configure: Regenerate.
163 * Makefile.in: Regenerate.
164
165 2011-05-23 DJ Delorie <dj@redhat.com>
166
167 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
168 the vma/lma swapping done in elf32_rx_modify_program_headers.
169
170 2011-05-23 Nick Clifton <nickc@redhat.com>
171
172 * elf-m10300.c (mn10300_elf_mkobject): New function.
173 (bfd_elf32_mkobject): Define.
174
175 2011-05-23 Alan Modra <amodra@gmail.com>
176
177 * elf-bfd.h: Comment typo fix.
178 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
179 struct elf_dyn_relocs throughout.
180 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
181
182 2011-05-23 Alan Modra <amodra@gmail.com>
183
184 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
185 functions rather than warning callback or _bfd_error_handler.
186 * elf32-ppc.c: Likewise.
187 * elf64-ppc.c: Likewise.
188 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
189 arg error.
190 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
191
192 2011-05-23 Alan Modra <amodra@gmail.com>
193
194 PR 12763
195 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
196 .tbss, and page align same for all SHT_NOBITS sections.
197
198 2011-05-21 Alan Modra <amodra@gmail.com>
199
200 PR 12763
201 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
202 from PT_TLS header.
203 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
204 segment if just for .tbss.
205 (assign_file_positions_for_load_sections): Don't report "can't
206 allocate in segment" errors for .tbss.
207 (assign_file_positions_for_non_load_sections): Don't set p_filesz
208 from SHT_NOBITS section filepos.
209
210 2011-05-20 Bernd Schmidt <bernds@codesourcery.com>
211
212 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
213 R_C6000_PCR_H16 and R_C6000_PCR_L16.
214 (elf32_tic6x_relocate_section): Handle them.
215
216 2011-05-18 Nick Clifton <nickc@redhat.com>
217
218 PR ld/12761
219 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
220 sections when building shared libraries.
221
222 2011-05-18 Rafał Krypa <r.krypa@samsung.com>
223
224 PR ld/12778
225 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
226 reloc pointer.
227
228 2011-05-18 Tristan Gingold <gingold@adacore.com>
229
230 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
231 (xcoff_sweep): Always keep dwarf sections.
232 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
233
234 2011-05-18 Tristan Gingold <gingold@adacore.com>
235
236 * libxcoff.h (struct xcoff_dwsect_name): New type.
237 (XCOFF_DWSECT_NBR_NAMES): New macro.
238 (xcoff_dwsect_names): Declare.
239 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
240 (styp_to_sec_flags): Ditto.
241 (coff_new_section_hook): Ditto.
242 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
243 * coff-rs6000.c (xcoff_dwsect_name): New variable.
244
245 2011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
246
247 PR ld/12759
248 * elf32-rx.c (ignore_lma): New variable.
249 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
250 (rx_modify_program_headers): Only copy the LMA into the VMA if
251 ignore_lma is true.
252
253 2011-05-17 Alan Modra <amodra@gmail.com>
254
255 PR ld/12760
256 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
257 * elflink.c (elf_link_add_object_symbols): Likewise.
258 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
259
260 2011-05-16 Alan Modra <amodra@gmail.com>
261
262 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
263
264 2011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
265
266 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
267 global GOT entries for GOT_PAGE relocations against global symbols.
268
269 2011-05-13 Bernd Schmidt <bernds@codesourcery.com>
270
271 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
272 (tic6x-*-*): Replaced by these.
273 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
274 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
275 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
276 Define.
277 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
278 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
279 "elf32-target.h" two more times.
280 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
281 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
282 bfd_elf32_tic6x_elf_le_vec.
283 * configure: Regenerate.
284
285 2011-05-13 Jan Beulich <jbeulich@novell.com>
286
287 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
288
289 2011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
290
291 * config.in: Regenerated.
292 * configure: Regenerated.
293 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
294 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
295 HAVE_PSINFO32_T_PR_PID.
296 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
297 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
298 and HAVE_PSINFO32_T_PR_PID.
299 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
300
301 2011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
302
303 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
304 32bit psinfo.
305 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
306 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
307
308 2011-05-09 Paul Brook <paul@codesourcery.com>
309
310 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
311 * bfd-in2.h: Regenerate.
312 * elf32-tic6x.c: Include limits.h.
313 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
314 _tic6x_elf_section_data): New.
315 (elf32_tic6x_section_data): Define.
316 (elf32_tic6x_new_section_hook): Allocate target specific data.
317 (elf32_tic6x_add_unwind_table_edit): New function.
318 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
319 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
320 elf32_tic6x_copy_exidx_entry): New functions.
321 (elf_backend_write_section): Define.
322
323 2011-05-09 Paul Brook <paul@codesourcery.com>
324
325 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
326 elf32_tic6x_fake_sections): New functions.
327 (elf_backend_fake_sections): Define.
328
329 2011-05-09 Paul Brook <paul@codesourcery.com>
330
331 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
332 (elf_backend_gc_mark_extra_sections): Define.
333
334 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
335
336 PR ld/12365
337 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
338 references to symbols defined in discarded sections.
339
340 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
341
342 PR ld/12365
343 * coffgen.c (coff_write_symbol): Assume input section is its own
344 output section if output_section member not set.
345 (coff_write_alien_symbol): Likewise.
346
347 2011-05-07 H.J. Lu <hongjiu.lu@intel.com>
348
349 PR ld/12730
350 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
351
352 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
353 sections if needed.
354
355 * section.c (SEC_ELF_REVERSE_COPY): New.
356 * bfd-in2.h: Regenerated.
357
358 2011-05-07 Anders Kaseorg <andersk@ksplice.com>
359
360 PR 12739
361 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
362 * bfd-in2.h: Regenerate.
363
364 2011-05-06 Tristan Gingold <gingold@adacore.com>
365
366 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
367 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
368 any code section. Add comments.
369 (alpha_vms_object_p): Use void * instead of PTR.
370 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
371 (build_module_list): Guard against no DST section. Add comments.
372 (alpha_vms_link_output_symbol): Discard undefined symbols.
373 (alpha_vms_get_section_contents): Simply memcpy if the section was
374 already loaded. Fix typo.
375 (vms_new_section_hook): Use void * instead of PTR.
376 (vms_alpha_vec): Ditto.
377
378 2011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
379
380 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
381 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
382
383 2011-05-05 Bernd Schmidt <bernds@codesourcery.com>
384
385 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
386 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
387 mismatch. Choose the lower of the two values.
388 (bfd_elf32_bfd_final_link): New macro.
389
390 2011-04-28 Tristan Gingold <gingold@adacore.com>
391
392 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
393 (bfd_xcoff_swap_aux_out): Ditto.
394 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
395 (bfd_xcoff64_swap_aux_out): Ditto.
396
397 2011-05-04 Alan Modra <amodra@gmail.com>
398
399 PR ld/12727
400 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
401 was_undefined on dot-symbols.
402
403 2011-05-03 Paul Brook <paul@codesourcery.com>
404
405
406 * elf32-tic6x.c (elf32_tic6x_howto_table,
407 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
408 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
409 Add R_C6000_EHTYPE.
410
411 2011-05-01 Alan Modra <amodra@gmail.com>
412
413 PR ld/12718
414 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
415 creating ifunc sections.
416 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
417
418 2011-04-30 H.J. Lu <hongjiu.lu@intel.com>
419
420 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
421 names.
422
423 2011-04-28 Tom Tromey <tromey@redhat.com>
424
425 * bfdio.c (memory_bstat): Pass correct size to memset.
426
427 2011-04-28 Mike Frysinger <vapier@gentoo.org>
428
429 * dwarf2.c (dwarf_debug_sections): Mark const.
430 * elf.c (special_sections): Likewise.
431 * libbfd-in.h (dwarf_debug_sections): Likewise.
432 * libbfd.h: Regenerate.
433
434 2011-04-26 Kai Tietz <ktietz@redhat.com>
435
436 * coffcode.h (sec_to_styp_flags): Allow linkonce for
437 debugging sections.
438
439 2011-04-26 Tristan Gingold <gingold@adacore.com>
440
441 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
442
443 2011-04-24 Alan Modra <amodra@gmail.com>
444
445 PR ld/12365
446 PR ld/12696
447 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
448 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
449 (_bfd_generic_link_add_one_symbol): Update "notice" call.
450 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
451 it is a redef of an IR symbol in a real BFD.
452
453 2011-04-22 H.J. Lu <hongjiu.lu@intel.com>
454
455 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
456 in readonly section in a shared object.
457 (elf_i386_size_dynamic_sections): Likewise.
458 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
459 (elf_x86_64_size_dynamic_sections): Likewise.
460
461 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
462
463 PR ld/12694
464 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
465 symbols.
466 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
467
468 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
469
470 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
471 on dynamic symbol error.
472 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
473
474 2011-04-20 Tristan Gingold <gingold@adacore.com>
475
476 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
477
478 2011-04-20 Alan Modra <amodra@gmail.com>
479
480 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
481 (bfd_hash_table_init_n): Overflow checking.
482 (bfd_hash_set_default_size): Return current size. Take unsigned long
483 arg. Add 65537 to hash_size primes.
484 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
485 * bfd-in2.h: Regenerate.
486
487 2011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
488
489 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
490 memmove elements.
491
492 2011-04-20 Alan Modra <amodra@gmail.com>
493
494 * libbfd.c (bfd_log2): Do return rounded up value.
495 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
496 call with expanded old round down version of the function.
497
498 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
499 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
500
501 2011-04-20 Alan Modra <amodra@gmail.com>
502
503 PR ld/12365
504 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
505 in their own common section.
506 * elflink.c (elf_link_add_object_symbols): Likewise.
507 * linker.c (generic_link_check_archive_element): Don't lose flags
508 if common section is pre-existing.
509 (_bfd_generic_link_add_one_symbol): Likewise.
510
511 2011-04-20 Alan Modra <amodra@gmail.com>
512
513 PR ld/12365
514 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
515 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
516 multiple_definition regardless of allow_multiple_definition.
517 * simple.c (simple_dummy_multiple_definition): Update.
518 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
519 calls.
520
521 2011-04-18 Tristan Gingold <gingold@adacore.com>
522
523 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
524
525 2011-04-18 Alan Modra <amodra@gmail.com>
526
527 PR ld/12365
528 PR ld/12672
529 * bfd.c (BFD_PLUGIN): Define.
530 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
531 * bfd-in2.h: Regenerate.
532 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
533 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
534
535 2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
536
537 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
538 SEC_LOAD.
539
540 2011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
541
542 * elf-bfd.h (struct sdt_note): New struct.
543 (struct elf_obj_tdata) <sdt_note_head>: New field.
544 * elf.c (elfobj_grok_stapsdt_note_1): New function.
545 (elfobj_grok_stapsdt_note): Likewise.
546 (elf_parse_notes): Added code to treat SystemTap note
547 sections.
548
549 2011-04-12 Richard Henderson <rth@redhat.com>
550
551 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
552 exclude empty .got sections.
553
554 2011-04-11 H.J. Lu <hongjiu.lu@intel.com>
555
556 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
557 array access for BFD_RELOC_386_IRELATIVE.
558
559 2011-04-11 Bernd Schmidt <bernds@codesourcery.com>
560
561 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
562
563 2011-04-11 Mark Wielaard <mjw@redhat.com>
564
565 PR 10549
566 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
567 (has_gnu_symbols): Renamed from has_ifunc_symbols.
568 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
569 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
570 also if STB_GNU_UNIQUE symbol binding was seen.
571 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
572 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
573 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
574 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
575 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
576 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
577
578 2011-04-11 Alan Modra <amodra@gmail.com>
579
580 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
581 sections.
582 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
583 (_bfd_generic_get_section_contents_in_window): Likewise.
584 * section.c (bfd_get_section_contents): Likewise.
585 * compress.c (bfd_get_full_section_contents): Likewise.
586 * elf32-rx.c (rx_final_link): Ignore rawsize.
587 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
588 bfd with bfd_get_section_limit.
589 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
590 os->size during final link. Update callers.
591 * bfd-in2.h: Regenerate.
592
593 2011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
594
595 PR ld/12637
596 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
597 as the number of global entries when merging with the primary GOT.
598
599 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
600
601 * elf32-i386.c: Update copyright year.
602 * elf64-x86-64.c: Likewise.
603
604 2011-04-09 Kai Tietz <ktietz@redhat.com>
605
606 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
607 buffer and use rawsize for sorting.
608 * coffcode.h (coff_compute_section_file_positions): Set rawsize
609 before doing alignment.
610
611 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
612
613 * elf32-i386.c (elf_i386_relocate_section): Return relocation
614 error on unsupported relocation.
615 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
616
617 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
618
619 PR binutils/12657
620 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
621 pid_t.
622
623 2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
624
625 PR ld/12654
626 * elf32-i386.c (elf_i386_relocate_section): Check !executable
627 instead of shared for R_386_TLS_LDO_32.
628
629 2011-04-08 Tristan Gingold <gingold@adacore.com>
630
631 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
632 * coff-pmac: Remove
633 * xcoff-target.h: Remove
634 * Makefile.in: Regenerate.
635
636 2011-04-07 Cary Coutant <ccoutant@google.com>
637
638 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
639
640 2011-04-07 Paul Brook <paul@codesourcery.com>
641
642 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
643 pc-relative.
644 (elf32_tic6x_howto_table_rel): Ditto.
645 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
646 (elf32_tic6x_check_relocs): Ditto.
647
648 2011-04-06 Joseph Myers <joseph@codesourcery.com>
649
650 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
651 targets.
652 (strongarm*, thumb*, xscale*): Remove architectures.
653 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
654 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
655 xscale-*-coff): Remove targets.
656
657 2011-04-01 Tristan Gingold <gingold@adacore.com>
658
659 * elfxx-ia64.c: include bfd_stdint.h
660
661 2011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
662
663 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
664 dynobj and its initialization.
665
666 2011-03-31 Tristan Gingold <gingold@adacore.com>
667
668 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
669 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
670 BFD_HOST_LONG_LONG to 1.
671
672 2011-03-31 Tristan Gingold <gingold@adacore.com>
673
674 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
675 (_bfd_vms_write_etir): Ditto.
676 (_bfd_vms_slurp_etir): Avoid to use intptr_t
677 * configure.com: Generate bfd_stdint.h
678
679 2011-03-31 Bernd Schmidt <bernds@codesourcery.com>
680
681 * elf32-tic6x.h (struct elf32_tic6x_params): New.
682 (elf32_tic6x_setup): Declare.
683 * elf32-tic6x.c: Include <limits.h>.
684 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
685 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
686 New structures.
687 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
688 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
689 tic6x_elf_scom_symbol_ptr): New static variables.
690 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
691 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
692 R_C6000_PCR_H16 and R_C6000_PCR_L16.
693 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
694 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
695 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
696 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
697 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
698 elf32_tic6x_adjust_dynamic_symbol): New static functions.
699 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
700 to weak symbols as required by the ABI.
701 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
702 as needed when generating DSBT output.
703 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
704 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
705 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
706 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
707 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
708 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
709 New static functions.
710 (ELF_MAXPAGESIZE): Define to 0x1000.
711 (bfd_elf32_bfd_copy_private_bfd_data,
712 bfd_elf32_bfd_link_hash_table_create,
713 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
714 elf_backend_want_got_plt, elf_backend_want_dynbss,
715 elf_backend_plt_readonly, elf_backend_got_header_size,
716 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
717 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
718 elf_backend_check_relocs, elf_backend_add_symbol_hook,
719 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
720 elf_backend_section_from_bfd_section,
721 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
722 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
723 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
724
725 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
726 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
727 * bfd/bfd-in2.h: Regenerate.
728 * bfd/libbfd.h: Regenerate.
729 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
730
731 2011-03-31 Tristan Gingold <gingold@adacore.com>
732
733 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
734 entry on xcoff when value is C_NULL_VALUE.
735
736 2011-03-31 Tristan Gingold <gingold@adacore.com>
737
738 * libcoff-in.h (exec_hdr): Remove.
739 * libcoff.h: Regenerate.
740
741 2011-03-30 Nick Clifton <nickc@redhat.com>
742
743 * po/da.po: Updated Danish translation.
744
745 2011-03-29 Richard Henderson <rth@redhat.com>
746
747 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
748 (elf64_alpha_gc_sweep_hook): New.
749 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
750 (elf_backend_can_gc_sections): New.
751
752 2011-03-26 John Marino <binutils@marino.st>
753
754 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
755 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
756 * configure: Regenerate.
757
758 2011-03-25 Michael Snyder <msnyder@vmware.com>
759
760 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
761
762 2011-03-25 Tristan Gingold <gingold@adacore.com>
763
764 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
765 of find_nearest_line on object files.
766
767 2011-03-25 Tristan Gingold <gingold@adacore.com>
768
769 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
770 Minor reordering.
771 (alpha_vms_create_eisd_for_section): Make code sections read-only.
772
773 2011-03-24 Alan Modra <amodra@gmail.com>
774
775 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
776 old-style __tls_get_addr calls without marker relocs don't match
777 their arg setup insn one for one. If such mismatches are found
778 report the reloc and don't do any tls optimization.
779 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
780
781 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
782
783 * bfd-in2.h: Regenerate.
784
785 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
786
787 * archures.c: Add AVR XMEGA architecture information.
788 * cpu-avr.c (arch_info_struct): Likewise.
789 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
790 (elf32_avr_object_p): Likewise.
791
792 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
793
794 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
795 * bfd-in2.h: Regenerate.
796 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
797 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
798 entry.
799 (elf32_arm_howto_from_type): Update accordingly.
800 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
801 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
802 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
803 with an extra noncall_refcount field.
804 (arm_local_iplt_info): New structure.
805 (elf_arm_obj_tdata): Add local_iplt.
806 (elf32_arm_local_iplt): New accessor macro.
807 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
808 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
809 Change tls_type to a bitfield and add is_iplt.
810 (elf32_arm_link_hash_newfunc): Update accordingly.
811 (elf32_arm_allocate_local_sym_info): New function.
812 (elf32_arm_create_local_iplt): Likewise.
813 (elf32_arm_get_plt_info): Likewise.
814 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
815 (elf32_arm_get_local_dynreloc_list): Likewise.
816 (create_ifunc_sections): Likewise.
817 (elf32_arm_copy_indirect_symbol): Update after the changes to
818 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
819 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
820 to get PLT information. Assert that all STT_GNU_IFUNC references
821 are turned into PLT references.
822 (arm_build_one_stub): Pass the symbol type to
823 elf32_arm_final_link_relocate.
824 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
825 (elf32_arm_allocate_irelocs): New function.
826 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
827 all R_ARM_IRELATIVE.
828 (elf32_arm_allocate_plt_entry): New function.
829 (elf32_arm_populate_plt_entry): Likewise.
830 (elf32_arm_final_link_relocate): Add an st_type parameter.
831 Set srelgot to null for static objects. Use separate variables
832 to record which st_value and st_type should be used when generating
833 a dynamic relocation. Use elf32_arm_get_plt_info to find the
834 symbol's PLT information, setting has_iplt_entry, splt,
835 plt_offset and gotplt_offset accordingly. Check whether
836 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
837 the relocation target accordingly. Broaden assert to include
838 .iplts. Don't set sreloc for static relocations. Assert that
839 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
840 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
841 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
842 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
843 resolve GOT references to the .igot.plt entry.
844 (elf32_arm_relocate_section): Update the call to
845 elf32_arm_final_link_relocate.
846 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
847 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
848 relocations in shared libraries and relocatable executables.
849 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
850 to get the list of dynamic relocations for a local symbol.
851 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
852 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
853 to allocate local symbol information. Treat R_ARM_REL32 and
854 R_ARM_REL32_NOI as call relocations in shared libraries and
855 relocatable executables. Record PLT information for local
856 STT_GNU_IFUNC functions as well as global functions. Count
857 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
858 to get the list of dynamic relocations for a local symbol.
859 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
860 Don't remove STT_GNU_IFUNC PLTs unless all references have been
861 removed. Update after the changes to elf32_arm_link_hash_entry.
862 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
863 entries should live in .plt or .iplt. Check whether the .igot.plt
864 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
865 to allocate .plt and .(i)got.plt entries. Detect which .got
866 entries will need R_ARM_IRELATIVE relocations and use
867 elf32_arm_allocate_irelocs to allocate them. Likewise other
868 non-.got dynamic relocations.
869 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
870 and dynamic relocations for local STT_GNU_IFUNC symbols.
871 Check whether the .igot.plt and .got entries can be combined.
872 Detect which .got entries will need R_ARM_IRELATIVE relocations
873 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
874 section pointers intead of strcmp checks. Handle iplt and igotplt.
875 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
876 to fill in .plt, .got.plt and .rel(a).plt entries. Point
877 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
878 resolve to it.
879 (elf32_arm_output_plt_map_1): New function, split out from
880 elf32_arm_output_plt_map. Handle .iplt entries. Use
881 elf32_arm_plt_needs_thumb_stub_p.
882 (elf32_arm_output_plt_map): Call it.
883 (elf32_arm_output_arch_local_syms): Add mapping symbols for
884 local .iplt entries.
885 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
886 (elf32_arm_swap_symbol_out): Likewise.
887 (elf32_arm_add_symbol_hook): New function.
888 (elf_backend_add_symbol_hook): Define for all targets.
889
890 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
891
892 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
893 * elf.c (swap_out_syms): Set st_target_internal for each
894 Elf_Internal_Sym.
895 * elfcode.h (elf_swap_symbol_in): Likewise.
896 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
897 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
898 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
899 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
900 * elflink.c (elf_link_output_extsym): Likewise.
901 (bfd_elf_final_link): Likewise.
902 (elf_link_add_object_symbols): Copy st_target_internal
903 to the hash table if we see a definition.
904 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
905 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
906 a branch_type field.
907 (a8_erratum_fix, a8_erratum_reloc): Likewise.
908 (arm_type_of_stub): Replace actual_st_type with an
909 actual_branch_type parameter.
910 (arm_build_one_stub): Use branch types rather than st_types to
911 determine the type of branch.
912 (cortex_a8_erratum_scan): Likewise.
913 (elf32_arm_size_stubs): Likewise.
914 (bfd_elf32_arm_process_before_allocation): Likewise.
915 (allocate_dynrelocs_for_symbol): Likewise.
916 (elf32_arm_finish_dynamic_sections): Likewise.
917 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
918 a branch_type parameter.
919 (elf32_arm_relocate_section): Update call accordingly.
920 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
921 (elf32_arm_output_map_sym): Initialize st_target_internal.
922 (elf32_arm_output_stub_sym): Likewise.
923 (elf32_arm_symbol_processing): Delete.
924 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
925 Use st_target_internal to record the branch type.
926 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
927 Thumb functions.
928 (elf32_arm_is_function_type): Delete.
929 (elf_backend_symbol_processing): Likewise.
930 (elf_backend_is_function_type): Likewise.
931
932 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
933
934 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
935 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
936 into the PLT block.
937
938 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
939
940 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
941 may_need_local_target_p and may_become_dynamic_p to classify
942 the relocation type. Don't check info->symbolic or h->def_regular
943 when deciding whether to record a potential dynamic reloc.
944 Don't treat potential dynamic relocs as PLT references.
945 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
946 try to make the PLT reference count go negative.
947
948 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
949
950 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
951 GOT entry here, rather than leaving it to finish_dynamic_symbol.
952 Only create a dynamic relocation for local references if
953 info->shared.
954 (allocate_dynrelocs_for_symbol): Update dynamic relocation
955 allocation accordingly.
956 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
957
958 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
959
960 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
961 (elf32_arm_add_dynreloc): Likewise.
962 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
963 to allocate dynamic relocations.
964 (elf32_arm_size_dynamic_sections): Likewise.
965 (allocate_dynrelocs): Likewise. Rename to
966 allocate_dynrelocs_for_symbol.
967 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
968 create dynamic relocations.
969 (elf32_arm_finish_dynamic_symbol): Likewise.
970
971 2011-03-12 H.J. Lu <hongjiu.lu@intel.com>
972
973 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
974 x32 GD->IE and GD->LE transitions.
975 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
976 and LD->LE transitions.
977
978 2011-03-10 Alan Modra <amodra@gmail.com>
979
980 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
981 for LO_DS error message and correct multiple.
982
983 2011-03-10 Alan Modra <amodra@gmail.com>
984
985 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
986 (ppc64_elf_link_just_syms): New function.
987 (opd_entry_value): Don't assume big-endian host.
988 (get_r2off): New function.
989 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
990
991 2011-03-06 Michael Snyder <msnyder@vmware.com>
992
993 * compress.c (bfd_compress_section_contents): Check for out of mem.
994
995 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
996 that case statement falls through intentionally.
997
998 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
999
1000 2011-03-04 Alan Modra <amodra@gmail.com>
1001
1002 * archive.c (bsd_write_armap): Don't call stat in deterministic
1003 mode, and don't use st_mtime if stat returns error.
1004
1005 2011-03-03 Michael Snyder <msnyder@vmware.com>
1006
1007 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
1008
1009 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
1010
1011 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
1012 (aout_link_write_other_symbol): Missing break statement.
1013
1014 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
1015
1016 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
1017
1018 2011-03-03 H.J. Lu <hongjiu.lu@intel.com>
1019
1020 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
1021 x32 IE->LE transition.
1022 (elf_x86_64_relocate_section): Likewise.
1023
1024 2011-03-02 Bernd Schmidt <bernds@codesourcery.com>
1025
1026 * elflink.c (is_reloc_section): Remove function.
1027 (get_dynamic_reloc_section_name): Construct string manually.
1028
1029 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
1030
1031 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
1032 (adjust_relative_path): Likewise.
1033 (_bfd_construct_extended_name_table): Likewise.
1034 * corefile.c (generic_core_file_matches_executable_p): Likewise.
1035 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1036 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1037 * elf32-spu.c (sort_bfds): Likewise.
1038 (spu_elf_auto_overlay): Likewise.
1039 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1040 * xcofflink.c (xcoff_set_import_path): Likewise.
1041 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
1042 (xtensa_regfile_lookup_shortname): Likewise.
1043
1044 2011-02-28 Alan Modra <amodra@gmail.com>
1045
1046 PR 12513
1047 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
1048 stringsize. Properly sanity check symdef_count. Remove redundant
1049 bfd_release.
1050
1051 2011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
1052
1053 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
1054 and handle claim_file seeking. Only try to load the plugin once.
1055
1056 2011-02-22 Andreas Schwab <schwab@redhat.com>
1057
1058 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
1059 relocation read the value from the second GOT slot.
1060
1061 2011-02-15 Tristan Gingold <gingold@adacore.com>
1062
1063 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
1064
1065 2011-02-15 Alan Modra <amodra@gmail.com>
1066
1067 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
1068 toc relocs. Fuss over free(NULL).
1069
1070 2011-02-14 Mike Frysinger <vapier@gentoo.org>
1071
1072 * elflink.c (bfd_elf_size_dynamic_sections): Add
1073 bfd_get_symbol_leading_char to the start of newname.
1074
1075 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1076
1077 * configure: Regenerate.
1078
1079 2011-02-09 Alan Modra <amodra@gmail.com>
1080
1081 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
1082 we are done. When optimising large toc, check that a global
1083 symbol on a toc reloc is defined in a kept section.
1084
1085 2011-02-08 Nick Clifton <nickc@redhat.com>
1086
1087 PR binutils/12467
1088 * elf.c (assign_file_positions_for_load_sections): Set the program
1089 header offset and entry size to zero if there are no program
1090 headers.
1091
1092 2011-02-08 Alan Modra <amodra@gmail.com>
1093
1094 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
1095 local_syms when looking for local symbols in .toc.
1096
1097 2011-02-01 Alan Modra <amodra@gmail.com>
1098
1099 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
1100 for toc pointer on any section having makes_toc_func_call set.
1101 (check_pasted_section): Ensure pasted .init/.fini fragments use
1102 the same toc if any has makes_toc_func_call set.
1103
1104 2011-01-28 Joseph Myers <joseph@codesourcery.com>
1105
1106 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
1107 field.
1108
1109 2011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
1110
1111 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
1112 common sections too.
1113
1114 2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
1115
1116 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
1117 Solaris target.
1118
1119 2011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
1120
1121 Fix compilation for mingw64.
1122 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
1123 typecast to avoid warning.
1124 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
1125 usage.
1126 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
1127 of long for pointer to avoid warning.
1128 (elfNN_ia64_relax_brl): Idem.
1129 (elfNN_ia64_install_value): Idem.
1130 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
1131
1132 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
1133
1134 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
1135 h->needs_plt when deciding whether to record a possible dynamic reloc.
1136
1137 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
1138
1139 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
1140 dynamic relocs for the removed section.
1141
1142 2011-01-15 H.J. Lu <hongjiu.lu@intel.com>
1143
1144 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
1145 relocations.
1146
1147 2011-01-14 H.J. Lu <hongjiu.lu@intel.com>
1148
1149 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
1150 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
1151 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
1152 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
1153 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
1154 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
1155 for ILP32.
1156
1157 2011-01-14 Alan Modra <amodra@gmail.com>
1158
1159 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
1160 error.
1161 (_bfd_default_error_handler): Likewise.
1162 * elf.c (print_segment_map): Likewise.
1163 * libbfd.c (warn_deprecated): Likewise.
1164 * som.c (som_sizeof_headers): No need to do so here.
1165 * coff-i860.c: Replace use of printf for error messages with
1166 _bfd_error_handler.
1167 * coff-ppc.c: Likewise.
1168 * coff-sh.c: Likewise.
1169 * elf32-bfin.c: Likewise.
1170 * elf32-dlx.c: Likewise.
1171 * elf32-mep.c: Likewise.
1172 * elf32-v850.c: Likewise.
1173 * mach-o.c: Likewise.
1174 * pef.c: Likewise.
1175
1176 2011-01-13 H.J. Lu <hongjiu.lu@intel.com>
1177
1178 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
1179 swap_reloca_out.
1180 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
1181 (elf_x86_64_check_relocs): Align relocation section to 4 byte
1182 for 32bit.
1183 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
1184 ELF_ST_TYPE.
1185 (elf_x86_64_finish_dynamic_symbol): Updated.
1186 (elf_x86_64_finish_dynamic_sections): Don't use
1187 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
1188 bfd_elf64_swap_dyn_out.
1189
1190 2011-01-14 J. Park <grassman@gmail.com>
1191
1192 PR ld/12339
1193 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
1194 following bfd_link_hash_warning symbol link.
1195
1196 2011-01-10 Nathan Sidwell <nathan@codesourcery.com>
1197 Glauber de Oliveira Costa <glommer@gmail.com>
1198
1199 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
1200 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
1201 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
1202 relocations.
1203 * libbfd.h: Rebuilt.
1204 * bfd-in2.h: Rebuilt.
1205 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
1206 (elf32_arm_reloc_map): Likewise.
1207 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
1208 (elf32_arm_stub_long_branch_any_tls_pic,
1209 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
1210 (DEF_STUBS): Add new stubs.
1211 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
1212 (elf32_arm_local_tlsdesc_gotent): New.
1213 (GOT_TLS_GDESC): New mask.
1214 (GOT_TLS_GD_ANY): Define.
1215 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
1216 (elf32_arm_compute_jump_table_size): New.
1217 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
1218 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
1219 sgotplt_jump_table_size fields.
1220 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
1221 (elf32_arm_link_hash_table_create): Initialize new fields.
1222 (arm_type_of_stub): Check TLS desc relocs too.
1223 (elf32_arm_stub_name): TLS desc relocs can be shared.
1224 (elf32_arm_tls_transition): Determine relaxation.
1225 (arm_stub_required_alignment): Add tls stubs.
1226 (elf32_arm_size_stubs): Likewise.
1227 (elf32_arm_tls_relax): Perform TLS relaxing.
1228 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
1229 (IS_ARM_TLS_GNU_RELOC): New.
1230 (IS_ARM_TLS_RELOC): Use it.
1231 (elf32_arm_relocate_section): Perform TLS relaxing.
1232 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
1233 desc relocations.
1234 (allocate_dynrelocs): Allocate tls desc relcoations.
1235 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
1236 symbols.
1237 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
1238 got slots.
1239 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
1240 symbol.
1241 (elf32_arm_finish_dynamic_symbol): Adjust.
1242 (arm_put_trampoline): New.
1243 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
1244 trampolines.
1245 (elf_backend_always_size_sections): Define.
1246
1247 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
1248
1249 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
1250
1251 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
1252
1253 PR ld/12366
1254 PR ld/12371
1255 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
1256 handle symbols marked with regular reference, but not non-GOT
1257 reference when building shared library.
1258
1259 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
1260 local and global STT_GNU_IFUNC symols when building shared
1261 library.
1262 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
1263
1264 2011-01-05 DJ Delorie <dj@redhat.com>
1265
1266 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
1267 * libbfd.h: Regenerate.
1268 * bfd-in2.h: Regenerate.
1269 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
1270
1271 2011-01-03 H.J. Lu <hongjiu.lu@intel.com>
1272
1273 * cpu-i386.c (bfd_i386_compatible): New.
1274 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
1275 with bfd_i386_compatible.
1276 (bfd_x86_64_arch_intel_syntax): Likewise.
1277 (bfd_i386_arch_intel_syntax): Likewise.
1278 (i8086_arch): Likewise.
1279 (bfd_x64_32_arch): Likewise.
1280 (bfd_x86_64_arch): Likewise.
1281 (bfd_i386_arch): Likewise.
1282
1283 For older changes see ChangeLog-2010
1284 \f
1285 Local Variables:
1286 mode: change-log
1287 left-margin: 8
1288 fill-column: 74
1289 version-control: never
1290 End:
This page took 0.053741 seconds and 5 git commands to generate.