* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
409ff343
AM
12011-11-09 Alan Modra <amodra@gmail.com>
2
3 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
4 executables when export_dynamic.
5
560c8763
AM
62011-11-08 Alan Modra <amodra@gmail.com>
7
8 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename
9 ha_relocs_not_using_r2 to unexpected_toc_insn.
10 (ok_lo_toc_insn): New function.
11 (ppc64_elf_edit_toc): Check insn on lo toc reloc. Emit warning.
12 (ppc64_elf_relocate_section): Don't check insn on lo toc reloc here.
13 Handle addic on lo toc reloc.
14
4340287b
DA
152011-11-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16
17 PR ld/13387
18 * elf32-hppa.c (elf32_hppa_hide_symbol): Make STT_GNU_IFUNC symbol
19 go through PLT. Reset plt field with init_plt_offset.
20 (elf32_hppa_adjust_dynamic_symbol): Ensure that a PLT slot is
21 allocated for symbols referenced by a plabel.
22
6652d298
DD
232011-11-02 DJ Delorie <dj@redhat.com>
24
25 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Delete unused
26 variable.
27
e7ebb214
JB
282011-11-02 Jan Beulich <jbeulich@suse.com>
29
30 * coffgen.c (coff_write_alien_symbol): Make public. Add 'struct
31 internal_syment *' parameter. Extend 'dummy' to an array with two
32 elements. Set n_numaux early. Handle BSF_FILE.
33 (coff_write_symbols): Pass NULL as new third argument to
34 coff_write_alien_symbol().
35 * cofflink.c (_bfd_coff_final_link): Don't use COFF-specific
36 obj_raw_syment_count() on non-COFF input BFD. Insert local symbols
37 from non-COFF input BFDs.
38 * libcoff-in.h (coff_write_alien_symbol): Declare.
39 * libcoff.h (coff_write_alien_symbol): Re-generate.
40
99c513f6
DD
412011-11-01 DJ Delorie <dj@redhat.com>
42
43 * Makefile.am (ALL_MACHINES): Add cpu-rl78.lo.
44 (ALL_MACHINES_CFILES): Add cpu-rl78.c.
45 (BFD32_BACKENDS): Add elf32-rl78.lo.
46 (BFD32_BACKENDS_CFILES): Add elf32-rl78.c.
47 (Makefile.in): Regenerate.
48 * archures.c (bfd_architecture): Define bfd_arch_rl78.
49 (bfd_archures_list): Add bfd_rl78_arch.
50 * config.bfd: Add rl78-*-elf.
51 * configure.in: Add bfd_elf32_rl78_vec.
52 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_RL78_* relocations.
53 * targets.c (bfd_target_vector): Add bfd_elf32_rl78_vec.
54 * Makefile.in: Regenerate.
55 * bfd-in2.h: Regenerate.
56 * configure: Regenerate.
57 * libbfd.h: Regenerate.
58 * cpu-rl78.c: New file.
59 * elf32-rl78.c: New file.
60
29942be8
NC
612011-10-26 Nick Clifton <nickc@redhat.com>
62
63 PR ld/13049
64 * elf64-ppc.c (STUB_SUFFIX): Revert previous delta.
65 * elf32-hppa.c (STUB_SUFFIX): Likewise.
66
cfb8c092
NC
672011-10-25 Joern Rennecke <joern.rennecke@embecosm.com>
68
69 * Makefile.am (ALL_MACHINES): Add cpu-epiphany.lo.
70 (ALL_MACHINES_CFILES): Add cpu-epiphany.c.
71 (BFD32_BACKENDS): Add elf32-epiphany.lo.
72 (BFD32_BACKENDS_CFILES): Add elf32-epiphany.c.
73 * archures.c (bfd_arch_epiphany): Add.
74 (bfd_mach_epiphany16, bfd_mach_epiphany32): Define.
75 (bfd_epiphany_arch): Declare.
76 (bfd_archures_list): Add &bfd_epiphany_arch.
77 * config.bfd (epiphany-*-elf): New target case.
78 * configure.in (bfd_elf32_epiphany_vec): New target vector case.
79 * reloc.c (BFD_RELOC_EPIPHANY_SIMM8): New relocation.
80 (BFD_RELOC_EPIPHANY_SIMM24, BFD_RELOC_EPIPHANY_HIGH): Likewise.
81 (BFD_RELOC_EPIPHANY_LOW, BFD_RELOC_EPIPHANY_SIMM11): Likewise.
82 (BFD_RELOC_EPIPHANY_IMM11, BFD_RELOC_EPIPHANY_IMM8): Likewise.
83 * targets.c (bfd_elf32_epiphany_vec): Declare.
84 (_bfd_target_vector): Add bfd_elf32_epiphany_vec.
85 * Makefile.in: Regenerate.
86 * bfd-in2.h: Regenerate.
87 * configure: Regenerate.
88 * libbfd.h: Regenerate.
89 * po/SRC-POTFILES.in: Regenerate.
90 * po/bfd.pot: Regenerate.
91 * cpu-epiphany.c: New file.
92 * elf32-epiphany.c: New file.
93
61a2712e
MR
942011-10-24 Maciej W. Rozycki <macro@codesourcery.com>
95
96 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Remove
97 assertions.
98
b6009aca
NC
992011-10-24 Eugeniy Meshcheryakov <eugen@debian.org>
100
101 PR ld/13273
102 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Do not warn about
103 identical TAG_PCS_config attributes.
104
07725569
NC
1052011-10-24 Nick Clifton <nickc@redhat.com>
106
107 * po/ja.po: Updated Japanese translation.
108
f1163205
NC
1092011-10-24 Pau Garcia i Quiles <pgquiles@elpauer.org>
110
111 PR binutils/13292
112 * bfd-in.h: Include <sys/stat.h> rather than forward defining
113 struct stat.
114 * bfd-in2.h: Regenerate.
115
98920172
L
1162011-10-21 H.J. Lu <hongjiu.lu@intel.com>
117
118 PR ld/13302
119 * elf32-i386.c (elf_i386_relocate_section): Replace
120 R_386_IRELATIVE with R_386_RELATIVE.
121
122 * elf64-x86-64.c (elf_x86_64_relocate_section): Replace
123 R_X86_64_IRELATIVE with R_X86_64_RELATIVE.
124
c293fa49
L
1252011-10-21 H.J. Lu <hongjiu.lu@intel.com>.
126
127 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
128 comments.
129 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
130
e1f98742
L
1312011-10-21 H.J. Lu <hongjiu.lu@intel.com>
132
133 PR ld/13302
134 * elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
135 and next_irelative_index.
136 (elf_i386_link_hash_table_create): Initialize next_jump_slot_index
137 and next_irelative_index.
138 (elf_i386_allocate_dynrelocs): Increment reloc_count instead of
139 next_tls_desc_index.
140 (elf_i386_size_dynamic_sections): Set next_tls_desc_index and
141 next_irelative_index from reloc_count.
142 (elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
143 R_386_JUMP_SLOT.
144
145 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
146 next_jump_slot_index and next_irelative_index.
147 (elf_x86_64_link_hash_table_create): Initialize
148 next_jump_slot_index and next_irelative_index.
149 (elf_x86_64_size_dynamic_sections): Set next_irelative_index
150 from reloc_count.
151 (elf_x86_64_finish_dynamic_symbol): Put R_X86_64_IRELATIVE after
152 R_X86_64_JUMP_SLOT.
153
9553db3c
NC
1542011-10-20 Nick Clifton <nickc@redhat.com>
155
156 PR ld/13049
157 * elf32-arm.c (STUB_SUFFIX): Avoid collision with user namespace
158 symbol names.
159 * elf64-ppc.c (STUB_SUFFIX): Likewise.
160 * elf32-hppa.c (STUB_SUFFIX): Likewise.
161
fa289a5f
AM
1622011-10-20 Alan Modra <amodra@gmail.com>
163
164 * elf32-i386.c (i386_opcode16): Delete.
165 (elf_i386_check_tls_transition): Use memcmp to compare contents.
166 * elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete.
167 (elf_x86_64_check_tls_transition): Use memcmp to compare contents.
168
1d5316ab
AM
1692011-10-19 Alan Modra <amodra@gmail.com>
170
171 PR ld/13177
172 * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark".
173 (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test
174 "mark". Hide undefweak too. Clear def_regular and ref_regular.
175 * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved
176 reloc errors from garbage-collected code.
177 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
178 * elf32-bfin.c (bfin_relocate_section): Likewise.
179 (bfinfdpic_relocate_section): Likewise.
180 * elf32-cris.c (cris_elf_relocate_section): Likewise.
181 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
182 * elf32-i386.c (elf_i386_relocate_section): Likewise.
183 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
184 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
185 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
186 * elf32-s390.c (elf_s390_relocate_section): Likewise.
187 * elf32-sh.c (sh_elf_relocate_section): Likewise.
188 * elf32-spu.c (spu_elf_relocate_section): Likewise.
189 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
190 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
191 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
192 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
193 * elf64-s390.c (elf_s390_relocate_section): Likewise.
194 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
195 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
196 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
197 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
198
371a5866
AM
1992011-10-19 Alan Modra <amodra@gmail.com>
200
201 PR ld/13311
202 * elflink.c (elf_link_output_extsym): Correct test for warning when
203 forced local executable syms are referenced from shared libraries.
204
c192a133
AM
2052011-10-19 Alan Modra <amodra@gmail.com>
206
207 PR ld/13254
208 * elflink.c (bfd_elf_final_link): Emit error_textrel error.
209
abd242a9
DM
2102011-10-18 David S. Miller <davem@davemloft.net>
211
212 PR binutils/13301
213 * elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function.
214 (_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr
215 call delay slot instruction forward 4 bytes when performing
216 relaxation.
217
4c58e0d8
AM
2182011-10-17 Alan Modra <amodra@gmail.com>
219
220 PR ld/12975
221 PR ld/13195
222 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Apply 2011-09-15
223 and 2011-09-29 bfd_elf_gc_mark_dynamic_ref_symbol changes here too.
224
970d488d
HPN
2252011-10-14 Hans-Peter Nilsson <hp@axis.com>
226
227 * elf32-cris.c (cris_elf_gc_sweep_hook) <R_CRIS_16_GOTPLT>
228 <R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
229 global symbols.
230 <R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
231 updates of the plt refcount.
232 (elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
233 refcount in relation to the plt refcount.
234
9cd3e4e5
NC
2352011-10-13 Richard Sandiford <richard.sandiford@linaro.org>
236
237 * elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
238 stubs as resolved.
239
b228303d
AM
2402011-10-11 Alan Modra <amodra@gmail.com>
241
242 PR binutils/13278
243 * archive.c (bfd_generic_archive_p): Only check first element
244 when target_defaulted.
245 (_bfd_construct_extended_name_table): Use ar_maxnamelen.
246 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
247
98c53ba3
AM
2482011-10-11 Alan Modra <amodra@gmail.com>
249
250 PR binutils/13257
251 * archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
252 thin archive element using container target if not defaulted.
253
d5698657
NC
2542011-10-10 Nick Clifton <nickc@redhat.com>
255
256 * po/es.po: Updated Spanish translation.
257 * po/fi.po: Updated Finnish translation.
258 * po/fr.po: Updated French translation.
259 * po/ru.po: Updated Russian translation.
260
3b421ab3
AM
2612011-10-10 Alan Modra <amodra@gmail.com>
262
263 * elf64-ppc.c (ppc64_elf_howto_table): Add R_PPC64_TOCSAVE entry.
264 (struct ppc_link_hash_table): Add tocsave_htab.
265 (struct tocsave_entry): New.
266 (tocsave_htab_hash, tocsave_htab_eq, tocsave_find): New functions.
267 (ppc64_elf_link_hash_table_create): Create tocsave_htab..
268 (ppc64_elf_link_hash_table_free): ..and delete it.
269 (build_plt_stub): Always put STD_R2_40R1 first.
270 (ppc64_elf_size_stubs): Check for R_PPC64_TOCSAVE following reloc
271 on plt call. If present add prologue nop location to tocsave_htab.
272 (ppc64_elf_relocate_section): Convert prologue nop to std. Skip
273 first insn of plt call stub when R_PPC64_TOCSAVE present.
274
3e0882af
L
2752011-10-08 H.J. Lu <hongjiu.lu@intel.com>
276
277 PR ld/13250
278 * elflink.c (elf_link_add_object_symbols): Preserve the maximum
279 alignment and size for common symbols.
280
d56d55e7
AM
2812011-10-08 Alan Modra <amodra@gmail.com>
282
c3df8c14
AM
283 PR ld/13229
284 PR ld/13244
285 * elflink.c (elf_link_add_object_symbols): Don't make IR symbols
286 dynamic.
287
2882011-10-08 Alan Modra <amodra@gmail.com>
289
290 PR ld/13229
d56d55e7
AM
291 * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
292 even when strip_discarded is false.
293
07c7ed6d
KT
2942011-10-05 Kai Tietz <ktietz@redhat.com>
295
296 * coffgen.c (coff_write_alien_symbol): Don't write
297 symbol for discarded sections, if strip_discarded isn't
298 explicit set to false.
299 (coff_write_native_symbol): Likewise.
300
d4cb0ea0
NC
3012011-10-05 DJ Delorie <dj@redhat.com>
302 Nick Clifton <nickc@redhat.com>
303
304 * elf32-rx.c: Add support for PID mode.
305 (rx_elf_relocate_section): Add checks for unsafe PID relocations.
306 Include addend in R_RX_SYM relocations.
307
fc28f9aa
TG
3082011-09-30 Tristan Gingold <gingold@adacore.com>
309
310 * dwarf2.c (struct dwarf2_debug): Add field debug_sections.
311 (read_section): Add sec argument. Adjust the code to get section
312 names from it.
313 (read_indirect_string): Adjust call to read_section.
314 (read_abbrevs): Ditto.
315 (decode_line_info): Ditto.
316 (read_debug_ranges): Ditto.
317 (DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
318 (find_debug_info): Add debug_sections parameter. Use it instead
319 the above macros.
320 (place_sections): Get section names from stash.
321 (find_line): Add debug_sections argument. Initialize
322 debug_sections field of stash from it.
323 Adjust calls to find_debug_info.
324 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
325 Adjust call to find_line.
326 (_bfd_dwarf2_find_line): Adjust call to find_line.
327 * libcoff-in.h (struct dwarf_debug_section): New declaration.
328 (coff_find_nearest_line_with_names): Likewise.
329 * libcoff.h: Regenerate.
330 * libbfd-in.h (struct dwarf_debug_section): Move declaration.
331 (dwarf_debug_sections): Likewise.
332 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
333 * libbfd.h: Regenerate.
334 * elf.c (_bfd_elf_find_nearest_line): Adjust call to
335 _bfd_dwarf2_find_nearest_line.
336 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
337 * elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
338 * elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
339 * coffgen.c (coff_find_nearest_line_with_names): New function.
340 (coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
341 * coff-rs6000.c (xcoff_debug_sections): New constant.
342 (xcoff_find_nearest_line): New function.
343 (rs6000coff_vec): Use xcoff_find_nearest_line.
344 (pmac_xcoff_vec): Ditto.
345
98528052
AM
3462011-09-30 Alan Modra <amodra@gmail.com>
347
348 PR ld/13235
349 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
350 (ppc64_elf_edit_toc): Check HA relocs.
351 (ha_reloc_match): Delete function.
352 (ppc64_elf_relocate_section): Remove delayed HA nop optimization.
353 Instead do it and low part optimization based on
354 ha_relocs_not_using_r2.
355
c227efa6
AM
3562011-09-29 Alan Modra <amodra@gmail.com>
357
358 PR ld/13233
359 * elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
360 debug and special section groups.
361
d14552ab
L
3622011-09-29 H.J. Lu <hongjiu.lu@intel.com>
363
364 PR ld/13195
365 * elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when
366 clearing def_dynamic.
367 (elf_link_add_object_symbols): Likewise. Set dynamic_def when
368 setting def_dynamic.
369 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is
370 versioned.
371
2b914c2b
KT
3722011-09-27 Kai Tietz <ktietz@redhat.com>
373
374 * coffcode.h (sec_to_styp_flags): Handle
375 SEC_LINK_DUPLICATES_SAME_CONTENTS, and
376 SEC_LINK_DUPLICATES_SAME_SIZE.
377
7cf3bbff
TG
3782011-09-22 Tristan Gingold <gingold@adacore.com>
379
380 * configure.in: Bump version to 2.22.51
381 * configure: Regenerate.
382
9e8c70f9
DM
3832011-09-21 David S. Miller <davem@davemloft.net>
384
385 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
386 * elfxx-sparc.h: Declare it.
387 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
388 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
389
7ba695a9
TG
3902011-09-21 Tristan Gingold <gingold@adacore.com>
391
392 * mach-o.c (bfd_mach_o_convert_section_name_to_bfd): Add comment.
393 Deals with size limited strings.
394 (bfd_mach_o_build_commands): Initialize more fields.
395
1a766c68
L
3962011-09-15 H.J. Lu <hongjiu.lu@intel.com>
397
398 PR ld/13177
399 * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
400 nor GOT references.
401
fd91d419
L
4022011-09-15 H.J. Lu <hongjiu.lu@intel.com>
403
404 PR ld/12975
405 * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
406 to struct bfd_elf_version_tree.
407
408 * elflink.c (elf_info_failed): Remove verdefs.
409 (_bfd_elf_export_symbol): Updated.
410 _bfd_elf_link_assign_sym_version): Likewise.
411 (bfd_elf_size_dynamic_sections): Remove pointer to struct
412 bfd_elf_version_tree. Updated.
413 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is hidden
414 by linker script.
415
416 * linker.c (bfd_hide_sym_by_version): New.
417
418 * bfd-in2.h: Regenerated.
419
7b5b197e
L
4202011-09-12 H.J. Lu <hongjiu.lu@intel.com>
421
422 PR ld/13178
423 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
424 if there are no GOT relocations.
425
e7771322
KT
4262011-09-09 Kai Tietz <ktietz@redhat.com>
427
428 * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
429 for targets without symbol_leading_char.
430
103ae312
NC
4312011-09-08 Bernd Jendrissek <bernd.jendrissek@gmail.com>
432
433 * bfdwin.c (bfd_get_file_window): Fix memory leak.
434
28942f62
AM
4352011-09-07 Alan Modra <amodra@gmail.com>
436
437 PR ld/13131
438 * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
439 is initialized.
440
b140b010
AM
4412011-09-06 Alan Modra <amodra@gmail.com>
442
443 PR ld/13131
444 * elf64-ppc.c (adjust_toc_syms): Delete redundant code.
445 (ppc64_elf_edit_toc): Fix style nit. Report some details
446 on linker failure due to reference in debug or non-alloc
447 sections to optimized away toc entry, and don't abort.
448
7d500b83
CL
4492011-09-01 Christophe Lyon <christophe.lyon@st.com>
450
451 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
452 sections.
453
7cf80422
NC
4542011-08-26 Nick Clifton <nickc@redhat.com>
455
456 * po/es.po: Updated Spanish translation.
457
af75cb9c
AM
4582011-08-19 Alan Modra <amodra@gmail.com>
459
460 * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
461 we haven't seen expected -mcmodel=medium/large code relocs.
462
9d4b6009
TG
4632011-08-18 Tristan Gingold <gingold@adacore.com>
464
465 * mach-o.c (bfd_mach_o_read_segment): Initialize list.
466
72b5104c
TG
4672011-08-17 Tristan Gingold <gingold@adacore.com>
468
469 * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
470
c77ec726
AM
4712011-08-17 Alan Modra <amodra@gmail.com>
472
473 PR ld/12762
474 * bfd-in.h (struct bfd_section_already_linked): Forward declare.
475 (_bfd_handle_already_linked): Declare.
476 * coff-alpha.c (_bfd_ecoff_section_already_linked): Define as
477 _bfd_coff_section_already_linked.
478 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
479 * coffcode.h (coff_section_already_linked): Likewise.
480 * cofflink.c (coff_link_add_symbols): Revert 2011-07-09 changes.
481 * elf-bfd.h: Likewise.
482 * libbfd-in.h: Likewise.
483 * targets.c: Likewise.
484 * linker.c (bfd_section_already_linked): Likewise.
485 (bfd_section_already_linked_table_lookup): Likewise.
486 (bfd_section_already_linked_table_insert): Likewise.
487 (_bfd_generic_section_already_linked): Likewise. Call
488 _bfd_handle_already_linked.
489 (_bfd_handle_already_linked): New function, split out from..
490 * elflink.c (_bfd_elf_section_already_linked): ..here. Revert
491 2011-07-09 changes. Avoid unnecessary strcmp when matching
492 already_linked_list entries. Match plugin linkonce section.
493 (section_signature): Delete.
494 * coffgen.c (_bfd_coff_section_already_linked): New function.
495 * libcoff-in.h (_bfd_coff_section_already_linked): Declare.
496 * libbfd.h: Regenerate.
497 * libcoff.h: Regenerate.
498 * bfd-in2.h: Regenerate.
499
b3874e1a
AM
5002011-08-14 Alan Modra <amodra@gmail.com>
501
502 * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
503 shared and call to _mcount will go via plt.
504
8de848d8
AM
5052011-08-14 Alan Modra <amodra@gmail.com>
506
507 * elf64-ppc.c: Prefix all einfo error strings with "%P: ".
508 * elf32-ppc.c: Likewise.
509 (ppc_elf_select_plt_layout): Use einfo rather than info to report
510 forced bss-plt.
511
64d25c44
L
5122011-08-12 H.J. Lu <hongjiu.lu@intel.com>
513
514 PR ld/13082
515 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64.
516 (elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32
517 and zero-extend it to 64bit if addend is zero for x32. Generate
518 R_X86_64_RELATIVE64 for x32.
519
2de70689
MGD
5202011-08-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
521
522 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
523 * bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise.
524 * elf32-arm.c (elf32_arm_link_hash_table): New field.
525 (elf232_arm_link_hash_table_create): Initialise new field.
526 (check_use_blx): Change test depending on fix_arm1176.
527 (bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from
528 command line options.
529
5a5cbf72
TG
5302011-08-08 Tristan Gingold <gingold@adacore.com>
531
532 * mach-o.c (struct mach_o_segment_name_xlat): Add comments.
533 (segsec_names_xlat): Reorder elements.
534 (bfd_mach_o_read_section_32): Fix typo.
535 (bfd_mach_o_read_section_64): Fix typo.
536
f1bde64c
TG
5372011-08-08 Tristan Gingold <gingold@adacore.com>
538
539 * mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
540 (BFD_MACH_O_SECTNAME_SIZE): Ditto.
541 (bfd_mach_o_section): Use them. Add next field.
542 (bfd_mach_o_segment_command): Replace sections array by
543 sect_head and sect_tail.
544 (bfd_mach_o_get_mach_o_section): New macro.
545 (bfd_mach_o_lookup_section): Remove.
546 (bfd_mach_o_new_section_hook): New function.
547 * mach-o.c (bfd_mach_o_normalize_section_name): Use strncmp
548 instead of strcmp.
549 (bfd_mach_o_convert_section_name_to_bfd): Replaces section
550 parameter with segname and sectname parameters. Adjust.
551 (bfd_mach_o_append_section_to_segment): New function. Use a
552 linked list for Mach-O sections.
553 (bfd_mach_o_write_segment_32): Adjust.
554 (bfd_mach_o_write_segment_64): Ditto.
555 (bfd_mach_o_build_commands): Fix comment. Adjust.
556 (bfd_mach_o_flatten_sections): Adjust.
557 (bfd_mach_o_print_section_map): Adjust.
558 (bfd_mach_o_set_section_flags_from_bfd): Ditto.
559 (bfd_mach_o_new_section_hook): New function.
560 (bfd_mach_o_init_section_from_mach_o): Ditto.
561 (bfd_mach_o_read_section_32): Remove section parameter.
562 Return a section instead.
563 (bfd_mach_o_read_section_64): Ditto.
564 (bfd_mach_o_read_section): Ditto.
565 (bfd_mach_o_make_bfd_section): Adjust.
566 (bfd_mach_o_read_segment): Adjust for new profile of
567 bfd_mach_o_read_section.
568 (bfd_mach_o_lookup_section): Remove.
569 * mach-o-target.c (bfd_mach_o_new_section_hook): Remove.
570
edbdea0e
TG
5712011-08-08 Tristan Gingold <gingold@adacore.com>
572
573 * mach-o.h (bfd_mach_o_version_min_command): New structure.
574 (bfd_mach_o_load_command): Add version_min.
575 (mach_o_data_struct): Fix comment.
576 * mach-o.c (bfd_mach_o_read_version_min): New function.
577 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
578 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
579 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
580 (bfd_mach_o_get_name_or_null): New function.
581 (bfd_mach_o_get_name): Use the above new one.
582 (bfd_mach_o_load_command_name): Add the above new commands.
583 (bfd_mach_o_bfd_print_private_bfd_data): Display numerically
584 unknown commands. Handle BFD_MACH_O_LC_FUNCTION_STARTS,
585 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
586 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
587
46d1c23b
TG
5882011-08-08 Tristan Gingold <gingold@adacore.com>
589
590 * mach-o.h: Move size macros to external.h
591 Move reloc macros to reloc.h and x86-64.h.
592 * mach-o-i386.c: Includes mach-o/reloc.h
593 * mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
594 * mach-o.c: Add includes.
595 (bfd_mach_o_write_header): Use structure from external.h to convert.
596 (bfd_mach_o_write_thread): Ditto.
597 (bfd_mach_o_write_relocs): Ditto.
598 (bfd_mach_o_write_section_32): Ditto.
599 (bfd_mach_o_write_section_64): Ditto.
600 (bfd_mach_o_write_segment_32): Ditto.
601 (bfd_mach_o_write_segment_64): Ditto.
602 (bfd_mach_o_write_symtab): Ditto.
603 (bfd_mach_o_write_contents): Ditto.
604 (bfd_mach_o_read_header): Ditto.
605 (bfd_mach_o_read_section_32): Ditto.
606 (bfd_mach_o_read_section_64): Ditto.
607 (bfd_mach_o_read_symtab_symbol): Ditto.
608 (bfd_mach_o_read_dylinker): Ditto.
609 (bfd_mach_o_read_dylib): Ditto.
610 (bfd_mach_o_read_dysymtab): Ditto.
611 (bfd_mach_o_read_symtab): Ditto.
612 (bfd_mach_o_read_linkedit): Ditto.
613 (bfd_mach_o_read_str): Ditto.
614 (bfd_mach_o_read_dyld_info): Ditto.
615 (bfd_mach_o_read_segment): Ditto.
616 (bfd_mach_o_read_command): Ditto.
617 (bfd_mach_o_archive_p): Ditto.
618 (bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
619 (bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
620 (bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
621 (bfd_mach_o_read_uuid): Remove useless cast. Use a macro instead
622 of an hard-coded value.
623
fde33808
TG
6242011-08-08 Tristan Gingold <gingold@adacore.com>
625
626 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos.
627 (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL,
628 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and
629 BFD_RELOC_MACH_O_X86_64_GOT_LOAD. Share common code.
630
53d58d96
TG
6312011-08-08 Tristan Gingold <gingold@adacore.com>
632
633 * mach-o.c (bfd_mach_o_normalize_section_name): New function.
634 (bfd_mach_o_convert_section_name_to_bfd): Use it.
635 (bfd_mach_o_get_section_type_from_name): New function.
636 (bfd_mach_o_get_section_attribute_from_name): Ditto.
637 * mach-o.h (bfd_mach_o_section): Move bfdsection field at the end.
638 Add comments. Add prototypes for the above new functions.
639
9a66aae0
MK
6402011-08-05 Mark Kettenis <kettenis@gnu.org>
641
642 * netbsd-core.c (netbsd_core_vec): Init match_priority field.
643
d969d15f
AM
6442011-08-05 Alan Modra <amodra@gmail.com>
645
646 * elf64-ppc.c (maybe_strip_output): New function.
647 (ppc64_elf_size_stubs): Use it to strip .branch_lt and .eh_frame.
648
43e1669b
AM
6492011-08-05 Alan Modra <amodra@gmail.com>
650
651 PR ld/12762
652 * elflink.c (_bfd_elf_section_already_linked): Return matched
653 status. Remove COFF comdat section handling.
654 * linker.c (_bfd_generic_section_already_linked): Return matched
655 status. Don't set SEC_GROUP in l_flags for plugin entries.
656 (bfd_section_already_linked): Update prototype.
657 * targets.c (_section_already_linked): Likewise.
658 * elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
659 * libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
660 (_bfd_nolink_section_already_linked): Update.
661 * libbfd.h: Regenerate.
662 * bfd-in2.h: Regenerate.
663
6177242a
AM
6642011-08-05 Alan Modra <amodra@gmail.com>
665
666 * elf32-ppc.c: Include dwarf2.h.
667 (struct ppc_elf_link_hash_table): Add glink_eh_frame.
668 (ppc_elf_create_glink): Create .eh_frame section.
669 (glink_eh_frame_cie): New array.
670 (ppc_elf_size_dynamic_sections): Size glink_eh_frame.
671 (ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
672
f1bb0388
TG
6732011-08-04 Tristan Gingold <gingold@adacore.com>
674
675 * vms-alpha.c (_bfd_vms_write_eeom): Round vms_linkage_index.
676 (_bfd_vms_write_etir): Initialize vms_linkage_index to 0.
677
092d27ff
TG
6782011-08-03 Tristan Gingold <gingold@adacore.com>
679
680 * mach-o.c (bfd_mach_o_canonicalize_symtab): Handle no symbols case.
681 (bfd_mach_o_read_symtab_symbols): Return if no symbols.
682
80cab405
MR
6832011-08-02 Maciej W. Rozycki <macro@codesourcery.com>
684
685 * elfxx-mips.c (check_4byte_branch): Remove function.
686 (check_relocated_bzc): New function.
687 (_bfd_mips_elf_relax_section): Permit the relaxation of LUI
688 instructions that immediately follow a compact branch
689 instruction.
690
c7131b65
AM
6912011-08-02 Alan Modra <amodra@gmail.com>
692
693 * elf64-ppc.c (build_plt_stub): Correct emitted relocs when no
694 plt_static_chain.
695 (ppc_build_one_stub): Adjust get_relocs call to suit..
696 (ppc_size_one_stub): ..and reloc sizing. Correct plt size corner case.
697
d7921315
L
6982011-08-01 H.J. Lu <hongjiu.lu@intel.com>
699
700 PR ld/13048
701 * archures.c (bfd_mach_i386_intel_syntax): New.
702 (bfd_mach_i386_i8086): Updated.
703 (bfd_mach_i386_i386): Likewise.
704 (bfd_mach_x86_64): Likewise.
705 (bfd_mach_x64_32): Likewise.
706 (bfd_mach_i386_i386_intel_syntax): Likewise.
707 (bfd_mach_x86_64_intel_syntax): Likewise.
708 (bfd_mach_x64_32_intel_syntax): Likewise.
709 (bfd_mach_l1om): Likewise.
710 (bfd_mach_l1om_intel_syntax): Likewise.
711 (bfd_mach_k1om): Likewise.
712 (bfd_mach_k1om_intel_syntax): Likewise.
713
714 * bfd-in2.h: Regenerated.
715
716 * cpu-i386.c (bfd_i386_compatible): Check mach instead of
717 bits_per_address.
718 (bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64.
719 (bfd_x64_32_arch): Likewise.
720
721 * elf64-x86-64.c: Include "libiberty.h".
722 (x86_64_elf_howto_table): Append x32 R_X86_64_32.
723 (elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32.
724 (elf_x86_64_reloc_type_lookup): Likewise.
725 (elf_x86_64_reloc_name_lookup): Likewise.
726 (elf_x86_64_relocate_section): Likewise.
727 (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32.
728
f41e5fcc
MR
7292011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
730
731 * elfxx-mips.c (check_br32): Fix return type.
732
c088dedf
MR
7332011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
734
735 * elfxx-mips.c (bz_insn_16): Correct opcode mask.
736
2309ddf2
MR
7372011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
738
739 * elfxx-mips.c: Adjust comments throughout.
740 (mips_elf_relax_delete_bytes): Reshape code.
741 (_bfd_mips_elf_relax_section): Remove check for
742 R_MICROMIPS_GPREL16 relocations. Reshape code.
743
23209a78
RM
7442011-07-28 Roland McGrath <mcgrathr@google.com>
745
a27e4371
RM
746 * elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
747 (elf_i386_nacl_plt0_entry): New variable.
748 (elf_i386_plt_entry): New variable.
749 (elf_i386_nacl_pic_plt0_entry): New variable.
750 (elf_i386_nacl_pic_plt_entry): New variable.
751 (elf_i386_nacl_plt, elf_i386_nacl_arch_bed): New variables.
752 (elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
753 (elf_backend_plt_alignment): Likewise.
754
755 * config.bfd: Handle i[3-7]86-*-nacl*.
756 * elf32-i386.c (bfd_elf32_i386_nacl_vec): New backend vector stanza.
757 * targets.c: Support bfd_elf32_i386_nacl_vec.
758 * configure.in: Likewise.
759 * configure: Regenerated.
760
25e762b9
RM
761 * elf32-i386.c (struct elf_i386_plt_layout): New type.
762 (GET_PLT_ENTRY_SIZE): New macro.
763 (elf_i386_plt): New variable.
764 (struct elf_i386_backend_data): New member `plt'.
765 (elf_i386_arch_bed): Add initializer for it.
766 (elf_i386_vxworks_arch_bed): Likewise.
767 (elf_i386_allocate_dynrelocs): Use GET_PLT_ENTRY_SIZE.
768 (elf_i386_plt_sym_val): Likewise.
769 (elf_i386_relocate_section): Likewise.
770 (elf_i386_finish_dynamic_symbol): Likewise.
771 Also use other elf_i386_plt_layout members for PLT details.
772 (elf_i386_finish_dynamic_sections): Likewise.
773
23209a78
RM
774 * elf32-i386.c (struct elf_i386_backend_data): New type.
775 (get_elf_i386_backend_data): New macro.
776 (elf_i386_arch_bed): New variable.
777 (elf_backend_arch_data): New macro.
778 (struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
779 (elf_i386_link_hash_table_create): Don't initialize them.
780 (elf_i386_create_dynamic_sections): Find is_vxworks flags in
781 elf_i386_backend_data, not elf_i386_link_hash_table.
782 (elf_i386_adjust_dynamic_symbol): Likewise.
783 (elf_i386_allocate_dynrelocs): Likewise.
784 (elf_i386_readonly_dynrelocs): Likewise.
785 (elf_i386_size_dynamic_sections): Likewise.
786 (elf_i386_relocate_section): Likewise.
787 (elf_i386_finish_dynamic_symbol): Likewise.
788 (elf_i386_finish_dynamic_sections): Likewise. Same for plt0_pad_byte.
789 (elf_i386_vxworks_link_hash_table_create): Function removed.
790 (elf_i386_vxworks_arch_bed): New variable.
791 (elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
792
793 * elf-bfd.h (elf_backend_data): New member arch_backend_data.
794 * elfxx-target.h (elf_backend_arch_data): New macro.
795 (elfNN_bed): Use it as initializer for the new member.
796
d91a6875
NC
7972011-07-28 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
798
799 * elf64-hppa.c (elf_hppa_final_link_relocate): Fix handling of out
800 of range branches.
801
4ccf1e31
JJ
8022011-07-26 Jakub Jelinek <jakub@redhat.com>
803
804 * dwarf2.c (dwarf_debug_sections): Add .debug_macro
805 and .zdebug_macro entry.
806 (dwarf_debug_section_enum): Add debug_macro.
807
58d180e8
AM
8082011-07-26 Alan Modra <amodra@gmail.com>
809
6177242a 810 * elf64-ppc.c: Include dwarf2.h.
58d180e8
AM
811 (struct ppc_link_hash_table): Add glink_eh_frame.
812 (create_linkage_sections): Create .eh_frame section.
813 (ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
814 glink_eh_frame.
815 (glink_eh_frame_cie): New array.
816 (ppc64_elf_size_stubs): Size glink_eh_frame.
817 (ppc64_elf_build_stubs): Init glink_eh_frame contents.
818 (ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
819
18978b27
HPN
8202011-07-25 Hans-Peter Nilsson <hp@bitrange.com>
821
822 PR ld/12815
823 * elf64-mmix.c (struct _mmix_elf_section_data): New members
824 has_warned_bpo and has_warned_pushj.
825 (mmix_final_link_relocate): Remove PARAMS and PTR macros,
826 converting to ISO C. Add new parameter error_message. All
827 callers changed.
828 (mmix_elf_perform_relocation): Ditto.
829 <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
830 Handle the case where mmix_elf_check_common_relocs has not been
831 called, missing preparations for relocs of the respective type.
832
df58fc94 8332011-07-24 Chao-ying Fu <fu@mips.com>
58d180e8
AM
834 Ilie Garbacea <ilie@mips.com>
835 Maciej W. Rozycki <macro@codesourcery.com>
836 Joseph Myers <joseph@codesourcery.com>
837 Catherine Moore <clm@codesourcery.com>
df58fc94
RS
838 Richard Sandiford <rdsandiford@googlemail.com>
839
840 * archures.c (bfd_mach_mips_micromips): New macro.
841 * cpu-mips.c (I_micromips): New enum value.
842 (arch_info_struct): Add bfd_mach_mips_micromips.
843 * elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
844 prototype.
845 (_bfd_mips_elf_relax_section): Likewise.
846 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
847 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
848 ASE.
849 (_bfd_mips16_elf_reloc_shuffle): Rename to...
850 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
851 (gprel16_reloc_p): Handle microMIPS ASE.
852 (literal_reloc_p): New function.
853 * elf32-mips.c (elf_micromips_howto_table_rel): New variable.
854 (_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
855 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
856 and _bfd_mips_elf_reloc_shuffle changes.
857 (mips_elf_gprel32_reloc): Update comment.
858 (micromips_reloc_map): New variable.
859 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
860 (mips_elf32_rtype_to_howto): Likewise.
861 (mips_info_to_howto_rel): Likewise.
862 (bfd_elf32_bfd_is_target_special_symbol): Define.
863 (bfd_elf32_bfd_relax_section): Likewise.
864 * elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
865 (micromips_elf64_howto_table_rela): Likewise.
866 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
867 and _bfd_mips_elf_reloc_shuffle changes.
868 (micromips_reloc_map): Likewise.
869 (bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
870 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
871 (mips_elf64_rtype_to_howto): Likewise.
872 (bfd_elf64_bfd_is_target_special_symbol): Define.
873 * elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
874 (elf_micromips_howto_table_rela): Likewise.
875 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
876 and _bfd_mips_elf_reloc_shuffle changes.
877 (micromips_reloc_map): Likewise.
878 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
879 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
880 (mips_elf_n32_rtype_to_howto): Likewise.
881 (bfd_elf32_bfd_is_target_special_symbol): Define.
882 * elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
883 (LA25_LUI_MICROMIPS_2): Likewise.
884 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
885 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
886 (TLS_RELOC_P): Handle microMIPS ASE.
887 (mips_elf_create_stub_symbol): Adjust value of stub symbol if
888 target is a microMIPS function.
889 (micromips_reloc_p): New function.
890 (micromips_reloc_shuffle_p): Likewise.
891 (got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
892 (got_disp_reloc_p, got_page_reloc_p): New functions.
893 (got_ofst_reloc_p): Likewise.
894 (got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
895 (call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
896 (hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
897 (micromips_branch_reloc_p): New function.
898 (tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
899 (tls_gottprel_reloc_p): Likewise.
900 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
901 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
902 ASE.
903 (_bfd_mips16_elf_reloc_shuffle): Rename to...
904 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
905 (_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
906 (mips_tls_got_index, mips_elf_got_page): Likewise.
907 (mips_elf_create_local_got_entry): Likewise.
908 (mips_elf_relocation_needs_la25_stub): Likewise.
909 (mips_elf_calculate_relocation): Likewise.
910 (mips_elf_perform_relocation): Likewise.
911 (_bfd_mips_elf_symbol_processing): Likewise.
912 (_bfd_mips_elf_add_symbol_hook): Likewise.
913 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
914 (mips_elf_add_lo16_rel_addend): Likewise.
915 (_bfd_mips_elf_check_relocs): Likewise.
916 (mips_elf_adjust_addend): Likewise.
917 (_bfd_mips_elf_relocate_section): Likewise.
918 (mips_elf_create_la25_stub): Likewise.
919 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
920 (_bfd_mips_elf_gc_sweep_hook): Likewise.
921 (_bfd_mips_elf_is_target_special_symbol): New function.
922 (mips_elf_relax_delete_bytes): Likewise.
923 (opcode_descriptor): New structure.
924 (RA): New macro.
925 (OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
926 (b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
927 (beq_insn_32): Likewise.
928 (b_insn_16, bz_insn_16): New variables.
929 (BZC32_REG_FIELD): New macro.
930 (bz_rs_insns_32, bz_rt_insns_32): New variables.
931 (bzc_insns_32, bz_insns_16):Likewise.
932 (BZ16_REG, BZ16_REG_FIELD): New macros.
933 (jal_insn_32_bd16, jal_insn_32_bd32): New variables.
934 (jal_x_insn_32_bd32): Likewise.
935 (j_insn_32, jalr_insn_32): Likewise.
936 (ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
937 (jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
938 (JR16_REG): New macro.
939 (ds_insns_16_bd16): New variable.
940 (lui_insn): Likewise.
941 (addiu_insn, addiupc_insn): Likewise.
942 (ADDIUPC_REG_FIELD): New macro.
943 (MOVE32_RD, MOVE32_RS): Likewise.
944 (MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
945 (move_insns_32, move_insns_16): New variables.
946 (nop_insn_32, nop_insn_16): Likewise.
947 (MATCH): New macro.
948 (find_match): New function.
949 (check_br16_dslot, check_br32_dslot): Likewise.
950 (check_br16, check_br32): Likewise.
951 (IS_BITSIZE): New macro.
952 (check_4byte_branch): New function.
953 (_bfd_mips_elf_relax_section): Likewise.
954 (_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
955 and microMIPS modules together.
956 (_bfd_mips_elf_print_private_bfd_data): Handle microMIPS ASE.
957 * reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
958 (BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
959 (BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
960 (BFD_RELOC_MICROMIPS_GPREL16): Likewise.
961 (BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
962 (BFD_RELOC_MICROMIPS_HI16_S): Likewise.
963 (BFD_RELOC_MICROMIPS_LO16): Likewise.
964 (BFD_RELOC_MICROMIPS_LITERAL): Likewise.
965 (BFD_RELOC_MICROMIPS_GOT16): Likewise.
966 (BFD_RELOC_MICROMIPS_CALL16): Likewise.
967 (BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
968 (BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
969 (BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
970 (BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
971 (BFD_RELOC_MICROMIPS_SUB): Likewise.
972 (BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
973 (BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
974 (BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
975 (BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
976 (BFD_RELOC_MICROMIPS_HIGHER): Likewise.
977 (BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
978 (BFD_RELOC_MICROMIPS_JALR): Likewise.
979 (BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
980 (BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
981 (BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
982 (BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
983 (BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
984 (BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
985 (BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
986 * bfd-in2.h: Regenerate.
987 * libbfd.h: Regenerate.
988
7a9068fe
L
9892011-07-22 H.J. Lu <hongjiu.lu@intel.com>
990
991 * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
992 (ALL_MACHINES_CFILES): Add cpu-k1om.c.
993 * Makefile.in: Regenerated.
994
995 * archures.c (bfd_architecture): Add bfd_arch_k1om.
996 (bfd_k1om_arch): New.
997 (bfd_archures_list): Add &bfd_k1om_arch.
998 * bfd-in2.h: Regenerated.
999
1000 * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
1001 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_k1om_freebsd_vec
1002 if bfd_elf64_x86_64_freebsd_vec is supported.
1003 (targ_selvecs): Likewise.
1004
1005 * configure.in: Support bfd_elf64_k1om_vec and
1006 bfd_elf64_k1om_freebsd_vec.
1007 * configure: Regenerated.
1008
1009 * cpu-k1om.c: New.
1010
1011 * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
1012 (bfd_elf64_k1om_vec): Likewise.
1013 (bfd_elf64_k1om_freebsd_vec): Likewise.
1014
1015 * targets.c (bfd_elf64_k1om_vec): New.
1016 (bfd_elf64_k1om_freebsd_vec): Likewise.
1017 (_bfd_target_vector): Add bfd_elf64_k1om_vec and
1018 bfd_elf64_k1om_freebsd_vec.
1019
156f6ad8
JK
10202011-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1021
1022 Fix false coff-go32-exe matches.
1023 * coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
1024 COFF_CHECK_FORMAT.
1025 * coff-stgo32.c (go32_check_format): New forward declaration.
1026 (COFF_CHECK_FORMAT): New defintion.
1027 (go32_check_format): New function.
1028
05aecedb
AM
10292011-07-15 Alan Modra <amodra@gmail.com>
1030
1031 * configure.in: Bump version.
1032 * configure: Regenerate.
1033
cbde55ab
AM
10342011-07-14 Alan Modra <amodra@gmail.com>
1035
1036 * linker.c (_bfd_generic_section_already_linked): Set l_flags.
1037 * elf-bfd.h (struct already_linked): Forward declare.
1038
ec24dc88
AM
10392011-07-14 Alan Modra <amodra@gmail.com>
1040
1041 * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
1042 (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
1043
9df0ef5f
AM
10442011-07-14 Alan Modra <amodra@gmail.com>
1045
1046 * elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
1047 (build_plt_stub): Add plt_static_chain param, don't load r11 if false.
1048 (build_tls_get_addr_stub): Likewise.
1049 (ppc_build_one_stub): Update calls to above.
1050 (ppc_size_one_stub): Adjust stub size.
1051 (ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
1052 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
1053
8de863a5
NC
10542011-07-12 Nick Clifton <nickc@redhat.com>
1055
1056 * elf32-arm.c (elf32_arm_section_flags): Delete.
1057 (elf_backend_section_flags): Remove.
1058
a92c088a
L
10592011-07-11 H.J. Lu <hongjiu.lu@intel.com>
1060
1061 PR ld/12982
1062 * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
1063 when setting stack_flags.
1064
ae17ab41
CM
10652011-07-11 Catherine Moore <clm@codesourcery.com>
1066
1067 * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
1068 * aout-target.h (MY_bfd_lookup_section_flags): New definition.
1069 * aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
58d180e8 1070 * bfd-in2.h: Regenerated.
ae17ab41
CM
1071 * bfd.c (bfd_lookup_section_flags): New definition.
1072 * binary.c (binary_bfd_lookup_section_flags): New definition.
1073 * bout.c (b_out_bfd_lookup_section_flags): New definition.
1074 * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
1075 * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
1076 * coff-rs6000.c (rs6000coff_vec): Include
1077 bfd_generic_lookup_section_flags.
1078 (pmac_xcoff_vec): Likewise.
1079 * coffcode.h (coff_bfd_lookup_section_flags): New definition.
1080 * coff64-rs6000.c (rs6000coff64_vec): Include
1081 bfd_generic_lookup_section_flags.
1082 (aix5coff64_vec): Likewise.
1083 * ecoff.c (bfd_debug_section): Initialize flag_info field.
1084 * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
1085 (bfd_elf_lookup_section_flags): Declare.
1086 * elflink.c (bfd_elf_lookup_section_flags): New function.
1087 * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
1088 (elf_backend_lookup_section_flags_hook): Define.
1089 (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
1090 * i386msdos.c (msdos_bfd_lookup_section_flags): New define.
1091 * i386os9k.c (os9k_bfd_lookup_section_flags): New define.
1092 * ieee.c (ieee_bfd_lookup_section_flags): New define.
1093 * ihex.c (ihex_bfd_lookup_section_flags): New define.
1094 * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
1095 (bfd_generic_lookup_section_flags): Declare.
1096 * libbfd.h: Regenerated.
1097 * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
1098 * mmo.c (mmo_bfd_lookup_section_flags): New definition.
1099 * nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
1100 * oasys.c (oasys_bfd_lookup_section_flags): New definition.
1101 * pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
1102 * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
1103 * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
1104 * reloc.c (bfd_generic_lookup_section_flags): New function.
1105 * som.c (som_bfd_lookup_section_flags): New definition.
1106 * srec.c (srec_bfd_lookup_section_flags): New definition.
1107 * targets.c (flag_info): Declare.
1108 (NAME##_bfd_lookup_section_flags): Add to LINK jump table.
1109 (_bfd_lookup_section_flags): New.
1110 * tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
1111 * versados.c (versados_bfd_lookup_section_flags): New definition.
1112 * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
1113 * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
1114
23ebcd30
L
11152011-07-11 H.J. Lu <hongjiu.lu@intel.com>
1116
1117 PR ld/12978
1118 * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
1119
0c511000
AM
11202011-07-09 Alan Modra <amodra@gmail.com>
1121
1122 PR ld/12942
1123 * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
1124 rather than kept_section to determine whether a symbol is from
1125 a discarded section.
1126 * cofflink.c (coff_link_add_symbols): Make symbols from discarded
1127 sections appear undefined.
1128
11292011-07-09 H.J. Lu <hongjiu.lu@intel.com>
1130
1131 PR ld/12942
1132 * elf-bfd.h (_bfd_elf_section_already_linked): Replace
1133 "asection *" with "struct already_linked *".
1134 * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
1135 (_bfd_generic_section_already_linked): Likewise.
1136 (bfd_section_already_linked_table_insert): Likewise.
1137 (struct already_linked): New.
1138 (struct bfd_section_already_linked): Use it.
1139 * elflink.c (_bfd_elf_section_already_linked): Replace.
1140 "asection *" with "struct already_linked *". Replace the plugin
1141 dummy with the LTO output.
1142 * linker.c (_bfd_generic_section_already_linked): Likewise.
1143 * targets.c (struct already_linked): Add forward declaration.
1144 (bfd_target): Replace "struct bfd_section *" with
1145 "struct already_linked *" in _section_already_linked.
1146 * bfd-in2.h: Regenerate.
1147 * libbfd.h: Regenerate.
1148
74f26653
TG
11492011-07-06 Tristan Gingold <gingold@adacore.com>
1150
1151 * mach-o.h: Move loader related definitions to
1152 include/mach-o/loader.h. Include it.
1153
52cb9dfe
L
11542011-07-05 H.J. Lu <hongjiu.lu@intel.com>
1155
1156 * elf64-x86-64.c (elf_backend_post_process_headers): Always
1157 define to _bfd_elf_set_osabi.
1158
9c55345c
TS
11592011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
1160 Thomas Schwinge <thomas@schwinge.name>
1161
2bb70ae0 1162 PR binutils/12913
9c55345c
TS
1163 * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
1164 ELFOSABI_LINUX alias.
1165 * elf32-hppa.c: Likewise.
1166 * elf32-i370.c: Likewise.
1167 * elf64-hppa.c: Likewise.
1168
28ede8be
ILT
11692011-07-01 Ian Lance Taylor <iant@google.com>
1170
1171 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
1172 DW_OP_lit3 to DW_OP_lit2.
1173
c79d6685
AM
11742011-07-01 Alan Modra <amodra@gmail.com>
1175
1176 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
1177 dyn relocs when called to copy flags for a weak sym.
1178 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1179 (ppc64_elf_merge_private_bfd_data): Delete.
1180 (bfd_elf64_bfd_merge_private_bfd_data): Define as
1181 _bfd_generic_verify_endian_match.
1182
dc076558
BS
11832011-06-30 Bernd Schmidt <bernds@codesourcery.com>
1184
1185 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
1186 link_info is NULL.
1187
25d41743
TG
11882011-06-28 Tristan Gingold <gingold@adacore.com>
1189
1190 * vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
1191 unsigned int.
1192 (_bfd_vms_write_etir): Write linkage index from reloc.
1193
9b02d212
TG
11942011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
1195
1196 * mach-o.c (bfd_mach_o_read_command): Also ignore
1197 BFD_MACH_O_LC_ROUTINES_64.
1198
a8efca92
TG
11992011-06-27 Tristan Gingold <gingold@adacore.com>
1200
1201 * vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
1202 section target index.
1203
20ee8bc9
NC
12042011-06-27 Nick Clifton <nickc@redhat.com>
1205
1206 * cisco-core.c (cisco_core_little_vec): Add initialization of
1207 match_priority field.
1208
4c95ab76
TG
12092011-06-27 Tristan Gingold <gingold@adacore.com>
1210
1211 * cache.c: Include bfd_stdint.h.
1212 (cache_bmmap): Change profile. Return region start and size.
1213 * bfdio.c (struct bfd_iovec): Change bmmap profile.
1214 (bfd_mmap): Change profile and adjust. Update comment.
1215 (memory_bmmap): Change profile.
1216 * opncls.c (opncls_bmmap): Change profile.
1217 * vms-lib.c (vms_lib_bmmap): Likewise.
1218 * libbfd.h: Regenerate.
1219 * bfd-in2.h: Regenerate.
1220
62a35308
TG
12212011-06-27 Tristan Gingold <gingold@adacore.com>
1222
1223 * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
1224 Add comment.
1225
5d430399
L
12262011-06-25 H.J. Lu <hongjiu.lu@intel.com>
1227
1228 * elf64-x86-64.c (elf_backend_post_process_headers): Don't
1229 define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
1230
332ce62b
JK
12312011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1232
1233 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
1234 PLT_EH_FRAME.
1235 * elf32-i386.c (elf_i386_link_hash_table): Likewise.
1236
7dbf3b76
RH
12372011-06-24 Richard Henderson <rth@redhat.com>
1238
1239 PR ld/12928
1240 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
1241 tlsgd insn before swapping adjacent insns.
1242
d120eec2
TG
12432011-06-24 Tristan Gingold <gingold@adacore.com>
1244
1245 * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
1246 absolute section.
1247
1e951488
AM
12482011-06-24 Alan Modra <amodra@gmail.com>
1249
1250 PR ld/12921
1251 * elf.c (assign_file_positions_for_load_sections): Don't align
1252 sh_offset for all SHT_NOBITS sections here, just .tbss sections
1253 that don't get a PT_LOAD.
1254
b68593b9
KK
12552011-06-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1256
1257 * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
1258 (sh_elf_check_relocs): Likewise.
1259
e366eeae
RH
12602011-06-22 Richard Henderson <rth@redhat.com>
1261
1262 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
1263 TPREL in a PIE image.
1264 (alpha_dynamic_entries_for_reloc): Likewise.
1265 (elf64_alpha_relocate_section): Allow TPREL in PIE images.
1266 (elf64_alpha_relax_got_load): Likewise.
1267
9ec0c936
RR
12682011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1269
c79d6685
AM
1270 * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
1271 for PIE.
9ec0c936 1272
3a5dbfb2
AM
12732011-06-22 Alan Modra <amodra@gmail.com>
1274
1275 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
1276 plugin symbols. Fix segfault on linker scrip defined syms.
1277
e41b3a13
JJ
12782011-06-20 Jakub Jelinek <jakub@redhat.com>
1279
1280 PR ld/12570
1281 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
1282 at all for linker created .eh_frame sections.
1283 (_bfd_elf_discard_section_eh_frame): Handle linker created
1284 .eh_frame sections with no relocations.
1285 * elf64-x86-64.c: Include dwarf2.h.
1286 (elf_x86_64_eh_frame_plt): New variable.
1287 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1288 PLT_FDE_LEN_OFFSET): Define.
1289 (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
1290 (elf_x86_64_create_dynamic_sections): Create and fill in
1291 .eh_frame section for .plt section.
1292 (elf_x86_64_size_dynamic_sections): Write .plt section size
1293 into .eh_frame FDE covering .plt section.
1294 (elf_x86_64_finish_dynamic_sections): Write .plt section
1295 start into .eh_frame FDE covering .plt section. Call
1296 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1297 (elf_backend_plt_alignment): Define to 4.
1298 * elf32-i386.c: Include dwarf2.h.
1299 (elf_i386_eh_frame_plt): New variable.
1300 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1301 PLT_FDE_LEN_OFFSET): Define.
1302 (struct elf_i386_link_hash_table): Add plt_eh_frame field.
1303 (elf_i386_create_dynamic_sections): Create and fill in
1304 .eh_frame section for .plt section.
1305 (elf_i386_size_dynamic_sections): Write .plt section size
1306 into .eh_frame FDE covering .plt section.
1307 (elf_i386_finish_dynamic_sections): Write .plt section
1308 start into .eh_frame FDE covering .plt section. Call
1309 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1310 (elf_backend_plt_alignment): Define to 4.
1311
8b778942
L
13122011-06-19 H.J. Lu <hongjiu.lu@intel.com>
1313
1314 * elf64-x86-64.c (elf_backend_post_process_headers): Defined
1315 for x32.
1316
8fd79e71
L
13172011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
1320 CORE_HEADER is defined.
1321 (elf_x86_64_write_core_note): New.
1322 (elf_backend_write_core_note): Likewise.
1323
1324 * hosts/x86-64linux.h (uint64_t): New.
1325 (user_regsx32_struct): Likewise.
1326 (elf_gregx32_t): Likewise.
1327 (ELF_NGREGX32): Likewise.
1328 (elf_gregsetx32_t): Likewise.
1329 (elf_prstatusx32): Likewise.
1330 (prstatusx32_t): Likewise.
1331 (user_fpregs32_struct): Removed.
1332 (user_fpxregs32_struct): Likewise.
1333 (user32): Likewise.
1334 (elf_fpregset32_t): Likewise.
1335 (elf_fpxregset32_t): Likewise.
1336 (prgregset32_t): Likewise.
1337 (prfpregset32_t): Likewise.
1338
bcd823f1
L
13392011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1340
1341 * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
1342 (elf_x86_64_grok_psinfo): Likewise.
1343
a06c7d5a
NC
13442011-06-16 Nick Clifton <nickc@redhat.com>
1345
1346 * elf.c (elf_find_function): Fail if not provided with a symbol
1347 table.
1348
faa9a424
UW
13492011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
1350
1351 * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
1352 * elf.c (elfcore_grok_arm_vfp): New function.
1353 (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
1354 (elfcore_write_arm_vfp): New function.
1355 (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
1356
48f4b4f5
RH
13572011-06-14 Richard Henderson <rth@redhat.com>
1358
1359 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
1360 elf64_alpha_merge_ind_symbols; adjust for the generic interface.
1361 (elf64_alpha_always_size_sections): Don't call
1362 elf64_alpha_merge_ind_symbols.
1363 (elf_backend_copy_indirect_symbol): New.
1364
4d16d575
AM
13652011-06-14 Alan Modra <amodra@gmail.com>
1366
1367 PR ld/12887
1368 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
1369 before doing anything.
1370 (_bfd_elf_discard_section_eh_frame): Likewise.
1371
1e24d83c
AM
13722011-06-14 Alan Modra <amodra@gmail.com>
1373
1374 * Makefile.am: Formatting.
1375 * Makefile.in: Regenerate.
1376 * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
1377 * po/SRC-POTFILES.in: Regnerate.
1378
e4d34ace
AM
13792011-06-14 Alan Modra <amodra@gmail.com>
1380
1381 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
1382 (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
1383 Don't handle warning symbols here.
1384 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
1385 (allocate_dynrelocs, readonly_dynrelocs): As above.
1386
7f6ab9f8
AM
13872011-06-14 Alan Modra <amodra@gmail.com>
1388
1389 PR ld/12851
1390 * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
1391 (elf_gc_sweep): Don't treat debug and sections like .comment
1392 specially here.
1393 (bfd_elf_gc_sections): Treat note sections as gc roots only when
1394 not part of a group. Always call gc_mark_extra_sections.
1395 * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
1396 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
1397 _bfd_elf_gc_mark_extra_sections.
1398 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
1399 _bfd_elf_gc_mark_extra_sections.
1400 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
1401
09d9a62a
NC
14022011-06-13 Nick Clifton <nickc@redhat.com>
1403
1404 * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
1405 variable 'local_got_offsets'.
1406 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1407 (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
1408
aa137e4d
NC
14092011-06-13 Walter Lee <walt@tilera.com>
1410
1411 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
1412 (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
1413 (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
1414 and elfxx-tilegx.lo.
1415 (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
1416 elfxx-tilegx.c.
1417 (BFD64_BACKENDS): Add elf64-tilegx.lo.
1418 (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
1419 * Makefile.in: Regenerate.
1420 * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
1421 bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
1422 (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
1423 (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
1424 bfd-in2.h: Regenerate.
1425 * config.bfd: Handle tilegx-*-* and tilepro-*-*.
1426 * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1427 and bfd_elf64_tilegx_vec.
1428 * configure: Regenerate.
1429 * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
1430 TILEPRO_ELF_DATA.
1431 * libbfd.h: Regenerate.
1432 * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
1433 RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
1434 IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
1435 IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
1436 IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
1437 IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
1438 IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
1439 IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
1440 IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
1441 IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
1442 MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
1443 IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
1444 IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
1445 IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
1446 IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
1447 IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
1448 IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1449 Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
1450 HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
1451 JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
1452 DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
1453 SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
1454 IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
1455 IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
1456 IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
1457 IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
1458 IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
1459 IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
1460 IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
1461 IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
1462 IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
1463 IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
1464 IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
1465 IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
1466 IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
1467 IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
1468 IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
1469 IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
1470 IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
1471 IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
1472 IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
1473 IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
1474 IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
1475 IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
1476 IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
1477 IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
1478 IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
1479 IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
1480 IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
1481 TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1482 * targets.c (bfd_elf32_tilegx_vec): Declare.
1483 (bfd_elf32_tilepro_vec): Declare.
1484 (bfd_elf64_tilegx_vec): Declare.
1485 (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1486 and bfd_elf64_tilegx_vec.
1487 * cpu-tilegx.c: New file.
1488 * cpu-tilepro.c: New file.
1489 * elf32-tilepro.h: New file.
1490 * elf32-tilepro.c: New file.
1491 * elf32-tilegx.c: New file.
1492 * elf32-tilegx.h: New file.
1493 * elf64-tilegx.c: New file.
1494 * elf64-tilegx.h: New file.
1495 * elfxx-tilegx.c: New file.
1496 * elfxx-tilegx.h: New file.
1497
7686d77d
AM
14982011-06-13 Alan Modra <amodra@gmail.com>
1499
1500 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
1501 (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
1502 warning symbols here.
1503 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1504 * elf32-arm.c (allocate_dynrelocs_for_symbol,
1505 elf32_arm_readonly_dynrelocs): Likewise.
1506 * elf32-bfin.c (bfin_discard_copies): Likewise.
1507 * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
1508 elf_cris_discard_excess_dso_dynamics,
1509 elf_cris_discard_excess_program_dynamics): Likewise.
1510 * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
1511 clobber_millicode_symbols, readonly_dynrelocs): Likewise.
1512 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1513 * elf32-i386.c (elf_i386_allocate_dynrelocs,
1514 elf_i386_readonly_dynrelocs): Likewise.
1515 * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1516 * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
1517 * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1518 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1519 * elf32-microblaze.c (allocate_dynrelocs): Likewise.
1520 * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
1521 * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1522 * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
1523 * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
1524 * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1525 * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
1526 elf32_tic6x_readonly_dynrelocs): Likewise.
1527 * elf32-vax.c (elf_vax_discard_copies): Likewise.
1528 * elf32-xstormy16.c (xstormy16_relax_plt_check,
1529 xstormy16_relax_plt_realloc): Likewise.
1530 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
1531 * elf64-alpha.c (elf64_alpha_output_extsym,
1532 elf64_alpha_calc_got_offsets_for_symbol,
1533 elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
1534 * elf64-hppa.c (elf64_hppa_mark_exported_functions,
1535 allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
1536 elf_hppa_unmark_useless_dynamic_symbols,
1537 elf_hppa_remark_useless_dynamic_symbols): Likewise.
1538 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
1539 adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
1540 readonly_dynrelocs, merge_global_got, reallocate_got,
1541 undo_symbol_twiddle): Likewise.
1542 * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1543 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1544 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
1545 elf_x86_64_readonly_dynrelocs): Likewise.
1546 * elflink.c (elf_link_renumber_hash_table_dynsyms,
1547 elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
1548 _bfd_elf_link_find_version_dependencies,
1549 _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
1550 _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
1551 elf_collect_hash_codes, elf_collect_gnu_hash_codes,
1552 elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
1553 elf_gc_propagate_vtable_entries_used,
1554 elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
1555 elf_gc_allocate_got_offsets): Likewise.
1556 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
1557 elfNN_ia64_global_dyn_sym_thunk): Likewise.
1558 * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
1559 mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
1560 * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1561 * i386linux.c (linux_tally_symbols): Likewise.
1562 * m68klinux.c (linux_tally_symbols): Likewise.
1563 * sparclinux.c (linux_tally_symbols): Likewise.
1564 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1565 * xcofflink.c (xcoff_post_gc_symbol): Likewise.
1566
1567 * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
1568 function. Update all callers.
1569 * aoutx.h (aout_link_write_other_symbol): Likewise.
1570 * pdp11.c (aout_link_write_other_symbol): Likewise.
1571 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1572 * ecoff.c (ecoff_link_write_external): Likewise.
1573 * xcofflink.c (xcoff_write_global_symbol): Likewise.
1574 * vms-alpha.c (alpha_vms_link_output_symbol): Likewise. Handle
1575 warning symbols.
1576 * ecoff.c (ecoff_link_hash_traverse): Delete.
1577 * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
1578 _bfd_coff_write_global_sym.
1579 * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
1580 * libcoff.h: Regenerate.
1581
894891db
NC
15822011-06-10 Nick Clifton <nickc@redhat.com>
1583
1584 * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
1585 backend does not provide a function for creating dynamic sections
1586 then fail.
1587 (bfd_elf_final_link): Issue a warning message if a dynamic section
1588 has the SHT_NOTE type.
1589 (bfd_elf_final_link): Do not look for dynamic strings in a section
1590 that does not have the SHT_STRTAB type or the name .dynstr.
1591 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
1592 section is not in the output binary.
1593 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
1594
d17fe7b7
TG
15952011-06-09 Tristan Gingold <gingold@adacore.com>
1596
1597 * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
1598 (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
1599 spaces.
1600
8076289e
TG
16012011-06-09 Tristan Gingold <gingold@adacore.com>
1602
1603 * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
1604
ba85c43e
NC
16052011-06-09 Nick Clifton <nickc@redhat.com>
1606
1607 PR ld/12845
1608 * elf.c (_bfd_elf_init_private_section_data): Add an assertion
1609 that the output section has an allocated bfd_elf_section_data
1610 structure.
1611 * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
1612 symbols in sections that have been removed by garbage collection.
1613
adc7571d
L
16142011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1615
1616 * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
1617 relocations in SEC_DEBUGGING sections when building shared
1618 libraries.
1619
24007750
L
16202011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1621
1622 PR ld/12851
1623 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
1624 (bfd_elf_gc_sections): Also check SHT_NOTE sections.
1625
e79064fe
TG
16262011-06-08 Tristan Gingold <gingold@adacore.com>
1627
1628 * makefile.vms (OBJS): Add elfxx-ia64.obj
1629 Remove vax case.
1630
d3aeb6ee
AM
16312011-06-08 Alan Modra <amodra@gmail.com>
1632
1633 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
1634 * sco5-core.c: Init match_priority field.
1635
2a41f396
AM
16362011-06-08 Alan Modra <amodra@gmail.com>
1637
1638 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
1639 indirect links here.
1640
1d859532
JB
16412011-06-07 Joel Brobecker <brobecker@adacore.com>
1642
1643 * irix-core.c (irix_core_vec): Add match_priority field.
1644
0aabe54e
AM
16452011-06-06 Alan Modra <amodra@gmail.com>
1646
1647 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
1648 Add match_priority.
1649 * configure.in: Bump bfd version.
1650 * elfcode.h (elf_object_p): Delete hacks preventing match of
1651 EM_NONE and ELFOSABI_NONE targets when a better match exists.
1652 * elfxx-target.h (elf_match_priority): Define and use.
1653 * format.c (bfd_check_format_matches): Use target match_priority
1654 to choose best of multiple matching targets. In cases with multiple
1655 matches rerun _bfd_check_format if we don't choose the last match.
1656 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
1657 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
1658 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
1659 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
1660 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
1661 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
1662 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
1663 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
1664 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
1665 * vms-lib.c, * xsym.c: Init match_priority field.
1666 * configure: Regenerate.
1667 * bfd-in2.h: Regenerate.
1668
70b554c9
L
16692011-06-04 H.J. Lu <hongjiu.lu@intel.com>
1670
1671 PR ld/12842
1672 * elfcode.h (elf_object_p): Revert the last change.
1673
d50ec8a7
AM
16742011-06-04 Alan Modra <amodra@gmail.com>
1675
1676 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
1677 return the other arch.
1678 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
1679 target.
1680
164a5cb7
NC
16812011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
1682
1683 PR ld/12682
1684 * hash.c (higher_primer_number): Add more, small, prime numbers.
1685 (bfd_hash_set_default_size): Likewise.
1686
cc643b88
NC
16872011-06-02 Nick Clifton <nickc@redhat.com>
1688
1689 * coff-mcore.c: Fix spelling typo.
1690 * coff-stgo32.c: Likewise.
1691 * elf32-arm.c: Likewise.
1692 * elf32-avr.c: Likewise.
1693 * elf-m68hc1x.c: Likewise.
1694 * elf32-mcore.c: Likewise.
1695 * elf32-mep.c: Likewise.
1696 * elf32-mt.c: Likewise.
1697 * elf32-ppc.c: Likewise.
1698 * elf32-xtensa.c: Likewise.
1699 * elf64-ppc.c: Likewise.
1700 * elfxx-mips.c: Likewise.
1701 * netbsd.h: Likewise.
1702 * nlmcode.h: Likewise.
1703 * vms-alpha.c: Likewise.
1704 * po/bfd.pot: Regenerate.
1705 * po/SRC-POTFILES.in: Regenerate.
1706
4c422395
DD
17072011-06-01 DJ Delorie <dj@redhat.com>
1708
1709 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
1710 * target.c: Likewise.
1711 * configure.in: Likewise.
1712 * configure.in: Regenerate.
1713 * elf32-rx.c: Add elf32-rx-be-ns target.
1714 (rx_elf_object_p): Never allow the be-ns target by default,
1715 only allow it if the user requests it.
1716
4b819e1f
L
17172011-06-01 H.J. Lu <hongjiu.lu@intel.com>
1718
1719 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
1720 relocation in readonly section in a shared object.
1721 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1722
74ce8de7
NC
17232011-05-31 Nick Clifton <nickc@redhat.com>
1724
1725 * archive.c (adjust_relative_path): Fix comment to prevent it
1726 corrupting the auto-generated bfd.h.
1727
63e1a0fc
PB
17282011-05-31 Paul Brook <paul@codesourcery.com>
1729
1730 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
1731 for known functions.
1732 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
1733 symbols.
1734
12352d3f
PB
17352011-05-31 Paul Brook <paul@codesourcery.com>
1736
1737 * elf32-arm.c (arm_stub_is_thumb): Add
1738 arm_stub_long_branch_v4t_thumb_tls_pic.
1739 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
1740 Handle Thumb stubs.
1741
c4948609
NC
17422011-05-27 Nick Clifton <nickc@redhat.com>
1743
1744 PR binutils/12710
1745 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
1746 unable to read a file pointed to by an entry in a thin archive.
1747 (adjust_relative_path): Use lrealpath to canonicalize paths.
1748 Handle the case where the reference path is above the current
1749 path in the directory tree.
1750
6769d501
L
17512011-05-26 H.J. Lu <hongjiu.lu@intel.com>
1752
1753 PR ld/12809
1754 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
1755 R_X86_64_TPOFF64 in executable.
1756
2676a7d9
AM
17572011-05-26 Alan Modra <amodra@gmail.com>
1758
1759 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
1760 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
1761 local_protected comment.
1762
cbe79dfe
TG
17632011-05-25 Tristan Gingold <gingold@adacore.com>
1764
1765 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
1766 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
1767 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
1768 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
1769 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
1770 (elf32-ia64.c): Created from elfnn-ia64.c
1771 (elf64-ia64.c): Likewise.
1772 * elfxx-ia64.h: New file.
1773 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
1774 functions.Includes elfxx-ia64.h.
1775 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
1776 (IA64_HOWTO): Adjust.
1777 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
1778 (elfNN_ia64_reloc_type_lookup): Renames to
1779 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
1780 (elfNN_ia64_reloc_name_lookup): Renames to
1781 ia64_elf_reloc_name_lookup. Make it public.
1782 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
1783 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
1784 public.
1785 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
1786 Move it and make it public. Move prototype to elfxx-ia64.h
1787 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
1788 Move prototype to elfxx-ia64.h
1789 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
1790 (elfNN_ia64_info_to_howto): Adjust calls.
1791 (elfNN_ia64_relax_section): Adjust calls.
1792 (count_dyn_reloc): Fix typo.
1793 (elfNN_ia64_relocate_section): Adjust calls.
1794 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1795 (bfd_elfNN_bfd_reloc_type_lookup)
1796 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
1797 * configure: Regenerate.
1798 * Makefile.in: Regenerate.
1799
1ce74905
DD
18002011-05-23 DJ Delorie <dj@redhat.com>
1801
1802 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
1803 the vma/lma swapping done in elf32_rx_modify_program_headers.
1804
997fbe36
NC
18052011-05-23 Nick Clifton <nickc@redhat.com>
1806
1807 * elf-m10300.c (mn10300_elf_mkobject): New function.
1808 (bfd_elf32_mkobject): Define.
1809
6061a67d
AM
18102011-05-23 Alan Modra <amodra@gmail.com>
1811
1812 * elf-bfd.h: Comment typo fix.
1813 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
1814 struct elf_dyn_relocs throughout.
1815 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
1816
25f53a85
AM
18172011-05-23 Alan Modra <amodra@gmail.com>
1818
1819 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
1820 functions rather than warning callback or _bfd_error_handler.
1821 * elf32-ppc.c: Likewise.
1822 * elf64-ppc.c: Likewise.
1823 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
1824 arg error.
1825 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1826
6de6a7fe
AM
18272011-05-23 Alan Modra <amodra@gmail.com>
1828
1829 PR 12763
1830 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
1831 .tbss, and page align same for all SHT_NOBITS sections.
1832
86b2281f
AM
18332011-05-21 Alan Modra <amodra@gmail.com>
1834
1835 PR 12763
1836 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
1837 from PT_TLS header.
1838 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
1839 segment if just for .tbss.
1840 (assign_file_positions_for_load_sections): Don't report "can't
1841 allocate in segment" errors for .tbss.
1842 (assign_file_positions_for_non_load_sections): Don't set p_filesz
1843 from SHT_NOBITS section filepos.
1844
4a732032
BS
18452011-05-20 Bernd Schmidt <bernds@codesourcery.com>
1846
1847 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
1848 R_C6000_PCR_H16 and R_C6000_PCR_L16.
1849 (elf32_tic6x_relocate_section): Handle them.
1850
dd98f8d2
NC
18512011-05-18 Nick Clifton <nickc@redhat.com>
1852
1853 PR ld/12761
1854 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
1855 sections when building shared libraries.
1856
9c489990
NC
18572011-05-18 Rafał Krypa <r.krypa@samsung.com>
1858
1859 PR ld/12778
1860 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
1861 reloc pointer.
1862
5ccfed9b
TG
18632011-05-18 Tristan Gingold <gingold@adacore.com>
1864
1865 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
1866 (xcoff_sweep): Always keep dwarf sections.
1867 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
1868
85645aed
TG
18692011-05-18 Tristan Gingold <gingold@adacore.com>
1870
1871 * libxcoff.h (struct xcoff_dwsect_name): New type.
1872 (XCOFF_DWSECT_NBR_NAMES): New macro.
1873 (xcoff_dwsect_names): Declare.
1874 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
1875 (styp_to_sec_flags): Ditto.
1876 (coff_new_section_hook): Ditto.
1877 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
1878 * coff-rs6000.c (xcoff_dwsect_name): New variable.
1879
84bff83f
NC
18802011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
1881
1882 PR ld/12759
1883 * elf32-rx.c (ignore_lma): New variable.
1884 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
1885 (rx_modify_program_headers): Only copy the LMA into the VMA if
1886 ignore_lma is true.
1887
16d96b5b
AM
18882011-05-17 Alan Modra <amodra@gmail.com>
1889
1890 PR ld/12760
1891 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
1892 * elflink.c (elf_link_add_object_symbols): Likewise.
1893 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1894
41e04eaa
AM
18952011-05-16 Alan Modra <amodra@gmail.com>
1896
1897 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
1898
77c56f44
RS
18992011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
1900
1901 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
1902 global GOT entries for GOT_PAGE relocations against global symbols.
1903
2a616379
BS
19042011-05-13 Bernd Schmidt <bernds@codesourcery.com>
1905
1906 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
1907 (tic6x-*-*): Replaced by these.
1908 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
1909 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
1910 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
1911 Define.
1912 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
1913 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
1914 "elf32-target.h" two more times.
1915 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
1916 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
1917 bfd_elf32_tic6x_elf_le_vec.
1918 * configure: Regenerate.
1919
3ac5406b
JB
19202011-05-13 Jan Beulich <jbeulich@novell.com>
1921
1922 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
1923
335e41d4
JK
19242011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1925
1926 * config.in: Regenerated.
1927 * configure: Regenerated.
1928 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
1929 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
1930 HAVE_PSINFO32_T_PR_PID.
1931 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
1932 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
1933 and HAVE_PSINFO32_T_PR_PID.
1934 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
1935
bc989cdc
JK
19362011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1937
1938 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
1939 32bit psinfo.
1940 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
1941 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
1942
fbd9ad90
PB
19432011-05-09 Paul Brook <paul@codesourcery.com>
1944
1945 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
1946 * bfd-in2.h: Regenerate.
1947 * elf32-tic6x.c: Include limits.h.
1948 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
1949 _tic6x_elf_section_data): New.
1950 (elf32_tic6x_section_data): Define.
1951 (elf32_tic6x_new_section_hook): Allocate target specific data.
1952 (elf32_tic6x_add_unwind_table_edit): New function.
1953 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
1954 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
1955 elf32_tic6x_copy_exidx_entry): New functions.
1956 (elf_backend_write_section): Define.
1957
1bce6bd8
PB
19582011-05-09 Paul Brook <paul@codesourcery.com>
1959
1960 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
1961 elf32_tic6x_fake_sections): New functions.
1962 (elf_backend_fake_sections): Define.
1963
9cf0e282
PB
19642011-05-09 Paul Brook <paul@codesourcery.com>
1965
1966 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
1967 (elf_backend_gc_mark_extra_sections): Define.
1968
730035f7
DK
19692011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1970
1971 PR ld/12365
1972 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
1973 references to symbols defined in discarded sections.
1974
88e59394
DK
19752011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1976
1977 PR ld/12365
1978 * coffgen.c (coff_write_symbol): Assume input section is its own
1979 output section if output_section member not set.
1980 (coff_write_alien_symbol): Likewise.
1981
310fd250
L
19822011-05-07 H.J. Lu <hongjiu.lu@intel.com>
1983
1984 PR ld/12730
1985 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
1986
1987 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
41e04eaa 1988 sections if needed.
310fd250
L
1989
1990 * section.c (SEC_ELF_REVERSE_COPY): New.
1991 * bfd-in2.h: Regenerated.
1992
70778fc7
AM
19932011-05-07 Anders Kaseorg <andersk@ksplice.com>
1994
1995 PR 12739
1996 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
1997 * bfd-in2.h: Regenerate.
1998
8185f55c
TG
19992011-05-06 Tristan Gingold <gingold@adacore.com>
2000
2001 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
2002 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
2003 any code section. Add comments.
2004 (alpha_vms_object_p): Use void * instead of PTR.
2005 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
2006 (build_module_list): Guard against no DST section. Add comments.
2007 (alpha_vms_link_output_symbol): Discard undefined symbols.
2008 (alpha_vms_get_section_contents): Simply memcpy if the section was
2009 already loaded. Fix typo.
2010 (vms_new_section_hook): Use void * instead of PTR.
2011 (vms_alpha_vec): Ditto.
2012
7d24e6a6
RS
20132011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
2014
2015 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
2016 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
2017
c6a8f6e0
BS
20182011-05-05 Bernd Schmidt <bernds@codesourcery.com>
2019
2020 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
2021 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
2022 mismatch. Choose the lower of the two values.
2023 (bfd_elf32_bfd_final_link): New macro.
2024
7f41df2e
TG
20252011-04-28 Tristan Gingold <gingold@adacore.com>
2026
2027 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
2028 (bfd_xcoff_swap_aux_out): Ditto.
2029 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
2030 (bfd_xcoff64_swap_aux_out): Ditto.
2031
9507a174
AM
20322011-05-04 Alan Modra <amodra@gmail.com>
2033
2034 PR ld/12727
2035 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
2036 was_undefined on dot-symbols.
2037
2fbb87f6
PB
20382011-05-03 Paul Brook <paul@codesourcery.com>
2039
2040
2041 * elf32-tic6x.c (elf32_tic6x_howto_table,
2042 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
2043 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
2044 Add R_C6000_EHTYPE.
2045
9d4057ee
AM
20462011-05-01 Alan Modra <amodra@gmail.com>
2047
2048 PR ld/12718
2049 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
2050 creating ifunc sections.
2051 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2052
71e7aa7d
L
20532011-04-30 H.J. Lu <hongjiu.lu@intel.com>
2054
2055 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
2056 names.
2057
b5dee4ea
TT
20582011-04-28 Tom Tromey <tromey@redhat.com>
2059
2060 * bfdio.c (memory_bstat): Pass correct size to memset.
2061
e4c93b56
MF
20622011-04-28 Mike Frysinger <vapier@gentoo.org>
2063
2064 * dwarf2.c (dwarf_debug_sections): Mark const.
2065 * elf.c (special_sections): Likewise.
2066 * libbfd-in.h (dwarf_debug_sections): Likewise.
2067 * libbfd.h: Regenerate.
2068
72b016b4
NC
20692011-04-26 Kai Tietz <ktietz@redhat.com>
2070
2071 * coffcode.h (sec_to_styp_flags): Allow linkonce for
2072 debugging sections.
2073
4964e065
TG
20742011-04-26 Tristan Gingold <gingold@adacore.com>
2075
2076 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
2077
35ed3f94
AM
20782011-04-24 Alan Modra <amodra@gmail.com>
2079
2080 PR ld/12365
2081 PR ld/12696
2082 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
2083 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
2084 (_bfd_generic_link_add_one_symbol): Update "notice" call.
2085 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
2086 it is a redef of an IR symbol in a real BFD.
2087
b70321a2
L
20882011-04-22 H.J. Lu <hongjiu.lu@intel.com>
2089
2090 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
2091 in readonly section in a shared object.
2092 (elf_i386_size_dynamic_sections): Likewise.
2093 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2094 (elf_x86_64_size_dynamic_sections): Likewise.
2095
aa715242
L
20962011-04-21 H.J. Lu <hongjiu.lu@intel.com>
2097
2098 PR ld/12694
2099 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
2100 symbols.
2101 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2102
f6df62c8
L
21032011-04-21 H.J. Lu <hongjiu.lu@intel.com>
2104
2105 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
2106 on dynamic symbol error.
2107 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2108
4bbd5a24
TG
21092011-04-20 Tristan Gingold <gingold@adacore.com>
2110
2111 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
2112
8ad17b3a
AM
21132011-04-20 Alan Modra <amodra@gmail.com>
2114
2115 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
2116 (bfd_hash_table_init_n): Overflow checking.
2117 (bfd_hash_set_default_size): Return current size. Take unsigned long
2118 arg. Add 65537 to hash_size primes.
2119 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
2120 * bfd-in2.h: Regenerate.
2121
1b0df531
JK
21222011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2123
2124 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
2125 memmove elements.
2126
595213d4
AM
21272011-04-20 Alan Modra <amodra@gmail.com>
2128
9e6619e2
AM
2129 * libbfd.c (bfd_log2): Do return rounded up value.
2130 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
2131 call with expanded old round down version of the function.
2132
595213d4
AM
2133 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
2134 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
2135
02d00247
AM
21362011-04-20 Alan Modra <amodra@gmail.com>
2137
2138 PR ld/12365
2139 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
2140 in their own common section.
2141 * elflink.c (elf_link_add_object_symbols): Likewise.
2142 * linker.c (generic_link_check_archive_element): Don't lose flags
2143 if common section is pre-existing.
2144 (_bfd_generic_link_add_one_symbol): Likewise.
2145
24f58f47
AM
21462011-04-20 Alan Modra <amodra@gmail.com>
2147
2148 PR ld/12365
2149 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
2150 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
2151 multiple_definition regardless of allow_multiple_definition.
2152 * simple.c (simple_dummy_multiple_definition): Update.
2153 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
2154 calls.
2155
417236c0
TG
21562011-04-18 Tristan Gingold <gingold@adacore.com>
2157
2158 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
2159
901f1d17
AM
21602011-04-18 Alan Modra <amodra@gmail.com>
2161
2162 PR ld/12365
2163 PR ld/12672
2164 * bfd.c (BFD_PLUGIN): Define.
2165 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
2166 * bfd-in2.h: Regenerate.
2167 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
2168 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
2169
63524580
JK
21702011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2171
2172 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
2173 SEC_LOAD.
2174
e21e5835
NC
21752011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
2176
2177 * elf-bfd.h (struct sdt_note): New struct.
2178 (struct elf_obj_tdata) <sdt_note_head>: New field.
2179 * elf.c (elfobj_grok_stapsdt_note_1): New function.
2180 (elfobj_grok_stapsdt_note): Likewise.
2181 (elf_parse_notes): Added code to treat SystemTap note
2182 sections.
2183
6452a567
RH
21842011-04-12 Richard Henderson <rth@redhat.com>
2185
2186 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
2187 exclude empty .got sections.
2188
2a750708
L
21892011-04-11 H.J. Lu <hongjiu.lu@intel.com>
2190
2191 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
2192 array access for BFD_RELOC_386_IRELATIVE.
2193
2123f9ad
BS
21942011-04-11 Bernd Schmidt <bernds@codesourcery.com>
2195
2196 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
2197
f64b2e8d
NC
21982011-04-11 Mark Wielaard <mjw@redhat.com>
2199
2200 PR 10549
2201 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
2202 (has_gnu_symbols): Renamed from has_ifunc_symbols.
2203 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
2204 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
2205 also if STB_GNU_UNIQUE symbol binding was seen.
2206 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
2207 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2208 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2209 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2210 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2211 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
2212
e57278ef
AM
22132011-04-11 Alan Modra <amodra@gmail.com>
2214
2215 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
2216 sections.
2217 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
2218 (_bfd_generic_get_section_contents_in_window): Likewise.
2219 * section.c (bfd_get_section_contents): Likewise.
2220 * compress.c (bfd_get_full_section_contents): Likewise.
2221 * elf32-rx.c (rx_final_link): Ignore rawsize.
2222 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
2223 bfd with bfd_get_section_limit.
2224 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
2225 os->size during final link. Update callers.
2226 * bfd-in2.h: Regenerate.
2227
e2ece73c
RS
22282011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
2229
2230 PR ld/12637
2231 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
2232 as the number of global entries when merging with the primary GOT.
2233
9f973f28
L
22342011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2235
2236 * elf32-i386.c: Update copyright year.
2237 * elf64-x86-64.c: Likewise.
2238
21e68916
KT
22392011-04-09 Kai Tietz <ktietz@redhat.com>
2240
2241 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
2242 buffer and use rawsize for sorting.
2243 * coffcode.h (coff_compute_section_file_positions): Set rawsize
2244 before doing alignment.
2245
62d78908
L
22462011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2247
2248 * elf32-i386.c (elf_i386_relocate_section): Return relocation
2249 error on unsupported relocation.
2250 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2251
2351cae0
L
22522011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2253
2254 PR binutils/12657
2255 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
2256 pid_t.
2257
959b0961
L
22582011-04-08 H.J. Lu <hongjiu.lu@intel.com>
2259
2260 PR ld/12654
2261 * elf32-i386.c (elf_i386_relocate_section): Check !executable
2262 instead of shared for R_386_TLS_LDO_32.
2263
33b54431
TG
22642011-04-08 Tristan Gingold <gingold@adacore.com>
2265
2266 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
2267 * coff-pmac: Remove
2268 * xcoff-target.h: Remove
2269 * Makefile.in: Regenerate.
2270
5d8e6b4d
CC
22712011-04-07 Cary Coutant <ccoutant@google.com>
2272
2273 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
2274
44e87ece 22752011-04-07 Paul Brook <paul@codesourcery.com>
33b54431 2276
44e87ece
PB
2277 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
2278 pc-relative.
2279 (elf32_tic6x_howto_table_rel): Ditto.
2280 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
2281 (elf32_tic6x_check_relocs): Ditto.
2282
8c5fc800
JM
22832011-04-06 Joseph Myers <joseph@codesourcery.com>
2284
2285 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
2286 targets.
2287 (strongarm*, thumb*, xscale*): Remove architectures.
2288 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
2289 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
2290 xscale-*-coff): Remove targets.
2291
6f8027ae
TG
22922011-04-01 Tristan Gingold <gingold@adacore.com>
2293
2294 * elfxx-ia64.c: include bfd_stdint.h
2295
c89ce65c
JK
22962011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2297
2298 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
2299 dynobj and its initialization.
2300
545f57c6
TG
23012011-03-31 Tristan Gingold <gingold@adacore.com>
2302
2303 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
2304 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
2305 BFD_HOST_LONG_LONG to 1.
2306
083faca9
TG
23072011-03-31 Tristan Gingold <gingold@adacore.com>
2308
2309 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
2310 (_bfd_vms_write_etir): Ditto.
2311 (_bfd_vms_slurp_etir): Avoid to use intptr_t
2312 * configure.com: Generate bfd_stdint.h
2313
ac145307
BS
23142011-03-31 Bernd Schmidt <bernds@codesourcery.com>
2315
2316 * elf32-tic6x.h (struct elf32_tic6x_params): New.
2317 (elf32_tic6x_setup): Declare.
2318 * elf32-tic6x.c: Include <limits.h>.
2319 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
2320 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
2321 New structures.
2322 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
2323 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
2324 tic6x_elf_scom_symbol_ptr): New static variables.
2325 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
2326 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
2327 R_C6000_PCR_H16 and R_C6000_PCR_L16.
2328 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
2329 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
2330 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
2331 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
2332 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
2333 elf32_tic6x_adjust_dynamic_symbol): New static functions.
2334 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
2335 to weak symbols as required by the ABI.
2336 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
2337 as needed when generating DSBT output.
2338 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
2339 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
2340 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
2341 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
2342 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
2343 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
2344 New static functions.
2345 (ELF_MAXPAGESIZE): Define to 0x1000.
2346 (bfd_elf32_bfd_copy_private_bfd_data,
2347 bfd_elf32_bfd_link_hash_table_create,
2348 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
2349 elf_backend_want_got_plt, elf_backend_want_dynbss,
2350 elf_backend_plt_readonly, elf_backend_got_header_size,
2351 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
2352 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
2353 elf_backend_check_relocs, elf_backend_add_symbol_hook,
2354 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
2355 elf_backend_section_from_bfd_section,
2356 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
2357 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
2358 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
2359
2360 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
2361 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
2362 * bfd/bfd-in2.h: Regenerate.
2363 * bfd/libbfd.h: Regenerate.
2364 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
2365
53dd76d3
TG
23662011-03-31 Tristan Gingold <gingold@adacore.com>
2367
2368 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
2369 entry on xcoff when value is C_NULL_VALUE.
2370
23712011-03-31 Tristan Gingold <gingold@adacore.com>
2040caca
TG
2372
2373 * libcoff-in.h (exec_hdr): Remove.
2374 * libcoff.h: Regenerate.
2375
3a294fa7
NC
23762011-03-30 Nick Clifton <nickc@redhat.com>
2377
2378 * po/da.po: Updated Danish translation.
2379
e117360e
RH
23802011-03-29 Richard Henderson <rth@redhat.com>
2381
2382 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
2383 (elf64_alpha_gc_sweep_hook): New.
2384 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
2385 (elf_backend_can_gc_sections): New.
2386
5b806d27
NC
23872011-03-26 John Marino <binutils@marino.st>
2388
2389 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
2390 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
2391 * configure: Regenerate.
2392
b42adabf
NC
23932011-03-25 Michael Snyder <msnyder@vmware.com>
2394
2395 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
2396
a283ff93
TG
23972011-03-25 Tristan Gingold <gingold@adacore.com>
2398
2399 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
2400 of find_nearest_line on object files.
2401
cf6b8767
TG
24022011-03-25 Tristan Gingold <gingold@adacore.com>
2403
2404 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
2405 Minor reordering.
2406 (alpha_vms_create_eisd_for_section): Make code sections read-only.
2407
663a1470
AM
24082011-03-24 Alan Modra <amodra@gmail.com>
2409
2410 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
2411 old-style __tls_get_addr calls without marker relocs don't match
2412 their arg setup insn one for one. If such mismatches are found
2413 report the reloc and don't do any tls optimization.
2414 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2415
dc80f6ae
EW
24162011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2417
2418 * bfd-in2.h: Regenerate.
2419
8cc66334
EW
24202011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2421
2422 * archures.c: Add AVR XMEGA architecture information.
2423 * cpu-avr.c (arch_info_struct): Likewise.
2424 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
2425 (elf32_avr_object_p): Likewise.
2426
34e77a92
RS
24272011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2428
2429 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
2430 * bfd-in2.h: Regenerate.
2431 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
2432 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
2433 entry.
2434 (elf32_arm_howto_from_type): Update accordingly.
2435 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
2436 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
2437 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
2438 with an extra noncall_refcount field.
2439 (arm_local_iplt_info): New structure.
2440 (elf_arm_obj_tdata): Add local_iplt.
2441 (elf32_arm_local_iplt): New accessor macro.
2442 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
2443 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
2444 Change tls_type to a bitfield and add is_iplt.
2445 (elf32_arm_link_hash_newfunc): Update accordingly.
2446 (elf32_arm_allocate_local_sym_info): New function.
2447 (elf32_arm_create_local_iplt): Likewise.
2448 (elf32_arm_get_plt_info): Likewise.
2449 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
2450 (elf32_arm_get_local_dynreloc_list): Likewise.
2451 (create_ifunc_sections): Likewise.
2452 (elf32_arm_copy_indirect_symbol): Update after the changes to
2453 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
2454 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
2455 to get PLT information. Assert that all STT_GNU_IFUNC references
2456 are turned into PLT references.
2457 (arm_build_one_stub): Pass the symbol type to
2458 elf32_arm_final_link_relocate.
2459 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
2460 (elf32_arm_allocate_irelocs): New function.
2461 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
2462 all R_ARM_IRELATIVE.
2463 (elf32_arm_allocate_plt_entry): New function.
2464 (elf32_arm_populate_plt_entry): Likewise.
2465 (elf32_arm_final_link_relocate): Add an st_type parameter.
2466 Set srelgot to null for static objects. Use separate variables
2467 to record which st_value and st_type should be used when generating
2468 a dynamic relocation. Use elf32_arm_get_plt_info to find the
2469 symbol's PLT information, setting has_iplt_entry, splt,
2470 plt_offset and gotplt_offset accordingly. Check whether
2471 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
2472 the relocation target accordingly. Broaden assert to include
2473 .iplts. Don't set sreloc for static relocations. Assert that
2474 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
2475 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
2476 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
2477 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
2478 resolve GOT references to the .igot.plt entry.
2479 (elf32_arm_relocate_section): Update the call to
2480 elf32_arm_final_link_relocate.
2481 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
2482 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
2483 relocations in shared libraries and relocatable executables.
2484 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2485 to get the list of dynamic relocations for a local symbol.
2486 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
2487 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
2488 to allocate local symbol information. Treat R_ARM_REL32 and
2489 R_ARM_REL32_NOI as call relocations in shared libraries and
2490 relocatable executables. Record PLT information for local
2491 STT_GNU_IFUNC functions as well as global functions. Count
2492 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2493 to get the list of dynamic relocations for a local symbol.
2494 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
2495 Don't remove STT_GNU_IFUNC PLTs unless all references have been
2496 removed. Update after the changes to elf32_arm_link_hash_entry.
2497 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
2498 entries should live in .plt or .iplt. Check whether the .igot.plt
2499 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
2500 to allocate .plt and .(i)got.plt entries. Detect which .got
2501 entries will need R_ARM_IRELATIVE relocations and use
2502 elf32_arm_allocate_irelocs to allocate them. Likewise other
2503 non-.got dynamic relocations.
2504 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
2505 and dynamic relocations for local STT_GNU_IFUNC symbols.
2506 Check whether the .igot.plt and .got entries can be combined.
2507 Detect which .got entries will need R_ARM_IRELATIVE relocations
2508 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
2509 section pointers intead of strcmp checks. Handle iplt and igotplt.
2510 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
2511 to fill in .plt, .got.plt and .rel(a).plt entries. Point
2512 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
2513 resolve to it.
2514 (elf32_arm_output_plt_map_1): New function, split out from
2515 elf32_arm_output_plt_map. Handle .iplt entries. Use
2516 elf32_arm_plt_needs_thumb_stub_p.
2517 (elf32_arm_output_plt_map): Call it.
2518 (elf32_arm_output_arch_local_syms): Add mapping symbols for
2519 local .iplt entries.
2520 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
2521 (elf32_arm_swap_symbol_out): Likewise.
2522 (elf32_arm_add_symbol_hook): New function.
2523 (elf_backend_add_symbol_hook): Define for all targets.
2524
35fc36a8
RS
25252011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2526
2527 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
2528 * elf.c (swap_out_syms): Set st_target_internal for each
2529 Elf_Internal_Sym.
2530 * elfcode.h (elf_swap_symbol_in): Likewise.
2531 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
2532 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
2533 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2534 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2535 * elflink.c (elf_link_output_extsym): Likewise.
2536 (bfd_elf_final_link): Likewise.
2537 (elf_link_add_object_symbols): Copy st_target_internal
2538 to the hash table if we see a definition.
2539 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
2540 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
2541 a branch_type field.
2542 (a8_erratum_fix, a8_erratum_reloc): Likewise.
2543 (arm_type_of_stub): Replace actual_st_type with an
2544 actual_branch_type parameter.
2545 (arm_build_one_stub): Use branch types rather than st_types to
2546 determine the type of branch.
2547 (cortex_a8_erratum_scan): Likewise.
2548 (elf32_arm_size_stubs): Likewise.
2549 (bfd_elf32_arm_process_before_allocation): Likewise.
2550 (allocate_dynrelocs_for_symbol): Likewise.
2551 (elf32_arm_finish_dynamic_sections): Likewise.
2552 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
2553 a branch_type parameter.
2554 (elf32_arm_relocate_section): Update call accordingly.
2555 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
2556 (elf32_arm_output_map_sym): Initialize st_target_internal.
2557 (elf32_arm_output_stub_sym): Likewise.
2558 (elf32_arm_symbol_processing): Delete.
2559 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
2560 Use st_target_internal to record the branch type.
2561 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
2562 Thumb functions.
2563 (elf32_arm_is_function_type): Delete.
2564 (elf_backend_symbol_processing): Likewise.
2565 (elf_backend_is_function_type): Likewise.
2566
cbc704f3
RS
25672011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2568
2569 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
2570 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
2571 into the PLT block.
2572
f6e32f6d
RS
25732011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2574
2575 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
2576 may_need_local_target_p and may_become_dynamic_p to classify
2577 the relocation type. Don't check info->symbolic or h->def_regular
2578 when deciding whether to record a potential dynamic reloc.
2579 Don't treat potential dynamic relocs as PLT references.
2580 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
2581 try to make the PLT reference count go negative.
2582
b436d854
RS
25832011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2584
2585 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
2586 GOT entry here, rather than leaving it to finish_dynamic_symbol.
2587 Only create a dynamic relocation for local references if
2588 info->shared.
2589 (allocate_dynrelocs_for_symbol): Update dynamic relocation
2590 allocation accordingly.
2591 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
2592
47beaa6a
RS
25932011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2594
2595 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
2596 (elf32_arm_add_dynreloc): Likewise.
2597 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
2598 to allocate dynamic relocations.
2599 (elf32_arm_size_dynamic_sections): Likewise.
2600 (allocate_dynrelocs): Likewise. Rename to
2601 allocate_dynrelocs_for_symbol.
2602 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
2603 create dynamic relocations.
2604 (elf32_arm_finish_dynamic_symbol): Likewise.
2605
52bc799a
L
26062011-03-12 H.J. Lu <hongjiu.lu@intel.com>
2607
2608 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2609 x32 GD->IE and GD->LE transitions.
2610 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
2611 and LD->LE transitions.
2612
e11840f9
AM
26132011-03-10 Alan Modra <amodra@gmail.com>
2614
2615 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
2616 for LO_DS error message and correct multiple.
2617
aa374f67
AM
26182011-03-10 Alan Modra <amodra@gmail.com>
2619
2620 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
2621 (ppc64_elf_link_just_syms): New function.
2622 (opd_entry_value): Don't assume big-endian host.
2623 (get_r2off): New function.
2624 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
2625
d59a60e9
MS
26262011-03-06 Michael Snyder <msnyder@vmware.com>
2627
4281caad
MS
2628 * compress.c (bfd_compress_section_contents): Check for out of mem.
2629
17672001
MS
2630 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
2631 that case statement falls through intentionally.
2632
d59a60e9
MS
2633 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
2634
0e29e6e8
AM
26352011-03-04 Alan Modra <amodra@gmail.com>
2636
2637 * archive.c (bsd_write_armap): Don't call stat in deterministic
2638 mode, and don't use st_mtime if stat returns error.
2639
eb00922a
MS
26402011-03-03 Michael Snyder <msnyder@vmware.com>
2641
08c13595
MS
2642 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
2643
d543c50d
MS
2644 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
2645
c38eb2a6
MS
2646 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
2647 (aout_link_write_other_symbol): Missing break statement.
2648
8ecc1f20
MS
2649 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
2650
eb00922a
MS
2651 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
2652
4a4c5f25
L
26532011-03-03 H.J. Lu <hongjiu.lu@intel.com>
2654
2655 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2656 x32 IE->LE transition.
2657 (elf_x86_64_relocate_section): Likewise.
2658
ddcf1fcf
BS
26592011-03-02 Bernd Schmidt <bernds@codesourcery.com>
2660
aa374f67
AM
2661 * elflink.c (is_reloc_section): Remove function.
2662 (get_dynamic_reloc_section_name): Construct string manually.
ddcf1fcf 2663
007d6189
KT
26642011-02-28 Kai Tietz <kai.tietz@onevision.com>
2665
2666 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
2667 (adjust_relative_path): Likewise.
2668 (_bfd_construct_extended_name_table): Likewise.
2669 * corefile.c (generic_core_file_matches_executable_p): Likewise.
2670 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2671 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2672 * elf32-spu.c (sort_bfds): Likewise.
2673 (spu_elf_auto_overlay): Likewise.
2674 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2675 * xcofflink.c (xcoff_set_import_path): Likewise.
2676 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
2677 (xtensa_regfile_lookup_shortname): Likewise.
2678
8616ad89
AM
26792011-02-28 Alan Modra <amodra@gmail.com>
2680
2681 PR 12513
2682 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
2683 stringsize. Properly sanity check symdef_count. Remove redundant
2684 bfd_release.
2685
80549d04
RÁE
26862011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
2687
2688 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
2689 and handle claim_file seeking. Only try to load the plugin once.
2690
93b3ac75
AS
26912011-02-22 Andreas Schwab <schwab@redhat.com>
2692
2693 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
2694 relocation read the value from the second GOT slot.
2695
6fa052f0
TG
26962011-02-15 Tristan Gingold <gingold@adacore.com>
2697
2698 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
2699
28be611c
AM
27002011-02-15 Alan Modra <amodra@gmail.com>
2701
2702 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
2703 toc relocs. Fuss over free(NULL).
2704
93252b1c
MF
27052011-02-14 Mike Frysinger <vapier@gentoo.org>
2706
2707 * elflink.c (bfd_elf_size_dynamic_sections): Add
2708 bfd_get_symbol_leading_char to the start of newname.
2709
822ce8ee
RW
27102011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2711
2712 * configure: Regenerate.
2713
425b145b
AM
27142011-02-09 Alan Modra <amodra@gmail.com>
2715
2716 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
2717 we are done. When optimising large toc, check that a global
2718 symbol on a toc reloc is defined in a kept section.
2719
82f2dbf7
NC
27202011-02-08 Nick Clifton <nickc@redhat.com>
2721
2722 PR binutils/12467
2723 * elf.c (assign_file_positions_for_load_sections): Set the program
2724 header offset and entry size to zero if there are no program
2725 headers.
2726
df22d223
AM
27272011-02-08 Alan Modra <amodra@gmail.com>
2728
2729 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
2730 local_syms when looking for local symbols in .toc.
2731
6683a28d
AM
27322011-02-01 Alan Modra <amodra@gmail.com>
2733
2734 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
2735 for toc pointer on any section having makes_toc_func_call set.
2736 (check_pasted_section): Ensure pasted .init/.fini fragments use
2737 the same toc if any has makes_toc_func_call set.
2738
5240d94d
JM
27392011-01-28 Joseph Myers <joseph@codesourcery.com>
2740
2741 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
2742 field.
2743
ed88c97e
RS
27442011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
2745
2746 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
2747 common sections too.
2748
1a0c107f
L
27492011-01-18 H.J. Lu <hongjiu.lu@intel.com>
2750
04449d86
L
2751 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
2752 Solaris target.
1a0c107f 2753
d68cd58c
NC
27542011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
2755
2756 Fix compilation for mingw64.
2757 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
2758 typecast to avoid warning.
2759 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
2760 usage.
2761 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
2762 of long for pointer to avoid warning.
2763 (elfNN_ia64_relax_brl): Idem.
2764 (elfNN_ia64_install_value): Idem.
2765 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
2766
da17376b
RS
27672011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2768
2769 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
2770 h->needs_plt when deciding whether to record a possible dynamic reloc.
2771
1e81e12b
RS
27722011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2773
2774 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
2775 dynamic relocs for the removed section.
2776
d1534d16
L
27772011-01-15 H.J. Lu <hongjiu.lu@intel.com>
2778
2779 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
2780 relocations.
2781
248775ba
L
27822011-01-14 H.J. Lu <hongjiu.lu@intel.com>
2783
2784 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
2785 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
2786 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
2787 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
2788 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
2789 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
2790 for ILP32.
2791
4a97a0e5
AM
27922011-01-14 Alan Modra <amodra@gmail.com>
2793
2794 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
2795 error.
2796 (_bfd_default_error_handler): Likewise.
2797 * elf.c (print_segment_map): Likewise.
2798 * libbfd.c (warn_deprecated): Likewise.
2799 * som.c (som_sizeof_headers): No need to do so here.
2800 * coff-i860.c: Replace use of printf for error messages with
2801 _bfd_error_handler.
2802 * coff-ppc.c: Likewise.
2803 * coff-sh.c: Likewise.
2804 * elf32-bfin.c: Likewise.
2805 * elf32-dlx.c: Likewise.
2806 * elf32-mep.c: Likewise.
2807 * elf32-v850.c: Likewise.
2808 * mach-o.c: Likewise.
2809 * pef.c: Likewise.
2810
82e96e07
L
28112011-01-13 H.J. Lu <hongjiu.lu@intel.com>
2812
2813 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
2814 swap_reloca_out.
2815 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
2816 (elf_x86_64_check_relocs): Align relocation section to 4 byte
2817 for 32bit.
2818 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
2819 ELF_ST_TYPE.
2820 (elf_x86_64_finish_dynamic_symbol): Updated.
2821 (elf_x86_64_finish_dynamic_sections): Don't use
2822 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
2823 bfd_elf64_swap_dyn_out.
2824
e6a6bb22
AM
28252011-01-14 J. Park <grassman@gmail.com>
2826
2827 PR ld/12339
2828 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
2829 following bfd_link_hash_warning symbol link.
2830
0855e32b
NS
28312011-01-10 Nathan Sidwell <nathan@codesourcery.com>
2832 Glauber de Oliveira Costa <glommer@gmail.com>
2833
2834 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
2835 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
2836 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
2837 relocations.
2838 * libbfd.h: Rebuilt.
2839 * bfd-in2.h: Rebuilt.
2840 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
2841 (elf32_arm_reloc_map): Likewise.
2842 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
2843 (elf32_arm_stub_long_branch_any_tls_pic,
2844 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
2845 (DEF_STUBS): Add new stubs.
2846 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
2847 (elf32_arm_local_tlsdesc_gotent): New.
2848 (GOT_TLS_GDESC): New mask.
2849 (GOT_TLS_GD_ANY): Define.
2850 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
2851 (elf32_arm_compute_jump_table_size): New.
2852 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
2853 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
2854 sgotplt_jump_table_size fields.
2855 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
2856 (elf32_arm_link_hash_table_create): Initialize new fields.
2857 (arm_type_of_stub): Check TLS desc relocs too.
2858 (elf32_arm_stub_name): TLS desc relocs can be shared.
2859 (elf32_arm_tls_transition): Determine relaxation.
2860 (arm_stub_required_alignment): Add tls stubs.
2861 (elf32_arm_size_stubs): Likewise.
2862 (elf32_arm_tls_relax): Perform TLS relaxing.
2863 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
2864 (IS_ARM_TLS_GNU_RELOC): New.
2865 (IS_ARM_TLS_RELOC): Use it.
2866 (elf32_arm_relocate_section): Perform TLS relaxing.
2867 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
2868 desc relocations.
2869 (allocate_dynrelocs): Allocate tls desc relcoations.
2870 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
2871 symbols.
2872 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
2873 got slots.
2874 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
2875 symbol.
2876 (elf32_arm_finish_dynamic_symbol): Adjust.
2877 (arm_put_trampoline): New.
2878 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
2879 trampolines.
2880 (elf_backend_always_size_sections): Define.
2881
7be86737
L
28822011-01-06 H.J. Lu <hongjiu.lu@intel.com>
2883
2884 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
2885
ae428b57 28862011-01-06 H.J. Lu <hongjiu.lu@intel.com>
3db2e7dd
L
2887
2888 PR ld/12366
2889 PR ld/12371
2890 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
2891 handle symbols marked with regular reference, but not non-GOT
2892 reference when building shared library.
2893
2894 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
2895 local and global STT_GNU_IFUNC symols when building shared
2896 library.
2897 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
2898
9689e3a3
DD
28992011-01-05 DJ Delorie <dj@redhat.com>
2900
2901 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
2902 * libbfd.h: Regenerate.
2903 * bfd-in2.h: Regenerate.
2904 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
2905
889a4d3e
L
29062011-01-03 H.J. Lu <hongjiu.lu@intel.com>
2907
2908 * cpu-i386.c (bfd_i386_compatible): New.
2909 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
2910 with bfd_i386_compatible.
2911 (bfd_x86_64_arch_intel_syntax): Likewise.
2912 (bfd_i386_arch_intel_syntax): Likewise.
2913 (i8086_arch): Likewise.
2914 (bfd_x64_32_arch): Likewise.
2915 (bfd_x86_64_arch): Likewise.
2916 (bfd_i386_arch): Likewise.
2917
9e9e0820 2918For older changes see ChangeLog-2010
56882138
AM
2919\f
2920Local Variables:
2921mode: change-log
2922left-margin: 8
2923fill-column: 74
2924version-control: never
2925End:
This page took 0.740277 seconds and 4 git commands to generate.