]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
2011-06-27 Tristan Gingold <gingold@adacore.com>
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
62a35308
TG
12011-06-27 Tristan Gingold <gingold@adacore.com>
2
3 * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
4 Add comment.
5
5d430399
L
62011-06-25 H.J. Lu <hongjiu.lu@intel.com>
7
8 * elf64-x86-64.c (elf_backend_post_process_headers): Don't
9 define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
10
332ce62b
JK
112011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12
13 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
14 PLT_EH_FRAME.
15 * elf32-i386.c (elf_i386_link_hash_table): Likewise.
16
7dbf3b76
RH
172011-06-24 Richard Henderson <rth@redhat.com>
18
19 PR ld/12928
20 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
21 tlsgd insn before swapping adjacent insns.
22
d120eec2
TG
232011-06-24 Tristan Gingold <gingold@adacore.com>
24
25 * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
26 absolute section.
27
1e951488
AM
282011-06-24 Alan Modra <amodra@gmail.com>
29
30 PR ld/12921
31 * elf.c (assign_file_positions_for_load_sections): Don't align
32 sh_offset for all SHT_NOBITS sections here, just .tbss sections
33 that don't get a PT_LOAD.
34
b68593b9
KK
352011-06-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
36
37 * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
38 (sh_elf_check_relocs): Likewise.
39
e366eeae
RH
402011-06-22 Richard Henderson <rth@redhat.com>
41
42 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
43 TPREL in a PIE image.
44 (alpha_dynamic_entries_for_reloc): Likewise.
45 (elf64_alpha_relocate_section): Allow TPREL in PIE images.
46 (elf64_alpha_relax_got_load): Likewise.
47
9ec0c936
RR
482011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
49
50 * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
51 for PIE.
52
3a5dbfb2
AM
532011-06-22 Alan Modra <amodra@gmail.com>
54
55 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
56 plugin symbols. Fix segfault on linker scrip defined syms.
57
e41b3a13
JJ
582011-06-20 Jakub Jelinek <jakub@redhat.com>
59
60 PR ld/12570
61 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
62 at all for linker created .eh_frame sections.
63 (_bfd_elf_discard_section_eh_frame): Handle linker created
64 .eh_frame sections with no relocations.
65 * elf64-x86-64.c: Include dwarf2.h.
66 (elf_x86_64_eh_frame_plt): New variable.
67 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
68 PLT_FDE_LEN_OFFSET): Define.
69 (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
70 (elf_x86_64_create_dynamic_sections): Create and fill in
71 .eh_frame section for .plt section.
72 (elf_x86_64_size_dynamic_sections): Write .plt section size
73 into .eh_frame FDE covering .plt section.
74 (elf_x86_64_finish_dynamic_sections): Write .plt section
75 start into .eh_frame FDE covering .plt section. Call
76 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
77 (elf_backend_plt_alignment): Define to 4.
78 * elf32-i386.c: Include dwarf2.h.
79 (elf_i386_eh_frame_plt): New variable.
80 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
81 PLT_FDE_LEN_OFFSET): Define.
82 (struct elf_i386_link_hash_table): Add plt_eh_frame field.
83 (elf_i386_create_dynamic_sections): Create and fill in
84 .eh_frame section for .plt section.
85 (elf_i386_size_dynamic_sections): Write .plt section size
86 into .eh_frame FDE covering .plt section.
87 (elf_i386_finish_dynamic_sections): Write .plt section
88 start into .eh_frame FDE covering .plt section. Call
89 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
90 (elf_backend_plt_alignment): Define to 4.
91
8b778942
L
922011-06-19 H.J. Lu <hongjiu.lu@intel.com>
93
94 * elf64-x86-64.c (elf_backend_post_process_headers): Defined
95 for x32.
96
8fd79e71
L
972011-06-16 H.J. Lu <hongjiu.lu@intel.com>
98
99 * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
100 CORE_HEADER is defined.
101 (elf_x86_64_write_core_note): New.
102 (elf_backend_write_core_note): Likewise.
103
104 * hosts/x86-64linux.h (uint64_t): New.
105 (user_regsx32_struct): Likewise.
106 (elf_gregx32_t): Likewise.
107 (ELF_NGREGX32): Likewise.
108 (elf_gregsetx32_t): Likewise.
109 (elf_prstatusx32): Likewise.
110 (prstatusx32_t): Likewise.
111 (user_fpregs32_struct): Removed.
112 (user_fpxregs32_struct): Likewise.
113 (user32): Likewise.
114 (elf_fpregset32_t): Likewise.
115 (elf_fpxregset32_t): Likewise.
116 (prgregset32_t): Likewise.
117 (prfpregset32_t): Likewise.
118
bcd823f1
L
1192011-06-16 H.J. Lu <hongjiu.lu@intel.com>
120
121 * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
122 (elf_x86_64_grok_psinfo): Likewise.
123
a06c7d5a
NC
1242011-06-16 Nick Clifton <nickc@redhat.com>
125
126 * elf.c (elf_find_function): Fail if not provided with a symbol
127 table.
128
faa9a424
UW
1292011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
130
131 * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
132 * elf.c (elfcore_grok_arm_vfp): New function.
133 (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
134 (elfcore_write_arm_vfp): New function.
135 (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
136
48f4b4f5
RH
1372011-06-14 Richard Henderson <rth@redhat.com>
138
139 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
140 elf64_alpha_merge_ind_symbols; adjust for the generic interface.
141 (elf64_alpha_always_size_sections): Don't call
142 elf64_alpha_merge_ind_symbols.
143 (elf_backend_copy_indirect_symbol): New.
144
4d16d575
AM
1452011-06-14 Alan Modra <amodra@gmail.com>
146
147 PR ld/12887
148 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
149 before doing anything.
150 (_bfd_elf_discard_section_eh_frame): Likewise.
151
1e24d83c
AM
1522011-06-14 Alan Modra <amodra@gmail.com>
153
154 * Makefile.am: Formatting.
155 * Makefile.in: Regenerate.
156 * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
157 * po/SRC-POTFILES.in: Regnerate.
158
e4d34ace
AM
1592011-06-14 Alan Modra <amodra@gmail.com>
160
161 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
162 (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
163 Don't handle warning symbols here.
164 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
165 (allocate_dynrelocs, readonly_dynrelocs): As above.
166
7f6ab9f8
AM
1672011-06-14 Alan Modra <amodra@gmail.com>
168
169 PR ld/12851
170 * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
171 (elf_gc_sweep): Don't treat debug and sections like .comment
172 specially here.
173 (bfd_elf_gc_sections): Treat note sections as gc roots only when
174 not part of a group. Always call gc_mark_extra_sections.
175 * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
176 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
177 _bfd_elf_gc_mark_extra_sections.
178 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
179 _bfd_elf_gc_mark_extra_sections.
180 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
181
09d9a62a
NC
1822011-06-13 Nick Clifton <nickc@redhat.com>
183
184 * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
185 variable 'local_got_offsets'.
186 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
187 (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
188
aa137e4d
NC
1892011-06-13 Walter Lee <walt@tilera.com>
190
191 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
192 (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
193 (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
194 and elfxx-tilegx.lo.
195 (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
196 elfxx-tilegx.c.
197 (BFD64_BACKENDS): Add elf64-tilegx.lo.
198 (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
199 * Makefile.in: Regenerate.
200 * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
201 bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
202 (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
203 (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
204 bfd-in2.h: Regenerate.
205 * config.bfd: Handle tilegx-*-* and tilepro-*-*.
206 * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
207 and bfd_elf64_tilegx_vec.
208 * configure: Regenerate.
209 * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
210 TILEPRO_ELF_DATA.
211 * libbfd.h: Regenerate.
212 * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
213 RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
214 IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
215 IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
216 IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
217 IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
218 IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
219 IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
220 IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
221 IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
222 MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
223 IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
224 IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
225 IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
226 IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
227 IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
228 IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
229 Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
230 HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
231 JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
232 DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
233 SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
234 IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
235 IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
236 IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
237 IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
238 IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
239 IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
240 IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
241 IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
242 IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
243 IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
244 IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
245 IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
246 IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
247 IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
248 IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
249 IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
250 IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
251 IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
252 IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
253 IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
254 IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
255 IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
256 IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
257 IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
258 IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
259 IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
260 IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
261 TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
262 * targets.c (bfd_elf32_tilegx_vec): Declare.
263 (bfd_elf32_tilepro_vec): Declare.
264 (bfd_elf64_tilegx_vec): Declare.
265 (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
266 and bfd_elf64_tilegx_vec.
267 * cpu-tilegx.c: New file.
268 * cpu-tilepro.c: New file.
269 * elf32-tilepro.h: New file.
270 * elf32-tilepro.c: New file.
271 * elf32-tilegx.c: New file.
272 * elf32-tilegx.h: New file.
273 * elf64-tilegx.c: New file.
274 * elf64-tilegx.h: New file.
275 * elfxx-tilegx.c: New file.
276 * elfxx-tilegx.h: New file.
277
7686d77d
AM
2782011-06-13 Alan Modra <amodra@gmail.com>
279
280 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
281 (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
282 warning symbols here.
283 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
284 * elf32-arm.c (allocate_dynrelocs_for_symbol,
285 elf32_arm_readonly_dynrelocs): Likewise.
286 * elf32-bfin.c (bfin_discard_copies): Likewise.
287 * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
288 elf_cris_discard_excess_dso_dynamics,
289 elf_cris_discard_excess_program_dynamics): Likewise.
290 * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
291 clobber_millicode_symbols, readonly_dynrelocs): Likewise.
292 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
293 * elf32-i386.c (elf_i386_allocate_dynrelocs,
294 elf_i386_readonly_dynrelocs): Likewise.
295 * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
296 * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
297 * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
298 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
299 * elf32-microblaze.c (allocate_dynrelocs): Likewise.
300 * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
301 * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
302 * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
303 * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
304 * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
305 * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
306 elf32_tic6x_readonly_dynrelocs): Likewise.
307 * elf32-vax.c (elf_vax_discard_copies): Likewise.
308 * elf32-xstormy16.c (xstormy16_relax_plt_check,
309 xstormy16_relax_plt_realloc): Likewise.
310 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
311 * elf64-alpha.c (elf64_alpha_output_extsym,
312 elf64_alpha_calc_got_offsets_for_symbol,
313 elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
314 * elf64-hppa.c (elf64_hppa_mark_exported_functions,
315 allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
316 elf_hppa_unmark_useless_dynamic_symbols,
317 elf_hppa_remark_useless_dynamic_symbols): Likewise.
318 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
319 adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
320 readonly_dynrelocs, merge_global_got, reallocate_got,
321 undo_symbol_twiddle): Likewise.
322 * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
323 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
324 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
325 elf_x86_64_readonly_dynrelocs): Likewise.
326 * elflink.c (elf_link_renumber_hash_table_dynsyms,
327 elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
328 _bfd_elf_link_find_version_dependencies,
329 _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
330 _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
331 elf_collect_hash_codes, elf_collect_gnu_hash_codes,
332 elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
333 elf_gc_propagate_vtable_entries_used,
334 elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
335 elf_gc_allocate_got_offsets): Likewise.
336 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
337 elfNN_ia64_global_dyn_sym_thunk): Likewise.
338 * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
339 mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
340 * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
341 * i386linux.c (linux_tally_symbols): Likewise.
342 * m68klinux.c (linux_tally_symbols): Likewise.
343 * sparclinux.c (linux_tally_symbols): Likewise.
344 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
345 * xcofflink.c (xcoff_post_gc_symbol): Likewise.
346
347 * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
348 function. Update all callers.
349 * aoutx.h (aout_link_write_other_symbol): Likewise.
350 * pdp11.c (aout_link_write_other_symbol): Likewise.
351 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
352 * ecoff.c (ecoff_link_write_external): Likewise.
353 * xcofflink.c (xcoff_write_global_symbol): Likewise.
354 * vms-alpha.c (alpha_vms_link_output_symbol): Likewise. Handle
355 warning symbols.
356 * ecoff.c (ecoff_link_hash_traverse): Delete.
357 * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
358 _bfd_coff_write_global_sym.
359 * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
360 * libcoff.h: Regenerate.
361
894891db
NC
3622011-06-10 Nick Clifton <nickc@redhat.com>
363
364 * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
365 backend does not provide a function for creating dynamic sections
366 then fail.
367 (bfd_elf_final_link): Issue a warning message if a dynamic section
368 has the SHT_NOTE type.
369 (bfd_elf_final_link): Do not look for dynamic strings in a section
370 that does not have the SHT_STRTAB type or the name .dynstr.
371 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
372 section is not in the output binary.
373 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
374
d17fe7b7
TG
3752011-06-09 Tristan Gingold <gingold@adacore.com>
376
377 * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
378 (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
379 spaces.
380
8076289e
TG
3812011-06-09 Tristan Gingold <gingold@adacore.com>
382
383 * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
384
ba85c43e
NC
3852011-06-09 Nick Clifton <nickc@redhat.com>
386
387 PR ld/12845
388 * elf.c (_bfd_elf_init_private_section_data): Add an assertion
389 that the output section has an allocated bfd_elf_section_data
390 structure.
391 * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
392 symbols in sections that have been removed by garbage collection.
393
adc7571d
L
3942011-06-08 H.J. Lu <hongjiu.lu@intel.com>
395
396 * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
397 relocations in SEC_DEBUGGING sections when building shared
398 libraries.
399
24007750
L
4002011-06-08 H.J. Lu <hongjiu.lu@intel.com>
401
402 PR ld/12851
403 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
404 (bfd_elf_gc_sections): Also check SHT_NOTE sections.
405
e79064fe
TG
4062011-06-08 Tristan Gingold <gingold@adacore.com>
407
408 * makefile.vms (OBJS): Add elfxx-ia64.obj
409 Remove vax case.
410
d3aeb6ee
AM
4112011-06-08 Alan Modra <amodra@gmail.com>
412
413 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
414 * sco5-core.c: Init match_priority field.
415
2a41f396
AM
4162011-06-08 Alan Modra <amodra@gmail.com>
417
418 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
419 indirect links here.
420
1d859532
JB
4212011-06-07 Joel Brobecker <brobecker@adacore.com>
422
423 * irix-core.c (irix_core_vec): Add match_priority field.
424
0aabe54e
AM
4252011-06-06 Alan Modra <amodra@gmail.com>
426
427 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
428 Add match_priority.
429 * configure.in: Bump bfd version.
430 * elfcode.h (elf_object_p): Delete hacks preventing match of
431 EM_NONE and ELFOSABI_NONE targets when a better match exists.
432 * elfxx-target.h (elf_match_priority): Define and use.
433 * format.c (bfd_check_format_matches): Use target match_priority
434 to choose best of multiple matching targets. In cases with multiple
435 matches rerun _bfd_check_format if we don't choose the last match.
436 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
437 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
438 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
439 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
440 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
441 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
442 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
443 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
444 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
445 * vms-lib.c, * xsym.c: Init match_priority field.
446 * configure: Regenerate.
447 * bfd-in2.h: Regenerate.
448
70b554c9
L
4492011-06-04 H.J. Lu <hongjiu.lu@intel.com>
450
451 PR ld/12842
452 * elfcode.h (elf_object_p): Revert the last change.
453
d50ec8a7
AM
4542011-06-04 Alan Modra <amodra@gmail.com>
455
456 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
457 return the other arch.
458 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
459 target.
460
164a5cb7
NC
4612011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
462
463 PR ld/12682
464 * hash.c (higher_primer_number): Add more, small, prime numbers.
465 (bfd_hash_set_default_size): Likewise.
466
cc643b88
NC
4672011-06-02 Nick Clifton <nickc@redhat.com>
468
469 * coff-mcore.c: Fix spelling typo.
470 * coff-stgo32.c: Likewise.
471 * elf32-arm.c: Likewise.
472 * elf32-avr.c: Likewise.
473 * elf-m68hc1x.c: Likewise.
474 * elf32-mcore.c: Likewise.
475 * elf32-mep.c: Likewise.
476 * elf32-mt.c: Likewise.
477 * elf32-ppc.c: Likewise.
478 * elf32-xtensa.c: Likewise.
479 * elf64-ppc.c: Likewise.
480 * elfxx-mips.c: Likewise.
481 * netbsd.h: Likewise.
482 * nlmcode.h: Likewise.
483 * vms-alpha.c: Likewise.
484 * po/bfd.pot: Regenerate.
485 * po/SRC-POTFILES.in: Regenerate.
486
4c422395
DD
4872011-06-01 DJ Delorie <dj@redhat.com>
488
489 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
490 * target.c: Likewise.
491 * configure.in: Likewise.
492 * configure.in: Regenerate.
493 * elf32-rx.c: Add elf32-rx-be-ns target.
494 (rx_elf_object_p): Never allow the be-ns target by default,
495 only allow it if the user requests it.
496
4b819e1f
L
4972011-06-01 H.J. Lu <hongjiu.lu@intel.com>
498
499 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
500 relocation in readonly section in a shared object.
501 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
502
74ce8de7
NC
5032011-05-31 Nick Clifton <nickc@redhat.com>
504
505 * archive.c (adjust_relative_path): Fix comment to prevent it
506 corrupting the auto-generated bfd.h.
507
63e1a0fc
PB
5082011-05-31 Paul Brook <paul@codesourcery.com>
509
510 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
511 for known functions.
512 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
513 symbols.
514
12352d3f
PB
5152011-05-31 Paul Brook <paul@codesourcery.com>
516
517 * elf32-arm.c (arm_stub_is_thumb): Add
518 arm_stub_long_branch_v4t_thumb_tls_pic.
519 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
520 Handle Thumb stubs.
521
c4948609
NC
5222011-05-27 Nick Clifton <nickc@redhat.com>
523
524 PR binutils/12710
525 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
526 unable to read a file pointed to by an entry in a thin archive.
527 (adjust_relative_path): Use lrealpath to canonicalize paths.
528 Handle the case where the reference path is above the current
529 path in the directory tree.
530
6769d501
L
5312011-05-26 H.J. Lu <hongjiu.lu@intel.com>
532
533 PR ld/12809
534 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
535 R_X86_64_TPOFF64 in executable.
536
2676a7d9
AM
5372011-05-26 Alan Modra <amodra@gmail.com>
538
539 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
540 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
541 local_protected comment.
542
cbe79dfe
TG
5432011-05-25 Tristan Gingold <gingold@adacore.com>
544
545 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
546 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
547 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
548 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
549 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
550 (elf32-ia64.c): Created from elfnn-ia64.c
551 (elf64-ia64.c): Likewise.
552 * elfxx-ia64.h: New file.
553 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
554 functions.Includes elfxx-ia64.h.
555 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
556 (IA64_HOWTO): Adjust.
557 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
558 (elfNN_ia64_reloc_type_lookup): Renames to
559 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
560 (elfNN_ia64_reloc_name_lookup): Renames to
561 ia64_elf_reloc_name_lookup. Make it public.
562 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
563 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
564 public.
565 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
566 Move it and make it public. Move prototype to elfxx-ia64.h
567 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
568 Move prototype to elfxx-ia64.h
569 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
570 (elfNN_ia64_info_to_howto): Adjust calls.
571 (elfNN_ia64_relax_section): Adjust calls.
572 (count_dyn_reloc): Fix typo.
573 (elfNN_ia64_relocate_section): Adjust calls.
574 (elfNN_ia64_finish_dynamic_symbol): Likewise.
575 (bfd_elfNN_bfd_reloc_type_lookup)
576 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
577 * configure: Regenerate.
578 * Makefile.in: Regenerate.
579
1ce74905
DD
5802011-05-23 DJ Delorie <dj@redhat.com>
581
582 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
583 the vma/lma swapping done in elf32_rx_modify_program_headers.
584
997fbe36
NC
5852011-05-23 Nick Clifton <nickc@redhat.com>
586
587 * elf-m10300.c (mn10300_elf_mkobject): New function.
588 (bfd_elf32_mkobject): Define.
589
6061a67d
AM
5902011-05-23 Alan Modra <amodra@gmail.com>
591
592 * elf-bfd.h: Comment typo fix.
593 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
594 struct elf_dyn_relocs throughout.
595 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
596
25f53a85
AM
5972011-05-23 Alan Modra <amodra@gmail.com>
598
599 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
600 functions rather than warning callback or _bfd_error_handler.
601 * elf32-ppc.c: Likewise.
602 * elf64-ppc.c: Likewise.
603 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
604 arg error.
605 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
606
6de6a7fe
AM
6072011-05-23 Alan Modra <amodra@gmail.com>
608
609 PR 12763
610 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
611 .tbss, and page align same for all SHT_NOBITS sections.
612
86b2281f
AM
6132011-05-21 Alan Modra <amodra@gmail.com>
614
615 PR 12763
616 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
617 from PT_TLS header.
618 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
619 segment if just for .tbss.
620 (assign_file_positions_for_load_sections): Don't report "can't
621 allocate in segment" errors for .tbss.
622 (assign_file_positions_for_non_load_sections): Don't set p_filesz
623 from SHT_NOBITS section filepos.
624
4a732032
BS
6252011-05-20 Bernd Schmidt <bernds@codesourcery.com>
626
627 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
628 R_C6000_PCR_H16 and R_C6000_PCR_L16.
629 (elf32_tic6x_relocate_section): Handle them.
630
dd98f8d2
NC
6312011-05-18 Nick Clifton <nickc@redhat.com>
632
633 PR ld/12761
634 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
635 sections when building shared libraries.
636
9c489990
NC
6372011-05-18 Rafał Krypa <r.krypa@samsung.com>
638
639 PR ld/12778
640 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
641 reloc pointer.
642
5ccfed9b
TG
6432011-05-18 Tristan Gingold <gingold@adacore.com>
644
645 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
646 (xcoff_sweep): Always keep dwarf sections.
647 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
648
85645aed
TG
6492011-05-18 Tristan Gingold <gingold@adacore.com>
650
651 * libxcoff.h (struct xcoff_dwsect_name): New type.
652 (XCOFF_DWSECT_NBR_NAMES): New macro.
653 (xcoff_dwsect_names): Declare.
654 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
655 (styp_to_sec_flags): Ditto.
656 (coff_new_section_hook): Ditto.
657 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
658 * coff-rs6000.c (xcoff_dwsect_name): New variable.
659
84bff83f
NC
6602011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
661
662 PR ld/12759
663 * elf32-rx.c (ignore_lma): New variable.
664 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
665 (rx_modify_program_headers): Only copy the LMA into the VMA if
666 ignore_lma is true.
667
16d96b5b
AM
6682011-05-17 Alan Modra <amodra@gmail.com>
669
670 PR ld/12760
671 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
672 * elflink.c (elf_link_add_object_symbols): Likewise.
673 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
674
41e04eaa
AM
6752011-05-16 Alan Modra <amodra@gmail.com>
676
677 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
678
77c56f44
RS
6792011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
680
681 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
682 global GOT entries for GOT_PAGE relocations against global symbols.
683
2a616379
BS
6842011-05-13 Bernd Schmidt <bernds@codesourcery.com>
685
686 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
687 (tic6x-*-*): Replaced by these.
688 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
689 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
690 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
691 Define.
692 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
693 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
694 "elf32-target.h" two more times.
695 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
696 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
697 bfd_elf32_tic6x_elf_le_vec.
698 * configure: Regenerate.
699
3ac5406b
JB
7002011-05-13 Jan Beulich <jbeulich@novell.com>
701
702 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
703
335e41d4
JK
7042011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
705
706 * config.in: Regenerated.
707 * configure: Regenerated.
708 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
709 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
710 HAVE_PSINFO32_T_PR_PID.
711 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
712 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
713 and HAVE_PSINFO32_T_PR_PID.
714 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
715
bc989cdc
JK
7162011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
717
718 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
719 32bit psinfo.
720 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
721 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
722
fbd9ad90
PB
7232011-05-09 Paul Brook <paul@codesourcery.com>
724
725 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
726 * bfd-in2.h: Regenerate.
727 * elf32-tic6x.c: Include limits.h.
728 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
729 _tic6x_elf_section_data): New.
730 (elf32_tic6x_section_data): Define.
731 (elf32_tic6x_new_section_hook): Allocate target specific data.
732 (elf32_tic6x_add_unwind_table_edit): New function.
733 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
734 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
735 elf32_tic6x_copy_exidx_entry): New functions.
736 (elf_backend_write_section): Define.
737
1bce6bd8
PB
7382011-05-09 Paul Brook <paul@codesourcery.com>
739
740 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
741 elf32_tic6x_fake_sections): New functions.
742 (elf_backend_fake_sections): Define.
743
9cf0e282
PB
7442011-05-09 Paul Brook <paul@codesourcery.com>
745
746 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
747 (elf_backend_gc_mark_extra_sections): Define.
748
730035f7
DK
7492011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
750
751 PR ld/12365
752 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
753 references to symbols defined in discarded sections.
754
88e59394
DK
7552011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
756
757 PR ld/12365
758 * coffgen.c (coff_write_symbol): Assume input section is its own
759 output section if output_section member not set.
760 (coff_write_alien_symbol): Likewise.
761
310fd250
L
7622011-05-07 H.J. Lu <hongjiu.lu@intel.com>
763
764 PR ld/12730
765 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
766
767 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
41e04eaa 768 sections if needed.
310fd250
L
769
770 * section.c (SEC_ELF_REVERSE_COPY): New.
771 * bfd-in2.h: Regenerated.
772
70778fc7
AM
7732011-05-07 Anders Kaseorg <andersk@ksplice.com>
774
775 PR 12739
776 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
777 * bfd-in2.h: Regenerate.
778
8185f55c
TG
7792011-05-06 Tristan Gingold <gingold@adacore.com>
780
781 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
782 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
783 any code section. Add comments.
784 (alpha_vms_object_p): Use void * instead of PTR.
785 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
786 (build_module_list): Guard against no DST section. Add comments.
787 (alpha_vms_link_output_symbol): Discard undefined symbols.
788 (alpha_vms_get_section_contents): Simply memcpy if the section was
789 already loaded. Fix typo.
790 (vms_new_section_hook): Use void * instead of PTR.
791 (vms_alpha_vec): Ditto.
792
7d24e6a6
RS
7932011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
794
795 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
796 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
797
c6a8f6e0
BS
7982011-05-05 Bernd Schmidt <bernds@codesourcery.com>
799
800 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
801 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
802 mismatch. Choose the lower of the two values.
803 (bfd_elf32_bfd_final_link): New macro.
804
7f41df2e
TG
8052011-04-28 Tristan Gingold <gingold@adacore.com>
806
807 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
808 (bfd_xcoff_swap_aux_out): Ditto.
809 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
810 (bfd_xcoff64_swap_aux_out): Ditto.
811
9507a174
AM
8122011-05-04 Alan Modra <amodra@gmail.com>
813
814 PR ld/12727
815 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
816 was_undefined on dot-symbols.
817
2fbb87f6
PB
8182011-05-03 Paul Brook <paul@codesourcery.com>
819
820
821 * elf32-tic6x.c (elf32_tic6x_howto_table,
822 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
823 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
824 Add R_C6000_EHTYPE.
825
9d4057ee
AM
8262011-05-01 Alan Modra <amodra@gmail.com>
827
828 PR ld/12718
829 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
830 creating ifunc sections.
831 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
832
71e7aa7d
L
8332011-04-30 H.J. Lu <hongjiu.lu@intel.com>
834
835 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
836 names.
837
b5dee4ea
TT
8382011-04-28 Tom Tromey <tromey@redhat.com>
839
840 * bfdio.c (memory_bstat): Pass correct size to memset.
841
e4c93b56
MF
8422011-04-28 Mike Frysinger <vapier@gentoo.org>
843
844 * dwarf2.c (dwarf_debug_sections): Mark const.
845 * elf.c (special_sections): Likewise.
846 * libbfd-in.h (dwarf_debug_sections): Likewise.
847 * libbfd.h: Regenerate.
848
72b016b4
NC
8492011-04-26 Kai Tietz <ktietz@redhat.com>
850
851 * coffcode.h (sec_to_styp_flags): Allow linkonce for
852 debugging sections.
853
4964e065
TG
8542011-04-26 Tristan Gingold <gingold@adacore.com>
855
856 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
857
35ed3f94
AM
8582011-04-24 Alan Modra <amodra@gmail.com>
859
860 PR ld/12365
861 PR ld/12696
862 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
863 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
864 (_bfd_generic_link_add_one_symbol): Update "notice" call.
865 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
866 it is a redef of an IR symbol in a real BFD.
867
b70321a2
L
8682011-04-22 H.J. Lu <hongjiu.lu@intel.com>
869
870 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
871 in readonly section in a shared object.
872 (elf_i386_size_dynamic_sections): Likewise.
873 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
874 (elf_x86_64_size_dynamic_sections): Likewise.
875
aa715242
L
8762011-04-21 H.J. Lu <hongjiu.lu@intel.com>
877
878 PR ld/12694
879 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
880 symbols.
881 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
882
f6df62c8
L
8832011-04-21 H.J. Lu <hongjiu.lu@intel.com>
884
885 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
886 on dynamic symbol error.
887 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
888
4bbd5a24
TG
8892011-04-20 Tristan Gingold <gingold@adacore.com>
890
891 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
892
8ad17b3a
AM
8932011-04-20 Alan Modra <amodra@gmail.com>
894
895 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
896 (bfd_hash_table_init_n): Overflow checking.
897 (bfd_hash_set_default_size): Return current size. Take unsigned long
898 arg. Add 65537 to hash_size primes.
899 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
900 * bfd-in2.h: Regenerate.
901
1b0df531
JK
9022011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
903
904 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
905 memmove elements.
906
595213d4
AM
9072011-04-20 Alan Modra <amodra@gmail.com>
908
9e6619e2
AM
909 * libbfd.c (bfd_log2): Do return rounded up value.
910 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
911 call with expanded old round down version of the function.
912
595213d4
AM
913 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
914 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
915
02d00247
AM
9162011-04-20 Alan Modra <amodra@gmail.com>
917
918 PR ld/12365
919 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
920 in their own common section.
921 * elflink.c (elf_link_add_object_symbols): Likewise.
922 * linker.c (generic_link_check_archive_element): Don't lose flags
923 if common section is pre-existing.
924 (_bfd_generic_link_add_one_symbol): Likewise.
925
24f58f47
AM
9262011-04-20 Alan Modra <amodra@gmail.com>
927
928 PR ld/12365
929 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
930 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
931 multiple_definition regardless of allow_multiple_definition.
932 * simple.c (simple_dummy_multiple_definition): Update.
933 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
934 calls.
935
417236c0
TG
9362011-04-18 Tristan Gingold <gingold@adacore.com>
937
938 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
939
901f1d17
AM
9402011-04-18 Alan Modra <amodra@gmail.com>
941
942 PR ld/12365
943 PR ld/12672
944 * bfd.c (BFD_PLUGIN): Define.
945 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
946 * bfd-in2.h: Regenerate.
947 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
948 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
949
63524580
JK
9502011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
951
952 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
953 SEC_LOAD.
954
e21e5835
NC
9552011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
956
957 * elf-bfd.h (struct sdt_note): New struct.
958 (struct elf_obj_tdata) <sdt_note_head>: New field.
959 * elf.c (elfobj_grok_stapsdt_note_1): New function.
960 (elfobj_grok_stapsdt_note): Likewise.
961 (elf_parse_notes): Added code to treat SystemTap note
962 sections.
963
6452a567
RH
9642011-04-12 Richard Henderson <rth@redhat.com>
965
966 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
967 exclude empty .got sections.
968
2a750708
L
9692011-04-11 H.J. Lu <hongjiu.lu@intel.com>
970
971 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
972 array access for BFD_RELOC_386_IRELATIVE.
973
2123f9ad
BS
9742011-04-11 Bernd Schmidt <bernds@codesourcery.com>
975
976 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
977
f64b2e8d
NC
9782011-04-11 Mark Wielaard <mjw@redhat.com>
979
980 PR 10549
981 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
982 (has_gnu_symbols): Renamed from has_ifunc_symbols.
983 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
984 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
985 also if STB_GNU_UNIQUE symbol binding was seen.
986 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
987 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
988 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
989 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
990 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
991 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
992
e57278ef
AM
9932011-04-11 Alan Modra <amodra@gmail.com>
994
995 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
996 sections.
997 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
998 (_bfd_generic_get_section_contents_in_window): Likewise.
999 * section.c (bfd_get_section_contents): Likewise.
1000 * compress.c (bfd_get_full_section_contents): Likewise.
1001 * elf32-rx.c (rx_final_link): Ignore rawsize.
1002 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
1003 bfd with bfd_get_section_limit.
1004 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
1005 os->size during final link. Update callers.
1006 * bfd-in2.h: Regenerate.
1007
e2ece73c
RS
10082011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
1009
1010 PR ld/12637
1011 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
1012 as the number of global entries when merging with the primary GOT.
1013
9f973f28
L
10142011-04-09 H.J. Lu <hongjiu.lu@intel.com>
1015
1016 * elf32-i386.c: Update copyright year.
1017 * elf64-x86-64.c: Likewise.
1018
21e68916
KT
10192011-04-09 Kai Tietz <ktietz@redhat.com>
1020
1021 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
1022 buffer and use rawsize for sorting.
1023 * coffcode.h (coff_compute_section_file_positions): Set rawsize
1024 before doing alignment.
1025
62d78908
L
10262011-04-09 H.J. Lu <hongjiu.lu@intel.com>
1027
1028 * elf32-i386.c (elf_i386_relocate_section): Return relocation
1029 error on unsupported relocation.
1030 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1031
2351cae0
L
10322011-04-09 H.J. Lu <hongjiu.lu@intel.com>
1033
1034 PR binutils/12657
1035 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
1036 pid_t.
1037
959b0961
L
10382011-04-08 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 PR ld/12654
1041 * elf32-i386.c (elf_i386_relocate_section): Check !executable
1042 instead of shared for R_386_TLS_LDO_32.
1043
33b54431
TG
10442011-04-08 Tristan Gingold <gingold@adacore.com>
1045
1046 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
1047 * coff-pmac: Remove
1048 * xcoff-target.h: Remove
1049 * Makefile.in: Regenerate.
1050
5d8e6b4d
CC
10512011-04-07 Cary Coutant <ccoutant@google.com>
1052
1053 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
1054
44e87ece 10552011-04-07 Paul Brook <paul@codesourcery.com>
33b54431 1056
44e87ece
PB
1057 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
1058 pc-relative.
1059 (elf32_tic6x_howto_table_rel): Ditto.
1060 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
1061 (elf32_tic6x_check_relocs): Ditto.
1062
8c5fc800
JM
10632011-04-06 Joseph Myers <joseph@codesourcery.com>
1064
1065 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
1066 targets.
1067 (strongarm*, thumb*, xscale*): Remove architectures.
1068 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
1069 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
1070 xscale-*-coff): Remove targets.
1071
6f8027ae
TG
10722011-04-01 Tristan Gingold <gingold@adacore.com>
1073
1074 * elfxx-ia64.c: include bfd_stdint.h
1075
c89ce65c
JK
10762011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1077
1078 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
1079 dynobj and its initialization.
1080
545f57c6
TG
10812011-03-31 Tristan Gingold <gingold@adacore.com>
1082
1083 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
1084 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
1085 BFD_HOST_LONG_LONG to 1.
1086
083faca9
TG
10872011-03-31 Tristan Gingold <gingold@adacore.com>
1088
1089 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
1090 (_bfd_vms_write_etir): Ditto.
1091 (_bfd_vms_slurp_etir): Avoid to use intptr_t
1092 * configure.com: Generate bfd_stdint.h
1093
ac145307
BS
10942011-03-31 Bernd Schmidt <bernds@codesourcery.com>
1095
1096 * elf32-tic6x.h (struct elf32_tic6x_params): New.
1097 (elf32_tic6x_setup): Declare.
1098 * elf32-tic6x.c: Include <limits.h>.
1099 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
1100 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
1101 New structures.
1102 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
1103 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
1104 tic6x_elf_scom_symbol_ptr): New static variables.
1105 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
1106 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
1107 R_C6000_PCR_H16 and R_C6000_PCR_L16.
1108 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
1109 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
1110 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
1111 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
1112 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
1113 elf32_tic6x_adjust_dynamic_symbol): New static functions.
1114 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
1115 to weak symbols as required by the ABI.
1116 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
1117 as needed when generating DSBT output.
1118 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
1119 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
1120 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
1121 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
1122 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
1123 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
1124 New static functions.
1125 (ELF_MAXPAGESIZE): Define to 0x1000.
1126 (bfd_elf32_bfd_copy_private_bfd_data,
1127 bfd_elf32_bfd_link_hash_table_create,
1128 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
1129 elf_backend_want_got_plt, elf_backend_want_dynbss,
1130 elf_backend_plt_readonly, elf_backend_got_header_size,
1131 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
1132 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
1133 elf_backend_check_relocs, elf_backend_add_symbol_hook,
1134 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
1135 elf_backend_section_from_bfd_section,
1136 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
1137 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
1138 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
1139
1140 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
1141 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
1142 * bfd/bfd-in2.h: Regenerate.
1143 * bfd/libbfd.h: Regenerate.
1144 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
1145
53dd76d3
TG
11462011-03-31 Tristan Gingold <gingold@adacore.com>
1147
1148 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
1149 entry on xcoff when value is C_NULL_VALUE.
1150
11512011-03-31 Tristan Gingold <gingold@adacore.com>
2040caca
TG
1152
1153 * libcoff-in.h (exec_hdr): Remove.
1154 * libcoff.h: Regenerate.
1155
3a294fa7
NC
11562011-03-30 Nick Clifton <nickc@redhat.com>
1157
1158 * po/da.po: Updated Danish translation.
1159
e117360e
RH
11602011-03-29 Richard Henderson <rth@redhat.com>
1161
1162 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
1163 (elf64_alpha_gc_sweep_hook): New.
1164 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
1165 (elf_backend_can_gc_sections): New.
1166
5b806d27
NC
11672011-03-26 John Marino <binutils@marino.st>
1168
1169 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
1170 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
1171 * configure: Regenerate.
1172
b42adabf
NC
11732011-03-25 Michael Snyder <msnyder@vmware.com>
1174
1175 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
1176
a283ff93
TG
11772011-03-25 Tristan Gingold <gingold@adacore.com>
1178
1179 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
1180 of find_nearest_line on object files.
1181
cf6b8767
TG
11822011-03-25 Tristan Gingold <gingold@adacore.com>
1183
1184 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
1185 Minor reordering.
1186 (alpha_vms_create_eisd_for_section): Make code sections read-only.
1187
663a1470
AM
11882011-03-24 Alan Modra <amodra@gmail.com>
1189
1190 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
1191 old-style __tls_get_addr calls without marker relocs don't match
1192 their arg setup insn one for one. If such mismatches are found
1193 report the reloc and don't do any tls optimization.
1194 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1195
dc80f6ae
EW
11962011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
1197
1198 * bfd-in2.h: Regenerate.
1199
8cc66334
EW
12002011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
1201
1202 * archures.c: Add AVR XMEGA architecture information.
1203 * cpu-avr.c (arch_info_struct): Likewise.
1204 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1205 (elf32_avr_object_p): Likewise.
1206
34e77a92
RS
12072011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1208
1209 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
1210 * bfd-in2.h: Regenerate.
1211 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
1212 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
1213 entry.
1214 (elf32_arm_howto_from_type): Update accordingly.
1215 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
1216 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
1217 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
1218 with an extra noncall_refcount field.
1219 (arm_local_iplt_info): New structure.
1220 (elf_arm_obj_tdata): Add local_iplt.
1221 (elf32_arm_local_iplt): New accessor macro.
1222 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
1223 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
1224 Change tls_type to a bitfield and add is_iplt.
1225 (elf32_arm_link_hash_newfunc): Update accordingly.
1226 (elf32_arm_allocate_local_sym_info): New function.
1227 (elf32_arm_create_local_iplt): Likewise.
1228 (elf32_arm_get_plt_info): Likewise.
1229 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
1230 (elf32_arm_get_local_dynreloc_list): Likewise.
1231 (create_ifunc_sections): Likewise.
1232 (elf32_arm_copy_indirect_symbol): Update after the changes to
1233 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
1234 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
1235 to get PLT information. Assert that all STT_GNU_IFUNC references
1236 are turned into PLT references.
1237 (arm_build_one_stub): Pass the symbol type to
1238 elf32_arm_final_link_relocate.
1239 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
1240 (elf32_arm_allocate_irelocs): New function.
1241 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
1242 all R_ARM_IRELATIVE.
1243 (elf32_arm_allocate_plt_entry): New function.
1244 (elf32_arm_populate_plt_entry): Likewise.
1245 (elf32_arm_final_link_relocate): Add an st_type parameter.
1246 Set srelgot to null for static objects. Use separate variables
1247 to record which st_value and st_type should be used when generating
1248 a dynamic relocation. Use elf32_arm_get_plt_info to find the
1249 symbol's PLT information, setting has_iplt_entry, splt,
1250 plt_offset and gotplt_offset accordingly. Check whether
1251 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
1252 the relocation target accordingly. Broaden assert to include
1253 .iplts. Don't set sreloc for static relocations. Assert that
1254 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
1255 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
1256 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
1257 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
1258 resolve GOT references to the .igot.plt entry.
1259 (elf32_arm_relocate_section): Update the call to
1260 elf32_arm_final_link_relocate.
1261 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
1262 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
1263 relocations in shared libraries and relocatable executables.
1264 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
1265 to get the list of dynamic relocations for a local symbol.
1266 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
1267 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
1268 to allocate local symbol information. Treat R_ARM_REL32 and
1269 R_ARM_REL32_NOI as call relocations in shared libraries and
1270 relocatable executables. Record PLT information for local
1271 STT_GNU_IFUNC functions as well as global functions. Count
1272 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
1273 to get the list of dynamic relocations for a local symbol.
1274 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
1275 Don't remove STT_GNU_IFUNC PLTs unless all references have been
1276 removed. Update after the changes to elf32_arm_link_hash_entry.
1277 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
1278 entries should live in .plt or .iplt. Check whether the .igot.plt
1279 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
1280 to allocate .plt and .(i)got.plt entries. Detect which .got
1281 entries will need R_ARM_IRELATIVE relocations and use
1282 elf32_arm_allocate_irelocs to allocate them. Likewise other
1283 non-.got dynamic relocations.
1284 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
1285 and dynamic relocations for local STT_GNU_IFUNC symbols.
1286 Check whether the .igot.plt and .got entries can be combined.
1287 Detect which .got entries will need R_ARM_IRELATIVE relocations
1288 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
1289 section pointers intead of strcmp checks. Handle iplt and igotplt.
1290 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
1291 to fill in .plt, .got.plt and .rel(a).plt entries. Point
1292 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
1293 resolve to it.
1294 (elf32_arm_output_plt_map_1): New function, split out from
1295 elf32_arm_output_plt_map. Handle .iplt entries. Use
1296 elf32_arm_plt_needs_thumb_stub_p.
1297 (elf32_arm_output_plt_map): Call it.
1298 (elf32_arm_output_arch_local_syms): Add mapping symbols for
1299 local .iplt entries.
1300 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
1301 (elf32_arm_swap_symbol_out): Likewise.
1302 (elf32_arm_add_symbol_hook): New function.
1303 (elf_backend_add_symbol_hook): Define for all targets.
1304
35fc36a8
RS
13052011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1306
1307 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
1308 * elf.c (swap_out_syms): Set st_target_internal for each
1309 Elf_Internal_Sym.
1310 * elfcode.h (elf_swap_symbol_in): Likewise.
1311 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
1312 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
1313 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
1314 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1315 * elflink.c (elf_link_output_extsym): Likewise.
1316 (bfd_elf_final_link): Likewise.
1317 (elf_link_add_object_symbols): Copy st_target_internal
1318 to the hash table if we see a definition.
1319 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
1320 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
1321 a branch_type field.
1322 (a8_erratum_fix, a8_erratum_reloc): Likewise.
1323 (arm_type_of_stub): Replace actual_st_type with an
1324 actual_branch_type parameter.
1325 (arm_build_one_stub): Use branch types rather than st_types to
1326 determine the type of branch.
1327 (cortex_a8_erratum_scan): Likewise.
1328 (elf32_arm_size_stubs): Likewise.
1329 (bfd_elf32_arm_process_before_allocation): Likewise.
1330 (allocate_dynrelocs_for_symbol): Likewise.
1331 (elf32_arm_finish_dynamic_sections): Likewise.
1332 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
1333 a branch_type parameter.
1334 (elf32_arm_relocate_section): Update call accordingly.
1335 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
1336 (elf32_arm_output_map_sym): Initialize st_target_internal.
1337 (elf32_arm_output_stub_sym): Likewise.
1338 (elf32_arm_symbol_processing): Delete.
1339 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
1340 Use st_target_internal to record the branch type.
1341 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
1342 Thumb functions.
1343 (elf32_arm_is_function_type): Delete.
1344 (elf_backend_symbol_processing): Likewise.
1345 (elf_backend_is_function_type): Likewise.
1346
cbc704f3
RS
13472011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1348
1349 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
1350 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
1351 into the PLT block.
1352
f6e32f6d
RS
13532011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1354
1355 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
1356 may_need_local_target_p and may_become_dynamic_p to classify
1357 the relocation type. Don't check info->symbolic or h->def_regular
1358 when deciding whether to record a potential dynamic reloc.
1359 Don't treat potential dynamic relocs as PLT references.
1360 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
1361 try to make the PLT reference count go negative.
1362
b436d854
RS
13632011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1364
1365 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
1366 GOT entry here, rather than leaving it to finish_dynamic_symbol.
1367 Only create a dynamic relocation for local references if
1368 info->shared.
1369 (allocate_dynrelocs_for_symbol): Update dynamic relocation
1370 allocation accordingly.
1371 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
1372
47beaa6a
RS
13732011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1374
1375 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
1376 (elf32_arm_add_dynreloc): Likewise.
1377 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
1378 to allocate dynamic relocations.
1379 (elf32_arm_size_dynamic_sections): Likewise.
1380 (allocate_dynrelocs): Likewise. Rename to
1381 allocate_dynrelocs_for_symbol.
1382 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
1383 create dynamic relocations.
1384 (elf32_arm_finish_dynamic_symbol): Likewise.
1385
52bc799a
L
13862011-03-12 H.J. Lu <hongjiu.lu@intel.com>
1387
1388 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
1389 x32 GD->IE and GD->LE transitions.
1390 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
1391 and LD->LE transitions.
1392
e11840f9
AM
13932011-03-10 Alan Modra <amodra@gmail.com>
1394
1395 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
1396 for LO_DS error message and correct multiple.
1397
aa374f67
AM
13982011-03-10 Alan Modra <amodra@gmail.com>
1399
1400 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
1401 (ppc64_elf_link_just_syms): New function.
1402 (opd_entry_value): Don't assume big-endian host.
1403 (get_r2off): New function.
1404 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
1405
d59a60e9
MS
14062011-03-06 Michael Snyder <msnyder@vmware.com>
1407
4281caad
MS
1408 * compress.c (bfd_compress_section_contents): Check for out of mem.
1409
17672001
MS
1410 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
1411 that case statement falls through intentionally.
1412
d59a60e9
MS
1413 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
1414
0e29e6e8
AM
14152011-03-04 Alan Modra <amodra@gmail.com>
1416
1417 * archive.c (bsd_write_armap): Don't call stat in deterministic
1418 mode, and don't use st_mtime if stat returns error.
1419
eb00922a
MS
14202011-03-03 Michael Snyder <msnyder@vmware.com>
1421
08c13595
MS
1422 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
1423
d543c50d
MS
1424 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
1425
c38eb2a6
MS
1426 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
1427 (aout_link_write_other_symbol): Missing break statement.
1428
8ecc1f20
MS
1429 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
1430
eb00922a
MS
1431 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
1432
4a4c5f25
L
14332011-03-03 H.J. Lu <hongjiu.lu@intel.com>
1434
1435 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
1436 x32 IE->LE transition.
1437 (elf_x86_64_relocate_section): Likewise.
1438
ddcf1fcf
BS
14392011-03-02 Bernd Schmidt <bernds@codesourcery.com>
1440
aa374f67
AM
1441 * elflink.c (is_reloc_section): Remove function.
1442 (get_dynamic_reloc_section_name): Construct string manually.
ddcf1fcf 1443
007d6189
KT
14442011-02-28 Kai Tietz <kai.tietz@onevision.com>
1445
1446 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
1447 (adjust_relative_path): Likewise.
1448 (_bfd_construct_extended_name_table): Likewise.
1449 * corefile.c (generic_core_file_matches_executable_p): Likewise.
1450 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1451 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1452 * elf32-spu.c (sort_bfds): Likewise.
1453 (spu_elf_auto_overlay): Likewise.
1454 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1455 * xcofflink.c (xcoff_set_import_path): Likewise.
1456 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
1457 (xtensa_regfile_lookup_shortname): Likewise.
1458
8616ad89
AM
14592011-02-28 Alan Modra <amodra@gmail.com>
1460
1461 PR 12513
1462 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
1463 stringsize. Properly sanity check symdef_count. Remove redundant
1464 bfd_release.
1465
80549d04
RÁE
14662011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
1467
1468 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
1469 and handle claim_file seeking. Only try to load the plugin once.
1470
93b3ac75
AS
14712011-02-22 Andreas Schwab <schwab@redhat.com>
1472
1473 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
1474 relocation read the value from the second GOT slot.
1475
6fa052f0
TG
14762011-02-15 Tristan Gingold <gingold@adacore.com>
1477
1478 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
1479
28be611c
AM
14802011-02-15 Alan Modra <amodra@gmail.com>
1481
1482 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
1483 toc relocs. Fuss over free(NULL).
1484
93252b1c
MF
14852011-02-14 Mike Frysinger <vapier@gentoo.org>
1486
1487 * elflink.c (bfd_elf_size_dynamic_sections): Add
1488 bfd_get_symbol_leading_char to the start of newname.
1489
822ce8ee
RW
14902011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1491
1492 * configure: Regenerate.
1493
425b145b
AM
14942011-02-09 Alan Modra <amodra@gmail.com>
1495
1496 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
1497 we are done. When optimising large toc, check that a global
1498 symbol on a toc reloc is defined in a kept section.
1499
82f2dbf7
NC
15002011-02-08 Nick Clifton <nickc@redhat.com>
1501
1502 PR binutils/12467
1503 * elf.c (assign_file_positions_for_load_sections): Set the program
1504 header offset and entry size to zero if there are no program
1505 headers.
1506
df22d223
AM
15072011-02-08 Alan Modra <amodra@gmail.com>
1508
1509 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
1510 local_syms when looking for local symbols in .toc.
1511
6683a28d
AM
15122011-02-01 Alan Modra <amodra@gmail.com>
1513
1514 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
1515 for toc pointer on any section having makes_toc_func_call set.
1516 (check_pasted_section): Ensure pasted .init/.fini fragments use
1517 the same toc if any has makes_toc_func_call set.
1518
5240d94d
JM
15192011-01-28 Joseph Myers <joseph@codesourcery.com>
1520
1521 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
1522 field.
1523
ed88c97e
RS
15242011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
1525
1526 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
1527 common sections too.
1528
1a0c107f
L
15292011-01-18 H.J. Lu <hongjiu.lu@intel.com>
1530
04449d86
L
1531 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
1532 Solaris target.
1a0c107f 1533
d68cd58c
NC
15342011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
1535
1536 Fix compilation for mingw64.
1537 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
1538 typecast to avoid warning.
1539 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
1540 usage.
1541 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
1542 of long for pointer to avoid warning.
1543 (elfNN_ia64_relax_brl): Idem.
1544 (elfNN_ia64_install_value): Idem.
1545 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
1546
da17376b
RS
15472011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
1548
1549 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
1550 h->needs_plt when deciding whether to record a possible dynamic reloc.
1551
1e81e12b
RS
15522011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
1553
1554 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
1555 dynamic relocs for the removed section.
1556
d1534d16
L
15572011-01-15 H.J. Lu <hongjiu.lu@intel.com>
1558
1559 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
1560 relocations.
1561
248775ba
L
15622011-01-14 H.J. Lu <hongjiu.lu@intel.com>
1563
1564 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
1565 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
1566 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
1567 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
1568 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
1569 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
1570 for ILP32.
1571
4a97a0e5
AM
15722011-01-14 Alan Modra <amodra@gmail.com>
1573
1574 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
1575 error.
1576 (_bfd_default_error_handler): Likewise.
1577 * elf.c (print_segment_map): Likewise.
1578 * libbfd.c (warn_deprecated): Likewise.
1579 * som.c (som_sizeof_headers): No need to do so here.
1580 * coff-i860.c: Replace use of printf for error messages with
1581 _bfd_error_handler.
1582 * coff-ppc.c: Likewise.
1583 * coff-sh.c: Likewise.
1584 * elf32-bfin.c: Likewise.
1585 * elf32-dlx.c: Likewise.
1586 * elf32-mep.c: Likewise.
1587 * elf32-v850.c: Likewise.
1588 * mach-o.c: Likewise.
1589 * pef.c: Likewise.
1590
82e96e07
L
15912011-01-13 H.J. Lu <hongjiu.lu@intel.com>
1592
1593 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
1594 swap_reloca_out.
1595 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
1596 (elf_x86_64_check_relocs): Align relocation section to 4 byte
1597 for 32bit.
1598 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
1599 ELF_ST_TYPE.
1600 (elf_x86_64_finish_dynamic_symbol): Updated.
1601 (elf_x86_64_finish_dynamic_sections): Don't use
1602 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
1603 bfd_elf64_swap_dyn_out.
1604
e6a6bb22
AM
16052011-01-14 J. Park <grassman@gmail.com>
1606
1607 PR ld/12339
1608 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
1609 following bfd_link_hash_warning symbol link.
1610
0855e32b
NS
16112011-01-10 Nathan Sidwell <nathan@codesourcery.com>
1612 Glauber de Oliveira Costa <glommer@gmail.com>
1613
1614 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
1615 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
1616 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
1617 relocations.
1618 * libbfd.h: Rebuilt.
1619 * bfd-in2.h: Rebuilt.
1620 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
1621 (elf32_arm_reloc_map): Likewise.
1622 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
1623 (elf32_arm_stub_long_branch_any_tls_pic,
1624 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
1625 (DEF_STUBS): Add new stubs.
1626 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
1627 (elf32_arm_local_tlsdesc_gotent): New.
1628 (GOT_TLS_GDESC): New mask.
1629 (GOT_TLS_GD_ANY): Define.
1630 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
1631 (elf32_arm_compute_jump_table_size): New.
1632 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
1633 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
1634 sgotplt_jump_table_size fields.
1635 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
1636 (elf32_arm_link_hash_table_create): Initialize new fields.
1637 (arm_type_of_stub): Check TLS desc relocs too.
1638 (elf32_arm_stub_name): TLS desc relocs can be shared.
1639 (elf32_arm_tls_transition): Determine relaxation.
1640 (arm_stub_required_alignment): Add tls stubs.
1641 (elf32_arm_size_stubs): Likewise.
1642 (elf32_arm_tls_relax): Perform TLS relaxing.
1643 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
1644 (IS_ARM_TLS_GNU_RELOC): New.
1645 (IS_ARM_TLS_RELOC): Use it.
1646 (elf32_arm_relocate_section): Perform TLS relaxing.
1647 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
1648 desc relocations.
1649 (allocate_dynrelocs): Allocate tls desc relcoations.
1650 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
1651 symbols.
1652 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
1653 got slots.
1654 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
1655 symbol.
1656 (elf32_arm_finish_dynamic_symbol): Adjust.
1657 (arm_put_trampoline): New.
1658 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
1659 trampolines.
1660 (elf_backend_always_size_sections): Define.
1661
7be86737
L
16622011-01-06 H.J. Lu <hongjiu.lu@intel.com>
1663
1664 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
1665
ae428b57 16662011-01-06 H.J. Lu <hongjiu.lu@intel.com>
3db2e7dd
L
1667
1668 PR ld/12366
1669 PR ld/12371
1670 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
1671 handle symbols marked with regular reference, but not non-GOT
1672 reference when building shared library.
1673
1674 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
1675 local and global STT_GNU_IFUNC symols when building shared
1676 library.
1677 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
1678
9689e3a3
DD
16792011-01-05 DJ Delorie <dj@redhat.com>
1680
1681 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
1682 * libbfd.h: Regenerate.
1683 * bfd-in2.h: Regenerate.
1684 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
1685
889a4d3e
L
16862011-01-03 H.J. Lu <hongjiu.lu@intel.com>
1687
1688 * cpu-i386.c (bfd_i386_compatible): New.
1689 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
1690 with bfd_i386_compatible.
1691 (bfd_x86_64_arch_intel_syntax): Likewise.
1692 (bfd_i386_arch_intel_syntax): Likewise.
1693 (i8086_arch): Likewise.
1694 (bfd_x64_32_arch): Likewise.
1695 (bfd_x86_64_arch): Likewise.
1696 (bfd_i386_arch): Likewise.
1697
9e9e0820 1698For older changes see ChangeLog-2010
56882138
AM
1699\f
1700Local Variables:
1701mode: change-log
1702left-margin: 8
1703fill-column: 74
1704version-control: never
1705End: