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