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