388c568d9f66117ba8a0da4e6cc6cd42e1c51e9e
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2005-07-04 Alan Modra <amodra@bigpond.net.au>
2
3 PR 1004
4 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
5 special_sections.
6 (_bfd_elf_get_special_section): Declare.
7 (bfd_elf_special_section): Update prototype.
8 * elf.c (special_sections): Remove unused outer entries.
9 (get_special_section): Delete.
10 (_bfd_elf_get_special_section): New function.
11 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
12 special_sections indexing.
13 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
14 * elf32-arm.c (symbian_special_sections_d): Delete.
15 (symbian_special_sections_g, symbian_special_sections_h): Delete.
16 (symbian_special_sections_i, symbian_special_sections_f): Delete.
17 (symbian_special_sections_p): Delete.
18 (elf32_arm_symbian_special_sections): Merge above to here.
19 (elf32_arm_symbian_get_sec_type_attr): New function.
20 (elf_backend_special_sections): Don't define.
21 (elf_backend_get_sec_type_attr): Define.
22 * elf32-m32r.c: Similarly to elf32-arm.c.
23 * elf32-m68hc11.c: Likewise.
24 * elf32-m68hc12.c: Likewise.
25 * elf32-mcore.c: Likewise.
26 * elf32-sh64.c: Likewise.
27 * elf32-v850.c: Likewise.
28 * elf32-xtensa.c: Likewise.
29 * elf64-alpha.c: Likewise.
30 * elf64-hppa.c: Likewise.
31 * elf64-ppc.c: Likewise.
32 * elf64-sh64.c: Likewise.
33 * elfxx-ia64.c: Likewise.
34 * elfxx-mips.c: Likewise.
35 * elf32-ppc.c: Likewise.
36 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
37 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
38 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
39 (elf_backend_get_sec_type_attr): Define.
40 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
41 (elf_backend_special_sections): Don't define.
42 (elfNN_bed): Update.
43
44 2005-07-01 Nick Clifton <nickc@redhat.com>
45
46 * cpu-d10v.c: Update to ISO C90 style function declarations and
47 fix formatting.
48 * cpu-d30v.c: Likewsie.
49 * cpu-i370.c: Likewsie.
50 * cpu-xstormy16.c: Likewsie.
51 * elf32-arc.c: Likewsie.
52 * elf32-d10v.c: Likewsie.
53 * elf32-d30v.c: Likewsie.
54 * elf32-dlx.c: Likewsie.
55 * elf32-i370.c: Likewsie.
56 * elf32-i960.c: Likewsie.
57 * elf32-ip2k.c: Likewsie.
58 * elf32-m32r.c: Likewsie.
59 * elf32-mcore.c: Likewsie.
60 * elf32-openrisc.c: Likewsie.
61 * elf32-or32.c: Likewsie.
62 * elf32-pj.c: Likewsie.
63 * elf32-v850.c: Likewsie.
64 * elf32-xstormy16.c: Likewsie.
65
66 2005-07-01 Alan Modra <amodra@bigpond.net.au>
67
68 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
69 a new .got section.
70 (elf64_alpha_create_dynamic_sections): Always make new sections
71 by using bfd_make_section_anyway_with_flags. Check that .got not
72 already created.
73 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
74 instead.
75
76 2005-06-30 Alan Modra <amodra@bigpond.net.au>
77
78 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
79 _SDA_BASE_ and _SDA2_BASE_ symbols.
80 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
81 sym if not def_regular.
82 (_bfd_elf_provide_section_bound_symbols): Similarly.
83
84 2005-06-30 Ben Elliston <bje@gnu.org>
85
86 * config.bfd: Mark as obsolete:
87 m68*-apollo-*
88 m68*-apple-aux*
89 m68*-bull-sysv*
90
91 2005-06-29 Alan Modra <amodra@bigpond.net.au>
92
93 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
94 .eh_frame specially..
95 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
96 Don't recheck sections we have already marked.
97 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
98 * section.c (struct bfd_section): Add gc_mark_from_eh.
99 (STD_SECTION): Adjust.
100 * ecoff.c (bfd_debug_section): Adjust.
101 * bfd-in2.h: Regenerate.
102
103 2005-06-29 Alan Modra <amodra@bigpond.net.au>
104
105 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
106 not been processed by check_relocs.
107
108 2005-06-29 Paul Brook <paul@codesourcery.com>
109
110 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
111 * bfd-in2.h: Regenerate.
112 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
113 relative.
114 * elflink.c (bfd_elf_set_symbol): Add section argument.
115 (_bfd_elf_provide_symbol): Ditto.
116 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
117
118 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
119
120 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
121 Use bh_root, and hh.
122 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
123 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
124 (struct elf32_hppa_link_hash_table): Use etab and bstab.
125 (stub_hash_newfunc): Use hh.
126 (hppa_link_hash_newfunc): Use hsh_cache.
127 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
128 (elf32_hppa_link_hash_table_free): Use bstab.
129 (hppa_stub_name): Use eh.
130 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
131 (hppa_add_stub): Use bstab.
132 (hppa_type_of_stub): Use eh.
133 (hppa_build_one_stub): Use hh and bh_root.
134 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
135 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
136 (elf32_hppa_gc_sweep_hook): Use hdh_next.
137 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
138 (allocate_plt_static): Use etab.
139 (allocate_dynrelocs): Use etab, and hdh_next.
140 (readonly_dynrelocs): Use hdh_next.
141 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
142 (get_local_syms): Use eh, bstab, and hh.
143 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
144 (elf32_hppa_set_gp): Use etab.
145 (elf32_hppa_build_stubs): Use bstab.
146 (final_link_relocate): Use eh, bh_root.
147 (elf32_hppa_relocate_section): Use elf, etab.
148 (elf32_hppa_finish_dynamic_sections): Use etab.
149
150 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
151
152 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
153 the extra `;'.
154
155 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
156
157 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
158 (hppa_stub_hash_entry): Define.
159 (stub_hash_newfunc): Rename variables.
160 (hppa_link_hash_newfunc): Likewise.
161 (elf32_hppa_link_hash_table_free): Likewise.
162 (hppa_stub_name): Likewise.
163 (hppa_get_stub_entry): Likewise.
164 (hppa_add_stub): Likewise.
165 (hppa_type_of_stub): Likewise.
166 (hppa_build_one_stub): Likewise.
167 (hppa_size_one_stub): Likewise.
168 (elf32_hppa_create_dynamic_sections): Likewise.
169 (elf32_hppa_copy_indirect_symbol): Likewise.
170 (elf32_hppa_check_relocs): Likewise.
171 (elf32_hppa_gc_mark_hook): Likewise.
172 (elf32_hppa_gc_sweep_hook): Likewise.
173 (elf32_hppa_grok_psinfo): Likewise.
174 (elf32_hppa_hide_symbol): Likewise.
175 (elf32_hppa_adjust_dynamic_symbol): Likewise.
176 (allocate_dynrelocs): Likewise.
177 (clobber_millicode_symbols): Likewise.
178 (readonly_dynrelocs): Likewise.
179 (elf32_hppa_size_dynamic_sections): Likewise.
180 (get_local_syms): Likewise.
181 (elf32_hppa_size_stubs): Likewise.
182 (hppa_record_segment_addr): Likewise.
183 (final_link_relocate): Likewise.
184 (elf32_hppa_relocate_section): Likewise.
185 (elf32_hppa_finish_dynamic_symbol): Likewise.
186
187 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
188
189 PR 1025
190 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
191 symbol.
192 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
193 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
194 * elf32-cris.c (cris_elf_check_relocs): Likewise.
195 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
196 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
197 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
198 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
199 * elf32-i370.c (i370_elf_check_relocs): Likewise.
200 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
201 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
202 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
203 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
204 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
205 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
206 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
207 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
208 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
209 * elf32-s390.c (elf_s390_check_relocs): Likewise.
210 * elf32-sh.c (sh_elf_check_relocs): Likewise.
211 * elf32-v850.c (v850_elf_check_relocs): Likewise.
212 * elf32-vax.c (elf_vax_check_relocs): Likewise.
213 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
214 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
215 * elf64-s390.c (elf_s390_check_relocs): Likewise.
216 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
217 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
218 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
219
220 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
221
222 PR 1022
223 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
224 symbol.
225
226 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
227
228 PR 1025
229 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
230 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
231
232 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
233
234 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
235 BFD_RELOC_X86_64_GOTPC32.
236 * bfd-in2.h: Regenerated.
237
238 2005-06-17 Jakub Jelinek <jakub@redhat.com>
239
240 * elf.c (bfd_section_from_shdr): Kill bogus warning.
241
242 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
243 symbol, relocation, group or versym sections.
244
245 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
246 is NULL.
247 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
248 doesn't point into the section.
249
250 2005-06-17 Jan Beulich <jbeulich@novell.com>
251
252 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
253 and BFD_RELOC_X86_64_GOTPC32.
254 * libbfd.h (bfd_reloc_code_real_names): Likewise.
255 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
256 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
257 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
258 and R_X86_64_GOTPC32.
259 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
260 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
261 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
262 (elf64_x86_64_relocate_section): Likewise.
263 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
264
265 2005-06-15 Mark Kettenis <kettenis@gnu.org>
266
267 * archive.c: Include "libiberty.h".
268
269 2005-06-15 Nick Clifton <nickc@redhat.com>
270
271 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
272 produced by the GreenHills toolchain can be assimilated.
273
274 2005-06-14 Steve Ellcey <sje@cup.hp.com>
275
276 * som.c (som_find_inliner_info): New.
277
278 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
279
280 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
281
282 2005-06-14 Jakub Jelinek <jakub@redhat.com>
283
284 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
285 Prevent endless recursion on broken objects.
286
287 * archive.c (do_slurp_coff_armap): Check for overflows.
288
289 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
290
291 * elfcode.h (elf_write_relocs): Do nothing if there are no
292 relocations.
293
294 2005-06-10 Alan Modra <amodra@bigpond.net.au>
295
296 * dwarf2.c (decode_line_info): Revert last change. Instead set
297 initial low_pc to -1 to avoid need to test whether loc_pc has
298 been set.
299
300 2005-06-09 Christopher Faylor <cgf@timesys.com>
301
302 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
303 either SEC_ALLOC OR SEC_LOAD.
304
305 2005-06-09 Christopher Faylor <cgf@timesys.com>
306
307 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
308 section header. Do not add STYP_NOLOAD since it does not appear to be
309 a valid PE flag.
310
311 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
312
313 PR 1000
314 * dwarf2.c (lookup_address_in_line_info_table): Restore code
315 handling NULL function info, removed with 2005-04-03 change.
316
317 2005-06-08 Mark Mitchell <mark@codesourcery.com>
318
319 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
320
321 2005-06-09 Alan Modra <amodra@bigpond.net.au>
322
323 * elflink.c (elf_mark_used_section): Delete.
324 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
325 * reloc.c (bfd_mark_used_section): New function.
326 (bfd_generic_gc_sections): Call bfd_mark_used_section.
327
328 2005-06-08 Alan Modra <amodra@bigpond.net.au>
329
330 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
331 (bfd_fdopenr): Same.
332
333 2005-06-07 Mark Mitchell <mark@codesourcery.com>
334
335 * opncls.c (bfd_fdopenr): Add missing break statements.
336
337 2005-06-07 Mark Mitchell <mark@codesourcery.com>
338
339 * opncls.c (bfd_fopen): New API.
340 (bfd_openr): Use it.
341 (bfd_fdopenr): Likewise.
342 * bfd-in2.h: Regenerated.
343
344 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
345 Michael Snyder <msnyder@redhat.com>
346 Stan Cox <scox@redhat.com>
347
348 * Makefile.am (ALL_MACHINES): Add ms1 support.
349 (ALL_MACHINES_CFILES): Same.
350 (BFD32_BACKENDS): Same.
351 (BFD32_BACKENDS_CFILES): Same.
352
353 * Makefile.in: Regenerate.
354
355 * archures.c (bfd_architecture): Add ms1 entries.
356 Externalize bfd_ms1_arch.
357 (bfd_archures_list): Add bfd_ms1_arch.
358
359 * bfd-in2.h: Regenerate.
360
361 * cpu-ms1.c: New file.
362
363 * elf32-ms1.c: New file.
364
365 * targets.c: Define extern of bfd_elf32_ms1_vec.
366 Add bfd_elf32_ms1_vec to _bfd_target_vector.
367
368 * configure.in: Add bfd_elf32_ms1_vec case.
369
370 * configure: Regenerate.
371
372 * config.bfd: Add ms1-*-elf to table.
373
374 2005-06-07 Zack Weinberg <zack@codesourcery.com>
375
376 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
377
378 2005-06-07 Alan Modra <amodra@bigpond.net.au>
379
380 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
381 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
382
383 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
384
385 PR 990
386 * bfd.c (bfd_find_line): New.
387
388 * dwarf2.c (comp_unit): Add variable_table.
389 (funcinfo): Add file, line, and sec.
390 (varinfo): New.
391 (lookup_symbol_in_function_table): New.
392 (lookup_symbol_in_variable_table): New.
393 (scan_unit_for_functions): Renamed to ...
394 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
395 DW_TAG_variable.
396 (comp_unit_find_nearest_line): Updated.
397 (comp_unit_find_line): New.
398 (_bfd_dwarf2_find_line): New.
399
400 * elf-bfd.h (_bfd_elf_find_line): New.
401 (_bfd_generic_find_line): New. Defined.
402
403 * elf.c (_bfd_elf_find_line): New.
404
405 * libbfd-in.h (_bfd_dwarf2_find_line): New.
406 (_bfd_generic_find_line): New.
407
408 * bfd-in2.h: Regenerated.
409 * libbfd.h: Likewise.
410
411 * libbfd.c (_bfd_generic_find_line): New.
412
413 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
414 with _bfd_generic_find_line.
415 (bfd_target): Add _bfd_find_line.
416
417 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
418
419 * dwarf2.c (decode_line_info): Properly set low_pc.
420
421 2005-06-06 Alan Modra <amodra@bigpond.net.au>
422
423 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
424 case, include addend when indexing .opd section map.
425 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
426 clear opd_adjust array if no_opd_opt set. Tidy code.
427 Ignore zero size .opd. Check bfd_alloc return value.
428 (ppc_stub_name): Return immediately on bfd_malloc fail.
429 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
430
431 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
432
433 * dwarf2.c (comp_unit): Fix a typo in comment.
434
435 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
436
437 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
438 (reloc_type_lookup): Dito.
439 (elf_vax_discard_copies): Dito.
440 (elf_vax_instantiate_got_entries): Dito.
441 (elf_vax_link_hash_traverse): Dito.
442 (elf_vax_link_hash_newfunc): Dito.
443 (elf_vax_link_hash_table_create): Dito.
444 (elf32_vax_set_private_flags): Dito.
445 (elf32_vax_merge_private_bfd_data): Dito.
446 (elf32_vax_print_private_bfd_data): Dito.
447 (elf_vax_check_relocs): Dito.
448 (elf_vax_gc_mark_hook): Dito.
449 (elf_vax_gc_sweep_hook): Dito.
450 (elf_vax_size_dynamic_sections): Dito.
451 (elf_vax_discard_copies): Dito.
452 (elf_vax_instantiate_got_entries): Dito.
453 (elf_vax_relocate_section): Dito.
454 (elf_vax_finish_dynamic_symbol): Dito.
455 (elf_vax_finish_dynamic_sections): Dito.
456 (elf_vax_hash_table): Break-up of line isn't needed.
457 (elf_vax_check_relocs): Remove leading whitespace
458 (elf_vax_relocate_section): Remove redundant whitespace
459 (elf_vax_link_hash_newfunc): Don't cast NULL.
460 (elf_vax_link_hash_table_create): Dito.
461 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
462
463 2005-06-03 Alan Modra <amodra@bigpond.net.au>
464
465 PR 568
466 * configure.in: Bump version
467 * configure: Regenerate.
468 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
469 discarded section sym refs and kill linker output.
470 * simple.c (simple_dummy_einfo): New function.
471 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
472
473 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
474 for all reloc types.
475
476 2005-06-02 Alan Modra <amodra@bigpond.net.au>
477
478 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
479 restrictive of func code and func descr for undefined syms as well
480 as defined.
481
482 2005-05-31 Jim Blandy <jimb@redhat.com>
483
484 * Makefile.am: Regenerate dependencies with 'make dep-am'.
485 * Makefile.in: Regenerate.
486
487 2005-05-31 Richard Henderson <rth@redhat.com>
488
489 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
490 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
491 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
492 (elf64_alpha_want_plt): Update to match.
493 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
494 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
495
496 2005-05-31 Zack Weinberg <zack@codesourcery.com>
497
498 * elf32-arm.c (elf32_arm_reloc_type_lookup)
499 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
500 Use ISO C90 function declaration style.
501
502 2005-05-31 James E Wilson <wilson@specifixinc.com>
503
504 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
505 header PF_R flag on PT_LOAD segments.
506
507 2005-05-30 Richard Henderson <rth@redhat.com>
508
509 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
510 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
511
512 2005-05-29 Richard Henderson <rth@redhat.com>
513
514 * configure.in (--enable-secureplt): New.
515 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
516 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
517 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
518 (elf64_alpha_use_secureplt): New.
519 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
520 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
521 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
522 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
523 (struct alpha_elf_link_hash_entry): Add plt_offset.
524 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
525 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
526 (PLT_ENTRY_WORD3): Remove.
527 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
528 on .plt and create .got.plt.
529 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
530 (get_got_entry): Initialize plt_offset.
531 (elf64_alpha_want_plt): New.
532 (elf64_alpha_check_relocs): Use it.
533 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
534 plt entries here.
535 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
536 error as user error.
537 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
538 got subsection.
539 (elf64_alpha_size_plt_section): Size .got.plt section.
540 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
541 plt entries used.
542 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
543 Add PLTRO DYNAMIC entry.
544 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
545 (elf64_alpha_finish_dynamic_sections): Likewise.
546
547 2005-05-28 David Daney <ddaney@avtrex.com>
548
549 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
550 calculation of DT_RELSZ to occur after all dynamic relocations
551 are created.
552
553 2005-05-28 Eli Zaretskii <eliz@gnu.org>
554
555 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
556 * config.in, configure: Regenerate.
557
558 2005-05-26 Mark Kettenis <kettenis@gnu.org>
559 Maciej W. Rozycki <macro@linux-mips.org>
560
561 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
562 stop processing of options if one of invalid size is
563 encountered.
564 (_bfd_mips_elf_section_from_shdr): Likewise.
565 (_bfd_mips_elf_fake_sections): Reset the type of empty special
566 sections.
567
568 2005-05-26 Richard Henderson <rth@redhat.com>
569
570 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
571 plt_old_section, plt_old_value.
572 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
573 (elf64_alpha_size_plt_section_1): Don't use it.
574
575 2005-05-26 Jakub Jelinek <jakub@redhat.com>
576
577 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
578 first shdr has sh_size == 0. Fail if e_shnum is large to cause
579 arithmetic overflow when allocating the i_shdr array.
580 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
581
582 2005-05-25 Richard Henderson <rth@redhat.com>
583
584 * elf64-alpha.c: Update all function definitions to ISO C. Remove
585 all function prototypes; rearrange functions into def-use order.
586
587 2005-05-25 Richard Henderson <rth@redhat.com>
588
589 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
590 in the presence of deleting elements.
591 (elf64_alpha_size_got_sections): Zero dead got section size.
592
593 2005-05-23 Fred Fish <fnf@specifixinc.com>
594
595 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
596 (struct funcinfo): Add caller_func, caller_file, caller_line.
597 tag, and nesting_level members.
598 (lookup_address_in_function_table): Change first passed parameter
599 from "struct funcinfo *" to "struct comp_unit *".
600 (lookup_address_in_function_table): Dereference unit to find function
601 table.
602 (lookup_address_in_function_table): Traverse the function list to
603 create a chain of inlined functions back to the first non inlined
604 function.
605 (scan_unit_for_functions): Remember tag and nesting level. Handle
606 DW_AT_call_file and DW_AT_call_line.
607 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
608 call to pass unit pointer instead of function table pointer. For
609 inlined functions, save pointer to the inliner chain.
610 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
611 (_bfd_dwarf2_find_inliner_info): New function that returns information
612 from the inliner chain after a call to bfd_find_nearest_line.
613
614 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
615 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
616 NAME##_find_inliner_info.
617 (bfd_target): Add _bfd_find_inliner_info.
618 * bfd-in2.h: Regenerate.
619
620 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
621 macro that always returns bfd_false.
622 (_bfd_dwarf2_find_inliner_info): Declare.
623 * libbfd.h: Regenerate.
624
625 * elf32-arm.c (elf32_arm_find_inliner_info): New function
626 that calls _bfd_dwarf2_find_inliner_info.
627 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
628
629 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
630 that calls _bfd_dwarf2_find_inliner_info.
631 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
632 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
633 _bfd_mips_elf_find_inliner_info.
634 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
635 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
636
637 * elf.c (_bfd_elf_find_inliner_info): New function that calls
638 _bfd_dwarf2_find_inliner_info.
639 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
640 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
641 _bfd_elf_find_inliner_info.
642
643 * coffgen.c (coff_find_inliner_info): New function that
644 calls _bfd_dwarf2_find_inliner_info.
645 * libcoff-in.h (coff_find_inliner_info): Declare.
646 * libcoff.h: Regenerate.
647 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
648 (pmac_xcoff_vec) Ditto.
649 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
650 (aix5coff64_vec): Ditto.
651
652 * aout-target.h (MY_find_inliner_info): Define as
653 _bfd_nosymbols_find_inliner_info.
654 * aout-tic30.c (MY_find_inliner_info): Ditto.
655 * binary.c (binary_find_inliner_info): Ditto.
656 * i386msdos.c (msdos_find_inliner_info): Ditto.
657 * ihex.c (ihex_find_inliner_info): Ditto.
658 * libaout.h (aout_32_find_inliner_info): Ditto.
659 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
660 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
661 * mmo.c (mmo_find_inliner_info): Ditto.
662 * nlm-target.h (nlm_find_inliner_info): Ditto.
663 * pef.c (bfd_pef_find_inliner_info): Ditto.
664 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
665 * srec.c (srec_find_inliner_info): Ditto.
666 * tekhex.c (tekhex_find_inliner_info): Ditto.
667 * versados.c (versados_find_inliner_info): Ditto.
668 * xsym.c (bfd_sym_find_inliner_info): Ditto.
669
670 * ieee.c (ieee_find_inliner_info): New function that always
671 returns FALSE.
672 * oasys.c (oasys_find_inliner_info): Ditto.
673 * vms.c (vms_find_inliner_info): Ditto.
674
675 2005-05-24 Alan Modra <amodra@bigpond.net.au>
676
677 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
678 force old plt layout.
679
680 2005-05-22 Richard Henderson <rth@redhat.com>
681
682 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
683 sections.
684 (elf64_alpha_check_relocs): Likewise.
685 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
686 non-allocated sections.
687
688 2005-05-22 Richard Henderson <rth@redhat.com>
689
690 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
691 undefweak to use zero register. Call elf64_alpha_relax_got_load
692 if not all uses removed.
693 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
694 (elf64_alpha_relax_section): Handle undefweak symbols.
695 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
696 (elf64_alpha_size_rela_got_1): Likewise.
697 (elf64_alpha_relocate_section): Likewise.
698
699 2005-05-22 Richard Henderson <rth@redhat.com>
700
701 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
702 on SEC_CODE sections.
703
704 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
705
706 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
707 unsigned int *.
708 (som_write_space_strings): Change type of tmp_space and p to char *.
709 (som_write_symbol_strings): Likewise. Also change type of comp to
710 char *comp[4].
711 (som_begin_writing): Change type of strings_size to unsigned int.
712 (som_finish_writing): Likewise.
713 (som_slurp_reloc_table): Change type of external_relocs to unsigned
714 char *.
715 * som.h (struct som_section_data_struct): Change type of reloc_stream
716 field to unsigned char *.
717
718 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
719
720 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
721 copy relocations for VxWorks.
722
723 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
724
725 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
726 has_sda_refs.
727 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
728 (ppc_elf_check_relocs): Set has_sda_refs.
729 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
730 copy relocations. Use has_sda_refs to place variables in .sbss.
731 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
732 .sbss.
733
734 2005-05-20 Bob Wilson <bob.wilson@acm.org>
735
736 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
737 xtensa_default_isa is initialized.
738
739 2005-05-20 Alan Modra <amodra@bigpond.net.au>
740
741 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
742 for second and subsequent list entries. Only allocate multiple
743 glink stubs when shared or pie.
744 (ppc_elf_finish_dynamic_symbol): Break out early when only one
745 glink stub is needed.
746
747 2005-05-19 Zack Weinberg <zack@codesourcery.com>
748
749 * Makefile.am: Have 'all' depend on 'info'.
750 * Makefile.in: Regenerate.
751
752 2005-05-19 Alan Modra <amodra@bigpond.net.au>
753
754 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
755 init_offset. Add init_got_refcount, init_plt_refcount,
756 init_got_offset and init_plt_offset.
757 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
758 (_bfd_elf_link_hash_hide_symbol): Likewise.
759 (_bfd_elf_link_hash_table_init): Likewise.
760 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
761 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
762 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
763 (bfd_elf_size_dynamic_sections): Likewise.
764 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
765 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
766 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
767 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
768 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
769 (struct plt_entry): New.
770 (ppc_elf_link_hash_table_create): Set new init_plt fields.
771 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
772 use _bfd_elf_link_hash_copy_indirect.
773 (update_plt_info, find_plt_ent): New functions.
774 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
775 and adjust for use of plt list rather than refcount.
776 (ppc_elf_gc_sweep_hook): Likewise.
777 (ppc_elf_tls_optimize): Likewise.
778 (ppc_elf_adjust_dynamic_symbol): Likewise.
779 (allocate_dynrelocs): Likewise.
780 (ppc_elf_relax_section): Likewise.
781 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
782 when performing a relocatable link.
783 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
784 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
785 pic resolver stub.
786
787 2005-05-19 Alan Modra <amodra@bigpond.net.au>
788
789 * elf.c (assign_file_positions_for_segments): Use maximum of
790 maxpagesize and section alignment when adjusting initial
791 segment offset and section offsets.
792
793 2005-05-18 Zack Weinberg <zack@codesourcery.com>
794
795 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
796 unconditional.
797
798 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
799
800 * elf.c (group_signature): Undo the last change. Check if the
801 symbol table section is correct.
802
803 2005-05-17 Zack Weinberg <zack@codesourcery.com>
804
805 * elf32-arm.c: Wherever possible, use official reloc names
806 from AAELF.
807 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
808 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
809 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
810 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
811 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
812 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
813 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
814 Add many new relocations from AAELF.
815 (elf32_arm_howto_from_type): Update to match.
816 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
817 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
818 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
819 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
820 (elf32_arm_final_link_relocate): Add support for
821 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
822 case entries redundant with default.
823
824 * reloc.c: Reorganize ARM relocations. Add Thumb
825 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
826 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
827 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
828 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
829 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
830 * bfd-in2.h, libbfd.h: Regenerate.
831
832 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
833
834 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
835 elf_shstrtab.
836 * format.c (bfd_check_format_matches): Set output_has_begun
837 for both_direction.
838 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
839 special case for both_direction.
840
841 2005-05-17 Nick Clifton <nickc@redhat.com>
842
843 * elf.c (group_signature): Check for a group section which is
844 actually a (corrupt) symbol table section in disguise and prevent
845 an infinite loop from occurring.
846
847 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
848
849 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
850 2005-02-16.
851
852 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
853
854 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
855 predicate on slot 0 only if slot 0 isn't br.
856
857 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
858
859 PR 797
860 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
861 empty sdynbss section.
862 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
863
864 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
865
866 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
867 dynamic sections.
868
869 2005-05-17 Alan Modra <amodra@bigpond.net.au>
870
871 * elf32-ppc.c (LIS_11. LIS_12): Define.
872 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
873 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
874 for --data-plt when building non-pie executables.
875
876 2005-05-17 Nick Clifton <nickc@redhat.com>
877
878 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
879 the situation where a symbols's section is not known but a section
880 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
881 OS.
882
883 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
884 the presence of a symbol table to just before the symbol table is
885 actually used.
886
887 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
888
889 PR 834
890 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
891 (elfNN_ia64_relax_section): Use it.
892
893 2005-05-14 Mark Kettenis <kettenis@gnu.org>
894
895 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
896 of basename.
897
898 2005-05-14 Alan Modra <amodra@bigpond.net.au>
899
900 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
901 not DT_PPC_GLINK.
902 (ppc_elf_finish_dynamic_sections): Likewise.
903
904 2005-05-13 Fred Fish <fnf@specifixinc.com>
905
906 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
907 * libbfd.h: Rebuilt.
908
909 2005-05-13 Bob Wilson <bob.wilson@acm.org>
910
911 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
912 periods in linkonce_kind values.
913
914 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
915
916 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
917 against protected function when building executable.
918
919 2005-05-12 Alan Modra <amodra@bigpond.net.au>
920
921 * elf32-ppc.c (LWZU_0_X_11): Delete.
922 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
923 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
924 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
925 table.
926 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
927 table.
928 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
929 Generate .glink branch table and updated stubs.
930
931 2005-05-11 Alan Modra <amodra@bigpond.net.au>
932
933 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
934 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
935 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
936 (CROR_151515, CROR_313131): Delete.
937 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
938 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
939 LWZU_0_X_11): Define.
940 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
941 and R_PPC_REL16_HA entries.
942 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
943 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
944 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
945 new_plt, and old_plt.
946 (ppc_elf_create_dynamic_sections): Create .glink section.
947 (ppc_elf_check_relocs): Set new_plt and old_plt.
948 (ppc_elf_select_plt_layout): New function.
949 (ppc_elf_tls_setup): Set plt output section elf type and flags.
950 (allocate_got): Handle differences between old and new got layout.
951 (allocate_dynrelocs): Likewise for plt.
952 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
953 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
954 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
955 destination of R_PPC_PLTREL24 relocs.
956 (ppc_elf_relocate_section): Handle new relocs and changed destination
957 of R_PPC_PLTREL24.
958 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
959 differences in layout.
960 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
961 put a blrl in new got. Write glink contents.
962 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
963 * libbfd.h: Regenerate.
964 * bfd-in2.h: Regenerate.
965
966 2005-05-11 Andreas Schwab <schwab@suse.de>
967
968 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
969 warning.
970
971 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
972
973 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
974 section if SEC_ALLOC isn't set.
975
976 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
977
978 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
979 * acinclude.m4: Don't sinclude accross.m4.
980 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
981
982 2005-05-09 Alan Modra <amodra@bigpond.net.au>
983
984 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
985 (ppc64_elf_add_symbol_hook): Set has_dotsym.
986 (ppc64_elf_check_directives): Only process syms when has_dotsym.
987 (func_desc_adjust): Hide fake function descriptors when function
988 code entry is defined.
989 (adjust_opd_syms): Adjust for deleted_section becoming union field.
990
991 2005-05-09 Alan Modra <amodra@bigpond.net.au>
992
993 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
994
995 2005-05-08 Dave Korn <dave.korn@artimi.com>
996
997 * coff-tic80.c: Undefine _CONST after system headers to prevent
998 clash with tic80-specific definition in include/coff/tic80.h
999
1000 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 PR 939
1003 * elflink.c (elf_link_output_extsym): Use output_bfd if
1004 h->root.u.def.section is bfd_abs_section_ptr when reporting
1005 error.
1006
1007 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 * elf-bfd.h (elf_backend_data): Update special_sections to
1010 array of pointer to bfd_elf_special_section.
1011 * elf.c (special_sections): Likewise.
1012 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1013 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1014 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1015 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1016 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1017 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1018 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1019 * elf32-v850.c (v850_elf_special_sections): Likewise.
1020 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1021 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1022 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1023 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1024 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1025 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1026 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1027 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1028
1029 * elf.c (get_special_section): Updated.
1030
1031 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1032
1033 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1034 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1035 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1036 got_symbol_offset.
1037 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1038 * elf32-frv.c (_frv_create_got_section): Likewise.
1039 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1040 (elf_backend_got_symbol_offset): Don't define.
1041 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1042 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1043 and got_gap.
1044 (ppc_elf_create_got): Tidy.
1045 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1046 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1047 (ppc_elf_gc_sweep_hook): Likewise.
1048 (ppc_elf_relocate_section): Likewise.
1049 (ppc_elf_finish_dynamic_symbol): Likewise.
1050 (allocate_got): New function.
1051 (allocate_dynrelocs): Use allocate_got.
1052 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1053 so that local got can refcount it. Set got_header_size.
1054 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1055 coded 4.
1056 (ppc_elf_finish_dynamic_sections): Likewise.
1057 (elf_backend_got_symbol_offset): Don't define.
1058 (elf_backend_got_header_size): Ditto.
1059
1060 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1061
1062 * configure.in (ACX_HEADER_STRING): New.
1063 * configure: Regenerate.
1064 * config.in: Regenerate.
1065 * sysdep.h (STRING_WITH_STRINGS): Use.
1066
1067 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1068
1069 * elf.c (_bfd_elf_close_and_cleanup): Only call
1070 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1071
1072 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1075 "__bss_start" instead of "_edata" as fallback.
1076
1077 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1078
1079 * bfd-in2.h: Regenerated.
1080
1081 2005-05-05 Paul Brook <paul@codesourcery.com>
1082
1083 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1084 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1085 elf-vxworks.lo.
1086 * configure: Regenerate.
1087 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1088 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1089 (elf32-i386.lo): Depend on elf-vxworks.h.
1090 (elf-vxworks.lo): New rule.
1091 * Makefile.in: Regenerate.
1092 * elf-bfd.h (elf_backend_data): Update type of
1093 elf_backend_emit_relocs.
1094 (_bfd_elf_link_output_relocs): Update prototype.
1095 * elflink.c (_bfd_elf_link_output_relocs): Always use
1096 bed->elf_backend_emit_relocs when outputting relocations.
1097 * elfxx-target.h (elf_backend_emit_relocs): Default to
1098 _bfd_elf_link_output_relocs.
1099 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1100 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1101 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1102 (elf_i386_plt0_entry): Remove padding.
1103 (elf_i386_pic_plt0_entry): Ditto.
1104 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1105 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1106 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1107 plt0_pad_byte fields.
1108 (elf_i386_link_hash_table_create): Zero them.
1109 (elf_i386_create_dynamic_sections): Create static relocation section.
1110 (allocate_dynrelocs): Allocate space for static PLT relocations.
1111 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1112 symbols. Give PLT symbols function type. Don't strip PLT sections
1113 if we have exported symbols from them.
1114 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1115 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1116 VxWorks.
1117 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1118 Add relocation for GOT location. Fill in PLT static relocations.
1119 (elf_i386_vxworks_link_hash_table_create): New function.
1120 (elf_i386_vxworks_link_output_symbol_hook): New function.
1121 * elf-vxworks.h: New file.
1122
1123 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 * section.c (bfd_make_section_anyway_with_flags): New.
1126 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1127 (bfd_make_section_with_flags): New.
1128 (bfd_make_section): Call bfd_make_section_with_flags.
1129
1130 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1131 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1132 instead of bfd_make_section/bfd_make_section and don't call
1133 bfd_set_section_flags.
1134 (mn10300_elf_check_relocs): Likewise.
1135 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1136 * elf32-arm.c (create_got_section): Likewise.
1137 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1138 (elf32_arm_check_relocs): Likewise.
1139 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1140 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1141 (_frv_create_got_section): Likewise.
1142 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1143 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1144 (elf32_hppa_check_relocs): Likewise.
1145 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1146 (i370_elf_check_relocs): Likewise.
1147 * elf32-i386.c (create_got_section): Likewise.
1148 (elf_i386_check_relocs): Likewise.
1149 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1150 (create_got_section): Likewise.
1151 (m32r_elf_create_dynamic_sections): Likewise.
1152 (m32r_elf_check_relocs): Likewise.
1153 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1154 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1155 (ppc_elf_create_dynamic_sections): Likewise.
1156 (ppc_elf_add_symbol_hook): Likewise.
1157 (ppc_elf_check_relocs): Likewise.
1158 * elf32-s390.c (create_got_section): Likewise.
1159 (elf_s390_check_relocs): Likewise.
1160 * elf32-sh.c (create_got_section): Likewise.
1161 (sh_elf_create_dynamic_sections): Likewise.
1162 (sh_elf_check_relocs): Likewise.
1163 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1164 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1165 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1166 (add_extra_plt_sections): Likewise.
1167 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1168 (elf64_alpha_create_got_section): Likewise.
1169 (elf64_alpha_create_dynamic_sections): Likewise.
1170 (elf64_alpha_check_relocs): Likewise.
1171 * elf64-hppa.c (get_reloc_section): Likewise.
1172 (get_opd): Likewise.
1173 (get_plt): Likewise.
1174 (get_dlt): Likewise.
1175 (get_stub): Likewise.
1176 (elf64_hppa_create_dynamic_sectionso): Likewise.
1177 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1178 * elf64-ppc.c (create_linkage_sections): Likewise.
1179 (ppc64_elf_check_relocs): Likewise.
1180 * elf64-s390.c (create_got_section): Likewise.
1181 (elf_s390_check_relocs): Likewise.
1182 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1183 (sh64_elf64_create_dynamic_sections): Likewise.
1184 * elf64-x86-64.c (create_got_section): Likewise.
1185 (elf64_x86_64_check_relocs): Likewise.
1186 * elflink.c (_bfd_elf_create_got_section): Likewise.
1187 (_bfd_elf_link_create_dynamic_sections): Likewise.
1188 (elf_link_add_object_symbols): Likewise.
1189 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1190 (elfNN_ia64_create_dynamic_sections): Likewise.
1191 (get_fptr): Likewise.
1192 (get_pltoff): Likewise.
1193 (get_reloc_section): Likewise.
1194 (elfNN_ia64_object_p): Likewise.
1195 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1196 (mips_elf_create_compact_rel_section): Likewise.
1197 (mips_elf_create_got_section): Likewise.
1198 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1199 * elfxx-sparc.c (create_got_section): Likewise.
1200 (_bfd_sparc_elf_check_relocs): Likewise.
1201
1202 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1203 on linker created sections.
1204
1205 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1206
1207 PR 882
1208 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1209 script on executable.
1210
1211 2005-05-05 John Levon <levon@movementarian.org>
1212
1213 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1214 allocated memory before returning.
1215 (decode_line_info): Likewise.
1216 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1217 allocated by functions in this file.
1218 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1219 * elf.c (_bfd_elf_close_and_cleanup): Call
1220 _bfd_dwarf2_cleanup_debug_info.
1221
1222 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1223
1224 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1225 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1226 * configure, config.in, Makefile.in: Regenerate.
1227 * sysdep.h (stpcpy): Revert last change.
1228
1229 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1230
1231 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1232
1233 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1234
1235 * elfxx-ia64.c (ARCH_SIZE): New.
1236 (LOG_SECTION_ALIGN): Likewise.
1237 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1238 align relocation sections.
1239 (get_fptr): Likewise.
1240 (get_reloc_section): Likewise.
1241 (elfNN_ia64_tprel_base): Likewise.
1242 (elfNN_ia64_check_relocs): Support 32bit relocations.
1243 (allocate_global_fptr_got): Likewise.
1244 (allocate_dynrel_entries): Likewise.
1245 (set_got_entry): Likewise.
1246 (set_pltoff_entry): Likewise.
1247 (elfNN_ia64_relocate_section): Likewise.
1248
1249 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1250
1251 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1252 * configure: Regenerate.
1253 * config.in: Likewise.
1254
1255 * sysdep.h (stpcpy): New.
1256
1257 2005-05-04 Nick Clifton <nickc@redhat.com>
1258
1259 * Update the address and phone number of the FSF organization in
1260 the GPL notices in the following files:
1261 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1262 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1263 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1264 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1265 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1266 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1267 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1268 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1269 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1270 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1271 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1272 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1273 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1274 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1275 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1276 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1277 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1278 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1279 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1280 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1281 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1282 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1283 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1284 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1285 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1286 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1287 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1288 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1289 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1290 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1291 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1292 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1293 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1294 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1295 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1296 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1297 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1298 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1299 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1300 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1301 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1302 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1303 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1304 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1305 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1306 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1307 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1308 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1309 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1310 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1311 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1312 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1313 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1314 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1315 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1316 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1317 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1318 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1319 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1320 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1321 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1322 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1323 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1324 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1325 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1326 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1327 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1328 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1329 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1330 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1331 hosts/alphavms.h
1332
1333 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1334
1335 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1336 * bfd-in2.h: Regenerated.
1337
1338 * elflink.c (bfd_elf_set_symbol): New.
1339 (_bfd_elf_provide_symbol): Call it.
1340 (_bfd_elf_provide_section_bound_symbols): New.
1341
1342 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1343
1344 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1345 at the end, if a strong definition has already been seen.
1346
1347 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1348
1349 * section.c (struct bfd_section): Replace link_order_head and
1350 link_order_tail with map_head and map_tail union.
1351 (STD_SECTION): Update.
1352 (_bfd_strip_section_from_output): Delete.
1353 * aoutx.h: Update throughout for above changes.
1354 * coff-ppc.c: Likewise.
1355 * cofflink.c: Likewise.
1356 * ecoff.c: Likewise.
1357 * elf-eh-frame.c: Likewise.
1358 * elf-m10300.c: Likewise.
1359 * elf.c: Likewise.
1360 * elf32-arm.c: Likewise.
1361 * elf32-cris.c: Likewise.
1362 * elf32-hppa.c: Likewise.
1363 * elf32-i386.c: Likewise.
1364 * elf32-m32r.c: Likewise.
1365 * elf32-m68hc1x.c: Likewise.
1366 * elf32-m68k.c: Likewise.
1367 * elf32-ppc.c: Likewise.
1368 * elf32-s390.c: Likewise.
1369 * elf32-sh.c: Likewise.
1370 * elf32-vax.c: Likewise.
1371 * elf32-xtensa.c: Likewise.
1372 * elf64-alpha.c: Likewise.
1373 * elf64-hppa.c: Likewise.
1374 * elf64-ppc.c: Likewise.
1375 * elf64-s390.c: Likewise.
1376 * elf64-sh64.c: Likewise.
1377 * elf64-x86-64.c: Likewise.
1378 * elflink.c: Likewise.
1379 * elfxx-ia64.c: Likewise.
1380 * elfxx-mips.c: Likewise.
1381 * elfxx-sparc.c: Likewise.
1382 * linker.c: Likewise.
1383 * merge.c: Likewise.
1384 * pdp11.c: Likewise.
1385 * xcofflink.c: Likewise.
1386 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1387 out from bfd_elf_size_dynamic_sections.
1388 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1389 * bfd-in2.h: Regenerate.
1390
1391 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1392
1393 * section.c (bfd_section_list_remove): Don't clear s->next.
1394 (bfd_section_list_append): Always init s->prev.
1395 (bfd_section_list_prepend): Define.
1396 (bfd_section_list_insert_after): Minor optimization.
1397 (bfd_section_removed_from_list): Rewrite.
1398 * elf.c (assign_section_numbers): Simplify list traversal now that
1399 bfd_section_list_remove doesn't destroy removed section next ptr.
1400 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1401 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1402 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1403 * bfd-in2.h: Regenerate.
1404
1405 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 * bfd.c (bfd): Remove section_tail and add section_last.
1408 (bfd_preserve): Likewise.
1409 (bfd_preserve_save): Likewise.
1410 (bfd_preserve_restore): Likewise.
1411 * opncls.c (_bfd_new_bfd): Likewise.
1412
1413 * coffcode.h (coff_compute_section_file_positions): Updated.
1414 (coff_compute_section_file_positions): Likewise.
1415 * elf.c (assign_section_numbers): Likewise.
1416 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1417 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1418 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1419 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1420 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1421 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1422
1423 * ecoff.c (bfd_debug_section): Initialize prev.
1424
1425 * section.c (bfd_section): Add prev.
1426 (bfd_section_list_remove): Updated.
1427 (bfd_section_list_append): New.
1428 (bfd_section_list_insert_after): New.
1429 (bfd_section_list_insert_before): New.
1430 (bfd_section_list_insert): Removed.
1431 (bfd_section_removed_from_list): Updated.
1432 (STD_SECTION): Initialize prev.
1433 (bfd_section_init): Updated.
1434 (bfd_section_list_clear): Updated.
1435
1436 * bfd-in2.h: Regenerated.
1437
1438 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1439
1440 * elf.c (_bfd_elf_new_section_hook): Don't call
1441 _bfd_elf_get_sec_type_attr on sections from input files.
1442
1443 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1446 hash table size 16699 instead of bfd_hash_table_init.
1447
1448 2005-05-01 Paul Brook <paul@codesourcery.com>
1449
1450 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1451 definition has already been seen.
1452
1453 2005-05-01 Paul Brook <paul@codesourcery.com>
1454
1455 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1456 R_ARM_PLT32 the same as R_ARM_PC24.
1457 (arm_add_to_rel): Ditto.
1458
1459 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1460
1461 * config.bfd: Add h8300*-*-rtemscoff.
1462 Switch h8300*-*-rtems* to elf.
1463
1464 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1465
1466 * aclocal.m4, Makefile.in: Regnerated.
1467
1468 2005-04-28 Paul Brook <paul@codesourcery.com>
1469
1470 Merge changes only applied to Makefile.in.
1471 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1472 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1473 (elfxx-sparc.lo): New rule.
1474 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1475 (elf64-sparc.lo): Likewise.
1476
1477 2005-04-28 Julian Brown <julian@codesourcery.com>
1478
1479 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1480 import.
1481
1482 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1483
1484 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1485
1486 * elf.c (bfd_elf_sym_name): Updated.
1487 (group_signature): Likewise.
1488 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1489 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1490 (ppc64_elf_edit_toc): Likewise.
1491 (ppc64_elf_relocate_section): Likewise.
1492 * elfcode.h (elf_slurp_symbol_table): Likewise.
1493 * elflink.c (elf_link_input_bfd): Likewise.
1494
1495 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1496 bfd_elf_sym_name to get local symbol name when reporting errors.
1497
1498 2005-04-27 Nick Clifton <nickc@redhat.com>
1499
1500 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1501 formatted input file results in a reloc which has no associated
1502 global symbol.
1503
1504 2005-04-26 Jerome Guitton <guitton@gnat.com>
1505
1506 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1507
1508 2005-04-25 David S. Miller <davem@davemloft.net>
1509
1510 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1511 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1512 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1513 Likewise.
1514
1515 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1516
1517 PR 858
1518 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1519 to discarded section an error.
1520
1521 2005-04-21 Jerome Guitton <guitton@gnat.com>
1522
1523 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1524 corresponding AC_CHECK_DECLS.
1525 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1526 HAVE_DECL_*.
1527 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1528 * configure: Regenerate.
1529 * config.in: Ditto.
1530
1531 2005-04-21 Andreas Schwab <schwab@suse.de>
1532
1533 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1534 unsigned from type of dynamic_interpreter.
1535 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1536 casts again.
1537
1538 * elf.c (assign_section_numbers): Fix comment.
1539
1540 2005-04-21 Jerome Guitton <guitton@gnat.com>
1541
1542 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1543 for struct som_exec_auxhdr fields.
1544
1545 2005-04-21 Nick Clifton <nickc@redhat.com>
1546
1547 * aout-adobe.c: Convert to ISO C and fix formatting.
1548 * aout-arm.c: Convert to ISO C and fix formatting.
1549 * aout-cris.c: Convert to ISO C and fix formatting.
1550 * aout-ns32k.c: Convert to ISO C and fix formatting.
1551 * aout-tic30.c: Convert to ISO C and fix formatting.
1552 * coffcode.h: Convert to ISO C and fix formatting.
1553 * coffswap.h: Convert to ISO C and fix formatting.
1554 * i386aout.c: Convert to ISO C and fix formatting.
1555 * libaout.h: Convert to ISO C and fix formatting.
1556 * libcoff-in.h: Convert to ISO C and fix formatting.
1557 * libcoff.h: Convert to ISO C and fix formatting.
1558 * libecoff.h: Convert to ISO C and fix formatting.
1559 * libnlm.h: Convert to ISO C and fix formatting.
1560 * libpei.h: Convert to ISO C and fix formatting.
1561 * libxcoff.h: Convert to ISO C and fix formatting.
1562 * nlm-target.h: Convert to ISO C and fix formatting.
1563 * nlm.c: Convert to ISO C and fix formatting.
1564 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1565 * nlm32-i386.c: Convert to ISO C and fix formatting.
1566 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1567 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1568 * nlmcode.h: Convert to ISO C and fix formatting.
1569 * nlmswap.h: Convert to ISO C and fix formatting.
1570 * pe-mips.c: Convert to ISO C and fix formatting.
1571 * peXXigen.c: Convert to ISO C and fix formatting.
1572 * peicode.h: Convert to ISO C and fix formatting.
1573 * vms-gsd.c: Convert to ISO C and fix formatting.
1574 * vms-hdr.c: Convert to ISO C and fix formatting.
1575 * vms-misc.c: Convert to ISO C and fix formatting.
1576 * vms-tir.c: Convert to ISO C and fix formatting.
1577 * vms.c: Convert to ISO C and fix formatting.
1578 * vms.h: Convert to ISO C and fix formatting.
1579
1580 * coffgen.c (coff_print_symbol): Restore correct formatting of
1581 output.
1582
1583 2005-04-20 David S. Miller <davem@davemloft.net>
1584
1585 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1586 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1587 (allocate_dynrelocs): Likewise.
1588
1589 2005-04-20 Jerome Guitton <guitton@gnat.com>
1590
1591 * configure.in: Fix the check for basename declaration. Add check
1592 for declarations of ftello, ftello64, fseeko, fseeko64.
1593 * configure: Regenerate.
1594 * config.in: Ditto.
1595 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1596
1597 2005-04-19 David S. Miller <davem@davemloft.net>
1598
1599 * elfxx-sparc.c: New file.
1600 * elfxx-sparc.h: New file.
1601 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1602 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1603 (elfxx-sparc.lo): New rule.
1604 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1605 (elf64-sparc.lo): Likewise.
1606 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1607 (bfd_elf64_sparc_vec): Likewise.
1608 * configure: Regenerate.
1609 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1610 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1611 which is more consistent with elf32-sparc.c
1612
1613 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1614
1615 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1616 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1617
1618 2005-04-19 Alan Modra <amodra@bigpond.net.au>
1619
1620 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1621 dynamic relocs in non-SEC_ALLOC sections.
1622 (ppc_elf_gc_sweep_hook): Likewise.
1623 (ppc_elf_relax_section): Likewise.
1624 (ppc_elf_relocate_section): Likewise.
1625
1626 2005-04-18 Nick Clifton <nickc@redhat.com>
1627
1628 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1629 assigning a value to return_value.
1630
1631 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1632
1633 PR 855
1634 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1635 created group data.
1636
1637 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1638
1639 PR 855
1640 * elf.c (setup_group): Properly handle zero group count.
1641
1642 2005-04-17 Mark Kettenis <kettenis@gnu.org>
1643
1644 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1645 (som_is_subspace, compare_subspaces, som_compute_checksum)
1646 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1647 protoypes.
1648 (hppa_som_reloc, compare_syms, compare_subspaces)
1649 (som_print_symbol, som_get_section_contents)
1650 (som_set_section_contents): Remove space after 'void *'.
1651 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1652 (som_bfd_merge_private_bfd_data)
1653 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1654 defines.
1655
1656 2004-04-15 Julian Brown <julian@codesourcery.com>
1657
1658 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1659 * bfd-in2.h: Regenerate.
1660 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1661 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1662 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1663 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1664 relocations if requested to.
1665 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1666 use_blx rather than symbian_p.
1667 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1668 use_blx is in effect.
1669 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1670 for SymbianOS.
1671
1672 2005-04-15 Nick Clifton <nickc@redhat.com>
1673
1674 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1675 values.
1676
1677 2005-04-15 Alan Modra <amodra@bigpond.net.au>
1678
1679 PR ld/815
1680 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1681 used as a list pointer.
1682
1683 2005-04-14 Alan Modra <amodra@bigpond.net.au>
1684
1685 * Makefile.am (NO_WERROR): Define.
1686 * warning.m4: New file
1687 * acinclude.m4: Include warning.m4.
1688 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1689 * Makefile.in: Regenerate.
1690 * configure: Regenerate.
1691
1692 2005-04-14 Alan Modra <amodra@bigpond.net.au>
1693
1694 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1695 Write trailing padding.
1696
1697 * merge.c (merge_strings): Round up section size for alignment.
1698
1699 2005-04-14 David S. Miller <davem@davemloft.net>
1700
1701 Add TLS support for 64-bit Sparc ELF.
1702 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1703 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1704 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1705 sparc64_elf_hash_entry, sparc64_elf_tdata,
1706 sparc64_elf_local_got_tls_type): New defines.
1707 (sparc64_elf_mkobject): New function.
1708 (sparc64_elf_link_hash_table): Add members for dynamic linker
1709 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1710 uion to track TLS GOT references. Add sym_sec to cache
1711 mappings from local sym to section.
1712 (link_hash_newfunc): New function.
1713 (sparc64_elf_bfd_link_hash_table_create): Rename to
1714 sparc64_elf_link_hash_table_create for consistency.
1715 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1716 (sparc64_elf_create_dynamic_sections): Initialize new section
1717 members of sparc64_elf_link_hash_table. Only init srelbss
1718 if not-shared.
1719 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1720 New functions.
1721 (SPARC_NOP): Define.
1722 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1723 sparc64_elf_plt_ptr_offset): Delete.
1724 (sparc64_plt_entry_build): New function to build PLT entries
1725 gradually instread of all at once at the end of linking.
1726 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1727 local vars. Get them from sparc64_elf_hash_table instead.
1728 Check early on if r_symndx is in bounds. Handle TLS transitions.
1729 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1730 For TLS relocs, record the tls_type in either
1731 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1732 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1733 to the __tls_get_addr symbol. For PLT relocs, track references
1734 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1735 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1736 symbol references, count the number of relocations needed for
1737 that symbol. For default switch case, don't error, this lets
1738 the TLS relocs not explicitly handled by this function get
1739 accepted.
1740 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1741 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1742 it from sparc64_elf_hash_table. Store the real PLT offset
1743 in h->plt.offset, and build PLT entries one at a time. Also
1744 get .dynbss section pointer from htab.
1745 (allocate_dynrelocs, readonly_dynrelocs,
1746 sparc64_omit_section_dynsym): New functions.
1747 (sparc64_elf_omit_section_dynsym): Use these new functions as
1748 helpers.
1749 (dtpoff_base, tpoff): New functions.
1750 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1751 locals, get them from sparc64_elf_hash_table. Handle TLS
1752 relocations and refcounting in main relocation loop.
1753 (sparc64_elf_finish_dynamic_symbol): Use
1754 sparc64_elf_link_hash_table. Build PLT entries as we see
1755 them. Handle TLS GOT relocations.
1756 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1757 from sparc64_elf_hash_table. Initialize only PLT header
1758 not all entries since we not build PLT entries one by one.
1759 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1760 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1761 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1762
1763 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1764
1765 * elflink.c (elf_link_input_bfd): Update check for removed
1766 sections.
1767
1768 2005-04-12 Alan Modra <amodra@bigpond.net.au>
1769
1770 * Makefile.am: Run "make dep-am".
1771 * Makefile.in: Regenerate.
1772 * aclocal.m4: Regenerate.
1773 * libcoff.h: Regenerate.
1774
1775 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1776
1777 * linker.c (_bfd_generic_link_output_symbols): Also check if
1778 the output section of an input section has been removed from
1779 the output file.
1780
1781 * section.c (bfd_section_list_remove): Clear the next field
1782 of the removed section.
1783 (bfd_section_removed_from_list): New.
1784 * bfd-in2.h: Regenerated.
1785
1786 2005-04-11 David S. Miller <davem@davemloft.net>
1787
1788 * elf32-sparc.c (elf32_sparc_relocate_section,
1789 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1790 R_SPARC_TLS_LE_{HIX22,LOX10}.
1791 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1792 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1793 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1794 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1795
1796 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1797
1798 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1799
1800 2005-04-11 Nick Clifton <nickc@redhat.com>
1801
1802 * aout-target.h: Convert to ISO C.
1803 * aoutf1.h: Convert to ISO C.
1804 * aoutx.h: Convert to ISO C.
1805 * bout.c: Convert to ISO C.
1806 * dwarf1.c: Convert to ISO C.
1807 * ecoffswap.h: Convert to ISO C.
1808 * freebsd.h: Convert to ISO C.
1809 * genlink.h: Convert to ISO C.
1810 * ieee.c: Convert to ISO C.
1811 * ihex.c: Convert to ISO C.
1812 * libcoff-in.h: Convert to ISO C.
1813 * mach-o.c: Convert to ISO C.
1814 * mach-o.h: Convert to ISO C.
1815 * netbsd.h: Convert to ISO C.
1816 * ns32k.h: Convert to ISO C.
1817 * ns32knetbsd.c: Convert to ISO C.
1818 * oasys.c: Convert to ISO C.
1819 * pdp11.c: Convert to ISO C.
1820 * pef-traceback.h: Convert to ISO C.
1821 * pef.c: Convert to ISO C.
1822 * pef.h: Convert to ISO C.
1823 * riscix.c: Convert to ISO C.
1824 * som.c: Convert to ISO C.
1825 * som.h: Convert to ISO C.
1826 * srec.c: Convert to ISO C.
1827 * stabs.c: Convert to ISO C.
1828 * sunos.c: Convert to ISO C.
1829 * tekhex.c: Convert to ISO C.
1830 * versados.c: Convert to ISO C.
1831 * version.h: Convert to ISO C.
1832 * xcoff-target.h: Convert to ISO C.
1833 * xcofflink.c: Convert to ISO C.
1834 * xsym.c: Convert to ISO C.
1835 * xsym.h: Convert to ISO C.
1836
1837 2005-04-08 Paul Brook <paul@codesourcery.com>
1838
1839 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1840 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1841 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1842 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1843 (elf32_arm_to_thumb_stub): Create PIC stubs.
1844 (record_arm_to_thumb_glue): Use different stub size for relocatable
1845 images.
1846
1847 2005-04-05 Alan Modra <amodra@bigpond.net.au>
1848
1849 * elf64-ppc.c (dec_dynrel_count): New function split out from
1850 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1851 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1852 (ppc64_elf_tls_optimize): Likewise.
1853
1854 2005-04-05 Mark Kettenis <kettenis@gnu.org>
1855
1856 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1857 CORE_WCOOKIE_OFFSET.
1858 (SPARC64_WCOOKIE_OFFSET): New.
1859 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1860
1861 2005-04-05 Nick Clifton <nickc@redhat.com>
1862
1863 * po/rw.po: New translation: Kinyarwanda
1864 * configure.in (ALL_LINGUAS): Add rw
1865 * configure: Regenerate.
1866
1867 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1868
1869 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1870 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1871 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1872 section flags.
1873 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1874 to check for SHT_MIPS_OPTIONS sections.
1875 (_bfd_mips_elf_set_section_contents): Likewise.
1876
1877 2005-04-04 Eric Christopher <echristo@redhat.com>
1878
1879 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1880 Clean up gp handling code.
1881
1882 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1883
1884 * elf.c (bfd_elf_set_group_contents): Ignore linker created
1885 group section.
1886 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1887 sections for relocatable files only. Remove the linker created
1888 group sections.
1889 (_bfd_elf_compute_section_file_positions): Pass link_info to
1890 assign_section_numbers.
1891
1892 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1893 (elf_backend_object_p): Defined.
1894
1895 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1896
1897 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1898
1899 2005-04-03 Fred Fish <fnf@specifixinc.com>
1900
1901 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1902 dwarf_ranges_size members.
1903 (struct comp_unit): Add base_address member.
1904 (struct funcinfo): Replace low/high members with an arange.
1905 (arange_add): Replace incoming "unit" parameter with "abfd" and
1906 "first_arange" pointers. Reorganize/rewrite function body.
1907 (decode_line_info): Change arange_add call to pass bfd and arange
1908 pointers.
1909 (lookup_address_in_line_info_table): Use arange list instead of
1910 individual low/high members. Walk function's arange list to find
1911 lowest PC in list, to test for overlapping functions.
1912 (read_debug_ranges): New function, reads the debug_ranges section.
1913 (lookup_address_in_function_table): Use arange list instead of
1914 individual low/high members. Rewrite to find smallest range that
1915 matches.
1916 (read_rangelist): Read a given rangelist from debug_ranges.
1917 (scan_unit_for_functions): Use arange list instead of individual
1918 low/high members. Handle a DW_AT_ranges attribute.
1919 (parse_comp_unit): Use arange list instead of individual low/high
1920 members. Save comp unit base address. Handle a DW_AT_ranges
1921 attribute.
1922
1923 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1924
1925 * elf.c (assign_section_numbers): Really use the kept section.
1926
1927 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1928
1929 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1930
1931 * elf.c (assign_section_numbers): When sh_link points to a
1932 discarded section, call _bfd_elf_check_kept_section to see if
1933 the kept section can be used. Otherwise reject sh_link
1934 pointing to discarded section.
1935
1936 * elflink.c (_bfd_elf_check_kept_section): New.
1937 (elf_link_input_bfd): Use it.
1938
1939 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1940
1941 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1942 that we no longer need.
1943
1944 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1945
1946 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1947 rather than 0.
1948 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
1949
1950 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1951
1952 * elf.c (assign_section_numbers): Fix a typo.
1953
1954 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1955
1956 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1957 error message.
1958 (_bfd_elf_section_already_linked): Likewise.
1959
1960 2005-03-31 Jerome Guitton <guitton@gnat.com>
1961
1962 * config.in: Regenerate.
1963
1964 2005-03-31 Jerome Guitton <guitton@gnat.com>
1965
1966 * config.in (HAVE_DECL_BASENAME): New configure macro.
1967 * configure.in: Check for basename.
1968 * configure: Regenerate.
1969
1970 2005-03-30 Julian Brown <julian@codesourcery.com>
1971
1972 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1973 bfd_elf32_is_arm_mapping_symbol_name.
1974 * bfd-in2.h: Regenerate.
1975 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1976 bfd_elf32_is_arm_mapping_symbol_name.
1977 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1978 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1979 (arm_elf_find_function): Likewise.
1980 (elf32_arm_output_symbol_hook): Likewise.
1981
1982 2005-03-30 Julian Brown <julian@codesourcery.com>
1983
1984 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1985 * bfd-in2.h: Regenerate.
1986 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1987 bfd_elf32_is_arm_mapping_symbol_name.
1988 (elf32_arm_output_symbol_hook): Likewise.
1989 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1990 mapping symbols.
1991 (is_arm_mapping_symbol_name): Function moved from here...
1992 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1993 and made global.
1994
1995 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1996
1997 * configure.in: Check for ffs decl and alphabetize.
1998 * config.in: Regenerate.
1999 * configure: Regenerate.
2000 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2001
2002 2005-03-29 Fred Fish <fnf@specifixinc.com>
2003
2004 * dwarf2.c (struct comp_unit): Fix typo.
2005 (scan_unit_for_functions): Remove unused local variable "name"
2006 and dead code that set it.
2007
2008 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2009 Phil Blundell <philb@gnu.org>
2010
2011 * bfd-in2.h, libbfd.h: Regenerated.
2012 * reloc.c: Add ARM TLS relocations.
2013 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2014 relocations.
2015 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2016 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2017 (elf32_arm_tls_ie32_howto): New.
2018 (elf32_arm_howto_from_type): Support TLS relocations.
2019 (elf32_arm_reloc_map): Likewise.
2020 (elf32_arm_reloc_type_lookup): Likewise.
2021 (TCB_SIZE): Define.
2022 (struct elf32_arm_obj_tdata): New.
2023 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2024 (elf32_arm_mkobject): New function.
2025 (struct elf32_arm_relocs_copied): Add pc_count.
2026 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2027 (GOT_TLS_IE): Define.
2028 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2029 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2030 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2031 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2032 (dtpoff_base, tpoff): New functions.
2033 (elf32_arm_final_link_relocate): Handle TLS relocations.
2034 (IS_ARM_TLS_RELOC): Define.
2035 (elf32_arm_relocate_section): Warn about TLS mismatches.
2036 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2037 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2038 TLS relocations and pc_count.
2039 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2040 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2041 calls.
2042 (elf32_arm_size_dynamic_sections): Handle TLS.
2043 (elf32_arm_finish_dynamic_symbol): Likewise.
2044 (bfd_elf32_mkobject): Define.
2045
2046 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2047
2048 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2049 relocation types. Don't count relocations which will use a PLT.
2050
2051 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2052
2053 * elf.c (elfcore_grok_nto_status): Print tid as long.
2054 (elfcore_grok_nto_regs): Likewise.
2055
2056 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2057
2058 * irix-core.c: Remove some unnecessary prototypes.
2059
2060 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2061
2062 * irix-core.c: Convert to ISO C.
2063
2064 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2065
2066 * irix-core.c (do_sections): Replace + by | in expression.
2067 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2068 to unused parameters to avoid a compiler warning.
2069
2070 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2071
2072 * netbsd-core.c: Convert to ISO C. Fix formatting.
2073
2074 2005-03-24 Eric Christopher <echristo@redhat.com>
2075
2076 * elfxx-mips.c: Revert previous patch.
2077
2078 2005-03-24 Nick Clifton <nickc@redhat.com>
2079
2080 * targets.c (_bfd_target_vector): Only include the
2081 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2082 all targets enabled.
2083
2084 2005-03-24 James E Wilson <wilson@specifixinc.com>
2085
2086 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2087 (BFD64_BACKENDS): Add elf32-ia64.lo.
2088 * Makefile.in: Regenerate.
2089
2090 2005-03-23 Eric Christopher <echristo@redhat.com>
2091
2092 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2093 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2094 after emitting relocation.
2095 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2096 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2097 and readonly_reloc.
2098
2099 2005-03-23 Mike Frysinger <vapier@gentoo.org>
2100 Nick Clifton <nickc@redhat.com>
2101
2102 * config.bfd: Accept any C library to accompany a GNU Linux
2103 implementation, not just the GNU C library.
2104 * configure.in: Likewise.
2105 * configure: Regenerate.
2106
2107 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2108
2109 * bfd-in.h (_bfd_elf_provide_symbol): New.
2110 * bfd-in2.h: Regenerated.
2111
2112 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2113 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2114 of set_linker_sym.
2115
2116 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2117 from elf32-ppc.c.
2118
2119 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
2120
2121 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2122
2123 2005-03-22 Bob Wilson <bob.wilson@acm.org>
2124
2125 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2126 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2127 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2128 (xtensa_opcode_decode): Rearrange code.
2129
2130 2005-03-22 Nick Clifton <nickc@redhat.com>
2131
2132 * binary.c: Convert to ISO C90 formatting.
2133 * coff-arm.c: Convert to ISO C90 formatting.
2134 * coffgen.c: Convert to ISO C90 formatting.
2135 * elf32-gen.c: Convert to ISO C90 formatting.
2136 * elf64-gen.c: Convert to ISO C90 formatting.
2137 * hash.c: Convert to ISO C90 formatting.
2138 * ieee.c: Convert to ISO C90 formatting.
2139
2140 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2141
2142 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2143 unresolved symbols in R_ARM_NONE relocations.
2144
2145 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2146
2147 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2148 UNRESOLVED_RELOC_P argument. Set it appropriately.
2149 (elf32_arm_relocate_section): Update call to
2150 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2151 unresolved_reloc instead.
2152
2153 2005-03-23 Alan Modra <amodra@bigpond.net.au>
2154
2155 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2156 .gnu.warning.* sections.
2157
2158 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2159
2160 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2161 written_address_p.
2162 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2163 (elf_create_pointer_linker_section): Delete info parm. Don't make
2164 h dynamic. Don't set written_address_p.
2165 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2166 (bfd_put_ptr): Delete.
2167 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2168 Always write section contents. Assert global sym is def_regular.
2169 Use offset bottom bit as a written flag.
2170 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2171 calls.
2172
2173 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2174
2175 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2176 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2177 and end syms.
2178
2179 2005-03-21 Nick Clifton <nickc@redhat.com>
2180
2181 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2182 targets.
2183 (t2a1_bx_pc_insn): Likewise.
2184 (t2a2_noop_insn): Likewise.
2185 (t2a3_b_insn): Likewise.
2186 (t2a1_push_insn): Likewise.
2187 (t2a2_ldr_insn): Likewise.
2188 (t2a3_mov_insn): Likewise.
2189 (t2a4_bx_insn): Likewise.
2190 (t2a5_pop_insn): Likewise.
2191 (t2a6_bx_insn): Likewise.
2192 (coff_arm_relocate_section): Only declare the high_address
2193 variable for non WINCE targets.
2194
2195 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2196
2197 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2198 SEC_LINKER_CREATED. Attach to dynobj.
2199 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2200
2201 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2202
2203 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2204 sym_offset. Add name, bss_name, sym_name, sym_val.
2205 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2206 Add sdata array of elf_linker_section_t.
2207 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2208 (enum elf_linker_section_enum): Delete.
2209 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2210 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2211 the special sections are needed. Adjust htab->sdata refs.
2212 Ensure dynobj is set in sreloc code.
2213 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2214 (ppc_elf_set_sdata_syms): New function.
2215 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2216 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2217 sym_val instead of sym_hash.
2218 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2219
2220 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2221
2222 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2223 (ppc_elf_merge_private_bfd_data): Likewise.
2224
2225 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2226
2227 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2228 (ppc_elf_create_linker_section): Don't create rel_section.
2229 (elf_create_pointer_linker_section): Don't size relocs.
2230 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2231 Don't generate relocs.
2232 (ppc_elf_relocate_section): Adjust calls to
2233 elf_finish_pointer_linker_section.
2234
2235 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2236
2237 * elf32-ppc.c (is_ppc_elf_target): New function.
2238 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2239 for bfd_target_elf_flavour. Do this test before endian check.
2240 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2241 (ppc_elf_size_dynamic_sections): Likewise.
2242
2243 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2244
2245 * elf-bfd.h (elf_backend_data): Add int to
2246 elf_backend_section_from_shdr.
2247 (bfd_elf_section_data): Update comment for this_idx.
2248 (_bfd_elf_make_section_from_shdr): Add int.
2249 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2250
2251 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2252 and use it to set this_idx in bfd_elf_section_data.
2253 (bfd_section_from_shdr): Pass shindex to
2254 _bfd_elf_make_section_from_shdr.
2255 (_bfd_elf_section_from_bfd_section): Use this_idx in
2256 bfd_elf_section_data to find section index.
2257
2258 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2259 index and pass it to _bfd_elf_make_section_from_shdr.
2260 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2261 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2262 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2263 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2264 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2265 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2266 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2267 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2268 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2269
2270 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2271 Ross Ridge <rridge@csclub.uwaterloo.ca>
2272
2273 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2274 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2275 cases. Add comment.
2276
2277 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2278
2279 * elflink.c (elf_mark_used_section): Remove check for special
2280 sections.
2281
2282 2005-03-18 Andreas Schwab <schwab@suse.de>
2283
2284 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2285 from bfd_vma to ia64_insn, remove broken cast.
2286
2287 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2288
2289 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2290 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2291 elf_m68k_finish_dynamic_sections): Use it.
2292
2293 2005-03-17 Paul Brook <paul@codesourcery.com>
2294 Dan Jacobowitz <dan@codesourcery.com>
2295 Mark Mitchell <mark@codesourcery.com>
2296
2297 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2298 (elf32_arm_additional_program_headers): Likewise.
2299 (elf_backend_modify_segment_map): Define.
2300 (elf_backend_additional_program_headers): Likewise.
2301 (elf32_arm_symbian_modify_segment_map): Use
2302 elf32_arm_modify_segment_map.
2303
2304 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2305
2306 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2307 for special sections.
2308
2309 2005-03-18 Alan Modra <amodra@bigpond.net.au>
2310
2311 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2312 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2313 section_sym_count param, and return number of section symbols.
2314 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2315 .dynsym contents. Don't bother calling swap_symbol_out on the
2316 first all-zero dynsym.
2317 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2318 special sections like bfd_abs_section.
2319 (bfd_elf_gc_sections): Spelling fix.
2320
2321 2005-03-16 Fred Fish <fnf@specifixinc.com>
2322
2323 PR binutils/790
2324 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2325 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2326
2327 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2328
2329 * elflink.c (elf_mark_used_section): New.
2330 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2331 non-relocatable link if we don't do GC.
2332
2333 2005-03-16 Nick Clifton <nickc@redhat.com>
2334 Ben Elliston <bje@au.ibm.com>
2335
2336 * configure.in (werror): New switch: Add -Werror to the
2337 compiler command line. Enabled by default. Disable via
2338 --disable-werror.
2339 * configure: Regenerate.
2340
2341 2005-03-16 Nick Clifton <nickc@redhat.com>
2342
2343 * ecoff.c: Convert to ISO C90 formatting.
2344
2345 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2346
2347 * elf32-ppc.c: Divide file into general and linker specific
2348 functions. Sort linker functions into roughly the order in which
2349 they are called by the ELF linker code.
2350
2351 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2352
2353 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2354 on section. Correct comment, and add FIXME.
2355 (ppc_elf_additional_program_headers): Don't bump header count for
2356 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2357 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2358 do allocate memory if they need it.
2359
2360 2005-03-15 Mikkel Krautz <krautz@gmail.com>
2361
2362 * config.bfd (x86_64-elf): Add target.
2363
2364 2005-03-15 Alan Modra <amodra@bigpond.net.au>
2365
2366 * po/es.po: Commit new Spanish translation.
2367
2368 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2369
2370 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2371 for global symbol when reporting overflow.
2372
2373 2005-03-11 Jakub Jelinek <jakub@redhat.com>
2374
2375 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2376 * libbfd.h: Rebuilt.
2377 * archive.c (_bfd_ar_spacepad): New function.
2378 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2379 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2380 coff_write_armap): Use it.
2381 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2382 uid/gid support.
2383 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2384
2385 2005-03-10 Mark Kettenis <kettenis@gnu.org>
2386
2387 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2388 has_table to the start of the function.
2389
2390 2005-03-10 Ben Elliston <bje@au.ibm.com>
2391
2392 * archive.c: Include hashtab.h.
2393 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2394 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2395 (hash_file_ptr): New function.
2396 (eq_file_ptr): Likewise.
2397 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2398 * libbfd-in.h: Include hashtab.h.
2399 (struct artdata): Change `cache' member type to htab_t.
2400 * libbfd.h: Rebuild.
2401
2402 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2403
2404 * configure.in: Bump version to 2.16.90.
2405 * configure: Regenerated.
2406
2407 2005-03-07 Jakub Jelinek <jakub@redhat.com>
2408
2409 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2410 close is a function like macro in system headers.
2411
2412 2005-03-07 Alan Modra <amodra@bigpond.net.au>
2413
2414 PR ld/778
2415 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2416 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2417
2418 2005-03-06 Alan Modra <amodra@bigpond.net.au>
2419
2420 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2421
2422 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2423
2424 * po/bfd.pot: Regenerate.
2425
2426 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2427
2428 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2429 with is_func.
2430 (func_desc_adjust): Force dot-syms local in executables as well
2431 as shared libs.
2432
2433 2005-03-04 David Daney <ddaney@avtrex.com>
2434
2435 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2436 '__gnu_local_gp' symbol used by gas -mno-shared.
2437
2438 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2439
2440 * elf-bfd.h (elf_backend_data): Add "const char *" to
2441 elf_backend_section_from_phdr.
2442
2443 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2444 elf_backend_section_from_phdr hook.
2445
2446 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2447 Joseph Myers <joseph@codesourcery.com>
2448
2449 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2450 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2451 and tls_ldm_offset.
2452 (struct mips_elf_got_per_bfd_arg): Add global_count.
2453 (struct mips_elf_count_tls_arg): New.
2454 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2455 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2456 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2457 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2458 (TLS_RELOC_P): Define.
2459 (TP_OFFSET, DTP_OFFSET): Define.
2460 (dtprel_base, tprel_base): New functions.
2461 (mips_elf_link_hash_newfunc): Initialize tls_type.
2462 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2463 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2464 TLS entries.
2465 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2466 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2467 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2468 (mips_tls_got_index): New functions.
2469 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2470 arguments. Pass them to mips_elf_create_local_got_entry. Use
2471 mips_tls_got_index.
2472 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2473 Handle TLS entries.
2474 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2475 mips_elf_create_local_got_entry.
2476 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2477 arguments. Handle TLS entries.
2478 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2479 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2480 TLS entries.
2481 (mips_elf_record_global_got_symbol): Likewise.
2482 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2483 Count TLS entries.
2484 (mips_elf_merge_gots): Handle TLS entries when merging.
2485 (mips_elf_initialize_tls_index): New function.
2486 (mips_elf_set_global_got_offset): Handle TLS entries.
2487 (mips_elf_adjust_gp): Handle TLS.
2488 (mips_elf_multi_got): Remove redundant call to
2489 mips_elf_resolve_final_got_entries. Initialize global_count.
2490 Correct a comment. Initialize new TLS members of mips_got_info.
2491 Assign TLS GOT indexes for new GOTs.
2492 (mips_elf_create_got_section): Initialize new TLS members of
2493 mips_got_info.
2494 (mips_elf_calculate_relocation): Handle TLS relocs.
2495 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2496 functions.
2497 (_bfd_mips_elf_always_size_sections): Handle TLS.
2498 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2499 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2500 changed functions.
2501 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2502 (_bfd_mips_elf_hide_symbol): Handle TLS.
2503 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2504 (mips_reloc_map): Add TLS relocs.
2505 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2506 * elf64-mips.c (mips_elf64_howto_table_rel)
2507 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2508 * reloc.c: Define new MIPS TLS relocations.
2509 * libbfd.h, bfd-in2.h: Regenerated.
2510
2511 2005-03-02 Jan Beulich <jbeulich@novell.com>
2512
2513 * Makefile.am: Add dependency of cache.o on libiberty.h.
2514 * cache.c: Include libiberty.h.
2515 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2516
2517 2005-03-01 Zack Weinberg <zack@codesourcery.com>
2518
2519 * elf.c (bfd_section_from_shdr <default case>): Call
2520 elf_backend_section_from_shdr hook unconditionally, and return
2521 what it returns.
2522 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2523 * elfxx-target.h (elf_backend_section_from_shdr)
2524 (elf_backend_section_from_phdr): Default to
2525 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2526 respectively.
2527
2528 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2529
2530 * targets.h: Typo fix.
2531 * bfd-in2.h: Regenerate.
2532
2533 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2534 structs to size on-disk structures.
2535 (b_out_set_section_contents): Size the external struct, not the
2536 internal one for on-disk size.
2537 (b_out_sizeof_headers): Likewise.
2538
2539 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2540
2541 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2542 entry points with the func descriptor as well as undefweak.
2543
2544 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2545
2546 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2547 present when IMPORT_NAME_UNDOECRATE is used.
2548
2549 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2550
2551 PR 757
2552 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2553 int.
2554
2555 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2556 to _bfd_elf_merge_symbol.
2557
2558 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2559 unsigned int to return the alignment of the old common symbol
2560 in the dynamic object.
2561 (_bfd_elf_add_default_symbol): Pass NULL to
2562 _bfd_elf_merge_symbol.
2563 (elf_link_add_object_symbols): Pass &old_alignment to
2564 _bfd_elf_merge_symbol. Get the alignment of the new common
2565 symbol in the dynamic object.
2566
2567 2005-02-24 Ben Elliston <bje@au.ibm.com>
2568
2569 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2570 * format.c (bfd_check_format_matches): Likewise.
2571 * archive.c (BFD_GNU960_ARMAG): Likewise.
2572 (bfd_generic_archive_p): Likewise.
2573 (_bfd_write_archive_contents): Likewise.
2574
2575 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2576
2577 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2578 * configure: Regenerate.
2579
2580 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2581
2582 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2583 COMDAT group sections to have default visibility.
2584
2585 2005-02-24 Alan Modra <amodra@bigpond.net.au>
2586
2587 * coffcode.h (coff_print_aux): Warning fix.
2588 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2589 instead of section pointer to identify.
2590 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2591 the correct size buffer for local sym mangling too.
2592 (h8300_bfd_link_add_symbols): Likewise.
2593 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2594 warning.
2595 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2596 * elf32-xtensa.c (literal_value_hash): Warning fix.
2597 * versados.c (process_otr): Warning fix.
2598 (versados_canonicalize_reloc): Likewise.
2599 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2600 * vms.c (fill_section_ptr): Warning fix.
2601
2602 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2603
2604 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2605 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2606
2607 2005-02-23 Nick Clifton <nickc@redhat.com>
2608
2609 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2610 the relvaddr field of the Elf32_crinfo structure.
2611
2612 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2613 variables that are passed by reference to
2614 m68hc11_get_relocation_value in case that function does not
2615 initialise them.
2616
2617 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2618 return statements and replace with a single return at the end of
2619 the function. This helps pacify the flow analysis code in gcc 4.0.
2620
2621 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2622 strtab to avoid compile time warning.
2623
2624 2005-02-23 Ben Elliston <bje@au.ibm.com>
2625
2626 * opncls.c (bfd_zalloc): Document this function.
2627
2628 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2629
2630 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2631 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2632 Replace SEC_SHARED with SEC_COFF_SHARED.
2633 (styp_to_sec_flags): Likewise.
2634
2635 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2636 (TARGET_LITTLE_SYM): Likewise.
2637
2638 * section.c (SEC_ARCH_BIT_0): Removed.
2639 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2640 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2641 (SEC_SHARED): Renamed to ...
2642 (SEC_COFF_SHARED): This.
2643 (SEC_BLOCK): Renamed to ...
2644 (SEC_TIC54X_BLOCK): This.
2645 (SEC_CLINK): Renamed to ...
2646 (SEC_TIC54X_CLINK): This.
2647 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2648 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2649 end.
2650 * bfd-in2.h: Regenerated.
2651
2652 2005-02-21 Fred Fish <fnf@specifixinc.com>
2653
2654 * dwarf2.c (find_abstract_instance_name): Call recursively
2655 to handle a DW_AT_specification.
2656
2657 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2658
2659 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2660 mips_elf_create_dynamic_relocation,
2661 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2662 Remove #if 0'd code.
2663
2664 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2665
2666 * Makefile.am: Run "make dep-am"
2667 * Makefile.in: Regenerate.
2668
2669 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2670
2671 * coffgen.c (bfd_coff_get_comdat_section): Check that
2672 coff_section_data isn't NULL.
2673
2674 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2675
2676 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2677 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2678 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2679 useless assignments.
2680 (xcoff_write_archive_contents_big): Likewise.
2681 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2682 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2683 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2684 * cofflink.c (process_embedded_commands): Warning fixes.
2685 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2686 Warning fixes.
2687 * dwarf2.c: Warning fixes.
2688 * elf-bfd.h: Likewise.
2689 * elf-eh-frame.c: Likewise.
2690 * elf-strtab.c: Likewise.
2691 * elf.c: Likewise.
2692 * elf32-m68k.c: Likewise.
2693 * elf32-ppc.c: Likewise.
2694 * elf32-sh-symbian.c: Likewise.
2695 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2696 * elf64-sh64.c: Likewise.
2697 * peicode.h: Likewise.
2698 * elf64-mmix.c: Warning fixes.
2699 * elfcode.h: Likewise.
2700 * elfxx-mips.c: Likewise.
2701 * libbfd-in.h: Likewise.
2702 * libbfd.c: Likewise.
2703 * mach-o.c: Likewise.
2704 * merge.c: Likewise.
2705 * mmo.c: Likewise.
2706 * opncls.c: Likewise.
2707 * pef.c: Likewise.
2708 * srec.c: Likewise.
2709 * vms-hdr.c: Likewise.
2710 * vms-tir.c: Likewise.
2711 * xtensa-isa.c: Likewise.
2712 * xtensa-modules.c: Likewise.
2713 * xsym.c: Likewise.
2714 (pstrcmp): Use correct choice of string lengths. Fix return value.
2715 (bfd_sym_module_name): Correct string length.
2716 * bfd-in2.h: Regenerate.
2717 * libbfd.h: Regenerate.
2718
2719 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
2720
2721 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
2722 uninitialized check_segment[1] in TLSMOFF case.
2723 Reported by Alan Modra.
2724 (elf32_frv_relocate_section): Improve errors and warnings.
2725
2726 2005-02-17 Alan Modra <amodra@bigpond.net.au>
2727
2728 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2729
2730 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2731
2732 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2733 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2734 * pef.c (bfd_pef_scan): Don't ignore return value of
2735 bfd_pef_scan_start_address.
2736 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2737 bfd_mach_o_scan_start_address.
2738 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2739 * elfxx-mips.c: Remove unnecessary prototypes.
2740 (sort_dynamic_relocs_64): Abort if not BFD64.
2741
2742 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2743
2744 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2745 Skip toc reloc adjust if reloc_count is zero.
2746
2747 2005-02-15 Nigel Stephens <nigel@mips.com>
2748 Maciej W. Rozycki <macro@mips.com>
2749
2750 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2751 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2752 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2753 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2754 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2755 dst_mask.
2756 (mips16_gprel_reloc): Remove bit shuffling; call
2757 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2758 and _bfd_mips16_elf_reloc_shuffle() instead.
2759 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2760 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2761 relocs.
2762 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2763 elf_mips16_howto_table_rel.
2764 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2765 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2766 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2767 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2768 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2769 dst_mask.
2770 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2771 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2772 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2773 placeholders.
2774 (mips16_gprel_reloc): Remove bit shuffling; call
2775 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2776 and _bfd_mips16_elf_reloc_shuffle() instead.
2777 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2778 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2779 relocs.
2780 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2781 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2782 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2783 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2784 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2785 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2786 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2787 dst_mask.
2788 (mips16_gprel_reloc): Remove bit shuffling; call
2789 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2790 and _bfd_mips16_elf_reloc_shuffle() instead.
2791 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2792 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2793 relocs.
2794 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2795 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2796 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2797 handle bit shuffling for MIPS16 relocs.
2798 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2799 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2800 and _bfd_mips16_elf_reloc_shuffle().
2801 (_bfd_mips_elf_generic_reloc): Likewise.
2802 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2803 and R_MIPS16_LO16.
2804 (mips_elf_obtain_contents): Remove bit shuffling.
2805 (mips_elf_perform_relocation): Likewise; call
2806 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2807 instead.
2808 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2809 and R_MIPS16_LO16.
2810 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2811 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2812 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2813 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2814 (BFD_RELOC_MIPS16_LO16): Likewise.
2815 * bfd-in2.h: Regenerate.
2816 * libbfd.h: Regenerate.
2817
2818 2005-02-15 Jan Beulich <jbeulich@novell.com>
2819
2820 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2821 R_IA64_DTPMOD64[LM]SB.
2822
2823 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2824
2825 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2826 backward branch in the same section.
2827 (elfNN_ia64_relocate_section): Inform users that the input
2828 section is too big to relax br instruction when overflow
2829 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2830 and R_IA64_PCREL21F.
2831
2832 2005-02-14 Orjan Friberg <orjanf@axis.com>
2833
2834 * elfcore.h (elf_core_file_p): Move the call to
2835 elf_backend_object_p to allow the correct machine to be set before
2836 processing the program headers.
2837
2838 2005-02-14 Nick Clifton <nickc@redhat.com>
2839
2840 PR binutils/716
2841 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2842 aware flag from the input bfd to the output bfd.
2843
2844 2005-02-11 Maciej W. Rozycki <macro@mips.com>
2845
2846 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2847 R_MIPS_LITERAL relocations for external symbols.
2848 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2849 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2850
2851 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2852
2853 * bfd-in2.h: Rebuilt.
2854
2855 2005-02-11 Paul Brook <paul@codesourcery.com>
2856
2857 * elf-bfd.h (struct elf_link_hash_table): Add
2858 is_relocatable_executable.
2859 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2860 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2861 symbols in relocatable executables.
2862 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2863 relocatable executables.
2864 (_bfd_elf_link_renumber_dynsyms): Ditto.
2865 (bfd_elf_final_link): Ditto.
2866 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2867 relocations into relocatable executables.
2868 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2869 executables. Also copy absolute relocations.
2870 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2871 in relocatable executables.
2872 (allocate_dynrelocs): Copy relocations for relocatable executables.
2873 Output dynamic symbols for symbols defined in linker scripts.
2874
2875 2005-02-11 Nick Clifton <nickc@redhat.com>
2876
2877 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2878 to avoid a compile time warning.
2879
2880 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2881 BFD_ASSERT.
2882
2883 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2884 inclusion of coffcode.h so that it is actually picked up.
2885
2886 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2887 case it is not used.
2888
2889 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2890 structure and macro.
2891
2892 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2893 array.
2894
2895 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2896 to protect the declaration of this array.
2897
2898 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2899 Avoid call to memcpy with a size of 0.
2900
2901 2005-02-12 Alan Modra <amodra@bigpond.net.au>
2902
2903 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2904 old-style branches to undefined dot-symbols which will be
2905 satisfied by a plt call.
2906
2907 2005-02-11 Alan Modra <amodra@bigpond.net.au>
2908
2909 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2910 (ppc64_elf_copy_indirect_symbol): ..here.
2911 (func_desc_adjust): Use move_plt_plist.
2912
2913 2005-02-10 Paul Brook <paul@codesourcery.com>
2914
2915 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2916
2917 2005-02-10 Paul Brook <paul@codesourcery.com>
2918
2919 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2920 symbols local.
2921 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2922 (elf_link_renumber_local_hash_table_dynsyms): New function.
2923 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2924
2925 2005-02-10 Jakub Jelinek <jakub@redhat.com>
2926
2927 * bfd-in.h (BFD_LINKER_CREATED): Define.
2928 * bfd-in2.h: Rebuilt.
2929 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2930 BFD_LINKER_CREATED bfds when determining input bfds without
2931 .note.GNU-stack section.
2932
2933 2005-02-10 Maciej W. Rozycki <macro@mips.com>
2934
2935 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2936 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2937 relocations against external symbols unchanged.
2938
2939 2005-02-08 Paul Brook <paul@codesourcery.com>
2940
2941 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2942 sections.
2943
2944 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
2945
2946 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2947 prefix here.
2948
2949 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2950
2951 * elf64-mips.c: Fix formatting throughout.
2952
2953 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2954
2955 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2956
2957 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
2958
2959 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2960 *ABS*/*UND* sections.
2961 (elf32_frv_relocate_section): Move zero-addend-required error...
2962 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2963 missing needed TLS section.
2964
2965 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
2966
2967 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2968 being the last symbol.
2969 (aout_link_add_symbols): Just return TRUE if a warning
2970 symbol was last.
2971
2972 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2973
2974 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2975 R_MIPS_GPREL32 relocations against external symbols.
2976 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2977 comment.
2978
2979 2005-02-07 Alan Modra <amodra@bigpond.net.au>
2980
2981 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2982 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2983 elf_string_from_elf_strtab.
2984 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2985 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2986 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2987 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2988 looking at cached symtab info first, before iterating over headers.
2989 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2990 * elfcode.h (elf_object_p): Don't load section header stringtab
2991 specially.
2992
2993 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2994
2995 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2996 against protected function when building shared library.
2997
2998 PR 584
2999 * elf64-x86-64.c (is_32bit_relative_branch): New.
3000 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3001 protected function symbol when building shared library for
3002 32bit relative branch instruction.
3003
3004 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3005
3006 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3007 syms when doing a relocatable link.
3008 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3009 at u.def.section.
3010 (ppc64_elf_tls_setup): Likewise.
3011 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3012
3013 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3014
3015 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3016 (link_hash_newfunc): Clear all locals using memset.
3017 (make_fdh): Remove flags param. Always create fake func desc
3018 weak. Link the descriptor with the code entry sym.
3019 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3020 (add_symbol_adjust): Adjust make_fdh call.
3021 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3022 descriptor to strong undefined if code entry is strong.
3023
3024 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3025
3026 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3027 lookup here. Set to new before calling bfd_link_repair_undef_list.
3028 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3029
3030 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3031
3032 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3033
3034 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3035
3036 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3037 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3038 before the as-needed lib was loaded. Abort on unexpected refs.
3039
3040 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3041
3042 * elflink.c (elf_smash_syms): Expand comments.
3043 (elf_link_add_object_symbols): Only call elf_smash_syms for
3044 as-needed dynamic objects.
3045
3046 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3047 everything, just the field specific to ia64.
3048 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3049
3050 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3051
3052 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3053 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3054 undefined syms.
3055 (struct add_symbol_adjust_data): New.
3056 (add_symbol_adjust): Make an undefweak func desc for old ABI
3057 objects to link with --as-needed shared libs. Return fail status.
3058 Don't adjust old ABI func entry sym to weak if func desc syms
3059 isn't defined.
3060 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3061 and return status.
3062
3063 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3064
3065 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3066 for clarity.
3067
3068 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3069
3070 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3071 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3072 remove anything but new and undefweak.
3073 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3074 existing _DYNAMIC.
3075 (_bfd_elf_create_dynamic_sections): Formatting.
3076 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3077 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3078 (struct elf_smash_data): New.
3079 (elf_smash_syms): New function.
3080 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3081 unneeded dynamic objects to loaded list.
3082 (elf_link_output_extsym): Don't handle as-needed here. Strip
3083 bfd_link_hash_new symbols.
3084 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3085 delref when dynindx is already -1.
3086 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3087 symbols.
3088 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3089
3090 2005-02-01 Ben Elliston <bje@au.ibm.com>
3091
3092 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3093
3094 2005-02-01 Ben Elliston <bje@au.ibm.com>
3095
3096 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3097 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3098 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3099 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3100 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3101 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3102 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3103 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3104 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3105 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3106 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3107 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3108 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3109 throughout. Similarly, collapse #if 1'd code.
3110
3111 2005-02-01 Ben Elliston <bje@au.ibm.com>
3112
3113 * elf-bfd.h (bfd_elf_discard_group): Remove.
3114 * elf.c (bfd_elf_discard_group): Likewise.
3115 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3116
3117 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
3118
3119 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3120 (_bfd_elf_eh_frame_address_size): Declare.
3121 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3122 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3123 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3124 (elf_backend_eh_frame_address_size): Define.
3125 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3126 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3127 size from the new backend hook.
3128 (_bfd_elf_write_section_eh_frame): Likewise.
3129 (_bfd_elf_eh_frame_address_size): New function.
3130
3131 2005-01-31 Andrew Cagney <cagney@gnu.org>
3132
3133 * configure: Regenerate to track ../gettext.m4.
3134
3135 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3136
3137 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3138 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3139
3140 2005-01-31 Nick Clifton <nickc@redhat.com>
3141
3142 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3143 sparc-lynxos, vax-vms) be obsolete.
3144
3145 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3146
3147 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3148 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3149 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3150 * elfcode.h (elf_object_p): Use minpagesize instead of
3151 maxpagesize.
3152 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3153 (elfNN_bed): Include ELF_MINPAGESIZE.
3154
3155 2005-01-28 Julian Brown <julian@codesourcery.com>
3156
3157 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3158 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3159 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3160 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3161 passing flag value from ld. Set flag value in global hash table entry.
3162 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3163 relocation.
3164
3165 2005-01-27 Andrew Cagney <cagney@gnu.org>
3166
3167 * configure: Regenerate to track ../gettext.m4 change.
3168
3169 2005-01-25 Mark Mitchell <mark@codesourcery.com>
3170
3171 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3172 SymbianOS.
3173
3174 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
3175
3176 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3177 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3178 for TLSMOFF.
3179 * reloc.c: Add R_FRV_TLSMOFF.
3180 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3181 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3182 (elf32_frv_relocate_section): Handle it.
3183 (elf32_frv_check_relocs): Likewise.
3184 * libbfd.h, bfd-in2.h: Rebuilt.
3185 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3186 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3187 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3188 such that they return the constant in gr9.
3189 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3190 symbols.
3191 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3192 too, such that they shrink on relaxation.
3193 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3194 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3195 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3196 if we can guarantee the use of 16-bit constants.
3197 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3198 Introduce TLS support for FR-V FDPIC.
3199 * reloc.c: Add TLS relocations.
3200 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3201 (elf32_frv_rel_tlsdesc_value_howto): New.
3202 (elf32_frv_rel_tlsoff_howto): New.
3203 (frv_reloc_map): Add new mappings.
3204 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3205 reloc information.
3206 (frvfdpic_dynamic_got_plt_info): New.
3207 (frvfdpic_plt_tls_ret_offset): New.
3208 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3209 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3210 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3211 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3212 section as local.
3213 (struct frvfdpic_relocs_info): Add TLS fields.
3214 (frvfdpic_relocs_info_hash): Warning clean up.
3215 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3216 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3217 (FRVFDPIC_TLS_BIAS): Define.
3218 (tls_biased_base): New.
3219 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3220 relocations.
3221 (frv_reloc_type_lookup): Likewise.
3222 (frvfdpic_info_to_howto_rel): Likewise.
3223 (elf32_frv_relocate_section): Likewise.
3224 (_frv_create_got_section): Create the PLT section here.
3225 (elf32_frvfdpic_create_dynamic_sections): Not here.
3226 (_frvfdpic_count_nontls_entries): Move out of...
3227 (_frvfdpic_count_got_plt_entries): ... here.
3228 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3229 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3230 support.
3231 (_frvfdpic_relax_tls_entries): New.
3232 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3233 (_frvfdpic_get_tlsdesc_entry): New.
3234 (_frvfdpic_assign_got_entries): Add TLS support.
3235 (_frvfdpic_assign_plt_entries): Likewise.
3236 (_frvfdpic_reset_got_plt_entries): New.
3237 (_frvfdpic_size_got_plt): Move out of...
3238 (elf32_frvfdpic_size_dynamic_sections): ... here.
3239 (_frvfdpic_relax_got_plt_entries): New.
3240 (elf32_frvfdpic_relax_section): New.
3241 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3242 (elf32_frv_check_relocs): Add TLS support.
3243 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3244 * libbfd.h, bfd-in2.h: Rebuilt.
3245
3246 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3247
3248 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3249 loadable reloc sections.
3250 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3251 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3252
3253 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3254
3255 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3256 sections immediately when linking shared libs. Instead, wait until
3257 we know a lib is needed.
3258 (_bfd_elf_link_create_dynstrtab): Extract from..
3259 (_bfd_elf_link_create_dynamic_sections_): ..here.
3260 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3261 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3262 for non-existent .dynamic.
3263 (elf_link_output_extsym): Don't complain about undefined symbols
3264 in as-needed dynamic libs that aren't actually linked.
3265
3266 2005-01-24 Andrew Cagney <cagney@gnu.org>
3267
3268 * configure: Regenerate, ../gettext.m4 was updated.
3269
3270 2005-01-21 Ben Elliston <bje@au.ibm.com>
3271
3272 * aout-encap.c: Remove unused file.
3273
3274 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3275
3276 PR 679
3277 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3278 non-function symbols are local.
3279 (_bfd_elf_symbol_refs_local_p): Likewise.
3280
3281 2005-01-18 Alan Modra <amodra@bigpond.net.au>
3282
3283 * bfd.c (bfd_link_just_syms): Add abfd param.
3284 * bfd-in2.h: Regenerate.
3285
3286 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3287
3288 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3289 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3290 instructions. If the amount of padding is known, reduce the size
3291 of the CIE or FDE by that amount.
3292
3293 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3294
3295 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3296 augmentation_size. Use bfd_signed_vmas for data_align.
3297 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3298 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3299 functions. Don't read past the end of the enclosing CIE or FDE.
3300 (skip_bytes): New utility function.
3301 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3302 sanity checking.
3303 (_bfd_elf_write_section_eh_frame): Use new functions.
3304
3305 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3306
3307 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3308 assert-style REQUIRE() macro to handle sanity checks.
3309
3310 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3311
3312 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3313 (comp_unit): Here.
3314 (read_unsigned_leb128): Removed.
3315 (read_signed_leb128): Removed.
3316 (find_abstract_instance_name): Updated.
3317 (parse_comp_unit): Accept info_ptr_unit.
3318 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3319 comp unit and pass it to parse_comp_unit.
3320
3321 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3322 (read_signed_leb128): Moved to ...
3323 * libbfd.c: Here.
3324
3325 * libbfd-in.h (read_unsigned_leb128): New prototype.
3326 (read_signed_leb128): Likewise.
3327 * libbfd.h: Regenerated.
3328
3329 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3330 Nick Clifton <nickc@redhat.com>
3331
3332 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3333 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3334 arch_sh4a_nofpu_up in order to match the external names and make the
3335 testsuite's job easier.
3336 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3337 names.
3338 * bfd-in2.h: Regenerate.
3339
3340 2005-01-15 Andrew Cagney <cagney@gnu.org>
3341
3342 * bfd.m4: New file.
3343 * acinclude.m4: Move BFD_NEED_DECLARATION,
3344 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3345 the new file bfd.m4. Include ../bfd/bfd.m4.
3346 * configure: Re-generate.
3347
3348 2005-01-12 Alan Modra <amodra@bigpond.net.au>
3349
3350 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3351 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3352 reaching PLT.
3353 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3354 R_PPC_RELAX32PC_PLT.
3355
3356 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3357
3358 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3359 symbols.
3360 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3361 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3362 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3363 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3364 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3365 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3366 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3367 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3368 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3369 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3370 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3371 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3372 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3373 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3374
3375 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3376
3377 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3378 .dynsbss flags.
3379
3380 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3381
3382 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3383 * bfd-in2.h: Regenerate.
3384 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3385 to support these new machine values.
3386 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3387 the maxq10.
3388 (bfd_maxq_arch): Update values for the maxq20.
3389
3390 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3391
3392 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3393 non-shared object, do not reserve space in .plt and .rela.plt for
3394 regular symbols neither defined nor referenced in shared objects.
3395
3396 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3397
3398 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3399 to zero the structure.
3400 (create_got_section): Use BFD_ASSERT instead of abort.
3401 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3402 'srelgot' fields.
3403 (create_got_section): New function.
3404 (sparc64_elf_create_dynamic_sections): Likewise.
3405 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3406 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3407 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3408 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3409 (sparc64_elf_finish_dynamic_symbol): Likewise.
3410 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3411 (elf_backend_create_dynamic_sections): Define to
3412 sparc64_elf_create_dynamic_sections.
3413
3414 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3415
3416 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3417 (elf_backend_omit_section_dynsym): Define to it.
3418 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3419 (elf_backend_omit_section_dynsym): Define to it.
3420
3421 2005-01-07 Jakub Jelinek <jakub@redhat.com>
3422
3423 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3424 PT_DYNAMIC segment, unless .dynamic.
3425
3426 2005-01-06 Paul Brook <paul@codesourcery.com>
3427
3428 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3429 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3430 * configure: Regenerate.
3431 * elf32-arm.c: Add VxWorks target bfd.
3432 (USE_REL): Remove.
3433 (elf32_arm_link_hash_table): Add use_rel.
3434 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3435 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3436 Correct offset calculation for RELA case.
3437 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3438 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3439 (elf32_arm_vxworks_link_hash_table_create): New function.
3440 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3441 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3442 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3443
3444 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3445
3446 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3447 multi_toc_needed.
3448 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3449 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3450 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3451 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3452 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3453 (toc_adjusting_stub_needed): Rewrite.
3454 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3455 toc tests. Adjust for toc_adjusting_stub_needed changes.
3456 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3457 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3458 * section.c: Expand comment on backend bits.
3459 * bfd-in2.h: Regenerate.
3460 * libbfd.h: Regenerate.
3461
3462 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3463
3464 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3465 toc adjusting stub, do not test source section flags.
3466
3467 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3468
3469 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3470 from STABS debugging sections again.
3471
3472 2005-01-05 Fred Fish <fnf@specifixinc.com>
3473
3474 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3475 (find_abstract_instance_name): New function.
3476 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3477 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3478 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3479
3480 2004-12-31 Paul Brook <paul@copdesourcery.com>
3481
3482 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3483
3484 2004-12-31 Alan Modra <amodra@bigpond.net.au>
3485
3486 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3487 Commit missing changes from 2004-12-22.
3488 * bfd-in2.h: Regenerate.
3489
3490 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3491
3492 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3493
3494 2004-12-21 Kris Warkentin <kewarken@qnx.com>
3495
3496 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3497 Add 'base' argument for constructing register sections. Reformat.
3498 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3499 gp and fp regs. Reformat.
3500
3501 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3502
3503 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3504 * bfd-in2.h: Regenerate.
3505 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3506 (avr_reloc_map): Likewise.
3507 (avr_final_link_relocate): Likewise.
3508
3509 2004-12-22 Alan Modra <amodra@bigpond.net.au>
3510
3511 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3512 as-needed dynamic libs as undefined.
3513 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3514 libs when finding they are needed.
3515
3516 2004-12-20 Alan Modra <amodra@bigpond.net.au>
3517
3518 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3519 (opd_entry_value): Use opd_relocs if available.
3520 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3521 copy .opd relocations to opd_relocs.
3522 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3523
3524 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
3525
3526 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3527 * elf32-v850.c (v850_elf_howto_table): Add entry for
3528 R_V850_LO16_SPLIT_OFFSET.
3529 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3530 (v850_elf_perform_lo16_relocation): New function, extracted from...
3531 (v850_elf_perform_relocation): ...here. Use it to handle
3532 R_V850_LO16_SPLIT_OFFSET.
3533 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3534 R_V850_LO16_SPLIT_OFFSET.
3535 * libbfd.h, bfd-in2.h: Regenerate.
3536
3537 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3538
3539 * config.bfd: Add s390x-ibm-tpf support.
3540
3541 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3542
3543 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3544 to prototype, to make hash info available.
3545 Prevent wrapped symbols from being adjusted twice.
3546
3547 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
3548
3549 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3550 overflow for calls to undefined weak symbols.
3551
3552 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3553
3554 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3555 canonical sections syms have a name.
3556
3557 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3558
3559 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3560 have been adjusted for output.
3561 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3562
3563 2004-12-10 Alan Modra <amodra@bigpond.net.au>
3564
3565 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3566 add symtab_hdr param.
3567 (group_signature): Update calls.
3568 * elf-bfd.h (bfd_elf_sym_name): Update.
3569 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3570 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3571 (ppc64_elf_relocate_section): Update.
3572 * elflink.c (elf_link_input_bfd): Update.
3573
3574 2004-12-10 Jakub Jelinek <jakub@redhat.com>
3575
3576 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3577 st_shndx on STT_SECTION sections.
3578
3579 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3580
3581 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3582 ELF section symbols.
3583
3584 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3585
3586 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3587 return a real value, unless it is a PLT symbol.
3588 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3589 bal if possible.
3590
3591 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3592 R_MIPS_JALR entry to 0.
3593
3594 * archures.c: Define bfd_mach_mips9000.
3595 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3596 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3597 * cpu-mips.c (I_mips9000): Define.
3598 (arch_info_struct): Add case for bfd_mach_mips9000.
3599 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3600 * bfd-in2.h: Regenerate.
3601
3602 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3603
3604 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3605 overflow.
3606
3607 2004-12-07 Ben Elliston <bje@gnu.org>
3608
3609 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3610
3611 2004-12-06 Daniel Jacobowitz <dan@debian.org>
3612
3613 Suggested by Fergal Daly <fergal@esatclear.ie>:
3614 * simple.c (simple_dummy_multiple_definition): New function.
3615 (bfd_simple_get_relocated_section_contents): Use it.
3616
3617 2004-12-03 Jan Beulich <jbeulich@novell.com>
3618
3619 * elf.c (elf_find_function): Don't use the last file symbol ever,
3620 seen, but the last one seen prior to the symbol being reported.
3621 Don't report a filename at all for global symbols when that might
3622 be ambiguous/wrong.
3623
3624 2004-12-01 Paul Brook <paul@codesourcery.com>
3625
3626 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3627 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3628 version.
3629
3630 2004-12-01 Paul Brook <paul@codesourcery.com>
3631
3632 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3633 sections undefined.
3634
3635 2004-11-30 Paul Brook <paul@codesourcery.com>
3636
3637 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3638 no_pipeline_knowledge
3639 (elf32_arm_link_hash_table_create): Ditto.
3640 (bfd_elf32_arm_process_before_allocation): Ditto.
3641 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3642 handling.
3643 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3644 prototype.
3645 * bfd-in2.h: Regenerate.
3646
3647 2004-11-30 Randolph Chung <tausq@debian.org>
3648
3649 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3650 (elf32_hppa_grok_psinfo): New function.
3651 (elf_backend_grok_prstatus): Define.
3652 (elf_backend_grok_psinfo): Define.
3653
3654 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3655
3656 PR 574:
3657 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3658
3659 2004-11-24 Paul Brook <paul@codesourcery.com>
3660
3661 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3662
3663 2004-11-24 Paul Brook <paul@codesourcery.com>
3664
3665 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3666 (elf32_arm_swap_symbol_out): New function.
3667 (elf32_arm_size_info): Add.
3668 (elf_backend_size_info): Define.
3669
3670 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3671
3672 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3673 make_bfd_asection.
3674
3675 2004-11-19 Alan Modra <amodra@bigpond.net.au>
3676
3677 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3678 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3679 * nlmcode.h (nlm_write_object_contents): Warning fix.
3680
3681 2004-11-18 Bob Wilson <bob.wilson@acm.org>
3682
3683 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3684
3685 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3686
3687 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3688 (elf32_arm_plt_thumb_stub): New.
3689 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3690 and plt_got_offset.
3691 (elf32_arm_link_hash_traverse): Fix typo.
3692 (elf32_arm_link_hash_table): Add obfd.
3693 (elf32_arm_link_hash_newfunc): Initialize new fields.
3694 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3695 (elf32_arm_link_hash_table_create): Initialize obfd.
3696 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3697 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3698 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3699 interworking BFD is not dynamic.
3700 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3701 not emit glue for PLT references.
3702 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3703 emit glue for PLT references. Support the Thumb PLT prefix.
3704 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3705 plt_thumb_refcount.
3706 (elf32_arm_check_relocs): Likewise.
3707 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3708 plt_thumb_refcount.
3709 (allocate_dynrelocs): Handle Thumb PLT references.
3710 (elf32_arm_finish_dynamic_symbol): Likewise.
3711 (elf32_arm_symbol_processing): New function.
3712 (elf_backend_symbol_processing): Define.
3713
3714 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3715
3716 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3717 add_fde_encoding. Remove need_relative.
3718 * elf-eh-frame.c (extra_augmentation_string_bytes)
3719 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3720 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3721 in cases where the CIE has no existing 'R' augmentation. Use
3722 size_of_output_cie_fde when assigning offsets. Use the final offset
3723 as the new section size.
3724 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3725 Account for any extra augmentation bytes in the returned offset.
3726 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3727 moved before being modified. Pad growing entries with DW_CFA_nops.
3728 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3729 and add_fde_encoding.
3730
3731 2004-11-15 Mark Mitchell <mark@codesourcery.com>
3732
3733 * elf32-arm.c (elf32_arm_relocate_section): Use
3734 arm_real_reloc_type.
3735
3736 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3737
3738 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3739 for discard relocations; don't add an R_MIPS_NONE to the main body
3740 of .rel.dyn.
3741
3742 2004-11-04 Paul Brook <paul@codesourcery.com>
3743
3744 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3745 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3746 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3747 default version definition for unversioned symbols.
3748 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3749 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3750 _bfd_elf_slurp_version_tables. Set default version for unversioned
3751 imported symbols.
3752
3753 2004-11-15 Paul Brook <paul@codesourcery.com>
3754
3755 * elflink.c (elf_link_add_object_symbols): Don't assume version
3756 indices are consecutive.
3757
3758 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
3759
3760 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3761 composite relocations against the personality data.
3762
3763 2004-11-13 Paul Brook <paul@codesourcery.com>
3764
3765 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3766 R_ARM_PREL31 relocations to PLT entries.
3767 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3768 (elf32_arm_check_relocs): Ditto.
3769
3770 2004-11-12 Bob Wilson <bob.wilson@acm.org>
3771
3772 * xtensa-isa.c (xtensa_interface_class_id): New.
3773
3774 2004-11-11 Bob Wilson <bob.wilson@acm.org>
3775
3776 * elf32-xtensa.c (property_table_compare): Remove assertion about
3777 entries with the same address and non-zero size.
3778 (xtensa_read_table_entries): Report such entries as errors.
3779
3780 2004-11-11 Mark Mitchell <mark@codesourcery.com>
3781
3782 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3783 R_ARM_RELATIVE on Symbian OS.
3784
3785 2004-11-09 Mark Mitchell <mark@codesourcery.com>
3786
3787 * som.c (som_bfd_print_private_bfd_data): New function.
3788 (som_object_setup): Save the auxiliary header. Don't assume that
3789 zero is an invalid entry point for a shared library.
3790 (som_object_p): Allocate the auxiliary header on the heap.
3791
3792 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3793 declaration.
3794 (elf32_arm_symbian_modify_segment_map): Likewise.
3795
3796 2004-11-09 Daniel Jacobowitz <dan@debian.org>
3797
3798 From David Poole <daveml@mbuf.com>:
3799 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3800 (elf32_arm_size_dynamic_sections): Call it.
3801
3802 2004-11-09 Alan Modra <amodra@bigpond.net.au>
3803
3804 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3805 (ALL_MACHINES_CFILES): Fix typo.
3806 * Makefile.in: Regenerate.
3807 * po/SRC-POTFILES.in: Regenerate.
3808
3809 2004-11-08 Mark Mitchell <mark@codesourcery.com>
3810
3811 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3812 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3813 symbol in the relocation.
3814
3815 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3816 Vineet Sharma <vineets@noida.hcltech.com>
3817
3818 * coff-maxq.c: New File.
3819 * cpu-maxq.c: New File.
3820 * coffcode.h: Likewise.
3821 * config.bfd: Likewise.
3822 * configure.in (maxqcoff_vec): New target vector.
3823 * Makefile.am: Add support for maxq target.
3824 * configure.in: Likewise.
3825 * archures.c:. Likewise.
3826 * targets.c: Likewise.
3827 * bfd_in2.h : Regenerated.
3828 * Makefile.in: Regenerated.
3829 * configure: Regenerated.
3830 * doc/Makefile.in: Regenerated.
3831
3832 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3833
3834 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3835 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3836 C_NT_WEAK aux entries.
3837 (_bfd_coff_generic_relocate_section): Handle undefined
3838 aliases.
3839
3840 2004-11-07 Andreas Schwab <schwab@suse.de>
3841
3842 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3843 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3844 non-default visibility.
3845
3846 2004-11-01 Mark Mitchell <mark@codesourcery.com>
3847
3848 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
3849 D_PAGED.
3850 (elf32_arm_symbian_modify_segment_map): Don't
3851 reset includes_filehdr and includes_phdrs here.
3852
3853 2004-11-04 Daniel Jacobowitz <dan@debian.org>
3854
3855 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3856 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3857 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3858 dependency.
3859 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3860 to a new removed list. Remove normal configuration stanzas.
3861 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3862 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3863 elfarm-nabi.lo with elf32-arm.lo.
3864 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3865 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3866 * elf32-arm.h: Remove.
3867 * elfarm-oabi.c: Remove.
3868 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3869 and bfd_elf32_littlearm_oabi_vec.
3870 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3871
3872 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
3873
3874 * config.bfd: Support crisv32-*-* like cris-*-*.
3875 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3876 (bfd_mach_cris_v10_v32): New macros.
3877 * cpu-cris.c: Tweak formatting.
3878 (get_compatible): New function.
3879 (N): New macro.
3880 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3881 bfd_arch_info_type:s.
3882 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3883 get_compatible for member compatible and link bfd_cris_arch_v32 as
3884 next.
3885 * elf32-cris.c (cris_elf_pcrel_reloc)
3886 (cris_elf_set_mach_from_flags): New functions.
3887 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3888 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3889 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3890 numbers for bfd_mach_cris_v32.
3891 (PLT_ENTRY_SIZE_V32): New macro.
3892 (elf_cris_plt0_entry): Drop last comma in initializer.
3893 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3894 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3895 PLT initializers.
3896 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3897 "%B, section %A".
3898 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3899 (elf_cris_finish_dynamic_sections): Similar.
3900 (elf_cris_adjust_dynamic_symbol): Similar.
3901 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3902 section %A".
3903 <switch with PIC relocs>: Emit error and return FALSE for
3904 bfd_mach_cris_v10_v32.
3905 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3906 Emit warning when generating textrel reloc.
3907 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3908 (cris_elf_final_write_processing): Set flags according to mach.
3909 (cris_elf_print_private_bfd_data): Display
3910 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3911 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3912 new_flags. Don't call cris_elf_final_write_processing. Don't
3913 look at the actual elf header flags at all; use
3914 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3915 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3916 objects.
3917 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3918 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3919 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3920 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3921 * bfd-in2.h, libbfd.h: Regenerate.
3922
3923 2004-11-04 Alan Modra <amodra@bigpond.net.au>
3924
3925 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3926 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3927 comment.
3928 (struct adjust_toc_info): New.
3929 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3930
3931 2004-11-03 Bob Wilson <bob.wilson@acm.org>
3932
3933 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3934 if there are no segments.
3935
3936 2004-11-02 Daniel Jacobowitz <dan@debian.org>
3937
3938 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3939
3940 2004-11-02 Nick Clifton <nickc@redhat.com>
3941
3942 * elf32-iq2000.c: Convert to ISO C90 formatting.
3943
3944 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
3945
3946 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
3947
3948 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3949
3950 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3951 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3952 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3953
3954 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3955
3956 * elf32-sh.c (tpoff): Take alignment into account.
3957
3958 2004-10-28 Nick Clifton <nickc@redhat.com>
3959
3960 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
3961 performing a relocatable link.
3962 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3963 for MIPS ports under Irix.
3964
3965 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
3966
3967 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3968 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3969 (elf32_arm_final_link_relocate): Ditto.
3970 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3971 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3972 (elf32_arm_adjust_dynamic_symbol): Ditto.
3973 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3974 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3975 (elf32_arm_r_howto): ... To here.
3976 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3977
3978 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3979
3980 PR 475
3981 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3982 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3983 and R_IA64_SECREL64LSB.
3984
3985 2004-10-26 Paul Brook <paul@codesourcery.com>
3986
3987 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3988 (bfd_elf_size_dynamic_sections): Create default version definition.
3989 (elf_link_output_extsym): Adjust for default symbol version.
3990
3991 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3992
3993 * mmo.c: Adjust to ISO C.
3994
3995 * mmo.c (mmo_write_section_description): New function broken out
3996 of mmo_internal_write_section.
3997 (mmo_internal_write_section): For each of .text and .data, call
3998 mmo_write_section_description before outputting contents if it has
3999 nontrivially deducible vma or contents.
4000 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4001 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4002 symbols if found within the .data address range.
4003
4004 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4005
4006 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4007
4008 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4009
4010 * mmo.c (File Layout): Correct place of misplaced blurb about
4011 special data.
4012
4013 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4014
4015 * config.bfd: Add mips64*-*-openbsd.
4016
4017 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4018
4019 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4020 statements.
4021
4022 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4023
4024 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4025 * configure: Regenerate.
4026
4027 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4028
4029 PR 463
4030 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4031 to linker reloc_overflow callback.
4032 (aout_link_input_section_ext): Likewise.
4033 (aout_link_reloc_link_order): Likewise.
4034 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4035 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4036 Likewise.
4037 (alpha_relocate_section): Likewise.
4038 * coff-arm.c (coff_arm_relocate_section): Likewise.
4039 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4040 * coff-h8500.c (extra_case): Likewise.
4041 * coff-i960.c (coff_i960_relocate_section): Likewise.
4042 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4043 * coff-mips.c (mips_relocate_section): Likewise.
4044 * coff-or32.c (coff_or32_relocate_section): Likewise.
4045 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4046 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4047 * coff-sh.c (sh_relocate_section): Likewise.
4048 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4049 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4050 * coff-z8k.c (extra_case): Likewise.
4051 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4052 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4053 (_bfd_coff_generic_relocate_section): Likewise.
4054 * ecoff.c (ecoff_reloc_link_order): Likewise.
4055 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4056 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4057 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4058 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4059 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4060 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4061 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4062 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4063 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4064 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4065 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4066 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4067 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4068 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4069 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4070 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4071 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4072 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4073 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4074 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4075 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4076 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4077 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4078 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4079 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4080 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4081 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4082 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4083 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4084 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4085 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4086 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4087 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4088 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4089 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4090 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4091 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4092 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4093 * elflink.c (elf_reloc_link_order): Likewise.
4094 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4095 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4096 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4097 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4098 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4099 (aout_link_reloc_link_order): Likewise.
4100 * reloc.c (bfd_generic_get_relocated_section_contents):
4101 Likewise.
4102 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4103 * simple.c (simple_dummy_reloc_overflow): Updated.
4104
4105 2004-10-20 Andreas Schwab <schwab@suse.de>
4106
4107 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4108 (elf_backend_plt_sym_val): Define.
4109
4110 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4111
4112 * config.bfd: Set targ_underscore=yes for PE COFF targets
4113
4114 2004-10-19 Alan Modra <amodra@bigpond.net.au>
4115
4116 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4117 (ppc64_elf_edit_opd): Likewise.
4118
4119 2004-10-18 Mark Mitchell <mark@codesourcery.com>
4120
4121 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4122 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4123 set SEC_ALLOC and SEC_LOAD.
4124
4125 2004-10-18 Nick Clifton <nickc@redhat.com>
4126
4127 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4128 'name' for relocs against both local and global symbols.
4129
4130 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4131
4132 * bfd-in2.h: Regenerate.
4133 * bfd.c (struct bfd): Add no_export.
4134 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4135
4136 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4137
4138 * config.bfd: Whitespace cleanup.
4139 * Makefile.am: Run "make dep-am"
4140 * Makefile.in: Regenerate.
4141
4142 2004-10-15 Jakub Jelinek <jakub@redhat.com>
4143
4144 * elflink.c (struct already_linked_section): Removed.
4145 (try_match_symbols_in_sections, already_linked): Removed.
4146 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4147 prefix of section names when finding already_linked_table
4148 chain. Compare section names. Instead of calling already_linked,
4149 do it inline and only for sections in the same already_linked_list.
4150
4151 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4152
4153 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4154 parameter. If called after _bfd_elf_write_section_eh_frame,
4155 don't allow a -2 return unless need_* bit is already set, and
4156 handle offsets adjusted for output_offset.
4157 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4158 * elf.c (_bfd_elf_section_offset): Update call.
4159
4160 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4161
4162 PR 440
4163 * coffcode.h (coff_compute_section_file_positions): Cast to
4164 bfd_vma when computing page alignment.
4165
4166 2004-10-13 Mark Mitchell <mark@codesourcery.com>
4167
4168 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4169 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4170
4171 2004-10-12 Mark Mitchell <mark@codesourcery.com>
4172
4173 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4174 relocations use a virtual address, not a section offset.
4175
4176 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4177
4178 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4179 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4180 xtensa_format_encode.
4181 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4182 (ebb_add_proposed_action): Delete.
4183
4184 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4185
4186 * elf32-xtensa.c: Use ISO C90 formatting.
4187
4188 2004-10-12 Paul Brook <paul@codesourcery.com>
4189
4190 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4191 message.
4192
4193 2004-10-12 Paul Brook <paul@codesourcery.com>
4194
4195 * elf32-arm.h: Support EABI version 4 objects.
4196
4197 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4198
4199 PR 325
4200 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4201 Don't mark as default.
4202 (bfd_x86_64_arch): Don't mark as default.
4203
4204 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4205
4206 * elflink.c (enum action_discarded): New.
4207 (elf_section_complain_discarded): Delete.
4208 (elf_action_discarded): New function subsuming the above and also
4209 controlling reloc behaviour.
4210 (elf_link_input_bfd): Use it.
4211
4212 2004-10-11 Jakub Jelinek <jakub@redhat.com>
4213
4214 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4215 (special_sections): Add .gnu.liblist and .gnu.conflict.
4216 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4217
4218 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4219
4220 PR 233
4221 * elflink.c (elf_link_input_bfd): Try harder to support
4222 relocations against symbols in removed linkonce sections.
4223
4224 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4225
4226 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4227
4228 PR 354
4229 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4230 sections do not reference symbols in non-SEC_ALLOC sections.
4231
4232 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4233
4234 PR 437
4235 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4236 (_bfd_elf_link_omit_section_dynsym): Formatting.
4237
4238 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4239
4240 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4241 * libbfd.h: Regnerate.
4242 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4243 * elf32-frv.c: Likewise.
4244 * elf32-m32r.c: Likewise.
4245 * elf32-ppc.c: Likewise.
4246 * elf64-hppa.c: Likewise.
4247 * elfxx-ia64.c: Likewise.
4248 * opncls.c: Likewise.
4249
4250 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4251
4252 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4253 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4254 offsets stored in struct eh_cie_fde entries before doing other
4255 work.
4256
4257 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4258 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4259 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4260 setting offsets for removed CIEs. Don't set "sec", instead set
4261 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4262 CIE in hdr_info. Only set make_relative and make_lsda_relative
4263 for CIEs. Use pointers rather than array indices.
4264 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4265 make_lsda_relative, need_* on cie_inf for FDEs.
4266 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4267 section output_offset. Delete cie_offset, instead use cie_inf
4268 pointer to CIE entry. Use need_relative and need_lsda_relative on
4269 CIE entry for FDEs. Use pointers rather than array indices.
4270
4271 2004-10-09 Alan Modra <amodra@bigpond.net.au>
4272
4273 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4274 bfd_is_target_special_symbol.
4275 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4276 * som.c (som_bfd_is_target_special_symbol): Define.
4277
4278 2004-10-08 Nick Clifton <nickc@redhat.com>
4279
4280 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4281 * configure: Regenerate.
4282 * bfd-in2.h: Regenerate.
4283 * syms.c (bfd_is_target_special_symbol): New interface function.
4284 Returns true when a symbol should be considered to be special.
4285 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4286 the symbol jump table.
4287 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4288 Return true iff the symbol is a mapping symbol.
4289 (bfd_elf32_bfd_is_target_special_symbol): Define.
4290 * elfxx-target.h: Provide a default definition for
4291 bfd_is_target_special_symbol.
4292 * aout-target.h: Likewise.
4293 * aout-tic30.c: Likewise.
4294 * binary.c: Likewise.
4295 * coffcode.h: Likewise.
4296 * i386msdos.c: Likewise.
4297 * ieee.c: Likewise.
4298 * ihex.c: Likewise.
4299 * libaout.h: Likewise.
4300 * libbfd-in.h: Likewise
4301 * libecoff.h: Likewise.
4302 * mach-o.c: Likewise.
4303 * mmo.c: Likewise.
4304 * nlm-target.h: Likewise.
4305 * oasys.c: Likewise.
4306 * pef.c: Likewise.
4307 * ppcboot.c: Likewise.
4308 * srec.c: Likewise.
4309 * tekhex.c: Likewise.
4310 * versados.c: Likewise.
4311 * vms.c: Likewise.
4312 * xcoff-target.h: Likewise.
4313 * xsym.c: Likewise.
4314 * libbfd.h: Regenerate.
4315
4316 2004-10-08 Daniel Jacobowitz <dan@debian.org>
4317
4318 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4319 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4320 (elf_backend_section_from_shdr): Define.
4321
4322 2004-10-08 Alan Modra <amodra@bigpond.net.au>
4323
4324 * syms.c (bfd_is_local_label): Return false for file symbols.
4325
4326 2004-10-07 Bob Wilson <bob.wilson@acm.org>
4327 David Heine <dlheine@tensilica.com>
4328
4329 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4330 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4331 (elf32xtensa_no_literal_movement): New global variable.
4332 (elf_howto_table): Add entries for new relocations.
4333 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4334 (property_table_compare): When addresses are equal, compare sizes and
4335 various property flags.
4336 (property_table_matches): New.
4337 (xtensa_read_table_entries): Extend to read new property tables. Add
4338 output_addr parameter to indicate that output addresses should be used.
4339 Use bfd_get_section_limit.
4340 (elf_xtensa_find_property_entry): New.
4341 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4342 (elf_xtensa_check_relocs): Handle new relocations.
4343 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4344 relocations. Use new xtensa-isa.h functions.
4345 (build_encoding_error_message): Remove encode_result parameter. Add
4346 new target_address parameter used to detect alignment errors.
4347 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4348 error handling. Use new is_operand_relocation function.
4349 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4350 Use underbar macro for error messages. Formatting.
4351 (get_const16_opcode): New.
4352 (get_l32r_opcode): Add a separate flag for initialization.
4353 (get_relocation_opnd): Operand number is no longer explicit in the
4354 relocation. Change to decode the opcode and analyze its operands.
4355 (get_relocation_slot): New.
4356 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4357 Use new xtensa-isa.h functions to handle multislot instructions.
4358 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4359 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4360 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4361 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4362 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4363 get_single_format, init_op_single_format_table): New.
4364 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4365 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4366 (contract_asm_expansion): Add error_message parameter and pass it to
4367 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4368 with R_XTENSA_SLOT0_OP.
4369 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4370 instructions. Use new xtensa-isa.h functions.
4371 (r_reloc struct): Add new virtual_offset field.
4372 (r_reloc_init): Add contents and content_length parameters. Set
4373 virtual_offset field to zero. Add contents to target_offset field for
4374 partial_inplace relocations.
4375 (r_reloc_is_defined): Check for null.
4376 (print_r_reloc): New debug function.
4377 (source_reloc struct): Replace xtensa_operand field with pair of the
4378 opcode and the operand position. Add is_abs_literal field.
4379 (init_source_reloc): Specify operand by opcode/position pair. Set
4380 is_abs_literal field.
4381 (source_reloc_compare): When target_offsets are equal, compare other
4382 fields to make sorting predictable.
4383 (literal_value struct): Add is_abs_literal field.
4384 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4385 (init_literal_value): New.
4386 (is_same_value): Replace with ...
4387 (literal_value_equal): ... this function. Add comparisons of
4388 virtual_offset and is_abs_literal fields.
4389 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4390 failure. Initialize has_last_loc field.
4391 (value_map_hash_table_delete): New.
4392 (hash_literal_value): Rename to ...
4393 (literal_value_hash): ... this. Include is_abs_literal flag and
4394 virtual_offset field in the hash value.
4395 (get_cached_value): Rename to ...
4396 (value_map_get_cached_value): ... this. Update calls to
4397 literal_value_hash and literal_value_equal.
4398 (add_value_map): Check for allocation failure. Update calls to
4399 value_map_get_cached_value and literal_value_hash.
4400 (text_action, text_action_list, text_action_t): New types.
4401 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4402 text_action_add, text_action_add_literal, offset_with_removed_text,
4403 offset_with_removed_text_before_fill, find_insn_action,
4404 print_action_list, print_removed_literals): New.
4405 (offset_with_removed_literals): Delete.
4406 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4407 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4408 allocated_relocs_count fields.
4409 (init_xtensa_relax_info): Initialize new fields.
4410 (reloc_bfd_fix struct): Add new translated field.
4411 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4412 translated field.
4413 (fix_compare, cache_fix_array): New.
4414 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4415 section via get_xtensa_relax_info. Use cache_fix_array to set up
4416 sorted fix_array and use bsearch instead of linear search.
4417 (section_cache_t): New struct.
4418 (init_section_cache, section_cache_section, clear_section_cache): New.
4419 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4420 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4421 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4422 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4423 New.
4424 (retrieve_contents): Use bfd_get_section_limit.
4425 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4426 to compute_removed_literals. Free value_map_hash_table when no longer
4427 needed.
4428 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4429 compute_text_actions for all sections.
4430 (find_relaxable_sections): Mark sections as relaxable if they contain
4431 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4432 call. Increment relax_info src_count field only for appropriate
4433 relocation types. Remove is_literal_section check.
4434 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4435 r_reloc_init and find_associated_l32r_irel. Check
4436 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4437 literals. Pass is_abs_literal flag to init_source_reloc.
4438 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4439 CONST16 instructions. Adjust calls to r_reloc_init and
4440 pcrel_reloc_fits. Handle weak symbols conservatively.
4441 (find_associated_l32r_irel): Add bfd parameter and pass it to
4442 is_l32r_relocation.
4443 (compute_text_actions, compute_ebb_proposed_actions,
4444 compute_ebb_actions, check_section_ebb_pcrels_fit,
4445 check_section_ebb_reduces, text_action_add_proposed,
4446 compute_fill_extra_space): New.
4447 (remove_literals): Replace with ...
4448 (compute_removed_literals): ... this function. Call
4449 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4450 Call xtensa_read_table_entries to get the property table. Skip
4451 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4452 is_removable_literal, remove_dead_literal, and
4453 identify_literal_placement functions.
4454 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4455 instead of linear search.
4456 (is_removable_literal, remove_dead_literal,
4457 identify_literal_placement): New.
4458 (relocations_reach): Update check for literal not referenced by any
4459 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4460 (coalesce_shared_literal, move_shared_literal): New.
4461 (relax_section): Use bfd_get_section_limit. Call
4462 translate_section_fixes. Update calls to r_reloc_init and
4463 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4464 Add call to pin_internal_relocs. Add special handling for
4465 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4466 info to calculate new addend_displacement variable. Replace code for
4467 deleting literals with more general code to perform the actions
4468 determined by the action_list for the section.
4469 (translate_section_fixes, translate_reloc_bfd_fix): New.
4470 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4471 find_removed_literal only if is_operand_relocation. Update call to
4472 offset_with_removed_text. Use new target_offset and removed_bytes
4473 variables.
4474 (move_literal): New.
4475 (relax_property_section): Use bfd_get_section_limit. Set new
4476 is_full_prop_section flag and handle new property tables. Update calls
4477 to r_reloc_init and offset_with_removed_text. Check
4478 is_relaxable_asm_section flag. Handle expansion of zero-sized
4479 unreachable entries, with use of offset_with_removed_text_before_fill.
4480 For relocatable links, combine entries only for literal tables.
4481 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4482 calls to offset_with_removed_text. Translate st_size field for
4483 function symbols.
4484 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4485 failure. Add contents parameter. Update call to get_bfd_fix. Update
4486 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4487 R_XTENSA_ASM_EXPAND relocs.
4488 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4489 call to get_bfd_fix. Include offset from contents for partial_inplace
4490 relocations.
4491 (is_reloc_sym_weak): New.
4492 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4493 (prop_sec_len): New.
4494 (xtensa_is_property_section): Handle new property sections.
4495 (is_literal_section): Delete.
4496 (internal_reloc_compare): When r_offset matches, compare r_info and
4497 r_addend to make sorting predictable.
4498 (internal_reloc_matches): New.
4499 (xtensa_get_property_section_name): Handle new property sections.
4500 (xtensa_get_property_predef_flags): New.
4501 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4502 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4503 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4504 (xtisa_errno, xtisa_error_msg): New variables.
4505 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4506 (xtensa_insnbuf_alloc): Add error handling.
4507 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4508 use xtensa_format_decode. Add error handling.
4509 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4510 instruction length to find the number of bytes to copy.
4511 (xtensa_isa_init): Add error handling. Replace calls to
4512 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4513 tables in the xtensa_modules structure.
4514 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4515 xtensa_extend_isa): Delete.
4516 (xtensa_isa_free): Change to only free lookup tables.
4517 (opname_lookup_compare): Replace with ...
4518 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4519 (xtensa_insn_maxlength): Rename to ...
4520 (xtensa_isa_maxlength): ... this.
4521 (xtensa_insn_length): Delete.
4522 (xtensa_insn_length_from_first_byte): Replace with ...
4523 (xtensa_isa_length_from_chars): ... this function.
4524 (xtensa_num_opcodes): Rename to ...
4525 (xtensa_isa_num_opcodes): ... this.
4526 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4527 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4528 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4529 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4530 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4531 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4532 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4533 (xtensa_opcode_lookup): Add error handling.
4534 (xtensa_decode_insn): Replace with ...
4535 (xtensa_opcode_decode): ... this function, with new format and
4536 slot parameters. Add error handling.
4537 (xtensa_encode_insn): Replace with ...
4538 (xtensa_opcode_encode): ... this function, which does the encoding via
4539 one of the entries in the "encode_fns" array. Add error handling.
4540 (xtensa_opcode_name): Add error handling.
4541 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4542 xtensa_opcode_is_call): New.
4543 (xtensa_num_operands): Replace with ...
4544 (xtensa_opcode_num_operands): ... this function. Add error handling.
4545 (xtensa_opcode_num_stateOperands,
4546 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4547 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4548 xtensa_operand_is_visible): New.
4549 (xtensa_get_operand, xtensa_operand_kind): Delete.
4550 (xtensa_operand_inout): Add error handling and special-case for
4551 "sout" operands.
4552 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4553 operate on one slot of an instruction. Added error handling.
4554 (xtensa_operand_encode): Handle default operands with no encoding
4555 functions. Check for success by comparing against decoded value.
4556 Add error handling.
4557 (xtensa_operand_decode): Handle default operands. Return decoded value
4558 through argument pointer. Add error handling.
4559 (xtensa_operand_is_register, xtensa_operand_regfile,
4560 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4561 (xtensa_operand_isPCRelative): Rename to ...
4562 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4563 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4564 through argument pointer. Add error handling.
4565 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4566 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4567 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4568 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4569 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4570 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4571 xtensa_state_is_exported, xtensa_sysreg_lookup,
4572 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4573 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4574 xtensa_interface_num_bits, xtensa_interface_inout,
4575 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4576 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4577 * xtensa-modules.c: Rewrite to use new data structures.
4578 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4579 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4580 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4581 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4582 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4583 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4584 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4585 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4586 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4587 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4588 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4589 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4590 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4591 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4592 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4593 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4594 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4595 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4596 * Makefile.in: Regenerate.
4597 * bfd-in2.h: Likewise.
4598 * libbfd.h: Likewise.
4599
4600 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
4601
4602 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4603 against the absolute section.
4604 (mips_elf64_write_rela): Likewise.
4605
4606 2004-10-07 Jan Beulich <jbeulich@novell.com>
4607
4608 * elf.c (elf_find_function): Don't generally check for matching
4609 section, just for non-file symbols. Remove redunant comparison
4610 for the latter.
4611 * elf32-arm.h (arm_elf_find_function): Likewise.
4612
4613 2004-10-07 Jeff Baker <jbaker@qnx.com>
4614
4615 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4616 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4617 was specified.
4618
4619 2004-10-04 Roland McGrath <roland@redhat.com>
4620
4621 * hash.c (bfd_hash_set_default_size): Use const for table.
4622 Use size_t instead of int for variable compared to sizeof results.
4623
4624 2004-10-05 Alan Modra <amodra@bigpond.net.au>
4625
4626 PR 425
4627 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4628
4629 2004-10-01 Paul Brook <paul@codesourcery.com>
4630
4631 * elf32-arm.h (elf32_arm_fake_sections,
4632 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4633 functions.
4634 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4635
4636 2004-10-01 Alan Modra <amodra@bigpond.net.au>
4637
4638 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4639 need_lsda_relative.
4640 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4641 need_relative or need_lsda_relative if we are processing an
4642 offset for a reloc on a FDE initial loc or LSDA field
4643 respectively.
4644 (_bfd_elf_write_section_eh_frame): Test need_relative and
4645 need_lsda_relative in place of corresponding make_* field
4646 when deciding to use pc-relative encodings.
4647
4648 2004-09-30 Paul Brook <paul@codesourcery.com>
4649
4650 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4651 target2 relocation type.
4652
4653 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4654
4655 PR 414
4656 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4657
4658 2004-09-30 Paul Brook <paul@codesourcery.com>
4659
4660 * reloc.c: Add BFD_RELOC_ARM_SMI.
4661 * bfd-in2.h: Regenerate.
4662 * libbfd.h: Ditto.
4663
4664 2004-09-24 Alan Modra <amodra@bigpond.net.au>
4665
4666 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4667 vma and output offset to address.
4668 * simple.c (simple_save_output_info): Only set output section
4669 and offset for debug sections, or those not already set up by
4670 the linker.
4671 (bfd_simple_get_relocated_section_contents): Update comment.
4672
4673 2004-09-24 Alan Modra <amodra@bigpond.net.au>
4674
4675 * elf.c (IS_LOADED): Delete.
4676 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4677 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4678 to 2004-09-22.
4679
4680 2004-09-23 Alan Modra <amodra@bigpond.net.au>
4681
4682 PR gas/396
4683 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4684 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4685 redundant assignment of EM_SPARC.
4686
4687 2004-09-22 Brian Ford <ford@vss.fsi.com>
4688
4689 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4690 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4691 constants.
4692 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4693
4694 2004-09-22 Alan Modra <amodra@bigpond.net.au>
4695
4696 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4697 (elf_backend_modify_segment_map): Don't define.
4698
4699 2004-09-22 Alan Modra <amodra@bigpond.net.au>
4700
4701 * elf.c (IS_LOADED): Define.
4702 (assign_file_positions_for_segments): Don't round up file offset of
4703 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4704 Delete code handling link script adjustment of lma. Do the adjust
4705 in later code handling similar ajustments. Remove dead code error
4706 check. Warn if section lma would require a negative offset
4707 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4708 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4709 update voff in section loop. Change voff in segment loop to be an
4710 adjustment on top of "off". Set sec->filepos and update "off" later.
4711 Test for loadable sections consistently using IS_LOADED. Similarly,
4712 test for alloc-only sections other than .tbss consistently.
4713 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4714 Tidy PT_NOTE handling. Use %B and %A in error messages.
4715 (assign_file_positions_except_relocs): Use %B in error message.
4716
4717 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4718
4719 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4720 (CONFIG_STATUS_DEPENDENCIES): New.
4721 (Makefile): Removed.
4722 (config.status): Likewise.
4723 * Makefile.in: Regenerated.
4724
4725 2004-09-17 Paul Brook <paul@codesourcery.com>
4726
4727 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4728 (bfd_elf32_arm_process_before_allocation): Update prototype.
4729 * bfd-in2.h: Regenerate.
4730 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4731 (elf32_arm_link_hash_table_create): Set it.
4732 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4733 (bfd_elf32_arm_set_target_relocs): New function.
4734 (arm_real_reloc_type): New function.
4735 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4736 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4737 (elf32_arm_gc_sweep_hook): Ditto.
4738 (elf32_arm_check_relocs): Ditto.
4739 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4740 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4741 R_ARM_GOT_TARGET2.
4742 (elf32_arm_got_prel): New variable.
4743 (elf32_arm_howto_from_type): New function.
4744 (elf32_arm_info_to_howto): Use it.
4745 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4746 BFD_RELOC_ARM_TARGET2.
4747 * libbfd.h: Regenerate.
4748 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4749
4750 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4751
4752 * ecoff.c: Update u.undef.next refs.
4753 * elf64-ppc.c: Likewise.
4754 * elflink.c: Likewise.
4755 * linker.c: Likewise.
4756 * xcofflink.c: Likewise.
4757
4758 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4759 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4760 fields to indirect struct.
4761 * elf-m10300.c: Update u.weakdef refs.
4762 * elf32-arm.h: Likewise.
4763 * elf32-cris.c: Likewise.
4764 * elf32-frv.c: Likewise.
4765 * elf32-hppa.c: Likewise.
4766 * elf32-i370.c: Likewise.
4767 * elf32-i386.c: Likewise.
4768 * elf32-m32r.c: Likewise.
4769 * elf32-m68k.c: Likewise.
4770 * elf32-ppc.c: Likewise.
4771 * elf32-s390.c: Likewise.
4772 * elf32-sh.c: Likewise.
4773 * elf32-sparc.c: Likewise.
4774 * elf32-vax.c: Likewise.
4775 * elf32-xtensa.c: Likewise.
4776 * elf64-alpha.c: Likewise.
4777 * elf64-hppa.c: Likewise.
4778 * elf64-ppc.c: Likewise.
4779 * elf64-s390.c: Likewise.
4780 * elf64-sh64.c: Likewise.
4781 * elf64-sparc.c: Likewise.
4782 * elf64-x86-64.c: Likewise.
4783 * elfxx-ia64.c: Likewise.
4784 * elfxx-mips.c: Likewise.
4785 * elflink.c: Likewise. Also u.elf_hash_value.
4786 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4787 indirection.
4788 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4789 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4790 (bfd_elf_gc_record_vtentry): Likewise.
4791 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4792
4793 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4794
4795 * Makefile.am: Run "make dep-am".
4796 * Makefile.in: Regenerate.
4797 * bfd-in2.h: Regenerate.
4798 * po/SRC-POTFILES.in: Regenerate.
4799 * po/bfd.pot: Regenerate.
4800
4801 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4802
4803 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4804 with bitfields. Make "type" and "other" bitfields too.
4805 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4806 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4807 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4808 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4809 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4810 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4811 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4812 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4813 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4814 * elf-m10300.c: Likewise.
4815 * elf.c: Likewise.
4816 * elf32-arm.h: Likewise.
4817 * elf32-cris.c: Likewise.
4818 * elf32-frv.c: Likewise.
4819 * elf32-hppa.c: Likewise.
4820 * elf32-i370.c: Likewise.
4821 * elf32-i386.c: Likewise.
4822 * elf32-m32r.c: Likewise.
4823 * elf32-m68k.c: Likewise.
4824 * elf32-ppc.c: Likewise.
4825 * elf32-s390.c: Likewise.
4826 * elf32-sh-symbian.c: Likewise.
4827 * elf32-sh.c: Likewise.
4828 * elf32-sh64.c: Likewise.
4829 * elf32-sparc.c: Likewise.
4830 * elf32-vax.c: Likewise.
4831 * elf32-xtensa.c: Likewise.
4832 * elf64-alpha.c: Likewise.
4833 * elf64-hppa.c: Likewise.
4834 * elf64-ppc.c: Likewise.
4835 * elf64-s390.c: Likewise.
4836 * elf64-sh64.c: Likewise.
4837 * elf64-sparc.c: Likewise.
4838 * elf64-x86-64.c: Likewise.
4839 * elflink.c: Likewise.
4840 * elfxx-ia64.c: Likewise.
4841 * elfxx-mips.c: Likewise.
4842 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4843 * configure: Regenerate.
4844 * aclocal.m4: Regenerate.
4845
4846 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4847
4848 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4849 around uses of R_ARM_TARGET1.
4850 (elf32_arm_check_relocs): Likewise.
4851
4852 2004-09-13 Paul Brook <paul@codesourcery.com>
4853
4854 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4855 prototype.
4856 * bfd-in2.h: Regenerate.
4857 * libbfd.h: Regenerate.
4858 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4859 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4860 (bfd_elf32_arm_process_before_allocation): Ditto.
4861 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4862 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4863 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4864 * reloc.c: Ditto.
4865
4866 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4867
4868 * hpux-core.c (thread_section_p): New function.
4869 (hpux_core_core_file_p): Fix computation of offset in call
4870 to bfd_seek. Create a ".reg" section from an arbitrary
4871 ".reg/<id>" section if none was created after having read
4872 all sections.
4873
4874 2004-09-11 Andreas Schwab <schwab@suse.de>
4875
4876 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4877 * aclocal.m4: Rebuild.
4878 * configure: Rebuild.
4879
4880 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4881
4882 * section.c (bfd_sections_find_if): Fix parameter name in
4883 comment to match code.
4884
4885 2004-09-10 Alan Modra <amodra@bigpond.net.au>
4886
4887 * elf.c (assign_file_positions_except_relocs): Assign relocs
4888 stored in a bfd section.
4889
4890 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
4891
4892 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4893 h->gotplt_refcount to 0, not -1.
4894
4895 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
4896
4897 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4898 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4899 symname.
4900 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4901 handle symbol visibility here.
4902
4903 2004-09-07 Alan Modra <amodra@bigpond.net.au>
4904
4905 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4906 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4907 callers.
4908 (ppc_stub_name): Remove trailing "+0" on stub name.
4909 (create_linkage_sections): Create relocations for
4910 branch lookup table when --emit-relocs as well as when --shared.
4911 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4912 relbrlt test. For --emit-stub-syms, always output a sym even when
4913 one already exists on a plt call stub. Put stub type in the stub
4914 symbol name.
4915 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4916 test.
4917 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4918 reloc_count in stub sections. Adjust relbrlt test.
4919 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4920 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4921 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4922 for relocs against discarded symbols. Fix comments.
4923
4924 2004-09-06 Mark Mitchell <mark@codesourcery.com>
4925
4926 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4927 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4928 from ...
4929 (map_sections_to_segments): ... here. Use it. Assign a file
4930 position to the .dynamic section if it is not loadable, but part
4931 of the PT_DYNAMIC segment.
4932 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4933 offsets, not VMAs, for the BPABI. Do not fill in the header in
4934 the .got.plt section for the BPABI.
4935 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4936 PT_DYNAMIC segment.
4937 (elf_backend_want_got_plt): Define to zero for Symbian OS.
4938
4939 2004-09-06 Nick Clifton <nickc@redhat.com>
4940
4941 * elflink.c (elf_link_add_object_symbols): Set the error code to
4942 bfd_error_wrong_format when the input format does not match the
4943 output format.
4944
4945 2004-09-06 Alan Modra <amodra@bigpond.net.au>
4946
4947 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4948 (ppc64_elf_check_directives): ..here.
4949 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4950 before accessing ppc64_elf_tdata.
4951 (ppc64_elf_finish_dynamic_sections): And here too.
4952
4953 2004-09-04 Alan Modra <amodra@bigpond.net.au>
4954
4955 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4956
4957 2004-09-03 Mark Mitchell <mark@codesourcery.com>
4958
4959 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4960 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4961 (bfd_elf32_littlearm_symbian_vec): Likewise.
4962 * configure: Regenerated.
4963 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4964 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4965 (PLT_ENTRY_SIZE): Likewise.
4966 (bfd_vma_elf32_arm_symbian_plt_entry): New
4967 variable.
4968 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4969 and symbian_p.
4970 (create_got_section): Don't create sections when generating BPABI
4971 objects.
4972 (elf32_arm_create_dynamic_sections): Tidy.
4973 (elf32_arm_link_hash_table_create): Set plt_header_size,
4974 plt_entry_size, and symbian_p.
4975 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4976 generating BPABI objects.
4977 (allocate_dynrelocs): Use htab->plt_header_size, not
4978 PLT_HEADER_SIZE. Do not add to .got.plt when
4979 generating BPABI objects.
4980 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4981 * elfarm-nabi.c: Add SymbianOS target vectors.
4982 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4983 (_bfd_elf_link_create_dynamic_sections): Likewise.
4984 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4985 (elfNN_bed): Use it.
4986 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4987 (bfd_elf32_littlearm_symbian_vec): Likewise.
4988 (_bfd_target_vector): Add them.
4989
4990 2004-09-03 Nick Clifton <nickc@redhat.com>
4991
4992 PR 360
4993 * coffcode.h (handle_COMDAT): Replace abort with an warning
4994 message and allow the scan to continue.
4995
4996 2004-09-02 Alan Modra <amodra@bigpond.net.au>
4997
4998 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4999 in when reading relocs, not our sorted syms. Remove unnecessary
5000 var.
5001
5002 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5003
5004 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5005
5006 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5007
5008 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5009 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5010 replace uses of *_alias with *_noncanonical.
5011 * aclocal.m4: Rebuild with aclocal 1.4p6.
5012 * Makefile.in: Rebuild with automake 1.4p6.
5013 * doc/Makefile.in: Rebuild with automake 1.4p6.
5014 * configure.in: Autoupdate with autoupdate 2.59.
5015 * config.in: Regenerate with autoheader 2.59.
5016 * configure: Regnerate with autoconf 2.59.
5017
5018 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5019
5020 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5021 symbol pointer arrays before modifying.
5022
5023 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5024
5025 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5026 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5027 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5028 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5029 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5030 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5031 Use both symbol tables on non-relocatable objects. Use a common
5032 error exit. Fix "mid" warning.
5033 * libbfd.h: Regenerate.
5034 * bfd-in2.h: Regenerate.
5035
5036 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5037
5038 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5039 object file.
5040 (struct sfpr_def_parms): Save some space.
5041 (sfpr_define): Here too.
5042
5043 * elf64-ppc.c (compare_symbols): Put section syms first.
5044 (sym_exists_at): New function.
5045 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5046 points only for relocatable files. Use .opd section contents
5047 otherwise. Generally clean up the code.
5048
5049 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5050
5051 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5052 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5053 (struct sfpr_def_parms): New.
5054 (sfpr_define): New function.
5055 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5056 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5057 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5058 (savefpr1_tail, restfpr1_tail): New functions.
5059 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5060 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5061 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5062 code. Define all ABI mandated _save and _rest functions.
5063
5064 2004-08-26 Paul Brook <paul@codesourcery.com>
5065
5066 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5067
5068 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5069
5070 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5071 TRUE or FALSE.
5072
5073 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5074
5075 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5076 that pcrel correction is applied for R_386_PC32.
5077
5078 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5079
5080 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5081 for R_386_32 and R_386_PC32 relocs against symbols defined in
5082 discarded sections.
5083
5084 2004-08-25 Dmitry Diky <diwil@spec.ru>
5085
5086 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5087 Add new relocations.
5088 * bfd-in2.h: Regenerate.
5089 * libbfd.h: Regenerate.
5090 * elf32-msp430.c: Clean-up code.
5091 (elf_msp430_howto_table): Add new relocation entries.
5092 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5093 (msp430_elf_relax_section): New function.
5094 (msp430_elf_relax_delete_bytes): New function.
5095 (msp430_elf_symbol_address_p): New function.
5096
5097 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5098
5099 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5100 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5101
5102 2004-08-20 Daniel Jacobowitz <dan@debian.org>
5103
5104 * elflink.c (_bfd_elf_section_already_linked): Handle
5105 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5106
5107 2004-08-19 Mark Mitchell <mark@codesourcery.com>
5108
5109 * config.bfd (arm*-*-symbianelf*): New target.
5110 (arm*-*-eabi*): Likewise.
5111
5112 2004-08-19 Alan Modra <amodra@bigpond.net.au>
5113
5114 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5115 "struct ppc_link_hash_entry *".
5116 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5117 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5118
5119 2004-08-19 Jakub Jelinek <jakub@redhat.com>
5120
5121 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5122 entries (where fd_aux overlaps next entry's fd_func).
5123 Add non_overlapping argument, use it.
5124 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5125 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5126 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5127 as indexes into opd_sym_map/opd_adjust array.
5128 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5129
5130 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5131
5132 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5133 if we can look up their function descriptor in a regular file.
5134
5135 2004-08-18 Nick Clifton <nickc@redhat.com>
5136
5137 PR 324
5138 * cofflink.c (coff_link_add_symbols): Check that the comdat
5139 pointer in the coff_section_data structure has been initialised
5140 before using it.
5141
5142 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5143
5144 PR 338
5145 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5146 changing bfd_link_hash_undefined to bfd_link_hash_new.
5147
5148 2004-08-17 Jakub Jelinek <jakub@redhat.com>
5149
5150 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5151 if not yet defined.
5152 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5153 (synthetic_opd, synthetic_relocatable): New variables.
5154 (compare_symbols, compare_relocs): New helper routines.
5155 (ppc64_elf_get_synthetic_symtab): New function.
5156 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5157 to relsyms.
5158 * bfd-in2.h: Regenerated.
5159 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5160 to relsyms. Return 0 if abfd is relocatable.
5161
5162 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5163
5164 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5165
5166 2004-08-17 Nick Clifton <nickc@redhat.com>
5167
5168 * (is_arm_mapping_symbol_name): New function - return true
5169 when a symbol name matches the requirements for an ARM mapping
5170 symbol name.
5171 (arm_elf_find_function): New function based on
5172 elf_find_function in elf.c but skipping ARM mapping symbols
5173 and including thumb function symbols.
5174 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5175 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5176
5177 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5178
5179 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5180 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5181 (ppc64_elf_brtaken_reloc): Here too.
5182
5183 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5184
5185 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5186 symbol visibility.
5187 (ppc64_elf_check_directives): Check that we have the right hash
5188 table before proceeding.
5189
5190 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5191
5192 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5193 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5194 the sections that will be discarded.
5195
5196 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5197
5198 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5199
5200 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5201
5202 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5203 free space available.
5204
5205 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5206
5207 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5208 occurrences with bfd_byte * thoughout file.
5209
5210 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5211 (xcoff_write_armap_big): Likewise.
5212 (xcoff_write_archive_contents_old): Likewise.
5213 (xcoff_write_archive_contents_big): Likewise.
5214
5215 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5216
5217 2004-08-13 Nick Clifton <nickc@redhat.com>
5218
5219 * elf32-arm.h: Convert to ISO C90.
5220
5221 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5222
5223 PR 293
5224 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5225 zero the plt field.
5226
5227 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5228
5229 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5230 (bfd_archive_filename, bfd_get_section_ident): Delete.
5231 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5232 bfd_archive_filename.
5233 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5234 to warn about symbols in discarded sections. Use _bfd_error_handler.
5235 * aout-adobe.c (aout_adobe_callback): See below.
5236 * aout-cris.c (swap_ext_reloc_in): ..
5237 * coff-arm.c (find_thumb_glue, find_arm_glue,
5238 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5239 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5240 coff_arm_copy_private_bfd_data): ..
5241 * coff-i860.c (i860_reloc_processing): ..
5242 * coff-mcore.c (mcore_coff_unsupported_reloc,
5243 coff_mcore_relocate_section): ..
5244 * coff-ppc.c (coff_ppc_relocate_section): ..
5245 * coff-rs6000.c (xcoff_create_csect_from_smclas
5246 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5247 sh_swap_insns, sh_relocate_section): ..
5248 * coff-tic54x.c (tic54x_reloc_processing): ..
5249 * coff-tic80.c (coff_tic80_relocate_section): ..
5250 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5251 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5252 coff_slurp_symbol_table, coff_classify_symbol,
5253 coff_slurp_reloc_table): ..
5254 * coffgen.c (_bfd_coff_read_string_table): ..
5255 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5256 _bfd_coff_generic_relocate_section): ..
5257 * cpu-arm.c (bfd_arm_merge_machines): ..
5258 * cpu-sh.c (sh_merge_bfd_arch): ..
5259 * elf-hppa.h (elf_hppa_relocate_section): ..
5260 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5261 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5262 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5263 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5264 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5265 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5266 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5267 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5268 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5269 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5270 cris_elf_merge_private_bfd_data
5271 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5272 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5273 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5274 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5275 elf32_hppa_relocate_section): ..
5276 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5277 i370_elf_check_relocs, i370_elf_relocate_section): ..
5278 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5279 elf_i386_relocate_section): ..
5280 * elf32-m32r.c (m32r_elf_relocate_section,
5281 m32r_elf_merge_private_bfd_data): ..
5282 * elf32-m68hc1x.c (m68hc12_add_stub,
5283 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5284 * elf32-m68k.c (elf_m68k_relocate_section): ..
5285 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5286 mcore_elf_relocate_section): ..
5287 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5288 ppc_elf_check_relocs, ppc_elf_relocate_section,
5289 ppc_elf_begin_write_processing): ..
5290 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5291 elf_s390_relocate_section): ..
5292 * elf32-sh-symbian.c (sh_symbian_import_as,
5293 sh_symbian_process_embedded_commands,
5294 sh_symbian_relocate_section): ..
5295 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5296 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5297 sh_elf_merge_private_data): ..
5298 * elf32-sparc.c (elf32_sparc_check_relocs,
5299 elf32_sparc_relocate_section,
5300 elf32_sparc_merge_private_bfd_data): ..
5301 * elf32-v850.c (v850_elf_check_relocs,
5302 v850_elf_merge_private_bfd_data): ..
5303 * elf32-xtensa.c (elf_xtensa_check_relocs,
5304 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5305 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5306 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5307 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5308 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5309 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5310 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5311 ppc64_elf_relocate_section): ..
5312 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5313 elf_s390_relocate_section): ..
5314 * elf64-sh64.c (sh_elf64_relocate_section): ..
5315 * elf64-sparc.c (sparc64_elf_check_relocs,
5316 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5317 sparc64_elf_merge_private_bfd_data): ..
5318 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5319 elf64_x86_64_relocate_section): ..
5320 * elflink.c (_bfd_elf_add_default_symbol,
5321 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5322 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5323 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5324 elf_get_linked_section_vma, elf_fixup_link_order,
5325 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5326 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5327 * elfxx-ia64.c (elfNN_ia64_relax_section,
5328 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5329 * elfxx-mips.c (mips_elf_perform_relocation,
5330 _bfd_mips_elf_check_relocs,
5331 _bfd_mips_elf_merge_private_bfd_data): ..
5332 * ieee.c (ieee_slurp_external_symbols): ..
5333 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5334 * libbfd.c (_bfd_generic_verify_endian_match): ..
5335 * linker.c (_bfd_generic_link_add_one_symbol,
5336 _bfd_generic_section_already_linked): ..
5337 * pdp11.c (translate_to_native_sym_flags): ..
5338 * pe-mips.c (coff_pe_mips_relocate_section): ..
5339 * peicode.h (pe_ILF_build_a_bfd): ..
5340 * srec.c (srec_bad_byte): ..
5341 * stabs.c (_bfd_link_section_stabs): ..
5342 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5343 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5344 with corresponding %B and %A in _bfd_error_handler format string.
5345 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5346 calls to use %A and %B. Fix "against symbol .. from section" and
5347 similar error messages. Combine multiple _bfd_error_handler calls
5348 where they were separated due to bfd_archive_filename deficiencies.
5349 * bfd-in2.h: Regenerate.
5350
5351 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5352
5353 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5354 relocation.
5355
5356 2004-08-10 Alan Modra <amodra@bigpond.net.au>
5357
5358 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5359 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5360 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5361 Add twiddled_syms.
5362 (link_hash_newfunc): Init was_undefined.
5363 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5364 Use undefweak instead.
5365 (ppc64_elf_check_directives): Fix undefs chain.
5366 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5367 references.
5368 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5369 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5370 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5371
5372 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5373
5374 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5375 error, test input_section flags rather than sec.
5376
5377 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5378
5379 * elf-bfd.h (struct elf_backend_data): Add
5380 elf_backend_archive_symbol_lookup.
5381 (_bfd_elf_archive_symbol_lookup): Declare.
5382 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5383 (elf_link_add_archive_symbols): ..extracted from here. Call the
5384 backend version.
5385 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5386 (elfNN_bed): Init new field.
5387 * elf64-ppc.c (elf_backend_check_directives): Define.
5388 (elf_backend_archive_symbol_lookup): Define.
5389 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5390 a ppc_link_hash_entry pointer.
5391 (get_fdh): Move.
5392 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5393 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5394 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5395 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5396 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5397 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5398 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5399 descriptor symbols.
5400
5401 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5402
5403 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5404 (ppc64_elf_add_symbol_hook): Test for NULL section.
5405 (get_sym_h): Formatting.
5406 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5407 stub target_value.
5408
5409 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5410 long branch stubs with code handling plt and r2off branch stubs.
5411
5412 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5413
5414 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5415 * elflink.c (elf_link_input_bfd): Formatting.
5416 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5417 all callers.
5418 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5419 (link_hash_newfunc): Don't set it.
5420 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5421 (ppc64_elf_mark_entry_syms): Delete.
5422 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5423 sections. Use get_opd_info.
5424 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5425
5426 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5427
5428 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5429
5430 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5431 (func_desc_adjust): Don't set have_undefweak.
5432 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5433 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5434
5435 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5436 "struct ppc_link_hash_entry *". Adjust all references.
5437 (ppc64_elf_hide_symbol): Correct a comment.
5438
5439 * elf64-ppc.c (get_opd_info): New function.
5440 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5441 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5442 before calling get_fdh. Test fdh rather than h before dereferencing
5443 fdh. Mark removed symbols in opd_adjust.
5444 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5445 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5446 opd symbols.
5447 (ppc64_elf_output_symbol_hook): Likewise.
5448
5449 2004-08-06 Paul Brook <paul@codesourcery.com>
5450
5451 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5452 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5453 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5454 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5455 and BFD_RELOC_ARM_SBREL32.
5456 * bfd-in2.h, bbfd.h: Regenerate.
5457
5458 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5459
5460 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5461 the dynamic link symbol actually in use.
5462
5463 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5464
5465 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5466
5467 2004-07-31 Joel Brobecker <brobecker@gnat.com>
5468 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5469
5470 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5471 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5472
5473 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5474 Nick Clifton <nickc@redhat.com>
5475
5476 PR 290
5477 * bfd.c (_bfd_default_error_handler): Make it global.
5478
5479 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5480
5481 * elf.c (assign_section_numbers): Cope gracefully with sections
5482 which have SHF_LINK_ORDER set but no sh_link set up.
5483 * elflink.c (elf_get_linked_section_vma): Likewise.
5484
5485 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5486 it to NULL.
5487
5488 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5489 Set it to _bfd_default_error_handler.
5490 (elfNN_bed): Add elf_backend_link_order_error_handler.
5491
5492 * libbfd-in.h (_bfd_default_error_handler): New.
5493
5494 * libbfd.h: Regenerated.
5495
5496 2004-07-30 Jakub Jelinek <jakub@redhat.com>
5497
5498 * archures.c (bfd_mach_sparc_64bit_p): Define.
5499 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5500 * bfd-in2.h: Rebuilt.
5501
5502 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
5503
5504 Introduce SH2a support.
5505 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5506 * archures.c (bfd_mach_sh2a_nofpu): New.
5507 * bfd-in2.h: Rebuilt.
5508 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5509 (arch_info_struct): Add sh2a_nofpu.
5510 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5511 2003-12-29 DJ Delorie <dj@redhat.com>
5512 * reloc.c: Add relocs for sh2a.
5513 * bfd-in2.h: Regenerate.
5514 * libbfd.hh: Regenerate.
5515 2003-12-01 Michael Snyder <msnyder@redhat.com>
5516 * archures.c (bfd_mach_sh2a): New.
5517 * bfd-in2.h: Rebuilt.
5518 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5519 (SH2A_NEXT): New.
5520 (arch_info_struct): Add sh2a.
5521 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5522
5523 2004-07-28 Nick Clifton <nickc@redhat.com>
5524 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5525
5526 PR 273
5527 * som.c (setup_sections): Improve estimation of space sizes in
5528 relocatable objects.
5529
5530 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5531 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5532 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5533 to targ_selvecs.
5534 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5535 * configure: Regenerate.
5536 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5537 case that accepts OSABI=NetBSD and OSABI=SysV.
5538 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5539 the base of .got or .data (if .got does not exist).
5540 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5541 set OSABI=NetBSD.
5542 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5543 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5544 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5545 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5546
5547 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5548
5549 PR 161/251
5550 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5551 (elf_sec_group): Defined.
5552 (bfd_elf_match_symbols_in_sections): New prototype.
5553 (_bfd_elf_setup_group_pointers): Likewise.
5554
5555 * elf.c (bfd_elf_discard_group): Abort.
5556 (bfd_elf_set_group_contents): Also include relocation sections.
5557 Remove zero-fill for ld -r.
5558 (_bfd_elf_setup_group_pointers): New function.
5559 (elf_sort_elf_symbol): Likewise.
5560 (elf_sym_name_compare): Likewise.
5561 (bfd_elf_match_symbols_in_sections): Likewise.
5562
5563 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5564
5565 * elflink.c (match_group_member): New.
5566 (elf_link_input_bfd): Check group member for discarded section.
5567 (try_match_symbols_in_sections): New function.
5568 (already_linked): Likewise.
5569 (_bfd_elf_section_already_linked): Support mixing comdat group
5570 and linkonce section.
5571
5572 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5573 * linker.c (bfd_section_already_linked_table_traverse): New.
5574
5575 * libbfd.h: Regenerated.
5576
5577 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5578
5579 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5580 BFD_RELOC_CRX_SWITCH32.
5581 * bfd-in2.h: Regenerate.
5582 * libbfd.h: Regenerate.
5583 * elf32-crx.c: Support relocation/relaxation of
5584 BFD_RELOC_CRX_SWITCH* types.
5585
5586 2004-07-27 Alan Modra <amodra@bigpond.net.au>
5587
5588 * elf64-ppc.c: Correct "Linker stubs" comment.
5589
5590 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5591
5592 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5593 linked-to section.
5594 (elf_linked_to_section): New.
5595
5596 * elf.c (assign_section_numbers): Set up sh_link for
5597 SHF_LINK_ORDER.
5598
5599 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5600 to sh_link for SHT_IA_64_UNWIND sections.
5601
5602 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5603
5604 * elflink.c (elf_fixup_link_order): Add _() to error message.
5605
5606 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5607
5608 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5609 an error if failed.
5610
5611 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5612
5613 * aout-adobe.c (aout_32_section_already_linked): Defined.
5614 * aout-target.h (MY_section_already_linked): Likewise.
5615 * aout-tic30.c (MY_section_already_linked): Likewise.
5616 * binary.c (binary_section_already_linked): Likewise.
5617 * bout.c (b_out_section_already_linked): Likewise.
5618 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5619 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5620 * coffcode.h (coff_section_already_linked): Likewise.
5621 * i386msdos.c (msdos_section_already_linked): Likewise.
5622 * i386os9k.c (os9k_section_already_linked): Likewise.
5623 * ieee.c (ieee_section_already_linked): Likewise.
5624 * ihex.c (ihex_section_already_linked): Likewise.
5625 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5626 * mmo.c (mmo_section_already_linked): Likewise.
5627 * nlm-target.h (nlm_section_already_linked): Likewise.
5628 * oasys.c (oasys_section_already_linked): Likewise.
5629 * pef.c (bfd_pef_section_already_linked): Likewise.
5630 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5631 * som.c (som_bfd_discard_group): Likewise.
5632 * srec.c (srec_section_already_linked): Likewise.
5633 * tekhex.c (tekhex_section_already_linked): Likewise.
5634 * versados.c (versados_section_already_linked): Likewise.
5635 * vms.c (vms_section_already_linked): Likewise.
5636 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5637 * xsym.c (bfd_sym_section_already_linked): Likewise.
5638
5639 * bfd-in.h (bfd_section_already_linked_table_init): New.
5640 (bfd_section_already_linked_table_free): Likewise.
5641
5642 * coff-rs6000.c (rs6000coff_vec): Add
5643 _bfd_generic_section_already_linked.
5644 (pmac_xcoff_vec): Likewise.
5645 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5646 (aix5coff64_vec): Likewise.
5647
5648 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5649 * elflink.c (_bfd_elf_section_already_linked): New function.
5650
5651 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5652
5653 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5654 (_bfd_generic_section_already_linked): New.
5655 (bfd_section_already_linked_hash_entry): Likewise.
5656 (bfd_section_already_linked): Likewise.
5657 (bfd_section_already_linked_table_lookup): Likewise.
5658 (bfd_section_already_linked_table_insert): Likewise.
5659
5660 * linker.c (bfd_section_already_linked): New.
5661 (_bfd_section_already_linked_table): Likewise.
5662 (bfd_section_already_linked_table_lookup): Likewise.
5663 (bfd_section_already_linked_table_insert): Likewise.
5664 (already_linked_newfunc): Likewise.
5665 (bfd_section_already_linked_table_init): Likewise.
5666 (bfd_section_already_linked_table_free): Likewise.
5667 (_bfd_generic_section_already_linked): Likewise.
5668
5669 * section.c (bfd_section): Remove comdat.
5670 (bfd_comdat_info): Moved to ...
5671 * bfd-in.h (coff_comdat_info): Here.
5672 (bfd_coff_get_comdat_section): New.
5673 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5674 * libcoff-in.h (coff_section_tdata): Add comdat.
5675 * coffcode.h (handle_COMDAT): Updated.
5676 * cofflink.c (coff_link_add_symbols): Likewise.
5677 * ecoff.c (bfd_debug_section): Likewise.
5678
5679 * targets.c (bfd_target): Add _section_already_linked.
5680 (BFD_JUMP_TABLE_LINK): Updated.
5681
5682 * bfd-in2.h: Regenerated.
5683 * libbfd.h: Likewise.
5684 * libcoff.h: Likewise.
5685
5686 2003-07-21 Paul Brook <paul@codesourcery.com>
5687
5688 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5689 elf_fixup_link_order): New functions.
5690 (bfd_elf_final_link): Call elf_fixup_link_order.
5691
5692 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
5693
5694 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5695 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5696 common definitions.
5697 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5698 _bfd_elf_symbol_refs_local_p.
5699 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5700 symbols.
5701
5702 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5703
5704 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5705 DYN_NO_NEEDED.
5706 (bfd_elf_get_dyn_lib_class): New prototype.
5707 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5708
5709 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5710 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5711 entry is needed. Issue an error if a DT_NEEDED entry is needed
5712 for a file marked DYN_NO_NEEDED.
5713 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5714 for DT_NEEDED tags.
5715
5716 * bfd-in2.h: Regenerated.
5717
5718 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5719
5720 * elflink.c (elf_section_complain_discarded): Don't complain in
5721 .PARISC.unwind.
5722
5723 2004-07-10 James E Wilson <wilson@specifixinc.com>
5724
5725 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5726 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5727 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5728 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5729 Fix callers.
5730 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5731 bfd_put_64 to bfd_putl64.
5732 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
5733
5734 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5735
5736 PR 240
5737 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5738 .init/.fini sections when trying to relax it.
5739
5740 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5741
5742 * elf.c (assign_file_positions_for_segments): Make sure the
5743 .dynamic section is the first section in the PT_DYNAMIC segment.
5744
5745 2004-07-09 Nick Clifton <nickc@redhat.com>
5746
5747 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5748 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5749 sh_elf_get_flags_from_mach functions so that they do not conflict
5750 when this target is built with other sh-elf targets.
5751 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5752 suppression of this function.
5753 (sh_elf_find_flags): Likewise.
5754
5755 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5756
5757 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5758 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5759 (BFD32_BACKENDS): Add elf32-crx.lo.
5760 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5761 (cpu-crx.lo): New target.
5762 (elf32-crx.lo): New target.
5763 * Makefile.in: Regenerate.
5764 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5765 (bfd_archures_list): Add bfd_crx_arch.
5766 * bfd-in2.h: Regenerate.
5767 * config.bfd: Handle crx-*-elf*, crx*.
5768 * configure.in: Handle bfd_elf32_crx_vec.
5769 * configure: Regenerate.
5770 * cpu-crx.c: New file.
5771 * elf32-crx.c: Likewise.
5772 * libbfd.h: Regenerate.
5773 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5774 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5775 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5776 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5777 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5778 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5779 * targets.c (bfd_elf32_crx_vec): Declare.
5780 (bfd_target_vector): Add bfd_elf32_crx_vec.
5781
5782 2004-07-06 Nick Clifton <nickc@redhat.com>
5783
5784 * config.bfd: Add sh-symbian-elf target.
5785 * configure.in: Add bfd_elf32_shl_symbian_vec.
5786 * configure: Regenerate.
5787 * elf-bfd.h (struct elf_backend_data): Add new field
5788 'check_directives'.
5789 * elflink.c (elf_link_add_object_symbols): Invoke the
5790 check_directives function, if defined.
5791 * elfxx-target.h: Provide a default, NULL definition for
5792 check_directives.
5793 * targets.c: Add bfd_elf32_shl_symbian_vec.
5794 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
5795 definition.
5796 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
5797 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
5798 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
5799 not already been defined.
5800 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5801 * sh-symbian.c: New file. Provide functions to support the
5802 * sh-symbian-elf target.
5803 * Makefile.am: Add elf32-sh-symbian.c
5804 * Makefile.in: Regenerate.
5805
5806 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5807
5808 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5809 * Makefile.am: Ran make dep-am.
5810 * Makefile.in: Ran make dep-in.
5811
5812 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5813
5814 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5815 externals properly.
5816
5817 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5818
5819 * config.bfd: Add want64 to configuration target s390-*-linux*.
5820
5821 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5822
5823 * bfd.c (bfd_get_section_ident): New.
5824
5825 * elflink.c (elf_link_read_relocs_from_section): Call
5826 bfd_get_section_ident to identify the section when reporting
5827 error.
5828 (_bfd_elf_link_output_relocs): Likewise.
5829 (elf_link_output_extsym): Likewise.
5830 (elf_link_input_bfd): Likewise.
5831 (bfd_elf_gc_record_vtinherit): Likewise.
5832
5833 * bfd-in2.h: Regenerated.
5834
5835 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5836 Nick Clifton <nickc@redhat.com>
5837
5838 PR 204
5839 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5840 of section symbols to mips_elf_sort_hash_table ().
5841
5842 2004-07-01 Alan Modra <amodra@bigpond.net.au>
5843
5844 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5845 change. Comment.
5846 (elf_section_complain_discarded): New function. Handle
5847 .gcc_except_table too.
5848 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5849 in discarded sections.
5850 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5851
5852 2004-06-30 James E Wilson <wilson@specifixinc.com>
5853
5854 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5855 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5856
5857 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5858
5859 PR 233
5860 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5861 local references to discarded sections and report their
5862 locations.
5863
5864 2004-06-30 Alan Modra <amodra@bigpond.net.au>
5865
5866 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5867 sec_info_type, test section name instead.
5868
5869 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5870
5871 PR 240
5872 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5873 in .init/.fini sections.
5874
5875 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5876
5877 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5878 bfd_get_section_limit.
5879
5880 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5881
5882 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5883 output section size.
5884
5885 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5886
5887 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5888 rawsize.
5889 (mmix_elf_perform_relocation): Adjust for above change.
5890 (mmix_elf_relocate_section): Likewise.
5891 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5892 (mmix_elf_get_section_contents): Delete.
5893 (bfd_elf64_get_section_contents): Delete.
5894 (mmix_elf_relocate_section): Zero stub area.
5895 * linker.c (default_indirect_link_order): Alloc max of section size
5896 and rawsize.
5897 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5898 * section.c (bfd_malloc_and_get_section): Likewise.
5899 (struct bfd_section): Update rawsize comment.
5900 * bfd-in2.h: Regenerate.
5901
5902 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5903
5904 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5905
5906 * bfd-in.h (bfd_get_section_limit): Define.
5907 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
5908 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5909 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5910 * coff-arm.c (coff_arm_relocate_section): Likewise.
5911 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5912 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5913 (bfd_ns32k_final_link_relocate): Likewise.
5914 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5915 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
5916 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
5917 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
5918 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
5919 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5920 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5921 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5922 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5923 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5924 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5925 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5926 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5927 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5928 * elf32-v850.c (v850_elf_reloc): Likewise.
5929 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5930 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5931 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5932 * elf64-mips.c (mips_elf64_gprel32_reloc)
5933 (mips16_gprel_reloc): Likewise.
5934 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5935 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5936 * elf64-sparc.c (init_insn_reloc): Likewise.
5937 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5938 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5939 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
5940 (_bfd_mips_elf_generic_reloc): Likewise.
5941 * bfd-in2.h: Regenerate.
5942
5943 2004-06-28 Alan Modra <amodra@bigpond.net.au>
5944
5945 * bfd-in.h (struct stab_info): Move from stabs.c.
5946 * stabs.c (struct stab_link_includes_table): Delete.
5947 (stab_link_includes_lookup): Delete.
5948 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5949 level of indirection from sinfo parm.
5950 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5951 stabstr section. Adjust hash table accesses.
5952 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5953 alloc. Adjust stab_info test.
5954 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5955 (_bfd_coff_final_link): Adjust stab_info test.
5956 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5957 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5958 in place.
5959 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5960 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5961 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5962 stabstr section. Adjust stab_info test.
5963 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5964 (_bfd_write_stab_strings): Adjust prototypes.
5965 * libbfd.h: Regenerate.
5966 * libcoff.h: Regenerate.
5967 * bfd-in2.h: Regenerate.
5968
5969 2004-06-27 Mark Kettenis <kettenis@gnu.org>
5970
5971 From Miod Vallat <miod@online.fr>:
5972 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5973
5974 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
5975
5976 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5977 (struct elf32_mn10300_link_hash_entry): Remove
5978 pcrel_relocs_copied.
5979 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5980 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5981 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5982 and gotoff relocations if the symbol doesn't bind locally. Use
5983 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5984 relocation for PCREL32.
5985 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5986 to test whether a symbol binds locally.
5987 (elf32_mn10300_link_hash_newfunc): Don't initialize
5988 pcrel_relocs_copied.
5989 (_bfd_mn10300_elf_discard_copies): Delete.
5990 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5991
5992 2004-06-26 Mark Kettenis <kettenis@gnu.org>
5993
5994 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5995
5996 2004-06-25 Joel Brobecker <brobecker@gnat.com>
5997
5998 * som.c (som_set_reloc_info): Correct small typo.
5999
6000 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6001
6002 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6003 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6004 (m32r_elf_gcsweep_hook): Likewise.
6005 (m32r_elf_check_relocs): Likewise.
6006 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6007 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6008 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6009 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6010 * bfd-in2.h: Regenerated.
6011 * libbfd.h: Regenerated.
6012
6013 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6014
6015 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6016 relocation symbol.
6017 (elf64_x86_64_relocate_section): Issue an error for
6018 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6019 against global symbols when building shared library.
6020
6021 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6022
6023 * section.c (struct sec): Rename "_cooked_size" to "size".
6024 Rename "_raw_size" to "rawsize".
6025 (STD_SECTION): Adjust comments.
6026 (bfd_set_section_size, bfd_get_section_contents): Use size.
6027 (bfd_malloc_and_get_section): New function.
6028 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6029 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6030 Correctly free reloc and contents memory.
6031 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6032 and fake CIE now that we can shink section size to zero.
6033 (_bfd_elf_write_section_eh_frame): Likewise..
6034 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6035 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6036 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6037 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6038 unneeded indirection.
6039 * elf.c (_bfd_elf_section_offset): .. and update call.
6040 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6041 * libbfd.h: Regenerate.
6042 * bfd-in2.h: Regenerate.
6043
6044 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6045 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6046 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6047 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6048 Similarly use "rawsize", if non-zero, in reloc functions to validate
6049 reloc addresses. Use new bfd_malloc_and_get_section in most places
6050 where bfd_get_section_contents was called. Expand all occurrences of
6051 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6052 grok_prstatus and similar functions to "size".
6053 * aix386-core.c (aix386_core_file_p): ..
6054 * aix5ppc-core.c (xcoff64_core_p): ..
6055 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6056 aout_adobe_set_section_contents): ..
6057 * aout-target.h (callback): ..
6058 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6059 MY_bfd_final_link): ..
6060 * aoutf1.h (sunos4_core_file_p): ..
6061 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6062 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6063 final_link, aout_link_input_section): ..
6064 * binary.c (binary_object_p, binary_canonicalize_symtab,
6065 binary_set_section_contents): ..
6066 * bout.c (b_out_callback, b_out_write_object_contents,
6067 b_out_set_section_contents, b_out_bfd_relax_section,
6068 b_out_bfd_get_relocated_section_contents): ..
6069 * cisco-core.c (cisco_core_file_validate): ..
6070 * coff-alpha.c (alpha_ecoff_object_p,
6071 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6072 * coff-arm.c (coff_arm_relocate_section,
6073 bfd_arm_allocate_interworking_sections): ..
6074 * coff-h8300.c (h8300_reloc16_extra_cases,
6075 h8300_bfd_link_add_symbols): ..
6076 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6077 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6078 ppc_bfd_coff_final_link): ..
6079 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6080 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6081 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6082 * coff64-rs6000.c (xcoff64_write_object_contents,
6083 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6084 * coffcode.h (coff_compute_section_file_positions,
6085 coff_write_object_contents): ..
6086 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6087 coff_section_symbol, build_debug_section): ..
6088 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6089 process_embedded_commands, _bfd_coff_link_input_bfd,
6090 _bfd_coff_write_global_sym): ..
6091 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6092 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6093 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6094 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6095 _bfd_dwarf2_find_nearest_line): ..
6096 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6097 ecoff_compute_section_file_positions,
6098 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6099 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6100 _bfd_elf_discard_section_eh_frame_hdr,
6101 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6102 _bfd_elf_write_section_eh_frame,
6103 _bfd_elf_write_section_eh_frame_hdr): ..
6104 * elf-hppa.h (elf_hppa_sort_unwind): ..
6105 * elf-m10200.c (mn10200_elf_relax_section,
6106 mn10200_elf_relax_delete_bytes,
6107 mn10200_elf_get_relocated_section_contents): ..
6108 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6109 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6110 mn10300_elf_relax_delete_bytes,
6111 mn10300_elf_get_relocated_section_contents,
6112 _bfd_mn10300_elf_adjust_dynamic_symbol,
6113 _bfd_mn10300_elf_discard_copies,
6114 _bfd_mn10300_elf_size_dynamic_sections,
6115 _bfd_mn10300_elf_finish_dynamic_sections): ..
6116 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6117 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6118 bfd_elf_set_group_contents, map_sections_to_segments,
6119 elf_sort_sections, assign_file_positions_for_segments,
6120 SECTION_SIZE, copy_private_bfd_data,
6121 _bfd_elf_get_dynamic_reloc_upper_bound,
6122 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6123 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6124 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6125 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6126 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6127 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6128 bfd_elf32_arm_process_before_allocation,
6129 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6130 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6131 elf32_arm_write_section): ..
6132 * elf32-cris.c (cris_elf_grok_prstatus,
6133 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6134 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6135 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6136 elf_cris_discard_excess_dso_dynamics,
6137 elf_cris_discard_excess_program_dynamics): ..
6138 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6139 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6140 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6141 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6142 elf32_frvfdpic_size_dynamic_sections,
6143 elf32_frvfdpic_modify_segment_map,
6144 elf32_frvfdpic_finish_dynamic_sections): ..
6145 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6146 elf32_h8_get_relocated_section_contents): ..
6147 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6148 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6149 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6150 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6151 elf32_hppa_finish_dynamic_sections): ..
6152 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6153 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6154 i370_elf_finish_dynamic_sections): ..
6155 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6156 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6157 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6158 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6159 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6160 * elf32-ip2k.c (ip2k_is_switch_table_128,
6161 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6162 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6163 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6164 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6165 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6166 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6167 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6168 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6169 m32r_elf_get_relocated_section_contents): ..
6170 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6171 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6172 m68hc11_elf_relax_delete_bytes): ..
6173 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6174 m68hc12_elf_size_one_stub): ..
6175 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6176 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6177 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6178 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6179 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6180 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6181 elf32_mips_grok_prstatus): ..
6182 * elf32-or32.c (or32_elf_consth_reloc): ..
6183 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6184 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6185 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6186 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6187 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6188 ppc_elf_final_write_processing): ..
6189 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6190 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6191 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6192 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6193 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6194 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6195 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6196 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6197 * elf32-sh64-com.c (sh64_address_in_cranges,
6198 sh64_get_contents_type): ..
6199 * elf32-sh64.c (sh64_find_section_for_address,
6200 sh64_elf_final_write_processing): ..
6201 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6202 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6203 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6204 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6205 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6206 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6207 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6208 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6209 elf_vax_finish_dynamic_sections): ..
6210 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6211 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6212 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6213 xstormy16_elf_finish_dynamic_sections): ..
6214 * elf32-xtensa.c (xtensa_read_table_entries,
6215 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6216 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6217 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6218 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6219 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6220 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6221 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6222 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6223 xtensa_callback_required_dependence): ..
6224 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6225 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6226 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6227 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6228 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6229 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6230 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6231 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6232 * elf64-hppa.c (allocate_dynrel_entries,
6233 elf64_hppa_size_dynamic_sections,
6234 elf64_hppa_finish_dynamic_sections): ..
6235 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6236 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6237 elf64_mips_grok_prstatus): ..
6238 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6239 mmix_elf_relocate_section, mmix_elf_final_link,
6240 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6241 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6242 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6243 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6244 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6245 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6246 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6247 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6248 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6249 ppc64_elf_finish_dynamic_sections): ..
6250 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6251 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6252 elf_s390_finish_dynamic_sections): ..
6253 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6254 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6255 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6256 sh64_elf64_finish_dynamic_sections): ..
6257 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6258 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6259 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6260 sparc64_elf_finish_dynamic_symbol,
6261 sparc64_elf_finish_dynamic_sections): ..
6262 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6263 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6264 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6265 elf64_x86_64_finish_dynamic_sections): ..
6266 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6267 * elfcode.h (elf_slurp_reloc_table): ..
6268 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6269 elf_finalize_dynstr, elf_link_add_object_symbols,
6270 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6271 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6272 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6273 elf32_mips_grok_prstatus): ..
6274 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6275 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6276 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6277 elfNN_ia64_finish_dynamic_sections): ..
6278 * elfxx-mips.c (mips_elf_create_procedure_table,
6279 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6280 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6281 mips_elf_global_got_index, mips_elf_multi_got,
6282 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6283 mips_elf_allocate_dynamic_relocations,
6284 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6285 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6286 _bfd_mips_elf_always_size_sections,
6287 _bfd_mips_elf_size_dynamic_sections,
6288 _bfd_mips_elf_finish_dynamic_symbol,
6289 _bfd_mips_elf_finish_dynamic_sections,
6290 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6291 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6292 _bfd_elf_mips_get_relocated_section_contents,
6293 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6294 * hp300hpux.c (callback): ..
6295 * hppabsd-core.c (make_bfd_asection): ..
6296 * hpux-core.c (make_bfd_asection): ..
6297 * i386linux.c (linux_link_create_dynamic_sections,
6298 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6299 * i386msdos.c (msdos_write_object_contents): ..
6300 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6301 os9k_set_section_contents): ..
6302 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6303 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6304 ieee_write_section_part, do_with_relocs, do_as_repeat,
6305 do_without_relocs, ieee_write_debug_part, init_for_output,
6306 ieee_set_section_contents): ..
6307 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6308 * irix-core.c (do_sections, make_bfd_asection): ..
6309 * libaout.h (aout_section_merge_with_text_p): ..
6310 * libbfd.c (_bfd_generic_get_section_contents,
6311 _bfd_generic_get_section_contents_in_window): ..
6312 * linker.c (default_indirect_link_order): ..
6313 * lynx-core.c (make_bfd_asection): ..
6314 * m68klinux.c (linux_link_create_dynamic_sections,
6315 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6316 * mach-o.c (bfd_mach_o_make_bfd_section,
6317 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6318 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6319 bfd_mach_o_scan_read_segment): ..
6320 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6321 _bfd_merge_sections): ..
6322 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6323 mmo_map_set_sizes, mmo_canonicalize_symtab,
6324 mmo_internal_write_section, mmo_write_object_contents): ..
6325 * netbsd-core.c (netbsd_core_file_p): ..
6326 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6327 nlm_alpha_set_public_section): ..
6328 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6329 * nlm32-sparc.c (nlm_sparc_write_import): ..
6330 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6331 nlm_compute_section_file_positions): ..
6332 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6333 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6334 * opncls.c (get_debug_link_info): ..
6335 * osf-core.c (make_bfd_asection): ..
6336 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6337 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6338 final_link, aout_link_input_section): ..
6339 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6340 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6341 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6342 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6343 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6344 * ptrace-core.c (ptrace_unix_core_file_p): ..
6345 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6346 _bfd_final_link_relocate, bfd_generic_relax_section,
6347 bfd_generic_get_relocated_section_contents): ..
6348 * reloc16.c (bfd_coff_reloc16_relax_section,
6349 bfd_coff_reloc16_get_relocated_section_c): ..
6350 * riscix.c (riscix_some_aout_object_p): ..
6351 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6352 * sco5-core.c (make_bfd_asection): ..
6353 * simple.c (bfd_simple_get_relocated_section_contents): ..
6354 * som.c (som_object_setup, setup_sections, som_prep_headers,
6355 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6356 som_set_reloc_info, som_get_section_contents,
6357 som_bfd_link_split_section): ..
6358 * sparclinux.c (linux_link_create_dynamic_sections,
6359 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6360 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6361 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6362 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6363 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6364 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6365 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6366 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6367 sunos_finish_dynamic_link): ..
6368 * syms.c (_bfd_stab_section_find_nearest_line): ..
6369 * tekhex.c (first_phase, tekhex_set_section_contents,
6370 tekhex_write_object_contents): ..
6371 * trad-core.c (trad_unix_core_file_p): ..
6372 * versados.c (process_esd, process_otr, process_otr): ..
6373 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6374 * vms-misc.c (add_new_contents): ..
6375 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6376 * vms.c (vms_set_section_contents): ..
6377 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6378 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6379 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6380 * xsym.c (bfd_sym_scan): .. See above.
6381
6382 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6383
6384 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6385 calling _bfd_merged_section_offset only for section symbols.
6386
6387 2004-06-22 Alan Modra <amodra@bigpond.net.au>
6388
6389 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6390 for handling SEC_MERGE symbols in relax_section.
6391
6392 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6393
6394 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6395 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6396 linked together. Mark the result as h8300sx code.
6397
6398 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6399
6400 * elf-bfd.h (struct elf_backend_data): Added
6401 elf_backend_omit_section_dynsym.
6402 (_bfd_elf_link_omit_section_dynsym): Declare.
6403 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6404 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6405 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6406 (_bfd_elf_link_renumber_dynsyms): ... this function.
6407 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6408 _bfd_elf_link_omit_section_dynsym).
6409 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6410
6411 2004-06-21 Nick Clifton <nickc@redhat.com>
6412
6413 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6414 flags.
6415
6416 2004-06-17 Jerome Guitton <guitton@gnat.com>
6417
6418 * bfd-in.h (bfd_cache_close_all): New function declaration.
6419 * bfd-in2.h: Regenerate.
6420 * cache.c (bfd_cache_close_all): New function definition.
6421
6422 2004-06-16 Mark Kettenis <kettenis@gnu.org>
6423
6424 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6425 4.10 and beyond.
6426 * configure: Regenerate.
6427
6428 2004-06-16 Daniel Jacobowitz <dan@debian.org>
6429
6430 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6431 the pre-existing section.
6432
6433 2004-06-15 Alan Modra <amodra@bigpond.net.au>
6434
6435 * section.c (struct sec): Remove usused flags. Reorganize a little.
6436 (bfd_get_section_size_before_reloc): Delete.
6437 (bfd_get_section_size_after_reloc): Delete.
6438 (STD_SECTION): Update.
6439 (bfd_get_section_size_now): Delete.
6440 (bfd_set_section_contents): Don't referece reloc_done.
6441 (bfd_get_section_contents): Remove reloc_done comment.
6442 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6443 reloc_done.
6444 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6445 * ecoff.c (bfd_debug_section): Update initializer.
6446 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6447 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6448 * bfd-in.h (bfd_section_size): Expand.
6449 (bfd_get_section_size): New macro.
6450 * bfd-in2.h: Regenerate.
6451 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6452 bfd_get_section_size_before_reloc with bfd_get_section_size.
6453 * coffcode.h (coff_write_object_contents): Likewise.
6454 * coffgen.c (build_debug_section): Likewise.
6455 * dwarf1.c (parse_line_table): Likewise.
6456 (_bfd_dwarf1_find_nearest_line): Likewise.
6457 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6458 * i386msdos.c (msdos_write_object_contents): Likewise.
6459 * pdp11.c (squirt_out_relocs): Likewise.
6460 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6461 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6462
6463 2004-06-14 Chris Demetriou <cgd@broadcom.com>
6464
6465 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6466 removal) with updated comment.
6467 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6468 BFD_RELOC_32_PCREL.
6469 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6470 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6471
6472 2004-06-12 Alan Modra <amodra@bigpond.net.au>
6473
6474 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6475 overflow on branches to undefweaks.
6476
6477 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6478
6479 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6480 as ecoff_section_data() does not return a valid lvalue.
6481
6482 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
6483
6484 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6485 (elf_link_add_object_symbols): Likewise.
6486
6487 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6488 (elf_backend_reloc_type_class): New.
6489
6490 2004-06-08 Mark Kettenis <kettenis@gnu.org>
6491
6492 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6493 netbsd-core.lo.
6494 * configure: Regenerate.
6495
6496 2004-06-07 Daniel Jacobowitz <dan@debian.org>
6497
6498 From: Albert Chin-A-Young <china@thewrittenword.com>
6499 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6500 to unsigned int.
6501
6502 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6503
6504 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6505 change.
6506
6507 2004-05-28 DJ Delorie <dj@redhat.com>
6508
6509 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6510 for linking, but otherwise adjust reloc for merged sections.
6511
6512 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6513
6514 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6515 _bfd_merged_section_offset for local symbols.
6516
6517 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6518
6519 * Makefile.am: Regenerate dependencies.
6520 * Makefile.in: Regenerate.
6521 * archures.c: Add bfd_mach_sh3_nommu .
6522 * bfd-in2.h: Regenerate.
6523 * cpu-sh.c: Add sh3-nommu architecture.
6524 (bfd_to_arch_table): Create new table.
6525 (sh_get_arch_from_bfd_mach): Create new function.
6526 (sh_get_arch_up_from_bfd_mach): Create new function.
6527 (sh_merge_bfd_arch): Create new function.
6528 * elf32-sh.c (sh_ef_bfd_table): Add table.
6529 (sh_elf_check_relocs): Replace switch statement with
6530 use of sh_ef_bfd_table .
6531 (sh_elf_get_flags_from_mach): Add new function.
6532 (sh_find_elf_flags): Likewise.
6533 (sh_elf_copy_private_data): Replace most of non-elf contents
6534 with a call to sh_merge_bfd_arch() .
6535
6536 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6537
6538 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6539 * Makefile.in: Regenerate.
6540
6541 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6542
6543 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6544 custom calling conventions for dynamic symbols.
6545 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6546 symbol if it's an alias to a global one.
6547
6548 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6549
6550 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6551 change.
6552
6553 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6554
6555 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6556 loop over hashes.
6557
6558 2004-05-26 Alan Modra <amodra@bigpond.net.au>
6559
6560 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6561 for SHT_GROUP sections.
6562
6563 2004-05-25 Alan Modra <amodra@bigpond.net.au>
6564
6565 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6566 section data here..
6567 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6568 * merge.c: Formatting. Remove unnecessary casts. Expand
6569 bfd_get_section_alignment macro.
6570 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6571 use throughout file.
6572 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6573 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6574 section name to determine sinfo group, instead test output section
6575 and alignment.
6576 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6577 _bfd_strip_section_from_output rather than just twiddling flags.
6578 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6579 (_bfd_merge_sections): Update prototype.
6580 * libbfd.h: Regenerate.
6581
6582 2004-05-24 Mark Kettenis <kettenis@gnu.org>
6583
6584 * netbsd-core.c: Correctly indent section that sets architecture
6585 from machine ID.
6586
6587 From Miod Vallat <miod@online.fr>:
6588 * m88kopenbsd.c: New file.
6589 * targets.c (m88k_openbsd_vec): New.
6590 * config.bfd: Add m88k-*-openbsd*.
6591 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6592 (m88kopenbsd_vec): New.
6593 * configure: Regenerate.
6594 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6595 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6596 Run "make dep-am".
6597 * Makefile.in: Regenerate.
6598 * po/SRC-POTFILES.in: Regenerate.
6599
6600 2004-05-24 Nick Clifton <nickc@redhat.com>
6601
6602 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6603 introduced by hash table size patch.
6604
6605 2004-05-22 Ben Elliston <bje@au.ibm.com>
6606
6607 * configure.in (is_release): Remove.
6608 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6609 (AC_OUTPUT): Don't output bfdver.h from version.h.
6610 * configure: Regenerate.
6611 * Makefile.am (RELEASE): New variable.
6612 (bfdver.h): New target.
6613 * Makefile.in: Regenerate.
6614 * doc/Makefile.in: Likewise.
6615
6616 2004-05-22 Ben Elliston <bje@au.ibm.com>
6617
6618 * Makefile.am (config.status): Don't depend on version.h.
6619 * Makefile.in: Regenerate.
6620
6621 2004-05-22 Alan Modra <amodra@bigpond.net.au>
6622
6623 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6624 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6625 * libbfd.h: Regenerate.
6626 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6627 (_bfd_elf_rel_local_sym): Likewise.
6628 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6629 (elf_link_input_bfd): Likewise.
6630 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6631 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6632 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6633 (elfNN_ia64_relocate_section): Likewise.
6634
6635 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
6636
6637 * hash.c (bfd_default_hash_table_size): New variable.
6638 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6639 (bfd_hash_set_default_size): New function. Set the default size
6640 to a selected prime number close to the argument. Document new
6641 function.
6642 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6643 * bfd-in2.h: Regenerate.
6644 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6645 * Makefile.in: Regenerate.
6646
6647 2004-05-21 Mark Kettenis <kettenis@gnu.org>
6648
6649 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6650 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6651 arm, m68k, m88k and hppa core files.
6652
6653 2004-05-21 Nick Clifton <nickc@redhat.com>
6654
6655 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6656 (bfd_bwrite): Likewise.
6657 (bfd_tell): Likewise.
6658 (bfd_flush): Likewise.
6659 (bfd_stat): Likewise.
6660 (bfd_seek): Likewise.
6661 (bfd_get_mtime): Likewise.
6662 (bfd_get_size): Likewise.
6663
6664 2004-05-19 Ben Elliston <bje@au.ibm.com>
6665
6666 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6667
6668 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6669
6670 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6671 (bfd_generic_openr_next_archived_file): Likewise.
6672
6673 2004-05-17 Bob Wilson <bob.wilson@acm.org>
6674
6675 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6676 section names by inserting a new substring after .gnu.linkonce, except
6677 for .gnu.linkonce.t.* where the "t." is replaced.
6678
6679 2004-05-17 Adam Nemet <anemet@lnxw.com>
6680
6681 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6682 (m68-*-lynxos* case): Likewise.
6683 (powerpc-*-lyxnos* case): New case.
6684 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6685
6686 2004-05-17 David Heine <dlheine@tensilica.com>
6687
6688 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6689 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6690 * bfd.c (bfd_copy_private_header_data): Define.
6691 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6692 interface.
6693 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6694 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6695 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6696 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6697 segments by calling copy_private_bfd_data.
6698 (_bfd_elf_copy_private_header_data): Define.
6699 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6700 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6701 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6702 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6703 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6704 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6705 * som.c (som_bfd_copy_private_header_data): Define.
6706 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6707 * vms.c (vms_bfd_copy_private_header_data): Define.
6708 * bfd-in2.h: Regenerate.
6709 * libbfd.h: Regenerate.
6710
6711 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6712
6713 * elfxx-mips.c (MINUS_TWO): Define.
6714 (mips_elf_higher, mips_elf_highest,
6715 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6716 some bfd_vma values.
6717 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6718
6719 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6720
6721 * som.c (log2): Rename to exact_log2. Adjust all callers.
6722
6723 2004-05-13 Paul Brook <paul@codesourcery.com>
6724
6725 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
6726 dwarf3 format CIE entries. Remove comment about the size of the
6727 ra_column field. It is now correctly deduced.
6728
6729 2004-05-13 Joel Sherrill <joel@oarcorp.com>
6730
6731 * config.bfd (or32-*-rtems*): Switch to elf.
6732
6733 2004-05-13 Nick Clifton <nickc@redhat.com>
6734
6735 * po/fr.po: Updated French translation.
6736
6737 2004-05-11 Jakub Jelinek <jakub@redhat.com>
6738
6739 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
6740 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6741 Adjust counting of last_local.
6742 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6743 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6744 created by the linker nor !SHF_ALLOC.
6745
6746 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6747 DT_PLTGOT to the start of the .got.plt section instead of the
6748 .got output section. Set sh_entsize for .got section in addition
6749 to .got.plt.
6750 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6751 is at sgot->output_section->vma.
6752 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6753 DT_PLTGOT to the start of the .got.plt section instead of the
6754 .got output section.
6755 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6756 is at sgot->output_section->vma. Set sh_entsize for .got section
6757 in addition to .got.plt.
6758 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6759 (bfd_section_from_phdr): Likewise.
6760 (map_sections_to_segments): Likewise.
6761 (assign_file_positions_for_segments): Likewise.
6762 (get_program_header_size): Likewise.
6763 * elflink.c (bfd_elf_size_dynamic_sections): Set
6764 elf_tdata (output_bfd)->relro from info->relro.
6765 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6766
6767 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
6768
6769 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6770 a zero symndx for which we hadn't accounted a dynamic relocation.
6771 (_frvfdpic_add_rofixup): Likewise.
6772
6773 2004-05-07 Brian Ford <ford@vss.fsi.com>
6774 DJ Delorie <dj@redhat.com>
6775
6776 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6777 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6778 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6779 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6780
6781 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
6782
6783 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6784 immediately if there's no link info.
6785 (elf32_frvfdpic_copy_private_bfd_data): New.
6786 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6787
6788 2004-05-06 Zack Weinberg <zack@codesourcery.com>
6789
6790 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6791 filename argument is null; do not call strlen on a null pointer.
6792
6793 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
6794
6795 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6796 special case.
6797
6798 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
6799
6800 * configure.in (bfd_elf32_frvfdpic_vec): New.
6801 * configure: Rebuilt.
6802 * targets.c (bfd_elf32_frvfdpic_vec): New.
6803 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6804 on the latter.
6805 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6806 frvfdpic instead of frv. Rearrange elf-target macros such that
6807 the FDPIC-specific ones are only defined for this new target
6808 vector.
6809 (bfd_elf32_frvfdpic_vec): Declare.
6810 (IS_FDPIC): New.
6811 (elf32_frv_relocate_section): Use it to enable segment checking
6812 and to control rofixup emission. Add output section vma to
6813 applied relocation in non-LOAD non-ALLOC sections. Use
6814 _bfd_error_handler for errors.
6815 (_frv_create_got_section): Create .rel.got and .rofixup only in
6816 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6817 linker script.
6818 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6819 (elf32_frvfdpic_modify_segment_map): Likewise.
6820 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6821 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6822 error message if we miscompute the rofixup size.
6823 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6824 (frvfdpic_elf_encode_eh_address): Likewise.
6825 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6826 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6827 relocs. Reject unknown relocation types.
6828 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6829 (frv_elf_merge_private_bfd_data): Likewise.
6830 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6831 0x4000 for newly-added elf32-frvfdpic.
6832
6833 2004-05-05 Nick Clifton <nickc@redhat.com>
6834
6835 PR/136
6836 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6837 returning NULL as most users of this function do not check its
6838 return value.
6839 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6840 of bfd_cache_lookup().
6841 * sco5-core.c (sco5_core_file_p): Likewise.
6842 * trad-core.c (trad_unix_core_file_p): Likewise.
6843
6844 2004-05-05 Nick Clifton <nickc@redhat.com>
6845
6846 * cache.c (bfd_cache_lookup): Improve formatting.
6847 * archive.c: Fix formatting.
6848
6849 2004-05-05 Peter Barada <peter@the-baradas.com>
6850
6851 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6852 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6853 * bfd-in2.h(bfd_architecture): Regenerate.
6854
6855 2004-05-03 Alan Modra <amodra@bigpond.net.au>
6856
6857 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6858 SEC_MERGE sections.
6859 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6860 those against discarded link-once and SEC_MERGE section symbols.
6861
6862 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6863
6864 * section.c (bfd_get_section_by_name_if): New.
6865 * bfd-in2.h: Regenerated.
6866
6867 2004-05-02 Alan Modra <amodra@bigpond.net.au>
6868
6869 * som.c (som_bfd_is_group_section): Define.
6870
6871 2004-05-01 Alan Modra <amodra@bigpond.net.au>
6872
6873 * section.c (bfd_make_section_anyway): Copy the whole
6874 bfd_hash_entry, not just "next" from existing entry.
6875
6876 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6877
6878 * elf.c (bfd_section_from_shdr): Maintain the section order in
6879 a section group.
6880 (special_sections): Add ".note.GNU-stack".
6881 (elf_fake_sections): Handle section group for relocatable
6882 link..
6883
6884 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6885
6886 * section.c (bfd_sections_find_if): New.
6887 * bfd-in2.h: Regenerated.
6888
6889 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6890
6891 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6892
6893 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6894 * elf.c (bfd_elf_is_group_section): New function.
6895 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6896 * section.c (bfd_generic_is_group_section): New function.
6897 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6898 (BFD_JUMP_TABLE_LINK): Adjust.
6899 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6900 * aout-target.h (MY_bfd_is_group_section): Define.
6901 * aout-tic30.c (MY_bfd_is_group_section): Define.
6902 * bfd.c (bfd_is_group_section): Define.
6903 * binary.c (binary_bfd_is_group_section): Define.
6904 * bout.c (b_out_bfd_is_group_section): Define.
6905 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6906 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6907 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6908 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6909 * coffcode.h (coff_bfd_is_group_section): Define.
6910 * i386msdos.c (msdos_bfd_is_group_section): Define.
6911 * i386os9k.c (os9k_bfd_is_group_section): Define.
6912 * ieee.c (ieee_bfd_is_group_section): Define.
6913 * ihex.c (ihex_bfd_is_group_section): Define.
6914 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6915 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6916 * mmo.c (mmo_bfd_is_group_section): Define.
6917 * nlm-target.h (nlm_bfd_is_group_section): Define.
6918 * oasys.c (oasys_bfd_is_group_section): Define.
6919 * pef.c (bfd_pef_bfd_is_group_section): Define.
6920 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6921 * srec.c (srec_bfd_is_group_section): Define.
6922 * tekhex.c (tekhex_bfd_is_group_section): Define.
6923 * versados.c (versados_bfd_is_group_section): Define.
6924 * vms.c (vms_bfd_is_group_section): Define.
6925 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6926 * bfd-in2.h: Regenerate.
6927 * libbfd.h: Regenerate.
6928
6929 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6930
6931 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6932
6933 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
6934
6935 * configure.in: Update version to 2.15.91.
6936 * configure: Regenerate.
6937
6938 2004-04-29 Brian Ford <ford@vss.fsi.com>
6939
6940 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6941 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6942 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6943 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6944 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6945 .gnu.linkonce.wi. sections.
6946 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6947 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6948 .gnu.linkonce.wi..
6949 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6950 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6951
6952 2004-04-28 Chris Demetriou <cgd@broadcom.com>
6953
6954 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6955 * bfd-in2.h: Regenerate.
6956 * libbfd.h: Likewise.
6957
6958 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6959
6960 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6961 dup_common fields.
6962 (setup_sections): Use som_subspace_dictionary_record struct instead
6963 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6964 is_comdat, is_common or dup_common.
6965 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6966 is_comdat, is_common and dup_common in section subspace_dict from
6967 copy_data.
6968 (som_begin_writing): Use som_subspace_dictionary_record struct.
6969 (som_finish_writing): Likewise.
6970 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6971 is_common and dup_common flags in info for symbol. Add comment
6972 regarding linker support for these fields. Slightly reorganize
6973 function.
6974 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6975 dup_common fields in symbol table from symbol info.
6976 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6977 arguments. Set corresponding fields in copy_data. Change all callers.
6978 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6979 symbol table.
6980 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6981 * som.h (som_subspace_dictionary_record): Define.
6982 (som_copyable_section_data_struct): Add is_comdat, is_common and
6983 dup_common fields.
6984 (som_section_data_struct): Use som_subspace_dictionary_record struct
6985 instead of subspace_dictionary_record.
6986 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6987
6988 2004-04-27 Bob Wilson <bob.wilson@acm.org>
6989
6990 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6991 if set. Check reloc_done flag before applying relocations. Use
6992 output addresses, both when applying relocations and when comparing
6993 against the specified section.
6994 (elf_xtensa_relocate_section): Use output address to check if dynamic
6995 reloc is in a literal pool. Set section's reloc_done flag.
6996
6997 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6998
6999 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7000 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7001 section.
7002 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7003 section.
7004
7005 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7006
7007 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7008 structure field removed in 2004-04-24 patch.
7009 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7010
7011 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7012 Constify hdr arg.
7013 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7014 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7015 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7016 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7017 field before calling elf_backend_section_flags.
7018
7019 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7020
7021 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7022 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7023 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7024 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7025 and BFD_RELOC_32_PCREL.
7026 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7027 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7028 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7029 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7030 (mips_elf_next_relocation): Move comment about matching HI/LO
7031 relocations to...
7032 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7033 R_MIPS_GNU_REL_HI16.
7034
7035 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7036
7037 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7038 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7039 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7040 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7041 and update comments to reflect current usage.
7042 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7043 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7044 for MIPS_R_PCREL16.
7045 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7046 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7047 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7048 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7049 type number to be MIPS_R_PCREL16.
7050 (mips_relocate_section): Remove support for link-time relaxation
7051 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7052 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7053 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7054 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7055 relaxation of branches used by embedded-PIC.
7056 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7057 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7058 related members, update comment.
7059 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7060 code related to embedded-PIC.
7061 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7062 initialization of now-removed 'adjust' member of
7063 'struct ecoff_debug_info'.
7064
7065 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7066
7067 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7068
7069 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7070
7071 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7072 relocs for locally defined symbols during -shared final link.
7073 (elf32_arm_final_link_relocate): Likewise.
7074
7075 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7076
7077 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7078 ELF_LINK_POINTER_EQUALITY_NEEDED.
7079 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7080 if r_type is not R_X86_64_PC32.
7081 (elf64_x86_64_finish_dynamic_symbol): If
7082 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7083 SHN_UNDEF symbols.
7084
7085 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7086
7087 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7088 (elf_backend_plt_sym_val): Define.
7089
7090 2004-04-22 Andrew Cagney <cagney@redhat.com>
7091
7092 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7093
7094 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7095
7096 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7097 make_bfd_asection.
7098 * som.c (som_set_section_contents): Constantify second argument.
7099 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7100 (som_object_setup): Rework to avoid warning.
7101 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7102 Likewise.
7103
7104 2004-04-22 Andrew Cagney <cagney@redhat.com>
7105
7106 * cache.c (bfd_cache_close): Check for a previously closed file.
7107
7108 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7109
7110 * bfd.c (bfd_get_synthetic_symtab): Define.
7111 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7112 NAME##_get_synthetic_symtab.
7113 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7114 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7115 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7116 relplt_name fields.
7117 (_bfd_elf_get_synthetic_symtab): New prototype.
7118 * elfcode.h (elf_get_synthetic_symtab): Define.
7119 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7120 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7121 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7122 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7123 * bfd-in2.h: Rebuilt.
7124 * libbfd.h: Rebuilt.
7125 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7126 (elf_backend_plt_sym_val): Define.
7127 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7128 (elf_backend_plt_sym_val): Define.
7129 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7130 (elf_backend_plt_sym_val): Define.
7131 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7132 (elf_backend_plt_sym_val): Define.
7133 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7134 (elf_backend_plt_sym_val): Define.
7135 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7136 (elf_backend_plt_sym_val): Define.
7137 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7138 (elf_backend_plt_sym_val): Define.
7139 * aout-target.h (MY_get_synthetic_symtab): Define.
7140 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7141 * coff-rs6000.c (rs6000coff_vec): Add
7142 _bfd_nodynamic_get_synthetic_symtab.
7143 (pmac_xcoff_vec): Likewise.
7144 * coff64-rs6000.c (rs6000coff64_vec): Add
7145 _bfd_nodynamic_get_synthetic_symtab.
7146 (aix5coff64_vec): Likewise.
7147 * sunos.c (MY_get_synthetic_symtab): Define.
7148 * vms.c (vms_get_synthetic_symtab): Define.
7149
7150 2004-04-22 Nick Clifton <nickc@redhat.com>
7151
7152 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7153
7154 2004-04-22 Peter Barada <peter@the-baradas.com>
7155
7156 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7157 * bfd2-in.h: Regenerate.
7158 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7159
7160 2004-04-21 Chris Demetriou <cgd@broadcom.com>
7161
7162 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7163 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7164 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7165 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7166 * bfd-in2.h: Regenerate.
7167
7168 2004-04-21 Bob Wilson <bob.wilson@acm.org>
7169
7170 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7171 require relocations against a weak symbol to reference the same
7172 symbol hash entry if not a final, static link.
7173 (get_cached_value, add_value_map): Add final_static_link argument.
7174 (remove_literals): Pass final_static_link argument as needed.
7175
7176 2004-04-21 Andrew Cagney <cagney@redhat.com>
7177
7178 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7179 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7180 (opncls_bwrite, opncls_bclose, opncls_bflush)
7181 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7182 bfd iovec that uses function callbacks.
7183 (bfd_close): Use the iovec's bclose.
7184 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7185 (cache_bclose, cache_bflush, cache_bstat)
7186 (cache_iovec): New functions and global variable, implement a
7187 cache "iovec", where applicable set bfd_error.
7188 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7189 * bfdio.c (struct bfd_iovec): Define.
7190 (real_read): Delete function.
7191 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7192 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7193 assume that bread and bwrite set bfd_error.
7194 * bfd.c (struct bfd): Add "iovec", update comments.
7195 * bfd-in2.h, libbfd.h: Re-generate.
7196
7197 2004-04-21 Andrew Cagney <cagney@redhat.com>
7198
7199 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7200
7201 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7202
7203 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7204 (bfd_elf_gc_sections): Fail if a shared object is being created.
7205 Do not fail if dynamic sections have been created. Instead call
7206 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7207 dynamically referenced symbols. Do not mark the whole graph
7208 rooted at .eh_frame, only the section proper.
7209
7210 2004-04-20 DJ Delorie <dj@redhat.com>
7211
7212 * reloc.c: Add BFD_RELOC_32_SECREL.
7213 * bfd-in2.h: Regenerate.
7214 * libbfd.h: Likewise.
7215 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7216 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7217 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7218
7219 2004-04-19 Jakub Jelinek <jakub@redhat.com>
7220
7221 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7222 relocs against hidden/protected undefweak symbols properly.
7223 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7224
7225 2004-04-18 Mark Kettenis <kettenis@gnu.org>
7226
7227 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7228 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7229 core files.
7230
7231 2004-04-17 Brian Ford <ford@vss.fsi.com>
7232
7233 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7234 filepos for the SizeOfHeaders field.
7235 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7236 overflow.
7237 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7238
7239 2004-04-16 Alan Modra <amodra@bigpond.net.au>
7240
7241 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7242 change reloc_done. Set and restore _cooked_size.
7243 (RETURN): Delete.
7244
7245 2004-04-15 Mark Kettenis <kettenis@gnu.org>
7246
7247 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7248 core files.
7249
7250 2004-04-15 Nick Clifton <nickc@redhat.com>
7251
7252 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7253
7254 2004-04-15 Alan Modra <amodra@bigpond.net.au>
7255
7256 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7257
7258 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7259
7260 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7261 when it is a definition.
7262
7263 2004-04-14 Alan Modra <amodra@bigpond.net.au>
7264
7265 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7266 when statically linking PIC code.
7267 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7268
7269 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7270
7271 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7272 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7273 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7274 * configure: Regenerate.
7275
7276 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
7277
7278 * elflink.c: Include libiberty.h.
7279 * Makefile.am (elflink.lo): Depend on libiberty.h.
7280 * Makefile.in: Regenerate.
7281
7282 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
7283
7284 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7285 ".MIPS.stubs".
7286
7287 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7288
7289 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7290 reserve the memory for dynamic linker
7291
7292 2004-04-05 Mark Kettenis <kettenis@gnu.org>
7293
7294 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7295 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7296
7297 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7298
7299 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7300 RELOC_FOR_GLOBAL_SYMBOL.
7301 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7302
7303 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7304
7305 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7306 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7307
7308 2004-04-01 Paul Brook <paul@codesourcery.com>
7309
7310 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7311 * elf32-arm.h (struct elf32_elf_section_map): New.
7312 (struct _arm_elf_section_data): New.
7313 (elf32_arm_section_data): Define.
7314 (struct elf32_arm_link_hash_table): Add byteswap_code.
7315 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7316 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7317 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7318 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7319 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7320 (bfd_elf32_new_section_hook, elf_backend_write_section,
7321 elf_backend_link_output_symbol_hook): Define.
7322
7323 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
7324
7325 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7326 that keeps the characters in a B_INCL..B_EINCL range.
7327 (_bfd_link_section_stabs): When computing the sum of the
7328 characters in a B_INCL..B_EINCL range also keep a copy of those
7329 characters. Use this information to distinguish between
7330 include sections that have the same sum and the same length
7331 but which are nevertheless unique.
7332
7333 2004-03-31 Paul Brook <paul@codesourcery.com>
7334
7335 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7336 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7337
7338 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
7339
7340 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7341 to 'sum_chars' and add field 'num_chars'.
7342 (_bfd_link_section_stabs): When computing the sum of the
7343 characters in a B_INCL..B_EINCL range also keep a count of the
7344 number of characters. Use this information to help distinguish
7345 between include sections when have the same sum but which
7346 nevertheless are still unique.
7347
7348 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
7349
7350 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7351
7352 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
7353 Tomer Levi <Tomer.Levi@nsc.com>
7354
7355 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7356 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7357 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7358 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7359 (cpu-cr16c.lo): New target.
7360 (elf32-cr16c.lo): Likewise.
7361 * Makefile.in: Regenerate.
7362 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7363 (bfd_archures_list): Add bfd_cr16c_arch.
7364 * config.bfd: Handle cr16c-*-elf*.
7365 * configure.in: Handle bfd_elf32_cr16c_vec.
7366 * configure: Regenerate.
7367 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7368 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7369 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7370 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7371 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7372 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7373 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7374 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7375 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7376 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7377 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7378 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7379 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7380 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7381 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7382 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7383 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7384 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7385 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7386 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7387 * targets.c (bfd_elf32_cr16c_vec): Declare.
7388 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7389 * cpu-cr16c.c: New file.
7390 * elf32-cr16c.c: Likewise.
7391 * libbfd.h: Regenerate.
7392 * bfd-in2.h: Likewise.
7393
7394 2004-03-30 Jakub Jelinek <jakub@redhat.com>
7395
7396 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7397
7398 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7399
7400 * Makefile.am: Remove all mention of elflink.h.
7401 * Makefile.in: Regenerate.
7402 * bfd-in.h (bfd_elf_discard_info): Declare.
7403 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7404 * bfd-in2.h: Regenerate.
7405 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7406 bfd_elf32_link_record_dynamic_symbol,
7407 bfd_elf64_link_record_dynamic_symbol,
7408 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7409 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7410 _bfd_elf32_link_record_local_dynamic_symbol,
7411 _bfd_elf64_link_record_local_dynamic_symbol,
7412 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7413 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7414 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7415 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7416 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7417 _bfd_elf32_reloc_symbol_deleted_p,
7418 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7419 (bfd_elf_link_record_dynamic_symbol,
7420 bfd_elf_link_record_local_dynamic_symbol,
7421 bfd_elf_final_link, bfd_elf_gc_sections,
7422 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7423 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7424 bfd_elf_reloc_symbol_deleted_p): Declare.
7425 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7426 * elf32-arm.h: Update for changed function names. Remove local
7427 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7428 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7429 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7430 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7431 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7432 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7433 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7434 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7435 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7436 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7437 (bfd_elfNN_print_symbol): Define.
7438 * elfcode.h: Don't include elflink.h.
7439 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7440 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7441 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7442 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7443 elf_link_record_local_dynamic_symbol): Don't define.
7444 * elflink.c: Update for changed function names. Move elflink.h
7445 code here.
7446 * elflink.h: Delete file.
7447 * po/SRC-POTFILES.in: Regenerate.
7448 * po/bfd.pot: Regenerate.
7449
7450 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7451
7452 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7453 "name" for global syms accidentally removed in 2004-03-20 change.
7454
7455 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7456
7457 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7458 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7459 where Elf_External_* is different for 64 and 32 bit, with
7460 corresponding elf_size_info field.
7461 (struct elf_final_link_info): Use "bfd_byte *" instead
7462 of "Elf_External_Sym *" for external_syms and symbuf.
7463 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7464 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7465 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7466 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7467 (elf_link_sort_cmp2): Adjust.
7468 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7469 using ELF_R_SYM macro. Set u.sym_mask.
7470 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7471 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7472 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7473 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7474 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7475 swap_syn_out functions. Rearrange dyn swap in/out switch.
7476 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7477 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7478 (elf_link_flush_output_syms): Add elf_backend_data arg.
7479 (elf_link_check_versioned_symbol): Likewise.
7480 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7481 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7482 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7483 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7484 ELF_R_TYPE and ELF_R_INFO macros.
7485 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7486 based on size rather than using ELF_R_INFO.
7487 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7488 ELF_R_SYM macro.
7489 (struct alloc_got_off_arg): New.
7490 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7491 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7492 (elf_gc_allocate_got_offsets): Adjust.
7493 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7494 ELF_R_SYM. Use bfd_section_from_elf_index.
7495 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7496 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7497 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7498
7499 2004-03-26 Stan Shebs <shebs@apple.com>
7500
7501 Remove MPW support, no longer used.
7502 * config.bfd (powerpc-*-mpw*): Remove configuration.
7503 * mpw-config.in, mpw-make.sed: Remove files.
7504 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7505
7506 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7507
7508 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7509 (ppc64_elf_add_symbol_hook): New function.
7510 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7511 const from Elf_Internal_Sym param.
7512 * elflink.c (elf_link_add_object_symbols): Adjust.
7513 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7514 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7515 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7516 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7517 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7518 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7519 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7520 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7521 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7522 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7523 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7524 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7525 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7526 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7527 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7528 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7529
7530 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7531
7532 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7533 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7534 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7535 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7536 (bfd_elf64_bfd_link_add_symbols): Delete.
7537 (bfd_elf_link_add_symbols): Declare.
7538 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7539 * elflink.c: Include safe-ctype.h.
7540 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7541 make static.
7542 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7543 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7544 static.
7545 (elf_link_add_archive_symbols): Rename from
7546 _bfd_elf_link_add_archive_symbols, make static.
7547 (elf_link_add_object_symbols): New function. Corresponding
7548 elflink.h function converted to use elf_size_info.
7549 (bfd_elf_link_add_symbols): Likewise.
7550 (bfd_elf_size_dynamic_sections): Adjust.
7551 * elflink.h (elf_bfd_link_add_symbols): Delete.
7552 (elf_link_add_object_symbols): Delete.
7553 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7554 bfd_elf_link_add_symbols.
7555 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7556
7557 2004-03-25 Alan Modra <amodra@bigpond.net.au>
7558
7559 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7560 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7561
7562 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7563 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7564 (_bfd_elf_add_dt_needed_tag): Declare.
7565 (_bfd_elf_sort_symbol): Declare.
7566 (_bfd_elf_finalize_dynstr): Declare.
7567 (RELOC_FOR_GLOBAL_SYM): Formatting.
7568 * elfcode.h (elf_add_dynamic_entry): Delete.
7569 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7570 elflink.h function converted to use elf_size_info.
7571 (_bfd_elf_add_dt_needed_tag): Likewise.
7572 (_bfd_elf_sort_symbol): Likewise.
7573 (_bfd_elf_finalize_dynstr): Likewise.
7574 (compute_bucket_count): Likewise.
7575 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7576 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7577 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7578 * elflink.h: ..here.
7579 (sort_symbol, add_dt_needed_tag): Delete.
7580 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7581 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7582 Update all users.
7583 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7584 * elf32-cris.c (add_dynamic_entry): Likewise.
7585 * elf32-hppa.c (add_dynamic_entry): Likewise.
7586 * elf32-i370.c (add_dynamic_entry): Likewise.
7587 * elf32-i386.c (add_dynamic_entry): Likewise.
7588 * elf32-m32r.c (add_dynamic_entry): Likewise.
7589 * elf32-m68k.c (add_dynamic_entry): Likewise.
7590 * elf32-ppc.c (add_dynamic_entry): Likewise.
7591 * elf32-s390.c (add_dynamic_entry): Likewise.
7592 * elf32-sh.c (add_dynamic_entry): Likewise.
7593 * elf32-sparc.c (add_dynamic_entry): Likewise.
7594 * elf32-vax.c (add_dynamic_entry): Likewise.
7595 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7596 * elf64-alpha.c (add_dynamic_entry): Likewise.
7597 * elf64-hppa.c (add_dynamic_entry): Likewise.
7598 * elf64-ppc.c (add_dynamic_entry): Likewise.
7599 * elf64-s390.c (add_dynamic_entry): Likewise.
7600 * elf64-sparc.c (add_dynamic_entry): Likewise.
7601 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7602 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7603 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7604 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7605 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7606 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7607
7608 2004-03-23 Paul Brook <paul@codesourcery.com>
7609
7610 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7611
7612 2004-03-22 Bob Wilson <bob.wilson@acm.org>
7613
7614 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7615 literal tables and check for relocs outside of literal pools.
7616 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7617 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7618 set DF_TEXTREL.
7619 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7620 (elf_xtensa_relocate_section): Read literal tables and check for
7621 dynamic relocations in read-only sections and not in literal pools.
7622
7623 2004-03-23 Alan Modra <amodra@bigpond.net.au>
7624
7625 PR 51.
7626 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7627
7628 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
7629
7630 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7631 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7632 not defined by the executable, or defined in a DSO.
7633 <eliding run-time relocation of .got>: Initialize GOT entry for a
7634 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7635 executable.
7636 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7637 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7638 a PLT reloc to GOT for an executable.
7639 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
7640 .got for a DSO and explain why.
7641 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7642 and unreferenced symbols for which a PLT is defined. Adjust
7643 dynamic-symbol pruning correspondingly, to make sure we don't lose
7644 a dynamic symbol also defined by a DSO.
7645
7646 2004-03-22 Alan Modra <amodra@bigpond.net.au>
7647
7648 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7649 and rel args. Group input and output args. Wrap to 80 columns.
7650 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7651 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7652 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7653 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7654 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7655 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7656 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7657 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7658 RELOC_FOR_GLOBAL_SYMBOL invocation.
7659
7660 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7661
7662 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7663 unresolved symbols in objects aren't allowed.
7664
7665 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7666 unresolved symbols.
7667 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7668 (elf_hppa_unmark_useless_dynamic_symbols):
7669 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7670 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7671 (elf32_hppa_relocate_section): Likewise.
7672 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7673 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7674 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7675 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7676 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7677
7678 * elf-m10200.c (mn10200_elf_relocate_section): Use
7679 RELOC_FOR_GLOBAL_SYMBOL.
7680 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7681 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7682 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7683 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7684 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7685 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7686 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7687 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7688 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7689 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7690 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7691 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7692
7693 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7694
7695 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7696 (final_link_relocate): Likewise.
7697 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7698 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7699
7700 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7701
7702 * Makefile.am: Run "make dep-am".
7703 * Makefile.in: Regenerate.
7704 * aclocal.m4: Regenerate.
7705 * config.in: Regenerate.
7706 * po/bfd.pot: Regenerate.
7707
7708 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7709 H.J. Lu <hongjiu.lu@intel.com>
7710
7711 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7712 type and size change code to where it was previously. Remove
7713 dt_needed param. Treat old weak syms as strong if new sym is
7714 from a shared lib, even when old sym is from another shared
7715 lib. Remove unnecessary tests of oldweak and newweak. Correct
7716 comments.
7717 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7718 _bfd_elf_merge_symbol calls.
7719 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7720 dt_needed local var. Update comments.
7721 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7722 (_bfd_elf_add_default_symbol): Likewise.
7723
7724 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7725 strong syms in one shared object overriding weak syms in another.
7726
7727 2004-03-18 Alan Modra <amodra@bigpond.net.au>
7728
7729 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7730 dyn_lib_class field. Rearrange for better packing.
7731 (elf_dt_soname): Delete.
7732 (elf_dyn_lib_class): Define.
7733 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7734 (bfd_elf_set_dt_needed_soname): Delete.
7735 (bfd_elf_set_dyn_lib_class): New function.
7736 * elflink.h (add_dt_needed_tag): New function. Split out from..
7737 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7738 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7739 initialization of soname.
7740 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7741 elf_dt_soname.
7742 * bfd-in.h (enum dynamic_lib_link_class): New.
7743 (bfd_elf_set_dt_needed_soname): Delete.
7744 (bfd_elf_set_dyn_lib_class): Declare.
7745 * bfd-in2.h: Regenerate.
7746
7747 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7748 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7749 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7750 symbol loop. Instead use add_needed to flag tag as written.
7751
7752 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7753
7754 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7755 logic for null_input_bfd detection.
7756
7757 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7758
7759 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7760
7761 2004-03-16 Mark Kettenis <kettenis@gnu.org>
7762
7763 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7764 code.
7765
7766 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7767
7768 * elflink.c (elf_link_read_relocs_from_section): Don't use
7769 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7770 (_bfd_elf_link_read_relocs): ..to here.
7771 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7772
7773 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7774
7775 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7776 values selected in configure.host. Require both to be defined
7777 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7778 corresponding BFD_HOST vars with quotes.
7779 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7780 Always require BFD_HOST_64_BIT_DEFINED.
7781 <file_ptr type>: Find off_t size before emitting message. Combine
7782 off_t and ftello64 conditional.
7783 * configure: Regenerate.
7784
7785 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7786
7787 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7788 aliasing warning. Remove trailing whitespace throughout file.
7789
7790 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7791
7792 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7793 input_section in calls to get_dyn_name.
7794 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
7795 local symbols.
7796 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7797
7798 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7799
7800 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7801 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7802 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7803 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7804 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7805 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7806 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7807 when using long.
7808 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7809 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7810 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7811 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7812 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7813 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7814 (read_8_bytes, read_indirect_string, read_address): Likewise.
7815 (read_abbrevs, parse_comp_unit): Likewise.
7816 * targets.c (struct bfd_target): Likewise.
7817 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7818 * hppabsd-core.c: Likewise. Formatting.
7819 * hpux-core.c: Likewise.
7820 * irix-core.c: Likewise.
7821 * netbsd-core.c: Likewise.
7822 * osf-core.c: Likewise.
7823 * ptrace-core.c: Likewise.
7824 * sco5-core.c: Likewise.
7825 * trad-core.c: Likewise.
7826 * configure: Regenerate.
7827 * bfd-in2.h: Regenerate.
7828
7829 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7830
7831 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7832 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7833 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7834 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7835 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7836 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7837 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7838 * libbfd.c: Likewise in function definitions.
7839 (bfd_put_8): Mask with 0xff rather than casting to char.
7840 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7841 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7842 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7843 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7844 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7845 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7846 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7847 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7848 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7849 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7850 * archive.c (do_slurp_coff_armap): Update swap prototype.
7851 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7852 (tic54x_getl_signed_32): Likewise.
7853 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7854 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7855 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7856 (bfd_getp_signed_32, bfd_putp32): Likewise.
7857 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7858 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7859 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7860 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7861 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7862 bfd_h_getx_signed_16, bfd_h_putx16.
7863 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7864 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7865 * hpux-core.c: Likewise.
7866 * irix-core.c: Likewise.
7867 * netbsd-core.c: Likewise.
7868 * osf-core.c: Likewise.
7869 * ptrace-core.c: Likewise.
7870 * sco5-core.c: Likewise.
7871 * trad-core.c: Likewise.
7872 * bfd-in2.h: Regenerate.
7873
7874 2004-03-15 Matt Thomas <matt@3am-software.com>
7875
7876 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7877 selected.
7878
7879 2004-03-13 Mark Kettenis <kettenis@gnu.org>
7880
7881 * config.bfd: Add x86_64-*-openbsd*.
7882 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7883 netbsd-core.lo.
7884 * configure: Regenerate.
7885
7886 2004-03-12 Nick Clifton <nickc@redhat.com>
7887 Dave Murphy <wintermute2k4@ntlworld.com>
7888
7889 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7890 if the input bfd does not contain any code.
7891
7892 2004-03-09 Steve Ellcey <sje@cup.hp.com>
7893
7894 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7895
7896 2004-03-05 Fred Fish <fnf@redhat.com>
7897
7898 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7899 mips16 symbols to be even rather than testing first for even/odd.
7900 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7901
7902 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7903
7904 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7905 layout purposes.
7906
7907 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
7908
7909 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7910 undefined symbols as hash_new.
7911
7912 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7913
7914 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7915 * cpu-sh.c: Ditto.
7916 * elf32-sh.c: Ditto.
7917 * bfd-in2.h: Regenerate.
7918
7919 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
7920
7921 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7922 dynrelocs.
7923 (_frv_count_got_plt_entries): Initialize them.
7924 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7925 callers.
7926 (frv_pic_relocs_info_for_global): Likewise.
7927 (frv_pic_relocs_info_for_local): Likewise.
7928 (frv_pic_merge_early_relocs_info): New.
7929 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7930 another.
7931 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7932 Check that we don't exceed the allocated count for entry.
7933 (_frv_add_rofixup): Likewise.
7934 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7935 (elf32_frv_finish_dynamic_sections): Improve error message in case
7936 we emit too few rofixup entries.
7937
7938 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
7939
7940 * archures.c (bfd_mach_fr450): New.
7941 * bfd-in2.h: Regenerate.
7942 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7943 (arch_info_500): Link to it.
7944 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7945 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7946 (frv_elf_arch_extension_p): New function.
7947 (frv_elf_merge_private_bfd_data): Use it.
7948
7949 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7950
7951 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7952
7953 * elflink.h (is_global_data_symbol_definition): Moved to
7954 elflink.c.
7955 (elf_link_is_defined_archive_symbol): Likewise.
7956 (elf_link_add_archive_symbols): Likewise. Renamed to
7957 _bfd_elf_link_add_archive_symbols.
7958
7959 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7960 of ELF symbol table entry from backend.
7961 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7962 instead of elf_link_add_object_symbols.
7963
7964 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7965
7966 * elf-bfd.h (struct elf_backend_data): Added
7967 elf_backend_can_make_relative_eh_frame,
7968 elf_backend_can_make_lsda_relative_eh_frame and
7969 elf_backend_encode_eh_address.
7970 (_bfd_elf_encode_eh_address): Declare.
7971 (_bfd_elf_can_make_relative): Declare.
7972 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7973 hooks to decide whether to attempt to make_relative and
7974 make_lsda_relative.
7975 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7976 (_bfd_elf_can_make_relative): New.
7977 (_bfd_elf_encode_eh_address): New.
7978 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7979 (frv_elf_encode_eh_address): New.
7980 (elf_backend_can_make_relative_eh_frame): Define.
7981 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7982 (elf_backend_encode_eh_address): Define.
7983 * elfxx-target.h
7984 (elf_backend_can_make_relative_eh_frame): Define.
7985 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7986 (elf_backend_encode_eh_address): Define.
7987 (elfNN_bed): Add them.
7988
7989 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7990
7991 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7992 complain_on_overflow to signed.
7993
7994 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7995
7996 * elflink.h (sort_symbol): New.
7997 (elf_link_add_object_symbols): Use a sorted symbol array for
7998 weakdef.
7999
8000 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8001
8002 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8003 for pc relative relocs.
8004 (elf_s390_relocate_section): Likewise.
8005 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8006 for pc relative relocs.
8007 (elf_s390_relocate_section): Likewise.
8008
8009 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8010
8011 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8012 count_dyn_reloc.
8013
8014 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8015
8016 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8017 field to track if a relocation is against readonly section.
8018 (count_dyn_reloc): Take a new argument for rent->reltext.
8019 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8020 (get_reloc_section): Don't set ia64_info->reltext here.
8021 (allocate_dynrel_entries): Set ia64_info->reltext here.
8022
8023 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8024
8025 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8026 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8027 function's descriptor to symbol+offset, and map local undefweak
8028 symbol to NULL function descriptor.
8029 (elf32_frv_relocate_section): Likewise.
8030
8031 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8032
8033 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8034 M_X86_64_NETBSD.
8035 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8036 (netbsd_core_file_p): Set architecture from machine ID for
8037 selected machines.
8038
8039 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8040
8041 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8042 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8043
8044 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8045
8046 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8047 symbols with non-default visibility.
8048
8049 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8050
8051 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8052 IMAGE_SCN_MEM_WRITE on known sections only.
8053
8054 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8055
8056 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8057 symbols used in PIE relocs.
8058
8059 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8060
8061 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8062 .plt sh_entsize.
8063
8064 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8065
8066 * configure.in: Update version to 2.15.90.
8067 * configure: Regenerate.
8068
8069 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8070 Richard Sandiford <rsandifo@redhat.com>
8071
8072 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8073 _bfd_elf_symbol_refs_local_p to decide whether to decay
8074 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8075 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8076 relocs if the symbol wasn't defined by a regular object file.
8077 Don't check the symbol's dynindx.
8078
8079 2004-02-16 Andrew Cagney <cagney@redhat.com>
8080
8081 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8082 @bfd_file_ptr@.
8083 * bfd-in2.h: Re-generate.
8084
8085 2004-02-14 Andrew Cagney <cagney@redhat.com>
8086
8087 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8088 _LARGEFILE64_SOURCE.
8089
8090 2004-02-13 Andrew Cagney <cagney@redhat.com>
8091
8092 * elf.c (vma_page_aligned_bias): New function.
8093 (assign_file_positions_except_relocs)
8094 (assign_file_positions_for_segments): Replace broken modulo
8095 arithmetic with call to vma_page_aligned_bias.
8096
8097 2004-02-11 Andrew Cagney <cagney@redhat.com>
8098
8099 * bfd-in.h: Update copyright.
8100 (bfd_tell): Change return type to file_ptr.
8101 * bfd-in2.h: Re-generate.
8102 * cache.c: Update copyright.
8103 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8104 parameter.
8105 (close_one): Use real_ftell.
8106 * bfdio.c: Update copyright.
8107 (real_ftell, real_fseek): New functions.
8108 (bfd_tell): Use real_fseek and real_ftell, change return type to
8109 file_ptr.
8110 (bfd_seek): Use real_ftell and real_fseek, change type of
8111 file_position to a file_ptr.
8112 * libbfd-in.h: Update copyright.
8113 (real_ftell, real_fseek): Declare.
8114 * libbfd.h: Re-generate.
8115
8116 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8117 fseeko and fseeko64. Determine bfd_file_ptr.
8118 * configure: Re-generate.
8119 * config.in: Re-generate.
8120
8121 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8122
8123 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8124 * elf32-h8300.c: Likewise.
8125
8126 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
8127 Nick Clifton <nickc@redhat.com>
8128
8129 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8130 GOT entries with no associated GOT subsection.
8131
8132 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
8133
8134 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8135 * elf.c (swap_out_syms): Use it to decide whether local section
8136 symbols should be named.
8137 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8138 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8139 (elf_backend_name_local_section_symbols): Define.
8140 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8141
8142 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8143
8144 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8145 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8146 finalize pass.
8147
8148 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
8149
8150 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8151 to bfd_link_hash_entry passed by reference to
8152 _bfd_generic_link_add_one_symbol.
8153
8154 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8155
8156 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8157 relocations against dynamic symbols.
8158
8159 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
8160
8161 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8162 change.
8163
8164 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
8165
8166 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8167 * bfd-in2.h, libbfd.h: Rebuilt.
8168
8169 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8170
8171 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8172 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8173 flag has been cleared.
8174
8175 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8176
8177 * coff-h8300.c: Add and adjust comments about relaxation.
8178 * elf32-h8300.c: Likewise.
8179
8180 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8181
8182 * coff-h8300.c: Fix comment typos.
8183 * elf32-h8300.c: Likewise.
8184
8185 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8186
8187 * coff-h8300.c: Add comments about relaxation.
8188 * elf32-h8300.c: Likewise.
8189
8190 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8191
8192 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8193 throughout.
8194 * aclocal.m4: Regenerate.
8195 * configure: Regenerate.
8196
8197 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8198
8199 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8200 mips_elf64_rtype_to_howto instead of using howto_table.
8201
8202 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
8203
8204 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8205 the .plt section.
8206 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8207 relocs which would not use the PLT.
8208
8209 2004-01-13 Alan Modra <amodra@bigpond.net.au>
8210
8211 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8212 (ppc64_elf_gc_sweep_hook): Likewise.
8213 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8214
8215 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8216
8217 Adds linker relaxation support for bit manipulation insns like
8218 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8219 bst, btst, bxor.
8220 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8221 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8222 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8223 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8224
8225 2004-01-12 Alan Modra <amodra@bigpond.net.au>
8226
8227 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8228
8229 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8230
8231 * elf32-h8300.c: Fix formatting.
8232
8233 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8234
8235 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8236 dynamic object is present. Declare r_symndx and h in an inner
8237 scope.
8238 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8239
8240 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
8241
8242 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8243 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8244 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8245 identically. Do not emit PC24 relocations for shared libraries.
8246 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8247 identically. Don't adjust pc_count.
8248 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8249 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8250 adjust count for branch relocations.
8251 (allocate_dynrelocs): Correct typo in call to
8252 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8253 PC24 or PLT32 relocs when linking.
8254
8255 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8256
8257 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8258 relocation howto with ARM_26 one for consistency.
8259 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8260 that will be converted to ARM_26D ones, since we always want 'done'
8261 relocations to be reflected in section's data.
8262 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8263 offset.
8264 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8265 requested.
8266
8267 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8268
8269 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8270 are not partial_inplace during a relocatable link.
8271
8272 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8273
8274 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8275 if no dynamic object is present. Declare r_symndx and h in an
8276 inner scope.
8277
8278 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8279
8280 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8281 trampoline if it is known out of range.
8282
8283 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
8284
8285 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8286 * elf32-frv.c (_frv_osec_readonly_p): New.
8287 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8288 undefweak symbol.
8289 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8290 (elf32_frv_relocate_section): Likewise. Error out if attempting
8291 to emit rofixups or dynamic relocs in read-only segments. Use
8292 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8293 dynamic relocations.
8294 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8295 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8296 relocations or fixups involving merged sections correctly. Avoid
8297 crash when undefined symbol is referenced by R_FRV_32 or
8298 R_FRV_FUNCDESC_VALUE.
8299 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8300 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8301 input section holding local symbol to addend of R_FRV_32 or
8302 R_FRV_FUNCDESC_VALUE dynamic relocation.
8303 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8304 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8305 (elf32_frv_always_size_sections): Don't store pointer to
8306 __stacksize symbol in sec_info.
8307 (elf32_frv_modify_segment_map): Look it up here.
8308 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8309 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8310 of the lazy PLT entry, not only its offset, as the low word of a
8311 function descriptor.
8312 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8313 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8314 if a hash table entry already exists but is not a definition.
8315 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8316 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8317 (_frv_add_rofixup): Don't inline.
8318 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8319 for undefweak symbols.
8320 (elf32_frv_relocate_section): Avoid crash while computing
8321 relocation when linking with shared library. Only emit rofixups
8322 and dynamic relocations for alloc&load sections. Mark binaries
8323 with inter-segment relocations for relocation as a unit.
8324 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8325 (DEFAULT_STACK_SIZE): New.
8326 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8327 emit rofixups or dynamic relocs when linking dynamic non-PIE
8328 executables.
8329 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8330 shared libs too. Reserve the last entry for the GOT pointer.
8331 (elf32_frv_finish_dynamic_sections): Emit it.
8332 (elf32_frv_always_size_sections): New.
8333 (elf32_frv_modify_segment_map): New.
8334 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8335 sections.
8336 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8337 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8338 (elf_backend_always_size_sections): New.
8339 (elf_backend_modify_segment_map): New.
8340 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8341 * config.bfd: Added frv-*-*linux*.
8342 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8343 ABS section, instead of crashing.
8344 (elf32_frv_relocate_section): Don't crash before warning about
8345 different segments in non-PIC relocation.
8346 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8347 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8348 relocs to undefweak symbols.
8349 (elf32_frv_relocate_section): Ditto for undefined symbols.
8350 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8351 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8352 gotfixup section was created.
8353 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8354 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8355 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8356 complain_overflow_signed.
8357 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8358 have not been allocated.
8359 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8360 privfd only if dynamic sections were created.
8361 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8362 for GPREL relocs. When linking relocatable FDPIC executables,
8363 emit warnings for relocations that would be illegal on PIE or
8364 shared libraries. Emit rofixup for R_FRV_32 only if input object
8365 is not FDPIC.
8366 (_frv_create_got_section): Define _gp symbol in the rofixup
8367 section.
8368 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8369 dynamic sections missing, error out requesting -melf32frvfd.
8370 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8371 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8372 computation of addends from section and global or local symbol
8373 value. Change return type to bfd_boolean, and return a failure if
8374 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8375 nonzero addend is required.
8376 (elf32_frv_relocate_section): Likewise. Print error for
8377 unsupported nonzero addends.
8378 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8379 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8380 force everything local.
8381 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8382 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8383 (frv_gotfixup_section): New.
8384 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8385 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8386 and relocsfdv.
8387 (_frv_add_rofixup): New.
8388 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8389 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8390 improve some ugly conditions.
8391 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8392 relocations in fdpic.
8393 (_frv_create_got_section): Create .rofixup.got section.
8394 (struct _frv_dynamic_got_info): Added fixups.
8395 (_frv_count_got_plt_entries): Account in-GOT relocations into
8396 relocs32, relocsfd and relocsfdv. Account them into relocs or
8397 fixups, as appropriate.
8398 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8399 sizing of gotrel.
8400 (elf32_frv_finish_dynamic_sections): Verify that the right number
8401 of relocations and fixups was generated.
8402 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8403 relocsfdv.
8404 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8405 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8406 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8407 descriptor of a (formerly-)global symbol is local.
8408 (struct frv_pic_relocs_info): Adjust comments.
8409 (_frv_emit_got_relocs_plt_entries): Adjust.
8410 (elf32_frv_relocate_section): Likewise.
8411 (_frv_count_got_plt_entries): Likewise.
8412 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8413 symbol's value to addend in the common preamble. Decay dynamic
8414 symbols to section+offset if they bind or call locally, for GOT
8415 and FUNCDESC_VALUE, respectively.
8416 (elf32_frv_relocate_section): Likewise.
8417 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8418 internal or hidden visibility.
8419 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8420 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8421 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8422 (elf32_frv_relocate_section): Pass relocation addend in. Use
8423 original relocation addend to look up the got relocs/plt entries
8424 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8425 processing relocations that reference .scommon symbols.
8426 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8427 Introduce support for dynamic linking.
8428 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8429 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8430 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8431 (frv_reloc_type_lookup): Return REL howtos for executables and
8432 dynamic libraries.
8433 (frv_info_to_howto_rel): New.
8434 (struct frv_elf_link_hash_table): New.
8435 (frv_hash_table, frv_got_section, frv_gotrel_section,
8436 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8437 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8438 (frv_elf_link_hash_table_create): New.
8439 (struct frv_pic_relocs_info): New.
8440 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8441 (frv_pic_relocs_info_find): New.
8442 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8443 New.
8444 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8445 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8446 (_frv_emit_got_relocs_plt_entries): New.
8447 (elf32_frv_relocate_section): Add support for dynamic linking.
8448 Handle new relocations.
8449 (_frv_create_got_section): New.
8450 (elf32_frv_create_dynamic_sections): New.
8451 (ELF_DYNAMIC_INTERPRETER): New.
8452 (struct _frv_dynamic_got_info): New.
8453 (_frv_count_got_plt_entries): New.
8454 (struct _frv_dynamic_got_plt_info): New.
8455 (_frv_compute_got_alloc_data): New.
8456 (_frv_get_got_entry, _frv_get_fd_entry): New.
8457 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8458 (_frv_resolve_final_relocs_info): New.
8459 (elf32_frv_size_dynamic_sections): New.
8460 (elf32_frv_finish_dynamic_sections): New.
8461 (elf32_frv_adjust_dynamic_symbol): New.
8462 (elf32_frv_finish_dynamic_symbol): New.
8463 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8464 whole thing works.
8465 (elf_info_to_howto_rel): Define.
8466 (bfd_elf32_bfd_link_hash_table_create): Define.
8467 (elf_backend_create_dynamic_sections): Define.
8468 (elf_backend_adjust_dynamic_symbol): Define.
8469 (elf_backend_size_dynamic_sections): Define.
8470 (elf_backend_finish_dynamic_symbol): Define.
8471 (elf_backend_finish_dynamic_sections): Define.
8472 (elf_backend_want_got_sym): Define.
8473 (elf_backend_got_header_size): Define.
8474 (elf_backend_want_got_plt): Define.
8475 (elf_backend_plt_readonly): Define.
8476 (elf_backend_want_plt_sym): Define.
8477 (elf_backend_plt_header_size): Define.
8478 (elf_backend_may_use_rel_p): Define.
8479 (elf_backend_may_use_rela_p): Define.
8480 (elf_backend_default_use_rela_p): Define.
8481 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8482 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8483 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8484 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8485 (frv_reloc_map): Map the corresponding BFD relocs to them.
8486 (frv_reloc_type_lookup): ... and back to BFD relocs.
8487 * reloc.c: New relocs.
8488 * bfd-in2.h, libbfd.h: Rebuilt.
8489 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8490 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8491 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8492 R_FRV_FUNCDESC_GOTLO): New.
8493 (frv_reloc_map): Map the corresponding BFD relocs to them.
8494 (frv_reloc_type_lookup): ... and back to BFD relocs.
8495 * reloc.c: New relocs.
8496 * bfd-in2.h, libbfd.h: Rebuilt.
8497
8498 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8499
8500 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8501 targets to support pages of up to 64kB.
8502 (elf32_bed): Redefine to get a separate backend data structure for
8503 traditional targets.
8504 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8505 targets to support pages of up to 64kB.
8506 (elf64_bed): Redefine to get a separate backend data structure for
8507 traditional targets.
8508 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8509 targets to support pages of up to 64kB.
8510 (elf32_bed): Redefine to get a separate backend data structure for
8511 traditional targets.
8512
8513 2004-01-04 Mark Kettenis <kettenis@gnu.org>
8514
8515 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8516
8517 2004-01-02 Mark Kettenis <kettenis@gnu.org>
8518
8519 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8520 (elf_i386_grok_psinfo): Likewise.
8521
8522 2004-01-02 Bernardo Innocenti <bernie@develer.com>
8523
8524 * config.bfd: Add m68k-uClinux target.
8525
8526 2004-01-01 Grant Edwards <grante@visi.com>
8527
8528 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8529 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8530 (elf32_h8_gc_sweep_hook): New function.
8531 (elf_backend_gc_mark_hook): Define.
8532 (elf_backend_gc_sweep_hook): Define.
8533 (elf_backend_can_gc_sections): Define.
8534
8535 For older changes see ChangeLog-0203
8536 \f
8537 Local Variables:
8538 mode: change-log
8539 left-margin: 8
8540 fill-column: 74
8541 version-control: never
8542 End:
This page took 0.219884 seconds and 4 git commands to generate.