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