Add support for Xilinx MicroBlaze processor.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
7ba29e2a
NC
12009-08-06 Michael Eager <eager@eagercon.com>
2
3 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
4 * Makefile.in: Regenerate.
5 * archures.c: Add bfd_arch_microblaze.
6 * bfd-in2.h: Regenerate.
7 * config.bfd: Add microblaze target.
8 * configure.in: Add bfd_elf32_microblaze_vec target.
9 * configure: Regenerate.
10 * cpu-microblaze.c: New.
11 * elf32-microblaze.c: New.
12 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
13 * libbfd.h: Regenerate.
14 * reloc.c: Add MICROBLAZE relocations.
15 * section.c: Add struct relax_table and relax_count to section.
16 * targets.c: Add bfd_elf32_microblaze_vec.
17
e47bf690
JJ
182009-08-06 Jakub Jelinek <jakub@redhat.com>
19 Alan Modra <amodra@bigpond.net.au>
20
21 PR binutils/10492
22 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
23 symbols.
24 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
25 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
26
3ae046cc
NS
272009-08-06 Nathan Sidwell <nathan@codesourcery.com>
28
29 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
30 at least once when fixing cortex-a8.
31
cd8d5a82
CF
322009-08-05 Chao-ying Fu <fu@mips.com>
33
34 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
35 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
36 for CPUs. It is true for RM9000.
37 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
38 for all CPUs.
39 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
40 to guard the transformation.
41
9cc305ec
TS
422009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
43
44 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
45 (spu_elf_size_sections): Declare prototype.
46 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
47 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
48 (spu_elf_emit_fixup): New function.
49 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
50 (spu_elf_size_sections): New function.
51
eb7c4339
NS
522009-08-05 Nathan Sidwell <nathan@codesourcery.com>
53
54 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
55 (arm_build_one_stub): Build a8 veneers as a separate pass.
56 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
57 parameters. Use them to check if we create a different a8 fixup
58 than the previous pass.
59 (elf32_arm_size_stubs): Move scope of stub_changed and
60 prev_num_a8_fixes into main loop.
61 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
62
a9585d22
AM
632009-08-04 Alan Modra <amodra@bigpond.net.au>
64
65 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
66 which find_plt_ent is called. Delete redundant code.
67
45b222d6
L
682009-08-03 H.J. Lu <hongjiu.lu@intel.com>
69
70 PR binutils/10363
71 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
72 invalid string offset.
73
004fb780
L
742009-08-03 H.J. Lu <hongjiu.lu@intel.com>
75
76 PR ld/10433
77 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
78 to htab->init_got_offset and plt to htab->init_plt_offset
79 when discarding space for dynamic relocations.
80
a877a2b6
AM
812009-08-03 Alan Modra <amodra@bigpond.net.au>
82
83 * elf32-ppc.c (struct plt_entry): Revise comments.
84 (ppc_elf_check_relocs): Don't create needless plt_entry info
85 for non-pie executables. Don't test info->pie when info->shared
86 already covers that case.
87 (ppc_elf_gc_sweep_hook): Adjust for above change.
88 (add_stub_sym): Don't test info->pie when info->shared tested.
89 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
90 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
91 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
92 (ppc_elf_relocate_section): Likewise.
93
de972ffa
AM
942009-08-03 Alan Modra <amodra@bigpond.net.au>
95
96 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
97 for local ifunc symbols in non-pie executables, regardless of
98 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
99 code so that it's obvious that we only do anything special for
100 local ifunc syms.
101 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
102 (allocate_dynrelocs): Correct comment for syms defined in plt.
103 Don't specially allocate ifunc dyn relocs.
104 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
105 (ppc_elf_relocate_section): Set "relocation" value for ifunc
106 syms in non-pie executables. No specially allocated dyn relocs
107 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
108 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
109 a non-pie executable.
110
1d85728f
L
1112009-08-02 H.J. Lu <hongjiu.lu@intel.com>
112 Jakub Jelinek <jakub@redhat.com>
113
114 PR ld/6443
115 * elf32-i386.c (elf_i386_tls_transition): Check executable
116 instead of shared for TLS when building PIE.
117 (elf_i386_check_relocs): Likewise.
118 (elf_i386_allocate_dynrelocs): Likewise.
119 (elf_i386_relocate_section): Likewise.
120
121 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
122 instead of shared for TLS when building PIE.
123 (elf64_x86_64_check_relocs): Likewise.
124 (elf64_x86_64_allocate_dynrelocs): Likewise.
125 (elf64_x86_64_relocate_section): Likewise.
126
5d8d4872
AG
1272009-07-31 Anthony Green <green@moxielogic.com>
128
129 * config.bfd (targ_cpu): Add moxie-uclinux support.
130
080a1b9f
HPN
1312009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
132
133 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
134
25f23106
AM
1352009-07-30 Alan Modra <amodra@bigpond.net.au>
136
137 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
138 used by indirect function support. Count dynamic relocs for
139 ifunc syms.
140 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
141 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
142 in iplt and their relocs in reliplt. Don't make ifunc syms
143 dynamic. Allocate got entry relocs for non-dynamic ifunc in
144 reliplt. Handle other dynamic relocs for ifunc.
145 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
146 ifunc in reliplt, likewise relocs for got against local ifunc.
147 Typo fix on reliplt size adjust.
148 (ppc_elf_relocate_section): Don't use plt scheme of allocating
149 relocs 1-1 with entries for iplt, instead just add using
150 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
151 Error on invalid ifunc dyn relocs.
152 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
153 in iplt/reliplt.
154 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
155 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
156 (ppc64_elf_reloc_type_lookup): Handle new relocs.
157 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
158 (allocate_dynrelocs): As for elf32-ppc.c above.
159 (ppc64_elf_size_dynamic_sections): Likewise.
160 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
161 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
162 (ppc_size_one_stub): Similarly.
163 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
164 relocs too.
165 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
166
80f540b7
HPN
1672009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
168
169 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
170 change. Add note to head comment.
171
4ad4f3cb
JB
1722009-07-28 Jan Beulich <jbeulich@novell.com>
173
174 * archive.c (get_extended_arelt_filename): Remove redundant
175 range check on index.
176
d8d2f433
DK
1772009-07-27 Doug Kwan <dougkwan@google.com>
178
179 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
180
9e675548
L
1812009-07-27 H.J. Lu <hongjiu.lu@intel.com>
182
183 * archures.c bfd_*_arch): Sorted.
184 (bfd_archures_list): Likewise.
185
86514226
SR
1862009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
187
9e675548 188 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
86514226
SR
189 to R_cr16_NUM32 relocation.
190
305f7588
MS
1912009-07-26 Michael Eager <eager@eagercon.com>
192
193 * archures.c: Add bfd_mach_ppc_405
194 * bfd-in2.h: Same.
195
b1995b01
L
1962009-07-25 H.J. Lu <hongjiu.lu@intel.com>
197
198 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
199 * cpu-l1om.c (bfd_l1om_arch): Likewise.
200
8a9036a4
L
2012009-07-25 H.J. Lu <hongjiu.lu@intel.com>
202
203 * archures.c (bfd_architecture): Add bfd_arch_l1om.
204 (bfd_l1om_arch): New.
205 (bfd_archures_list): Add &bfd_l1om_arch.
206 * bfd-in2.h: Regenerated.
207
208 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
209 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
210 if bfd_elf64_x86_64_freebsd_vec is supported.
211 (targ_selvecs): Likewise.
212
213 * configure.in: Support bfd_elf64_l1om_vec and
214 bfd_elf64_l1om_freebsd_vec.
215 * configure: Regenerated.
216
217 * cpu-l1om.c: New.
218
219 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
220 (bfd_elf64_l1om_vec): Likewise.
221 (bfd_elf64_l1om_freebsd_vec): Likewise.
222
223 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
224 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
225 * Makefile.in: Regenerated.
226
227 * targets.c (bfd_elf64_l1om_vec): New.
228 (bfd_elf64_l1om_freebsd_vec): Likewise.
229 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
230 bfd_elf64_l1om_freebsd_vec.
231
8fdcc58d
TS
2322009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
233 Alan Modra <amodra@bigpond.net.au>
234
235 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
236 * bfd-in2.h: Regenerate.
237 * libbfd.h: Regenerate.
238 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
239 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
240 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
241
9b769489
L
2422009-07-23 H.J. Lu <hongjiu.lu@intel.com>
243
244 PR ld/10434
245 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
246 instead of shared for R_X86_64_TPOFF32.
247 (elf64_x86_64_relocate_section): Likewise.
248
3e7a7d11
NC
2492009-07-23 Ulrich Drepper <drepper@redhat.com>
250
251 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
252 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
253 with the BSF_GNU_UNIQUE flag bit set.
254 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
255 for symbols with STB_GNU_UNIQUE binding.
256 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
257 with the STB_GNU_UNIQUE binding.
258 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
259 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
260 symbols with the unique_global field set.
261 (elf_link_output_extsym): Set unique_global field for symbols with
262 the STB_GNU_UNIQUE binding.
263 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
264 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
265 symbols.
266 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
267 symbols.
268 * bfd-in2.h: Regenerate.
269
5f35ea9c
L
2702009-07-22 H.J. Lu <hongjiu.lu@intel.com>
271
272 * elflink.c (elf_link_output_extsym): Revert the last change.
273
b63cc625
L
2742009-07-22 H.J. Lu <hongjiu.lu@intel.com>
275
276 PR ld/10433
277 * elflink.c (elf_link_output_extsym): Special case ifunc syms
278 when ref_regular, not def_regular.
279
2955ec4c
L
2802009-07-21 H.J. Lu <hongjiu.lu@intel.com>
281
282 PR ld/10426
283 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
284 from a DSO into a normal FUNC symbol.
285 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
286 a normal FUNC symbol.
287
6d30f5b2
NC
2882009-07-17 Chao-ying Fu <fu@mips.com>
289
290 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
291 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
292 interlocking, the last PLT entry needs a nop in the branch delay slot.
293 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
294 output the last two PLT entries in reverse order.
295
1f85278f
L
2962009-07-16 H.J. Lu <hongjiu.lu@intel.com>
297
298 * elf32-i386.c (elf_i386_relocate_section): Don't get local
299 STT_GNU_IFUNC symbol for relocatable link.
300 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
301
f07749bb
L
3022009-07-10 H.J. Lu <hongjiu.lu@intel.com>
303
304 * bfdio.c (bfd_iovec): Add comments for bmmap.
305 * bfd-in2.h: Regenerated.
306
8455dd2c
L
3072009-07-10 H.J. Lu <hongjiu.lu@intel.com>
308
309 * Makefile.am: Run "make dep-am".
310 * Makefile.in: Regenerated.
311
cedfb179
DK
3122009-07-10 Doug Kwan <dougkwan@google.com>
313
314 * elf32-arm.c (stub_hash_newfunc): Initialize fields
315 target_addend and orig_insn.
316
fa8f86ff
TT
3172009-07-10 Tom Tromey <tromey@redhat.com>
318
319 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
320 (elf-eh-frame.lo): Likewise.
321 (elf32-bfin.lo): Likewise.
322 (elf32-frv.lo): Likewise.
323 (elf32-xc16x.lo): Likewise.
324 * Makefile.in: Rebuild.
325 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
326 * elf-eh-frame.c: Likewise.
327 * elf32-bfin.c: Likewise.
328 * elf32-frv.c: Likewise.
329 * elf32-xc16x.c: Likewise.
330
33c6a8fc
JB
3312009-07-10 Julian Brown <julian@codesourcery.com>
332
333 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
334 symbol a stub entry is derived from, not the entry for the stub
335 itself, in call to elf32_arm_final_link_relocate.
336
1d770845
L
3372009-07-10 H.J. Lu <hongjiu.lu@intel.com>
338
339 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
340 when reporting addends.
341
52cfded7
AM
3422009-07-10 Alan Modra <amodra@bigpond.net.au>
343
344 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
345 data even when no stubs.
346 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
347
e054468f
AM
3482009-07-10 Alan Modra <amodra@bigpond.net.au>
349
350 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
351 (ppc_elf_get_synthetic_symtab): Report addend.
352 (PLT_IFUNC): Define.
353 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
354 (ppc_elf_create_glink): New function.
355 (ppc_elf_create_dynamic_sections): Use it.
356 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
357 (update_local_sym_info): Allocate space for local_plt array.
358 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
359 entry pointer.
360 (is_branch_reloc): New function.
361 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
362 (ppc_elf_gc_sweep_hook): Likewise.
363 (ppc_elf_adjust_dynamic_symbol): Likewise.
364 (allocate_dynrelocs): Likewise.
365 (ppc_elf_size_dynamic_sections): Likewise.
366 (ppc_elf_relocate_section): Likewise.
367 (branch_reloc_hash_match): Use is_branch_reloc.
368 (ppc_elf_tls_optimize): Adjust for local_plt.
369 (write_glink_stub): New function, extracted from..
370 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
371 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
372 branch table when dynamic.
373 (elf_backend_post_process_headers): Define.
374 * elf64-ppc.c (elf_backend_post_process_headers): Define.
375 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
376 (ppc64_elf_get_synthetic_symtab): Report addend.
377 (struct ppc_stub_hash_entry): Add plt_ent.
378 (PLT_IFUNC): Define.
379 (struct ppc_link_hash_table): Add iplt and reliplt.
380 (create_linkage_sections): Make .iplt and .rela.iplt sections.
381 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
382 (update_local_sym_info): Allocate space for local_plt array.
383 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
384 entry pointer.
385 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
386 and don't change hash flags here.
387 (is_branch_reloc): New function.
388 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
389 (ppc64_elf_gc_sweep_hook): Likewise.
390 (ppc64_elf_adjust_dynamic_symbol): Likewise.
391 (allocate_dynrelocs): Likewise.
392 (ppc64_elf_size_dynamic_sections): Likewise.
393 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
394 (ppc64_elf_size_stubs): Likewise.
395 (ppc64_elf_relocate_section): Likewise.
396 (get_sym_h): Adjust for local_plt.
397 (branch_reloc_hash_match): Use is_branch_reloc.
398 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
399 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
400
041de40d
AM
4012009-07-10 Alan Modra <amodra@bigpond.net.au>
402
403 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
404
7ae26bc1
AM
4052009-07-10 Alan Modra <amodra@bigpond.net.au>
406
407 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
408 and ref_regular_nonweak comment.
409 * elflink.c (elf_link_output_extsym): Special case ifunc syms
410 when def_regular, not ref_regular.
411 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
412 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
413 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
414
9c4d0c1f
AM
4152009-07-09 Alan Modra <amodra@bigpond.net.au>
416
417 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
418 of malloc'd struct call_info.
419 (pasted_function): Likewise, priority too.
420
2fc6d3b0
AM
4212009-07-07 Alan Modra <amodra@bigpond.net.au>
422
423 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
424 alignment when packing sections into overlays.
425
9e1f7c0e
DK
4262009-07-03 Cary Coutant <ccoutant@google.com>
427
428 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
429
4a768870
DK
4302009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
431
432 * coffcode.h (sec_to_styp_flags): Partially revert (functional
433 changes only) earlier patch:-
434
435 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
436
437 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
438 give .debug and .reloc data characteristics.
439 (DOT_RELOC): New define for .reloc section string.
440 (coff_write_object_contents): Use DOT_RELOC instead of string.
441
848f5748
TT
4422009-07-02 Tom Tromey <tromey@redhat.com>
443
444 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
445 * bfdwin.c (bfd_free_window): Cast to unsigned long.
446
dda46a27
L
4472009-07-01 Nick Clifton <nickc@redhat.com>
448
449 * elf-m10300.c: Remove trailing white space.
450 * reloc.c: Likewise.
451
efde2f2c
NC
4522009-07-01 Douglas B Rupp <rupp@gnat.com>
453
dda46a27 454 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
efde2f2c 455 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
dda46a27
L
456 * configure.in: Use them.
457 * configure: Regenerate.
458 * config.in: Regnerate.
459 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
efde2f2c
NC
460 #define _BSD_SOURCE. Add comments.
461 (vms_file_stats_name): Calculate creation date based on available
462 runtime data. Return 1 for version instead of 0.
463
e1ec24c6
NC
4642009-07-01 Nick Clifton <nickc@redhat.com>
465
466 PR 10072
467 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
468 to R_ARM_THM_PC8 relocation.
469
2709f570
NC
4702009-06-29 Nick Clifton <nickc@redhat.com>
471
472 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
473 different uses of the relocations addend when a symbol is in a
474 merged section.
475
83b89087
L
4762009-06-27 H.J. Lu <hongjiu.lu@intel.com>
477
478 PR ld/10337
479 * elf.c (bfd_section_from_shdr): Don't change sh_link for
480 SHT_REL/SHT_RELA sections on executable nor shared library.
481 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
482 as a normal section.
483
be7035c6
NC
4842009-06-25 Nick Clifton <nickc@redhat.com>
485
486 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
487 symbols with SEC_MERGE flag.
488
bdeb4032
KT
4892009-06-25 Kai Tietz <kai.tietz@onevision.com>
490
491 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
492 give .debug and .reloc data characteristics.
493 (DOT_RELOC): New define for .reloc section string.
494 (coff_write_object_contents): Use DOT_RELOC instead of string.
495
b32e07d7
TG
4962009-06-25 Tristan Gingold <gingold@adacore.com>
497
498 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
499 (bfd_mach_o_canonicalize_dynamic_symtab)
500 (bfd_mach_o_get_synthetic_symtab): Defines.
501 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
502 (TARGET_NAME): Use Mach-O specific functions for dynamic.
503
504 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
505 for scattered relocations.
506 (bfd_mach_o_i386_print_thread): New function.
507 (bfd_mach_o_print_thread): Define.
508
509 * mach-o.c (text_section_names_xlat): Add an entry for __const.
510 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
511 New functions extracted from ...
512 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
513 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
514 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
515 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
516 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
517 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
518 Set name_str field.
519 (bfd_mach_o_scan_read_dylib): Ditto.
520 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
521 reindent.
522 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
523 decode isym and flags on little endian targets. Set dysymtab field.
524 (bfd_mach_o_scan_start_address): Adjust for enum names.
525 (bfd_mach_o_lookup_section): Do not look for segments anymore.
526 (bfd_mach_o_print_section): Display bfd section name.
527 (bfd_mach_o_print_segment): Display none if no name.
528 (bfd_mach_o_print_dysymtab): Display next index for local, external
529 and undefined symbols.
530 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
531 Display dylinker name. Display thread and unixthread commands content.
532 (bfd_mach_o_print_thread): New macro.
533
534 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
535 (bfd_mach_o_ppc_thread_flavour): Ditto.
536 (bfd_mach_o_i386_thread_flavour): Ditto.
537 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
538 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
539 BFD_MACH_O_THREAD_STATE_NONE.
540 (bfd_mach_o_segment_command): Remove segment field.
541 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
542 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
543 (bfd_mach_o_prebound_dylib_command): Ditto.
544 (bfd_mach_o_dylib_command): Ditto.
545 (bfd_mach_o_prebound_dylib_command): Remove section field.
546 (mach_o_data_struct): Add dysymtab field.
547 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
548 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
549 (bfd_mach_o_build_commands): Remove parameter names and attributes.
550 (bfd_mach_o_get_dynamic_reloc_upper_bound)
551 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
552
c41ba836
DK
5532009-06-25 Rafael Avila de Espindola <espindola@google.com>
554
555 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
556 field of struct dirent.
557
3188b070
TG
5582009-06-23 Tristan Gingold <gingold@adacore.com>
559
560 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
561 of this macro. Fix indentation.
562
022f8312
CL
5632009-06-22 Christophe Lyon <christophe.lyon@st.com>
564
565 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
566 destination for defined dynamic symbols when deciding whether to
567 insert a stub or not.
568 (allocate_dynrelocs): Make sure functions are not marked as Thumb
569 when actually accessed through a PLT, even when generating a
570 shared lib.
571
d297e807
TG
5722009-06-22 Tristan Gingold <gingold@adacore.com>
573
574 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
575 the relocs array.
576
ceaf50a2
AM
5772009-06-22 Alan Modra <amodra@bigpond.net.au>
578
579 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
580 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
581
983bddc8
AM
5822009-06-22 Alan Modra <amodra@bigpond.net.au>
583
584 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
585
f8703194
L
5862009-06-19 H.J. Lu <hongjiu.lu@intel.com>
587
588 * elflink.c (elf_link_add_object_symbols): Avoid warning
589 from -Wjump-misses-init in gcc 4.5.0.
590
09a24cbf
L
5912009-06-19 H.J. Lu <hongjiu.lu@intel.com>
592
593 * elf32-i386.c (elf_i386_check_relocs): Properly check local
594 symbol on error.
595 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
596
4c544807
L
5972009-06-19 H.J. Lu <hongjiu.lu@intel.com>
598
599 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
600 r_symndx. Report local symbol name on error.
601 (elf_i386_check_relocs): Updated. Report local symbol name on
602 error.
603 (elf_i386_gc_sweep_hook): Updated.
604 (elf_i386_relocate_section): Likewise.
605
606 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
607 r_symndx. Report local symbol name on error.
608 (elf64_x86_64_check_relocs): Updated. Report local symbol name
609 on error.
610 (elf64_x86_64_gc_sweep_hook): Updated.
611 (elf64_x86_64_relocate_section): Likewise.
612
b8674692
TG
6132009-06-19 Tristan Gingold <gingold@adacore.com>
614
615 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
616
046b007d
TG
6172009-06-19 Tristan Gingold <gingold@adacore.com>
618
619 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
620 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
621 (bfd_mach_o_valid): Ditto.
622 (bfd_mach_o_wide_p): Ditto.
623 (bfd_mach_o_canonicalize_reloc): Ditto.
624 (bfd_mach_o_build_commands): Ditto.
625 (bfd_mach_o_scan_read_thread): Ditto.
626 (bfd_mach_o_flatten_sections): Ditto.
627 (bfd_mach_o_scan_start_address): Ditto.
628 (bfd_mach_o_lookup_section): Ditto.
629 (bfd_mach_o_core_fetch_environment): Ditto.
630 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
631 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
632 (bfd_mach_o_scan_write_symtab): Ditto.
633 Use macros instead of hard-coded values.
634 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
635 Use bfd_mach_o_get_data instead of direct access. Use macros
636 instead of hard-coded values.
637 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
638 Remove sym argument and get section from mdata.
639 Move code into the else branch.
640 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
641 Remove sym argument and get section from mdata. Adjust code.
642 (bfd_mach_o_scan_read_dylib): Move assertion into the created
643 switch (which replaces consecutive if statements).
644 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
645 module table, table of content, indirect symbols and external
646 referenced symbols.
647 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
648 field.
649 (bfd_mach_o_scan_read_linkedit): New function.
650 (bfd_mach_o_scan_read_str): Ditto.
651 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
652 field of mdata.
653 (bfd_mach_o_get_symtab_upper_bound): Remove check as
654 bfd_mach_o_count_symbols never returns an error.
655 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
656 symtab field (there might be only one symtab).
657 (bfd_mach_o_scan_read_command): Handle reexported dylib.
658 Handle sub frameworks, sub umbrella, sub library and sub client.
659 Read code signature and segment split info commands.
660 (bfd_mach_o_scan): Reindent.
661 (bfd_mach_o_xlat_name): New type.
662 (bfd_mach_o_print_flags): New function.
663 (bfd_mach_o_get_name): Ditto.
664 (bfd_mach_o_cpu_name): New variable.
665 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
666 (bfd_mach_o_section_type_name)
667 (bfd_mach_o_section_attribute_name)
668 (bfd_mach_o_load_command_name): New variables.
669 (bfd_mach_o_print_private_header): New function.
670 (bfd_mach_o_print_section_map): New function extracted from
671 bfd_mach_o_print_private_bfd_data.
672 (bfd_mach_o_print_section): Ditto. Print more infos.
673 (bfd_mach_o_print_segment): Ditto.
674 (bfd_mach_o_print_dysymtab): Ditto.
675 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
676 load weak dylib, reexport dylib and id dylib.
677 Handle code signature and segment_split info.
678 Handle sub frameworks, sub umbrella, sub library and sub client.
679 (bfd_mach_o_section_get_nbr_indirect): New function.
680
681 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
682 (bfd_mach_o_header_flags): New enum to define header flags.
683 (bfd_mach_o_section_attribute): New enum to replace ...
684 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
685 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
686 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
687 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
688 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
689 these removed macros.
690 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
691 (bfd_mach_o_dylib_module): New type.
692 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
693 macros.
694 (bfd_mach_o_dylib_table_of_content): New type.
695 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
696 (bfd_mach_o_dylib_reference): New type.
697 (BFD_MACH_O_REFERENCE_SIZE): New macro.
698 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
699 modules, toc, references and indirect syms.
700 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
701 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
702 unused). Add comment.
703 (bfd_mach_o_dylib_command): Ditto.
704 (bfd_mach_o_prebound_dylib_command): Ditto.
705 (bfd_mach_o_linkedit_command): New type.
706 (bfd_mach_o_str_command): New type.
707 (bfd_mach_o_load_command): Add linkedit and str fields.
708 (mach_o_data_struct): Add symtab field.
709 (bfd_get_mach_o_data): Renamed to ...
710 (bfd_mach_o_get_data): ... this new macro.
711 (bfd_mach_o_scan_read_symtab_symbol,
712 bfd_mach_o_scan_read_symtab_strtab,
713 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
714
715 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
716 instead of direct access.
717
6d78d0b9
AM
7182009-06-19 Alan Modra <amodra@bigpond.net.au>
719
720 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
721 R_PPC_PLTREL24 relocs.
722 (ppc_elf_relocate_section): Likewise.
723
3ec01793
AM
7242009-06-19 Alan Modra <amodra@bigpond.net.au>
725
726 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
727 pointer to sym hash. Update all uses.
728 (update_plt_info): Likewise. Don't check addend here.
729
c2e61a4e
L
7302009-06-18 H.J. Lu <hongjiu.lu@intel.com>
731
732 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
733 bfd_sym_from_r_symndx.
734 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
735
87d72d41
AM
7362009-06-18 Alan Modra <amodra@bigpond.net.au>
737
738 * elf-bfd.h (struct sym_sec_cache): Delete.
739 (struct sym_cache): New.
740 (bfd_section_from_r_symndx): Delete prototype.
741 (bfd_sym_from_r_symndx): Define prototype.
742 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
743 (bfd_sym_from_r_symndx): ..new function.
744 * elf32-arm.c: Update all uses of struct sym_sec_cache and
745 bfd_section_from_r_symndx to new struct and function.
746 * elf32-bfin.c: Likewise.
747 * elf32-hppa.c: Likewise.
748 * elf32-i386.c: Likewise.
749 * elf32-m32r.c: Likewise.
750 * elf32-m68hc1x.c: Likewise.
751 * elf32-m68hc1x.h: Likewise.
752 * elf32-m68k.c: Likewise.
753 * elf32-ppc.c: Likewise.
754 * elf32-s390.c: Likewise.
755 * elf32-sh.c: Likewise.
756 * elf64-ppc.c: Likewise.
757 * elf64-s390.c: Likewise.
758 * elf64-x86-64.c: Likewise.
759 * elfxx-sparc.c: Likewise.
760 * elfxx-sparc.h: Likewise.
761
14aae723
L
7622009-06-18 H.J. Lu <hongjiu.lu@intel.com>
763
764 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
765 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
766
5e486aa1
NC
7672009-06-18 Nick Clifton <nickc@redhat.com>
768
769 * elflink.c (elf_link_sort_relocs): Return early if there are no
770 relocs to sort.
771
361dff73
DK
7722009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
773
32425da9
NC
774 Merge cegcc and mingw32ce target name changes from
775 CeGCC project:
361dff73 776
32425da9 777 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
778
779 * config.bfd: Add arm*-*-cegcc* target.
780
32425da9 781 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
782
783 * config.bfd: Add arm-*-mingw32ce* target.
784
e03a8ed8
L
7852009-06-17 H.J. Lu <hongjiu.lu@intel.com>
786
787 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
788 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
789 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
790 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
791
7922009-06-17 H.J. Lu <hongjiu.lu@intel.com>
793
794 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
795 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
796 * elf32-i386.c (elf_i386_check_relocs): Use it.
797 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
798
7992009-06-17 H.J. Lu <hongjiu.lu@intel.com>
800
801 * elf-bfd.h (elf_dyn_relocs): New.
802
803 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
804 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
805 elf_dyn_relocs.
806 (elf_i386_copy_indirect_symbol): Likewise.
807 (elf_i386_check_relocs): Likewise.
808 (elf_i386_gc_sweep_hook): Likewise.
809 (elf_i386_allocate_dynrelocs): Likewise.
810 (elf_i386_readonly_dynrelocs): Likewise.
811 (elf_i386_size_dynamic_sections): Likewise.
812
813 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
814 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
815 with elf_dyn_relocs.
816 (elf64_x86_64_copy_indirect_symbol): Updated.
817 (elf64_x86_64_check_relocs): Likewise.
818 (elf64_x86_64_gc_sweep_hook): Likewise.
819 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
820 (elf64_x86_64_allocate_dynrelocs): Likewise.
821 (elf64_x86_64_readonly_dynrelocs): Likewise.
822 (elf64_x86_64_size_dynamic_sections): Likewise.
823
64e77c6d
L
8242009-06-17 H.J. Lu <hongjiu.lu@intel.com>
825
826 * elf32-arm.c (create_got_section): Get existing .rela.got
827 section.
828 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
829 * elf32-lm32.c (create_got_section): Likewise.
830 * elf32-m32r.c (create_got_section): Likewise.
831 * elf32-ppc.c (ppc_elf_create_got): Likewise.
832 * elf32-s390.c (create_got_section): Likewise.
833 * elf32-sh.c (create_got_section): Likewise.
834 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
835 * elf64-s390.c (create_got_section): Likewise.
836 * elfxx-sparc.c (create_got_section): Likewise.
837
838 * elflink.c (_bfd_elf_create_got_section): Properly initialize
839 the GOT size.
840
d2149d72
L
8412009-06-16 H.J. Lu <hongjiu.lu@intel.com>
842
843 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
844
845 * elf32-i386.c (elf_i386_local_hash): Removed.
846 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
847 (elf_i386_get_local_sym_hash): Likewise.
848
849 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
850 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
851 (elf64_x86_64_get_local_sym_hash): Likewise.
852 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
853 (get_local_sym_hash): Likewise.
854
cc3bd654
L
8552009-06-16 H.J. Lu <hongjiu.lu@intel.com>
856
857 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
858 rel_got_sec and plt_sec.
859 (elfNN_ia64_relax_section): Updated.
860 (elfNN_ia64_create_dynamic_sections): Likewise.
861 (get_got): Likewise.
862 (allocate_dynrel_entries): Likewise.
863 (elfNN_ia64_size_dynamic_sections): Likewise.
864 (set_got_entry): Likewise.
865 (elfNN_ia64_choose_gp): Likewise.
866 (elfNN_ia64_relocate_section): Likewise.
867 (elfNN_ia64_finish_dynamic_symbol): Likewise.
868 (elfNN_ia64_finish_dynamic_sections): Likewise.
869
be3e406d
UW
8702009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
871
872 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
873 also for calls.
874
6de2ae4a
L
8752009-06-16 H.J. Lu <hongjiu.lu@intel.com>
876
877 * configure.in (elf): Add elf-ifunc.lo.
878
879 * configure: Regenerated.
880 * Makefile.in: Likewise.
881
882 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
883 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
884
885 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
886 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
887 irelifunc.
888 (elf_i386_link_hash_table_create): Likewise.
889 (elf_i386_create_dynamic_sections): Likewise.
890 (elf_i386_check_relocs): Likewise.
891 (elf_i386_allocate_dynrelocs): Likewise.
892 (elf_i386_size_dynamic_sections): Likewise.
893 (elf_i386_relocate_section): Likewise.
894 (elf_i386_finish_dynamic_symbol): Likewise.
895 (elf_i386_finish_dynamic_sections): Likewise.
896 (elf_i386_create_got_section): Removed.
897
898 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
899 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
900 irelifunc.
901 (elf64_x86_64_compute_jump_table_size): Updated.
902 (elf64_x86_64_link_hash_table_create): Likewise.
903 (elf64_x86_64_create_dynamic_sections): Likewise.
904 (elf64_x86_64_check_relocs): Likewise.
905 (elf64_x86_64_allocate_dynrelocs): Likewise.
906 (elf64_x86_64_size_dynamic_sections): Likewise.
907 (elf64_x86_64_relocate_section): Likewise.
908 (elf64_x86_64_finish_dynamic_symbol): Likewise.
909 (elf64_x86_64_finish_dynamic_sections): Likewise.
910 (elf64_x86_64_create_got_section): Removed.
911
912 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
913 for pointer alignment. Set up section pointers.
914 (_bfd_elf_create_dynamic_sections): Likewise.
915 (_bfd_elf_create_ifunc_sections): Moved to ...
916 * elf-ifunc.c: Here. New.
917
918 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
919 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
920 Run "make dep-am".
921
81694485
NC
9222009-06-16 Doug Kwan <dougkwan@google.com>
923
6de2ae4a
L
924 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
925 to bfd_signed_vma. Cast constant operands which are used in
926 offset related expressions to bfd_signed_vma type as appropriate.
81694485 927
6db7e006
MR
9282009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
929
930 * elf32-vax.c (elf_vax_plt_sym_val): New function.
931 (elf_backend_plt_sym_val): Define.
932
9b90d8fd
MR
9332009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
934
935 * elf32-vax.c (elf_vax_reloc_type_class): New function.
936 (elf_backend_reloc_type_class): Define.
937
04981bc1
MR
9382009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
939
940 * elf32-vax.c (elf_vax_relocate_section): For symbol references
941 from an executable to a shared library treat R_VAX_PC32
942 relocations as R_VAX_PLT32 ones.
943
886815b2
MR
9442009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
945
946 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
947 symbols in GOT space calculation.
948 (elf_vax_relocate_section): Adjust accordingly.
949
6c4fb25a
MR
9502009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
951
952 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
953 include <R11:R2>.
954
7b6021f1
MR
9552009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
956
957 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
958 attribute.
959 (elf_vax_relocate_section): Likewise.
960
188dbb07
L
9612009-06-15 H.J. Lu <hongjiu.lu@intel.com>
962
963 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
964 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
965
048cbda4
L
9662009-06-15 H.J. Lu <hongjiu.lu@intel.com>
967
968 * elf32-i386.c (elf_i386_check_relocs): Reformat.
969 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
970
482c6ce9
L
9712009-06-15 H.J. Lu <hongjiu.lu@intel.com>
972
973 * Makefile.am: Run "make dep-am".
974 * Makefile.in: Regenerated.
975
eba077f2
L
9762009-06-15 H.J. Lu <hongjiu.lu@intel.com>
977
978 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
979 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
980
ec68b083
NC
9812009-06-15 Nick Clifton <nickc@redhat.com>
982
983 * po/ru.po: New Russian translation.
984 * configure.in (ALL_LINGUAS): Add ru.
985 * configure: Regenerate.
986
b80ee1aa
L
9872009-06-14 H.J. Lu <hongjiu.lu@intel.com>
988
989 * elf32-i386.c: Remove duplicated comments.
990
44c4ea11
L
9912009-06-14 H.J. Lu <hongjiu.lu@intel.com>
992
993 PR ld/10270
994 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
995 dynamic IFUNC pointer in non-shared object. Use .got.plt
996 for IFUNC definition in PIE.
997 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
998 PIE locally.
999
1000 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1001 dynamic IFUNC pointer in non-shared object. Use .got.plt
1002 for IFUNC definition in PIE.
1003 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1004 PIE locally.
1005
8b7e2992
L
10062009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1007
1008 * elf32-i386.c (elf_i386_check_relocs): Properly report
1009 local symbol for unhandled relocation against STT_GNU_IFUNC
1010 symbol.
637fa7af 1011 (elf_i386_relocate_section): Likewise.
8b7e2992 1012 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
637fa7af 1013 (elf64_x86_64_relocate_section): Likewise.
8b7e2992 1014
c25bc9fc
L
10152009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1016
1017 PR ld/10269
1018 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1019 (elf_i386_link_hash_table): Add loc_hash_table and
1020 loc_hash_memory.
1021 (elf_i386_local_hash): New.
1022 (elf_i386_local_htab_hash): Likewise.
1023 (elf_i386_local_htab_eq): Likewise.
1024 (elf_i386_get_local_sym_hash): Likewise.
1025 (elf_i386_link_hash_table_free): Likewise.
1026 (elf_i386_allocate_local_dynrelocs): Likewise.
1027 (elf_i386_finish_local_dynamic_symbol): Likewise.
1028 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1029 (elf_i386_link_hash_table_create): Create loc_hash_table and
1030 loc_hash_memory.
1031 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1032 (elf_i386_size_dynamic_sections): Likewise.
1033 (elf_i386_relocate_section): Likewise.
1034 (elf_i386_finish_dynamic_sections): Likewise.
1035 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1036 isn't NULL.
1037
1038 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1039 (elf64_x86_64_link_hash_table): Add loc_hash_table and
1040 loc_hash_memory.
1041 (elf64_x86_64_local_hash): New.
1042 (elf64_x86_64_local_htab_hash): Likewise.
1043 (elf64_x86_64_local_htab_eq): Likewise.
1044 (elf64_x86_64_get_local_sym_hash): Likewise.
1045 (elf64_x86_64_link_hash_table_free): Likewise.
1046 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1047 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1048 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1049 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1050 and loc_hash_memory.
1051 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1052 symbols.
1053 (elf64_x86_64_size_dynamic_sections): Likewise.
1054 (elf64_x86_64_relocate_section): Likewise.
1055 (elf64_x86_64_finish_dynamic_sections): Likewise.
1056 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1057 sym isn't NULL.
1058
dec9d5df
PB
10592009-06-10 Philip Blundell <philb@gnu.org>
1060
1061 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1062 elf_sec->this_hdr == NULL.
1063
92bc0e80
TG
10642009-06-12 Tristan Gingold <gingold@adacore.com>
1065
1066 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1067 * bfd-in2.h: Regenerated.
1068 * libbfd.h: Regenerated.
1069
1070 * mach-o.c (FILE_ALIGN): New macro.
1071 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
1072 (bfd_mach_o_print_symbol): Ditto.
1073 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
1074 (bfd_mach_o_get_reloc_upper_bound): New function.
1075 (bfd_mach_o_canonicalize_reloc): Ditto.
1076 (bfd_mach_o_scan_write_relocs): Ditto.
1077 (bfd_mach_o_scan_write_section_32): Remove offset argument.
1078 (bfd_mach_o_scan_write_section_64): Ditto.
1079 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
1080 written for load command. Do not compute section file offset.
1081 (bfd_mach_o_scan_write_segment_64): Ditto.
1082 (bfd_mach_o_scan_write_symtab): Compute file offset first.
1083 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
1084 Mach-O to ...
1085 (bfd_mach_o_mangle_symbols): ... this new function.
046b007d 1086 (bfd_mach_o_write_contents): Be sure to have load commands built.
92bc0e80
TG
1087 Call bfd_mach_o_mangle_symbols.
1088 (bfd_mach_o_build_commands): Adjust for filelen field.
1089 Use FILE_ALIGN macro. Clear section file offset if section is empty.
1090 Do not set symtab file offset anymore here.
1091 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
1092 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
1093 Set reloc_count and rel_filepos section fields.
1094 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
1095 unsigned int.
1096 (bfd_mach_o_scan_read_section_64): Ditto.
1097 (bfd_mach_o_scan_read_section): Ditto.
1098 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
1099 bfd_mach_o_asymbol. Use unsigned int for file offset type.
1100 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
1101 Handle weak-ref symbols.
1102 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
1103 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1104 (bfd_mach_o_scan): Remove assignment to removed field.
1105 (bfd_mach_o_mkobject_init): Ditto.
1106 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
1107 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
1108 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1109 (bfd_mach_o_swap_reloc_in): Ditto.
1110 (bfd_mach_o_swap_reloc_out): Ditto.
1111
1112 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
1113 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
1114 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
1115 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
1116 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
1117 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
1118 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
1119 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
1120 (BFD_MACH_O_N_WEAK_DEF): New macros.
1121 Add comments.
1122 (bfd_mach_o_section_type): Add new enumeration values.
1123 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
1124 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
1125 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
1126 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
1127 macros.
1128 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
1129 (BFD_MACH_O_GENERIC_RELOC_PAIR)
1130 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
1131 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
1132 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
1133 (BFD_MACH_O_RELENT_SIZE): Ditto.
1134 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
1135 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
1136 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
1137 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
1138 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
1139 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
1140 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
1141 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
1142 (bfd_mach_o_reloc_info): New struct.
1143 (bfd_mach_o_asymbol): New struct.
1144 (bfd_mach_o_symtab_command): The symbols field is now of type
1145 bfd_mach_o_asymbol.
1146 (bfd_mach_o_load_command): The offset and len fields are now of type
1147 unsigned int.
1148 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
1149 Add a filelen field. Add comments.
1150 (bfd_mach_o_backend_data): New struct.
1151 (bfd_mach_o_get_backend_data): New macro.
1152 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
1153 bfd_mach_o_asymbol.
1154 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1155 (bfd_mach_o_get_reloc_upper_bound): New prototype.
1156 (bfd_mach_o_canonicalize_reloc): Ditto.
1157
1158 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
1159 duplicated macro. Now defined to _bfd_generic_is_local_label.
1160 (TARGET_NAME_BACKEND): New macro...
1161 (TARGET_NAME_BACKEND): ... used to name a new variable.
1162 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
1163 Mach-O backend data.
1164
1165 * mach-o-i386.c (i386_howto_table): New variable.
1166 (bfd_mach_o_i386_swap_reloc_in): New function.
1167 (bfd_mach_o_i386_swap_reloc_out): Ditto.
1168 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
1169 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
1170 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
1171 (bfd_mach_o_bfd_reloc_type_lookup)
1172 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1173
8c7d38e8
NC
11742009-06-11 Eric Paris <eparis@redhat.com>
1175 Nick Clifton <nickc@redhat.com>
1176
1177 * opncls.c (_maybe_make_executable): New function. Gives execute
1178 permission to an executable bfd that was opened for writing
1179 provided that it is a regular file. Replaces common code found in...
1180 (bfd_close): here and ...
1181 (bfd_close_all_done): here.
1182
f865a31d
AG
11832009-06-11 Anthony Green <green@moxielogic.com>
1184
1185 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
1186 * bfd-in2.h: Rebuilt.
1187 * libbfd.h: Rebuilt.
1188 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
1189 relocation support.
1190 (moxie_reloc_map): Ditto.
1191 Clean up copyright notice.
1192
25b88f33
PP
11932009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1194
1372b818 1195 * bfd-in2.h: bfd_mmap prototype.
25b88f33
PP
1196 * bfdio.c (bfd_mmap): New function.
1197 * libbfd.h (bfd_iovec): Add bmmap.
1372b818 1198 * cache.c (cache_bmmap): New function.
25b88f33
PP
1199 (cache_iovec): Initialize bmmap member.
1200 * opencls.c (opncls_bmmap): New function.
1201 (opncls_iovec): Initialize bmmap member.
1202
c2f09c75
TG
12032009-06-09 Tristan Gingold <gingold@adacore.com>
1204
1205 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
1206 and stabstr_segment fields.
1207 (mach_o_be_vec, mach_o_le_vec): Removed
1208 (bfd_mach_o_version): New prototype.
1209
1210 * mach-o.c (bfd_mach_o_version): Make this function public.
1211 (mach_o_wide_p): New function.
1212 (bfd_mach_o_wide_p): Ditto.
1213 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
1214 weird names.
1215 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
1216 Search in the list only if the name starts with a dot.
1217 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
1218 test. Check bfd_seek status.
1219 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
1220 (bfd_mach_o_scan_write_section_32): Ditto.
1221 (bfd_mach_o_scan_write_section_64): Ditto.
1222 (bfd_mach_o_scan_write_section): Removed.
1223 (bfd_mach_o_scan_write_segment): Split into ...
1224 (bfd_mach_o_scan_write_segment_32): ... this and ...
1225 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
1226 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
1227 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
1228 symbol table. Now returns a boolean.
1229 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
1230 Adjust for status type.
1231 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
1232 test. Write symbol table. Numbers the sections.
1233 (bfd_mach_o_read_header): Check bfd_seek status.
1234 Use mach_o_wide_p instead of hard-coded test.
1235 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
1236 (bfd_mach_o_scan_read_section_64): Ditto.
1237 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
1238 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
1239 handled common symbols.
1240 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
1241 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1242 (bfd_mach_o_scan_read_dylinker): Ditto.
1243 (bfd_mach_o_scan_read_dylib): Ditto.
1244 (bfd_mach_o_scan_read_thread): Ditto.
1245 (bfd_mach_o_scan_read_symtab): Ditto.
1246 Do not create a section for the stabs.
1247 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1248 (bfd_mach_o_scan_read_segment): Ditto.
1249 (bfd_mach_o_scan_read_command): Ditto.
1250 (bfd_mach_o_scan_start_address): Ditto.
1251 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
1252 (bfd_mach_o_archive_p): Check bfd_seek status.
1253 (bfd_mach_o_core_fetch_environment): Ditto.
1254
1255 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
1256
2a81c24a
L
12572009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1258
1259 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
1260 (elf_i386_link_hash_table_create): Initialize irelifunc.
1261 (elf_i386_check_relocs): Updated. Set up irelifunc for
1262 shared objects.
1263 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
1264 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1265 shared objects.
1266 (elf_i386_relocate_section): Likewise.
1267
1268 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
1269 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
1270 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
1271 shared objects.
1272 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
1273 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1274 shared objects.
1275 (elf64_x86_64_relocate_section): Likewise.
1276
1277 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
1278 ...
1279 (_bfd_elf_create_ifunc_sections): This.
1280
c2f09c75 1281 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2a81c24a
L
1282 ...
1283 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
1284 for shared objects.
1285
710ab287
L
12862009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1287
1288 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
1289 relocation for R_386_32 against STT_GNU_IFUNC symbol when
1290 building shared object. Check info->executable instead of
1291 !info->shared when setting non_got_ref.
1292 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
1293 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1294 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
1295 symbol if needed.
1296 (elf_i386_relocate_section): Output dynamic relocation for
1297 R_386_32 against STT_GNU_IFUNC symbol to get the real
1298 function address when building shared object.
1299 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
1300 relocation for STT_GNU_IFUNC symbol in shared object.
1301
1302 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
1303 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
1304 symbol when building shared object. Check info->executable
1305 instead of !info->shared when setting non_got_ref.
1306 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
1307 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1308 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
1309 if needed.
1310 (elf64_x86_64_relocate_section): Output dynamic relocation
1311 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
1312 function address when building shared object.
1313 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
1314 relocation for STT_GNU_IFUNC symbol in shared object.
1315
9e93c730
JK
13162009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1317
1318 * Makefile.am: Run "make dep-am".
1319 (BFD32_BACKENDS): Add mach-o-i386.lo.
1320 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
1321 * Makefile.in: Regenerate.
1322
74681fc4
AM
13232009-06-06 Alan Modra <amodra@bigpond.net.au>
1324
1325 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
1326 when looking for soft-icache stubs.
1327
154a1ee5
TG
13282009-06-05 Tristan Gingold <gingold@adacore.com>
1329
1330 * mach-o.h: Update copyright year.
1331 (bfd_mach_o_mach_header_magic): New enum.
1332 (bfd_mach_o_cpu_subtype): Now an enum.
1333 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
1334 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
1335 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
1336 (bfd_mach_o_load_command): Field type_required is now a boolean.
1337 Reindent prototypes.
1338 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
1339 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
1340 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1341 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1342 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1343 (bfd_mach_o_canonicalize_symtab): Ditto.
1344 (bfd_mach_o_get_symbol_info): Ditto.
1345 (bfd_mach_o_print_symbol): Ditto.
1346 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1347 (bfd_mach_o_make_empty_symbol): Ditto.
1348 (bfd_mach_o_write_contents): Ditto.
1349
1350 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1351 bfd_mach_o_mkobject): Defines.
1352 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1353 Do not check with target vector but with flavour.
1354 (struct mach_o_section_name_xlat): New declaration.
1355 (dwarf_section_names_xlat): Ditto.
1356 (text_section_names_xlat): Ditto.
1357 (data_section_names_xlat): Ditto.
1358 (struct mach_o_segment_name_xlat): Ditto.
1359 (segsec_names_xlat): Ditto.
1360 (bfd_mach_o_convert_section_name_to_bfd): New function.
1361 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1362 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1363 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1364 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1365 Accept any input and output flavour. Do not share private data
1366 anymore.
1367 (bfd_mach_o_count_symbols): Add a comment.
1368 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1369 (bfd_mach_o_canonicalize_symtab): Ditto.
1370 (bfd_mach_o_get_symbol_info): Ditto.
1371 (bfd_mach_o_print_symbol): Ditto.
1372 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1373 Use constants instead of hard-coded values.
1374 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1375 values.
1376 (bfd_mach_o_scan_write_section_64): Ditto.
1377 (bfd_mach_o_scan_write_segment): Ditto.
1378 Do not copy sections anymore.
1379 (bfd_mach_o_write_contents): Make it public.
1380 Remove dead code. Rewrite typeflag assignment.
1381 (bfd_mach_o_build_commands): New function.
1382 (bfd_mach_o_set_section_contents): Ditto.
1383 (bfd_mach_o_make_empty_symbol): Make it public.
1384 (bfd_mach_o_read_header): Make it static.
1385 Convert to bfd_boolean.
1386 Use constants instead of hard-coded values.
1387 (bfd_mach_o_make_bfd_section): Call
1388 bfd_mach_o_convert_section_name_to_bfd to create name.
1389 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
1390 values.
1391 (bfd_mach_o_scan_read_section_64): Ditto.
1392 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
1393 a segment anymore. Use constants instead of hard-coded values.
1394 (bfd_mach_o_scan_read_command): Fix style.
1395 (bfd_mach_o_scan): Use constants instead of hard-coded values.
1396 Get rid of BFD_IO_FUNCS.
1397 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
1398 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
1399 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
1400 (bfd_mach_o_object_p): Removed.
1401 (bfd_mach_o_gen_core_p): New function, replaces ...
1402 (bfd_mach_o_core_p): ... deleted.
1403 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
1404
1405 * mach-o-i386.c: New file.
1406 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
1407 * configure.in (TDEFINES): Add mach_o_i386_vec.
1408 * configure: Regenerated.
1409 * targets.c: Add mach_o_i386_vec.
1410
1411 * mach-o.c: Update copyright years.
1412 (BFD_IO_FUNCS): Remove (was not used).
1413 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
1414 bfd_mach_o_slurp_extended_name_table,
1415 bfd_mach_o_construct_extended_name_table,
1416 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
1417 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
1418 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
1419 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
1420 bfd_mach_o_get_section_contents_in_window,
1421 bfd_mach_o_bfd_is_local_label_name,
1422 bfd_mach_o_bfd_is_target_special_symbol,
1423 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
1424 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
1425 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
1426 bfd_mach_o_minisymbol_to_symbol,
1427 bfd_mach_o_bfd_get_relocated_section_contents,
1428 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
1429 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
1430 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
1431 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
1432 bfd_mach_o_bfd_merge_private_bfd_data,
1433 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
1434 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
1435 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
1436 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
1437 bfd_mach_o_bfd_copy_private_header_data,
1438 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
1439 * mach-o-target.c: ... here.
1440 Update copyright years.
1441
a1ef399e
AM
14422009-06-04 Alan Modra <amodra@bigpond.net.au>
1443
1444 * dep-in.sed: Don't use \n in replacement part of s command.
1445 * Makefile.am (DEP1): LC_ALL for uniq.
1446 Run "make dep-am".
1447 * Makefile.in: Regenerate.
1448
2e75bb35
L
14492009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1450
1451 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
1452 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
1453 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1454
0018b0a3
L
14552009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1456
1457 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
1458 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1459 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
1460 against STT_GNU_IFUNC symbols for static executables.
1461 (elf_i386_finish_dynamic_symbol): Load GOT entry with
1462 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1463
1464 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
1465 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1466 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
1467 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1468
94313f36
RS
14692009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
1470
1471 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
1472 symbols to be left unimported when linking statically.
1473 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
1474 code when linking statically.
1475
7afd84dc
L
14762009-06-02 H.J. Lu <hongjiu.lu@intel.com>
1477
1478 * elf32-i386.c (elf_i386_check_relocs): Increment
1479 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
1480 against STT_GNU_IFUNC symbol.
1481 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
1482 local STT_GNU_IFUNC definition is used.
1483 (elf_i386_relocate_section): Handle got.offset != -1 for
1484 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
1485 symbol.
1486
1487 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
1488 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
1489 relocations against STT_GNU_IFUNC symbol.
1490 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
1491 local STT_GNU_IFUNC definition is used.
1492 (elf64_x86_64_relocate_section): Handle got.offset != -1
1493 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
1494 STT_GNU_IFUNC symbol.
1495
cbe950e9
L
14962009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1497
1498 PR ld/10205
1499 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
1500 (elf_i386_reloc_type_lookup): Likewise.
1501 (R_386_tls): Removed.
1502 (R_386_irelative): New.
1503 (R_386_vt_offset): Updated.
1504 (elf_i386_rtype_to_howto): Likewise.
1505 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
1506 (elf_i386_link_hash_table_create): Initialize igotplt,
1507 iplt and irelplt.
1508 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
1509 (elf_i386_adjust_dynamic_symbol): Likewise.
1510 (elf_i386_allocate_dynrelocs): Likewise.
1511 (elf_i386_relocate_section): Likewise.
1512 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
1513 sections.
1514 (elf_i386_finish_dynamic_symbol): When building a static
1515 executable, use .iplt, .igot.plt and .rel.iplt sections for
1516 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
1517 locally defined STT_GNU_IFUNC symbol.
1518
1519 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
1520 (x86_64_reloc_map): Likewise.
1521 (R_X86_64_standard): Updated.
1522 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
1523 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
1524 iplt and irelplt.
1525 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
1526 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1527 (elf64_x86_64_allocate_dynrelocs): Likewise.
1528 (elf64_x86_64_relocate_section): Likewise.
1529 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
1530 sections.
1531 (elf64_x86_64_finish_dynamic_symbol): When building a static
1532 executable, use .iplt, .igot.plt and .rela.iplt sections for
1533 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
1534 for locally defined STT_GNU_IFUNC symbol.
1535
1536 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
1537 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
1538
1539 * bfd-in2.h: Regenerated.
1540 * libbfd.h: Likewise.
1541
3aa14d16
L
15422009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
1545 (_bfd_elf_make_ifunc_reloc_section): Removed.
1546 (_bfd_elf_is_ifunc_symbol): Likewise.
1547 (_bfd_elf_create_static_ifunc_sections): New.
1548
1549 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
1550 symbol check to ...
1551 (elf_link_add_object_symbols): Here.
1552 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
1553 STT_GNU_IFUNC symbol.
1554 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
1555 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
1556 (IFUNC_INFIX): Removed.
1557 (get_ifunc_reloc_section_name): Likewise.
1558 (_bfd_elf_make_ifunc_reloc_section): Likewise.
1559 (_bfd_elf_is_ifunc_symbol): Likewise.
1560 (_bfd_elf_create_static_ifunc_sections): New.
1561
eb4ff4d6
L
15622009-05-29 H.J. Lu <hongjiu.lu@intel.com>
1563
1564 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
1565 (create_got_section): Likewise.
1566 (allocate_dynrelocs): Likewise.
1567 (readonly_dynrelocs): Likewise.
1568 (set_tls_module_base): Likewise.
1569 (dtpoff_base): Likewise.
1570 (tpoff): Likewise.
1571 (elf_i386_link_hash_table_create): Updated.
1572 (elf_i386_create_dynamic_sections): Likewise.
1573 (elf_i386_check_relocs): Likewise.
1574 (elf_i386_size_dynamic_sections): Likewise.
1575 (elf_i386_relocate_section): Likewise.
1576
1577 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
1578 (create_got_section): Likewise.
1579 (allocate_dynrelocs): Likewise.
1580 (readonly_dynrelocs): Likewise.
1581 (set_tls_module_base): Likewise.
1582 (dtpoff_base): Likewise.
1583 (tpoff): Likewise.
1584 (elf64_x86_64_link_hash_table_create): Updated.
1585 (elf64_x86_64_create_dynamic_sections): Likewise.
1586 (elf64_x86_64_check_relocs): Likewise.
1587 (elf64_x86_64_size_dynamic_sections): Likewise.
1588 (elf64_x86_64_relocate_section): Likewise.
1589
fc579192
NC
15902009-05-28 Nick Clifton <nickc@redhat.com>
1591
1592 * targets.c (_bfd_target_vector): Only include plugin target in
1593 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
1594
5ebe2858
UW
15952009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1596
1597 * elf32-spu.c (struct call_info): New member broken_cycle.
1598 (remove_cycle): Instead of physically removing call_info structures
1599 to break call graph cycles, mark them using the broken_cycle flag.
1600 (mark_overlay_section): Respect broken_cycle flag.
1601 (unmark_overlay_section): Likewise.
1602 (collect_lib_sections): Likewise.
1603 (collect_overlays): Likewise.
1604 (sum_stack): Likewise.
1605
34ad4cb0
UW
16062009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1607
1608 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
1609 (mark_functions_via_relocs): Initialize callee->count to 1.
1610 (pasted_function): Likewise.
1611 (spu_elf_auto_overlay): Honor call counts when determining number
1612 of stubs required in software i-cache mode.
1613
fc579192
NC
16142009-05-27 Rafael Avila de Espindola <espindola@google.com>
1615
1616 * plugin.c (program_name): Remove.
1617 (plugin_program_name): New.
1618 (bfd_plugin_set_program_name): New.
1619 (try_load_plugin): Use plugin_program_name.
1620 * plugin.h (bfd_plugin_set_program_name): New.
1621
16222009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
1623
1624 * aclocal.m4: Include ../config/plugins.m4.
1625 * configure.in: Use AC_PLUGINS.
1626 * configure: Regenerate.
1627 * Makefile.in: Regenerate.
1628 * doc/Makefile.in: Regenerate.
1629
c8a1f254
NS
16302009-05-27 Nathan Sidwell <nathan@codesourcery.com>
1631
1632 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
1633 link.
1634 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
1635 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
1636 * elf32-avr.c (elf32_avr_relax_section): Likewise.
1637 * elf32-frv.c (elf32_avr_relax_section): Likewise.
1638 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
1639 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1640 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1641 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
1642 * reloc.c (bfd_generic_relax_section): Likewise.
1643 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
1644 * vms.c (vms_bfd_relax_section): Likewise.
1645
68d7e96a
L
16462009-05-26 H.J. Lu <hongjiu.lu@intel.com>
1647
1648 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
1649
1650 * elf32-i386.c (is_indirect_symbol): Renamed to ...
1651 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
1652
1653 * elf32-i386.c (allocate_dynrelocs): Updated.
1654 (elf_i386_relocate_section): Likewise.
1655 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1656 (elf64_x86_64_relocate_section): Likewise.
1657
1658 * elf64-x86-64.c (is_indirect_symbol): Removed.
1659
f12e7348
NC
16602009-05-26 Nick Clifton <nickc@redhat.com>
1661
1662 * po/id.po: Updated Indonesian translation.
1663
ce3c775b
NC
16642009-05-26 Rafael Avila de Espindola <espindola@google.com>
1665
1666 * Makefile.am: Run "make dep-am".
1667 (AM_CPPFLAGS): New.
1668 (LIBDL): New.
1669 (ALL_MACHINES): Add cpu-plugin.lo.
1670 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
1671 (BFD32_BACKENDS): Add plugin.lo.
1672 (BFD32_BACKENDS_CFILES): Add plugin.c.
1673 (libbfd_la_LIBADD): Add LIBDL
1674 * archures.c (bfd_architecture): Add bfd_arch_plugin.
1675 (bfd_plugin_arch): Declare.
1676 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
1677 * bfd.c (bfd): Add plugin_data.
1678 * config.bfd: Handle the plugin target.
1679 * configure.in: Check for --enable-plugins.
1680 (LT_INIT): Use the dlopen option.
1681 * cpu-plugin.c: New.
1682 * plugin.c: New.
1683 * plugin.h: New.
1684 * targets.c (plugin_vec): Declare.
1685 (_bfd_target_vector): Add plugin_vec.
1686 * Makefile.in: Regenerate.
1687 * bfd-in2.h: Regenerate.
1688 * configure: Regenerate.
1689
9e097a72
AM
16902009-05-26 Alan Modra <amodra@bigpond.net.au>
1691
1692 * dep-in.sed: Don't modify .o to .lo here. Output one filename
1693 per line with all lines having continuation backslash. Prefix
1694 first line with "A", following lines with "B".
1695 * Makefile.am (DEP): Don't use dep.sed here.
1696 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
1697 dep.sed here on dependencies, sort and uniq.
1698 * Makefile.in: Regenerate.
1699
d5acff2f
TG
17002009-05-25 Tristan Gingold <gingold@adacore.com>
1701
1702 * makefile.vms: Add verilog.obj to object list OBJS.
1703
5c93f09b
AM
17042009-05-24 Alan Modra <amodra@bigpond.net.au>
1705
1706 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
1707 for BFD_IN_MEMORY is cleared.
1708 (bfd_bwrite): Zero excess memory allocated.
1709
48229727
JB
17102009-05-22 Julian Brown <julian@codesourcery.com>
1711
1712 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
1713 macros.
1714 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
1715 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
1716 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
1717 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
1718 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
1719 (a8_erratum_fix, a8_erratum_reloc): New structs.
1720 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
1721 num_a8_erratum_fixes, fix_cortex_a8 fields.
1722 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
1723 (elf32_arm_add_stub): Split into two parts, creating...
1724 (elf32_arm_create_or_find_stub_sec): New function.
1725 (elf32_arm_final_link_relocate): Add forward declaration.
1726 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
1727 relocations, multiple relocations per stub.
1728 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
1729 (arm_size_one_stub): Use find_stub_size_and_template.
1730 (a8_reloc_compare): New.
1731 (find_thumb_glue): Add forward declaration.
1732 (cortex_a8_erratum_scan): New.
1733 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
1734 (bfd_elf32_arm_set_cortex_a8_fix): New.
1735 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
1736 (arm_map_one_stub): Add THUMB32_TYPE support.
1737 (a8_branch_to_stub_data): New.
1738 (make_branch_to_a8_stub): New.
1739 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
1740 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
1741 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
1742 Cortex-A8 erratum workaround.
1743 * bfd-in2.h: Regenerate.
1744
2b3decb5
AM
17452009-05-22 Alan Modra <amodra@bigpond.net.au>
1746
1747 * Makefile.am: Run "make dep-am".
1748 * Makefile.in: Regenerate.
1749 * po/SRC-POTFILES.in: Regenerate.
1750
930e005c
AM
17512009-05-21 Alan Modra <amodra@bigpond.net.au>
1752
1753 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
1754 commit.
1755
6e0b88f1
AM
17562009-05-21 Alan Modra <amodra@bigpond.net.au>
1757
1758 * elf-bfd.h (struct elf_backend_data
1759 <elf_backend_link_output_symbol_hook>): Return an int.
1760 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
1761 symbols on deleted .opd entries.
1762 * elflink.c (elf_link_output_sym): Return without outputting sym
1763 if output_symbol_hook returns 2.
1764 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
1765 Abort if we must not discard sym.
1766 (elf_link_input_bfd): Similarly, don't set finfo->indices for
1767 local syms.
1768 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
1769 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
1770 elf_backend_link_output_symbol_hook return type change.
1771 * elf32-arm.c (output_arch_syminfo): Likewise.
1772 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
1773 (elf32_arm_output_arch_local_syms): Likewise.
1774 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
1775 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
1776 (bfd_score_elf_link_output_symbol_hook): Likewise.
1777 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1778 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1779 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
1780 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
1781 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
1782 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
1783 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
1784 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
1785 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
1786 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1787 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1788
5ef11c02
AM
17892009-05-21 Alan Modra <amodra@bigpond.net.au>
1790
1791 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
1792 out of range .opd symbols.
1793
ebf12fbe
DK
17942009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
1795
1796 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
1797 fprintf_vma directly.
1798 * peXXigen.c (pe_print_edata): Likewise.
1799 (pe_print_pdata): Likewise.
1800 (_bfd_XX_print_ce_compressed_pdata): Likewise.
1801 (_bfd_XX_print_private_bfd_data_common): Likewise.
1802
c1711530
DK
18032009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
1804
1805 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
1806
22a8f80e 18072009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 1808 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
1809
1810 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
1811 fix discarded sections.
1812
335bd8f2
UW
18132009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1814
1815 * elf32-spu.c (mark_overlay_section): Move .init and .fini
1816 sections into the software icache.
1817
cdc83fba
UW
18182009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1819
1820 * elf32-spu.c (build_stub): Always build "compact" sofware
1821 i-cache stubs.
1822
97fc8d84
UW
18232009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1824
1825 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
1826 (spu_elf_setup): Initialize it.
1827 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
1828 Update to new-sytle cache manager data structures.
1829 (spu_elf_build_stubs): Generate new-style cache manager data
1830 structures and symbols.
1831 (spu_elf_auto_overlay): Update size computation.
1832
452de53c
UW
18332009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1834
1835 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
1836 segments first amongst the program headers.
1837
d342a8b1
UW
18382009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1839
1840 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
1841 into addresses for relocation types that look at high bits. Remove
1842 special handling of relocation overflow warnings.
1843
cc210763
UW
18442009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1845
1846 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
1847 control flow graph between fragments of a function.
1848
c1ea05bb
UW
18492009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1850
1851 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
1852 generate only a 16-byte .toe section.
1853 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
1854
bbb0fc04
AM
18552009-05-14 Alan Modra <amodra@bigpond.net.au>
1856
1857 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
1858 (spu_elf_place_overlay_data): ..here. New function.
1859 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
1860
6e6718a3
AJ
18612009-05-13 Andrew Jenner <andrew@codesourcery.com>
1862
1863 * elf32-arm.c: Move sysdep.h to start of file.
1864
77ae44b0
AM
18652009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
1866
1867 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
1868 start of overlays.
1869 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
1870 __icache_tag_array and __icache_tag_array_size.
1871
51408ec2
AM
18722009-05-11 Masaki Muranaka <monaka@monami-software.com>
1873
1874 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
1875 ATTRIBUTE_UNUSED.
1876 (bfinfdpic_link_omit_section_dynsym): Likewise.
1877 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
1878
2468f9c9
PB
18792009-05-05 Paul Brook <paul@codesourcery.com>
1880
1881 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
1882 * bfd-in2.h: Regenerate.
1883 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
1884 (_arm_elf_section_data): Add text and exidx fields.
1885 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
1886 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
1887 copy_exidx_entry): New functions.
1888 (elf32_arm_write_section): Fixup .ARM.exidx contents.
1889
738a79f6
CL
18902009-05-05 Christophe lyon <christophe.lyon@st.com>
1891
1892 * elf32-arm.c (DEF_STUBS): New helper define.
1893 (DEF_STUB): Likewise.
1894 (stub_def): New type.
1895 (stub_definitions): New array, containing stub template pointers
1896 and sizes.
1897 (arm_size_one_stub): Make use of stub_definitions.
1898
09e2aba4
DK
18992009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
1900
1901 * elflink.c (find_version_for_sym): Remove from here, ...
1902 * linker.c (bfd_find_version_for_sym): ... rename, replace
1903 here, make public and update all callers.
1904 * bfd-in2.h: Regenerate.
1905
d8045f23
NC
19062009-04-30 Nick Clifton <nickc@redhat.com>
1907
1908 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
1909 section pointer.
1910 (struct elf_obj_data): Add has_ifunc_symbols boolean.
1911 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
1912 into a STT_GNU_IFUNC symbol type.
1913 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
1914 type.
1915 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
1916 the binary contains ifunc symbols.
1917 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
1918 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
1919 * elf32-i386.c (is_indirect_function): New function.
1920 (elf_i386_check_relocs): Create an ifunc output section.
1921 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
1922 section if necessary.
1923 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
1924 if necessary.
1925 (elf_i386_add_symbol_hook): New function. Set the
1926 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
1927 symbol is encountered.
1928 (elf_backend_post_process_headers): Define.
1929 (elf_backend_add_symbol_hook): Define.
1930 (elf_i386_post_process_headers): Rename to
1931 elf_i388_fbsd_post_process_headers.
1932 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
1933 (is_indirect_function): New function.
1934 (elf64_x86_64_check_relocs): Create an ifunc output section.
1935 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
1936 section if necessary.
1937 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
1938 symbol if necessary.
1939 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
1940 elf_obj_data structure if an ifunc symbol is encountered.
1941 (elf_backend_post_process_headers): Define.
1942 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
1943 if we have ifunc symbols to handle.
1944 (get_ifunc_reloc_section_name): New function. Computes the name
1945 for an ifunc section.
1946 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
1947 section to hold ifunc relocs.
1948 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
1949 (bfd_print_symbol_vandf): Handle ifunc symbols.
1950 (bfd_decode_symclass): Likewise.
1951 * bfd-in2.h: Regenerate.
1952
96c23d59
JM
19532009-04-30 Joseph Myers <joseph@codesourcery.com>
1954
1955 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
1956 MOVW and MOVT relocations in a shared library link.
1957
c067354b
NC
19582009-04-27 Anthony Green <green@moxielogic.com>
1959
1960 * verilog.c: New file.
1961 * Makefile.am (BFD32_LIBS): Add verilog.c.
1962 (BFD32_LIBS_CFILES): Add verilog.c.
1963 (verilog.lo): New build rule.
1964 * Makefile.in: Rebuilt.
1965 * targets.c: Add verilog support.
1966 * bfd.c (tdata union): Add Verilog private data field.
1967 * bfd-in2.h: Regenerate.
1968
325c681d
L
19692009-04-27 H.J. Lu <hongjiu.lu@intel.com>
1970
1971 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
1972 copy pe_opthdr.
1973
ba775898
DK
19742009-04-23 Matthias Klose <doko@ubuntu.com>
1975
2e28a5fc 1976 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 1977
155d87d7
CL
19782009-04-22 Christophe Lyon <christophe.lyon@st.com>
1979
1980 PR9743
1981 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
1982 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1983 (elf32_arm_size_stubs): Likewise.
1984 (record_thumb_to_arm_glue): Deleted unused function.
1985 (bfd_elf32_arm_process_before_allocation): No longer handle
1986 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
1987 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
1988 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1989
3e6b1042
DJ
19902009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
1991
1992 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
1993 (elf32_arm_write_section): Declare early.
1994 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
1995 (arm_allocate_glue_section_space): Exclude empty sections.
1996 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
1997 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
1998 BFD.
1999 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2000 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2001 (elf32_arm_size_dynamic_sections): Allocate interworking
2002 sections here.
2003 (bfd_elf32_bfd_final_link): Define.
2004
4f360784
L
20052009-04-21 H.J. Lu <hongjiu.lu@intel.com>
2006
2007 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 2008
4f360784
L
2009 * coffcode.h (coff_compute_section_file_positions): Clear
2010 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2011
2012 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2013 force_minimum_alignment.
2014
2015 * libcoff.h: Regenerated.
2016
2017 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2018 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2019
2020 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2021 nor target_subsystem.
2022
2023 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2024 force_minimum_alignment nor target_subsystem.
2025
e48570bb
DK
20262009-04-21 Kai Tietz <kai.tietz@onevision.com>
2027
2028 * coff-x86_64.c (PEI_HEADERS): Protect includes.
2029 (bfd_pe_print_pdata): Remove #ifdef PE variation.
2030 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2031 include in coff-x86_64.c of headers.
2032 (PDATA_ROW_SIZE): New define.
2033 (pex_regs[]): New static array.
2034 (pex64_get_runtime_function): New static function.
2035 (pex64_get_unwind_info): Likewise.
2036 (pex64_get_scope_entry): Likewise.
2037 (pex64_xdata_print_uwd_codes): Likewise.
2038 (pex64_get_section_by_rva): Likewise.
2039 (pex64_dump_xdata): Likewise.
2040 (pex64_bfd_print_pdata): Likewise.
2041 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2042 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2043 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2044
383c383f 20452009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
2046 Alan Modra <amodra@bigpond.net.au>
2047 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
2048
2049 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2050 long names and non-NUL-terminated strings.
2051
b6b450f1
L
20522009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2053
2054 * bfd-in2.h: Regenerated.
2055
d9118602
L
20562009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2057
2058 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2059 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2060
92dd4511
L
20612009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2062
2063 PR binutils/10074
2064 * coffcode.h (bfd_pei_p): New.
2065
2066 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2067 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2068 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2069 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
2070 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
2071 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
2072
2073 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
2074 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2075 bfd_efi_rtdrv_x86_64_vec,
2076 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
2077 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
2078 * targets.c: Likewise.
2079
2080 * configure: Regenerated.
2081 * libcoff.h: Likewise.
2082 * Makefile.in: Likewise.
2083
2084 * efi-app-ia32.c: Removed.
2085 * efi-app-x86_64.c: Likewise.
2086 * efi-bsdrv-ia32.c: Likewise.
2087 * efi-bsdrv-ia64.c: Likewise.
2088 * efi-bsdrv-x86_64.c: Likewise.
2089 * efi-rtdrv-ia32.c: Likewise.
2090 * efi-rtdrv-ia64.c: Likewise.
2091 * efi-rtdrv-x86_64.c: Likewise.
2092 * efi-rtdrv-ia32.c: Likewise.
2093
2094 * efi-app-ia64.c: Moved to ...
2095 * pei-ia64.c: This.
2096 (TARGET_SYM): Set to bfd_pei_ia64_vec.
2097 (TARGET_NAME): Set to pei-ia64.
2098
2099 * libpei.h (bfd_target_pei_p): Removed.
2100 (bfd_target_pei_arch): Likewise.
2101 (bfd_target_efi_app_p): Likewise.
2102 (bfd_target_efi_app_arch): Likewise.
2103 (bfd_target_efi_bsdrv_p): Likewise.
2104 (bfd_target_efi_bsdrv_arch): Likewise.
2105 (bfd_target_efi_rtdrv_p): Likewise.
2106 (bfd_target_efi_rtdrv_arch): Likewise.
2107 (bfd_pe_executable_p): Likewise.
2108
2109 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
2110 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
2111 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
2112 and efi-rtdrv-ia32.c.
2113 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
2114 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
2115 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
2116 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
2117 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
2118 efi-rtdrv-x86_64.c. Add pei-ia64.c.
2119 (efi-app-ia64.lo): Removed.
2120 (efi-bsdrv-ia32.lo): Likewise.
2121 (efi-rtdrv-ia32.lo): Likewise.
2122 (efi-app-ia64.lo): Likewise.
2123 (efi-bsdrv-ia64.lo): Likewise.
2124 (efi-rtdrv-ia64.lo): Likewise.
2125 (efi-app-x86_64.lo): Likewise.
2126 (efi-bsdrv-x86_64.lo): Likewise.
2127 (efi-rtdrv-x86_64.lo): Likewise.
2128 (pei-ia64.lo): New.
2129
2130 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
2131 with bfd_pei_p.
2132 (arch_type): Removed.
2133 (pe_arch): Likewise.
2134 (pe_bfd_object_p): Just return coff_object_p.
2135
2136 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
2137 bfd_pe_executable_p with bfd_pei_p.
2138
69c5861e
CL
21392009-04-17 Christophe Lyon <christophe.lyon@st.com>
2140
2141 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
2142 PLT entries to an undefined symbol when generating a shared
2143 library.
2144
e9cd0660
NC
21452009-04-17 Nick Clifton <nickc@redhat.com>
2146
2147 PR 9909
2148 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2149
3023e3f6
RS
21502009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
2151
2152 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
2153 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
2154 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
2155 * binary.c (binary_bfd_define_common_symbol): Likewise.
2156 * bout.c (b_out_bfd_define_common_symbol): Likewise.
2157 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2158 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2159 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
2160 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
2161 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
2162 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
2163 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
2164 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
2165 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
2166 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
2167 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
2168 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
2169 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
2170 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
2171 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
2172 * som.c (som_bfd_define_common_symbol): Likewise.
2173 * srec.c (srec_bfd_define_common_symbol): Likewise.
2174 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
2175 * versados.c (versados_bfd_define_common_symbol): Likewise.
2176 * vms.c (vms_bfd_define_common_symbol): Likewise.
2177 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
2178 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
2179 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
2180 (pmac_xcoff_vec): Likewise.
2181 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2182 (aix5coff64_vec): Likewise.
2183 * linker.c (bfd_generic_define_common_symbol): New function.
2184 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
2185 (_bfd_define_common_symbol): New field.
2186 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
2187 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
2188 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
2189 symbols here.
2190 * bfd-in2.h: Regenerate.
2191 * libbfd.h: Likewise.
2192 * libcoff.h: Likewise.
2193
20135e4c
NC
21942009-04-15 Anthony Green <green@moxielogic.com>
2195
2196 * targets.c: Add moxie support.
2197 * Makefile.am: Ditto.
2198 * Makefile.in: Rebuilt.
2199 * cpu-moxie.c, elf32-moxie.c: New files.
2200 * archures.c: Add moxie support.
2201 * configure.in: Add moxie support.
2202 * configure: Rebuilt.
2203 * config.bfd, archures.c: Add moxie support.
2204 * bfd-in2.h: Rebuilt.
2205
82b5c97a
CL
22062009-04-15 Christophe Lyon <christophe.lyon@st.com>
2207
2208 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
2209 branch to an undef weak symbol into a jump to next instruction if
2210 a PLT entry will be created.
2211
0408dee6
DK
22122009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
2213
2214 * coffgen.c (make_a_section_from_file): Set the backend long
2215 section names enable if long section names found on input.
2216 * coffcode.h: Extend long section names documentation to match.
2217
a0c402a5
L
22182009-04-08 H.J. Lu <hongjiu.lu@intel.com>
2219
2220 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
2221 machine code.
2222
4d28413b
DD
22232009-04-07 DJ Delorie <dj@redhat.com>
2224
2225 * archures.c: Add bfd_mach_mep_c5.
2226 * bfd-in2.h: Likewise.
2227 * cpu-mep.c: Add bfd_c5_arch.
2228 * elf32-mep.c: Support it.
2229
bb6198d2
L
22302009-04-07 H.J. Lu <hongjiu.lu@intel.com>
2231
2232 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
2233 info->callbacks->einfo.
2234 * linker.c (_bfd_generic_section_already_linked): Likewise.
2235
bcb012d3
DD
22362009-04-06 DJ Delorie <dj@redhat.com>
2237
2238 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2239
db1fe6e9
L
22402009-04-06 H.J. Lu <hongjiu.lu@intel.com>
2241
2242 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
2243 _bfd_pex64_print_pdata only if PE is defined.
2244
2245 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
2246 (_bfd_pex64_print_pdata): This.
2247
2248 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2249 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
2250 is defined.
2251
c7c7219d
KT
22522009-04-05 Kai Tietz <kai.tietz@onevision.com>
2253
2254 * coff-x86_64.c (bfd_pe_print_pdata): Define as
2255 _bfd_pep_print_x64_pdata.
2256 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
2257 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2258
3df502ae
SA
22592009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2260
154a1ee5 2261 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
2262 to zero.
2263
d3626fb0
CL
22642009-04-02 Christophe Lyon <christophe.lyon@st.com>
2265
2266 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
2267 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
2268 branch stubs.
2269 (elf32_arm_stub_type): New enum values for the two new stubs.
2270 (arm_type_of_stub): Make use of the two new stubs.
2271 (arm_size_one_stub): Handle the two new stubs.
2272
fe723c87
MT
22732009-04-01 Matt Thomas <matt@netbsd.org>
2274
2275 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
2276 hidden symbols into the GOT or PLT.GOT.
154a1ee5 2277 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
2278 into a shared object if it is against a hidden symbol.
2279
ee698300
RS
22802009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2281
2282 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
2283 and know_contains_shared_object_p.
2284 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
2285 Cache the result in the archive_info table.
2286 (xcoff_auto_export_p): Add an "info" parameter and update the
2287 call to xcoff_archive_contains_shared_object_p.
2288 (xcoff_mark_auto_exports): Update accordingly.
2289 (xcoff_post_gc_symbol): Likewise.
2290
54e2dbe0
RS
22912009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2292
2293 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
2294 rather than C_EXT.
2295
2e470849
RS
22962009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2297
2298 * coff-rs6000.c (member_layout): New structure.
2299 (archive_iterator): Likewise.
2300 (member_layout_init): New function.
2301 (archive_iterator_begin): Likewise.
2302 (archive_iterator_next): Likewise.
2303 (xcoff_write_armap_old): Use the new iterator functions.
2304 (do_shared_object_padding): Delete.
2305 (xcoff_write_armap_big): Use the new iterator functions. Simplify
2306 handling of arch_info.
2307 (xcoff_write_archive_contents_old): Allocate arelt_data in the
2308 first loop rather than the second. Allocate a member header if
2309 there isn't one, then work out the stat information and length
2310 in the first loop too. Use the new iterators for the second loop.
2311 (xcoff_write_archive_contents_big): Likewise.
2312
24c611d1
RS
23132009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2314
2315 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
2316 (bfd_xcoff_set_archive_import_path): Likewise.
2317 * bfd-in2.h: Regenerate.
2318 * xcofflink.c: Include libiberty.h.
2319 (xcoff_archive_info): New structure.
2320 (xcoff_archive_info_hash): New function.
2321 (xcoff_archive_info_eq): Likewise.
2322 (xcoff_get_archive_info): Likewise.
2323 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
2324 (bfd_xcoff_split_import_path): New function.
2325 (bfd_xcoff_set_archive_import_path): Likewise.
2326 (xcoff_set_import_path): Move earlier in file.
2327 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
2328 object to the the directory part of the bfd's filename. Get the
2329 import path and filename of an archive object from the archive's
2330 xcoff_tdata, initializing it if necessary. Update use of
2331 import_file_id.
2332 (bfd_link_input_bfd): Update use of import_file_id.
2333 (xcoff_write_global_symbol): Likewise.
2334
d286971a
RS
23352009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2336
2337 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2338
23392009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2340
2341 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2342 a .loader section for relocatable links.
2343 (xcoff_need_ldrel_p): New function.
2344 (xcoff_mark): Use it.
2345 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2346 a loader section.
2347 (xcoff_build_ldsym): New function, split out from...
2348 (xcoff_build_ldsyms): ...here. Rename to...
2349 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2350 call xcoff_build_ldsym, if there's a loader section.
2351 (xcoff_build_loader_section): New function, extracted verbatim from...
2352 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2353 there's a loader section. Only add an __rtinit loader symbol
2354 if there's a loader section. Update after above name change.
2355 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2356 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2357 and xcoff_create_ldrel.
2358 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2359 (xcoff_reloc_link_order): Likewise, but only call it if there's
2360 a loader section. Use xcoff_symbol_section.
2361 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2362 if there's a loader section.
2363
8707bb87
RS
23642009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2365
2366 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2367
e780aef2
CL
23682009-04-01 Christophe Lyon <christophe.lyon@st.com>
2369
2370 * elf32-arm.c (group_sections): Rewrite loops for better
2371 readability.
2372
c301e700
DD
23732009-03-30 DJ Delorie <dj@redhat.com>
2374
2375 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2376 relocs when doing a relocatable link.
2377
3895f852
MM
23782009-03-28 Mark Mitchell <mark@codesourcery.com>
2379
2380 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
2381 "ERROR:", in error messages.
2382 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
2383 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
2384 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
2385 (elf32_arm_merge_eabi_attributes): Likewise.
2386 (elf32_arm_merge_private_bfd_data): Likewise.
2387
ea882e87
NC
23882009-03-27 Nick Clifton <nickc@redhat.com>
2389
2390 * section.c (bfd_get_section_contents): Detect and handle the case
2391 where a section has the SEC_IN_MEMORY flag set but no actual
2392 contents allocated.
2393
9433b9b1
AM
23942009-03-26 Alan Modra <amodra@bigpond.net.au>
2395
2396 PR 6494
2397 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
2398 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
2399 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
2400 if we don't find matching PT_LOAD when copying.
2401
dc1aa734
SR
24022009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
2403
2404 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
2405 the reloc descriptions.
2406
34d3d6b9
HPN
24072009-03-25 Hans-Peter Nilsson <hp@axis.com>
2408
2409 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2410 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
2411 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2412
34274ccc
L
24132009-03-24 H.J. Lu <hongjiu.lu@intel.com>
2414
2415 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
2416 (bfd_i386_arch_intel_syntax): Likewise.
2417 (i8086_arch): Likewise.
2418 (bfd_x86_64_arch): Likewise.
2419
019c5a2e
HPN
24202009-03-24 Hans-Peter Nilsson <hp@axis.com>
2421
6718f446
HPN
2422 * elf32-cris.c (cris_elf_relocate_section): <case
2423 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
2424 symbols for non-allocated sections. Don't check whether to
2425 generate R_CRIS_DTPMOD for non-allocated sections.
2426 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
2427 handle relocation GC:ing if applied to non-allocated section.
2428 (cris_elf_check_relocs): Similar.
2429
019c5a2e
HPN
2430 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2431 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
2432 when emitting a known TP offset in the GOT.
2433
ffcfec52
AM
24342009-03-23 Alan Modra <amodra@bigpond.net.au>
2435
2436 * elf64-ppc.c (synthetic_opd): Delete.
2437 (compare_symbols): Look for .opd name rather than section match.
2438 (ppc64_elf_get_synthetic_symtab): Likewise.
2439
c6dd29ce
AM
24402009-03-21 Alan Modra <amodra@bigpond.net.au>
2441
2442 * elf32-ppc.c (is_pic_glink_stub): Delete.
2443 (is_nonpic_glink_stub): New function.
2444 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
2445 than first pic one.
2446 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2447
8c21ca21
AK
24482009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2449 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2450
2451 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 2452 macros for visibilty and locality checks.
8c21ca21
AK
2453 (elf_s390_adjust_dynamic_symbol): Likewise.
2454 (allocate_dynrelocs): Likewise.
2455 (elf_s390_relocate_section): Likewise.
2456 (elf_s390_finish_dynamic_symbol): Likewise.
2457 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2458 (elf_s390_adjust_dynamic_symbol): Likewise.
2459 (allocate_dynrelocs): Likewise.
2460 (elf_s390_relocate_section): Likewise.
2461 (elf_s390_finish_dynamic_symbol): Likewise.
2462
156621f3
KT
24632009-03-19 Kai Tietz <kai.tietz@onevision.com>
2464
2465 * bfd-in2.h: Regenerated.
2466 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
2467 for debugging sections and map memory read/write dependent on
2468 SEC_COFF_NOREAD.
2469 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
2470 without memory read flags set.
2471 * section.c: Add SEC_COFF_NOREAD to section flags.
2472
d1fa68d3
AS
24732009-03-19 Andreas Schwab <schwab@linux-m68k.org>
2474
2475 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
2476 for format string.
2477
ad2adbc8
AM
24782009-03-19 Alan Modra <amodra@bigpond.net.au>
2479
2480 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
2481 "no overlays" return. If there are overlays, create overlay
2482 manager entry symbols here, so that..
2483 (spu_elf_build_stubs): ..we don't need to set them up here.
2484 Simplify entry symbol tests.
2485 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
2486
67cc5033
MK
24872009-03-18 Mark Kettenis <kettenis@gnu.org>
2488
d1fa68d3 2489 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
2490 (elfcore_grok_openbsd_note): New functions.
2491 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
2492
8d25cc3d
AM
24932009-03-18 Alan Modra <amodra@bigpond.net.au>
2494
3889c459 2495 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
2496 * elf32-m68hc1x.c: Include alloca-conf.h.
2497 * xsym.c: Likewise.
2498 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
2499 * som.c: Likewise.
2500 * Makefile.am: Run "make dep-am".
2501 * Makefile.in: Regenerate.
2502
a89e6478
DJ
25032009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2504
2505 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
2506
a7e11ee1
AM
25072009-03-17 Alan Modra <amodra@bigpond.net.au>
2508
2509 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
2510 Add compact_stub.
2511 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
2512 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
2513 ovly_return fields with ovly_entry[2]. Adjust all users.
2514 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
2515 when soft-icache.
2516 (spu_elf_build_stubs): Likewise.
2517 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
2518 ovly_flavour changes. Update all callers.
2519 (ovl_stub_size_log2): New function.
2520 (build_stub): Handle compact icache stubs. Use different manager
2521 entry point for stubs in non-icache area.
2522 (spu_elf_size_stubs): Don't allocate space for indirect branch
2523 descriptors.
2524 (spu_elf_build_stubs): And don't built them.
2525
607a83c9
AS
25262009-03-16 Andrew Stubbs <ams@codesourcery.com>
2527
2528 * dwarf2.c (read_section): Always use rawsize, if available.
2529
588f62fc
AM
25302009-03-16 Alan Modra <amodra@bigpond.net.au>
2531
2532 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
2533 of rawsize and size for buffer.
2534
a14c90c1
UW
25352009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2536
2537 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
2538 parameter just because fixed sections fit into local store.
2539 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
2540 generating overlays if fixed sections plus reserved stack
2541 and heap space fit into local store.
2542
30c665df
AM
25432009-03-15 Alan Modra <amodra@bigpond.net.au>
2544
2545 * elf32-spu.c (build_stub): Correct icache set_id.
2546 (spu_elf_relocate_section): Likewise.
2547
f95942a3
RS
25482009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2549
2550 * xcofflink.c (xcoff_link_check_archive_element): Only free the
2551 symbol table if it was created by the current call.
2552
670562e9
RS
25532009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2554
2555 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
2556 class XMC_DS rather than XMC_UA.
2557
b64232cc
RS
25582009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2559
2560 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
2561 bfd_boolean export_defineds parameter with an unsigned int
2562 auto_export_flags parameter.
2563 * bfd-in2.h: Regenerate.
2564 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
2565 split out from xcoff_build_ldsyms.
2566 (xcoff_covered_by_expall_p): New function.
2567 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
2568 but with extra code to handle -bexpfull and -bexpall.
2569 (xcoff_mark_auto_exports): New function.
2570 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
2571 a function should be automatically exported.
2572 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
2573 parameter with an auto_export_flags parameter. Update ldinfo
2574 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
2575 exported symbols.
2576
7d504122
RS
25772009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2578
2579 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
2580 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
2581 init and fini functions. Do garbage collection for objects
2582 without an entry point too.
2583
8602d4fe
RS
25842009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2585
2586 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
2587 check whether a symbol has csect information.
2588 (coff_print_aux): Likewise.
2589 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
2590 information for C_AIX_WEAKEXT too.
2591 (_bfd_xcoff_swap_aux_out): Likewise.
2592 (xcoff_reloc_type_br): Handle defweak symbols too.
2593 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
2594 information for C_AIX_WEAKEXT too.
2595 (_bfd_xcoff64_swap_aux_out): Likewise.
2596 (xcoff64_reloc_type_br): Handle defweak symbols too.
2597 * coffgen.c (coff_print_symbol): Handle auxillary function
2598 information for C_AIX_WEAKEXT too.
2599 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
2600 instead of BSF_GLOBAL if the L_WEAK flag is set.
2601 (xcoff_dynamic_definition_p): New function.
2602 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
2603 defines h. Don't change h if ldsym isn't the definition. Otherwise,
2604 always take the symbol class from the ldsym. Use weak bfd symbol
2605 types for weak ldsyms.
2606 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
2607 Fix the check for whether a definition is from a shared object.
2608 Allow redefinitions of weak symbols.
2609 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
2610 (xcoff_keep_symbol_p): Likewise.
2611 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
2612 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
2613 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
2614 but mark them as L_WEAK.
2615 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
2616 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
2617
5b49f6dc
RS
26182009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2619
2620 * xcofflink.c (xcoff_mark): When walking the relocations,
2621 only mark the target symbol or the target section, not both.
2622 (xcoff_final_definition_p): New function.
2623 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
2624 symbol is a valid definition of the associated output symbol.
2625 Use XCOFF_ALLOCATED to stop the same hash table entry having
2626 two output symbols.
2627 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
2628 keeping a symbol.
2629 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
2630
c4037431
RS
26312009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2632
2633 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
2634 symbols as XMC_XO.
2635
3df13c4a
RS
26362009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2637
2638 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
2639 * libcoff.h: Regenerate.
2640 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
2641 line-number counts in the bfd's lineno_counts field.
2642 Don't keep per-csect line-number counts.
2643 (xcoff_sweep): Don't update per-csect line-number counts.
2644 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
2645 entries in each output section.
2646 (xcoff_link_input_bfd): Get the number of line numbers from
2647 the bfd's lineno_counts field, rather than recalculating it
2648 from scratch. Fix the range check when updating C_BINCL and
2649 C_EINCL symbols.
2650 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
2651 here. Don't expect csects to have line-number counts.
2652
e450936a
RS
26532009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2654
2655 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
2656 * libcoff.h: Regenerate.
2657 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
2658 "skip" logic from xcoff_link_input_bfd.
2659 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
2660 objects in a dynamic link, rather than checking whether csectpp
2661 is null. Always allocate debug_index for other objects,
2662 and always go through the loop. Update the type of debug_index
2663 after the change above. Read the auxillary csect information
2664 and use xcoff_keep_symbol_p to decide whether a symbol should
2665 be kept. Set its debug_index to -2 if not.
2666 (xcoff_link_input_bfd): Update the type of debug_index after
2667 the change above and always expect it to be nonnull. Use it to
2668 test whether a symbol should be stripped, rather than making the
2669 decision here. Postpone all symbol creation to the second pass.
2670
47dfb2ca
RS
26712009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2672
2673 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
2674 creating a descriptor.
2675 (xcoff_sweep): Don't mark toc_section unless it's needed.
2676 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
2677 when marking every bfd.
2678 (xcoff_link_input_bfd): Skip all TOC anchors.
2679 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
2680 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
2681 to -1; call xcoff_find_tc0 instead.
2682
4cc02a02
RS
26832009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2684
2685 * libcoff-in.h (xcoff_section_tdata): Update commentary.
2686 * libcoff.h: Regenerate.
2687 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
2688 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
2689 the previous symbol's csect. Treat last_symndx as an inclusive value
2690 and simplify its handling.
2691 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
2692 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 2693 relocations against undefined or absolute sections.
4cc02a02
RS
2694 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
2695 of bfd_und_section_ptr.
2696 (xcoff_link_input_bfd): Likewise.
2697
858ef0ce
RS
26982009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2699
2700 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
2701 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
2702 flag is set. Assert that all undefined symbols are either
2703 imported or defined by a dynamic object.
2704 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2705 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
2706 handling to all relocations. Only set XCOFF_CALLED for function
2707 symbols.
2708 (xcoff_find_function): New function, split out from...
2709 (bfd_xcoff_export_symbol) ...here.
2710 (xcoff_set_import_path): New function, split out from...
2711 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
2712 meaning of XCOFF_CALLED.
2713 (xcoff_mark_symbol): If we mark an undefined and unimported
2714 symbol, find some way of defining it. If the symbol is a function
2715 descriptor, fill in its definition automatically. If the symbol
2716 is a function, mark its descriptor and allocate room for global
2717 linkage code. Otherwise mark the symbol as implicitly imported.
2718 Move the code for creating function descriptors from...
d1fa68d3 2719 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
2720 check for symbols that were implicitly defined.
2721 (xcoff_mark): Don't count any dynamic relocations against
2722 function symbols.
2723 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
2724 in the xcoff link info.
2725 (xcoff_link_input_bfd): Remove handling of undefined and
2726 unexported symbols.
2727
12b2cce9
RS
27282009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2729
2730 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
2731 if the target is absolute. Fix comment typo.
2732 (xcoff_ppc_relocate_section): Remove FIXME.
2733 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
2734 if the target is absolute.
2735
0e3212ad
RS
27362009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2737
2738 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
2739 R_POS and R_NEG relocations against absolute symbols to the
2740 .loader section.
2741
d19d97e9
RS
27422009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2743
2744 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
2745 to 2 for bfd_mach_ppc_620.
2746
e5231592
RS
27472009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2748
2749 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
2750 * configure.in: Likewise.
2751 * configure: Regenerate.
2752
3516e984
L
27532009-03-13 H.J. Lu <hongjiu.lu@intel.com>
2754
2755 PR binutils/9945
2756 * elf.c (assign_section_numbers): Generate symbol table if there
2757 is any relocation in output.
2758 (_bfd_elf_compute_section_file_positions): Likewise.
2759
ce98a316
NC
27602009-03-13 Nick Clifton <nickc@redhat.com>
2761
2762 PR 9934
2763 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
2764 * elflink.c (elf_link_read_relocs_from_section): Use
2765 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
2766 relocs but no symbol table.
2767 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2768
c4fb387b
L
27692009-03-12 H.J. Lu <hongjiu.lu@intel.com>
2770
2771 PR ld/9938
2772 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
2773 to check ___tls_get_addr.
2774
2775 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
2776 strncmp to check __tls_get_addr.
2777
53638231
AS
27782009-03-12 Andrew Stubbs <ams@codesourcery.com>
2779
2780 * dwarf2.c (read_section): Always check the offset, even when the
2781 section has been read before.
2782
09e8c3bf
L
27832009-03-11 H.J. Lu <hongjiu.lu@intel.com>
2784
2785 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
2786 comments.
2787
36e4dce6
CD
27882009-03-11 Chris Demetriou <cgd@google.com>
2789
2790 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
2791 * bfd-in2.h: Regenerate.
2792 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
2793 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
2794 mode.
2795 (bsd_write_armap): Likewise.
2796 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
2797 flag is set, do nothing.
2798 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
2799 for timestamp.
2800
9b175a76
UW
28012009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
2802
2803 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
2804 used to update stack pointer.
2805
f501de17
DA
28062009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2807
2808 PR binutils/9921
2809 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
2810 for unknown symbols in absolute section.
2811
d11fd249
NC
28122009-03-06 Nick Clifton <nickc@redhat.com>
2813
2814 * po/es.po: Updated Spanish translation.
2815
8cd931b7
CL
28162009-03-05 Christophe Lyon <christophe.lyon@st.com>
2817
2818 * elf32-arm.c (group_sections): Take next section size into
2819 account before accepting to group it.
2820
5fa9e92f
CL
28212009-03-05 Christophe Lyon <christophe.lyon@st.com>
2822
2823 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
2824 PLT entries.
2825 (elf32_arm_final_link_relocate): Likewise.
2826
b92997d6
AM
28272009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
2828
2829 PR 9923
2830 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
2831
727fc41e
AM
28322009-03-04 Alan Modra <amodra@bigpond.net.au>
2833
2834 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
2835 * section.c (struct bfd_section): Add has_tls_get_addr_call.
2836 (BFD_FAKE_SECTION): Init new flag.
2837 * ecoff.c (bfd_debug_section): Likewise.
2838 * bfd-in2.h: Regenerate.
2839 * libbfd.h: Regenerate.
2840 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
2841 (ppc_elf_reloc_type_lookup): Handle new relocs.
2842 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
2843 without marker relocs.
2844 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2845 if section has no old-style calls.
2846 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
2847 Don't try to optimize new-style __tls_get_addr call when handling
2848 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2849 relocs.
2850 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
2851 (ppc64_elf_reloc_type_lookup): Handle new relocs.
2852 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
2853 without marker relocs.
2854 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2855 if section has no old-style calls. Set toc_ref for new relocs as
2856 appropriate.
2857 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
2858 Don't try to optimize new-style __tls_get_addr call when handling
2859 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2860 relocs.
2861
51dec227
AM
28622009-03-04 Alan Modra <amodra@bigpond.net.au>
2863
2864 PR 6768
2865 * configure.in: Test for ld --as-needed support. Link shared
2866 libbfd against libm.
2867 * configure: Regenerate.
2868
a1f7ca36
AM
28692009-03-03 Alan Modra <amodra@bigpond.net.au>
2870
2871 * Makefile.am: Run "make dep-am".
2872 * Makefile.in: Regenerate.
2873
c3b7224a
NC
28742009-03-02 Qinwei <qinwei@sunnorth.com.cn>
2875
2876 * elf32-score7.c: New file.
2877 * elf32-score.h: New file.
2878 * elf32-score.c: Add code to support score 7. Set score7 as the
2879 default.
2880 * cpu-score.c: Add score7 architecure.
2881 (compatibile): New function.
2882 * Makefile.am: Add rules for building elf32-score7 object.
2883 * Makefile.in: Regenerate.
2884 * configure.in: Add elf32-score7 object to score vectors.
2885 * configure: Regenerate.
2886 * reloc.c: Add score7 relocs.
2887 * archures.c: Add score3 and score7 machine numbers.
2888 * bfd-in2.h: Regenerate.
2889 * libbfd.h: Regenerate.
2890
58e24671
RW
28912009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2892
2893 * configure: Regenerate.
2894
5887528b
DA
28952009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2896
d45b7d74
DA
2897 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
2898 (elf32_hppa_check_relocs): Use it.
2899
5887528b
DA
2900 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
2901 elf64-hppa.c.
2902 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2903 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2904 (elf_hppa_is_dynamic_loader_symbol): Likewise.
2905 (elf_hppa_record_segment_addrs): Likewise.
2906 (elf_hppa_final_link): Likewise.
2907 (elf_hppa_relocate_insn): Likewise.
2908 (elf_hppa_final_link_relocate): Likewise.
2909 (elf64_hppa_relocate_section): Likewise.
2910 * elf64-hppa.c: Insert above.
2911
a03bd320
DA
29122009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2913
2914 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
2915 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
2916 (elf_hppa_relocate_section): Likewise.
2917 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
2918 from struct elf_link_hash_entry. Add count field.
2919 (struct elf64_hppa_dyn_hash_table): Delete.
2920 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
2921 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
2922 (hppa_elf_hash_entry, eh_name): Define.
2923 (elf64_hppa_new_dyn_hash_entry): Delete.
2924 (elf64_hppa_dyn_hash_lookup): Delete.
2925 (elf64_hppa_dyn_hash_traverse): Delete.
2926 (get_dyn_name): Delete.
2927 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
2928 of struct elf64_hppa_dyn_hash_entry *.
2929 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
2930 allocate_global_data_plt, allocate_global_data_stub,
2931 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
2932 Likewise.
2933 (hppa64_link_hash_newfunc): New.
2934 (elf64_hppa_hash_table_create): Rework.
2935 (count_dyn_reloc): Likewise.
2936 (hppa64_elf_local_refcounts): New.
2937 (elf64_hppa_check_relocs): Rework using standard technique for recording
2938 local DLT, PLT and OPD reference counts.
2939 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
2940 elf_link_hash_entry *.
2941 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
2942 allocate_global_data_plt, allocate_global_data_stub,
2943 allocate_global_data_opd, allocate_dynrel_entries,
2944 elf64_hppa_adjust_dynamic_symbol,
2945 elf64_hppa_mark_milli_and_exported_functions): Likewise.
2946 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
2947 Use hppa_link_hash_table. Rework.
2948 (elf64_hppa_link_output_symbol_hook): Rework.
2949 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
2950 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
2951 elf64_hppa_finish_dynamic_sections): Likewise.
2952
ebe24dd4
CL
29532009-02-26 Christophe Lyon <christophe.lyon@st.com>
2954
2955 * elf32-arm.c (stub_reloc_type): Removed.
2956 (insn_sequence): Renamed reloc_type field to r_type.
2957 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
2958 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
2959 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
2960 (elf32_arm_stub_type): Add new enum entries for the new stubs.
2961 (arm_stub_is_thumb): Catch new stubs.
2962 (arm_type_of_stub): Handle new stubs.
2963 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
2964 (bfd_elf32_arm_process_before_allocation): Remove useless
2965 condition.
2966
b9d678e0
L
29672009-02-25 H.J. Lu <hongjiu.lu@intel.com>
2968
2969 * elf.c (elf_find_function): Use is_function_type to check
2970 function symbol.
2971
56fb3749
SA
29722009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2973
2974 * xtensa-modules.c: Revert to previous version 1.11 due
2975 to inadvertant commit.
2976
658ff993
SA
29772009-02-24 Sterling Augustine <sterling@tensilica.com>
2978
2979 * elf32-xtensa.c (text_action_add): Separate test for action
2980 type. Break if saved action is ta_widen_insn at same offset.
2981
cf3eccff
DJ
29822009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2983
2984 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
2985 to elf32_arm_stub_long_branch_any_arm_pic.
2986 (elf32_arm_stub_long_branch_any_thumb_pic): New.
2987 (enum elf32_arm_stub_type, arm_type_of_stub)
2988 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
2989 separately.
2990
07d72278
DJ
29912009-02-24 Joseph Myers <joseph@codesourcery.com>
2992
2993 * elf32-arm.c (PREV_SEC): Update comment.
2994 (group_sections): Rename argument to stubs_always_after_branch.
2995 Reverse the list and place stubs at the end of input sections.
2996 Undefine NEXT_SEC.
2997 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
2998
4e31c731
DJ
29992009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
3000
3001 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3002 Fix formatting.
3003 (arm_size_one_stub): Remove unnecessary break.
3004 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
3005
30062009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
3007
3008 * elf32-arm.c (stub_insn_type): New type.
3009 (stub_reloc_type): Likewise.
3010 (insn_sequence): Likewise.
3011 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3012 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3013 (elf32_arm_stub_long_branch_thumb_only): Likewise.
3014 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3015 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3016 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3017 (elf32_arm_stub_hash_entry): Add new helper fields.
3018 (stub_hash_newfunc): Initialize these new fields.
3019 (arm_build_one_stub): Encode Arm and Thumb instructions separately
3020 to take endianness into account.
3021 (arm_size_one_stub): Compute size of stubs using insn_sequence.
3022 (arm_map_one_stub): Code is now more generic, thanks to
3023 insn_sequence.
3024
c2b4a39d
CL
30252009-02-23 Christophe Lyon <christophe.lyon@st.com>
3026
3027 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3028 code.
3029 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3030 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3031 BLX is not available. Fix typo in warning message. Add comments
3032 and improve formatting.
3033 (arm_build_one_stub): Adjust to new
3034 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3035 (arm_map_one_stub): Likewise.
3036
0c376465 30372009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
3038 Eric Botcazou <ebotcazou@adacore.com>
3039 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
3040
3041 * vms.h: Update copyright year, fix comments, reorder declarations.
3042 (_bfd_save_vms_section): Remove the prototype.
3043 (EGPS_S_V_NO_SHIFT): New constant.
3044 (bfd_vms_set_section_flags): New prototype.
3045 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3046 constants.
3047 (EGSY_S_W_FLAGS): Ditto.
3048 (EGSY_S_V_QUAD_VAL): Ditto.
3049 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3050 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3051 EGST_S_B_NAMLNG): Ditto.
3052 (ESRF_S_B_NAMLNG): Ditto.
3053 (ETIR_S_C_HEADER_SIZE): Ditto.
3054 (EGPS_S_V_ALLOC_64BIT): Ditto.
3055 (DST_S_C_EPILOG): Ditto.
3056 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3057 (DST_S_C_SRC_INCRLNUM_B): Ditto.
3058 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3059 (DST_S_L_PCLINE_UNSLONG): Ditto.
3060 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3061 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3062 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3063 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3064 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3065 (DST_S_B_SRC_UNSBYTE): Ditto.
3066 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3067 Add prototypes.
3068 (vms_section, vms_reloc): Remove types.
3069 (hdr_struc): Replaced by ...
3070 (hdr_struct): ... new type.
3071 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
3072 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
3073 (EMH_DATE_LENGTH): Ditto.
3074 (eom_struc): Replaced by ...
3075 (eom_struct): ... new type.
3076 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
3077 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
3078 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
3079 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
3080 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
3081 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
3082 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
3083 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
3084 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
3085 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
3086 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
3087 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
3088 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
3089 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
3090 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
3091 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
3092 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
3093 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
3094 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
3095 (enum file_type_enum): New type.
3096 (struct location_struct): Removed.
3097 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
3098 (struct funcinfo, struct module): Ditto.
3099 (struct vms_private_data_struct): Update fields.
3100 (struct vms_section_data_struct): New type.
3101
3102 * vms.c: Update copyright year, fix comments,
3103 Fix includes for DECC, add prototypes.
3104 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
3105 some initializers.
3106 Use flavour to set is_vax, location_stack is removed.
3107 (struct pair): Declare.
3108 (fill_section_ptr): Initialize variables at declaration.
3109 Add guard to set SECTION_SYM flag, handlde und section.
3110 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
3111 (_bfd_vms_slurp_object_records): New function, replaces previous
3112 vms_object_p.
3113 (vms_slurp_module): New function.
3114 (vms_slurp_image): Ditto.
3115 (vms_object_p): Complete rewrite.
3116 (vms_mkobject): Use is_vax field to slect architecture.
3117 (free_reloc_stream): New function.
3118 (vms_convert_to_var): Ditto.
3119 (vms_convert_to_var_1): Ditto.
3120 (vms_convert_to_var_unix_filename): Ditto.
3121 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
3122 VAR format on VMS.
3123 (vms_new_section_hook): Set alignment to 0, allocate private data.
3124 (vms_get_section_contents): Load content.
3125 (vms_get_symbol_info): Handle undefined section.
3126 (vms_find_nearest_line): Handle.
3127 (alloc_reloc_stream): New function.
3128 (vms_slurp_reloc_table): Ditto.
3129 (vms_get_reloc_upper_bound): Make it real.
3130 (vms_canonicalize_reloc): Do the real work.
3131 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
3132 ALPHA_R_BOH.
3133 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
3134 (vms_set_arch_mach): Check arch.
3135 (vms_set_section_contents): Copy the content after allocation.
3136 (vms_alpha_vec): Update object flags.
3137
3138 * vms-tir.c: Update copyright year, fix comments,
3139 add prototypes for new functions.
3140 (dst_define_location): New function.
3141 (dst_restore_location): New function.
3142 (dst_retrieve_location): New function.
3143 (dst_check_allocation): New function.
3144 (image_dump): Call dst_check_allocation.
3145 (image_write_b): Ditto.
3146 (image_write_w): Ditto.
3147 (image_write_l): Ditto.
3148 (image_write_q): Ditto.
3149 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
3150 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
3151 CTL_STKDL.
3152 Call error handler instead of abort if name is not known.
3153 (etir_sta): Add quarter_relocs argument and set it.
3154 Fix cast.
3155 (etir_sto): Ditto.
3156 (etir_opr): Ditto, return FALSE in case of error.
3157 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
3158 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
3159 (etir_stc): Add quarter_relocs argument and set it, fix cast.
3160 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
3161 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
3162 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
3163 Return FALSE in case of error.
3164 (tir_sta): Change sign of psect.
3165 (tir_ctl): Ditto.
3166 (tir_cmd): Fix cast. Makes tir_table static const.
3167 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
3168 add argument to explain.
3169 (analyze_etir): Initialize maxptr, add quarter_relocs
3170 declaration, move some declarations into inner scopes.
3171 Handle quarter_relocs and STO_IMM.
3172 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
3173 (_bfd_vms_slurp_relocs): New function.
3174 (_bfd_vms_decode_relocs): New function.
3175 (sto_imm): Rewritten.
3176 (start_first_etbt_record): New function.
3177 (start_another_etbt_record): Ditto.
3178 (etir_output_check): Ditto.
3179 (defer_reloc_p): Ditto.
3180 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
3181 a for-loop. Correctly deals with contents, deals with .vmsdebug,
3182 rewritte relocations handling.
3183 (_bfd_vms_write_tbt): Removed.
3184 (_bfd_vms_write_dbg): Ditto.
3185
3186 * vms-misc.c: Update copyright year, Fix comments.
3187 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
3188 (maybe_adjust_record_pointer_for_object): New function.
3189 (_bfd_vms_get_first_record): New function, replaces ...
3190 (_bfd_vms_get_record): .. removed.
3191 (_bfd_vms_get_object_record): New function.
3192 (_bfd_vms_get_object_record): New function.
3193 (vms_get_remaining_object_record): New function, replaces ...
3194 (_bfd_vms_get_next_record): ... removed.
3195 (add_new_contents): Removed.
3196 (_bfd_save_vms_section): Removed.
3197 (_bfd_get_vms_section): Removed.
3198 (_bfd_vms_output_flush): Write in VAR format.
3199 (new_symbol): Don't make UND section.
3200
3201 * vms-hdr.c: Update copyright year, update list of record handled.
3202 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
3203 (_bfd_vms_write_hdr): Strip vms and unix patches,
3204 add comments, truncate module name at 31 characters,
3205 use constants instead of hard-coded value,
3206 write BFD version instead of a fixed string.
3207 (_bfd_vms_slurp_ihd): New function.
3208 (_bfd_vms_slurp_isd): Ditto.
3209 (_bfd_vms_slurp_ihs): Ditto.
3210 (new_module): Ditto.
3211 (parse_module): Ditto
3212 (build_module_list): Ditto.
3213 (module_find_nearest_line): Ditto.
3214 (_bfd_vms_find_nearest_dst_line): Ditto.
3215 (vms_slurp_debug): Ditto.
3216 (_bfd_vms_slurp_dbg): Ditto.
3217 (_bfd_vms_slurp_tbt): Ditto.
3218 (_bfd_vms_write_dbg): Ditto.
3219 (_bfd_vms_write_tbt): Ditto.
3220
3221 * vms-gsd.c: Update copyright year, update list of records handled.
3222 (EVAX_LITERALS_NAME): New macro.
3223 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
3224 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
3225 (register_universal_symbol): New function and prototype.
3226 (_bfd_vms_slurp_gsd): Fix indentations and casts,
3227 improve debug messages,
3228 use constants instead of hard-coded value,
3229 fix missing endianness conversion,
3230 handle global symbol (SYMG).
3231 (bfd_vms_set_section_flags): New function.
3232 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
3233 handle section literals,
3234 fix indentation,
3235 handle section bfd and vms flags,
3236 don't output LIB$INITIALIZE symbol,
3237 fix handling of weak symbols,
3238 fix evax vs vax procedure descriptor,
3239 handle absolute symbols.
3240
3241 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
3242 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
3243
3244 * makefile.vms (DEFS): Fix flags for VMS.
3245
3246 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3247
3248 * bfd-in2.h: Regenerated.
3249 * libbfd.h: Regenerated.
3250
47149254
CC
32512009-02-20 Cary Coutant <ccoutant@google.com>
3252
3253 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
3254 in struct stat.
3255
6b1cecf3
DK
32562009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3257
3258 PR gas/7059
3259 * coffcode.h (coff_write_object_contents): Don't let the string
3260 table offset overflow the s_name field when using long section names.
3261
88183869
DK
32622009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3263
3264 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
3265 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
3266 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3267 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
3268 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
3269 (bfd_pmac_xcoff_backend_data): Likewise.
3270 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
3271 (bfd_xcoff_aix5_backend_data): Likewise.
3272 (xcoff64_write_object_contents): Delete unused long_section_names
3273 local variable.
3274 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
3275 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
3276 struct non-const.
3277 * coffcode.h (documentation): Update to describe long section names.
3278 (COFFLONGSECTIONCATHELPER): New helper macro.
3279 (BLANKOR1TOODD): Likewise.
3280 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
3281 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
3282 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
3283 (bfd_coff_set_long_section_names_allowed): New function.
3284 (bfd_coff_set_long_section_names_disallowed): Likewise.
3285 (struct bfd_coff_backend_data): Add new backend hook function
3286 pointer _bfd_coff_set_long_section_names.
3287 (bfd_coff_set_long_section_names): New backend hook.
3288 (coff_write_object_contents): Only generate long section names if
3289 bfd_coff_long_section_names() indicates they are currently enabled.
3290 (bfd_coff_std_swap_table): Make non-const, and initialise long
3291 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3292 (ticoff0_swap_table): Likewise to both.
3293 (ticoff1_swap_table): Again, likewise to both.
3294 * coffgen.c (make_a_section_from_file): Allow long section names
3295 as inputs even if not currently allowed for outputs.
3296 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
3297 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
3298 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3299 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3300 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3301 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3302 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3303 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3304 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3305 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3306 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
3307 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
3308 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
3309 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
3310 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
3311 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
3312 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3313 * libcoff-in.h: Update copyright year to cause updated copyright
3314 year in generated libcoff.h, and fix typo.
3315 * libcoff.h: Regenerated.
3316 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
3317 (_bfd_ecoff_no_long_sections): Add prototype.
3318 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
3319 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
3320 defined by an including .c file.
3321 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
3322 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3323 (ticoff1_swap_table): Likewise to both.
3324
90d8a22c
CL
33252009-02-18 Christophe Lyon <christophe.lyon@st.com>
3326
3327 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
3328 stub. Catch default case error.
3329 (arm_map_one_stub): Add missing Thumb mapping symbol.
3330
12123067
NC
33312009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
3332
3333 PR 9841
3334 * elf32-avr.c: Handle case where no local symbos exist correctly.
3335
fea2b4d6
CL
33362009-02-16 Christophe Lyon <christophe.lyon@st.com>
3337
3338 bfd/
3339 * elf32-arm.c (arm_long_branch_stub,
3340 arm_thumb_v4t_long_branch_stub,
3341 arm_thumb_thumb_long_branch_stub,
3342 arm_thumb_arm_v4t_long_branch_stub,
3343 arm_thumb_arm_v4t_short_branch_stub,
3344 arm_pic_long_branch_stub):
3345 Renamed to elf32_arm_stub_long_branch_any_any,
3346 elf32_arm_stub_long_branch_v4t_arm_thumb,
3347 elf32_arm_stub_long_branch_thumb_only,
3348 elf32_arm_stub_long_branch_v4t_thumb_arm,
3349 elf32_arm_stub_short_branch_v4t_thumb_arm,
3350 elf32_arm_stub_long_branch_any_any_pic.
3351 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3352 arm_thumb_thumb_stub_long_branch,
3353 arm_thumb_arm_v4t_stub_long_branch,
3354 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3355 Renamed to arm_stub_long_branch_any_any,
3356 arm_stub_long_branch_v4t_arm_thumb,
3357 arm_stub_long_branch_thumb_only,
3358 arm_stub_long_branch_v4t_thumb_arm,
3359 arm_stub_short_branch_v4t_thumb_arm,
3360 arm_stub_long_branch_any_any_pic.
3361
13e0a874
DA
33622009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3363
3364 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3365 in branch offset check.
3366
3a71aa26
AM
33672009-02-15 Alan Modra <amodra@bigpond.net.au>
3368
3369 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3370 add toc.symndx and toc.add.
3371 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3372 Set up toc.add.
3373 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3374 callers.
3375 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3376 (branch_reloc_hash_match): New function, extracted from..
3377 (ppc64_elf_tls_optimize): ..here.
3378 (ppc64_elf_relocate_section): Properly set addends when optimizing
3379 tls sequences. Avoid unnecessary reading and writing of insns.
3380 Only redo reloc when symbol changed. Bypass symbol checks when
3381 using tlsld_got.
3382 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
3383 (branch_reloc_hash_match): New function, extracted from..
3384 (ppc_elf_tls_optimize): ..here.
3385 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
3386 Don't clear addend on zapped __tls_get_addr reloc.
3387
2c2b4ed4
NC
33882009-02-12 Nick Clifton <nickc@redhat.com>
3389
3390 PR 9827
3391 * elflink.c (bfd_elf_final_link): When counting the relocations,
3392 if the header size has not been set yet then assume that it will
3393 match the output section's reloc type.
3394
453f5985
NS
33952009-02-12 Nathan Sidwell <nathan@codesourcery.com>
3396
3397 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
3398 relocatable link.
3399
3209bffa
AM
34002009-02-09 Alan Modra <amodra@bigpond.net.au>
3401
3402 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
3403 (find_function): Likewise.
3404 (pasted_function): Don't error if no prior function found.
3405 (discover_functions): Revert 2008-12-10 change. Extend first
3406 function range to start of section.
3407
813c8a3c
DA
34082009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3409
3410 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
3411 functions to C90.
3412 * elf64-hppa.h: Likewise.
3413
2d0f9ad9
JM
34142009-02-06 Joseph Myers <joseph@codesourcery.com>
3415
3416 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
3417 .sbss handling.
3418
50e00962
AM
34192009-02-04 Alan Modra <amodra@bigpond.net.au>
3420
3421 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
3422 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
3423
52b6b6b9
JM
34242009-02-03 Sandip Matte <sandip@rmicorp.com>
3425
3426 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3427 * archures.c (bfd_mach_mips_xlr): Define.
3428 * bfd-in2.h: Regenerate.
3429 * cpu-mips.c (I_xlr): Define.
3430 (arch_info_struct): Add XLR entry.
3431 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3432 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
3433 (mips_mach_extensions): Add XLR entry.
3434
654c3c9f
EW
34352009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
3436
3437 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
3438
31dd3154
JM
34392009-02-03 Carlos O'Donell <carlos@codesourcery.com>
3440
3441 * configure.in: AC_SUBST pdfdir.
d1fa68d3 3442 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
3443 and install-pdf-recursive targets. Define pdfdir.
3444 * doc/Makefile.am: Define pdf__strip_dir. Add
3445 install-pdf and install-pdf-am targets.
d1fa68d3 3446 * po/Make-in: Add install-pdf target.
31dd3154
JM
3447 * configure: Regenerate.
3448 * Makefile.in: Regenerate
3449 * doc/Makefile.in: Regenerate.
3450
cf869cce
NC
34512009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
3452
3453 * bfd-in2.h: Regenerate.
3454 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
3455 fields from n_entries to n_slots where appropriate, update comments.
3456 (HOWTO): Add TLS relocations.
3457 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
3458 (enum elf_m68k_got_offset_size): New enum.
3459 (struct elf_m68k_got_entry.type): Move field to ...
3460 (struct elf_m68k_got_entry_key): ... here. Update all uses.
3461 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
3462 functions.
3463 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
3464 functions.
3465 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
3466 fields into n_entries array. Update comments.
3467 (elf_m68k_init_got): Simplify, update all uses.
3468 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
3469 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
3470 GOT entries; update name, update all uses.
3471 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
3472 (elf_m68k_get_got_entry): Update.
3473 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
3474 simplify.
3475 (elf_m68k_remove_got_entry_type): Simplify.
3476 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
3477 (elf_m68k_can_merge_gots): Update.
3478 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
3479 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
3480 GOT entries, simplify.
3481 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
3482 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
3483 field, remove obsoleted local_n_entries field.
3484 (elf_m68k_partition_multi_got_2): New static function.
3485 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
3486 update.
3487 (elf_m68k_remove_got_entry_type): Update.
3488 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 3489 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
3490 update of sgot->size and srelgot->size.
3491 (elf_m68k_gc_sweep_hook): Update.
3492 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3493 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
3494 TLS relocations.
3495 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
3496 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
3497
c1a0a41f
DD
34982009-02-02 DJ Delorie <dj@redhat.com>
3499
3500 * elf32-mep.c (config_names): Regenerate configuration.
3501
72a80a16
AM
35022009-02-02 Alan Modra <amodra@bigpond.net.au>
3503
3504 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
3505 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
3506 * elf.c (bfd_elf_get_str_section): Make static.
3507 (bfd_elf_find_section): Delete.
3508 * libbfd.h: Regenerate.
3509
273f4430
JK
35102009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3511
3512 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
3513 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
3514
010e5ae2
AM
35152009-01-31 Alan Modra <amodra@bigpond.net.au>
3516
3517 * elflink.c (on_needed_list): New function.
3518 (elf_link_add_object_symbols): Link in --as-needed libs if they
3519 satisfy undefined symbols in other libs.
3520
33a7ffc2
JM
35212009-01-30 Julian Brown <julian@codesourcery.com>
3522
3523 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
3524 EXEC_P or DYNAMIC flags, and skip sections which are being linked
3525 with --just-symbols (-R).
3526
13d72a14
AN
35272009-01-29 Adam Nemet <anemet@caviumnetworks.com>
3528
3529 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
3530 high_pc in order to properly sign-extend VMAs.
3531
d334575b 35322009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
3533 Mark Shinwell <shinwell@codesourcery.com>
3534 Catherine Moore <clm@codesourcery.com>
d334575b
JM
3535
3536 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
3537
528aeb62
CM
35382009-01-28 Catherine Moore <clm@codesourcery.com>
3539
3540 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
3541 SEC_LOAD for dynamic relocation sections.
3542
f6f05983
HPN
35432009-01-27 Hans-Peter Nilsson <hp@axis.com>
3544
3545 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
3546 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
3547 the size of local TLS data.
3548
27cc28f9
AS
35492009-01-27 Andreas Schwab <schwab@suse.de>
3550
3551 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
3552 architectures in the archive.
3553
b3bf42d8
HPN
35542009-01-27 Hans-Peter Nilsson <hp@axis.com>
3555
f551b6f0
HPN
3556 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
3557 <R_CRIS_32_DTPREL>: Correct relocation value.
3558
b3bf42d8
HPN
3559 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
3560 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
3561 symbols with non-default visibility.
3562
9bc4e62b
NS
35632009-01-26 Nathan Sidwell <nathan@codesourcery.com>
3564
3565 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
3566 describing the trampolines.
3567 (ppc_elf_relocate_section): Update relocs to describe the
3568 trampolines.
3569
aeaf6540
DA
35702009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3571
3572 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
3573 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
3574 and R_PARISC_PCREL12F relocations.
3575
1e8fa21e
AM
35762009-01-24 Alan Modra <amodra@bigpond.net.au>
3577
3578 PR 6022
3579 * elflink.c (find_version_for_sym): New function split out from,
3580 but without export_dynamic test, ..
3581 (_bfd_elf_link_assign_sym_version): ..here.
3582 (_bfd_elf_export_symbol): Use it.
3583
28caa186
AM
35842009-01-23 Alan Modra <amodra@bigpond.net.au>
3585
3586 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
3587 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
3588 * elflink.c: ..here, somewhat modified.
3589 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
3590 _bfd_elf_link_find_version_dependencies,
3591 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
3592 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3593 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
3594 declare..
3595 * elflink.c: ..and make static here.
3596 (_bfd_elf_link_find_version_dependencies): Adjust for removal
3597 of output_bfd from struct elf_find_verdep_info.
3598 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
3599 struct elf_info_failed.
3600 (bfd_elf_size_dynamic_sections): Adjust.
3601
be04437d
AM
36022009-01-22 Alan Modra <amodra@bigpond.net.au>
3603
3604 PR 6832
3605 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
3606 after comp_unit_find_line call.
3607
58f9615c
NC
36082009-01-21 Nick Clifton <nickc@redhat.com>
3609
3610 PR 9769
3611 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
3612 tm_gmtoff field in struct tm.
3613
fb266b8b
AM
36142009-01-21 Alan Modra <amodra@bigpond.net.au>
3615
3616 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
3617 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
3618 sections in soft-icache lines unless non_ia_text. Don't add
3619 rodata if doing so would exceed line size.
3620
451ffe63
HPN
36212009-01-19 Hans-Peter Nilsson <hp@axis.com>
3622
3623 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
3624 types than bfd_link_hash_indirect, before early return, call
3625 _bfd_elf_link_hash_copy_indirect.
3626
5aa6ff7c
AS
36272009-01-19 Andrew Stubbs <ams@codesourcery.com>
3628
3629 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
3630 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
3631 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
3632 (elf_backend_obj_attrs_order): New define.
3633 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
3634 (elfNN_bed): Add elf_backend_obj_attrs_order.
3635
3483fe2e
AS
36362009-01-19 Andrew Stubbs <ams@codesourcery.com>
3637
3638 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
3639 (obj_attr_size): Likewise.
3640 (write_obj_attribute): Likewise.
3641 (_bfd_elf_copy_obj_attributes): Likewise.
3642 (_bfd_elf_parse_attributes): Likewise.
3643 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
3644 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
3645 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
3646 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
3647 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
3648 with macros.
3649
2d0bb761
AS
36502009-01-19 Andrew Stubbs <ams@codesourcery.com>
3651
3652 * elf-attrs.c (is_default_attr): Support defaultless attributes.
3653 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
3654 (bfd_elf_add_obj_attr_string): Likewise.
3655 (bfd_elf_add_obj_attr_int_string): Likewise.
3656 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
3657 * elf-bfd.h (struct obj_attribute): Document new flag bit.
3658 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
3659 Tag_nodefaults has no default value.
3660 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
3661 comment to reflect the new state.
3662
a77e83b7
AM
36632009-01-19 Alan Modra <amodra@bigpond.net.au>
3664
3665 PR 9695
3666 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
3667 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
3668 (adjust_z_magix): Delete dead code handling QMAGIC.
3669
f6d29e26
KT
36702009-01-16 Kai Tietz <kai.tietz@onevision.com>
3671
3672 * coffcode.h (styp_to_sec_flags): Correct interpretation of
3673 IMAGE_SCN_MEM_DISCARDABLE.
3674
29670fb9
AM
36752009-01-16 Alan Modra <amodra@bigpond.net.au>
3676
3677 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
3678 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
3679 * configure.in (commonbfdlib): Delete.
3680 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
3681 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
3682 is available, not just for linux.
3683 * po/SRC-POTFILES.in: Regenerate.
3684 * Makefile.in: Regenerate.
3685 * configure: Regenerate.
3686
91e22acd
AS
36872009-01-15 Andrew Stubbs <ams@codesourcery.com>
3688 Julian Brown <julian@codesourcery.com>
3689
3690 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
3691 ARM attributes in ABI 2.07.
3692 * elf32-arm.c (get_secondary_compatible_arch): New function.
3693 (set_secondary_compatible_arch): New function.
3694 (tag_cpu_arch_combine): New function.
3695 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
3696 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
3697 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
3698 make it fit with order_01243.
3699 Add support for Tag_also_compatible_with,
3700 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
3701 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
3702 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
3703 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
3704 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
3705 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
3706 Rework the way unknown attributes are handled.
3707 Defer errors until all attributes have been processed.
3708
7b86a9fa
AS
37092009-01-15 Andrew Stubbs <ams@codesourcery.com>
3710
3711 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
3712 bfd_elf_add_obj_attr_int_string.
3713 Read Tag_compatibility from its new location in the attribute array,
3714 rather than the attribute list.
3715 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
3716 bfd_elf_add_obj_attr_int_string.
3717 (_bfd_elf_parse_attributes): Likewise.
3718 (_bfd_elf_merge_object_attributes): There's now only one
3719 Tag_compatibility, and it's in the array, not the list.
3720 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
3721 Tag_compatibility.
3722 (bfd_elf_add_obj_attr_compat): Rename to
3723 bfd_elf_add_obj_attr_int_string.
3724 (bfd_elf_add_proc_attr_compat): Rename to
3725 bfd_elf_add_proc_attr_int_string.
3726 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
3727 Tag_compatibility.
3728
01e1a5bc
NC
37292009-01-15 Douglas B Rupp <rupp@gnat.com>
3730
3731 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
3732 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
3733 (vmsutil.lo): Add dependency rule.
3734 * Makefile.in: Regenerate.
3735 * config.bfd (ia64*-*-*vms*): Add case.
3736 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
3737 * configure: Regenerate.
3738 * vmsutil.c: New file.
3739 * vmsutil.h: New file.
3740 * elf-bfd.h (struct bfd_elf_special_section): Change type of
3741 attr to bfd_vma.
3742 * elfxx-ia64.c (elfNN_vms_post_process_headers,
3743 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
3744 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
3745 elfNN_vms_object_p): New functions
3746 * targets.c (bfd_elf64_ia64_vms_vec): New target.
3747
a33dafc3
L
37482009-01-14 H.J. Lu <hongjiu.lu@intel.com>
3749
3750 PR ld/9727
3751 * elflink.c (elf_gc_sweep): Exclude the group section if the
3752 first member of the section group is excluded.
3753
13c0e967
AM
37542009-01-14 Alan Modra <amodra@bigpond.net.au>
3755
3756 PR 9735
3757 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
3758 saved filename, use bfd_alloc rather than bfd_malloc for it.
3759
460e679b
AM
37602009-01-13 Alan Modra <amodra@bigpond.net.au>
3761
3762 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
3763
25076afa
AM
37642009-01-13 Alan Modra <amodra@bigpond.net.au>
3765
3766 * elf32-spu.c (remove_cycles): Always set call->max_depth.
3767
37107878
AM
37682009-01-12 Alan Modra <amodra@bigpond.net.au>
3769
3770 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
3771
cd4a7468
AM
37722009-01-12 Alan Modra <amodra@bigpond.net.au>
3773
3774 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
3775 num_lines_log2.
3776 (struct got_entry): Add br_addr.
3777 (struct call_info): Add priority.
3778 (struct function_info): Add lr_store and sp_adjust.
3779 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
3780 (spu_elf_find_overlays): For soft-icache, mark any section within cache
3781 area as an overlay, and check that no other overlays exist. Look up
3782 icache overlay manager entry sym.
3783 (BRA_STUBS, BRA, BRASL): Define.
3784 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
3785 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
3786 in branch insn.
3787 (count_stub, build_stub): Support soft-icache.
3788 (build_spuear_stubs, process_stubs): Adjust build_stub call.
3789 (spu_elf_size_stubs): Size soft-icache stubs.
3790 (overlay_index): New function.
3791 (spu_elf_build_stubs): Make static. Support soft-icache.
3792 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
3793 (find_function_stack_adjust): Save lr store and stack adjust insn
3794 offsets.
3795 (maybe_insert_function): Adjust find_function_stack_adjust call.
3796 (mark_functions_via_relocs): Retrieve priority.
3797 (remove_cycles): Only warn about pruned arcs when stack_analysis.
3798 (sort_calls): Sort by priority first.
3799 (mark_overlay_section): Ignore .ovl.init.
3800 (sum_stack): Only print when stack_analysis.
3801 (print_one_overlay_section): New function, extracted from..
3802 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
3803 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
3804 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
3805 analysis. Call spu_elf_build_stubs.
3806 (spu_elf_relocate_section): For soft-icache encode overlay index
3807 into addresses.
3808 (spu_elf_output_symbol_hook): Support soft-icache.
3809 (spu_elf_modify_program_headers: Likewise.
37107878 3810
cd4a7468
AM
3811 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
3812 num_regions to num_lines. Add line_size and max_branch.
3813 (enum _ovly_flavour): Add ovly_soft_icache.
3814 (spu_elf_build_stubs): Delete.
3815
80c29487
JK
38162009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3817
3818 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
3819 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
3820
1bc86aea
HPN
38212009-01-07 Hans-Peter Nilsson <hp@axis.com>
3822
3823 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3824 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
3825 the program, the known offset starts at the negative size of the
3826 TLS section.
3827 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
3828 Similar.
3829
3baa454d 38302009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 3831
3baa454d 3832 * config.bfd: Add lm32-*-rtems*.
75606e85 3833
9dbe8890
L
38342009-01-03 H.J. Lu <hongjiu.lu@intel.com>
3835
3836 * coff-ppc.c: Add 2009 to Copyright.
3837 * elf32-cris.c: Likewise.
3838 * elflink.c: Likewise.
3839
0bdf8d40
HPN
38402009-01-03 Hans-Peter Nilsson <hp@axis.com>
3841
3842 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
3843 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
3844
54ac0771
L
38452009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3846
3847 PR ld/9679
3848 * elflink.c (elf_merge_st_other): New.
3849 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
3850 hide them if needed.
3851 (elf_link_add_object_symbols): Updated.
3852
d8880531
L
38532009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3854
3855 PR ld/9676
3856 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
3857 ref_dynamic and dynamic_def fields when setting def_regular
3858 to 1.
3859
b70b5c14
NC
38602009-01-02 Curtis Mackie <curtmackevo@gmail.com>
3861
3862 PR 9682
3863 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
3864 literal.
3865
d8880531 3866For older changes see ChangeLog-2008
56882138
AM
3867\f
3868Local Variables:
3869mode: change-log
3870left-margin: 8
3871fill-column: 74
3872version-control: never
3873End:
This page took 0.681296 seconds and 4 git commands to generate.