OSDN Git Service

Don't add IMAGE_FILE_RELOCS_STRIPPED for PIE.
[pf3gnuchains/pf3gnuchains4x.git] / bfd / ChangeLog
1 2010-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2
3         PR binutils/11396
4         * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
5         * libcoff.h: Regenerated.
6
7         * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
8         if dont_strip_reloc is set.
9         (_bfd_XX_bfd_copy_private_bfd_data_common): Set
10         dont_strip_reloc on output if there is no .reloc and
11         IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
12
13 2010-03-18  Wei Guozhi  <carrot@google.com>
14
15         PR gas/11323
16         * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
17         R_ARM_GOT_PREL.
18         * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
19         * bfd-in2.h: Regenerate.
20         * libbfd.h: Regenerate.
21
22 2010-03-17  H.J. Lu  <hongjiu.lu@intel.com>
23
24         * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
25         (BFD_RELOC_SPU_STUB): Likewise.
26
27 2010-03-17  Jie Zhang  <jie@codesourcery.com>
28
29         * elf.c (assign_file_positions_for_load_sections): Avoid
30         overflow.
31
32 2010-03-17  Alan Modra  <amodra@gmail.com>
33
34         * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
35         proper type.
36
37 2010-03-17  Alan Modra  <amodra@gmail.com>
38
39         * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
40
41 2010-03-16  Alan Modra  <amodra@gmail.com>
42
43         * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
44         (ppc64_elf_edit_toc): Set it here.
45         (ha_reloc_match): New function.
46         (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
47
48 2010-03-15  Alan Modra  <amodra@gmail.com>
49
50         * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
51         * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
52
53 2010-03-14  Alan Modra  <amodra@gmail.com>
54
55         PR ld/11378
56         * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
57         * elf64-ppc.c (call_check_done): Define.
58         (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
59         (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
60         (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
61         (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
62         Simplify return logic.  Iterate over all .init and .fini fragments
63         by recursion.  Set makes_toc_func_call here..
64         (ppc64_elf_next_input_section): ..rather than here.
65         (check_pasted_section, ppc64_elf_check_init_fini): New functions.
66
67 2010-03-13  Alan Modra  <amodra@gmail.com>
68
69         PR ld/11375
70         * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
71         function descriptor symbol if there is one, not just for plt stubs.
72         (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
73
74 2010-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
75
76         * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
77         version twice.
78         Skip it when constructing def.vd_next.
79
80         * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
81         bfd_elf32_i386_sol2_vec.
82         (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
83         (elf32_bed): Redefine to elf32_i386_sol2_bed.
84         (elf_backend_want_plt_sym): Redefine to 1.
85
86         * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
87         bfd_elf64_x86_64_sol2_vec.
88         (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
89         (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
90         (elf_backend_want_plt_sym): Redefine to 1.
91
92         * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
93         bfd_elf32_i386_sol2_vec.
94         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
95         targ64_selvecs.
96         (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
97         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
98         targ_selvecs.
99
100         * configure.in: Handle bfd_elf32_i386_sol2_vec,
101         bfd_elf64_x86_64_sol2_vec.
102         * configure: Regenerate.
103
104         * targets.c (bfd_elf32_i386_sol2_vec): Declare.
105         (bfd_elf64_x86_64_sol2_vec): Declare.
106         (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
107         bfd_elf64_x86_64_sol2_vec.
108
109 2010-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
110
111         * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
112         sections.
113
114 2010-03-04  Alan Modra  <amodra@gmail.com>
115
116         PR 11302
117         * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
118         (read_attribute_value, decode_line_info): Likewise.
119         (add_line_info, read_rangelist): Return FALSE on alloc failures.
120         (arange_add, sort_line_sequences): Likewise.
121         (find_abstract_instance_name): Handle failures from called funcs.
122         (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
123         (find_line): Realloc to a temp, and handle alloc fail.
124
125 2010-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
126
127         * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
128         a mapping symbol to an empty section.
129
130 2010-03-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
131
132         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
133         return value from the call to _bfd_elf_merge_object_attributes.
134
135 2010-03-02  Christophe Lyon  <christophe.lyon@st.com>
136         Alan Modra  <amodra@gmail.com>
137
138         * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
139         destination mode of the a8 stub.
140         (elf32_arm_link_hash_table): Add top_id field.
141         (elf32_arm_link_hash_table_create): Initialize top_id.
142         (arm_type_of_stub): Update prototype, st_type can now be updated
143         by this function. Actual destination address in case of PLT is
144         computed here, to help factorizing code.
145         (elf32_arm_stub_name): Update prototype, use stub_type additional
146         parameter to build stub name.
147         (elf32_arm_get_stub_entry): Update prototype, use stub_type
148         additional parameter to build stub entry.
149         (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
150         put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
151         Call elf32_arm_final_link_relocate to process all in-stub
152         relocations.
153         (elf32_arm_setup_section_lists): Update top_id.
154         (cortex_a8_erratum_scan): Record stub destination mode.
155         (elf32_arm_size_stubs): Update call to arm_type_of_stub according
156         to new prototype.
157         (elf32_arm_final_link_relocate): Enable processing of in-stub
158         REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
159         needed, enabling code factorization.
160         (elf32_arm_final_link): Process stub sections.
161         (elf32_arm_output_map_sym): Add entry to code/data map.
162
163 2010-03-01  David S. Miller  <davem@davemloft.net>
164
165         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
166         h->def_regular, set h->ref_regular.
167         (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
168         and dynamic relocations if h->ref_regular.
169
170         * elfxx-sparc.c (struct elf_reloc_map): Delete.
171         (sparc_reloc_map): Delete.
172         (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
173         relocation type in switch statements.
174
175 2010-02-25  Alan Modra  <amodra@gmail.com>
176
177         PR ld/11304
178         * elf.c (_bfd_elf_init_private_section_data): Rename need_group
179         to final_link and invert.  For final link allow some flags to
180         differ.  Don't specially allow flags to be all zero.
181
182 2010-02-24  Alan Modra  <amodra@gmail.com>
183
184         PR binutils/10858
185         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
186         SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
187         table.
188
189 2010-02-23  Andrew Zabolotny  <anpaza@mail.ru>
190
191         PR binutils/11297
192         * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
193         (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
194
195 2010-02-22  Alan Modra  <amodra@gmail.com>
196
197         * reloc.c (bfd_check_overflow): When forming addrmask, shift
198         fieldmask left by rightshift.
199         (_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
200         overflow checks.
201
202 2010-02-20  H.J. Lu  <hongjiu.lu@intel.com>
203
204         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
205         STT_GNU_IFUNC on large common symbol.
206
207 2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
208
209         * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
210         has_ifunc_symbols if the symbol comes from a shared library.
211         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
212         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
213         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
214         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
215         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
216
217 2010-02-19  Alan Modra  <amodra@gmail.com>
218
219         * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
220         (_bfd_elf_copy_private_header_data): ..here.
221         * elflink.c (_bfd_elf_size_group_sections): New function.
222         (bfd_elf_size_dynamic_sections): Call it.
223         * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
224         (_bfd_elf_fixup_group_sections): Declare.
225
226 2010-02-18  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
227
228         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
229         merging Tag_DIV_use, Tag_MPextension_use, and
230         Tag_MPextension_use_legacy tags.
231
232 2010-02-18  Alan Modra  <amodra@gmail.com>
233
234         * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
235         commit.  Don't write zeros for removed group members.
236         (_bfd_elf_copy_private_header_data): Adjust size of group section
237         when group members are removed by objcopy.
238
239 2010-02-15  Dave Korn  <dave.korn.cygwin@gmail.com>
240
241         PR binutils/11280
242         * configure.host (*-*-solaris2.11):  Add host define to select
243         valid default code page for windres/windmc on solaris.
244
245 2010-02-15  Nick Clifton  <nickc@redhat.com>
246
247         * po/vi.po: Updated Vietnamese translation.
248
249 2010-02-12  Daniel Gutson  <dgutson@codesourcery.com>
250
251         * elf32-arm.c (elf32_arm_output_arch_local_syms): add
252         missing mapping symbol to data only sections.
253
254 2010-02-11  David S. Miller  <davem@davemloft.net>
255
256         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
257         and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
258         symbols.
259         (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
260         these relocs on global symbols.
261         (gdopoff): New.
262         (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
263         local symbol references which are not STT_GNU_IFUNC.  Handle
264         relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
265         and deal with negative vs. non-negative values properly.
266
267 2010-02-09  Tristan Gingold  <gingold@adacore.com>
268
269         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
270         non-external relocation.
271
272 2010-02-09  Alan Modra  <amodra@gmail.com>
273
274         * elf64-ppc.c (merge_got_entries): Move earlier in file.
275         (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
276         (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
277         (ppc64_elf_layout_multitoc): Don't resize if we have already
278         merged got entries.
279
280 2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
281
282         * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
283         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
284         elfcore_write_s390_prefix): New.
285         * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
286         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
287         elfcore_write_s390_prefix): New.
288         (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
289         NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
290         (elfcore_write_register_note): Handle .reg-s390-timer, 
291         .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
292         .reg-s390-prefix section.
293
294 2010-02-09  Alan Modra  <amodra@gmail.com>
295
296         * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
297         unsigned char.  Update variables and code using them throughout file.
298         (struct ppc_link_hash_entry): Likewise for tls_mask.
299
300         * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
301
302         * elf64-ppc.c (has_small_toc_reloc): Don't define.
303         (makes_toc_func_call, call_check_in_progress): Shuffle flags.
304         (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
305         code setting the flag.
306         (ppc64_elf_next_toc_section): Group big-toc sections in
307         0x80008000 chunks.
308
309 2010-02-08  David S. Miller  <davem@davemloft.net>
310
311         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
312         srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
313
314         * elfxx-sparc.c (create_got_section): Delete.
315         (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
316         section creator does that work for us.  Use ->elf.foo instead of
317         ->foo where applicable.
318         (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
319         where applicable.
320         (allocate_dynrelocs): Likewise.
321         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
322         (_bfd_sparc_elf_relocate_section): Likewise.
323         (sparc_vxworks_build_plt_entry): Likewise.
324         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
325         (sparc_finish_dyn): Likewise.
326         (sparc_vxworks_finish_exec_plt): Likewise.
327         (sparc_vxworks_finish_shared_plt): Likewise.
328         (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
329
330         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
331         macros for visibilty and locality checks.
332         (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
333         (allocate_dynrelocs): Likewise.
334         (_bfd_sparc_elf_relocate_section): Likewise.
335         (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
336
337         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
338         but never used local var 'dynobj'.
339
340         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
341         nocopyreloc.
342
343         * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
344         (BFD_RELOC_SPARC_IRELATIVE): Likewise.
345         * bfd-in2.h: Regenerate.
346         * libbfd.h: Regenerate.
347
348         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
349         and loc_hash_memory.
350         (_bfd_sparc_elf_link_hash_table_free): Declare.
351         * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
352         (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
353         bfd_elf32_bfd_link_hash_table_free): Define.
354         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
355         has_ifunc_symbols if STT_GNU_IFUNC.
356         (bfd_elf64_bfd_link_hash_table_free): Define.
357         (elf_backend_post_process_headers): Define always.
358         * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
359         (sparc_reloc_map): Add entries for new IFUNC relocs.
360         (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
361         (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
362         (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
363         elf_sparc_get_local_sym_hash): New.
364         (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
365         from here...
366         (_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
367         local hash table.
368         (_bfd_sparc_elf_link_hash_table_free): New.
369         (create_ifunc_sections): New.
370         (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
371         and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
372         cons up a fake local hash table entry for it.  Unconditionally add
373         a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
374         dyn relocs for ifunc.
375         (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
376         (allocate_dynrelocs):  Unconditionally emit a PLT entry when
377         STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
378         (allocate_local_dynrelocs): New function.
379         (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
380         table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
381         like splt.
382         (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
383         (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
384         plt in iplt/irelplt.
385
386 2010-02-08  Richard Sandiford  <r.sandiford@uk.ibm.com>
387
388         * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
389         max_contents_size, only consider sections whose contents must
390         be swapped in.
391
392 2010-02-09  Alan Modra  <amodra@gmail.com>
393
394         * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
395         (ppc64_elf_size_dynamic_sections): ..and here..
396         (merge_got_entries): ..rather than here.
397
398 2010-02-09  Alan Modra  <amodra@gmail.com>
399
400         * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
401         (has_small_toc_reloc): Define.
402         (ppc64_elf_check_relocs): Set the above flags.
403         (ppc64_elf_edit_opd): Delete obfd param.
404         (ppc64_elf_tls_optimize): Likewise.
405         (ppc64_elf_edit_toc): Likewise.
406         (ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
407         * elf64-ppc.h: Update prototypes.
408
409 2010-02-08  Alan Modra  <amodra@gmail.com>
410
411         * section.c (struct bfd_section): Delete has_tls_reloc,
412         has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
413         Add sec_flg0 thru sec_flg5.
414         (BFD_FAKE_SECTION): Update for changed flags.
415         * ecoff.c (bfd_debug_section): Likewise.
416         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
417         * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
418         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
419         * elf32-xtensa.c (reloc_done): Define.
420         * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
421         * bfd-in2.h: Regenerate.
422
423 2010-02-08  Tristan Gingold  <gingold@adacore.com>
424
425         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
426         for non-scattered relocations.
427
428 2010-02-08  Nathan Sidwell  <nathan@codesourcery.com>
429
430         * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
431         apuinfo sections, only scan input sections once and reuse the
432         buffer.
433
434 2010-02-08  Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
435
436         * archures.c (bfd_mach_ppc_titan): Define.
437         * bfd-in2.h: Regenerate.
438         * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
439
440 2010-02-08  Alan Modra  <amodra@gmail.com>
441
442         * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
443
444 2010-02-05  Sterling Augustine  <sterling@tensilica.com>
445
446         * elf.c (assign_file_positions_for_load_sections) Update lma of
447         section if necessary.  Fixes Bugzilla 11219.
448
449 2010-02-05  H.J. Lu  <hongjiu.lu@intel.com>
450
451         * elf32-i386.c: Remove trailing white spaces.
452         * elf64-x86-64.c: Likewise.
453
454 2010-02-03  Nick Clifton  <nickc@redhat.com>
455
456         * elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
457         entries for other architectures.
458         (struct elf_link_hash_table): Add hash_table_id field.
459         (elf_hash_table_id): New accessor macro.
460         * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
461         parameter.
462         * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
463         returning cast pointer.
464         (elf32_mn10300_link_hash_table_create): Identify new table as
465         containing MN10300 extensions.
466         (mn10300_elf_relax_section): Check pointer returned by
467         elf32_mn10300_hash_table.
468         * elf32-arm.c: Likewise, except using ARM extensions.
469         * elf32-avr.c: Likewise, except using AVR extensions.
470         * elf32-bfin.c: Likewise, except using BFIN extensions.
471         * elf32-cris.c: Likewise, except using CRIS extensions.
472         * elf32-frv.c: Likewise, except using FRV extensions.
473         * elf32-hppa.c: Likewise, except using HPPA32 extensions.
474         * elf32-i386.c: Likewise, except using I386 extensions.
475         * elf32-lm32.c: Likewise, except using LM32 extensions.
476         * elf32-m32r.c: Likewise, except using M32RM extensions.
477         * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
478         * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
479         * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
480         * elf32-m68k.c: Likewise, except using M68K extensions.
481         * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
482         * elf32-ppc.c: Likewise, except using PPC32 extensions.
483         * elf32-s390.c: Likewise, except using S390 extensions.
484         * elf32-sh.c: Likewise, except using SH extensions.
485         * elf32-spu.c: Likewise, except using SPU extensions.
486         * elf32-xtensa.c: Likewise, except using XTENSA extensions.
487         * elf64-alpha.c: Likewise, except using ALPHA extensions.
488         * elf64-hppa.c: Likewise, except using HPPA64 extensions.
489         * elf64-ppc.c: Likewise, except using PPC64 extensions.
490         * elf64-s390.c: Likewise, except using S390 extensions.
491         * elf64-x86-64.c: Likewise, except using X86_64 extensions.
492         * elfxx-ia64.c: Likewise, except using IA64 extensions.
493         * elfxx-mips.c: Likewise, except using MIPS extensions.
494         * elfxx-sparc.c: Likewise, except using SPARC extensions.
495         * elfxx-sparc.h: Likewise, except using SPARC extensions.
496         * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
497         redundant structure.
498         (elf32_cr16_hash_table): Delete unused macro.
499         (elf32_cr16_link_hash_traverse): Delete unused macro.
500         * elf32-score.c: Likewise.
501         * elf32-score7.c: Likewise.
502         * elf32-vax.c: Likewise.
503         * elf64-sh64.c: Likewise.
504
505 2010-02-03  Alan Modra  <amodra@gmail.com>
506
507         * elf64-ppc.c (struct plt_entry): Move earlier in file.
508         (struct got_entry): Likewise.  Add is_indirect and got.ent fields.
509         (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
510         Update all uses.
511         (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
512         Remove no_multi_toc.
513         (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
514         when allocating a new struct got_entry.
515         (allocate_got): New function, extracted from..
516         (allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
517         (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
518         .reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
519         (ppc64_elf_setup_section_lists): Remove output_bfd param and
520         no_multi_toc, add add_stub_section and layout_sections_again.  Stash
521         new params in htab.  Extract some code to..
522         (ppc64_elf_start_multitoc_partition): ..here.  New function.
523         (ppc64_elf_next_toc_section): Check for linker script errors.  Handle
524         second pass toc scan.
525         (merge_got_entries, merge_global_got, reallocate_got): New functions.
526         (ppc64_elf_reinit_toc): Rename to..
527         (ppc64_elf_finish_multitoc_partition): ..this.
528         (ppc64_elf_layout_multitoc): New function.
529         (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
530         layout_sections_again params.
531         (ppc64_elf_relocate_section): Handle indirect got entries.
532         * elf64-ppc.h: Update prototypes.  Declare new functions.
533
534 2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
535
536         * elf-bfd.h (elfcore_write_xstatereg): New.
537
538         * elf.c (elfcore_grok_xstatereg): New.
539         (elfcore_write_xstatereg): Likewise.
540         (elfcore_grok_note): Handle NT_X86_XSTATE.
541         (elfcore_write_register_note): Handle .reg-xstate section.
542
543 2010-02-01  Tristan Gingold  <gingold@adacore.com>
544
545         * som.c (som_write_ar_hdr): Define this macro.
546
547 2010-01-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
548
549         * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
550         R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
551         linkage table pointer to use the global table pointer if not doing
552         a shared link.
553
554 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
555
556         * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
557         if it has already been set.
558
559 2010-01-27  Tristan Gingold  <gingold@adacore.com>
560
561         * vms.h: Remove trailing spaces.
562         (struct hdr_struct): Remove unused hdr_c_cpr field.
563         (enum file_format_enum): Add comments.
564         * vms.c (vms_bfd_print_private_bfd_data): New function that
565         replaces the macro.
566         Remove trailing spaces.
567         * vms-misc.c: Improve comments.
568         (_bfd_vms_get_object_record): Also handle files without pads.
569         * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
570         * vms-gsd.c (struct flagdescstruct): Make name field const.
571         (gsyflagdesc): Fix typo.
572
573 2010-01-27  Alan Modra  <amodra@gmail.com>
574
575         PR ld/11217
576         * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
577         (ppc64_elf_setup_section_lists): Init them.
578         (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
579         and .toc on the same input file.
580         (ppc64_elf_relocate_section): Correct GOT entry offset.
581
582 2010-01-26  Tristan Gingold  <gingold@adacore.com>
583
584         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
585         (bfd_target): Add _bfd_write_ar_hdr_fn field.
586         * archive.c (is_bsd44_extended_name): New macro.
587         (_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
588         (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
589         name.
590         (_bfd_archive_bsd44_construct_extended_name_table): New function.
591         (_bfd_generic_write_ar_hdr): Ditto.
592         (_bfd_bsd44_write_ar_hdr): Ditto.
593         (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
594         (bsd_write_armap): Adjust firstreal computation.
595         * libbfd-in.h (struct areltdata): Add extra_size field.
596         (_bfd_generic_write_ar_hdr): Add prototype.
597         (_bfd_bsd44_write_ar_hdr): Ditto.
598         (_bfd_write_ar_hdr): Define.
599         (_bfd_noarchive_write_ar_hdr): Ditto.
600         (_bfd_archive_bsd_write_ar_hdr): Ditto.
601         (_bfd_archive_coff_write_ar_hdr): Ditto.
602         (_bfd_archive_bsd44_slurp_armap): Ditto.
603         (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
604         (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
605         (_bfd_archive_bsd44_truncate_arname): Ditto.
606         (_bfd_archive_bsd44_write_armap): Ditto.
607         (_bfd_archive_bsd44_read_ar_hdr): Ditto.
608         (_bfd_archive_bsd44_write_ar_hdr): Ditto.
609         (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
610         (_bfd_archive_bsd44_get_elt_at_index): Ditto.
611         (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
612         (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
613         * libbfd.h: Regenerate.
614         * oasys.c (oasys_write_ar_hdr): Define.
615         * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
616         * ieee.c (ieee_write_ar_hdr): Define.
617         * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
618         * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
619         (bfd_pmac_xcoff_backend_data): Ditto.
620         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
621         (bfd_xcoff_aix5_backend_data): Ditto.
622         * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
623         * aout-target.h (MY_write_ar_hdr): Define it if not defined.
624         * aout-tic30.c (MY_write_ar_hdr): Ditto.
625         * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
626         (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
627         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
628         (bfd_mach_o_construct_extended_name_table)
629         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
630         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
631         (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
632         * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
633         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
634         (bfd_mach_o_construct_extended_name_table)
635         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
636         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
637         (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
638         * bfd-in2.h: Regenerate.
639
640 2010-01-26  Alan Modra  <amodra@gmail.com>
641             H.J. Lu  <hongjiu.lu@intel.com>
642
643         PR ld/11218
644         * elflink.c (elf_link_output_extsym): Do not ignore undefined
645         symbols with ref_regular set when gc_sections is active.
646
647 2010-01-25  Alan Modra  <amodra@gmail.com>
648
649         PR ld/11217
650         * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
651         with relocations against undefined weak symbols.
652         (ppc64_elf_relocate_section): Don't optimize calls to undefined
653         weak functions if the symbol is dynamic.
654         (ppc64_elf_relocate_section): Edit tprel tls sequences.
655         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
656         (_bfd_elf_ppc_at_tprel_transform): New function.
657         * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
658         * bfd-in2.h: Regenerate.
659
660 2010-01-23  Richard Sandiford  <r.sandiford@uk.ibm.com>
661
662         * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
663         (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
664         * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
665         bitsize to 1.
666         (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
667
668 2010-01-21  Nick Clifton  <nickc@redhat.com>
669
670         * elflink.c (elf_link_add_object_symbols): Look up name of
671         undefined symbol both before and after versioning has been
672         applied.  Do not bother with symbols that are weakly undefined.
673
674 2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
675
676         * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
677         (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
678
679 2010-01-19  Cary Coutant  <ccoutant@google.com>
680
681         * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
682
683 2010-01-19  Daisuke Hatayama  <d.hatayama@jp.fujitsu.com>
684             Alan Modra <amodra@gmail.com>
685
686         * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
687         (elf_object_p): Read e_phnum extension.
688         (elf_write_shdrs_and_ehdr): Write e_phnum extension.
689         * elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
690         that we can read last program header.
691
692 2010-01-19  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
693
694         * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
695         R_ARM_THM_CALL entry.
696         (elf32_arm_final_link_relocate): Correct calculation of
697         reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
698         or R_ARM_THM_JUMP24 relocation.
699
700 2010-01-18  Alan Modra  <amodra@gmail.com>
701
702         PR 11168
703         * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
704         block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
705         than 32k sections.
706
707 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
708
709         Fix compilation warning on gcc-3.4.
710         * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
711         parameter index to sec_index according to the function definition.
712
713 2010-01-13  Chao-ying Fu  <fu@mips.com>
714
715         * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
716         It is true for all CPUs.
717         (jal_reloc_p): New function.
718         (mips_elf_calculate_relocation): Rename require_jalxp to
719         cross_mode_jump_p.
720         Update comment for CROSS_MODE_JUMP_P.
721         Set up cross_mode_jump_p based on the mode change.
722         (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
723         Update comment for CROSS_MODE_JUMP_P.
724         Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
725         Use !cross_mode_jump_p to guard conversion.
726         Convert "jr t9" to "b", if possible.
727         (_bfd_mips_elf_relocate_section): Rename require_jalx to
728         cross_mode_jump_p.
729         Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
730         Pass cross_mode_jump_p to call mips_elf_perform_relocation.
731
732 2010-01-13  Nick Clifton  <nickc@redhat.com>
733
734         * cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
735         "m32c" returns the m32c arch_info_struct and not the m16c
736         arch_info_struct.
737         (arch_info_struct): Use the new scan function.
738         (bfd_m32c_arch): Likewise.
739
740 2010-01-13  Tristan Gingold  <gingold@adacore.com>
741
742         * config.bfd: Remove duplicated target vector for i386-*-darwin.
743         Appends new arch instead of overriding.
744         Use mach_o_x86_64_vec for x86_64-*-darwin.
745         * configure.in: Add mach_o_x86_64_vec.
746         * configure: Regenerate.
747         * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
748         * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
749         (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
750         * Makefile.in: Regenerate.
751         * mach-o-x86-64.c: New file.
752
753 2010-01-13  Tristan Gingold  <gingold@adacore.com>
754
755         * reloc.c: Add MACH_O_X86_64 relocations.
756         * bfd-in2.h: Regenerate.
757         * libbfd.h: Regenerate.
758
759 2010-01-13  Tristan Gingold  <gingold@adacore.com>
760
761         * archive.c (normalize): Use lbasename.
762         (bfd_bsd_truncate_arname): Ditto.
763         (bfd_gnu_truncate_arname): Ditto.
764
765 2010-01-12  Tristan Gingold  <gingold@adacore.com>
766
767         * makefile.vms (CFLAGS): Turns warnings into informational messages.
768
769 2010-01-11  Tristan Gingold  <gingold@adacore.com>
770
771         * mach-o.h: Add x86-64 relocation types.
772
773 2010-01-11  Tristan Gingold  <gingold@adacore.com>
774
775         * mach-o.h (bfd_mach_o_backend_data): Add arch field.
776         (bfd_mach_o_set_arch_mach): New prototype.
777         * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
778         (bfd_mach_o_set_arch_mach): New function.
779         (bfd_mach_o_gen_mkobject): New function.
780         Set TARGET_ARCHITECTURE for the generic back-ends.
781         * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
782         Check that TARGET_ARCHITECTURE is defined.
783         Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
784         * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
785
786 2010-01-11  Tristan Gingold  <gingold@adacore.com>
787
788         * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
789
790 2010-01-11  Nick Clifton  <nickc@redhat.com>
791
792         * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
793         handling of R_V850_HI16_S relocation.
794
795 2010-01-11  Alan Modra  <amodra@gmail.com>
796
797         PR 11103
798         * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
799
800 2010-01-11  Alan Modra  <amodra@gmail.com>
801
802         PR 6832
803         * dwarf2.c (struct comp_unit): Add sec_info_ptr.
804         (find_abstract_instance_name): Use it.
805         (parse_comp_unit): Set it.
806
807 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
808
809         * Makefile.in: Regenerate.
810         * configure: Regenerate.
811
812 2010-01-08  Tristan Gingold  <gingold@adacore.com>
813
814         * archive.c: Remove bfd_special_undocumented_glue.
815
816 2010-01-08  Alan Modra  <amodra@gmail.com>
817
818         PR ld/11133
819         * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
820         * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
821         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
822
823 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
824
825         PR ld/11138
826         * elflink.c (elf_link_check_versioned_symbol): Don't abort if
827         a symbol referenced by DSO is is defined in a non-shared object
828         and forced local.
829
830 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
831
832         PR ld/11133
833         * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
834         undefined __start_XXX/__stop_XXX in all input files and set
835         SEC_KEEP.
836
837 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
838
839         PR ld/11143
840         * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
841
842 2010-01-04  Daniel Gutson  <dgutson@codesourcery.com>
843
844         * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
845         before including procfs.h.
846         (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
847         * configure.in: Added autoconf probe for the pr_fpreg member.
848         * configure: Regenerated.
849         * config.in: Regenerated.
850         * elf.c: Define _STRUCTURE_PROC before including procfs.h.
851
852 2010-01-04  Joel Brobecker  <brobecker@adacore.com>
853
854         Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
855         * dwarf2.c (concat_filename): Rename dirname with dir_name
856         to void shadowing the dirname function.
857         Rename subdirname with subdir_name to stay consistent with
858         the new dir_name variable name.
859
860 2010-01-04  Edmar Wienskoski  <edmar@freescale.com>
861
862         * archures.c: Add bfd_mach_ppc_e500mc64.
863         * bfd-in2.h: Regenerate.
864         * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
865         bfd_mach_ppc_e500mc64.
866
867 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
868
869         Fix -Wshadow warnings (seen on ppc-aix)
870         * xcofflink.c: Replace finfo by flinfo throughout.
871
872 For older changes see ChangeLog-2009
873 \f
874 Local Variables:
875 mode: change-log
876 left-margin: 8
877 fill-column: 74
878 version-control: never
879 End: