2011-05-03 Paul Brook <paul@codesourcery.com>
[binutils-gdb.git] / bfd / ChangeLog
1 2011-05-03 Paul Brook <paul@codesourcery.com>
2
3
4 * elf32-tic6x.c (elf32_tic6x_howto_table,
5 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
6 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
7 Add R_C6000_EHTYPE.
8
9 2011-05-01 Alan Modra <amodra@gmail.com>
10
11 PR ld/12718
12 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
13 creating ifunc sections.
14 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
15
16 2011-04-30 H.J. Lu <hongjiu.lu@intel.com>
17
18 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
19 names.
20
21 2011-04-28 Tom Tromey <tromey@redhat.com>
22
23 * bfdio.c (memory_bstat): Pass correct size to memset.
24
25 2011-04-28 Mike Frysinger <vapier@gentoo.org>
26
27 * dwarf2.c (dwarf_debug_sections): Mark const.
28 * elf.c (special_sections): Likewise.
29 * libbfd-in.h (dwarf_debug_sections): Likewise.
30 * libbfd.h: Regenerate.
31
32 2011-04-26 Kai Tietz <ktietz@redhat.com>
33
34 * coffcode.h (sec_to_styp_flags): Allow linkonce for
35 debugging sections.
36
37 2011-04-26 Tristan Gingold <gingold@adacore.com>
38
39 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
40
41 2011-04-24 Alan Modra <amodra@gmail.com>
42
43 PR ld/12365
44 PR ld/12696
45 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
46 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
47 (_bfd_generic_link_add_one_symbol): Update "notice" call.
48 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
49 it is a redef of an IR symbol in a real BFD.
50
51 2011-04-22 H.J. Lu <hongjiu.lu@intel.com>
52
53 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
54 in readonly section in a shared object.
55 (elf_i386_size_dynamic_sections): Likewise.
56 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
57 (elf_x86_64_size_dynamic_sections): Likewise.
58
59 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
60
61 PR ld/12694
62 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
63 symbols.
64 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
65
66 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
67
68 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
69 on dynamic symbol error.
70 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
71
72 2011-04-20 Tristan Gingold <gingold@adacore.com>
73
74 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
75
76 2011-04-20 Alan Modra <amodra@gmail.com>
77
78 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
79 (bfd_hash_table_init_n): Overflow checking.
80 (bfd_hash_set_default_size): Return current size. Take unsigned long
81 arg. Add 65537 to hash_size primes.
82 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
83 * bfd-in2.h: Regenerate.
84
85 2011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
86
87 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
88 memmove elements.
89
90 2011-04-20 Alan Modra <amodra@gmail.com>
91
92 * libbfd.c (bfd_log2): Do return rounded up value.
93 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
94 call with expanded old round down version of the function.
95
96 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
97 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
98
99 2011-04-20 Alan Modra <amodra@gmail.com>
100
101 PR ld/12365
102 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
103 in their own common section.
104 * elflink.c (elf_link_add_object_symbols): Likewise.
105 * linker.c (generic_link_check_archive_element): Don't lose flags
106 if common section is pre-existing.
107 (_bfd_generic_link_add_one_symbol): Likewise.
108
109 2011-04-20 Alan Modra <amodra@gmail.com>
110
111 PR ld/12365
112 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
113 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
114 multiple_definition regardless of allow_multiple_definition.
115 * simple.c (simple_dummy_multiple_definition): Update.
116 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
117 calls.
118
119 2011-04-18 Tristan Gingold <gingold@adacore.com>
120
121 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
122
123 2011-04-18 Alan Modra <amodra@gmail.com>
124
125 PR ld/12365
126 PR ld/12672
127 * bfd.c (BFD_PLUGIN): Define.
128 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
129 * bfd-in2.h: Regenerate.
130 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
131 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
132
133 2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
134
135 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
136 SEC_LOAD.
137
138 2011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
139
140 * elf-bfd.h (struct sdt_note): New struct.
141 (struct elf_obj_tdata) <sdt_note_head>: New field.
142 * elf.c (elfobj_grok_stapsdt_note_1): New function.
143 (elfobj_grok_stapsdt_note): Likewise.
144 (elf_parse_notes): Added code to treat SystemTap note
145 sections.
146
147 2011-04-12 Richard Henderson <rth@redhat.com>
148
149 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
150 exclude empty .got sections.
151
152 2011-04-11 H.J. Lu <hongjiu.lu@intel.com>
153
154 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
155 array access for BFD_RELOC_386_IRELATIVE.
156
157 2011-04-11 Bernd Schmidt <bernds@codesourcery.com>
158
159 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
160
161 2011-04-11 Mark Wielaard <mjw@redhat.com>
162
163 PR 10549
164 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
165 (has_gnu_symbols): Renamed from has_ifunc_symbols.
166 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
167 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
168 also if STB_GNU_UNIQUE symbol binding was seen.
169 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
170 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
171 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
172 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
173 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
174 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
175
176 2011-04-11 Alan Modra <amodra@gmail.com>
177
178 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
179 sections.
180 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
181 (_bfd_generic_get_section_contents_in_window): Likewise.
182 * section.c (bfd_get_section_contents): Likewise.
183 * compress.c (bfd_get_full_section_contents): Likewise.
184 * elf32-rx.c (rx_final_link): Ignore rawsize.
185 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
186 bfd with bfd_get_section_limit.
187 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
188 os->size during final link. Update callers.
189 * bfd-in2.h: Regenerate.
190
191 2011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
192
193 PR ld/12637
194 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
195 as the number of global entries when merging with the primary GOT.
196
197 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
198
199 * elf32-i386.c: Update copyright year.
200 * elf64-x86-64.c: Likewise.
201
202 2011-04-09 Kai Tietz <ktietz@redhat.com>
203
204 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
205 buffer and use rawsize for sorting.
206 * coffcode.h (coff_compute_section_file_positions): Set rawsize
207 before doing alignment.
208
209 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
210
211 * elf32-i386.c (elf_i386_relocate_section): Return relocation
212 error on unsupported relocation.
213 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
214
215 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
216
217 PR binutils/12657
218 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
219 pid_t.
220
221 2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
222
223 PR ld/12654
224 * elf32-i386.c (elf_i386_relocate_section): Check !executable
225 instead of shared for R_386_TLS_LDO_32.
226
227 2011-04-08 Tristan Gingold <gingold@adacore.com>
228
229 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
230 * coff-pmac: Remove
231 * xcoff-target.h: Remove
232 * Makefile.in: Regenerate.
233
234 2011-04-07 Cary Coutant <ccoutant@google.com>
235
236 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
237
238 2011-04-07 Paul Brook <paul@codesourcery.com>
239
240 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
241 pc-relative.
242 (elf32_tic6x_howto_table_rel): Ditto.
243 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
244 (elf32_tic6x_check_relocs): Ditto.
245
246 2011-04-06 Joseph Myers <joseph@codesourcery.com>
247
248 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
249 targets.
250 (strongarm*, thumb*, xscale*): Remove architectures.
251 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
252 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
253 xscale-*-coff): Remove targets.
254
255 2011-04-01 Tristan Gingold <gingold@adacore.com>
256
257 * elfxx-ia64.c: include bfd_stdint.h
258
259 2011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
260
261 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
262 dynobj and its initialization.
263
264 2011-03-31 Tristan Gingold <gingold@adacore.com>
265
266 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
267 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
268 BFD_HOST_LONG_LONG to 1.
269
270 2011-03-31 Tristan Gingold <gingold@adacore.com>
271
272 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
273 (_bfd_vms_write_etir): Ditto.
274 (_bfd_vms_slurp_etir): Avoid to use intptr_t
275 * configure.com: Generate bfd_stdint.h
276
277 2011-03-31 Bernd Schmidt <bernds@codesourcery.com>
278
279 * elf32-tic6x.h (struct elf32_tic6x_params): New.
280 (elf32_tic6x_setup): Declare.
281 * elf32-tic6x.c: Include <limits.h>.
282 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
283 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
284 New structures.
285 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
286 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
287 tic6x_elf_scom_symbol_ptr): New static variables.
288 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
289 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
290 R_C6000_PCR_H16 and R_C6000_PCR_L16.
291 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
292 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
293 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
294 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
295 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
296 elf32_tic6x_adjust_dynamic_symbol): New static functions.
297 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
298 to weak symbols as required by the ABI.
299 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
300 as needed when generating DSBT output.
301 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
302 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
303 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
304 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
305 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
306 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
307 New static functions.
308 (ELF_MAXPAGESIZE): Define to 0x1000.
309 (bfd_elf32_bfd_copy_private_bfd_data,
310 bfd_elf32_bfd_link_hash_table_create,
311 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
312 elf_backend_want_got_plt, elf_backend_want_dynbss,
313 elf_backend_plt_readonly, elf_backend_got_header_size,
314 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
315 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
316 elf_backend_check_relocs, elf_backend_add_symbol_hook,
317 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
318 elf_backend_section_from_bfd_section,
319 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
320 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
321 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
322
323 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
324 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
325 * bfd/bfd-in2.h: Regenerate.
326 * bfd/libbfd.h: Regenerate.
327 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
328
329 2011-03-31 Tristan Gingold <gingold@adacore.com>
330
331 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
332 entry on xcoff when value is C_NULL_VALUE.
333
334 2011-03-31 Tristan Gingold <gingold@adacore.com>
335
336 * libcoff-in.h (exec_hdr): Remove.
337 * libcoff.h: Regenerate.
338
339 2011-03-30 Nick Clifton <nickc@redhat.com>
340
341 * po/da.po: Updated Danish translation.
342
343 2011-03-29 Richard Henderson <rth@redhat.com>
344
345 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
346 (elf64_alpha_gc_sweep_hook): New.
347 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
348 (elf_backend_can_gc_sections): New.
349
350 2011-03-26 John Marino <binutils@marino.st>
351
352 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
353 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
354 * configure: Regenerate.
355
356 2011-03-25 Michael Snyder <msnyder@vmware.com>
357
358 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
359
360 2011-03-25 Tristan Gingold <gingold@adacore.com>
361
362 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
363 of find_nearest_line on object files.
364
365 2011-03-25 Tristan Gingold <gingold@adacore.com>
366
367 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
368 Minor reordering.
369 (alpha_vms_create_eisd_for_section): Make code sections read-only.
370
371 2011-03-24 Alan Modra <amodra@gmail.com>
372
373 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
374 old-style __tls_get_addr calls without marker relocs don't match
375 their arg setup insn one for one. If such mismatches are found
376 report the reloc and don't do any tls optimization.
377 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
378
379 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
380
381 * bfd-in2.h: Regenerate.
382
383 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
384
385 * archures.c: Add AVR XMEGA architecture information.
386 * cpu-avr.c (arch_info_struct): Likewise.
387 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
388 (elf32_avr_object_p): Likewise.
389
390 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
391
392 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
393 * bfd-in2.h: Regenerate.
394 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
395 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
396 entry.
397 (elf32_arm_howto_from_type): Update accordingly.
398 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
399 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
400 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
401 with an extra noncall_refcount field.
402 (arm_local_iplt_info): New structure.
403 (elf_arm_obj_tdata): Add local_iplt.
404 (elf32_arm_local_iplt): New accessor macro.
405 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
406 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
407 Change tls_type to a bitfield and add is_iplt.
408 (elf32_arm_link_hash_newfunc): Update accordingly.
409 (elf32_arm_allocate_local_sym_info): New function.
410 (elf32_arm_create_local_iplt): Likewise.
411 (elf32_arm_get_plt_info): Likewise.
412 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
413 (elf32_arm_get_local_dynreloc_list): Likewise.
414 (create_ifunc_sections): Likewise.
415 (elf32_arm_copy_indirect_symbol): Update after the changes to
416 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
417 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
418 to get PLT information. Assert that all STT_GNU_IFUNC references
419 are turned into PLT references.
420 (arm_build_one_stub): Pass the symbol type to
421 elf32_arm_final_link_relocate.
422 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
423 (elf32_arm_allocate_irelocs): New function.
424 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
425 all R_ARM_IRELATIVE.
426 (elf32_arm_allocate_plt_entry): New function.
427 (elf32_arm_populate_plt_entry): Likewise.
428 (elf32_arm_final_link_relocate): Add an st_type parameter.
429 Set srelgot to null for static objects. Use separate variables
430 to record which st_value and st_type should be used when generating
431 a dynamic relocation. Use elf32_arm_get_plt_info to find the
432 symbol's PLT information, setting has_iplt_entry, splt,
433 plt_offset and gotplt_offset accordingly. Check whether
434 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
435 the relocation target accordingly. Broaden assert to include
436 .iplts. Don't set sreloc for static relocations. Assert that
437 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
438 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
439 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
440 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
441 resolve GOT references to the .igot.plt entry.
442 (elf32_arm_relocate_section): Update the call to
443 elf32_arm_final_link_relocate.
444 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
445 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
446 relocations in shared libraries and relocatable executables.
447 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
448 to get the list of dynamic relocations for a local symbol.
449 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
450 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
451 to allocate local symbol information. Treat R_ARM_REL32 and
452 R_ARM_REL32_NOI as call relocations in shared libraries and
453 relocatable executables. Record PLT information for local
454 STT_GNU_IFUNC functions as well as global functions. Count
455 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
456 to get the list of dynamic relocations for a local symbol.
457 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
458 Don't remove STT_GNU_IFUNC PLTs unless all references have been
459 removed. Update after the changes to elf32_arm_link_hash_entry.
460 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
461 entries should live in .plt or .iplt. Check whether the .igot.plt
462 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
463 to allocate .plt and .(i)got.plt entries. Detect which .got
464 entries will need R_ARM_IRELATIVE relocations and use
465 elf32_arm_allocate_irelocs to allocate them. Likewise other
466 non-.got dynamic relocations.
467 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
468 and dynamic relocations for local STT_GNU_IFUNC symbols.
469 Check whether the .igot.plt and .got entries can be combined.
470 Detect which .got entries will need R_ARM_IRELATIVE relocations
471 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
472 section pointers intead of strcmp checks. Handle iplt and igotplt.
473 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
474 to fill in .plt, .got.plt and .rel(a).plt entries. Point
475 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
476 resolve to it.
477 (elf32_arm_output_plt_map_1): New function, split out from
478 elf32_arm_output_plt_map. Handle .iplt entries. Use
479 elf32_arm_plt_needs_thumb_stub_p.
480 (elf32_arm_output_plt_map): Call it.
481 (elf32_arm_output_arch_local_syms): Add mapping symbols for
482 local .iplt entries.
483 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
484 (elf32_arm_swap_symbol_out): Likewise.
485 (elf32_arm_add_symbol_hook): New function.
486 (elf_backend_add_symbol_hook): Define for all targets.
487
488 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
489
490 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
491 * elf.c (swap_out_syms): Set st_target_internal for each
492 Elf_Internal_Sym.
493 * elfcode.h (elf_swap_symbol_in): Likewise.
494 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
495 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
496 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
497 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
498 * elflink.c (elf_link_output_extsym): Likewise.
499 (bfd_elf_final_link): Likewise.
500 (elf_link_add_object_symbols): Copy st_target_internal
501 to the hash table if we see a definition.
502 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
503 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
504 a branch_type field.
505 (a8_erratum_fix, a8_erratum_reloc): Likewise.
506 (arm_type_of_stub): Replace actual_st_type with an
507 actual_branch_type parameter.
508 (arm_build_one_stub): Use branch types rather than st_types to
509 determine the type of branch.
510 (cortex_a8_erratum_scan): Likewise.
511 (elf32_arm_size_stubs): Likewise.
512 (bfd_elf32_arm_process_before_allocation): Likewise.
513 (allocate_dynrelocs_for_symbol): Likewise.
514 (elf32_arm_finish_dynamic_sections): Likewise.
515 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
516 a branch_type parameter.
517 (elf32_arm_relocate_section): Update call accordingly.
518 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
519 (elf32_arm_output_map_sym): Initialize st_target_internal.
520 (elf32_arm_output_stub_sym): Likewise.
521 (elf32_arm_symbol_processing): Delete.
522 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
523 Use st_target_internal to record the branch type.
524 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
525 Thumb functions.
526 (elf32_arm_is_function_type): Delete.
527 (elf_backend_symbol_processing): Likewise.
528 (elf_backend_is_function_type): Likewise.
529
530 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
531
532 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
533 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
534 into the PLT block.
535
536 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
537
538 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
539 may_need_local_target_p and may_become_dynamic_p to classify
540 the relocation type. Don't check info->symbolic or h->def_regular
541 when deciding whether to record a potential dynamic reloc.
542 Don't treat potential dynamic relocs as PLT references.
543 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
544 try to make the PLT reference count go negative.
545
546 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
547
548 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
549 GOT entry here, rather than leaving it to finish_dynamic_symbol.
550 Only create a dynamic relocation for local references if
551 info->shared.
552 (allocate_dynrelocs_for_symbol): Update dynamic relocation
553 allocation accordingly.
554 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
555
556 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
557
558 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
559 (elf32_arm_add_dynreloc): Likewise.
560 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
561 to allocate dynamic relocations.
562 (elf32_arm_size_dynamic_sections): Likewise.
563 (allocate_dynrelocs): Likewise. Rename to
564 allocate_dynrelocs_for_symbol.
565 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
566 create dynamic relocations.
567 (elf32_arm_finish_dynamic_symbol): Likewise.
568
569 2011-03-12 H.J. Lu <hongjiu.lu@intel.com>
570
571 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
572 x32 GD->IE and GD->LE transitions.
573 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
574 and LD->LE transitions.
575
576 2011-03-10 Alan Modra <amodra@gmail.com>
577
578 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
579 for LO_DS error message and correct multiple.
580
581 2011-03-10 Alan Modra <amodra@gmail.com>
582
583 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
584 (ppc64_elf_link_just_syms): New function.
585 (opd_entry_value): Don't assume big-endian host.
586 (get_r2off): New function.
587 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
588
589 2011-03-06 Michael Snyder <msnyder@vmware.com>
590
591 * compress.c (bfd_compress_section_contents): Check for out of mem.
592
593 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
594 that case statement falls through intentionally.
595
596 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
597
598 2011-03-04 Alan Modra <amodra@gmail.com>
599
600 * archive.c (bsd_write_armap): Don't call stat in deterministic
601 mode, and don't use st_mtime if stat returns error.
602
603 2011-03-03 Michael Snyder <msnyder@vmware.com>
604
605 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
606
607 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
608
609 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
610 (aout_link_write_other_symbol): Missing break statement.
611
612 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
613
614 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
615
616 2011-03-03 H.J. Lu <hongjiu.lu@intel.com>
617
618 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
619 x32 IE->LE transition.
620 (elf_x86_64_relocate_section): Likewise.
621
622 2011-03-02 Bernd Schmidt <bernds@codesourcery.com>
623
624 * elflink.c (is_reloc_section): Remove function.
625 (get_dynamic_reloc_section_name): Construct string manually.
626
627 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
628
629 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
630 (adjust_relative_path): Likewise.
631 (_bfd_construct_extended_name_table): Likewise.
632 * corefile.c (generic_core_file_matches_executable_p): Likewise.
633 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
634 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
635 * elf32-spu.c (sort_bfds): Likewise.
636 (spu_elf_auto_overlay): Likewise.
637 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
638 * xcofflink.c (xcoff_set_import_path): Likewise.
639 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
640 (xtensa_regfile_lookup_shortname): Likewise.
641
642 2011-02-28 Alan Modra <amodra@gmail.com>
643
644 PR 12513
645 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
646 stringsize. Properly sanity check symdef_count. Remove redundant
647 bfd_release.
648
649 2011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
650
651 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
652 and handle claim_file seeking. Only try to load the plugin once.
653
654 2011-02-22 Andreas Schwab <schwab@redhat.com>
655
656 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
657 relocation read the value from the second GOT slot.
658
659 2011-02-15 Tristan Gingold <gingold@adacore.com>
660
661 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
662
663 2011-02-15 Alan Modra <amodra@gmail.com>
664
665 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
666 toc relocs. Fuss over free(NULL).
667
668 2011-02-14 Mike Frysinger <vapier@gentoo.org>
669
670 * elflink.c (bfd_elf_size_dynamic_sections): Add
671 bfd_get_symbol_leading_char to the start of newname.
672
673 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
674
675 * configure: Regenerate.
676
677 2011-02-09 Alan Modra <amodra@gmail.com>
678
679 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
680 we are done. When optimising large toc, check that a global
681 symbol on a toc reloc is defined in a kept section.
682
683 2011-02-08 Nick Clifton <nickc@redhat.com>
684
685 PR binutils/12467
686 * elf.c (assign_file_positions_for_load_sections): Set the program
687 header offset and entry size to zero if there are no program
688 headers.
689
690 2011-02-08 Alan Modra <amodra@gmail.com>
691
692 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
693 local_syms when looking for local symbols in .toc.
694
695 2011-02-01 Alan Modra <amodra@gmail.com>
696
697 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
698 for toc pointer on any section having makes_toc_func_call set.
699 (check_pasted_section): Ensure pasted .init/.fini fragments use
700 the same toc if any has makes_toc_func_call set.
701
702 2011-01-28 Joseph Myers <joseph@codesourcery.com>
703
704 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
705 field.
706
707 2011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
708
709 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
710 common sections too.
711
712 2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
713
714 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
715 Solaris target.
716
717 2011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
718
719 Fix compilation for mingw64.
720 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
721 typecast to avoid warning.
722 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
723 usage.
724 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
725 of long for pointer to avoid warning.
726 (elfNN_ia64_relax_brl): Idem.
727 (elfNN_ia64_install_value): Idem.
728 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
729
730 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
731
732 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
733 h->needs_plt when deciding whether to record a possible dynamic reloc.
734
735 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
736
737 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
738 dynamic relocs for the removed section.
739
740 2011-01-15 H.J. Lu <hongjiu.lu@intel.com>
741
742 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
743 relocations.
744
745 2011-01-14 H.J. Lu <hongjiu.lu@intel.com>
746
747 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
748 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
749 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
750 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
751 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
752 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
753 for ILP32.
754
755 2011-01-14 Alan Modra <amodra@gmail.com>
756
757 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
758 error.
759 (_bfd_default_error_handler): Likewise.
760 * elf.c (print_segment_map): Likewise.
761 * libbfd.c (warn_deprecated): Likewise.
762 * som.c (som_sizeof_headers): No need to do so here.
763 * coff-i860.c: Replace use of printf for error messages with
764 _bfd_error_handler.
765 * coff-ppc.c: Likewise.
766 * coff-sh.c: Likewise.
767 * elf32-bfin.c: Likewise.
768 * elf32-dlx.c: Likewise.
769 * elf32-mep.c: Likewise.
770 * elf32-v850.c: Likewise.
771 * mach-o.c: Likewise.
772 * pef.c: Likewise.
773
774 2011-01-13 H.J. Lu <hongjiu.lu@intel.com>
775
776 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
777 swap_reloca_out.
778 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
779 (elf_x86_64_check_relocs): Align relocation section to 4 byte
780 for 32bit.
781 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
782 ELF_ST_TYPE.
783 (elf_x86_64_finish_dynamic_symbol): Updated.
784 (elf_x86_64_finish_dynamic_sections): Don't use
785 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
786 bfd_elf64_swap_dyn_out.
787
788 2011-01-14 J. Park <grassman@gmail.com>
789
790 PR ld/12339
791 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
792 following bfd_link_hash_warning symbol link.
793
794 2011-01-10 Nathan Sidwell <nathan@codesourcery.com>
795 Glauber de Oliveira Costa <glommer@gmail.com>
796
797 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
798 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
799 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
800 relocations.
801 * libbfd.h: Rebuilt.
802 * bfd-in2.h: Rebuilt.
803 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
804 (elf32_arm_reloc_map): Likewise.
805 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
806 (elf32_arm_stub_long_branch_any_tls_pic,
807 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
808 (DEF_STUBS): Add new stubs.
809 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
810 (elf32_arm_local_tlsdesc_gotent): New.
811 (GOT_TLS_GDESC): New mask.
812 (GOT_TLS_GD_ANY): Define.
813 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
814 (elf32_arm_compute_jump_table_size): New.
815 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
816 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
817 sgotplt_jump_table_size fields.
818 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
819 (elf32_arm_link_hash_table_create): Initialize new fields.
820 (arm_type_of_stub): Check TLS desc relocs too.
821 (elf32_arm_stub_name): TLS desc relocs can be shared.
822 (elf32_arm_tls_transition): Determine relaxation.
823 (arm_stub_required_alignment): Add tls stubs.
824 (elf32_arm_size_stubs): Likewise.
825 (elf32_arm_tls_relax): Perform TLS relaxing.
826 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
827 (IS_ARM_TLS_GNU_RELOC): New.
828 (IS_ARM_TLS_RELOC): Use it.
829 (elf32_arm_relocate_section): Perform TLS relaxing.
830 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
831 desc relocations.
832 (allocate_dynrelocs): Allocate tls desc relcoations.
833 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
834 symbols.
835 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
836 got slots.
837 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
838 symbol.
839 (elf32_arm_finish_dynamic_symbol): Adjust.
840 (arm_put_trampoline): New.
841 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
842 trampolines.
843 (elf_backend_always_size_sections): Define.
844
845 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
846
847 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
848
849 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
850
851 PR ld/12366
852 PR ld/12371
853 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
854 handle symbols marked with regular reference, but not non-GOT
855 reference when building shared library.
856
857 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
858 local and global STT_GNU_IFUNC symols when building shared
859 library.
860 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
861
862 2011-01-05 DJ Delorie <dj@redhat.com>
863
864 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
865 * libbfd.h: Regenerate.
866 * bfd-in2.h: Regenerate.
867 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
868
869 2011-01-03 H.J. Lu <hongjiu.lu@intel.com>
870
871 * cpu-i386.c (bfd_i386_compatible): New.
872 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
873 with bfd_i386_compatible.
874 (bfd_x86_64_arch_intel_syntax): Likewise.
875 (bfd_i386_arch_intel_syntax): Likewise.
876 (i8086_arch): Likewise.
877 (bfd_x64_32_arch): Likewise.
878 (bfd_x86_64_arch): Likewise.
879 (bfd_i386_arch): Likewise.
880
881 For older changes see ChangeLog-2010
882 \f
883 Local Variables:
884 mode: change-log
885 left-margin: 8
886 fill-column: 74
887 version-control: never
888 End: