]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
2010-08-18 Pedro Alves <pedro@codesourcery.com>
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2010-08-18 Pedro Alves <pedro@codesourcery.com>
2
3 PR corefile/8210
4
5 * bfd-in2.h: Regenerate.
6 * corefile.c (bfd_core_file_pid): New.
7
8 * targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid.
9 (struct bfd_target) <_core_file_pid>: New.
10
11 * libbfd-in.h (_bfd_nocore_core_file_pid): Declare.
12 * libbfd.c (_bfd_nocore_core_file_pid): New.
13
14 * elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid):
15 Declare.
16 * elfcode.h (elf_core_file_pid): New define.
17 * elfcore.h (elf_core_file_pid): New function.
18
19 * elf.c (elfcore_make_pid): Rewrite.
20 (elfcore_grok_prstatus): Only set core_pid if not set yet.
21 (elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to
22 getting the lwpid from prstat.pr_pid.
23
24 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to
25 elf_tdata's core_lwpid instead of to core_pid.
26 (elf64_x86_64_grok_psinfo): Extract the the main process's PID,
27 and store it in elf_tdata's core_pid field.
28 * elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to
29 elf_tdata's core_lwpid instead of to core_pid.
30 (elf_i386_grok_psinfo): Extract the the main process's PID, and
31 store it in elf_tdata's core_pid field.
32
33 * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID
34 to elf_tdata's core_lwpid instead of to core_pid.
35 * elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to
36 elf_tdata's core_lwpid instead of to core_pid.
37 * elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to
38 elf_tdata's core_lwpid instead of to core_pid.
39 * elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to
40 elf_tdata's core_lwpid instead of to core_pid.
41 * elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to
42 elf_tdata's core_lwpid instead of to core_pid.
43 * elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
44 elf_tdata's core_lwpid instead of to core_pid.
45 * elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to
46 elf_tdata's core_lwpid instead of to core_pid.
47 * elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to
48 elf_tdata's core_lwpid instead of to core_pid.
49 * elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID
50 to elf_tdata's core_lwpid instead of to core_pid.
51 * elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID
52 to elf_tdata's core_lwpid instead of to core_pid.
53 * elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to
54 elf_tdata's core_lwpid instead of to core_pid.
55 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to
56 elf_tdata's core_lwpid instead of to core_pid.
57 * elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to
58 elf_tdata's core_lwpid instead of to core_pid.
59 * elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to
60 elf_tdata's core_lwpid instead of to core_pid.
61 * elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to
62 elf_tdata's core_lwpid instead of to core_pid.
63 * elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
64 elf_tdata's core_lwpid instead of to core_pid.
65
66 * plugin.c (bfd_plugin_core_file_pid): New function.
67 * aout-target.h (MY_core_file_pid): Define.
68 * aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines.
69 * coff-rs6000.c (coff_core_file_pid): New define.
70 (rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE.
71 * coff64-rs6000.c (coff_core_file_pid): New define.
72 (rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE.
73 (xcoff64_core_file_pid): New define.
74 (aix5coff64_vec): Use BFD_JUMP_TABLE_CORE.
75 * mach-o-target.c (bfd_mach_o_core_file_pid): New define.
76 * aix386-core.c (aix386_core_file_pid): New define.
77 * hppabsd-core.c (hppabsd_core_core_file_pid): New define.
78 * hpux-core.c (hpux_core_core_file_pid): New define.
79 * irix-core.c (irix_core_core_file_pid): New define.
80 * lynx-core.c (lynx_core_file_pid): New define.
81 * osf-core.c (osf_core_core_file_pid): New define.
82 * ptrace-core.c (ptrace_unix_core_file_pid): New define.
83 * sco5-core.c (sco5_core_file_pid): New define.
84 * xcoff-target.h (coff_core_file_pid): New define.
85 * netbsd-core.c (netbsd_core_core_file_pid): New define.
86
87 2010-08-13 H.J. Lu <hongjiu.lu@intel.com>
88
89 PR ld/11913
90 * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if
91 .got.plt section is discarded.
92 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise.
93
94 2010-08-13 Nathan Sidwell <nathan@codesourcery.com>
95
96 * elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B
97 variant.
98
99 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
100
101 PR binutils/11909
102 * Makefile.am (coff-tic4x.lo): New. Disable -Werror.
103 (coff-tic54x.lo): Likewise.
104 * Makefile.in: Regenerated.
105
106 2010-08-12 Todd Veldhuizen <todd.veldhuizen@logicblox.com>
107
108 PR ld/11843
109 * elflink.c (compute_bucket_count): Avoid futile long searches for
110 the best bucket size.
111
112 2010-08-09 Richard Henderson <rth@redhat.com>
113
114 PR ld/11891
115 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing
116 to tlshi/lo until pos0 and pos1 are adjacent. Use the destination
117 register from the tldgd insn.
118
119 2010-08-09 Catherine Moore <clm@codesourcery.com>
120
121 * elfxx-mips.c (mips_elf_perform_relocation): Improve
122 interlinking error message.
123
124 2010-08-06 Alan Modra <amodra@gmail.com>
125
126 * elf64-ppc.c (ha_reloc_match): Allow matches to other than r2.
127 (ppc64_elf_relocate_section): Nop out high part insn of large toc
128 code sequence when the high part of offset is zero.
129
130 2010-08-04 Tristan Gingold <gingold@adacore.com>
131
132 * vms-alpha.c (alpha_vms_build_fixups): Write the EICP.
133 (alpha_vms_bfd_final_link): Explicitly forbid relocatable links.
134 Clear the SEC_RELOC flag.
135
136 2010-08-04 Tristan Gingold <gingold@adacore.com>
137
138 * vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable
139 sections with relocs.
140 (alpha_vms_add_fixup_lp): Set SEC_RELOC flag.
141 (alpha_vms_add_fixup_ca): Ditto.
142 (alpha_vms_add_fixup_qr): Ditto.
143 Add comments.
144
145 2010-08-04 Tristan Gingold <gingold@adacore.com>
146
147 * vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
148 CODE sections writable.
149
150 2010-08-04 Tristan Gingold <gingold@adacore.com>
151
152 * vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ...
153 (alpha_vms_add_fixup_lr): ... this for consistency.
154 (alpha_vms_add_qw_fixup): Removed.
155 Fix some comments.
156 (vms_get_symbol_info): Adjust type for unknown sections.
157
158 2010-08-04 Tristan Gingold <gingold@adacore.com>
159
160 * vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute
161 section for any absolute section. Remove some debugging code.
162
163 2010-08-03 DJ Delorie <dj@redhat.com>
164
165 * elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes.
166
167 2010-08-03 Tristan Gingold <gingold@adacore.com>
168
169 * vms-misc.c (vms_convert_to_var): Make it static.
170 (_bfd_vms_convert_to_var_unix_filename): Make it public.
171
172 2010-08-03 Tristan Gingold <gingold@adacore.com>
173
174 * makefile.vms (OBJS): Update list.
175
176 2010-08-03 Tristan Gingold <gingold@adacore.com>
177
178 * vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS
179 nor SEC_RELOC for empty sections.
180
181 2010-08-03 Tristan Gingold <gingold@adacore.com>
182
183 * vms-alpha.c (evax_section_flags): Fix flags for absolute
184 section. Remove useless parenthesis.
185
186 2010-08-03 Tristan Gingold <gingold@adacore.com>
187
188 * vms-lib.c (vms_lib_bread_raw): Change type of BUF argument.
189 (vms_lib_bread, vms_lib_bopen): Adjust.
190
191 2010-08-02 Alan Modra <amodra@gmail.com>
192
193 PR 11866
194 * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to
195 calculate off_adjust rather than first section vma.
196
197 2010-07-30 H.J. Lu <hongjiu.lu@intel.com>
198
199 * elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info.
200
201 2010-07-30 Anthony Green <green@moxielogic.com>
202
203 * config.bfd (targ_cpu): Add moxie-*-rtems support.
204
205 2010-07-29 Alan Modra <amodra@gmail.com>
206
207 * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in
208 .toc section, even when none are used in relocs.
209
210 2010-07-27 Maciej W. Rozycki <macro@codesourcery.com>
211
212 * elfxx-mips.h: Include "elf/mips.h".
213 (gprel16_reloc_p): New static inline function.
214 * elfxx-mips.c (_bfd_mips_elf_check_relocs)
215 [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]:
216 Use got16_reloc_p.
217 (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use
218 gprel16_reloc_p.
219 * elf32-mips.c (mips_info_to_howto_rel): Likewise.
220 * elfn32-mips.c (mips_info_to_howto_rel): Likewise.
221
222 2010-07-27 Maciej W. Rozycki <macro@codesourcery.com>
223
224 * elf64-mips.c (mips_elf64_howto_table_rela)
225 [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace.
226 [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
227 [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
228 [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise.
229 [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
230 * elfn32-mips.c (elf_mips_howto_table_rela)
231 [R_MIPS_TLS_DTPMOD32]: Likewise.
232 [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
233 [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
234 [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise.
235 [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
236
237 2010-07-23 Naveen.H.S <naveen.S@kpitcummins.com>
238 Ina Pandit <ina.pandit@kpitcummins.com>
239
240 * archures.c (DESCRIPTION): Define bfd_mach_v850e2 and
241 bfd_mach_v850e2v3.
242 * reloc.c (bfd_architecture): Define bfd_mach_v850e2 and
243 bfd_mach_v850e2v3.
244 (BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL,
245 BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23,
246 BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS,
247 BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1,
248 BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET,
249 BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET,
250 BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT,
251 BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL,
252 BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY,
253 BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT,
254 BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF,
255 BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE,
256 BFD_RELOC_V850_DATA): New relocations for V850 target.
257 * config.bfd: Match all v850 targets.
258 * cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3.
259 * elf32-v850.c (v850_elf_check_relocs): Check the newly added
260 relocations.
261 (v850_elf_perform_relocation ): Update the newly added
262 relocations.
263 (v850_elf_howto_t): Update the specifications of added
264 relocations.
265 (v850_elf_reloc_map): Update the relocation mappings.
266 (v850_elf_final_link_relocate): Maps added relocation into the
267 appropriate howto structure.
268 (v850_elf_object_p): Add support for V850E2 and V850E2V3.
269 (v850_elf_final_write_processing): Likewise.
270 (v850_elf_merge_private_bfd_data): Likewise.
271 (v850_elf_print_private_bfd_data): Likewise.
272 * libbfd.h: Regenerate.
273 * bfd-in2.h: Regenerate.
274
275 2010-07-23 Alan Modra <amodra@gmail.com>
276
277 * archive.c (_bfd_archive_bsd44_construct_extended_name_table):
278 Correct format specifier.
279
280 2010-07-22 Alan Modra <amodra@gmail.com>
281
282 * ecoff.c: Don't include aout/ranlib.h.
283 (_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
284 (_bfd_ecoff_write_armap): Output ar_date and ar_size using
285 _bfd_ar_spacepad.
286
287 2010-07-22 Alan Modra <amodra@gmail.com>
288
289 * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
290 relocs.
291
292 2010-07-20 Alan Modra <amodra@gmail.com>
293
294 * elf.c (assign_file_positions_for_load_sections): Check that
295 zero size sections are allocated in segments too.
296 (assign_file_positions_for_non_load_sections): Warn if zero
297 size alloc sections are found here.
298 (copy_elf_program_header): Don't drop zero size sections from
299 segment map.
300 (copy_private_bfd_data): Check for changes in zero size sections.
301
302 2010-07-17 Alan Modra <amodra@gmail.com>
303
304 * elf.c (_bfd_elf_map_sections_to_segments): Force new segment
305 for sections with overlapping LMAs.
306 (assign_file_positions_for_load_sections): Catch overlap for
307 sections that wrap around the address space. Replace a
308 warning that duplicates ld's --check-sections error with a
309 warning that lma has been adjusted for overlapping sections.
310
311 2010-07-14 Cary Coutant <ccoutant@google.com>
312
313 PR ld/11817
314 * dwarf2.c (read_section): Revert patch for compressed debug sections.
315 (find_line): Likewise.
316 (read_and_uncompress_section): Remove.
317
318 2010-07-13 H.J. Lu <hongjiu.lu@intel.com>
319
320 PR ld/11812
321 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't
322 allocate .got.plt section if there are no GOT nor PLT
323 entries.
324 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
325
326 2010-07-13 H.J. Lu <hongjiu.lu@intel.com>
327
328 PR ld/11791
329 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
330 garbage collection against STT_GNU_IFUNC symbols.
331
332 * elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
333 elf.plt.offset/elf.got.offset to -1.
334 (elf_i386_tls_transition): Skip TLS transition for functions.
335 (elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
336
337 * elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
338 elf.plt.offset/elf.got.offset to -1.
339 (elf64_x86_64_tls_transition): Skip TLS transition for functions.
340 (elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
341
342 2010-07-12 H.J. Lu <hongjiu.lu@intel.com>
343
344 * elf32-i386.c (elf_i386_check_relocs): Re-indent.
345 (elf_i386_relocate_section): Likewise.
346
347 2010-07-06 H.J. Lu <hongjiu.lu@intel.com>
348
349 * dwarf2.c (add_line_info): Initialize prev_line.
350
351 2010-07-06 Alan Modra <amodra@gmail.com>
352
353 * elf32-ppc.c (ppc_elf_relax_section): Insert branch around
354 trampolines only for .init and .fini sections.
355
356 2010-07-05 Alan Modra <amodra@gmail.com>
357
358 * elf32-ppc.c: Formatting.
359 (ppc_elf_finish_dynamic_sections): Don't make plt_entry var static.
360
361 2010-07-03 Cary Coutant <ccoutant@google.com>
362
363 * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
364 * dwarf2.c (read_and_uncompress_section): New function.
365 (read_section): Call it.
366 (find_line): Likewise.
367
368 2010-07-01 Alan Modra <amodra@gmail.com>
369
370 * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather
371 than SYMBOL_REFERENCES_LOCAL.
372 (ppc64_elf_relocate_section): Likewise.
373
374 2010-07-01 Alan Modra <amodra@gmail.com>
375
376 * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
377
378 2010-06-29 Alan Modra <amodra@gmail.com>
379
380 * cpu-maxq.c: Delete file.
381 * coff-maxq.c: Delete file.
382 * Makefile.am: Remove references to maxq.
383 * archures.c: Likewise.
384 * coffcode.h: Likewise.
385 * configure.in: Likewise.
386 * targets.c: Likewise.
387 * config.bfd: Move maxq from obsolete to removed.
388 * Makefile.in: Regenerate.
389 * bfd-in2.h: Regenerate.
390 * configure: Regenerate.
391 * libbfd.h: Regenerate.
392 * po/SRC-POTFILES.in: Regenerate.
393
394 2010-06-28 Alan Modra <amodra@gmail.com>
395
396 * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
397 to silence gcc warning.
398
399 2010-06-27 Alan Modra <amodra@gmail.com>
400
401 * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
402 (group_sections): Likewise.
403
404 2010-06-27 Alan Modra <amodra@gmail.com>
405
406 * bout.c (aligncode): Delete set but unused variables.
407 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
408 * coff-ppc.c (ppc_record_toc_entry): Likewise.
409 (coff_ppc_relocate_section): Likewise.
410 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
411 * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
412 * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
413 (mn10300_elf_relax_section): Likewise.
414 * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
415 (record_vfp11_erratum_veneer): Likewise.
416 (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
417 (elf32_arm_final_link_relocate): Likewise.
418 (elf32_arm_check_relocs, arm_map_one_stub): Likewise.
419 * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
420 (elf32_avr_relax_section): Likewise.
421 (avr_mark_stub_not_to_be_necessary): Likewise.
422 * elf32-bfin.c (_bfin_create_got_section): Likewise.
423 * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
424 (elf32_cr16_relax_delete_bytes): Likewise.
425 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
426 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
427 * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
428 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
429 (elf32_h8_relax_delete_bytes): Likewise.
430 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
431 * elf32-i370.c (i370_elf_check_relocs): Likewise.
432 (elf_relocate_section): Likewise.
433 * elf32-ip2k.c (adjust_all_relocations): Likewise.
434 (ip2k_elf_relax_section): Likewise.
435 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
436 (lm32_elf_check_relocs): Likewise.
437 (lm32_elf_finish_dynamic_sections): Likewise.
438 (lm32_elf_finish_dynamic_symbol): Likewise.
439 * elf32-m32c.c (m32c_offset_for_reloc): Likewise.
440 (m32c_elf_relax_delete_bytes): Likewise.
441 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
442 (m32r_elf_finish_dynamic_sections): Likewise.
443 (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
444 * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
445 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
446 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
447 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
448 (microblaze_elf_check_relocs): Likewise.
449 (microblaze_elf_finish_dynamic_symbol): Likewise.
450 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
451 * elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
452 * elf32-rx.c (rx_elf_relocate_section): Likewise.
453 (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
454 (elf32_rx_relax_section): Likewise.
455 * elf32-score.c (score_elf_got_offset_from_index): Likewise.
456 (score_elf_final_link_relocate): Likewise.
457 (s3_bfd_score_elf_relocate_section): Likewise.
458 * elf32-score7.c (score_elf_got_offset_from_index): Likewise.
459 (s7_bfd_score_elf_relocate_section): Likewise.
460 * elf32-sh.c (sh_elf_check_relocs): Likewise.
461 * elf32-spu.c (spu_elf_relocate_section): Likewise.
462 * elf32-v850.c (v850_elf_check_relocs): Likewise.
463 (find_remembered_hi16s_reloc): Likewise.
464 * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
465 (elf_vax_relocate_section): Likewise.
466 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
467 * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
468 (move_literal): Likewise.
469 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
470 (elf64_hppa_check_relocs): Likewise.
471 (elf64_hppa_finish_dynamic_symbol): Likewise.
472 (elf64_hppa_relocate_section): Likewise.
473 * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
474 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
475 (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
476 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
477 (elfNN_vms_section_from_shdr): Likewise.
478 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
479 (_bfd_sparc_elf_relocate_section): Likewise.
480 * hp300hpux.c (slurp_symbol_table): Likewise.
481 * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
482 * mach-o.c (bfd_mach_o_write_thread): Likewise.
483 * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
484 * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
485 * pdp11.c (pdp11_aout_link_input_section): Likewise.
486 (aout_link_input_section, aout_link_input_bfd): Likewise.
487 * pe-mips.c (mips_swap_reloc_out): Likewise.
488 (coff_pe_mips_relocate_section): Likewise.
489 * som.c (som_bfd_ar_write_symbol_stuff): Likewise.
490 * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
491 * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
492
493 * coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
494 * coffcode.h (coff_compute_section_file_positions): Likewise.
495 (coff_slurp_reloc_table): Likewise.
496 * cpu-arm.c (arm_check_note): Likewise.
497 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
498 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
499 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
500 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
501 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
502 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
503 * elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
504 * ieee.c (parse_expression): Likewise.
505 (ieee_slurp_external_symbols, drop_int): Likewise.
506 * peXXigen.c (pe_print_pdata): Likewise.
507 * versados.c (process_esd): Likewise.
508
509 2010-06-25 Tristan Gingold <gingold@adacore.com>
510
511 * vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
512 its flags. Create an absolute section if needed.
513
514 2010-06-25 Tristan Gingold <gingold@adacore.com>
515
516 * vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
517 sections. Mark .vmsdebug section as SEC_DEBUGGING. Do not create
518 dummy psect anymore. Adjust.
519 (_bfd_vms_write_eeom): Adjust (use target_index instead of index)
520 (_bfd_vms_write_etir): Ditto.
521 (start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
522 section name. Adjust.
523
524 2010-06-25 Tristan Gingold <gingold@adacore.com>
525
526 * vms-alpha.c (alpha_vms_write_exec): Set linktime field.
527
528 2010-06-25 Alan Modra <amodra@gmail.com>
529
530 * elf64-ppc.c (toc_skip_enum): Define.
531 (ppc64_elf_edit_toc): Use two low bits of skip array as markers.
532 Optimize largetoc sequences.
533 (adjust_toc_syms): Update for skip array change.
534 (ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
535
536 2010-06-25 Alan Modra <amodra@gmail.com>
537
538 * elf64-ppc.c (is_static_defined): New function.
539 (get_tls_mask, ppc_type_of_stub): Use it here.
540 (ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
541 (ppc64_elf_tls_setup): Typo fix.
542 (adjust_toc_syms): Correctly handle symbols defined past the end
543 of the toc. Move syms on removed entries to next entry rather
544 than to start of toc.
545 (ppc64_elf_edit_toc): Likewise. Ensure we only attempt to
546 edit ppc64 input. Allocate one extra word in skip array.
547 Honour info->keep_memory when reading relocs if we can.
548 Adjust toc relocs after adjusting symbols.
549
550 2010-06-23 Nathan Sidwell <nathan@codesourcery.com>
551
552 * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
553 when scaning map.
554
555 2010-06-17 Tristan Gingold <gingold@adacore.com>
556
557 * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
558 (BFD64_BACKENDS_CFILES): ... here.
559 (BFD32_BACKENDS): Move vms-alpha.lo to ...
560 (BFD64_BACKENDS): ... here.
561 * Makefile.in: Regenerate.
562
563 2010-06-15 Joseph Myers <joseph@codesourcery.com>
564
565 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
566 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
567 elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
568 elf32_tic6x_merge_private_bfd_data): New.
569 (bfd_elf32_bfd_merge_private_bfd_data,
570 elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
571 elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
572 Define.
573 * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
574
575 2010-06-15 Joseph Myers <joseph@codesourcery.com>
576
577 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
578 (struct elf_backend_data): Update comment on obj_attrs_order.
579 * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
580 _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
581 instead of hardcoded 4.
582 * elf32-arm.c (elf32_arm_obj_attrs_order): Use
583 LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
584 instead of hardcoded 4 and 5.
585 (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
586 instead of hardcoded 4.
587
588 2010-06-14 Kevin Buettner <kevinb@redhat.com>
589
590 * elf32-h8300.c (elf_symbol_leading_char): Define.
591
592 2010-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
593
594 * vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
595
596 2010-06-11 Tristan Gingold <gingold@adacore.com>
597
598 * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
599 sections to 0.
600
601 2010-06-11 Tristan Gingold <gingold@adacore.com>
602
603 * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
604
605 2010-06-11 Tristan Gingold <gingold@adacore.com>
606
607 * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
608 Adjust cast.
609 (_bfd_vms_output_dump): Make DATA argument const, adjust cast.
610 * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
611 * vms-alpha.c (evax_section_flags): Make it const.
612 (vms_secflag_by_name): Remove unused ABFD argument.
613 Make SECTION_FLAGS and NAME arguments const. Clarify comment.
614 (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
615 (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
616 (_bfd_vms_write_egsd): Remove useless cast.
617
618 2010-06-10 Tristan Gingold <gingold@adacore.com>
619
620 * config.bfd: Remove #if/#endif so that som can be compiled on any
621 host.
622 * targets.c (_bfd_target_vector): Remove #if/#endif so that som
623 can be used on any host.
624
625 2010-06-10 Tristan Gingold <gingold@adacore.com>
626
627 * som.c: Can now be compiled on any host.
628 Include bfd headers instead of system one.
629 (som_compute_checksum): Parameter is now a pointer to a
630 som_external_header structure. Adjust.
631 (struct section_to_type): Field section is now const.
632 (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
633 definition.
634 (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
635 (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
636 (som_swap_clock_in, som_swap_clock_out): New functions.
637 (som_swap_header_in, som_swap_header_out): Likewise.
638 (som_swap_space_dictionary_in): Likewise.
639 (som_swap_space_dictionary_out): Likewise.
640 (som_swap_subspace_dictionary_in): Likewise.
641 (som_swap_subspace_dictionary_record_out): Likewise.
642 (som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
643 (som_swap_string_auxhdr_out): Likewise.
644 (som_swap_compilation_unit_out): Likewise.
645 (som_swap_exec_auxhdr_in): Likewise.
646 (som_swap_exec_auxhdr_out): Likewise.
647 (som_swap_lst_header_in): Likewise.
648 (som_object_setup): Adjust parameter type using bfd types.
649 (setup_sections): Likewise. Ditto for object file types.
650 Use intermediate variables for external representation and use the
651 swap functions to convert.
652 (som_object_p): Ditto. Remove #ifdef/#endif on always defined
653 macros.
654 (som_prep_headers): Likewise.
655 (som_write_symbol_strings): Likewise.
656 (som_begin_writing): Likewise.
657 (som_finish_writing): Likewise.
658 (som_build_and_write_symbol_table): Likewise.
659 (bfd_section_from_som_symbol): Likewise.
660 (som_slurp_symbol_table): Likewise.
661 (som_bfd_print_private_bfd_data): Likewise.
662 (bfd_som_attach_aux_hdr): Likewise. Clear the padding.
663 (bfd_som_attach_compilation_unit): Likewise.
664 (som_bfd_count_ar_symbols): Likewise.
665 (som_bfd_fill_in_ar_symbols): Likewise.
666 (som_slurp_armap): Likewise.
667 (som_bfd_ar_write_symbol_stuff): Likewise.
668 (som_write_armap): Likewise. Use _bfd_ar_spacepad instead of
669 sprintf to write header fields.
670 * som.h: Include bfd headers instead of system one.
671 (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
672 (struct somdata): Use bfd structures instead of system ones.
673 (struct som_section_data_struct): Likewise.
674 (struct som_subspace_dictionary_record): Removed (now in
675 include/som/internal.h)
676
677 2010-06-10 Tristan Gingold <gingold@adacore.com>
678
679 * targets.c (bfd_target_list): Remove hp/ux compiler work-around
680 as bfd requires an ANSI-C compiler.
681
682 2010-06-09 Tristan Gingold <gingold@adacore.com>
683
684 * bfdio.c (bfd_bread): Fix the code to prevent reading past the
685 end of archive members.
686
687 2010-06-08 Tristan Gingold <gingold@adacore.com>
688
689 * som.c (som_bfd_free_cached_info): Do not free relocations as
690 they were allocated with bfd_zalloc.
691
692 2010-06-08 Tristan Gingold <gingold@adacore.com>
693
694 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
695 for the first block.
696
697 2010-06-08 Tristan Gingold <gingold@adacore.com>
698
699 * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
700 * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
701 * libbfd.h: Regenerate.
702 * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
703 (bfd_elfNN_mkarchive): Ditto.
704
705 2010-06-02 Tristan Gingold <gingold@adacore.com>
706
707 * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
708
709 2010-06-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
710
711 * configure: Regenerate.
712
713 2010-06-01 Tristan Gingold <gingold@adacore.com>
714
715 * vms-alpha.c (struct vms_private_data_struct): Add
716 transfer_address field. Remove unused dst_info field.
717 (alpha_vms_write_exec): Use transfer_address.
718 (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
719 (alpha_vms_bfd_final_link): Set transfer_address.
720
721 2010-05-31 Tristan Gingold <gingold@adacore.com>
722
723 * vms-lib.c (credat_lo, credat_hi): New fields.
724 (vms_read_block): Adjust comments.
725 (vms_write_block): New function.
726 (_bfd_vms_lib_archive_p): Decode majorid once. Replace some
727 hard-coded values with constants. Set credat_lo and credat_hi.
728 (_bfd_vms_lib_mkarchive): Add argument kind.
729 Set ver, mhd_size and type according to kind.
730 (_bfd_vms_lib_alpha_mkarchive): New function.
731 (struct lib_index): Renamed from struct vms_index
732 (lib_index_cmp): Renamed from vms_index_cmp. Adjusted.
733 (get_idxlen): Type of idx argument adjusted. Add is_elfidx
734 argument and handle it.
735 (vms_write_index): Adjust argument idx. Handle elf indexes.
736 (_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
737 (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
738 use it. Handle elf indexes. Set credat.
739 * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
740 (_bfd_vms_lib_alpha_mkarchive): ... this.
741 * libbfd.h: Regenerated.
742 * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
743
744 2010-05-28 Sterling Augustine <sterling@tensilica.com>
745
746 * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
747 of code to change the bits in the instructions to match the changes
748 in the relocations. Declare dest_addr and sym_sec to help.
749
750 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
751
752 Workaround GCC PR middle-end/4210.
753 * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
754 and val[3].
755
756 2010-05-27 Tristan Gingold <gingold@adacore.com>
757
758 * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces.
759 (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
760 (vms_time_to_time_t): Use them instead of local const.
761 (vms_time_t_to_vms_time): New function.
762 (vms_get_time): Likewise.
763 (vms_raw_get_time): Likewise.
764 * vms.h (vms_time_t_to_vms_time): New declaration.
765 (vms_get_time): Likewise.
766 (vms_raw_get_time): Likewise.
767
768 2010-05-26 Tristan Gingold <gingold@adacore.com>
769
770 * vms-alpha.c: Update comments.
771 (alpha_vms_write_exec): Set lnkflags. Write the GST.
772 (alpha_vms_link_output_symbol): New function.
773 (alpha_vms_bfd_final_link): Generate the VMS symbol table.
774 Set dst_section private field.
775 (alpha_vms_bfd_final_link): Remove code that set dst_section.
776
777 2010-05-26 Tristan Gingold <gingold@adacore.com>
778
779 * bfdio.c: Declare and define _bfd_memory_iovec.
780 (bfd_bread): Move code for BFD_IN_MEMORY...
781 (bfd_bwrite): ... Ditto ...
782 (bfd_tell): ... Ditto ...
783 (bfd_flush): ... Ditto ...
784 (bfd_stat): ... Ditto ...
785 (bfd_seek): ... Ditto ...
786 (bfd_get_size): ... Ditto ...
787 (bfd_mmap): ... Ditto ...
788 (memory_bread): ... to these new functions.
789 (memory_bwrite): Ditto.
790 (memory_btell): Ditto.
791 (memory_bseek): Ditto.
792 (memory_bflush): Ditto.
793 (memory_bstat): Ditto.
794 (memory_bmmap): Ditto.
795 (memory_bclose): New function.
796 * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
797 * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
798 * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
799 (bfd_make_writable): Use _bfd_memory_iovec.
800 * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
801 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
802 _bfd_memory_iovec.
803 (alpha_ecoff_openr_next_archived_file): Use proxy_origin
804 instead of origin.
805 * libbfd.h: Regenerate.
806
807 2010-05-25 Daniel Jacobowitz <dan@codesourcery.com>
808 Joseph Myers <joseph@codesourcery.com>
809 Andrew Stubbs <ams@codesourcery.com>
810
811 * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
812 bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
813 * configure.in: Handle FDPIC vectors.
814 * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
815 * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
816 (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of
817 SYMBOL_REFERENCES_LOCAL for function descriptors.
818 (fdpic_object_p): New.
819 (sh_reloc_map): Add FDPIC and movi20 relocations.
820 (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
821 range.
822 (struct elf_sh_plt_info): Add got20 and short_plt. Update all
823 definitions.
824 (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
825 (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
826 (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
827 (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
828 (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
829 New.
830 (get_plt_info): Handle FDPIC.
831 (MAX_SHORT_PLT): Define.
832 (get_plt_index, get_plt_offset): Handle short_plt.
833 (union gotref): New.
834 (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
835 got_type and adjust all uses. Add GOT_FUNCDESC.
836 (struct sh_elf_obj_tdata): Add local_funcdesc. Rename
837 local_got_tls_type to local_got_type.
838 (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All
839 users changed.
840 (sh_elf_local_funcdesc): Define.
841 (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
842 and srofixup.
843 (sh_elf_link_hash_newfunc): Initialize new fields.
844 (sh_elf_link_hash_table_create): Set fdpic_p.
845 (sh_elf_omit_section_dynsym): New.
846 (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
847 and .rofixup.
848 (allocate_dynrelocs): Allocate local function descriptors and space
849 for R_SH_FUNCDESC-related relocations, and for rofixups.
850 Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which
851 require function descriptors.
852 (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
853 (sh_elf_modify_program_headers): New.
854 (sh_elf_size_dynamic_sections): Allocate function descriptors for
855 local symbols. Allocate .got.funcdesc contents. Allocate rofixups.
856 Handle local GOT entries of type GOT_FUNCDESC. Create fixups for
857 local GOT entries. Ensure that FDPIC libraries always have a PLTGOT
858 entry in the .dynamic section.
859 (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
860 (sh_elf_add_rofixup, sh_elf_osec_to_segment)
861 (sh_elf_osec_readonly_p, install_movi20_field): New functions.
862 (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
863 R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset
864 and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup
865 read-only section warnings. Handle undefined weak symbols. Generate
866 fixups for R_SH_DIR32 and GOT entries. Check for cross-segment
867 relocations and clear EF_SH_PIC. Handle 20-bit relocations.
868 Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
869 (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
870 R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
871 Handle 20-bit relocations.
872 (sh_elf_copy_indirect_symbol): Copy function descriptor reference
873 counts.
874 (sh_elf_check_relocs): Handle new relocations. Make symbols
875 dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC
876 symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups
877 for R_SH_DIR32.
878 (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
879 (sh_elf_merge_private_data): Copy initial flags. Do not clobber
880 non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches.
881 (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
882 here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt,
883 FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC.
884 Use install_movi20_field. Rename srel to srelgot. Always generate
885 R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
886 (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
887 Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT.
888 Rename sgot to sgotplt. Assert that the right number of rofixups
889 and dynamic relocations were allocated.
890 (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
891 (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
892 (elf_backend_can_make_relative_eh_frame)
893 (elf_backend_can_make_lsda_relative_eh_frame)
894 (elf_backend_encode_eh_address): Define.
895 (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
896 (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
897 Redefine for FDPIC vector.
898 * reloc.c: Add SH FDPIC and movi20 relocations.
899 * targets.c (_bfd_target_vector): Add FDPIC vectors.
900 * configure, bfd-in2.h, libbfd.h: Regenerated.
901
902 2010-05-25 Jay Krell <jay.krell@cornell.edu>
903
904 PR ld/11624
905 * archive.c (_bfd_calloc_wrapper): New function.
906 (_bfd_add_bfd_to_archive_cache): Use it.
907
908 * configure.in: Add alpha*-*-*vms* to list of natives.
909 * configure: Regenerate.
910
911 * vms-misc.c: Define globalref if necessary.
912 (vms_convert_to_var_unix_filename): Rename to
913 _bfd_vms_convert_to_var_unix_filename and export.
914 * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
915 * vms-alpha.c (vms_close_and_cleanup): Update invocation of
916 vms_convert_to_var_unix_filename.
917
918 2010-05-24 Tristan Gingold <gingold@adacore.com>
919
920 * vms-alpha.c (add_symbol_entry): New function extrated from ...
921 (add_symbol): ... adjusted.
922
923 2010-05-24 Tristan Gingold <gingold@adacore.com>
924
925 * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
926 (alpha_vms_write_exec): Add a comment.
927 (_bfd_vms_write_egsd): Ditto.
928 (alpha_vms_convert_symbol): Remove a blank line.
929
930 2010-05-21 Tristan Gingold <gingold@adacore.com>
931
932 * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
933 for the GST.
934
935 2010-05-21 Tristan Gingold <gingold@adacore.com>
936
937 * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
938 SEC_LOAD if isect has data.
939 (vms_get_symbol_info): Refine the condition for 'T' type.
940
941 2010-05-18 Tristan Gingold <gingold@adacore.com>
942
943 * vms-alpha.c (_bfd_vms_write_emh): New function.
944 (_bfd_vms_write_lmn): New function.
945 (_bfd_vms_write_eeom): Moved.
946 (hash_string): Likewise.
947 (_bfd_vms_length_hash_symbol): Likewise.
948 (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
949 and _bfd_vms_write_lmn, and call these functions.
950
951 2010-05-18 Tristan Gingold <gingold@adacore.com>
952
953 * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
954 Add details in the messages.
955 (evax_bfd_print_image): Change message.
956
957 2010-05-18 H.J. Lu <hongjiu.lu@intel.com>
958
959 PR gas/11600
960 * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
961 (elf_fake_sections): Likewise.
962
963 * elf32-i370.c (i370_elf_section_from_shdr): Don't handle
964 SHF_EXCLUDE here.
965 * elf32-ppc.c (ppc_elf_fake_sections): Likewise.
966
967 2010-05-17 Tristan Gingold <gingold@adacore.com>
968
969 * vms-alpha.c: Include esgps.h and eidc.h.
970 (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
971 (evax_bfd_print_egsd_flags): New function, extracted from ...
972 (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags. Handles
973 EGSD__C_SPSC and EGSD__C_IDC.
974
975 2010-05-14 Tristan Gingold <gingold@adacore.com>
976
977 * vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
978 (_bfd_vms_get_object_record): Handle align byte only in the
979 foreign case.
980
981 2010-05-14 Tristan Gingold <gingold@adacore.com>
982
983 * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
984 * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
985 * libbfd.h: Regenerate.
986 * configure.in (havevecs): Define HAVE_all_vecs when
987 --enable-targets=all is set. Use AC_SUBST on it.
988 (tdefaults): Do not add havevecs.
989 (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
990 * configure: Regenerate.
991 * Makefile.am (HAVEVECS): New variable.
992 (INCLUDES): Add HAVEVECS.
993 * Makefile.in: Regenerate.
994 * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
995 target is selected. Add #ifdef/#endif around vms specific code.
996 (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
997 bfd_elfNN_archive_slurp_extended_name_table,
998 bfd_elfNN_archive_construct_extended_name_table,
999 bfd_elfNN_archive_truncate_arname,
1000 bfd_elfNN_archive_write_armap,
1001 bfd_elfNN_archive_read_ar_hdr,
1002 bfd_elfNN_archive_write_ar_hdr,
1003 bfd_elfNN_archive_openr_next_archived_file,
1004 bfd_elfNN_archive_get_elt_at_index,
1005 bfd_elfNN_archive_generic_stat_arch_elt,
1006 bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
1007
1008 2010-05-11 Jie Zhang <jie@codesourcery.com>
1009
1010 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
1011 Tag_ABI_HardFP_use correctly.
1012
1013 2010-05-11 Alan Modra <amodra@gmail.com>
1014
1015 * coffcode.h (coff_write_object_contents): Enclose all occurrences
1016 of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
1017
1018 2010-05-07 Daniel Jacobowitz <dan@codesourcery.com>
1019
1020 * elf32-arm.c (struct a8_erratum_reloc): Add hash member. Move
1021 sym_name to improve packing.
1022 (cortex_a8_erratum_scan): Check for PLT entries.
1023 (elf32_arm_size_stubs): Save the target symbol for a8 relocs.
1024
1025 2010-05-07 Tristan Gingold <gingold@adacore.com>
1026
1027 * Makefile.in: Regenerate with automake 1.11.1.
1028 * aclocal.m4: Ditto.
1029
1030 2010-05-05 Nick Clifton <nickc@redhat.com>
1031
1032 * po/es.po: Updated Spanish translation.
1033
1034 2010-05-03 Tristan Gingold <gingold@adacore.com>
1035
1036 * vms-lib.c (vms_lib_bopen): Fix the size threshold to read
1037 selective_search flag.
1038 Add comments.
1039 * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
1040 before output_has_begun is set.
1041
1042 2010-05-03 Tristan Gingold <gingold@adacore.com>
1043
1044 * vms-alpha.c: Add comments.
1045 (struct vms_private_data_struct): Remove image_autoextend field.
1046 (dst_check_allocation): Removed.
1047 (image_write): Remove call to dst_check_allocation.
1048 (vms_slurp_debug): Do not set image_autoextend. Adjust section
1049 size.
1050 (_bfd_vms_slurp_object_records): Remove useless new_type variable.
1051 (alpha_vms_write_exec): Use dst_section to get the dst section.
1052 Write the dmt section.
1053 (evax_bfd_print_image): Also print the dst size in hexa. Fix typo.
1054 (alpha_vms_read_sections_content): Do not set image_autoextend.
1055 (alpha_vms_bfd_final_link): Generate the dst.
1056
1057 2010-05-03 Tristan Gingold <gingold@adacore.com>
1058
1059 * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
1060 next array.
1061 (vms_lib_dcx): Adjust for the above change.
1062
1063 2010-04-30 H.J. Lu <hongjiu.lu@intel.com>
1064
1065 PR ld/11542
1066 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
1067
1068 * elf32-i386.c (elf_i386_relocate_section): Use it.
1069 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1070
1071 2010-04-30 Tristan Gingold <gingold@adacore.com>
1072
1073 * vms-lib.c (vms_read_block): New function.
1074 (vms_traverse_index): Use vms_read_block. Handle long key names.
1075
1076 2010-04-30 Tristan Gingold <gingold@adacore.com>
1077
1078 * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
1079 and syms removed.
1080 (struct carsym_mem): New structure.
1081 (vms_add_index): New function.
1082 (vms_add_indexes_from_list): New function.
1083 (vms_traverse_index): Parameter carsym changed to carsym_mem.
1084 Code adjusted to handle elfidx.
1085 (vms_lib_read_index): Adjusted for vms_traverse_index changes.
1086 Parameter NBREL is now a pointer.
1087 (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64
1088 archives.
1089 (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
1090 (_bfd_vms_lib_find_symbol): Ditto.
1091 (vms_lib_bopen): Fix two typos: return FALSE in case of error,
1092 check MHD id.
1093 (_bfd_vms_lib_get_module): New function.
1094 (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
1095 function.
1096 (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
1097 (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
1098 (vms_write_index): Adjust for structure renamed.
1099 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
1100 changes of _bfd_vms_lib_find_symbol.
1101
1102 2010-04-28 Kai Tietz <kai.tietz@onevision.com>
1103
1104 * config.bfd: Correct accidential reverted patch
1105 about vax*-*-*vms*.
1106
1107 2010-04-27 Kai Tietz <kai.tietz@onevision.com>
1108
1109 * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
1110 to USE_MINGW64_LEADING_UNDERSCORES.
1111 * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
1112 * config.bfd: Change underscoring default for x64 mingw
1113 to false.
1114 * coffcode.h (coff_write_relocs): Add check that dereferenced
1115 sym_ptr_ptr isn't NULL.
1116 * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
1117 * configure: Regenerated.
1118 * configure.in: Add option '--enable-leading-mingw64-underscores'
1119 and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
1120
1121 2010-04-27 Nick Clifton <nickc@redhat.com>
1122
1123 PR binutils/11512
1124 * coffgen.c (coff_find_nearest_line): Incldue the section address
1125 of function name symbols in address comparisons.
1126
1127 2010-04-27 Nick Clifton <nickc@redhat.com>
1128
1129 * po/fr.po: Updated French translation.
1130
1131 2010-04-23 Alan Modra <amodra@gmail.com>
1132
1133 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
1134 ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
1135 throughout file.
1136 (assign_file_positions_for_load_sections): Modify section in
1137 segment warning to ignore overlay vmas.
1138 * elf32-spu.c (spu_elf_object_p): Replace use of
1139 ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
1140
1141 2010-04-22 Nick Clifton <nickc@redhat.com>
1142
1143 * po/bfd.pot: Updated by the Translation project.
1144 * po/vi.po: Updated Vietnamese translation.
1145
1146 2010-04-22 Alan Modra <amodra@gmail.com>
1147
1148 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
1149 change. Tidy. Don't error on sections not allocated in segment.
1150
1151 2010-04-15 Andrew Haley <aph@redhat.com>
1152
1153 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
1154 merge_exidx_entries.
1155 * bfd-in2.h: Likewise.
1156 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
1157 control merging of exidx entries.
1158
1159 2010-04-20 Joseph Myers <joseph@codesourcery.com>
1160
1161 * elf32-tic6x.h: New.
1162 * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
1163 * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
1164 elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
1165 elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
1166 elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
1167 bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
1168 (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
1169 elf32_tic6x_relocate_section): Handle REL relocations.
1170 (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
1171
1172 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1173
1174 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
1175 DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
1176
1177 2010-04-19 Nick Clifton <nickc@redhat.com>
1178
1179 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
1180 arhdrpos variable.
1181 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
1182 attribute to warned variable. Remove unused val, type and type2
1183 variables.
1184
1185 2010-04-16 Andreas Schwab <schwab@redhat.com>
1186
1187 * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
1188 strict-aliasing rules.
1189
1190 2010-04-16 Tristan Gingold <gingold@adacore.com>
1191
1192 * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
1193 (_bfd_vms_get_object_record): Always assume there is a pad byte
1194 for alignment.
1195
1196 * vms-lib.c: Add a few comments.
1197
1198 2010-04-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1199
1200 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
1201 attributes in v2.08 of the ABI.
1202
1203 2010-04-15 Alan Modra <amodra@gmail.com>
1204
1205 * config.bfd (vax*-*-*vms*): Delete.
1206
1207 2010-04-14 Tristan Gingold <gingold@adacore.com>
1208
1209 * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
1210 vms-tir.lo, vms.lo and add vms-alpha.lo
1211 (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
1212 vms-tir.c, vms.c and add vms-alpha.c
1213 * Makefile.in: Regenerate.
1214 * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
1215 Remove vms_vax_vec.
1216 * configure: Regenerate.
1217 * targets.c (vms_vax_vec): Remove the declaration.
1218 (_bfd_target_vector): Remove vms_vax_vec.
1219 * vms-alpha.c: New file.
1220 * vms-gsd.c: Removed, rewritten in vms-alpha.c
1221 * vms-hdr.c: Ditto.
1222 * vms-tir.c: Ditto.
1223 * vms.c: Ditto.
1224 * vms-misc.c: Fix indentation and comments. Replace most of
1225 #if VMS_DEBUG/vms_debug with vms_debug2.
1226 (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
1227 (hash_string): Ditto.
1228 (_bfd_vms_length_hash_symbol): Ditto.
1229 (maybe_adjust_record_pointer_for_object): Ditto.
1230 (_bfd_vms_get_object_record): Ditto.
1231 (vms_get_remaining_object_record): Ditto.
1232 (_bfd_vms_push): Ditto.
1233 (_bfd_vms_pop): Ditto.
1234 (_bfd_vms_get_header_values): Removed.
1235 (_bfd_vms_get_first_record): Removed.
1236 (vms_get_remaining_image_record): Removed.
1237 (new_symbol): Removed.
1238 (_bfd_vms_enter_symbol): Removed.
1239 (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
1240 (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd
1241 parameter with struct vms_rec_wr.
1242 (_bfd_vms_output_push): Removed and replaced by ...
1243 (_bfd_vms_output_begin_subrec): ... new function.
1244 (_bfd_vms_output_alignment): Replace bfd parameter with
1245 struct vms_rec_wr, and adjust.
1246 (_bfd_vms_output_check): Ditto
1247 (_bfd_vms_output_byte): Ditto.
1248 (_bfd_vms_output_short): Ditto.
1249 (_bfd_vms_output_long): Ditto.
1250 (_bfd_vms_output_quad): Ditto.
1251 (_bfd_vms_output_counted): Ditto.
1252 (_bfd_vms_output_dump): Ditto.
1253 (_bfd_vms_output_fill): Ditto.
1254 (_bfd_vms_output_pop): Removed and replaced by ...
1255 (_bfd_vms_output_end_subrec): ... new function.
1256 (_bfd_vms_output_flush): Removed.
1257 (_bfd_vms_output_align): New function.
1258 (_bfd_vms_output_end): Add recwr parameter. Adjust for this new
1259 parameter.
1260 (vms_convert_to_var): New function imported from vms.c
1261 (vms_convert_to_var_1): Ditto.
1262 (vms_convert_to_var_unix_filename): Ditto.
1263 (vms_get_module_name): Ditto.
1264 (get_vms_time_string): Ditto.
1265 (vms_time_to_time_t): Ditto.
1266 (vms_rawtime_to_time_t): Ditto.
1267 * vms.h: All macros for the VMS file format are now in include/vms.
1268 Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
1269 have been removed.
1270 (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
1271 (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
1272 (struct funcinfo, struct vms_private_data_struct): Ditto.
1273 (struct vms_section_data_struct): Ditto.
1274 (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
1275 (vms_get_module_name, get_vms_time_string): New declarations.
1276 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
1277 (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
1278 (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
1279 (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
1280 (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
1281 (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
1282 (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
1283 (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
1284 (_bfd_vms_output_fill): Ditto.
1285 (bfd_vms_set_section_flags): Ditto.
1286
1287 2010-04-14 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1288
1289 * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
1290 exit due to merging the same weak symbol to test that the symbols are
1291 actually weak.
1292
1293 2010-04-13 Alan Modra <amodra@gmail.com>
1294
1295 * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
1296 when optimizing high got_tlsgd/ld insns.
1297
1298 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
1299
1300 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
1301 define.
1302 (HAVE_PRSTATUS32_T): Likewise.
1303
1304 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 PR corefiles/11467
1307 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
1308 for x86_64-*-linux*.
1309 * config.in: Regenerated.
1310 * configure: Likewise.
1311
1312 * elf.c: Include CORE_HEADER if it is defined.
1313
1314 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
1315 Jan Kratochvil <jan.kratochvil@redhat.com>
1316
1317 * hosts/x86-64linux.h: New.
1318
1319 2010-04-09 Nick Clifton <nickc@redhat.com>
1320
1321 * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
1322 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
1323 variables htab and hdr_info and mark info parameter as unused.
1324 * elf.c (prep_headers): Remove unused variable i_phdrp.
1325 (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
1326 * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
1327 as unused.
1328 * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
1329 * verilog.c (verilog_write_section): Remove unused variable
1330 address.
1331
1332 2010-04-07 Alan Modra <amodra@gmail.com>
1333
1334 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
1335 * configure: Regenerate.
1336
1337 2010-04-06 H.J. Lu <hongjiu.lu@intel.com>
1338
1339 PR ld/11434
1340 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
1341
1342 2010-04-06 Tristan Gingold <gingold@adacore.com>
1343
1344 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
1345
1346 2010-04-05 Jakub Jelinek <jakub@redhat.com>
1347
1348 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
1349 provided that it has the expected address size and zero segment
1350 length.
1351
1352 * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
1353 (struct line_info): Add op_index field, change end_sequence type to
1354 unsigned char.
1355 (new_line_sorts_after): For the same address compare op_index.
1356 (add_line_info): Add op_index argument, store it into the structure.
1357 (decode_line_info): Complain about unknown versions of .debug_line.
1358 Initialize maximum_ops_per_insn. Add op_index state register and
1359 track it.
1360
1361 2010-04-01 Nathan Sidwell <nathan@codesourcery.com>
1362
1363 * elf32-ppc.c (apuinfo_set): New static var.
1364 (ppc_elf_begin_write_processing): Set it here, always create an
1365 APUinfo section if there were any in the inputs.
1366 (ppc_elf_write_section): Check apuinfo_set.
1367 (ppc_elf_final_write_processing): Likewise.
1368
1369 2010-04-01 Tristan Gingold <gingold@adacore.com>
1370
1371 * vms.h: Include time.h. Add prototypes for vms_get_module_name,
1372 vms_time_to_time_t and vms_rawtime_to_time_t.
1373 * vms.c (vms_alpha_vec): Add archives support.
1374 * vms-misc.c: Include safe-ctype.h
1375 (vms_get_module_name): New function.
1376 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
1377 * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
1378 vms_get_module_name function. Use this function.
1379 * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector.
1380 * libbfd-in.h: Add prototype for _bfd_append_relative_path.
1381 Add prototypes for vms-lib.c
1382 * libbfd.h: Regenerate.
1383 * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add
1384 vms-lib.lo to vms_alpha_vec.
1385 * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
1386 * configure: Regenerate.
1387 * bfd.c: Add selective_search field.
1388 * bfd-in2.h: Regenerate.
1389 * archive.c (append_relative_path): Rename to
1390 _bfd_append_relative_path and make it public.
1391 (_bfd_get_elt_at_filepos): Adjust for above renaming.
1392 * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
1393 (BFD32_BACKENDS_CFILES): Add vms-lib.c
1394 * Makefile.in: Regenerate.
1395
1396 2010-04-01 Jakub Jelinek <jakub@redhat.com>
1397
1398 * dwarf2.c (read_attribute_value): Handle CU version 4
1399 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
1400 and DW_FORM_flag_present. For unknown form value return NULL.
1401 (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
1402 like DW_FORM_block.
1403 (parse_comp_unit): Allow CU version 4.
1404
1405 2010-04-01 Hans-Peter Nilsson <hp@axis.com>
1406
1407 * elf32-cris.c (cris_elf_relocate_section): Correct first argument
1408 to _bfd_elf_get_dynamic_reloc_section.
1409 (elf_cris_discard_excess_dso_dynamics): Ditto.
1410
1411 2010-03-31 Kai Tietz <kai.tietz@onevision.com>
1412
1413 * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
1414 * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
1415
1416 2010-03-31 Alan Modra <amodra@gmail.com>
1417
1418 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
1419 TPREL16_HI and TPREL16_HA insns.
1420
1421 2010-03-31 Hans-Peter Nilsson <hp@axis.com>
1422
1423 PR ld/11458
1424 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
1425 assert of empty pcrel_relocs_copied on the direct symbol. Instead
1426 of moving the list from the indirect symbol to the direct symbol,
1427 merge into any existing list.
1428 (cris_elf_check_relocs): Store the original section in the
1429 pcrel_relocs_copied list, not the relocation section.
1430 (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
1431 the relocation section, for reducing its size. Change the
1432 BFD_ASSERT into a check for the section being read-only, and only
1433 emit warnings and TEXTREL marker when there's an entry for a
1434 read-only section.
1435
1436 2010-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1437
1438 * elf32-arm.c (using_thumb_only): Handle v6-M.
1439
1440 2010-03-26 Alan Modra <amodra@gmail.com>
1441
1442 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
1443 * bfd-in.h (elf_discarded_section): Clarify comment.
1444 * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
1445 * bfd-in2.h: Regenerate.
1446
1447 2010-03-26 Matt Rice <ratmice@gmail.com>
1448
1449 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
1450 as unique in the armap.
1451
1452 2010-03-26 Alan Modra <amodra@gmail.com>
1453
1454 PR ld/11375
1455 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
1456 possible stub on branches.
1457
1458 2010-03-25 Joseph Myers <joseph@codesourcery.com>
1459
1460 * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
1461 (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
1462 (BFD32_BACKENDS): Add elf32-tic6x.lo.
1463 (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
1464 * Makefile.in: Regenerate.
1465 * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
1466 (bfd_archures_list): Update.
1467 * config.bfd (tic6x-*-elf): New.
1468 * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
1469 New.
1470 * configure: Regenerate.
1471 * cpu-tic6x.c, elf32-tic6x.c: New.
1472 * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
1473 BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
1474 BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
1475 BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
1476 BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
1477 BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
1478 BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
1479 BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
1480 BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
1481 BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
1482 BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
1483 BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
1484 BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
1485 * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
1486 (_bfd_target_vector): Update.
1487 * bfd-in2.h, libbfd.h: Regenerate.
1488
1489 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
1490
1491 * aout-target.h: Update copyright year.
1492 * aout-tic30.c: Likewise.
1493 * coff-alpha.c: Likewise.
1494 * coff-rs6000.c: Likewise.
1495 * coff64-rs6000.c: Likewise.
1496 * elf64-mips.c: Likewise.
1497 * ieee.c: Likewise.
1498 * libecoff.h: Likewise.
1499 * mach-o-target.c: Likewise.
1500 * mach-o.c: Likewise.
1501 * oasys.c: Likewise.
1502 * targets.c: Likewise.
1503
1504 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
1505
1506 * libbfd-in.h: Update copyright year.
1507
1508 2010-03-21 H.J. Lu <hongjiu.lu@intel.com>
1509
1510 PR ld/11413
1511 * elflink.c (_bfd_elf_add_default_symbol): Check !executable
1512 instead of shared.
1513
1514 2010-03-19 Jie Zhang <jie@codesourcery.com>
1515
1516 * elf32-arm.c (struct section_list): Remove.
1517 (section_list): Remove typedef.
1518 (record_section_with_arm_elf_section_data): Remove.
1519 (find_arm_elf_section_entry): Remove.
1520 (get_arm_elf_section_data): Use is_arm_elf.
1521 (unrecord_section_with_arm_elf_section_data): Remove.
1522 (elf32_arm_new_section_hook): Don't call
1523 record_section_with_arm_elf_section_data.
1524 (elf32_arm_write_section): Set mapcount to -1 when
1525 the map has been used. Don't call
1526 unrecord_section_with_arm_elf_section_data.
1527 (unrecord_section_via_map_over_sections): Remove.
1528 (elf32_arm_close_and_cleanup): Remove.
1529 (elf32_arm_bfd_free_cached_info): Remove.
1530 (bfd_elf32_close_and_cleanup): Don't define.
1531 (bfd_elf32_bfd_free_cached_info): Don't define.
1532
1533 2010-03-18 H.J. Lu <hongjiu.lu@intel.com>
1534
1535 PR binutils/11396
1536 * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
1537 * libcoff.h: Regenerated.
1538
1539 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
1540 if dont_strip_reloc is set.
1541 (_bfd_XX_bfd_copy_private_bfd_data_common): Set
1542 dont_strip_reloc on output if there is no .reloc and
1543 IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
1544
1545 2010-03-18 Wei Guozhi <carrot@google.com>
1546
1547 PR gas/11323
1548 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
1549 R_ARM_GOT_PREL.
1550 * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
1551 * bfd-in2.h: Regenerate.
1552 * libbfd.h: Regenerate.
1553
1554 2010-03-17 H.J. Lu <hongjiu.lu@intel.com>
1555
1556 * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
1557 (BFD_RELOC_SPU_STUB): Likewise.
1558
1559 2010-03-17 Jie Zhang <jie@codesourcery.com>
1560
1561 * elf.c (assign_file_positions_for_load_sections): Avoid
1562 overflow.
1563
1564 2010-03-17 Alan Modra <amodra@gmail.com>
1565
1566 PR binutils/11382
1567 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
1568 proper type.
1569
1570 2010-03-17 Alan Modra <amodra@gmail.com>
1571
1572 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
1573
1574 2010-03-16 Alan Modra <amodra@gmail.com>
1575
1576 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
1577 (ppc64_elf_edit_toc): Set it here.
1578 (ha_reloc_match): New function.
1579 (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
1580
1581 2010-03-15 Alan Modra <amodra@gmail.com>
1582
1583 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
1584 * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
1585
1586 2010-03-14 Alan Modra <amodra@gmail.com>
1587
1588 PR ld/11378
1589 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
1590 * elf64-ppc.c (call_check_done): Define.
1591 (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
1592 (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
1593 (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
1594 (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
1595 Simplify return logic. Iterate over all .init and .fini fragments
1596 by recursion. Set makes_toc_func_call here..
1597 (ppc64_elf_next_input_section): ..rather than here.
1598 (check_pasted_section, ppc64_elf_check_init_fini): New functions.
1599
1600 2010-03-13 Alan Modra <amodra@gmail.com>
1601
1602 PR ld/11375
1603 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
1604 function descriptor symbol if there is one, not just for plt stubs.
1605 (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
1606
1607 2010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1608
1609 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
1610 version twice.
1611 Skip it when constructing def.vd_next.
1612
1613 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
1614 bfd_elf32_i386_sol2_vec.
1615 (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
1616 (elf32_bed): Redefine to elf32_i386_sol2_bed.
1617 (elf_backend_want_plt_sym): Redefine to 1.
1618
1619 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
1620 bfd_elf64_x86_64_sol2_vec.
1621 (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
1622 (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
1623 (elf_backend_want_plt_sym): Redefine to 1.
1624
1625 * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
1626 bfd_elf32_i386_sol2_vec.
1627 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1628 targ64_selvecs.
1629 (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
1630 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1631 targ_selvecs.
1632
1633 * configure.in: Handle bfd_elf32_i386_sol2_vec,
1634 bfd_elf64_x86_64_sol2_vec.
1635 * configure: Regenerate.
1636
1637 * targets.c (bfd_elf32_i386_sol2_vec): Declare.
1638 (bfd_elf64_x86_64_sol2_vec): Declare.
1639 (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
1640 bfd_elf64_x86_64_sol2_vec.
1641
1642 2010-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1643
1644 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
1645 sections.
1646
1647 2010-03-04 Alan Modra <amodra@gmail.com>
1648
1649 PR 11302
1650 * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
1651 (read_attribute_value, decode_line_info): Likewise.
1652 (add_line_info, read_rangelist): Return FALSE on alloc failures.
1653 (arange_add, sort_line_sequences): Likewise.
1654 (find_abstract_instance_name): Handle failures from called funcs.
1655 (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
1656 (find_line): Realloc to a temp, and handle alloc fail.
1657
1658 2010-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1659
1660 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
1661 a mapping symbol to an empty section.
1662
1663 2010-03-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1664
1665 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
1666 return value from the call to _bfd_elf_merge_object_attributes.
1667
1668 2010-03-02 Christophe Lyon <christophe.lyon@st.com>
1669 Alan Modra <amodra@gmail.com>
1670
1671 * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
1672 destination mode of the a8 stub.
1673 (elf32_arm_link_hash_table): Add top_id field.
1674 (elf32_arm_link_hash_table_create): Initialize top_id.
1675 (arm_type_of_stub): Update prototype, st_type can now be updated
1676 by this function. Actual destination address in case of PLT is
1677 computed here, to help factorizing code.
1678 (elf32_arm_stub_name): Update prototype, use stub_type additional
1679 parameter to build stub name.
1680 (elf32_arm_get_stub_entry): Update prototype, use stub_type
1681 additional parameter to build stub entry.
1682 (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
1683 put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
1684 Call elf32_arm_final_link_relocate to process all in-stub
1685 relocations.
1686 (elf32_arm_setup_section_lists): Update top_id.
1687 (cortex_a8_erratum_scan): Record stub destination mode.
1688 (elf32_arm_size_stubs): Update call to arm_type_of_stub according
1689 to new prototype.
1690 (elf32_arm_final_link_relocate): Enable processing of in-stub
1691 REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
1692 needed, enabling code factorization.
1693 (elf32_arm_final_link): Process stub sections.
1694 (elf32_arm_output_map_sym): Add entry to code/data map.
1695
1696 2010-03-01 David S. Miller <davem@davemloft.net>
1697
1698 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
1699 h->def_regular, set h->ref_regular.
1700 (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
1701 and dynamic relocations if h->ref_regular.
1702
1703 * elfxx-sparc.c (struct elf_reloc_map): Delete.
1704 (sparc_reloc_map): Delete.
1705 (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
1706 relocation type in switch statements.
1707
1708 2010-02-25 Alan Modra <amodra@gmail.com>
1709
1710 PR ld/11304
1711 * elf.c (_bfd_elf_init_private_section_data): Rename need_group
1712 to final_link and invert. For final link allow some flags to
1713 differ. Don't specially allow flags to be all zero.
1714
1715 2010-02-24 Alan Modra <amodra@gmail.com>
1716
1717 PR binutils/10858
1718 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
1719 SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
1720 table.
1721
1722 2010-02-23 Andrew Zabolotny <anpaza@mail.ru>
1723
1724 PR binutils/11297
1725 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
1726 (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
1727
1728 2010-02-22 Alan Modra <amodra@gmail.com>
1729
1730 * reloc.c (bfd_check_overflow): When forming addrmask, shift
1731 fieldmask left by rightshift.
1732 (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all
1733 overflow checks.
1734
1735 2010-02-20 H.J. Lu <hongjiu.lu@intel.com>
1736
1737 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
1738 STT_GNU_IFUNC on large common symbol.
1739
1740 2010-02-18 H.J. Lu <hongjiu.lu@intel.com>
1741
1742 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
1743 has_ifunc_symbols if the symbol comes from a shared library.
1744 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1745 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1746 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1747 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1748 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
1749
1750 2010-02-19 Alan Modra <amodra@gmail.com>
1751
1752 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
1753 (_bfd_elf_copy_private_header_data): ..here.
1754 * elflink.c (_bfd_elf_size_group_sections): New function.
1755 (bfd_elf_size_dynamic_sections): Call it.
1756 * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
1757 (_bfd_elf_fixup_group_sections): Declare.
1758
1759 2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1760
1761 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
1762 merging Tag_DIV_use, Tag_MPextension_use, and
1763 Tag_MPextension_use_legacy tags.
1764
1765 2010-02-18 Alan Modra <amodra@gmail.com>
1766
1767 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
1768 commit. Don't write zeros for removed group members.
1769 (_bfd_elf_copy_private_header_data): Adjust size of group section
1770 when group members are removed by objcopy.
1771
1772 2010-02-15 Dave Korn <dave.korn.cygwin@gmail.com>
1773
1774 PR binutils/11280
1775 * configure.host (*-*-solaris2.11): Add host define to select
1776 valid default code page for windres/windmc on solaris.
1777
1778 2010-02-15 Nick Clifton <nickc@redhat.com>
1779
1780 * po/vi.po: Updated Vietnamese translation.
1781
1782 2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
1783
1784 * elf32-arm.c (elf32_arm_output_arch_local_syms): add
1785 missing mapping symbol to data only sections.
1786
1787 2010-02-11 David S. Miller <davem@davemloft.net>
1788
1789 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
1790 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
1791 symbols.
1792 (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
1793 these relocs on global symbols.
1794 (gdopoff): New.
1795 (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
1796 local symbol references which are not STT_GNU_IFUNC. Handle
1797 relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
1798 and deal with negative vs. non-negative values properly.
1799
1800 2010-02-09 Tristan Gingold <gingold@adacore.com>
1801
1802 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
1803 non-external relocation.
1804
1805 2010-02-09 Alan Modra <amodra@gmail.com>
1806
1807 * elf64-ppc.c (merge_got_entries): Move earlier in file.
1808 (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
1809 (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
1810 (ppc64_elf_layout_multitoc): Don't resize if we have already
1811 merged got entries.
1812
1813 2010-02-09 Michael Holzheu <holzheu@de.ibm.com>
1814
1815 * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1816 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1817 elfcore_write_s390_prefix): New.
1818 * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1819 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1820 elfcore_write_s390_prefix): New.
1821 (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
1822 NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
1823 (elfcore_write_register_note): Handle .reg-s390-timer,
1824 .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
1825 .reg-s390-prefix section.
1826
1827 2010-02-09 Alan Modra <amodra@gmail.com>
1828
1829 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
1830 unsigned char. Update variables and code using them throughout file.
1831 (struct ppc_link_hash_entry): Likewise for tls_mask.
1832
1833 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
1834
1835 * elf64-ppc.c (has_small_toc_reloc): Don't define.
1836 (makes_toc_func_call, call_check_in_progress): Shuffle flags.
1837 (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update
1838 code setting the flag.
1839 (ppc64_elf_next_toc_section): Group big-toc sections in
1840 0x80008000 chunks.
1841
1842 2010-02-08 David S. Miller <davem@davemloft.net>
1843
1844 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
1845 srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
1846
1847 * elfxx-sparc.c (create_got_section): Delete.
1848 (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
1849 section creator does that work for us. Use ->elf.foo instead of
1850 ->foo where applicable.
1851 (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
1852 where applicable.
1853 (allocate_dynrelocs): Likewise.
1854 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1855 (_bfd_sparc_elf_relocate_section): Likewise.
1856 (sparc_vxworks_build_plt_entry): Likewise.
1857 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1858 (sparc_finish_dyn): Likewise.
1859 (sparc_vxworks_finish_exec_plt): Likewise.
1860 (sparc_vxworks_finish_shared_plt): Likewise.
1861 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
1862
1863 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
1864 macros for visibilty and locality checks.
1865 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1866 (allocate_dynrelocs): Likewise.
1867 (_bfd_sparc_elf_relocate_section): Likewise.
1868 (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
1869
1870 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
1871 but never used local var 'dynobj'.
1872
1873 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
1874 nocopyreloc.
1875
1876 * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
1877 (BFD_RELOC_SPARC_IRELATIVE): Likewise.
1878 * bfd-in2.h: Regenerate.
1879 * libbfd.h: Regenerate.
1880
1881 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
1882 and loc_hash_memory.
1883 (_bfd_sparc_elf_link_hash_table_free): Declare.
1884 * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
1885 (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
1886 bfd_elf32_bfd_link_hash_table_free): Define.
1887 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
1888 has_ifunc_symbols if STT_GNU_IFUNC.
1889 (bfd_elf64_bfd_link_hash_table_free): Define.
1890 (elf_backend_post_process_headers): Define always.
1891 * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
1892 (sparc_reloc_map): Add entries for new IFUNC relocs.
1893 (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
1894 (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
1895 (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
1896 elf_sparc_get_local_sym_hash): New.
1897 (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
1898 from here...
1899 (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate
1900 local hash table.
1901 (_bfd_sparc_elf_link_hash_table_free): New.
1902 (create_ifunc_sections): New.
1903 (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
1904 and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols
1905 cons up a fake local hash table entry for it. Unconditionally add
1906 a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count
1907 dyn relocs for ifunc.
1908 (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
1909 (allocate_dynrelocs): Unconditionally emit a PLT entry when
1910 STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc.
1911 (allocate_local_dynrelocs): New function.
1912 (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
1913 table. Emit dynamic relocs to irelplt when not shared. Treat iplt
1914 like splt.
1915 (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
1916 (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
1917 plt in iplt/irelplt.
1918
1919 2010-02-08 Richard Sandiford <r.sandiford@uk.ibm.com>
1920
1921 * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
1922 max_contents_size, only consider sections whose contents must
1923 be swapped in.
1924
1925 2010-02-09 Alan Modra <amodra@gmail.com>
1926
1927 * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
1928 (ppc64_elf_size_dynamic_sections): ..and here..
1929 (merge_got_entries): ..rather than here.
1930
1931 2010-02-09 Alan Modra <amodra@gmail.com>
1932
1933 * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
1934 (has_small_toc_reloc): Define.
1935 (ppc64_elf_check_relocs): Set the above flags.
1936 (ppc64_elf_edit_opd): Delete obfd param.
1937 (ppc64_elf_tls_optimize): Likewise.
1938 (ppc64_elf_edit_toc): Likewise.
1939 (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param.
1940 * elf64-ppc.h: Update prototypes.
1941
1942 2010-02-08 Alan Modra <amodra@gmail.com>
1943
1944 * section.c (struct bfd_section): Delete has_tls_reloc,
1945 has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
1946 Add sec_flg0 thru sec_flg5.
1947 (BFD_FAKE_SECTION): Update for changed flags.
1948 * ecoff.c (bfd_debug_section): Likewise.
1949 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1950 * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1951 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
1952 * elf32-xtensa.c (reloc_done): Define.
1953 * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
1954 * bfd-in2.h: Regenerate.
1955
1956 2010-02-08 Tristan Gingold <gingold@adacore.com>
1957
1958 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
1959 for non-scattered relocations.
1960
1961 2010-02-08 Nathan Sidwell <nathan@codesourcery.com>
1962
1963 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
1964 apuinfo sections, only scan input sections once and reuse the
1965 buffer.
1966
1967 2010-02-08 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1968
1969 * archures.c (bfd_mach_ppc_titan): Define.
1970 * bfd-in2.h: Regenerate.
1971 * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
1972
1973 2010-02-08 Alan Modra <amodra@gmail.com>
1974
1975 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
1976
1977 2010-02-05 Sterling Augustine <sterling@tensilica.com>
1978
1979 * elf.c (assign_file_positions_for_load_sections) Update lma of
1980 section if necessary. Fixes Bugzilla 11219.
1981
1982 2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
1983
1984 * elf32-i386.c: Remove trailing white spaces.
1985 * elf64-x86-64.c: Likewise.
1986
1987 2010-02-03 Nick Clifton <nickc@redhat.com>
1988
1989 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
1990 entries for other architectures.
1991 (struct elf_link_hash_table): Add hash_table_id field.
1992 (elf_hash_table_id): New accessor macro.
1993 * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
1994 parameter.
1995 * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
1996 returning cast pointer.
1997 (elf32_mn10300_link_hash_table_create): Identify new table as
1998 containing MN10300 extensions.
1999 (mn10300_elf_relax_section): Check pointer returned by
2000 elf32_mn10300_hash_table.
2001 * elf32-arm.c: Likewise, except using ARM extensions.
2002 * elf32-avr.c: Likewise, except using AVR extensions.
2003 * elf32-bfin.c: Likewise, except using BFIN extensions.
2004 * elf32-cris.c: Likewise, except using CRIS extensions.
2005 * elf32-frv.c: Likewise, except using FRV extensions.
2006 * elf32-hppa.c: Likewise, except using HPPA32 extensions.
2007 * elf32-i386.c: Likewise, except using I386 extensions.
2008 * elf32-lm32.c: Likewise, except using LM32 extensions.
2009 * elf32-m32r.c: Likewise, except using M32RM extensions.
2010 * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
2011 * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
2012 * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
2013 * elf32-m68k.c: Likewise, except using M68K extensions.
2014 * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
2015 * elf32-ppc.c: Likewise, except using PPC32 extensions.
2016 * elf32-s390.c: Likewise, except using S390 extensions.
2017 * elf32-sh.c: Likewise, except using SH extensions.
2018 * elf32-spu.c: Likewise, except using SPU extensions.
2019 * elf32-xtensa.c: Likewise, except using XTENSA extensions.
2020 * elf64-alpha.c: Likewise, except using ALPHA extensions.
2021 * elf64-hppa.c: Likewise, except using HPPA64 extensions.
2022 * elf64-ppc.c: Likewise, except using PPC64 extensions.
2023 * elf64-s390.c: Likewise, except using S390 extensions.
2024 * elf64-x86-64.c: Likewise, except using X86_64 extensions.
2025 * elfxx-ia64.c: Likewise, except using IA64 extensions.
2026 * elfxx-mips.c: Likewise, except using MIPS extensions.
2027 * elfxx-sparc.c: Likewise, except using SPARC extensions.
2028 * elfxx-sparc.h: Likewise, except using SPARC extensions.
2029 * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
2030 redundant structure.
2031 (elf32_cr16_hash_table): Delete unused macro.
2032 (elf32_cr16_link_hash_traverse): Delete unused macro.
2033 * elf32-score.c: Likewise.
2034 * elf32-score7.c: Likewise.
2035 * elf32-vax.c: Likewise.
2036 * elf64-sh64.c: Likewise.
2037
2038 2010-02-03 Alan Modra <amodra@gmail.com>
2039
2040 * elf64-ppc.c (struct plt_entry): Move earlier in file.
2041 (struct got_entry): Likewise. Add is_indirect and got.ent fields.
2042 (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
2043 Update all uses.
2044 (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
2045 Remove no_multi_toc.
2046 (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
2047 when allocating a new struct got_entry.
2048 (allocate_got): New function, extracted from..
2049 (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd.
2050 (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
2051 .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries.
2052 (ppc64_elf_setup_section_lists): Remove output_bfd param and
2053 no_multi_toc, add add_stub_section and layout_sections_again. Stash
2054 new params in htab. Extract some code to..
2055 (ppc64_elf_start_multitoc_partition): ..here. New function.
2056 (ppc64_elf_next_toc_section): Check for linker script errors. Handle
2057 second pass toc scan.
2058 (merge_got_entries, merge_global_got, reallocate_got): New functions.
2059 (ppc64_elf_reinit_toc): Rename to..
2060 (ppc64_elf_finish_multitoc_partition): ..this.
2061 (ppc64_elf_layout_multitoc): New function.
2062 (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
2063 layout_sections_again params.
2064 (ppc64_elf_relocate_section): Handle indirect got entries.
2065 * elf64-ppc.h: Update prototypes. Declare new functions.
2066
2067 2010-02-02 H.J. Lu <hongjiu.lu@intel.com>
2068
2069 * elf-bfd.h (elfcore_write_xstatereg): New.
2070
2071 * elf.c (elfcore_grok_xstatereg): New.
2072 (elfcore_write_xstatereg): Likewise.
2073 (elfcore_grok_note): Handle NT_X86_XSTATE.
2074 (elfcore_write_register_note): Handle .reg-xstate section.
2075
2076 2010-02-01 Tristan Gingold <gingold@adacore.com>
2077
2078 * som.c (som_write_ar_hdr): Define this macro.
2079
2080 2010-01-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2081
2082 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
2083 R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
2084 linkage table pointer to use the global table pointer if not doing
2085 a shared link.
2086
2087 2010-01-29 Joel Brobecker <brobecker@adacore.com>
2088
2089 * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
2090 if it has already been set.
2091
2092 2010-01-27 Tristan Gingold <gingold@adacore.com>
2093
2094 * vms.h: Remove trailing spaces.
2095 (struct hdr_struct): Remove unused hdr_c_cpr field.
2096 (enum file_format_enum): Add comments.
2097 * vms.c (vms_bfd_print_private_bfd_data): New function that
2098 replaces the macro.
2099 Remove trailing spaces.
2100 * vms-misc.c: Improve comments.
2101 (_bfd_vms_get_object_record): Also handle files without pads.
2102 * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
2103 * vms-gsd.c (struct flagdescstruct): Make name field const.
2104 (gsyflagdesc): Fix typo.
2105
2106 2010-01-27 Alan Modra <amodra@gmail.com>
2107
2108 PR ld/11217
2109 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
2110 (ppc64_elf_setup_section_lists): Init them.
2111 (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
2112 and .toc on the same input file.
2113 (ppc64_elf_relocate_section): Correct GOT entry offset.
2114
2115 2010-01-26 Tristan Gingold <gingold@adacore.com>
2116
2117 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
2118 (bfd_target): Add _bfd_write_ar_hdr_fn field.
2119 * archive.c (is_bsd44_extended_name): New macro.
2120 (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size.
2121 (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
2122 name.
2123 (_bfd_archive_bsd44_construct_extended_name_table): New function.
2124 (_bfd_generic_write_ar_hdr): Ditto.
2125 (_bfd_bsd44_write_ar_hdr): Ditto.
2126 (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
2127 (bsd_write_armap): Adjust firstreal computation.
2128 * libbfd-in.h (struct areltdata): Add extra_size field.
2129 (_bfd_generic_write_ar_hdr): Add prototype.
2130 (_bfd_bsd44_write_ar_hdr): Ditto.
2131 (_bfd_write_ar_hdr): Define.
2132 (_bfd_noarchive_write_ar_hdr): Ditto.
2133 (_bfd_archive_bsd_write_ar_hdr): Ditto.
2134 (_bfd_archive_coff_write_ar_hdr): Ditto.
2135 (_bfd_archive_bsd44_slurp_armap): Ditto.
2136 (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
2137 (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
2138 (_bfd_archive_bsd44_truncate_arname): Ditto.
2139 (_bfd_archive_bsd44_write_armap): Ditto.
2140 (_bfd_archive_bsd44_read_ar_hdr): Ditto.
2141 (_bfd_archive_bsd44_write_ar_hdr): Ditto.
2142 (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
2143 (_bfd_archive_bsd44_get_elt_at_index): Ditto.
2144 (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
2145 (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
2146 * libbfd.h: Regenerate.
2147 * oasys.c (oasys_write_ar_hdr): Define.
2148 * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
2149 * ieee.c (ieee_write_ar_hdr): Define.
2150 * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
2151 * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
2152 (bfd_pmac_xcoff_backend_data): Ditto.
2153 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
2154 (bfd_xcoff_aix5_backend_data): Ditto.
2155 * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
2156 * aout-target.h (MY_write_ar_hdr): Define it if not defined.
2157 * aout-tic30.c (MY_write_ar_hdr): Ditto.
2158 * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
2159 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
2160 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
2161 (bfd_mach_o_construct_extended_name_table)
2162 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
2163 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
2164 (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
2165 * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
2166 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
2167 (bfd_mach_o_construct_extended_name_table)
2168 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
2169 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
2170 (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
2171 * bfd-in2.h: Regenerate.
2172
2173 2010-01-26 Alan Modra <amodra@gmail.com>
2174 H.J. Lu <hongjiu.lu@intel.com>
2175
2176 PR ld/11218
2177 * elflink.c (elf_link_output_extsym): Do not ignore undefined
2178 symbols with ref_regular set when gc_sections is active.
2179
2180 2010-01-25 Alan Modra <amodra@gmail.com>
2181
2182 PR ld/11217
2183 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
2184 with relocations against undefined weak symbols.
2185 (ppc64_elf_relocate_section): Don't optimize calls to undefined
2186 weak functions if the symbol is dynamic.
2187 (ppc64_elf_relocate_section): Edit tprel tls sequences.
2188 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2189 (_bfd_elf_ppc_at_tprel_transform): New function.
2190 * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
2191 * bfd-in2.h: Regenerate.
2192
2193 2010-01-23 Richard Sandiford <r.sandiford@uk.ibm.com>
2194
2195 * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
2196 (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
2197 * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
2198 bitsize to 1.
2199 (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
2200
2201 2010-01-21 Nick Clifton <nickc@redhat.com>
2202
2203 * elflink.c (elf_link_add_object_symbols): Look up name of
2204 undefined symbol both before and after versioning has been
2205 applied. Do not bother with symbols that are weakly undefined.
2206
2207 2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2208
2209 * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
2210 (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
2211
2212 2010-01-19 Cary Coutant <ccoutant@google.com>
2213
2214 * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
2215
2216 2010-01-19 Daisuke Hatayama <d.hatayama@jp.fujitsu.com>
2217 Alan Modra <amodra@gmail.com>
2218
2219 * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
2220 (elf_object_p): Read e_phnum extension.
2221 (elf_write_shdrs_and_ehdr): Write e_phnum extension.
2222 * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check
2223 that we can read last program header.
2224
2225 2010-01-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
2226
2227 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
2228 R_ARM_THM_CALL entry.
2229 (elf32_arm_final_link_relocate): Correct calculation of
2230 reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
2231 or R_ARM_THM_JUMP24 relocation.
2232
2233 2010-01-18 Alan Modra <amodra@gmail.com>
2234
2235 PR 11168
2236 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
2237 block past vars in COFF_IMAGE_WITH_PE block. Report error on more
2238 than 32k sections.
2239
2240 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2241
2242 Fix compilation warning on gcc-3.4.
2243 * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
2244 parameter index to sec_index according to the function definition.
2245
2246 2010-01-13 Chao-ying Fu <fu@mips.com>
2247
2248 * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
2249 It is true for all CPUs.
2250 (jal_reloc_p): New function.
2251 (mips_elf_calculate_relocation): Rename require_jalxp to
2252 cross_mode_jump_p.
2253 Update comment for CROSS_MODE_JUMP_P.
2254 Set up cross_mode_jump_p based on the mode change.
2255 (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
2256 Update comment for CROSS_MODE_JUMP_P.
2257 Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
2258 Use !cross_mode_jump_p to guard conversion.
2259 Convert "jr t9" to "b", if possible.
2260 (_bfd_mips_elf_relocate_section): Rename require_jalx to
2261 cross_mode_jump_p.
2262 Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
2263 Pass cross_mode_jump_p to call mips_elf_perform_relocation.
2264
2265 2010-01-13 Nick Clifton <nickc@redhat.com>
2266
2267 * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
2268 "m32c" returns the m32c arch_info_struct and not the m16c
2269 arch_info_struct.
2270 (arch_info_struct): Use the new scan function.
2271 (bfd_m32c_arch): Likewise.
2272
2273 2010-01-13 Tristan Gingold <gingold@adacore.com>
2274
2275 * config.bfd: Remove duplicated target vector for i386-*-darwin.
2276 Appends new arch instead of overriding.
2277 Use mach_o_x86_64_vec for x86_64-*-darwin.
2278 * configure.in: Add mach_o_x86_64_vec.
2279 * configure: Regenerate.
2280 * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
2281 * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
2282 (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
2283 * Makefile.in: Regenerate.
2284 * mach-o-x86-64.c: New file.
2285
2286 2010-01-13 Tristan Gingold <gingold@adacore.com>
2287
2288 * reloc.c: Add MACH_O_X86_64 relocations.
2289 * bfd-in2.h: Regenerate.
2290 * libbfd.h: Regenerate.
2291
2292 2010-01-13 Tristan Gingold <gingold@adacore.com>
2293
2294 * archive.c (normalize): Use lbasename.
2295 (bfd_bsd_truncate_arname): Ditto.
2296 (bfd_gnu_truncate_arname): Ditto.
2297
2298 2010-01-12 Tristan Gingold <gingold@adacore.com>
2299
2300 * makefile.vms (CFLAGS): Turns warnings into informational messages.
2301
2302 2010-01-11 Tristan Gingold <gingold@adacore.com>
2303
2304 * mach-o.h: Add x86-64 relocation types.
2305
2306 2010-01-11 Tristan Gingold <gingold@adacore.com>
2307
2308 * mach-o.h (bfd_mach_o_backend_data): Add arch field.
2309 (bfd_mach_o_set_arch_mach): New prototype.
2310 * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
2311 (bfd_mach_o_set_arch_mach): New function.
2312 (bfd_mach_o_gen_mkobject): New function.
2313 Set TARGET_ARCHITECTURE for the generic back-ends.
2314 * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
2315 Check that TARGET_ARCHITECTURE is defined.
2316 Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
2317 * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
2318
2319 2010-01-11 Tristan Gingold <gingold@adacore.com>
2320
2321 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
2322
2323 2010-01-11 Nick Clifton <nickc@redhat.com>
2324
2325 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
2326 handling of R_V850_HI16_S relocation.
2327
2328 2010-01-11 Alan Modra <amodra@gmail.com>
2329
2330 PR 11103
2331 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
2332
2333 2010-01-11 Alan Modra <amodra@gmail.com>
2334
2335 PR 6832
2336 * dwarf2.c (struct comp_unit): Add sec_info_ptr.
2337 (find_abstract_instance_name): Use it.
2338 (parse_comp_unit): Set it.
2339
2340 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2341
2342 * Makefile.in: Regenerate.
2343 * configure: Regenerate.
2344
2345 2010-01-08 Tristan Gingold <gingold@adacore.com>
2346
2347 * archive.c: Remove bfd_special_undocumented_glue.
2348
2349 2010-01-08 Alan Modra <amodra@gmail.com>
2350
2351 PR ld/11133
2352 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
2353 * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
2354 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
2355
2356 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
2357
2358 PR ld/11138
2359 * elflink.c (elf_link_check_versioned_symbol): Don't abort if
2360 a symbol referenced by DSO is is defined in a non-shared object
2361 and forced local.
2362
2363 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
2364
2365 PR ld/11133
2366 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
2367 undefined __start_XXX/__stop_XXX in all input files and set
2368 SEC_KEEP.
2369
2370 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
2371
2372 PR ld/11143
2373 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
2374
2375 2010-01-04 Daniel Gutson <dgutson@codesourcery.com>
2376
2377 * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
2378 before including procfs.h.
2379 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
2380 * configure.in: Added autoconf probe for the pr_fpreg member.
2381 * configure: Regenerated.
2382 * config.in: Regenerated.
2383 * elf.c: Define _STRUCTURE_PROC before including procfs.h.
2384
2385 2010-01-04 Joel Brobecker <brobecker@adacore.com>
2386
2387 Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
2388 * dwarf2.c (concat_filename): Rename dirname with dir_name
2389 to void shadowing the dirname function.
2390 Rename subdirname with subdir_name to stay consistent with
2391 the new dir_name variable name.
2392
2393 2010-01-04 Edmar Wienskoski <edmar@freescale.com>
2394
2395 * archures.c: Add bfd_mach_ppc_e500mc64.
2396 * bfd-in2.h: Regenerate.
2397 * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
2398 bfd_mach_ppc_e500mc64.
2399
2400 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2401
2402 Fix -Wshadow warnings (seen on ppc-aix)
2403 * xcofflink.c: Replace finfo by flinfo throughout.
2404
2405 For older changes see ChangeLog-2009
2406 \f
2407 Local Variables:
2408 mode: change-log
2409 left-margin: 8
2410 fill-column: 74
2411 version-control: never
2412 End: