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