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