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