]> Git Repo - binutils.git/blob - bfd/ChangeLog
2005-03-31 H.J. Lu <[email protected]>
[binutils.git] / bfd / ChangeLog
1 2005-03-31  H.J. Lu  <[email protected]>
2
3         * elf.c (assign_section_numbers): Fix a typo.
4
5 2005-03-31  H.J. Lu  <[email protected]>
6
7         * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
8         error message.
9         (_bfd_elf_section_already_linked): Likewise.
10
11 2005-03-31  Jerome Guitton  <[email protected]>
12
13         * config.in: Regenerate.
14
15 2005-03-31  Jerome Guitton  <[email protected]>
16
17         * config.in (HAVE_DECL_BASENAME): New configure macro.
18         * configure.in: Check for basename.
19         * configure: Regenerate.
20
21 2005-03-30  Julian Brown  <[email protected]>
22
23         * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
24         bfd_elf32_is_arm_mapping_symbol_name.
25         * bfd-in2.h: Regenerate.
26         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
27         bfd_elf32_is_arm_mapping_symbol_name.
28         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
29         bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
30         (arm_elf_find_function): Likewise.
31         (elf32_arm_output_symbol_hook): Likewise.
32
33 2005-03-30  Julian Brown  <[email protected]>
34
35         * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
36         * bfd-in2.h: Regenerate.
37         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
38         bfd_elf32_is_arm_mapping_symbol_name.
39         (elf32_arm_output_symbol_hook): Likewise.
40         (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
41         mapping symbols.
42         (is_arm_mapping_symbol_name): Function moved from here...
43         * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
44         and made global.
45
46 2005-03-29  Aaron W. LaFramboise  <[email protected]>
47
48         * configure.in: Check for ffs decl and alphabetize.
49         * config.in: Regenerate.
50         * configure: Regenerate.
51         * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and 
52         alphabetize.
53
54 2005-03-29  Fred Fish  <[email protected]>
55
56         * dwarf2.c (struct comp_unit): Fix typo.
57         (scan_unit_for_functions): Remove unused local variable "name"
58         and dead code that set it.
59
60 2005-03-29  Daniel Jacobowitz  <[email protected]>
61             Phil Blundell  <[email protected]>
62
63         * bfd-in2.h, libbfd.h: Regenerated.
64         * reloc.c: Add ARM TLS relocations.
65         * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
66         relocations.
67         (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
68         (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
69         (elf32_arm_tls_ie32_howto): New.
70         (elf32_arm_howto_from_type): Support TLS relocations.
71         (elf32_arm_reloc_map): Likewise.
72         (elf32_arm_reloc_type_lookup): Likewise.
73         (TCB_SIZE): Define.
74         (struct elf32_arm_obj_tdata): New.
75         (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
76         (elf32_arm_mkobject): New function.
77         (struct elf32_arm_relocs_copied): Add pc_count.
78         (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
79         (GOT_TLS_IE): Define.
80         (struct elf32_arm_link_hash_table): Add tls_ldm_got.
81         (elf32_arm_link_hash_newfunc): Initialize tls_type.
82         (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
83         (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
84         (dtpoff_base, tpoff): New functions.
85         (elf32_arm_final_link_relocate): Handle TLS relocations.
86         (IS_ARM_TLS_RELOC): Define.
87         (elf32_arm_relocate_section): Warn about TLS mismatches.
88         (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
89         (elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
90         TLS relocations and pc_count.
91         (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
92         (allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
93         calls.
94         (elf32_arm_size_dynamic_sections): Handle TLS.
95         (elf32_arm_finish_dynamic_symbol): Likewise.
96         (bfd_elf32_mkobject): Define.
97
98 2005-03-29  Daniel Jacobowitz  <[email protected]>
99
100         * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
101         relocation types.  Don't count relocations which will use a PLT.
102
103 2005-03-29  Joel Brobecker  <[email protected]>
104
105         * elf.c (elfcore_grok_nto_status): Print tid as long.
106         (elfcore_grok_nto_regs): Likewise.
107
108 2005-03-29  Joel Brobecker  <[email protected]>
109
110         * irix-core.c: Remove some unnecessary prototypes.
111
112 2005-03-28  Joel Brobecker  <[email protected]>
113
114         * irix-core.c: Convert to ISO C.
115
116 2005-03-28  Joel Brobecker  <[email protected]>
117
118         * irix-core.c (do_sections): Replace + by | in expression.
119         (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
120         to unused parameters to avoid a compiler warning.
121
122 2005-03-28  Mark Kettenis  <[email protected]>
123
124         * netbsd-core.c: Convert to ISO C.  Fix formatting.
125
126 2005-03-24  Eric Christopher  <[email protected]>
127
128         * elfxx-mips.c: Revert previous patch.
129
130 2005-03-24  Nick Clifton  <[email protected]>
131
132         * targets.c (_bfd_target_vector): Only include the
133         bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
134         all targets enabled.
135
136 2005-03-24  James E Wilson  <[email protected]>
137
138         * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
139         (BFD64_BACKENDS): Add elf32-ia64.lo.
140         * Makefile.in: Regenerate.
141
142 2005-03-23  Eric Christopher  <[email protected]>
143
144         * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
145         (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
146         after emitting relocation.
147         (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
148         (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
149         and readonly_reloc.
150
151 2005-03-23  Mike Frysinger  <[email protected]>
152             Nick Clifton  <[email protected]>
153
154         * config.bfd: Accept any C library to accompany a GNU Linux
155         implementation, not just the GNU C library.
156         * configure.in: Likewise.
157         * configure: Regenerate.
158
159 2005-03-22  H.J. Lu  <[email protected]>
160
161         * bfd-in.h (_bfd_elf_provide_symbol): New.
162         * bfd-in2.h: Regenerated.
163
164         * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
165         (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
166         of set_linker_sym.
167
168         * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
169         from elf32-ppc.c.
170
171 2005-03-22  Hans-Peter Nilsson  <[email protected]>
172
173         * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
174
175 2005-03-22  Bob Wilson  <[email protected]>
176
177         * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
178         xtensa_sysreg_lookup_name, xtensa_interface_lookup,
179         xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
180         (xtensa_opcode_decode): Rearrange code.
181
182 2005-03-22  Nick Clifton  <[email protected]>
183
184         * binary.c: Convert to ISO C90 formatting.
185         * coff-arm.c: Convert to ISO C90 formatting.
186         * coffgen.c: Convert to ISO C90 formatting.
187         * elf32-gen.c: Convert to ISO C90 formatting.
188         * elf64-gen.c: Convert to ISO C90 formatting.
189         * hash.c: Convert to ISO C90 formatting.
190         * ieee.c: Convert to ISO C90 formatting.
191
192 2005-03-22  Daniel Jacobowitz  <[email protected]>
193
194         * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
195         unresolved symbols in R_ARM_NONE relocations.
196
197 2005-03-22  Daniel Jacobowitz  <[email protected]>
198
199         * elf32-arm.c (elf32_arm_final_link_relocate): Add
200         UNRESOLVED_RELOC_P argument.  Set it appropriately.
201         (elf32_arm_relocate_section): Update call to
202         elf32_arm_final_link_relocate.  Don't clobber RELOCATION; use
203         unresolved_reloc instead.
204
205 2005-03-23  Alan Modra  <[email protected]>
206
207         * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
208         .gnu.warning.* sections.
209
210 2005-03-22  Alan Modra  <[email protected]>
211
212         * elf32-ppc.c (elf_linker_section_pointers_t): Remove
213         written_address_p.
214         (ppc_elf_create_linker_section): Don't try to reuse existing section.
215         (elf_create_pointer_linker_section): Delete info parm.  Don't make
216         h dynamic.  Don't set written_address_p.
217         (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
218         (bfd_put_ptr): Delete.
219         (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
220         Always write section contents.  Assert global sym is def_regular.
221         Use offset bottom bit as a written flag.
222         (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
223         calls.
224
225 2005-03-22  Alan Modra  <[email protected]>
226
227         * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
228         (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss start
229         and end syms.
230
231 2005-03-21  Nick Clifton  <[email protected]>
232
233         * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
234         targets.
235         (t2a1_bx_pc_insn): Likewise.
236         (t2a2_noop_insn): Likewise.
237         (t2a3_b_insn): Likewise.
238         (t2a1_push_insn): Likewise.
239         (t2a2_ldr_insn): Likewise.
240         (t2a3_mov_insn): Likewise.
241         (t2a4_bx_insn): Likewise.
242         (t2a5_pop_insn): Likewise.
243         (t2a6_bx_insn): Likewise.
244         (coff_arm_relocate_section): Only declare the high_address
245         variable for non WINCE targets.
246
247 2005-03-22  Alan Modra  <[email protected]>
248
249         * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
250         SEC_LINKER_CREATED.  Attach to dynobj.
251         (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
252
253 2005-03-21  Alan Modra  <[email protected]>
254
255         * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
256         sym_offset.  Add name, bss_name, sym_name, sym_val.
257         (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
258         Add sdata array of elf_linker_section_t.
259         (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
260         (enum elf_linker_section_enum): Delete.
261         (ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
262         (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
263         the special sections are needed.  Adjust htab->sdata refs.
264         Ensure dynobj is set in sreloc code.
265         (ppc_elf_size_dynamic_sections): Strip sdata sections.
266         (ppc_elf_set_sdata_syms): New function.
267         (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
268         (ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
269         sym_val instead of sym_hash.
270         * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
271
272 2005-03-21  Alan Modra  <[email protected]>
273
274         * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
275         (ppc_elf_merge_private_bfd_data): Likewise.
276
277 2005-03-21  Alan Modra  <[email protected]>
278
279         * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
280         (ppc_elf_create_linker_section): Don't create rel_section.
281         (elf_create_pointer_linker_section): Don't size relocs.
282         (elf_finish_pointer_linker_section): Remove relative_reloc parm.
283         Don't generate relocs.
284         (ppc_elf_relocate_section): Adjust calls to
285         elf_finish_pointer_linker_section.
286
287 2005-03-21  Alan Modra  <[email protected]>
288
289         * elf32-ppc.c (is_ppc_elf_target): New function.
290         (ppc_elf_merge_private_bfd_data): Use it rather than just testing
291         for bfd_target_elf_flavour.  Do this test before endian check.
292         (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
293         (ppc_elf_size_dynamic_sections): Likewise.
294
295 2005-03-20  H.J. Lu  <[email protected]>
296
297         * elf-bfd.h (elf_backend_data): Add int to
298         elf_backend_section_from_shdr.
299         (bfd_elf_section_data): Update comment for this_idx.
300         (_bfd_elf_make_section_from_shdr): Add int.
301         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
302
303         * elf.c (_bfd_elf_make_section_from_shdr): Take section index
304         and use it to set this_idx in bfd_elf_section_data.
305         (bfd_section_from_shdr): Pass shindex to
306         _bfd_elf_make_section_from_shdr.
307         (_bfd_elf_section_from_bfd_section): Use this_idx in
308         bfd_elf_section_data to find section index.
309
310         * elf32-arm.c (elf32_arm_section_from_shdr): Take section
311         index and pass it to _bfd_elf_make_section_from_shdr.
312         * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
313         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
314         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
315         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
316         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
317         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
318         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
319         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
320         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
321
322 2005-03-19  Danny Smith <[email protected]>
323             Ross Ridge  <[email protected]>
324
325         * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
326         character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
327         cases.  Add comment.
328
329 2005-03-18  H.J. Lu  <[email protected]>
330
331         * elflink.c (elf_mark_used_section): Remove check for special
332         sections.
333
334 2005-03-18  Andreas Schwab  <[email protected]>
335
336         * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
337         from bfd_vma to ia64_insn, remove broken cast.
338
339 2005-03-18  C Jaiprakash  <[email protected]>
340
341         * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
342         (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
343          elf_m68k_finish_dynamic_sections): Use it.
344
345 2005-03-17  Paul Brook <[email protected]>
346             Dan Jacobowitz <[email protected]>
347             Mark Mitchell  <[email protected]>
348
349         * elf32-arm.c (elf32_arm_modify_segment_map): New function.
350         (elf32_arm_additional_program_headers): Likewise.
351         (elf_backend_modify_segment_map): Define.
352         (elf_backend_additional_program_headers): Likewise.
353         (elf32_arm_symbian_modify_segment_map): Use
354         elf32_arm_modify_segment_map.
355
356 2005-03-18  H.J. Lu  <[email protected]>
357
358         * elflink.c (elf_mark_used_section): Check bfd_is_const_section
359         for special sections.
360
361 2005-03-18  Alan Modra  <[email protected]>
362
363         * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
364         * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
365         section_sym_count param, and return number of section symbols.
366         (bfd_elf_size_dynamic_sections): Clear section symbol area of
367         .dynsym contents.  Don't bother calling swap_symbol_out on the
368         first all-zero dynsym.
369         (elf_mark_used_section): Formatting.  Avoid twiddling flags in
370         special sections like bfd_abs_section.
371         (bfd_elf_gc_sections): Spelling fix.
372
373 2005-03-16  Fred Fish  <[email protected]>
374
375         PR binutils/790
376         * dwarf2.c (read_indirect_string): Fix apparent typo, check
377         dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
378
379 2005-03-16  H.J. Lu  <[email protected]>
380
381         * elflink.c (elf_mark_used_section): New.
382         (bfd_elf_gc_sections): Call elf_gc_mark_section for
383         non-relocatable link if we don't do GC.
384
385 2005-03-16  Nick Clifton  <[email protected]>
386             Ben Elliston  <[email protected]>
387
388         * configure.in (werror): New switch: Add -Werror to the
389         compiler command line.  Enabled by default.  Disable via
390         --disable-werror.
391         * configure: Regenerate.
392
393 2005-03-16  Nick Clifton  <[email protected]>
394
395         * ecoff.c: Convert to ISO C90 formatting.
396
397 2005-03-16  Alan Modra  <[email protected]>
398
399         * elf32-ppc.c: Divide file into general and linker specific
400         functions.  Sort linker functions into roughly the order in which
401         they are called by the ELF linker code.
402
403 2005-03-16  Alan Modra  <[email protected]>
404
405         * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
406         on section.  Correct comment, and add FIXME.
407         (ppc_elf_additional_program_headers): Don't bump header count for
408         interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
409         (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
410         do allocate memory if they need it.
411
412 2005-03-15  Mikkel Krautz  <[email protected]>
413
414         * config.bfd (x86_64-elf): Add target.
415
416 2005-03-15  Alan Modra  <[email protected]>
417
418         * po/es.po: Commit new Spanish translation.
419
420 2005-03-14  H.J. Lu  <[email protected]>
421
422         * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
423         for global symbol when reporting overflow.
424
425 2005-03-11  Jakub Jelinek  <[email protected]>
426
427         * libbfd-in.h (_bfd_ar_spacepad): New prototype.
428         * libbfd.h: Rebuilt.
429         * archive.c (_bfd_ar_spacepad): New function.
430         (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
431         bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
432         coff_write_armap): Use it.
433         (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
434         uid/gid support.
435         * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
436
437 2005-03-10  Mark Kettenis  <[email protected]>
438
439         * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
440         has_table to the start of the function.
441
442 2005-03-10  Ben Elliston  <[email protected]>
443
444         * archive.c: Include hashtab.h.
445         (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
446         (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
447         (hash_file_ptr): New function.
448         (eq_file_ptr): Likewise.
449         (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
450         * libbfd-in.h: Include hashtab.h.
451         (struct artdata): Change `cache' member type to htab_t.
452         * libbfd.h: Rebuild.
453
454 2005-03-08  Daniel Jacobowitz  <[email protected]>
455
456         * configure.in: Bump version to 2.16.90.
457         * configure: Regenerated.
458
459 2005-03-07  Jakub Jelinek  <[email protected]>
460
461         * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
462         close is a function like macro in system headers.
463
464 2005-03-07  Alan Modra  <[email protected]>
465
466         PR ld/778
467         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
468         _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
469
470 2005-03-06  Alan Modra  <[email protected]>
471
472         * elf.c (elfcore_grok_win32pstatus): Warning fixes.
473
474 2005-03-05  Alan Modra  <[email protected]>
475
476         * po/bfd.pot: Regenerate.
477
478 2005-03-05  Alan Modra  <[email protected]>
479
480         * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
481         with is_func.
482         (func_desc_adjust): Force dot-syms local in executables as well
483         as shared libs.
484
485 2005-03-04  David Daney  <[email protected]>
486
487         * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
488         '__gnu_local_gp' symbol used by gas -mno-shared.
489
490 2005-03-03  H.J. Lu  <[email protected]>
491
492         * elf-bfd.h (elf_backend_data): Add "const char *" to
493         elf_backend_section_from_phdr.
494
495         * elf.c (bfd_section_from_phdr): Pass "proc" to the
496         elf_backend_section_from_phdr hook.
497
498 2005-03-02  Daniel Jacobowitz  <[email protected]>
499             Joseph Myers  <[email protected]>
500
501         * elfxx-mips.c (struct mips_got_entry): Add tls_type.
502         (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
503         and tls_ldm_offset.
504         (struct mips_elf_got_per_bfd_arg): Add global_count.
505         (struct mips_elf_count_tls_arg): New.
506         (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
507         (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
508         (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
509         (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
510         (TLS_RELOC_P): Define.
511         (TP_OFFSET, DTP_OFFSET): Define.
512         (dtprel_base, tprel_base): New functions.
513         (mips_elf_link_hash_newfunc): Initialize tls_type.
514         (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
515         (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
516         TLS entries.
517         (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
518         (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
519         (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
520         (mips_tls_got_index): New functions.
521         (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
522         arguments.  Pass them to mips_elf_create_local_got_entry.  Use
523         mips_tls_got_index.
524         (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
525         Handle TLS entries.
526         (mips_elf_got_page, mips_elf_got16_entry): Update calls to
527         mips_elf_create_local_got_entry.
528         (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
529         arguments.  Handle TLS entries.
530         (mips_elf_sort_hash_table_f): Add non-TLS assertions.
531         (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
532         TLS entries.
533         (mips_elf_record_global_got_symbol): Likewise.
534         (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
535         Count TLS entries.
536         (mips_elf_merge_gots): Handle TLS entries when merging.
537         (mips_elf_initialize_tls_index): New function.
538         (mips_elf_set_global_got_offset): Handle TLS entries.
539         (mips_elf_adjust_gp): Handle TLS.
540         (mips_elf_multi_got): Remove redundant call to
541         mips_elf_resolve_final_got_entries.  Initialize global_count.
542         Correct a comment.  Initialize new TLS members of mips_got_info.
543         Assign TLS GOT indexes for new GOTs.
544         (mips_elf_create_got_section): Initialize new TLS members of
545         mips_got_info.
546         (mips_elf_calculate_relocation): Handle TLS relocs.
547         (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
548         functions.
549         (_bfd_mips_elf_always_size_sections): Handle TLS.
550         (_bfd_mips_elf_size_dynamic_sections): Likewise.
551         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
552         changed functions.
553         (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
554         (_bfd_mips_elf_hide_symbol): Handle TLS.
555         * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
556         (mips_reloc_map): Add TLS relocs.
557         * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
558         * elf64-mips.c (mips_elf64_howto_table_rel)
559         (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
560         * reloc.c: Define new MIPS TLS relocations.
561         * libbfd.h, bfd-in2.h: Regenerated.
562
563 2005-03-02  Jan Beulich  <[email protected]>
564
565         * Makefile.am: Add dependency of cache.o on libiberty.h.
566         * cache.c: Include libiberty.h.
567         (bfd_open_file): Use unlink_if_ordinary instead of unlink.
568
569 2005-03-01  Zack Weinberg  <[email protected]>
570
571         * elf.c (bfd_section_from_shdr <default case>): Call
572         elf_backend_section_from_shdr hook unconditionally, and return
573         what it returns.
574         (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
575         * elfxx-target.h (elf_backend_section_from_shdr)
576         (elf_backend_section_from_phdr): Default to
577         _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
578         respectively.
579
580 2005-03-01  Alan Modra  <[email protected]>
581
582         * targets.h: Typo fix.
583         * bfd-in2.h: Regenerate.
584
585         * bout.c (b_out_write_object_contents): Don't use sizeof on host
586         structs to size on-disk structures.
587         (b_out_set_section_contents): Size the external struct, not the
588         internal one for on-disk size.
589         (b_out_sizeof_headers): Likewise.
590
591 2005-03-01  Alan Modra  <[email protected]>
592
593         * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
594         entry points with the func descriptor as well as undefweak.
595
596 2005-02-28  Ross Ridge  <[email protected]>
597
598         * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
599         present when IMPORT_NAME_UNDOECRATE is used.
600
601 2005-02-28  H.J. Lu  <[email protected]>
602
603         PR 757
604         * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
605         int.
606
607         * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
608         to _bfd_elf_merge_symbol.
609
610         * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
611         unsigned int to return the alignment of the old common symbol
612         in the dynamic object.
613         (_bfd_elf_add_default_symbol): Pass NULL to
614         _bfd_elf_merge_symbol.
615         (elf_link_add_object_symbols): Pass &old_alignment to
616         _bfd_elf_merge_symbol. Get the alignment of the new common
617         symbol in the dynamic object.
618
619 2005-02-24  Ben Elliston  <[email protected]>
620
621         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
622         * format.c (bfd_check_format_matches): Likewise.
623         * archive.c (BFD_GNU960_ARMAG): Likewise.
624         (bfd_generic_archive_p): Likewise.
625         (_bfd_write_archive_contents): Likewise.
626
627 2005-02-24  H.J. Lu  <[email protected]>
628
629         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
630         * configure: Regenerate.
631
632 2005-02-24  Julian Brown  <[email protected]>
633
634         * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
635         COMDAT group sections to have default visibility.
636
637 2005-02-24  Alan Modra  <[email protected]>
638
639         * coffcode.h (coff_print_aux): Warning fix.
640         * elf-m10300.c (mn10300_elf_relax_section): Use section->id
641         instead of section pointer to identify.
642         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
643         the correct size buffer for local sym mangling too.
644         (h8300_bfd_link_add_symbols): Likewise.
645         * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
646         warning.
647         * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
648         * elf32-xtensa.c (literal_value_hash): Warning fix.
649         * versados.c (process_otr): Warning fix.
650         (versados_canonicalize_reloc): Likewise.
651         * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
652         * vms.c (fill_section_ptr): Warning fix.
653
654 2005-02-23  H.J. Lu  <[email protected]>
655
656         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
657         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
658
659 2005-02-23  Nick Clifton  <[email protected]>
660
661         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
662         the relvaddr field of the Elf32_crinfo structure.
663
664         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
665         variables that are passed by reference to
666         m68hc11_get_relocation_value in case that function does not
667         initialise them.
668
669         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
670         return statements and replace with a single return at the end of
671         the function.  This helps pacify the flow analysis code in gcc 4.0.
672
673         * elf.c (_bfd_elf_compute_section_file_positions): Initialise
674         strtab to avoid compile time warning.
675
676 2005-02-23  Ben Elliston  <[email protected]>
677
678         * opncls.c (bfd_zalloc): Document this function.
679
680 2005-02-21  H.J. Lu  <[email protected]>
681
682         * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
683         SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
684         Replace SEC_SHARED with SEC_COFF_SHARED.
685         (styp_to_sec_flags): Likewise.
686
687         * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
688         (TARGET_LITTLE_SYM): Likewise.
689
690         * section.c (SEC_ARCH_BIT_0): Removed.
691         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
692         SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
693         (SEC_SHARED): Renamed to ...
694         (SEC_COFF_SHARED): This.
695         (SEC_BLOCK): Renamed to ...
696         (SEC_TIC54X_BLOCK): This.
697         (SEC_CLINK): Renamed to ...
698         (SEC_TIC54X_CLINK): This.
699         (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
700         SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
701         end.
702         * bfd-in2.h: Regenerated.
703
704 2005-02-21  Fred Fish  <[email protected]>
705
706         * dwarf2.c (find_abstract_instance_name): Call recursively
707         to handle a DW_AT_specification.
708
709 2005-02-21  Thiemo Seufer  <[email protected]>
710
711         * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
712         mips_elf_create_dynamic_relocation,
713         _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
714         Remove #if 0'd code.
715
716 2005-02-21  Alan Modra  <[email protected]>
717
718         * Makefile.am: Run "make dep-am"
719         * Makefile.in: Regenerate.
720
721 2005-02-21  Alan Modra  <[email protected]>
722
723         * coffgen.c (bfd_coff_get_comdat_section): Check that
724         coff_section_data isn't NULL.
725
726 2005-02-21  Alan Modra  <[email protected]>
727
728         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
729         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
730         * coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
731         useless assignments.
732         (xcoff_write_archive_contents_big): Likewise.
733         (_bfd_xcoff_put_ldsymbol_name): Likewise.
734         * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
735         * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
736         * cofflink.c (process_embedded_commands): Warning fixes.
737         * cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
738         Warning fixes.
739         * dwarf2.c: Warning fixes.
740         * elf-bfd.h: Likewise.
741         * elf-eh-frame.c: Likewise.
742         * elf-strtab.c: Likewise.
743         * elf.c: Likewise.
744         * elf32-m68k.c: Likewise.
745         * elf32-ppc.c: Likewise.
746         * elf32-sh-symbian.c: Likewise.
747         * elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
748         * elf64-sh64.c: Likewise.
749         * peicode.h: Likewise.
750         * elf64-mmix.c: Warning fixes.
751         * elfcode.h: Likewise.
752         * elfxx-mips.c: Likewise.
753         * libbfd-in.h: Likewise.
754         * libbfd.c: Likewise.
755         * mach-o.c: Likewise.
756         * merge.c: Likewise.
757         * mmo.c: Likewise.
758         * opncls.c: Likewise.
759         * pef.c: Likewise.
760         * srec.c: Likewise.
761         * vms-hdr.c: Likewise.
762         * vms-tir.c: Likewise.
763         * xtensa-isa.c: Likewise.
764         * xtensa-modules.c: Likewise.
765         * xsym.c: Likewise.
766         (pstrcmp): Use correct choice of string lengths.  Fix return value.
767         (bfd_sym_module_name): Correct string length.
768         * bfd-in2.h: Regenerate.
769         * libbfd.h: Regenerate.
770
771 2005-02-17  Alexandre Oliva  <[email protected]>
772
773         * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
774         uninitialized check_segment[1] in TLSMOFF case.
775         Reported by Alan Modra.
776         (elf32_frv_relocate_section): Improve errors and warnings.
777
778 2005-02-17  Alan Modra  <[email protected]>
779
780         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
781
782 2005-02-16  Alan Modra  <[email protected]>
783
784         * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
785         * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
786         * pef.c (bfd_pef_scan): Don't ignore return value of
787         bfd_pef_scan_start_address.
788         * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
789         bfd_mach_o_scan_start_address.
790         * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
791         * elfxx-mips.c: Remove unnecessary prototypes.
792         (sort_dynamic_relocs_64): Abort if not BFD64.
793
794 2005-02-16  Alan Modra  <[email protected]>
795
796         * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
797         Skip toc reloc adjust if reloc_count is zero.
798
799 2005-02-15  Nigel Stephens  <[email protected]>
800             Maciej W. Rozycki  <[email protected]>
801
802         * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
803         reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
804         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
805         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
806         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
807         dst_mask.
808         (mips16_gprel_reloc): Remove bit shuffling; call
809         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
810         and _bfd_mips16_elf_reloc_shuffle() instead.
811         (mips16_reloc_map): New reloc map for MIPS16 relocs.
812         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
813         relocs.
814         (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
815         elf_mips16_howto_table_rel.
816         * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
817         MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
818         relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
819         (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
820         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
821         dst_mask.
822         (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
823         reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
824         R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
825         placeholders.
826         (mips16_gprel_reloc): Remove bit shuffling; call
827         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
828         and _bfd_mips16_elf_reloc_shuffle() instead.
829         (mips16_reloc_map): New reloc map for MIPS16 relocs.
830         (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
831         relocs.
832         (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
833         mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
834         * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
835         REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
836         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
837         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
838         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
839         dst_mask.
840         (mips16_gprel_reloc): Remove bit shuffling; call
841         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
842         and _bfd_mips16_elf_reloc_shuffle() instead.
843         (mips16_reloc_map): New reloc map for MIPS16 relocs.
844         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
845         relocs.
846         (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
847         elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
848         * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
849         handle bit shuffling for MIPS16 relocs.
850         (_bfd_mips16_elf_reloc_shuffle): Likewise.
851         (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
852         and _bfd_mips16_elf_reloc_shuffle().
853         (_bfd_mips_elf_generic_reloc): Likewise.
854         (mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
855         and R_MIPS16_LO16.
856         (mips_elf_obtain_contents): Remove bit shuffling.
857         (mips_elf_perform_relocation): Likewise; call
858         _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
859         instead.
860         (_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
861         and R_MIPS16_LO16.
862         * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
863         (_bfd_mips16_elf_reloc_shuffle): Likewise.
864         * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
865         (BFD_RELOC_MIPS16_HI16_S): Likewise.
866         (BFD_RELOC_MIPS16_LO16): Likewise.
867         * bfd-in2.h: Regenerate.
868         * libbfd.h: Regenerate.
869
870 2005-02-15  Jan Beulich  <[email protected]>
871
872         * elfxx-ia64.c (ia64_howto_table): Correct strings for
873         R_IA64_DTPMOD64[LM]SB.
874
875 2005-02-14  H.J. Lu  <[email protected]>
876
877         * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
878         backward branch in the same section.
879         (elfNN_ia64_relocate_section): Inform users that the input
880         section is too big to relax br instruction when overflow
881         happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
882         and R_IA64_PCREL21F.
883
884 2005-02-14 Orjan Friberg <[email protected]>
885
886         * elfcore.h (elf_core_file_p): Move the call to
887         elf_backend_object_p to allow the correct machine to be set before
888         processing the program headers.
889
890 2005-02-14  Nick Clifton  <[email protected]>
891
892         PR binutils/716
893         * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
894         aware flag from the input bfd to the output bfd.
895
896 2005-02-11  Maciej W. Rozycki  <[email protected]>
897
898         * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
899         R_MIPS_LITERAL relocations for external symbols.
900         * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
901         * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
902
903 2005-02-11  H.J. Lu  <[email protected]>
904
905         * bfd-in2.h: Rebuilt.
906
907 2005-02-11  Paul Brook  <[email protected]>
908
909         * elf-bfd.h (struct elf_link_hash_table): Add
910         is_relocatable_executable.
911         * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
912         * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
913         symbols in relocatable executables.
914         (bfd_elf_record_link_assignment): Create dynamic section symbols in
915         relocatable executables.
916         (_bfd_elf_link_renumber_dynsyms): Ditto.
917         (bfd_elf_final_link): Ditto.
918         * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
919         relocations into relocatable executables.
920         (elf32_arm_check_relocs): Crate dynamic sections for relocatable
921         executables.  Also copy absolute relocations.
922         (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
923         in relocatable executables.
924         (allocate_dynrelocs): Copy relocations for relocatable executables.
925         Output dynamic symbols for symbols defined in linker scripts.
926
927 2005-02-11  Nick Clifton  <[email protected]>
928
929         * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
930         to avoid a compile time warning.
931
932         * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
933         BFD_ASSERT.
934
935         * coff-tic4x.c (coff_rtype_to_howto): Move definition before
936         inclusion of coffcode.h so that it is actually picked up.
937
938         * coffcode.h (coff_std_swap_table): Add an unused attribute in
939         case it is not used.
940
941         * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
942         structure and macro.
943
944         * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
945         array.
946
947         * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
948         to protect the declaration of this array.
949
950         * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
951         Avoid call to memcpy with a size of 0.
952
953 2005-02-12  Alan Modra  <[email protected]>
954
955         * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
956         old-style branches to undefined dot-symbols which will be
957         satisfied by a plt call.
958
959 2005-02-11  Alan Modra  <[email protected]>
960
961         * elf64-ppc.c (move_plt_plist): New function, extracted from..
962         (ppc64_elf_copy_indirect_symbol): ..here.
963         (func_desc_adjust): Use move_plt_plist.
964
965 2005-02-10  Paul Brook  <[email protected]>
966
967         * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
968
969 2005-02-10  Paul Brook  <[email protected]>
970
971         * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
972         symbols local.
973         (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
974         (elf_link_renumber_local_hash_table_dynsyms): New function.
975         (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
976
977 2005-02-10  Jakub Jelinek  <[email protected]>
978
979         * bfd-in.h (BFD_LINKER_CREATED): Define.
980         * bfd-in2.h: Rebuilt.
981         * elflink.c (bfd_elf_size_dynamic_sections): Disregard
982         BFD_LINKER_CREATED bfds when determining input bfds without
983         .note.GNU-stack section.
984
985 2005-02-10  Maciej W. Rozycki  <[email protected]>
986
987         * elf64-mips.c (mips16_gprel_reloc): Update a comment.
988         * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
989         relocations against external symbols unchanged.
990
991 2005-02-08  Paul Brook  <[email protected]>
992
993         * elflink.c (elf_link_input_bfd): Ignore symbols from null input
994         sections.
995
996 2005-02-08  Hans-Peter Nilsson  <[email protected]>
997
998         * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
999         prefix here.
1000
1001 2005-02-07  Maciej W. Rozycki  <[email protected]>
1002
1003         * elf64-mips.c: Fix formatting throughout.
1004
1005 2005-02-07  Maciej W. Rozycki  <[email protected]>
1006
1007         * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
1008
1009 2005-02-07  Alexandre Oliva  <[email protected]>
1010
1011         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
1012         *ABS*/*UND* sections.
1013         (elf32_frv_relocate_section): Move zero-addend-required error...
1014         (_frv_emit_got_relocs_plt_entries): ... here.  Report error for
1015         missing needed TLS section.
1016
1017 2005-02-07  Hans-Peter Nilsson  <[email protected]>
1018
1019         * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
1020         being the last symbol.
1021         (aout_link_add_symbols): Just return TRUE if a warning
1022         symbol was last.
1023
1024 2005-02-07  Maciej W. Rozycki  <[email protected]>
1025
1026         * elf32-mips.c (mips_elf_gprel32_reloc): Reject
1027         R_MIPS_GPREL32 relocations against external symbols.
1028         * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
1029         comment.
1030
1031 2005-02-07  Alan Modra  <[email protected]>
1032
1033         * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
1034         * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
1035         elf_string_from_elf_strtab.
1036         (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
1037         (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
1038         if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
1039         SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
1040         looking at cached symtab info first, before iterating over headers.
1041         For SHT_REL and SHT_RELA, load dynsymtab if needed.
1042         * elfcode.h (elf_object_p): Don't load section header stringtab
1043         specially.
1044
1045 2005-02-06  H.J. Lu  <[email protected]>
1046
1047         * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
1048         against protected function when building shared library.
1049
1050         PR 584
1051         * elf64-x86-64.c (is_32bit_relative_branch): New.
1052         (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
1053         protected function symbol when building shared library for
1054         32bit relative branch instruction.
1055
1056 2005-02-06  Alan Modra  <[email protected]>
1057
1058         * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
1059         syms when doing a relocatable link.
1060         (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
1061         at u.def.section.
1062         (ppc64_elf_tls_setup): Likewise.
1063         (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
1064
1065 2005-02-04  Alan Modra  <[email protected]>
1066
1067         * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
1068         (link_hash_newfunc): Clear all locals using memset.
1069         (make_fdh): Remove flags param.  Always create fake func desc
1070         weak.  Link the descriptor with the code entry sym.
1071         (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
1072         (add_symbol_adjust): Adjust make_fdh call.
1073         (func_desc_adjust): Likewise.  Twiddle any pre-existing fake
1074         descriptor to strong undefined if code entry is strong.
1075
1076 2005-02-04  Alan Modra  <[email protected]>
1077
1078         * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
1079         lookup here.  Set to new before calling bfd_link_repair_undef_list.
1080         (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
1081
1082 2005-02-03  Alan Modra  <[email protected]>
1083
1084         * linker.c (_bfd_link_hash_newfunc): Set all local fields.
1085
1086 2005-02-03  Alan Modra  <[email protected]>
1087
1088         * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
1089         * elflink.c (elf_smash_syms): Restore symbols that were undefweak
1090         before the as-needed lib was loaded.  Abort on unexpected refs.
1091
1092 2005-02-02  Alan Modra  <[email protected]>
1093
1094         * elflink.c (elf_smash_syms): Expand comments.
1095         (elf_link_add_object_symbols): Only call elf_smash_syms for
1096         as-needed dynamic objects.
1097
1098         * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
1099         everything, just the field specific to ia64.
1100         * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
1101
1102 2005-02-01  Alan Modra  <[email protected]>
1103
1104         * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
1105         (make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
1106         undefined syms.
1107         (struct add_symbol_adjust_data): New.
1108         (add_symbol_adjust): Make an undefweak func desc for old ABI
1109         objects to link with --as-needed shared libs.  Return fail status.
1110         Don't adjust old ABI func entry sym to weak if func desc syms
1111         isn't defined.
1112         (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
1113         and return status.
1114
1115 2005-02-01  Hans-Peter Nilsson  <[email protected]>
1116
1117         * cpu-cris.c (get_compatible): Rearrange disabled code and comment
1118         for clarity.
1119
1120 2005-02-01  Alan Modra  <[email protected]>
1121
1122         * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
1123         * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
1124         remove anything but new and undefweak.
1125         * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
1126         existing _DYNAMIC.
1127         (_bfd_elf_create_dynamic_sections): Formatting.
1128         (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
1129         (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
1130         (struct elf_smash_data): New.
1131         (elf_smash_syms): New function.
1132         (elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
1133         unneeded dynamic objects to loaded list.
1134         (elf_link_output_extsym): Don't handle as-needed here.  Strip
1135         bfd_link_hash_new symbols.
1136         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1137         delref when dynindx is already -1.
1138         * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
1139         symbols.
1140         * elfxx-mips.c (mips_elf_output_extsym): Likewise.
1141
1142 2005-02-01  Ben Elliston  <[email protected]>
1143
1144         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
1145
1146 2005-02-01  Ben Elliston  <[email protected]>
1147
1148         * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
1149         bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
1150         coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
1151         coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
1152         cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
1153         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
1154         elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
1155         elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
1156         i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
1157         nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
1158         pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
1159         sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
1160         hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
1161         throughout. Similarly, collapse #if 1'd code.
1162
1163 2005-02-01  Ben Elliston  <[email protected]>
1164
1165         * elf-bfd.h (bfd_elf_discard_group): Remove.
1166         * elf.c (bfd_elf_discard_group): Likewise.
1167         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
1168
1169 2005-01-31  Richard Sandiford  <[email protected]>
1170
1171         * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
1172         (_bfd_elf_eh_frame_address_size): Declare.
1173         * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
1174         (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
1175         * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
1176         (elf_backend_eh_frame_address_size): Define.
1177         * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
1178         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
1179         size from the new backend hook.
1180         (_bfd_elf_write_section_eh_frame): Likewise.
1181         (_bfd_elf_eh_frame_address_size): New function.
1182
1183 2005-01-31  Andrew Cagney  <[email protected]>
1184
1185         * configure: Regenerate to track ../gettext.m4.
1186
1187 2005-01-31  Mark Mitchell  <[email protected]>
1188
1189         * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
1190         SHF_WRITE for .init_array, .fini_array, and .preinit_array.
1191
1192 2005-01-31  Nick Clifton  <[email protected]>
1193
1194         * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
1195         sparc-lynxos, vax-vms) be obsolete.
1196
1197 2005-01-28  Daniel Jacobowitz  <[email protected]>
1198
1199         * elf-bfd.h (struct elf_backend_data): Add minpagesize.
1200         * elf32-arm.c (ELF_MINPAGESIZE): Define.
1201         * elf32-ppc.c (ELF_MINPAGESIZE): Define.
1202         * elfcode.h (elf_object_p): Use minpagesize instead of
1203         maxpagesize.
1204         * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
1205         (elfNN_bed): Include ELF_MINPAGESIZE.
1206
1207 2005-01-28  Julian Brown  <[email protected]>
1208
1209         * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1210         * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1211         * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
1212         (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
1213         passing flag value from ld. Set flag value in global hash table entry.
1214         (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
1215         relocation.
1216
1217 2005-01-27  Andrew Cagney  <[email protected]>
1218
1219         * configure: Regenerate to track ../gettext.m4 change.
1220
1221 2005-01-25  Mark Mitchell  <[email protected]>
1222
1223         * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
1224         SymbianOS.
1225
1226 2005-01-25  Alexandre Oliva  <[email protected]>
1227
1228         2004-12-10  Alexandre Oliva  <[email protected]>
1229         * elf32-frv.c (elf32_frv_relocate_section): Force local binding
1230         for TLSMOFF.
1231         * reloc.c: Add R_FRV_TLSMOFF.
1232         * elf32-frv.c (elf32_frv_howto_table): Likewise.
1233         (frv_reloc_map, frv_reloc_type_lookup): Map it.
1234         (elf32_frv_relocate_section): Handle it.
1235         (elf32_frv_check_relocs): Likewise.
1236         * libbfd.h, bfd-in2.h: Rebuilt.
1237         2004-11-26  Alexandre Oliva  <[email protected]>
1238         * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
1239         when given an undefweak TLS symbol.  Fix constant TLS PLT entries
1240         such that they return the constant in gr9.
1241         (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
1242         symbols.
1243         (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
1244         too, such that they shrink on relaxation.
1245         (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
1246         marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
1247         (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
1248         if we can guarantee the use of 16-bit constants.
1249         2004-11-10  Alexandre Oliva  <[email protected]>
1250         Introduce TLS support for FR-V FDPIC.
1251         * reloc.c: Add TLS relocations.
1252         * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
1253         (elf32_frv_rel_tlsdesc_value_howto): New.
1254         (elf32_frv_rel_tlsoff_howto): New.
1255         (frv_reloc_map): Add new mappings.
1256         (struct frvfdpic_elf_link_hash_table): Add pointer to summary
1257         reloc information.
1258         (frvfdpic_dynamic_got_plt_info): New.
1259         (frvfdpic_plt_tls_ret_offset): New.
1260         (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
1261         (struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
1262         (struct _frvfdpic_dynamic_got_plt_info): Likewise.
1263         (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
1264         section as local.
1265         (struct frvfdpic_relocs_info): Add TLS fields.
1266         (frvfdpic_relocs_info_hash): Warning clean up.
1267         (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
1268         (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
1269         (FRVFDPIC_TLS_BIAS): Define.
1270         (tls_biased_base): New.
1271         (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
1272         relocations.
1273         (frv_reloc_type_lookup): Likewise.
1274         (frvfdpic_info_to_howto_rel): Likewise.
1275         (elf32_frv_relocate_section): Likewise.
1276         (_frv_create_got_section): Create the PLT section here.
1277         (elf32_frvfdpic_create_dynamic_sections): Not here.
1278         (_frvfdpic_count_nontls_entries): Move out of...
1279         (_frvfdpic_count_got_plt_entries): ... here.
1280         (_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
1281         (_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
1282         support.
1283         (_frvfdpic_relax_tls_entries): New.
1284         (_frvfdpic_compute_got_alloc_data): Add TLS support.
1285         (_frvfdpic_get_tlsdesc_entry): New.
1286         (_frvfdpic_assign_got_entries): Add TLS support.
1287         (_frvfdpic_assign_plt_entries): Likewise.
1288         (_frvfdpic_reset_got_plt_entries): New.
1289         (_frvfdpic_size_got_plt): Move out of...
1290         (elf32_frvfdpic_size_dynamic_sections): ... here.
1291         (_frvfdpic_relax_got_plt_entries): New.
1292         (elf32_frvfdpic_relax_section): New.
1293         (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
1294         (elf32_frv_check_relocs): Add TLS support.
1295         (bfd_elf32_bfd_relax_section): Define for FDPIC.
1296         * libbfd.h, bfd-in2.h: Rebuilt.
1297
1298 2005-01-25  Alan Modra  <[email protected]>
1299
1300         * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
1301         loadable reloc sections.
1302         (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
1303         (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
1304
1305 2005-01-25  Alan Modra  <[email protected]>
1306
1307         * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
1308         sections immediately when linking shared libs.  Instead, wait until
1309         we know a lib is needed.
1310         (_bfd_elf_link_create_dynstrtab): Extract from..
1311         (_bfd_elf_link_create_dynamic_sections_): ..here.
1312         (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
1313         _bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
1314         for non-existent .dynamic.
1315         (elf_link_output_extsym): Don't complain about undefined symbols
1316         in as-needed dynamic libs that aren't actually linked.
1317
1318 2005-01-24  Andrew Cagney  <[email protected]>
1319
1320         * configure: Regenerate, ../gettext.m4 was updated.
1321
1322 2005-01-21  Ben Elliston  <[email protected]>
1323
1324         * aout-encap.c: Remove unused file.
1325
1326 2005-01-19  H.J. Lu  <[email protected]>
1327
1328         PR 679
1329         * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
1330         non-function symbols are local.
1331         (_bfd_elf_symbol_refs_local_p): Likewise.
1332
1333 2005-01-18  Alan Modra  <[email protected]>
1334
1335         * bfd.c (bfd_link_just_syms): Add abfd param.
1336         * bfd-in2.h: Regenerate.
1337
1338 2005-01-17  Richard Sandiford  <[email protected]>
1339
1340         * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
1341         (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
1342         instructions.  If the amount of padding is known, reduce the size
1343         of the CIE or FDE by that amount.
1344
1345 2005-01-17  Richard Sandiford  <[email protected]>
1346
1347         * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
1348         augmentation_size.  Use bfd_signed_vmas for data_align.
1349         * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
1350         (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
1351         functions.  Don't read past the end of the enclosing CIE or FDE.
1352         (skip_bytes): New utility function.
1353         (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
1354         sanity checking.
1355         (_bfd_elf_write_section_eh_frame): Use new functions.
1356
1357 2005-01-17  Richard Sandiford  <[email protected]>
1358
1359         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
1360         assert-style REQUIRE() macro to handle sanity checks.
1361
1362 2005-01-17  H.J. Lu  <[email protected]>
1363
1364         * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
1365         (comp_unit): Here.
1366         (read_unsigned_leb128): Removed.
1367         (read_signed_leb128): Removed.
1368         (find_abstract_instance_name): Updated.
1369         (parse_comp_unit): Accept info_ptr_unit.
1370         (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
1371         comp unit and pass it to parse_comp_unit.
1372
1373         * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
1374         (read_signed_leb128): Moved to ...
1375         * libbfd.c: Here.
1376
1377         * libbfd-in.h (read_unsigned_leb128): New prototype.
1378         (read_signed_leb128): Likewise.
1379         * libbfd.h: Regenerated.
1380
1381 2005-01-17  Andrew Stubbs  <[email protected]>
1382             Nick Clifton   <[email protected]>
1383
1384         * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
1385         arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
1386         arch_sh4a_nofpu_up in order to match the external names and make the
1387         testsuite's job easier.
1388         * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
1389         names.
1390         * bfd-in2.h: Regenerate.
1391
1392 2005-01-15  Andrew Cagney  <[email protected]>
1393
1394         * bfd.m4: New file.
1395         * acinclude.m4: Move BFD_NEED_DECLARATION,
1396         BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
1397         the new file bfd.m4.  Include ../bfd/bfd.m4.
1398         * configure: Re-generate.
1399
1400 2005-01-12  Alan Modra  <[email protected]>
1401
1402         * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
1403         (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
1404         reaching PLT.
1405         (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
1406         R_PPC_RELAX32PC_PLT.
1407
1408 2005-01-11  Alan Modra  <[email protected]>
1409
1410         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
1411         symbols.
1412         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1413         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1414         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1415         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1416         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1417         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1418         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
1419         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1420         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1421         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
1422         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1423         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1424         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1425         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1426
1427 2005-01-11  Alan Modra  <[email protected]>
1428
1429         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
1430         .dynsbss flags.
1431
1432 2005-01-10  Inderpreet Singh <[email protected]>
1433
1434         * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
1435         * bfd-in2.h:  Regenerate.
1436         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
1437         to support these new machine values.
1438         * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
1439         the maxq10.
1440         (bfd_maxq_arch): Update values for the maxq20.
1441
1442 2005-01-10  Eric Botcazou  <[email protected]>
1443
1444         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
1445         non-shared object, do not reserve space in .plt and .rela.plt for
1446         regular symbols neither defined nor referenced in shared objects.
1447
1448 2005-01-09  Eric Botcazou  <[email protected]>
1449
1450         * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
1451         to zero the structure.
1452         (create_got_section): Use BFD_ASSERT instead of abort.
1453         * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
1454         'srelgot' fields.
1455         (create_got_section): New function.
1456         (sparc64_elf_create_dynamic_sections): Likewise.
1457         (sparc64_elf_check_relocs): Invoke create_got_section instead of
1458         _bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
1459         (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
1460         (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
1461         (sparc64_elf_finish_dynamic_symbol): Likewise.
1462         (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
1463         (elf_backend_create_dynamic_sections): Define to
1464         sparc64_elf_create_dynamic_sections.
1465
1466 2005-01-09  Eric Botcazou  <[email protected]>
1467
1468         * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
1469         (elf_backend_omit_section_dynsym): Define to it.
1470         * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
1471         (elf_backend_omit_section_dynsym): Define to it.
1472
1473 2005-01-07  Jakub Jelinek  <[email protected]>
1474
1475         * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
1476         PT_DYNAMIC segment, unless .dynamic.
1477
1478 2005-01-06  Paul Brook  <[email protected]>
1479
1480         * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
1481         * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
1482         * configure: Regenerate.
1483         * elf32-arm.c: Add VxWorks target bfd.
1484         (USE_REL): Remove.
1485         (elf32_arm_link_hash_table): Add use_rel.
1486         (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
1487         elf32_arm_relocate_section): Replace USE_REL with runtime check.
1488         Correct offset calculation for RELA case.
1489         (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
1490         elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
1491         (elf32_arm_vxworks_link_hash_table_create): New function.
1492         * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
1493         (bfd_elf32_littlearm_vxworks_vec): Ditto.
1494         (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
1495
1496 2005-01-06  Alan Modra  <[email protected]>
1497
1498         * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
1499         multi_toc_needed.
1500         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
1501         (ppc64_elf_check_relocs): Update references to has_gp_reloc.
1502         (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
1503         (ppc64_elf_next_toc_section): Heed no_multi_toc.
1504         (ppc64_elf_reinit_toc): Set multi_toc_needed.
1505         (toc_adjusting_stub_needed): Rewrite.
1506         (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
1507         toc tests.  Adjust for toc_adjusting_stub_needed changes.
1508         (ppc64_elf_size_stubs): Update references to has_gp_reloc.
1509         * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
1510         * section.c: Expand comment on backend bits.
1511         * bfd-in2.h: Regenerate.
1512         * libbfd.h: Regenerate.
1513
1514 2005-01-06  Alan Modra  <[email protected]>
1515
1516         * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
1517         toc adjusting stub, do not test source section flags.
1518
1519 2005-01-05  Eric Botcazou  <[email protected]>
1520
1521         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1522         from STABS debugging sections again.
1523
1524 2005-01-05  Fred Fish  <[email protected]>
1525
1526         * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
1527         (find_abstract_instance_name): New function.
1528         (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
1529         (scan_unit_for_functions): Handle DW_AT_abstract_origin.
1530         (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
1531
1532 2004-12-31  Paul Brook  <[email protected]>
1533
1534         * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
1535
1536 2004-12-31  Alan Modra  <[email protected]>
1537
1538         * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
1539         Commit missing changes from 2004-12-22.
1540         * bfd-in2.h: Regenerate.
1541
1542 2004-12-23  Tomer Levi  <[email protected]>
1543
1544         * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
1545
1546 2004-12-21  Kris Warkentin  <[email protected]>
1547
1548         * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
1549         Add 'base' argument for constructing register sections.  Reformat.
1550         (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
1551         gp and fp regs.  Reformat.
1552
1553 2004-12-22  Klaus Rudolph  <[email protected]>
1554
1555         * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
1556         * bfd-in2.h: Regenerate.
1557         * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
1558         (avr_reloc_map): Likewise.
1559         (avr_final_link_relocate): Likewise.
1560
1561 2004-12-22  Alan Modra  <[email protected]>
1562
1563         * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
1564         as-needed dynamic libs as undefined.
1565         (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
1566         libs when finding they are needed.
1567
1568 2004-12-20  Alan Modra  <[email protected]>
1569
1570         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
1571         (opd_entry_value): Use opd_relocs if available.
1572         (ppc64_elf_relocate_section): Don't set reloc_done.  Instead
1573         copy .opd relocations to opd_relocs.
1574         (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
1575
1576 2004-12-16  Richard Sandiford  <[email protected]>
1577
1578         * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
1579         * elf32-v850.c (v850_elf_howto_table): Add entry for
1580         R_V850_LO16_SPLIT_OFFSET.
1581         (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
1582         (v850_elf_perform_lo16_relocation): New function, extracted from...
1583         (v850_elf_perform_relocation): ...here.  Use it to handle
1584         R_V850_LO16_SPLIT_OFFSET.
1585         (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
1586         R_V850_LO16_SPLIT_OFFSET.
1587         * libbfd.h, bfd-in2.h: Regenerate.
1588
1589 2004-12-14  P.J. Darcy  <[email protected]>
1590
1591         * config.bfd: Add s390x-ibm-tpf support.
1592
1593 2004-12-14  Tomer Levi  <[email protected]>
1594
1595         * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
1596         to prototype, to make hash info available.
1597         Prevent wrapped symbols from being adjusted twice.
1598
1599 2004-12-14  Richard Sandiford  <[email protected]>
1600
1601         * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
1602         overflow for calls to undefined weak symbols.
1603
1604 2004-12-11  Alan Modra  <[email protected]>
1605
1606         * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
1607         canonical sections syms have a name.
1608
1609 2004-12-11  Alan Modra  <[email protected]>
1610
1611         * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
1612         have been adjusted for output.
1613         (ppc64_elf_relocate_section): Mark sections with reloc_done.
1614
1615 2004-12-10  Alan Modra  <[email protected]>
1616
1617         * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
1618         add symtab_hdr param.
1619         (group_signature): Update calls.
1620         * elf-bfd.h (bfd_elf_sym_name): Update.
1621         * elf32-ppc.c (ppc_elf_relocate_section): Update.
1622         * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
1623         (ppc64_elf_relocate_section): Update.
1624         * elflink.c (elf_link_input_bfd): Update.
1625
1626 2004-12-10  Jakub Jelinek  <[email protected]>
1627
1628         * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
1629         st_shndx on STT_SECTION sections.
1630
1631 2004-12-09  Daniel Jacobowitz  <[email protected]>
1632
1633         * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
1634         ELF section symbols.
1635
1636 2004-12-09  Ian Lance Taylor  <[email protected]>
1637
1638         * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
1639         return a real value, unless it is a PLT symbol.
1640         (mips_elf_perform_relocation): On the RM9000, turn a jal into a
1641         bal if possible.
1642
1643         * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
1644         R_MIPS_JALR entry to 0.
1645
1646         * archures.c: Define bfd_mach_mips9000.
1647         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
1648         (mips_set_isa_flags): Handle bfd_mach_mips9000.
1649         * cpu-mips.c (I_mips9000): Define.
1650         (arch_info_struct): Add case for bfd_mach_mips9000.
1651         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
1652         * bfd-in2.h: Regenerate.
1653
1654 2004-12-08  Ian Lance Taylor  <[email protected]>
1655
1656         * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
1657         overflow.
1658
1659 2004-12-07  Ben Elliston  <[email protected]>
1660
1661         * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
1662
1663 2004-12-06  Daniel Jacobowitz  <[email protected]>
1664
1665         Suggested by Fergal Daly <[email protected]>:
1666         * simple.c (simple_dummy_multiple_definition): New function.
1667         (bfd_simple_get_relocated_section_contents): Use it.
1668
1669 2004-12-03  Jan Beulich  <[email protected]>
1670
1671         * elf.c (elf_find_function): Don't use the last file symbol ever,
1672         seen, but the last one seen prior to the symbol being reported.
1673         Don't report a filename at all for global symbols when that might
1674         be ambiguous/wrong.
1675
1676 2004-12-01  Paul Brook  <[email protected]>
1677
1678         * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
1679         (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
1680         version.
1681
1682 2004-12-01  Paul Brook  <[email protected]>
1683
1684         * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
1685         sections undefined.
1686
1687 2004-11-30  Paul Brook  <[email protected]>
1688
1689         * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
1690         no_pipeline_knowledge
1691         (elf32_arm_link_hash_table_create): Ditto.
1692         (bfd_elf32_arm_process_before_allocation): Ditto.
1693         (elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
1694         handling.
1695         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
1696         prototype.
1697         * bfd-in2.h: Regenerate.
1698
1699 2004-11-30  Randolph Chung  <[email protected]>
1700
1701         * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
1702         (elf32_hppa_grok_psinfo): New function.
1703         (elf_backend_grok_prstatus): Define.
1704         (elf_backend_grok_psinfo): Define.
1705
1706 2004-11-24  H.J. Lu  <[email protected]>
1707
1708         PR 574:
1709         * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
1710
1711 2004-11-24  Paul Brook  <[email protected]>
1712
1713         * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
1714
1715 2004-11-24  Paul Brook  <[email protected]>
1716
1717         * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
1718         (elf32_arm_swap_symbol_out): New function.
1719         (elf32_arm_size_info): Add.
1720         (elf_backend_size_info): Define.
1721
1722 2004-11-20  John David Anglin  <[email protected]>
1723
1724         * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
1725         make_bfd_asection.
1726
1727 2004-11-19  Alan Modra  <[email protected]>
1728
1729         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
1730         * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
1731         * nlmcode.h (nlm_write_object_contents): Warning fix.
1732
1733 2004-11-18  Bob Wilson  <[email protected]>
1734
1735         * elf32-xtensa.c (ebb_propose_action): Fix argument order.
1736
1737 2004-11-17  Daniel Jacobowitz  <[email protected]>
1738
1739         * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
1740         (elf32_arm_plt_thumb_stub): New.
1741         (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
1742         and plt_got_offset.
1743         (elf32_arm_link_hash_traverse): Fix typo.
1744         (elf32_arm_link_hash_table): Add obfd.
1745         (elf32_arm_link_hash_newfunc): Initialize new fields.
1746         (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
1747         (elf32_arm_link_hash_table_create): Initialize obfd.
1748         (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
1749         (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
1750         (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
1751         interworking BFD is not dynamic.
1752         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
1753         not emit glue for PLT references.
1754         (elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
1755         emit glue for PLT references.  Support the Thumb PLT prefix.
1756         (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
1757         plt_thumb_refcount.
1758         (elf32_arm_check_relocs): Likewise.
1759         (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
1760         plt_thumb_refcount.
1761         (allocate_dynrelocs): Handle Thumb PLT references.
1762         (elf32_arm_finish_dynamic_symbol): Likewise.
1763         (elf32_arm_symbol_processing): New function.
1764         (elf_backend_symbol_processing): Define.
1765
1766 2004-11-16  Richard Sandiford  <[email protected]>
1767
1768         * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
1769         add_fde_encoding.  Remove need_relative.
1770         * elf-eh-frame.c (extra_augmentation_string_bytes)
1771         (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
1772         (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
1773         in cases where the CIE has no existing 'R' augmentation.  Use
1774         size_of_output_cie_fde when assigning offsets.  Use the final offset
1775         as the new section size.
1776         (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
1777         Account for any extra augmentation bytes in the returned offset.
1778         (_bfd_elf_write_section_eh_frame): Rework so that the entries are
1779         moved before being modified.  Pad growing entries with DW_CFA_nops.
1780         Add 'z' and 'R' augmentations as directed by add_augmentation_size
1781         and add_fde_encoding.
1782
1783 2004-11-15  Mark Mitchell  <[email protected]>
1784
1785         * elf32-arm.c (elf32_arm_relocate_section): Use
1786         arm_real_reloc_type.
1787
1788 2004-11-16  Richard Sandiford  <[email protected]>
1789
1790         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
1791         for discard relocations; don't add an R_MIPS_NONE to the main body
1792         of .rel.dyn.
1793
1794 2004-11-04  Paul Brook  <[email protected]>
1795
1796         * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
1797         * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
1798         (_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
1799         default version definition for unversioned symbols.
1800         * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
1801         * elflink.c (elf_link_add_object_symbols): Pass extra argument to
1802         _bfd_elf_slurp_version_tables.  Set default version for unversioned
1803         imported symbols.
1804
1805 2004-11-15  Paul Brook  <[email protected]>
1806
1807         * elflink.c (elf_link_add_object_symbols): Don't assume version
1808         indices are consecutive.
1809
1810 2004-11-14  Richard Sandiford  <[email protected]>
1811
1812         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
1813         composite relocations against the personality data.
1814
1815 2004-11-13  Paul Brook  <[email protected]>
1816
1817         * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
1818         R_ARM_PREL31 relocations to PLT entries.
1819         (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
1820         (elf32_arm_check_relocs): Ditto.
1821
1822 2004-11-12  Bob Wilson  <[email protected]>
1823
1824         * xtensa-isa.c (xtensa_interface_class_id): New.
1825
1826 2004-11-11  Bob Wilson  <[email protected]>
1827
1828         * elf32-xtensa.c (property_table_compare): Remove assertion about
1829         entries with the same address and non-zero size.
1830         (xtensa_read_table_entries): Report such entries as errors.
1831
1832 2004-11-11  Mark Mitchell  <[email protected]>
1833
1834         * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
1835         R_ARM_RELATIVE on Symbian OS.
1836
1837 2004-11-09  Mark Mitchell  <[email protected]>
1838
1839         * som.c (som_bfd_print_private_bfd_data): New function.
1840         (som_object_setup): Save the auxiliary header.  Don't assume that
1841         zero is an invalid entry point for a shared library.
1842         (som_object_p): Allocate the auxiliary header on the heap.
1843
1844         * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
1845         declaration.
1846         (elf32_arm_symbian_modify_segment_map): Likewise.
1847
1848 2004-11-09  Daniel Jacobowitz  <[email protected]>
1849
1850         From David Poole <[email protected]>:
1851         * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
1852         (elf32_arm_size_dynamic_sections): Call it.
1853
1854 2004-11-09  Alan Modra  <[email protected]>
1855
1856         * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
1857         (ALL_MACHINES_CFILES): Fix typo.
1858         * Makefile.in: Regenerate.
1859         * po/SRC-POTFILES.in: Regenerate.
1860
1861 2004-11-08  Mark Mitchell  <[email protected]>
1862
1863         * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
1864         R_ARM_RELATIVE relocation for Symbian OS, mention the section
1865         symbol in the relocation.
1866
1867 2004-11-08  Inderpreet Singh  <[email protected]>
1868             Vineet Sharma  <[email protected]>
1869
1870         * coff-maxq.c: New File.
1871         * cpu-maxq.c: New File.
1872         * coffcode.h: Likewise.
1873         * config.bfd: Likewise.
1874         * configure.in (maxqcoff_vec): New target vector.
1875         * Makefile.am: Add support for maxq target.
1876         * configure.in: Likewise.
1877         * archures.c:. Likewise.
1878         * targets.c: Likewise.
1879         * bfd_in2.h : Regenerated.
1880         * Makefile.in: Regenerated.
1881         * configure: Regenerated.
1882         * doc/Makefile.in: Regenerated.
1883
1884 2004-11-08  Aaron W. LaFramboise <[email protected]>
1885
1886         * coff-i386.c (coff_i386_reloc): Fix weak symbols.
1887         * cofflink.c (_bfd_coff_link_input_bfd): Don't process
1888         C_NT_WEAK aux entries.
1889         (_bfd_coff_generic_relocate_section): Handle undefined
1890         aliases.
1891
1892 2004-11-07  Andreas Schwab  <[email protected]>
1893
1894         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
1895         SYMBOL_CALLS_LOCAL and check for undefweak symbols with
1896         non-default visibility.
1897
1898 2004-11-01  Mark Mitchell  <[email protected]>
1899
1900         * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
1901         D_PAGED.
1902         (elf32_arm_symbian_modify_segment_map): Don't
1903         reset includes_filehdr and includes_phdrs here.
1904
1905 2004-11-04  Daniel Jacobowitz  <[email protected]>
1906
1907         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
1908         elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
1909         (elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
1910         dependency.
1911         * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
1912         to a new removed list.  Remove normal configuration stanzas.
1913         * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
1914         (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
1915         elfarm-nabi.lo with elf32-arm.lo.
1916         (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
1917         * elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
1918         * elf32-arm.h: Remove.
1919         * elfarm-oabi.c: Remove.
1920         * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
1921         and bfd_elf32_littlearm_oabi_vec.
1922         * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
1923
1924 2004-11-04  Hans-Peter Nilsson  <[email protected]>
1925
1926         * config.bfd: Support crisv32-*-* like cris-*-*.
1927         * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
1928         (bfd_mach_cris_v10_v32): New macros.
1929         * cpu-cris.c: Tweak formatting.
1930         (get_compatible): New function.
1931         (N): New macro.
1932         (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
1933         bfd_arch_info_type:s.
1934         (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
1935         get_compatible for member compatible and link bfd_cris_arch_v32 as
1936         next.
1937         * elf32-cris.c (cris_elf_pcrel_reloc)
1938         (cris_elf_set_mach_from_flags): New functions.
1939         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
1940         <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
1941         (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
1942         numbers for bfd_mach_cris_v32.
1943         (PLT_ENTRY_SIZE_V32): New macro.
1944         (elf_cris_plt0_entry): Drop last comma in initializer.
1945         (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
1946         (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
1947         PLT initializers.
1948         (cris_elf_relocate_section): Change all "%B(%A)" messages to
1949         "%B, section %A".
1950         (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
1951         (elf_cris_finish_dynamic_sections): Similar.
1952         (elf_cris_adjust_dynamic_symbol): Similar.
1953         (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
1954         section %A".
1955         <switch with PIC relocs>: Emit error and return FALSE for
1956         bfd_mach_cris_v10_v32.
1957         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1958         Emit warning when generating textrel reloc.
1959         (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
1960         (cris_elf_final_write_processing): Set flags according to mach.
1961         (cris_elf_print_private_bfd_data): Display
1962         EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
1963         (cris_elf_merge_private_bfd_data): Drop variables old_flags,
1964         new_flags.  Don't call cris_elf_final_write_processing.  Don't
1965         look at the actual elf header flags at all; use
1966         bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
1967         in bfd_get_mach for ibfd and obfd and handle merging of compatible
1968         objects.
1969         (bfd_elf32_bfd_copy_private_bfd_data): Define.
1970         * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
1971         (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
1972         (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
1973         * bfd-in2.h, libbfd.h: Regenerate.
1974
1975 2004-11-04  Alan Modra  <[email protected]>
1976
1977         * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
1978         * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
1979         comment.
1980         (struct adjust_toc_info): New.
1981         (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
1982
1983 2004-11-03  Bob Wilson  <[email protected]>
1984
1985         * elf.c (assign_file_positions_for_segments): Set next_file_pos even
1986         if there are no segments.
1987
1988 2004-11-02  Daniel Jacobowitz  <[email protected]>
1989
1990         * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
1991
1992 2004-11-02  Nick Clifton  <[email protected]>
1993
1994         * elf32-iq2000.c: Convert to ISO C90 formatting.
1995
1996 2004-11-02  Hans-Peter Nilsson  <[email protected]>
1997
1998         * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
1999
2000 2004-10-28  H.J. Lu  <[email protected]>
2001
2002         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
2003         undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
2004         R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2005
2006 2004-10-28  Kaz Kojima  <[email protected]>
2007
2008         * elf32-sh.c (tpoff): Take alignment into account.
2009
2010 2004-10-28  Nick Clifton  <[email protected]>
2011
2012         * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
2013         performing a relocatable link.
2014         (iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only
2015         for MIPS ports under Irix.
2016
2017 2004-10-27  Richard Earnshaw  <[email protected]>
2018
2019         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
2020         R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
2021         (elf32_arm_final_link_relocate): Ditto.
2022         (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
2023         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
2024         (elf32_arm_adjust_dynamic_symbol): Ditto.
2025         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
2026         R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
2027         (elf32_arm_r_howto): ... To here.
2028         (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
2029
2030 2004-10-26  H.J. Lu  <[email protected]>
2031
2032         PR 475
2033         * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
2034         R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
2035         and R_IA64_SECREL64LSB.
2036
2037 2004-10-26  Paul Brook  <[email protected]>
2038
2039         * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
2040         (bfd_elf_size_dynamic_sections): Create default version definition.
2041         (elf_link_output_extsym): Adjust for default symbol version.
2042
2043 2004-10-24  Hans-Peter Nilsson  <[email protected]>
2044
2045         * mmo.c: Adjust to ISO C.
2046
2047         * mmo.c (mmo_write_section_description): New function broken out
2048         of mmo_internal_write_section.
2049         (mmo_internal_write_section): For each of .text and .data, call
2050         mmo_write_section_description before outputting contents if it has
2051         nontrivially deducible vma or contents.
2052         (mmo_has_leading_or_trailing_zero_tetra_p): New function.
2053         (mmo_canonicalize_symtab): Adjust absolute symbols to .data
2054         symbols if found within the .data address range.
2055
2056 2004-10-24  Daniel Jacobowitz  <[email protected]>
2057
2058         * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
2059
2060 2004-10-24  Hans-Peter Nilsson  <[email protected]>
2061
2062         * mmo.c (File Layout): Correct place of misplaced blurb about
2063         special data.
2064
2065 2004-10-22  Mark Kettenis  <[email protected]>
2066
2067         * config.bfd: Add mips64*-*-openbsd.
2068
2069 2004-10-21  Bob Wilson  <[email protected]>
2070
2071         * elf32-xtensa.c (ebb_propose_action): Put declarations before
2072         statements.
2073
2074 2004-10-21  H.J. Lu  <[email protected]>
2075
2076         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
2077         * configure: Regenerate.
2078
2079 2004-10-21  H.J. Lu  <[email protected]>
2080
2081         PR 463
2082         * aoutx.h (aout_link_input_section_std): Pass proper hash entry
2083         to linker reloc_overflow callback.
2084         (aout_link_input_section_ext): Likewise.
2085         (aout_link_reloc_link_order): Likewise.
2086         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2087         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2088         Likewise.
2089         (alpha_relocate_section): Likewise.
2090         * coff-arm.c (coff_arm_relocate_section): Likewise.
2091         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
2092         * coff-h8500.c (extra_case): Likewise.
2093         * coff-i960.c (coff_i960_relocate_section): Likewise.
2094         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2095         * coff-mips.c (mips_relocate_section): Likewise.
2096         * coff-or32.c (coff_or32_relocate_section): Likewise.
2097         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2098         * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
2099         * coff-sh.c (sh_relocate_section): Likewise.
2100         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2101         * coff-w65.c (w65_reloc16_extra_cases): Likewise.
2102         * coff-z8k.c (extra_case): Likewise.
2103         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2104         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2105         (_bfd_coff_generic_relocate_section): Likewise.
2106         * ecoff.c (ecoff_reloc_link_order): Likewise.
2107         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2108         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2109         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2110         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2111         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2112         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2113         * elf32-cris.c (cris_elf_relocate_section): Likewise.
2114         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2115         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2116         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2117         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2118         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2119         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2120         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2121         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2122         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2123         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2124         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2125         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2126         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2127         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2128         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2129         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2130         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2131         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2132         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2133         * elf32-sh.c (sh_elf_relocate_section): Likewise.
2134         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2135         * elf32-v850.c (v850_elf_relocate_section): Likewise.
2136         * elf32-vax.c (elf_vax_relocate_section): Likewise.
2137         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2138         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2139         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2140         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2141         * elf64-s390.c (elf_s390_relocate_section): Likewise.
2142         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2143         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2144         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2145         * elflink.c (elf_reloc_link_order): Likewise.
2146         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2147         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2148         (_bfd_elf_mips_get_relocated_section_contents): Likewise.
2149         * linker.c (_bfd_generic_reloc_link_order): Likewise.
2150         * pdp11.c (pdp11_aout_link_input_section): Likewise.
2151         (aout_link_reloc_link_order): Likewise.
2152         * reloc.c (bfd_generic_get_relocated_section_contents):
2153         Likewise.
2154         * xcofflink.c (xcoff_reloc_link_order): Likewise.
2155         * simple.c (simple_dummy_reloc_overflow): Updated.
2156
2157 2004-10-20  Andreas Schwab  <[email protected]>
2158
2159         * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
2160         (elf_backend_plt_sym_val): Define.
2161
2162 2004-10-19  Danny Smith  <[email protected]>
2163
2164         * config.bfd: Set targ_underscore=yes for PE COFF targets
2165
2166 2004-10-19  Alan Modra  <[email protected]>
2167
2168         * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
2169         (ppc64_elf_edit_opd): Likewise.
2170
2171 2004-10-18  Mark Mitchell  <[email protected]>
2172
2173         * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
2174         * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
2175         set SEC_ALLOC and SEC_LOAD.
2176
2177 2004-10-18  Nick Clifton  <[email protected]>
2178
2179         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
2180         'name' for relocs against both local and global symbols.
2181
2182 2004-10-16  Daniel Jacobowitz  <[email protected]>
2183
2184         * bfd-in2.h: Regenerate.
2185         * bfd.c (struct bfd): Add no_export.
2186         * elflink.c (elf_link_add_object_symbols): Handle no_export.
2187
2188 2004-10-15  Alan Modra  <[email protected]>
2189
2190         * config.bfd: Whitespace cleanup.
2191         * Makefile.am: Run "make dep-am"
2192         * Makefile.in: Regenerate.
2193
2194 2004-10-15  Jakub Jelinek  <[email protected]>
2195
2196         * elflink.c (struct already_linked_section): Removed.
2197         (try_match_symbols_in_sections, already_linked): Removed.
2198         (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
2199         prefix of section names when finding already_linked_table
2200         chain.  Compare section names.  Instead of calling already_linked,
2201         do it inline and only for sections in the same already_linked_list.
2202
2203 2004-10-15  Alan Modra  <[email protected]>
2204
2205         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
2206         parameter.  If called after _bfd_elf_write_section_eh_frame,
2207         don't allow a -2 return unless need_* bit is already set, and
2208         handle offsets adjusted for output_offset.
2209         * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
2210         * elf.c (_bfd_elf_section_offset): Update call.
2211
2212 2004-10-13  H.J. Lu  <[email protected]>
2213
2214         PR 440
2215         * coffcode.h (coff_compute_section_file_positions): Cast to
2216         bfd_vma when computing page alignment.
2217
2218 2004-10-13  Mark Mitchell  <[email protected]>
2219
2220         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2221         offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
2222
2223 2004-10-12  Mark Mitchell  <[email protected]>
2224
2225         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
2226         relocations use a virtual address, not a section offset.
2227
2228 2004-10-12  Bob Wilson  <[email protected]>
2229
2230         * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
2231         (narrow_instruction, widen_instruction): Remove unnecessary calls to
2232         xtensa_format_encode.
2233         (ebb_propose_action): Inline call to ebb_add_proposed_action.
2234         (ebb_add_proposed_action): Delete.
2235
2236 2004-10-12  Bob Wilson  <[email protected]>
2237
2238         * elf32-xtensa.c: Use ISO C90 formatting.
2239
2240 2004-10-12  Paul Brook  <[email protected]>
2241
2242         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
2243         message.
2244
2245 2004-10-12  Paul Brook  <[email protected]>
2246
2247         * elf32-arm.h: Support EABI version 4 objects.
2248
2249 2004-10-12  Alan Modra  <[email protected]>
2250
2251         PR 325
2252         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
2253         Don't mark as default.
2254         (bfd_x86_64_arch): Don't mark as default.
2255
2256 2004-10-12  Alan Modra  <[email protected]>
2257
2258         * elflink.c (enum action_discarded): New.
2259         (elf_section_complain_discarded): Delete.
2260         (elf_action_discarded): New function subsuming the above and also
2261         controlling reloc behaviour.
2262         (elf_link_input_bfd): Use it.
2263
2264 2004-10-11  Jakub Jelinek  <[email protected]>
2265
2266         * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
2267         (special_sections): Add .gnu.liblist and .gnu.conflict.
2268         (assign_section_numbers): Handle SHT_GNU_LIBLIST.
2269
2270 2004-10-11  Alan Modra  <[email protected]>
2271
2272         PR 233
2273         * elflink.c (elf_link_input_bfd): Try harder to support
2274         relocations against symbols in removed linkonce sections.
2275
2276 2004-10-11  Alan Modra  <[email protected]>
2277
2278         * elflink.c (elf_link_input_bfd): Revert PR 354 change.
2279
2280         PR 354
2281         * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
2282         sections do not reference symbols in non-SEC_ALLOC sections.
2283
2284 2004-10-11  Alan Modra  <[email protected]>
2285
2286         PR 437
2287         * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
2288         (_bfd_elf_link_omit_section_dynsym): Formatting.
2289
2290 2004-10-10  Alan Modra  <[email protected]>
2291
2292         * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
2293         * libbfd.h: Regnerate.
2294         * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
2295         * elf32-frv.c: Likewise.
2296         * elf32-m32r.c: Likewise.
2297         * elf32-ppc.c: Likewise.
2298         * elf64-hppa.c: Likewise.
2299         * elfxx-ia64.c: Likewise.
2300         * opncls.c: Likewise.
2301
2302 2004-10-10  Alan Modra  <[email protected]>
2303
2304         * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
2305         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
2306         offsets stored in struct eh_cie_fde entries before doing other
2307         work.
2308
2309         * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
2310         (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
2311         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
2312         setting offsets for removed CIEs.  Don't set "sec", instead set
2313         cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
2314         CIE in hdr_info.  Only set make_relative and make_lsda_relative
2315         for CIEs.  Use pointers rather than array indices.
2316         (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
2317         make_lsda_relative, need_* on cie_inf for FDEs.
2318         (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
2319         section output_offset.  Delete cie_offset, instead use cie_inf
2320         pointer to CIE entry.  Use need_relative and need_lsda_relative on
2321         CIE entry for FDEs.  Use pointers rather than array indices.
2322
2323 2004-10-09  Alan Modra  <[email protected]>
2324
2325         * coff-rs6000.c (rs6000coff_vec): Add initializer for
2326         bfd_is_target_special_symbol.
2327         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2328         * som.c (som_bfd_is_target_special_symbol): Define.
2329
2330 2004-10-08  Nick Clifton  <[email protected]>
2331
2332         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
2333         * configure: Regenerate.
2334         * bfd-in2.h: Regenerate.
2335         * syms.c (bfd_is_target_special_symbol): New interface function.
2336         Returns true when a symbol should be considered to be special.
2337         * targets.c (bfd_target): Include bfd_is_target_special_symbol in
2338         the symbol jump table.
2339         * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
2340         Return true iff the symbol is a mapping symbol.
2341         (bfd_elf32_bfd_is_target_special_symbol): Define.
2342         * elfxx-target.h: Provide a default definition for
2343         bfd_is_target_special_symbol.
2344         * aout-target.h: Likewise.
2345         * aout-tic30.c: Likewise.
2346         * binary.c: Likewise.
2347         * coffcode.h: Likewise.
2348         * i386msdos.c: Likewise.
2349         * ieee.c: Likewise.
2350         * ihex.c: Likewise.
2351         * libaout.h: Likewise.
2352         * libbfd-in.h: Likewise
2353         * libecoff.h: Likewise.
2354         * mach-o.c: Likewise.
2355         * mmo.c: Likewise.
2356         * nlm-target.h: Likewise.
2357         * oasys.c: Likewise.
2358         * pef.c: Likewise.
2359         * ppcboot.c: Likewise.
2360         * srec.c: Likewise.
2361         * tekhex.c: Likewise.
2362         * versados.c: Likewise.
2363         * vms.c: Likewise.
2364         * xcoff-target.h: Likewise.
2365         * xsym.c: Likewise.
2366         * libbfd.h: Regenerate.
2367
2368 2004-10-08  Daniel Jacobowitz  <[email protected]>
2369
2370         * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
2371         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
2372         (elf_backend_section_from_shdr): Define.
2373
2374 2004-10-08  Alan Modra  <[email protected]>
2375
2376         * syms.c (bfd_is_local_label): Return false for file symbols.
2377
2378 2004-10-07  Bob Wilson  <[email protected]>
2379             David Heine  <[email protected]>
2380
2381         * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
2382         (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
2383         (elf32xtensa_no_literal_movement): New global variable.
2384         (elf_howto_table): Add entries for new relocations.
2385         (elf_xtensa_reloc_type_lookup): Handle new relocations.
2386         (property_table_compare): When addresses are equal, compare sizes and
2387         various property flags.
2388         (property_table_matches): New.
2389         (xtensa_read_table_entries): Extend to read new property tables.  Add
2390         output_addr parameter to indicate that output addresses should be used.
2391         Use bfd_get_section_limit.
2392         (elf_xtensa_find_property_entry): New.
2393         (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
2394         (elf_xtensa_check_relocs): Handle new relocations.
2395         (elf_xtensa_do_reloc): Use bfd_get_section_limit.  Handle new
2396         relocations.  Use new xtensa-isa.h functions.
2397         (build_encoding_error_message): Remove encode_result parameter.  Add
2398         new target_address parameter used to detect alignment errors.
2399         (elf_xtensa_relocate_section): Use bfd_get_section_limit.  Clean up
2400         error handling.  Use new is_operand_relocation function.
2401         (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
2402         Use underbar macro for error messages.  Formatting.
2403         (get_const16_opcode): New.
2404         (get_l32r_opcode): Add a separate flag for initialization.
2405         (get_relocation_opnd): Operand number is no longer explicit in the
2406         relocation.  Change to decode the opcode and analyze its operands.
2407         (get_relocation_slot): New.
2408         (get_relocation_opcode): Add bfd parameter.  Use bfd_get_section_limit.
2409         Use new xtensa-isa.h functions to handle multislot instructions.
2410         (is_l32r_relocation): Add bfd parameter.  Use is_operand_relocation.
2411         (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
2412         insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
2413         check_loop_aligned, check_branch_target_aligned_address, narrowable,
2414         widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
2415         get_single_format, init_op_single_format_table): New.
2416         (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
2417         instead of calling _bfd_error_handler.  Use new xtensa-isa.h functions.
2418         (contract_asm_expansion): Add error_message parameter and pass it to
2419         elf_xtensa_do_asm_simplify.  Replace use of R_XTENSA_OP0 relocation
2420         with R_XTENSA_SLOT0_OP.
2421         (get_expanded_call_opcode): Extend to handle either L32R or CONST16
2422         instructions.  Use new xtensa-isa.h functions.
2423         (r_reloc struct): Add new virtual_offset field.
2424         (r_reloc_init): Add contents and content_length parameters.  Set
2425         virtual_offset field to zero.  Add contents to target_offset field for
2426         partial_inplace relocations.
2427         (r_reloc_is_defined): Check for null.
2428         (print_r_reloc): New debug function.
2429         (source_reloc struct): Replace xtensa_operand field with pair of the
2430         opcode and the operand position.  Add is_abs_literal field.
2431         (init_source_reloc): Specify operand by opcode/position pair.  Set
2432         is_abs_literal field.
2433         (source_reloc_compare): When target_offsets are equal, compare other
2434         fields to make sorting predictable.
2435         (literal_value struct): Add is_abs_literal field.
2436         (value_map_hash_table struct): Add has_last_loc and last_loc fields.
2437         (init_literal_value): New.
2438         (is_same_value): Replace with ...
2439         (literal_value_equal): ... this function.  Add comparisons of
2440         virtual_offset and is_abs_literal fields.
2441         (value_map_hash_table_init): Use bfd_zmalloc.  Check for allocation
2442         failure.  Initialize has_last_loc field.
2443         (value_map_hash_table_delete): New.
2444         (hash_literal_value): Rename to ...
2445         (literal_value_hash): ... this.  Include is_abs_literal flag and
2446         virtual_offset field in the hash value.
2447         (get_cached_value): Rename to ...
2448         (value_map_get_cached_value): ... this.  Update calls to
2449         literal_value_hash and literal_value_equal.
2450         (add_value_map): Check for allocation failure.  Update calls to
2451         value_map_get_cached_value and literal_value_hash.
2452         (text_action, text_action_list, text_action_t): New types.
2453         (find_fill_action, compute_removed_action_diff, adjust_fill_action,
2454         text_action_add, text_action_add_literal, offset_with_removed_text,
2455         offset_with_removed_text_before_fill, find_insn_action,
2456         print_action_list, print_removed_literals): New.
2457         (offset_with_removed_literals): Delete.
2458         (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
2459         fix_array, fix_array_count, allocated_relocs, relocs_count, and
2460         allocated_relocs_count fields.
2461         (init_xtensa_relax_info): Initialize new fields.
2462         (reloc_bfd_fix struct): Add new translated field.
2463         (reloc_bfd_fix_init): Add translated parameter and use it to set the
2464         translated field.
2465         (fix_compare, cache_fix_array): New.
2466         (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
2467         section via get_xtensa_relax_info.  Use cache_fix_array to set up
2468         sorted fix_array and use bsearch instead of linear search.
2469         (section_cache_t): New struct.
2470         (init_section_cache, section_cache_section, clear_section_cache): New.
2471         (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
2472         (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
2473         extend_ebb_bounds_forward, extend_ebb_bounds_backward,
2474         insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
2475         New.
2476         (retrieve_contents): Use bfd_get_section_limit.
2477         (elf_xtensa_relax_section): Add relocations_analyzed flag.  Update call
2478         to compute_removed_literals.  Free value_map_hash_table when no longer
2479         needed.
2480         (analyze_relocations): Check is_relaxable_asm_section flag.  Call
2481         compute_text_actions for all sections.
2482         (find_relaxable_sections): Mark sections as relaxable if they contain
2483         ASM_EXPAND relocations that can be optimized.  Adjust r_reloc_init
2484         call.  Increment relax_info src_count field only for appropriate
2485         relocation types.  Remove is_literal_section check.
2486         (collect_source_relocs): Use bfd_get_section_limit.  Adjust calls to
2487         r_reloc_init and find_associated_l32r_irel.  Check
2488         is_relaxable_asm_section flag.  Handle L32R instructions with absolute
2489         literals.  Pass is_abs_literal flag to init_source_reloc.
2490         (is_resolvable_asm_expansion): Use bfd_get_section_limit.  Check for
2491         CONST16 instructions.  Adjust calls to r_reloc_init and
2492         pcrel_reloc_fits.  Handle weak symbols conservatively.
2493         (find_associated_l32r_irel): Add bfd parameter and pass it to
2494         is_l32r_relocation.
2495         (compute_text_actions, compute_ebb_proposed_actions,
2496         compute_ebb_actions, check_section_ebb_pcrels_fit,
2497         check_section_ebb_reduces, text_action_add_proposed,
2498         compute_fill_extra_space): New.
2499         (remove_literals): Replace with ...
2500         (compute_removed_literals): ... this function.  Call
2501         init_section_cache.  Use bfd_get_section_limit.  Sort internal_relocs.
2502         Call xtensa_read_table_entries to get the property table.  Skip
2503         relocations other than R_XTENSA_32 and R_XTENSA_PLT.  Use new
2504         is_removable_literal, remove_dead_literal, and
2505         identify_literal_placement functions.
2506         (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
2507         instead of linear search.
2508         (is_removable_literal, remove_dead_literal,
2509         identify_literal_placement): New.
2510         (relocations_reach): Update check for literal not referenced by any
2511         PC-relative relocations.  Adjust call to pcrel_reloc_fits.
2512         (coalesce_shared_literal, move_shared_literal): New.
2513         (relax_section): Use bfd_get_section_limit.  Call
2514         translate_section_fixes.  Update calls to r_reloc_init and
2515         offset_with_removed_text.  Check new is_relaxable_asm_section flag.
2516         Add call to pin_internal_relocs.  Add special handling for
2517         R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs.  Use virtual_offset
2518         info to calculate new addend_displacement variable.  Replace code for
2519         deleting literals with more general code to perform the actions
2520         determined by the action_list for the section.
2521         (translate_section_fixes, translate_reloc_bfd_fix): New.
2522         (translate_reloc): Check new is_relaxable_asm_section flag.  Call
2523         find_removed_literal only if is_operand_relocation.  Update call to
2524         offset_with_removed_text.  Use new target_offset and removed_bytes
2525         variables.
2526         (move_literal): New.
2527         (relax_property_section):  Use bfd_get_section_limit.  Set new
2528         is_full_prop_section flag and handle new property tables.  Update calls
2529         to r_reloc_init and offset_with_removed_text.  Check
2530         is_relaxable_asm_section flag.  Handle expansion of zero-sized
2531         unreachable entries, with use of offset_with_removed_text_before_fill.
2532         For relocatable links, combine entries only for literal tables.
2533         (relax_section_symbols): Check is_relaxable_asm_section flag.  Update
2534         calls to offset_with_removed_text.  Translate st_size field for
2535         function symbols.
2536         (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
2537         failure.  Add contents parameter.  Update call to get_bfd_fix.  Update
2538         call to r_reloc_init.  Call _bfd_error_handler and return FALSE for
2539         R_XTENSA_ASM_EXPAND relocs.
2540         (do_fix_for_final_link): Add input_bfd and contents parameters.  Update
2541         call to get_bfd_fix.  Include offset from contents for partial_inplace
2542         relocations.
2543         (is_reloc_sym_weak): New.
2544         (pcrel_reloc_fits): Use new xtensa-isa.h functions.
2545         (prop_sec_len): New.
2546         (xtensa_is_property_section): Handle new property sections.
2547         (is_literal_section): Delete.
2548         (internal_reloc_compare): When r_offset matches, compare r_info and
2549         r_addend to make sorting predictable.
2550         (internal_reloc_matches): New.
2551         (xtensa_get_property_section_name): Handle new property sections.
2552         (xtensa_get_property_predef_flags): New.
2553         (xtensa_callback_required_dependence): Use bfd_get_section_limit.
2554         Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
2555         * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
2556         (xtisa_errno, xtisa_error_msg): New variables.
2557         (xtensa_isa_errno, xtensa_isa_error_msg): New.
2558         (xtensa_insnbuf_alloc): Add error handling.
2559         (xtensa_insnbuf_to_chars): Add num_chars parameter.  Update to
2560         use xtensa_format_decode.  Add error handling.
2561         (xtensa_insnbuf_from_chars): Add num_chars parameter.  Decode the
2562         instruction length to find the number of bytes to copy.
2563         (xtensa_isa_init): Add error handling.  Replace calls to
2564         xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
2565         tables in the xtensa_modules structure.
2566         (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
2567         xtensa_extend_isa): Delete.
2568         (xtensa_isa_free): Change to only free lookup tables.
2569         (opname_lookup_compare): Replace with ...
2570         (xtensa_isa_name_compare): ... this function.  Use strcasecmp.
2571         (xtensa_insn_maxlength): Rename to ...
2572         (xtensa_isa_maxlength): ... this.
2573         (xtensa_insn_length): Delete.
2574         (xtensa_insn_length_from_first_byte): Replace with ...
2575         (xtensa_isa_length_from_chars): ... this function.
2576         (xtensa_num_opcodes): Rename to ...
2577         (xtensa_isa_num_opcodes): ... this.
2578         (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
2579         xtensa_isa_num_regfiles, xtensa_isa_num_stages,
2580         xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
2581         xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
2582         xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
2583         xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
2584         xtensa_format_get_slot, xtensa_format_set_slot): New functions.
2585         (xtensa_opcode_lookup): Add error handling.
2586         (xtensa_decode_insn): Replace with ...
2587         (xtensa_opcode_decode): ... this function, with new format and
2588         slot parameters.  Add error handling.
2589         (xtensa_encode_insn): Replace with ...
2590         (xtensa_opcode_encode): ... this function, which does the encoding via
2591         one of the entries in the "encode_fns" array.  Add error handling.
2592         (xtensa_opcode_name): Add error handling.
2593         (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
2594         xtensa_opcode_is_call): New.
2595         (xtensa_num_operands): Replace with ...
2596         (xtensa_opcode_num_operands): ... this function.  Add error handling.
2597         (xtensa_opcode_num_stateOperands,
2598         xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
2599         xtensa_opcode_funcUnit_use, xtensa_operand_name,
2600         xtensa_operand_is_visible): New.
2601         (xtensa_get_operand, xtensa_operand_kind): Delete.
2602         (xtensa_operand_inout): Add error handling and special-case for
2603         "sout" operands.
2604         (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
2605         operate on one slot of an instruction.  Added error handling.
2606         (xtensa_operand_encode): Handle default operands with no encoding
2607         functions.  Check for success by comparing against decoded value.
2608         Add error handling.
2609         (xtensa_operand_decode): Handle default operands.  Return decoded value
2610         through argument pointer.  Add error handling.
2611         (xtensa_operand_is_register, xtensa_operand_regfile,
2612         xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
2613         (xtensa_operand_isPCRelative): Rename to ...
2614         (xtensa_operand_is_PCrelative): ... this.  Add error handling.
2615         (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
2616         through argument pointer.  Add error handling.
2617         (xtensa_stateOperand_state, xtensa_stateOperand_inout,
2618         xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
2619         xtensa_regfile_lookup_shortname, xtensa_regfile_name,
2620         xtensa_regfile_shortname, xtensa_regfile_view_parent,
2621         xtensa_regfile_num_bits, xtensa_regfile_num_entries,
2622         xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
2623         xtensa_state_is_exported, xtensa_sysreg_lookup,
2624         xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
2625         xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
2626         xtensa_interface_num_bits, xtensa_interface_inout,
2627         xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
2628         xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
2629         * xtensa-modules.c: Rewrite to use new data structures.
2630         * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
2631         BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
2632         BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
2633         BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
2634         BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
2635         BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
2636         BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
2637         BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
2638         BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
2639         BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
2640         BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
2641         BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
2642         BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
2643         BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
2644         BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
2645         BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
2646         BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
2647         * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
2648         * Makefile.in: Regenerate.
2649         * bfd-in2.h: Likewise.
2650         * libbfd.h: Likewise.
2651
2652 2004-10-07  Richard Sandiford  <[email protected]>
2653
2654         * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
2655         against the absolute section.
2656         (mips_elf64_write_rela): Likewise.
2657
2658 2004-10-07  Jan Beulich <[email protected]>
2659
2660         * elf.c (elf_find_function): Don't generally check for matching
2661         section, just for non-file symbols.  Remove redunant comparison
2662         for the latter.
2663         * elf32-arm.h (arm_elf_find_function): Likewise.
2664
2665 2004-10-07  Jeff Baker  <[email protected]>
2666
2667         * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
2668         adding a DT_TEXTREL to a shared object and --warn-shared-textrel
2669         was specified.
2670
2671 2004-10-04  Roland McGrath  <[email protected]>
2672
2673         * hash.c (bfd_hash_set_default_size): Use const for table.
2674         Use size_t instead of int for variable compared to sizeof results.
2675
2676 2004-10-05  Alan Modra  <[email protected]>
2677
2678         PR 425
2679         * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
2680
2681 2004-10-01  Paul Brook  <[email protected]>
2682
2683         * elf32-arm.h (elf32_arm_fake_sections,
2684         is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
2685         functions.
2686         (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
2687
2688 2004-10-01  Alan Modra  <[email protected]>
2689
2690         * elf-bfd.h (struct eh_cie_fde): Add need_relative and
2691         need_lsda_relative.
2692         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
2693         need_relative or need_lsda_relative if we are processing an
2694         offset for a reloc on a FDE initial loc or LSDA field
2695         respectively.
2696         (_bfd_elf_write_section_eh_frame): Test need_relative and
2697         need_lsda_relative in place of corresponding make_* field
2698         when deciding to use pc-relative encodings.
2699
2700 2004-09-30  Paul Brook  <[email protected]>
2701
2702         * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
2703         target2 relocation type.
2704
2705 2004-09-30  H.J. Lu  <[email protected]>
2706
2707         PR 414
2708         * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
2709
2710 2004-09-30  Paul Brook  <[email protected]>
2711
2712         * reloc.c: Add BFD_RELOC_ARM_SMI.
2713         * bfd-in2.h: Regenerate.
2714         * libbfd.h: Ditto.
2715
2716 2004-09-24  Alan Modra  <[email protected]>
2717
2718         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
2719         vma and output offset to address.
2720         * simple.c (simple_save_output_info): Only set output section
2721         and offset for debug sections, or those not already set up by
2722         the linker.
2723         (bfd_simple_get_relocated_section_contents): Update comment.
2724
2725 2004-09-24  Alan Modra  <[email protected]>
2726
2727         * elf.c (IS_LOADED): Delete.
2728         (assign_file_positions_for_segments): Just test SEC_LOAD instead.
2729         Restore SEC_HAS_CONTENTS test to the one place it was used prior
2730         to 2004-09-22.
2731
2732 2004-09-23  Alan Modra  <[email protected]>
2733
2734         PR gas/396
2735         * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2736         bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
2737         redundant assignment of EM_SPARC.
2738
2739 2004-09-22  Brian Ford  <[email protected]>
2740
2741         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2742         alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
2743         constants.
2744         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2745
2746 2004-09-22  Alan Modra  <[email protected]>
2747
2748         * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
2749         (elf_backend_modify_segment_map): Don't define.
2750
2751 2004-09-22  Alan Modra  <[email protected]>
2752
2753         * elf.c (IS_LOADED): Define.
2754         (assign_file_positions_for_segments): Don't round up file offset of
2755         PT_LOAD segments containing no SEC_LOAD sections, instead round down.
2756         Delete code handling link script adjustment of lma.  Do the adjust
2757         in later code handling similar ajustments.  Remove dead code error
2758         check.  Warn if section lma would require a negative offset
2759         adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
2760         Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
2761         update voff in section loop.  Change voff in segment loop to be an
2762         adjustment on top of "off".  Set sec->filepos and update "off" later.
2763         Test for loadable sections consistently using IS_LOADED.  Similarly,
2764         test for alloc-only sections other than .tbss consistently.
2765         Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
2766         Tidy PT_NOTE handling.  Use %B and %A in error messages.
2767         (assign_file_positions_except_relocs): Use %B in error message.
2768
2769 2004-09-17  H.J. Lu  <[email protected]>
2770
2771         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
2772         (CONFIG_STATUS_DEPENDENCIES): New.
2773         (Makefile): Removed.
2774         (config.status): Likewise.
2775         * Makefile.in: Regenerated.
2776
2777 2004-09-17  Paul Brook  <[email protected]>
2778
2779         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
2780         (bfd_elf32_arm_process_before_allocation): Update prototype.
2781         * bfd-in2.h: Regenerate.
2782         * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
2783         (elf32_arm_link_hash_table_create): Set it.
2784         (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
2785         (bfd_elf32_arm_set_target_relocs): New function.
2786         (arm_real_reloc_type): New function.
2787         (elf32_arm_final_link_relocate): Use it.  Handle R_ARM_PREL31 and
2788         R_ARM_GOT_PREL.  Remove R_ARM_TARGET1.
2789         (elf32_arm_gc_sweep_hook): Ditto.
2790         (elf32_arm_check_relocs): Ditto.
2791         (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
2792         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
2793         R_ARM_GOT_TARGET2.
2794         (elf32_arm_got_prel): New variable.
2795         (elf32_arm_howto_from_type): New function.
2796         (elf32_arm_info_to_howto): Use it.
2797         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
2798         BFD_RELOC_ARM_TARGET2.
2799         * libbfd.h: Regenerate.
2800         * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
2801
2802 2004-09-17  Alan Modra  <[email protected]>
2803
2804         * ecoff.c: Update u.undef.next refs.
2805         * elf64-ppc.c: Likewise.
2806         * elflink.c: Likewise.
2807         * linker.c: Likewise.
2808         * xcofflink.c: Likewise.
2809
2810         * elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
2811         dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
2812         fields to indirect struct.
2813         * elf-m10300.c: Update u.weakdef refs.
2814         * elf32-arm.h: Likewise.
2815         * elf32-cris.c: Likewise.
2816         * elf32-frv.c: Likewise.
2817         * elf32-hppa.c: Likewise.
2818         * elf32-i370.c: Likewise.
2819         * elf32-i386.c: Likewise.
2820         * elf32-m32r.c: Likewise.
2821         * elf32-m68k.c: Likewise.
2822         * elf32-ppc.c: Likewise.
2823         * elf32-s390.c: Likewise.
2824         * elf32-sh.c: Likewise.
2825         * elf32-sparc.c: Likewise.
2826         * elf32-vax.c: Likewise.
2827         * elf32-xtensa.c: Likewise.
2828         * elf64-alpha.c: Likewise.
2829         * elf64-hppa.c: Likewise.
2830         * elf64-ppc.c: Likewise.
2831         * elf64-s390.c: Likewise.
2832         * elf64-sh64.c: Likewise.
2833         * elf64-sparc.c: Likewise.
2834         * elf64-x86-64.c: Likewise.
2835         * elfxx-ia64.c: Likewise.
2836         * elfxx-mips.c: Likewise.
2837         * elflink.c: Likewise.  Also u.elf_hash_value.
2838         (elf_gc_propagate_vtable_entries_used): Update for h->vtable
2839         indirection.
2840         (elf_gc_smash_unused_vtentry_relocs): Likewise.
2841         (bfd_elf_gc_record_vtinherit): Alloc vtable.
2842         (bfd_elf_gc_record_vtentry): Likewise.
2843         * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
2844
2845 2004-09-17  Alan Modra  <[email protected]>
2846
2847         * Makefile.am: Run "make dep-am".
2848         * Makefile.in: Regenerate.
2849         * bfd-in2.h: Regenerate.
2850         * po/SRC-POTFILES.in: Regenerate.
2851         * po/bfd.pot: Regenerate.
2852
2853 2004-09-16  Alan Modra  <[email protected]>
2854
2855         * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
2856         with bitfields.  Make "type" and "other" bitfields too.
2857         (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
2858         ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
2859         ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
2860         ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
2861         ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
2862         ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
2863         ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
2864         (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
2865         * elf-hppa.h: Update all uses of elf_link_hash_flags.
2866         * elf-m10300.c: Likewise.
2867         * elf.c: Likewise.
2868         * elf32-arm.h: Likewise.
2869         * elf32-cris.c: Likewise.
2870         * elf32-frv.c: Likewise.
2871         * elf32-hppa.c: Likewise.
2872         * elf32-i370.c: Likewise.
2873         * elf32-i386.c: Likewise.
2874         * elf32-m32r.c: Likewise.
2875         * elf32-m68k.c: Likewise.
2876         * elf32-ppc.c: Likewise.
2877         * elf32-s390.c: Likewise.
2878         * elf32-sh-symbian.c: Likewise.
2879         * elf32-sh.c: Likewise.
2880         * elf32-sh64.c: Likewise.
2881         * elf32-sparc.c: Likewise.
2882         * elf32-vax.c: Likewise.
2883         * elf32-xtensa.c: Likewise.
2884         * elf64-alpha.c: Likewise.
2885         * elf64-hppa.c: Likewise.
2886         * elf64-ppc.c: Likewise.
2887         * elf64-s390.c: Likewise.
2888         * elf64-sh64.c: Likewise.
2889         * elf64-sparc.c: Likewise.
2890         * elf64-x86-64.c: Likewise.
2891         * elflink.c: Likewise.
2892         * elfxx-ia64.c: Likewise.
2893         * elfxx-mips.c: Likewise.
2894         * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
2895         * configure: Regenerate.
2896         * aclocal.m4: Regenerate.
2897
2898 2004-09-16  Alan Modra  <[email protected]>
2899
2900         * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
2901         around uses of R_ARM_TARGET1.
2902         (elf32_arm_check_relocs): Likewise.
2903
2904 2004-09-13  Paul Brook  <[email protected]>
2905
2906         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2907         prototype.
2908         * bfd-in2.h: Regenerate.
2909         * libbfd.h: Regenerate.
2910         * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
2911         (elf32_arm_link_hash_table_create): Set target1_is_rel.
2912         (bfd_elf32_arm_process_before_allocation): Ditto.
2913         (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
2914         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
2915         * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
2916         * reloc.c: Ditto.
2917
2918 2004-09-10  Joel Brobecker  <[email protected]>
2919
2920         * hpux-core.c (thread_section_p): New function.
2921         (hpux_core_core_file_p): Fix computation of offset in call
2922         to bfd_seek. Create a ".reg" section from an arbitrary
2923         ".reg/<id>" section if none was created after having read
2924         all sections.
2925
2926 2004-09-11  Andreas Schwab  <[email protected]>
2927
2928         * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
2929         * aclocal.m4: Rebuild.
2930         * configure: Rebuild.
2931
2932 2004-09-10  Joel Brobecker  <[email protected]>
2933
2934         * section.c (bfd_sections_find_if): Fix parameter name in
2935         comment to match code.
2936
2937 2004-09-10  Alan Modra  <[email protected]>
2938
2939         * elf.c  (assign_file_positions_except_relocs): Assign relocs
2940         stored in a bfd section.
2941
2942 2004-09-08  Hans-Peter Nilsson  <[email protected]>
2943
2944         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
2945         h->gotplt_refcount to 0, not -1.
2946
2947 2004-09-07  Hans-Peter Nilsson  <[email protected]>
2948
2949         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
2950         case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
2951         symname.
2952         (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
2953         handle symbol visibility here.
2954
2955 2004-09-07  Alan Modra  <[email protected]>
2956
2957         * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
2958         (is_ppc64_elf_target): Rename from is_ppc64_target.  Update all
2959         callers.
2960         (ppc_stub_name): Remove trailing "+0" on stub name.
2961         (create_linkage_sections): Create relocations for
2962         branch lookup table when --emit-relocs as well as when --shared.
2963         (ppc_build_one_stub): Emit relocs for long branch stubs.  Adjust
2964         relbrlt test.  For --emit-stub-syms, always output a sym even when
2965         one already exists on a plt call stub.  Put stub type in the stub
2966         symbol name.
2967         (ppc_size_one_stub): Size long branch stub relocs.  Adjust relbrlt
2968         test.
2969         (ppc64_elf_size_stubs): Count global sym stubs added.  Zero
2970         reloc_count in stub sections.  Adjust relbrlt test.
2971         (ppc64_elf_build_stubs): Adjust relbrlt test.  Tweak stats output.
2972         * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
2973         (elf_link_input_bfd): Ignore symbol index zero relocs when checking
2974         for relocs against discarded symbols.  Fix comments.
2975
2976 2004-09-06  Mark Mitchell  <[email protected]>
2977
2978         * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
2979         * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
2980         from ...
2981         (map_sections_to_segments): ... here.  Use it.  Assign a file
2982         position to the .dynamic section if it is not loadable, but part
2983         of the PT_DYNAMIC segment.
2984         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2985         offsets, not VMAs, for the BPABI.  Do not fill in the header in
2986         the .got.plt section for the BPABI.
2987         * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
2988         PT_DYNAMIC segment.
2989         (elf_backend_want_got_plt): Define to zero for Symbian OS.
2990
2991 2004-09-06  Nick Clifton  <[email protected]>
2992
2993         * elflink.c (elf_link_add_object_symbols): Set the error code to
2994         bfd_error_wrong_format when the input format does not match the
2995         output format.
2996
2997 2004-09-06  Alan Modra  <[email protected]>
2998
2999         * elf64-ppc.c (is_ppc64_target): New function, extracted from..
3000         (ppc64_elf_check_directives): ..here.
3001         (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
3002         before accessing ppc64_elf_tdata.
3003         (ppc64_elf_finish_dynamic_sections): And here too.
3004
3005 2004-09-04  Alan Modra  <[email protected]>
3006
3007         * bfd.c (_bfd_default_error_handler): Correct loop exit.
3008
3009 2004-09-03  Mark Mitchell  <[email protected]>
3010
3011         * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
3012         * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
3013         (bfd_elf32_littlearm_symbian_vec): Likewise.
3014         * configure: Regenerated.
3015         * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
3016         * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
3017         (PLT_ENTRY_SIZE): Likewise.
3018         (bfd_vma_elf32_arm_symbian_plt_entry): New
3019         variable.
3020         (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
3021         and symbian_p.
3022         (create_got_section): Don't create sections when generating BPABI
3023         objects.
3024         (elf32_arm_create_dynamic_sections): Tidy.
3025         (elf32_arm_link_hash_table_create): Set plt_header_size,
3026         plt_entry_size, and symbian_p.
3027         (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
3028         generating BPABI objects.
3029         (allocate_dynrelocs): Use htab->plt_header_size, not
3030         PLT_HEADER_SIZE.  Do not add to .got.plt when
3031         generating BPABI objects.
3032         (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
3033         * elfarm-nabi.c: Add SymbianOS target vectors.
3034         * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
3035         (_bfd_elf_link_create_dynamic_sections): Likewise.
3036         * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
3037         (elfNN_bed): Use it.
3038         * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
3039         (bfd_elf32_littlearm_symbian_vec): Likewise.
3040         (_bfd_target_vector): Add them.
3041
3042 2004-09-03  Nick Clifton  <[email protected]>
3043
3044         PR 360
3045         * coffcode.h (handle_COMDAT): Replace abort with an warning
3046         message and allow the scan to continue.
3047
3048 2004-09-02  Alan Modra  <[email protected]>
3049
3050         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
3051         in when reading relocs, not our sorted syms.  Remove unnecessary
3052         var.
3053
3054 2004-08-31  Eric Botcazou  <[email protected]>
3055
3056         * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
3057
3058 2004-08-30  Nathanael Nerode  <[email protected]>
3059
3060         * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
3061         Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
3062         replace uses of *_alias with *_noncanonical.
3063         * aclocal.m4: Rebuild with aclocal 1.4p6.
3064         * Makefile.in: Rebuild with automake 1.4p6.
3065         * doc/Makefile.in: Rebuild with automake 1.4p6.
3066         * configure.in: Autoupdate with autoupdate 2.59.
3067         * config.in: Regenerate with autoheader 2.59.
3068         * configure: Regnerate with autoconf 2.59.
3069
3070 2004-08-28  Alan Modra  <[email protected]>
3071
3072         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
3073         symbol pointer arrays before modifying.
3074
3075 2004-08-28  Alan Modra  <[email protected]>
3076
3077         * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
3078         * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
3079         * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
3080         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
3081         * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
3082         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
3083         Use both symbol tables on non-relocatable objects.  Use a common
3084         error exit.  Fix "mid" warning.
3085         * libbfd.h: Regenerate.
3086         * bfd-in2.h: Regenerate.
3087
3088 2004-08-28  Alan Modra  <[email protected]>
3089
3090         * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
3091         object file.
3092         (struct sfpr_def_parms): Save some space.
3093         (sfpr_define): Here too.
3094
3095         * elf64-ppc.c (compare_symbols): Put section syms first.
3096         (sym_exists_at): New function.
3097         (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
3098         points only for relocatable files.  Use .opd section contents
3099         otherwise.  Generally clean up the code.
3100
3101 2004-08-27  Alan Modra  <[email protected]>
3102
3103         * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
3104         LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
3105         (struct sfpr_def_parms): New.
3106         (sfpr_define): New function.
3107         (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
3108         (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
3109         (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
3110         (savefpr1_tail, restfpr1_tail): New functions.
3111         (savevr, savevr_tail, restvr, restvr_tail): New functions.
3112         (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
3113         (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
3114         code.  Define all ABI mandated _save and _rest functions.
3115
3116 2004-08-26  Paul Brook  <[email protected]>
3117
3118         * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
3119
3120 2004-08-26  Alan Modra  <[email protected]>
3121
3122         * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
3123         TRUE or FALSE.
3124
3125 2004-08-26  Alan Modra  <[email protected]>
3126
3127         * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
3128         that pcrel correction is applied for R_386_PC32.
3129
3130 2004-08-25  Alan Modra  <[email protected]>
3131
3132         * elf32-i386.c (elf_i386_relocate_section): Zero section contents
3133         for R_386_32 and R_386_PC32 relocs against symbols defined in
3134         discarded sections.
3135
3136 2004-08-25  Dmitry Diky  <[email protected]>
3137
3138         * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
3139         Add new relocations.
3140         * bfd-in2.h: Regenerate.
3141         * libbfd.h: Regenerate.
3142         * elf32-msp430.c: Clean-up code.
3143         (elf_msp430_howto_table): Add new relocation entries.
3144         (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
3145         (msp430_elf_relax_section): New function.
3146         (msp430_elf_relax_delete_bytes): New function.
3147         (msp430_elf_symbol_address_p): New function.
3148
3149 2004-08-24  Kazuhiro Inaoka  <[email protected]>
3150
3151         * elf32-m32r.c (m32r_elf_relocate_section): Handle
3152         R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
3153
3154 2004-08-20  Daniel Jacobowitz  <[email protected]>
3155
3156         * elflink.c (_bfd_elf_section_already_linked): Handle
3157         SEC_LINK_DUPLICATES_SAME_CONTENTS.
3158
3159 2004-08-19  Mark Mitchell  <[email protected]>
3160
3161         * config.bfd (arm*-*-symbianelf*): New target.
3162         (arm*-*-eabi*): Likewise.
3163
3164 2004-08-19  Alan Modra  <[email protected]>
3165
3166         * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
3167         "struct ppc_link_hash_entry *".
3168         (ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
3169         to satisfy RELOC_FOR_GLOBAL_SYMBOL.
3170
3171 2004-08-19  Jakub Jelinek  <[email protected]>
3172
3173         * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
3174         entries (where fd_aux overlaps next entry's fd_func).
3175         Add non_overlapping argument, use it.
3176         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
3177         ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3178         ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
3179         as indexes into opd_sym_map/opd_adjust array.
3180         * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
3181
3182 2004-08-18  Alan Modra  <[email protected]>
3183
3184         * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
3185         if we can look up their function descriptor in a regular file.
3186
3187 2004-08-18  Nick Clifton  <[email protected]>
3188
3189         PR 324
3190         * cofflink.c (coff_link_add_symbols): Check that the comdat
3191         pointer in the coff_section_data structure has been initialised
3192         before using it.
3193
3194 2004-08-18  Alan Modra  <[email protected]>
3195
3196         PR 338
3197         * elflink.c (bfd_elf_record_link_assignment): Add comment about
3198         changing bfd_link_hash_undefined to bfd_link_hash_new.
3199
3200 2004-08-17  Jakub Jelinek  <[email protected]>
3201
3202         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
3203         if not yet defined.
3204         * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
3205         (synthetic_opd, synthetic_relocatable): New variables.
3206         (compare_symbols, compare_relocs): New helper routines.
3207         (ppc64_elf_get_synthetic_symtab): New function.
3208         * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
3209         to relsyms.
3210         * bfd-in2.h: Regenerated.
3211         * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
3212         to relsyms.  Return 0 if abfd is relocatable.
3213
3214 2004-08-17  Alan Modra  <[email protected]>
3215
3216         * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
3217
3218 2004-08-17  Nick Clifton  <[email protected]>
3219
3220         * (is_arm_mapping_symbol_name): New function - return true
3221         when a symbol name matches the requirements for an ARM mapping
3222         symbol name.
3223         (arm_elf_find_function): New function based on
3224         elf_find_function in elf.c but skipping ARM mapping symbols
3225         and including thumb function symbols.
3226         (elf32_arm_find_nearest_line): Use arm_elf_find_function.
3227         (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
3228
3229 2004-08-17  Alan Modra  <[email protected]>
3230
3231         * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
3232         (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
3233         (ppc64_elf_brtaken_reloc): Here too.
3234
3235 2004-08-17  Alan Modra  <[email protected]>
3236
3237         * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
3238         symbol visibility.
3239         (ppc64_elf_check_directives): Check that we have the right hash
3240         table before proceeding.
3241
3242 2004-08-17  Alan Modra  <[email protected]>
3243
3244         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
3245         (adjust_opd_syms): Attach opd syms for deleted entries to one of
3246         the sections that will be discarded.
3247
3248 2004-08-16  Alan Modra  <[email protected]>
3249
3250         * elflink.c (elf_section_complain_discarded): Ignore .fixup.
3251
3252 2004-08-16  Alan Modra  <[email protected]>
3253
3254         * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
3255         free space available.
3256
3257 2004-08-16  Alan Modra  <[email protected]>
3258
3259         * pdp11.c (struct pdp11_aout_reloc_external): Delete.  Replace
3260         occurrences with bfd_byte * thoughout file.
3261
3262         * coff-rs6000.c (do_shared_object_padding): Warning fix.
3263         (xcoff_write_armap_big): Likewise.
3264         (xcoff_write_archive_contents_old): Likewise.
3265         (xcoff_write_archive_contents_big): Likewise.
3266
3267         * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
3268
3269 2004-08-13  Nick Clifton  <[email protected]>
3270
3271         * elf32-arm.h: Convert to ISO C90.
3272
3273 2004-08-13  Alan Modra  <[email protected]>
3274
3275         PR 293
3276         * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
3277         zero the plt field.
3278
3279 2004-08-13  Alan Modra  <[email protected]>
3280
3281         * bfd.c (_bfd_default_error_handler): Handle %A and %B.
3282         (bfd_archive_filename, bfd_get_section_ident): Delete.
3283         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
3284         bfd_archive_filename.
3285         * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
3286         to warn about symbols in discarded sections.  Use _bfd_error_handler.
3287         * aout-adobe.c (aout_adobe_callback): See below.
3288         * aout-cris.c (swap_ext_reloc_in): ..
3289         * coff-arm.c (find_thumb_glue, find_arm_glue,
3290         coff_arm_relocate_section, bfd_arm_process_before_allocation,
3291         coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
3292         coff_arm_copy_private_bfd_data): ..
3293         * coff-i860.c (i860_reloc_processing): ..
3294         * coff-mcore.c (mcore_coff_unsupported_reloc,
3295         coff_mcore_relocate_section): ..
3296         * coff-ppc.c (coff_ppc_relocate_section): ..
3297         * coff-rs6000.c (xcoff_create_csect_from_smclas
3298         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
3299         sh_swap_insns, sh_relocate_section): ..
3300         * coff-tic54x.c (tic54x_reloc_processing): ..
3301         * coff-tic80.c (coff_tic80_relocate_section): ..
3302         * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
3303         * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
3304         coff_slurp_symbol_table, coff_classify_symbol,
3305         coff_slurp_reloc_table): ..
3306         * coffgen.c (_bfd_coff_read_string_table): ..
3307         * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
3308         _bfd_coff_generic_relocate_section): ..
3309         * cpu-arm.c (bfd_arm_merge_machines): ..
3310         * cpu-sh.c (sh_merge_bfd_arch): ..
3311         * elf-hppa.h (elf_hppa_relocate_section): ..
3312         * elf.c (bfd_elf_string_from_elf_section, setup_group,
3313         _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
3314         assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
3315         copy_private_bfd_data, _bfd_elf_validate_reloc): ..
3316         * elf32-arm.h (find_thumb_glue, find_arm_glue,
3317         bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
3318         elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
3319         elf32_arm_relocate_section, elf32_arm_set_private_flags,
3320         elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
3321         * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
3322         cris_elf_merge_private_bfd_data
3323         * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
3324         * elf32-gen.c (elf32_generic_link_add_symbols): ..
3325         * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
3326         elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
3327         elf32_hppa_relocate_section): ..
3328         * elf32-i370.c (i370_elf_merge_private_bfd_data,
3329         i370_elf_check_relocs, i370_elf_relocate_section): ..
3330         * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
3331         elf_i386_relocate_section): ..
3332         * elf32-m32r.c (m32r_elf_relocate_section,
3333         m32r_elf_merge_private_bfd_data): ..
3334         * elf32-m68hc1x.c (m68hc12_add_stub,
3335         _bfd_m68hc11_elf_merge_private_bfd_data): ..
3336         * elf32-m68k.c (elf_m68k_relocate_section): ..
3337         * elf32-mcore.c (mcore_elf_unsupported_reloc,
3338         mcore_elf_relocate_section): ..
3339         * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
3340         ppc_elf_check_relocs, ppc_elf_relocate_section,
3341         ppc_elf_begin_write_processing): ..
3342         * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3343         elf_s390_relocate_section): ..
3344         * elf32-sh-symbian.c (sh_symbian_import_as,
3345         sh_symbian_process_embedded_commands,
3346         sh_symbian_relocate_section): ..
3347         * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
3348         sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
3349         sh_elf_merge_private_data): ..
3350         * elf32-sparc.c (elf32_sparc_check_relocs,
3351         elf32_sparc_relocate_section,
3352         elf32_sparc_merge_private_bfd_data): ..
3353         * elf32-v850.c (v850_elf_check_relocs,
3354         v850_elf_merge_private_bfd_data): ..
3355         * elf32-xtensa.c (elf_xtensa_check_relocs,
3356         elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
3357         * elf64-alpha.c (elf64_alpha_relax_with_lituse,
3358         elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
3359         elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
3360         * elf64-gen.c (elf64_generic_link_add_symbols): ..
3361         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
3362         ppc64_elf_check_relocs, ppc64_elf_edit_opd,
3363         ppc64_elf_relocate_section): ..
3364         * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3365         elf_s390_relocate_section): ..
3366         * elf64-sh64.c (sh_elf64_relocate_section): ..
3367         * elf64-sparc.c (sparc64_elf_check_relocs,
3368         sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
3369         sparc64_elf_merge_private_bfd_data): ..
3370         * elf64-x86-64.c (elf64_x86_64_check_relocs,
3371         elf64_x86_64_relocate_section): ..
3372         * elflink.c (_bfd_elf_add_default_symbol,
3373         _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
3374         _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
3375         bfd_elf_size_dynamic_sections, elf_link_output_extsym,
3376         elf_get_linked_section_vma, elf_fixup_link_order,
3377         bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
3378         bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
3379         * elfxx-ia64.c (elfNN_ia64_relax_section,
3380         elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
3381         * elfxx-mips.c (mips_elf_perform_relocation,
3382         _bfd_mips_elf_check_relocs,
3383         _bfd_mips_elf_merge_private_bfd_data): ..
3384         * ieee.c (ieee_slurp_external_symbols): ..
3385         * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
3386         * libbfd.c (_bfd_generic_verify_endian_match): ..
3387         * linker.c (_bfd_generic_link_add_one_symbol,
3388         _bfd_generic_section_already_linked): ..
3389         * pdp11.c (translate_to_native_sym_flags): ..
3390         * pe-mips.c (coff_pe_mips_relocate_section): ..
3391         * peicode.h (pe_ILF_build_a_bfd): ..
3392         * srec.c (srec_bad_byte): ..
3393         * stabs.c (_bfd_link_section_stabs): ..
3394         * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
3395         Replace all uses of bfd_archive_filename and bfd_get_section_ident
3396         with corresponding %B and %A in _bfd_error_handler format string.
3397         Replace occurrences of "fprintf (stderr," with _bfd_error_handler
3398         calls to use %A and %B.  Fix "against symbol .. from section" and
3399         similar error messages.  Combine multiple _bfd_error_handler calls
3400         where they were separated due to bfd_archive_filename deficiencies.
3401         * bfd-in2.h: Regenerate.
3402
3403 2004-08-12  H.J. Lu  <[email protected]>
3404
3405         * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
3406         relocation.
3407
3408 2004-08-10  Alan Modra  <[email protected]>
3409
3410         * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
3411         (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
3412         Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
3413         Add twiddled_syms.
3414         (link_hash_newfunc): Init was_undefined.
3415         (add_symbol_adjust): Don't set undefined dot symbols to defweak;
3416         Use undefweak instead.
3417         (ppc64_elf_check_directives): Fix undefs chain.
3418         (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
3419         references.
3420         (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
3421         (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
3422         * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
3423
3424 2004-08-09  Jakub Jelinek  <[email protected]>
3425
3426         * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
3427         error, test input_section flags rather than sec.
3428
3429 2004-08-09  Alan Modra  <[email protected]>
3430
3431         * elf-bfd.h (struct elf_backend_data): Add
3432         elf_backend_archive_symbol_lookup.
3433         (_bfd_elf_archive_symbol_lookup): Declare.
3434         * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
3435         (elf_link_add_archive_symbols): ..extracted from here.  Call the
3436         backend version.
3437         * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
3438         (elfNN_bed): Init new field.
3439         * elf64-ppc.c (elf_backend_check_directives): Define.
3440         (elf_backend_archive_symbol_lookup): Define.
3441         (struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
3442         a ppc_link_hash_entry pointer.
3443         (get_fdh): Move.
3444         (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
3445         (add_symbol_adjust, ppc64_elf_check_directives): New functions.
3446         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
3447         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
3448         ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
3449         ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3450         ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
3451         descriptor symbols.
3452
3453 2004-08-09  Alan Modra  <[email protected]>
3454
3455         * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
3456         (ppc64_elf_add_symbol_hook): Test for NULL section.
3457         (get_sym_h): Formatting.
3458         (ppc64_elf_size_stubs): Include reloc addend in value stored as
3459         stub target_value.
3460
3461         * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
3462         long branch stubs with code handling plt and r2off branch stubs.
3463
3464 2004-08-09  Alan Modra  <[email protected]>
3465
3466         * elf-bfd.h (_bfd_elf_gc_mark): Declare.
3467         * elflink.c (elf_link_input_bfd): Formatting.
3468         (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
3469         all callers.
3470         * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
3471         (link_hash_newfunc): Don't set it.
3472         (ppc64_elf_copy_indirect_symbol): Nor copy it.
3473         (ppc64_elf_mark_entry_syms): Delete.
3474         (ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
3475         sections.  Use get_opd_info.
3476         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
3477
3478 2004-08-09  Alan Modra  <[email protected]>
3479
3480         * elf64-ppc.c (adjust_opd_syms): Fix merge error.
3481
3482         * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
3483         (func_desc_adjust): Don't set have_undefweak.
3484         (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
3485         (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
3486
3487         * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
3488         "struct ppc_link_hash_entry *".  Adjust all references.
3489         (ppc64_elf_hide_symbol): Correct a comment.
3490
3491         * elf64-ppc.c (get_opd_info): New function.
3492         (adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
3493         (ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
3494         before calling get_fdh.  Test fdh rather than h before dereferencing
3495         fdh.  Mark removed symbols in opd_adjust.
3496         (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
3497         (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
3498         opd symbols.
3499         (ppc64_elf_output_symbol_hook): Likewise.
3500
3501 2004-08-06  Paul Brook  <[email protected]>
3502
3503         * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
3504         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
3505         BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
3506         * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
3507         and BFD_RELOC_ARM_SBREL32.
3508         * bfd-in2.h, bbfd.h: Regenerate.
3509
3510 2004-08-01  Thiemo Seufer  <[email protected]>
3511
3512         * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
3513         the dynamic link symbol actually in use.
3514
3515 2004-08-01  Stephane Carrez  <[email protected]>
3516
3517         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
3518
3519 2004-07-31  Joel Brobecker  <[email protected]>
3520             Thiemo Seufer  <[email protected]>
3521
3522         * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
3523         SHN_MIPS_TEXT and SHN_MIPS_DATA.
3524
3525 2004-07-30  H.J. Lu  <[email protected]>
3526             Nick Clifton  <[email protected]>
3527
3528         PR 290
3529         * bfd.c (_bfd_default_error_handler): Make it global.
3530
3531         * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
3532
3533         * elf.c (assign_section_numbers): Cope gracefully with sections
3534         which have SHF_LINK_ORDER set but no sh_link set up.
3535         * elflink.c (elf_get_linked_section_vma): Likewise.
3536
3537         * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
3538         it to NULL.
3539
3540         * elfxx-target.h (elf_backend_link_order_error_handler): New.
3541         Set it to _bfd_default_error_handler.
3542         (elfNN_bed): Add elf_backend_link_order_error_handler.
3543
3544         * libbfd-in.h (_bfd_default_error_handler): New.
3545
3546         * libbfd.h: Regenerated.
3547
3548 2004-07-30  Jakub Jelinek  <[email protected]>
3549
3550         * archures.c (bfd_mach_sparc_64bit_p): Define.
3551         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
3552         * bfd-in2.h: Rebuilt.
3553
3554 2004-07-29  Alexandre Oliva  <[email protected]>
3555
3556         Introduce SH2a support.
3557         2004-02-18  Corinna Vinschen  <[email protected]>
3558         * archures.c (bfd_mach_sh2a_nofpu): New.
3559         * bfd-in2.h: Rebuilt.
3560         * cpu-sh.c (SH2A_NOFPU_NEXT): New.
3561         (arch_info_struct): Add sh2a_nofpu.
3562         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
3563         2003-12-29  DJ Delorie  <[email protected]>
3564         * reloc.c: Add relocs for sh2a.
3565         * bfd-in2.h: Regenerate.
3566         * libbfd.hh: Regenerate.
3567         2003-12-01  Michael Snyder  <[email protected]>
3568         * archures.c (bfd_mach_sh2a): New.
3569         * bfd-in2.h: Rebuilt.
3570         * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
3571         (SH2A_NEXT): New.
3572         (arch_info_struct): Add sh2a.
3573         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
3574
3575 2004-07-28  Nick Clifton  <[email protected]>
3576             John David Anglin  <[email protected]>
3577
3578         PR 273
3579         * som.c (setup_sections): Improve estimation of space sizes in
3580         relocatable objects.
3581
3582 2004-07-27  Jason Thorpe  <[email protected]>
3583         * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
3584         bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
3585         to targ_selvecs.
3586         * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
3587         * configure: Regenerate.
3588         * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
3589         case that accepts OSABI=NetBSD and OSABI=SysV.
3590         (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
3591         the base of .got or .data (if .got does not exist).
3592         (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
3593         set OSABI=NetBSD.
3594         (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
3595         (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
3596         * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
3597         (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
3598
3599 2004-07-27  H.J. Lu  <[email protected]>
3600
3601         PR 161/251
3602         * elf-bfd.h (bfd_elf_section_data): Add sec_group.
3603         (elf_sec_group): Defined.
3604         (bfd_elf_match_symbols_in_sections): New prototype.
3605         (_bfd_elf_setup_group_pointers): Likewise.
3606
3607         * elf.c (bfd_elf_discard_group): Abort.
3608         (bfd_elf_set_group_contents): Also include relocation sections.
3609         Remove zero-fill for ld -r.
3610         (_bfd_elf_setup_group_pointers): New function.
3611         (elf_sort_elf_symbol): Likewise.
3612         (elf_sym_name_compare): Likewise.
3613         (bfd_elf_match_symbols_in_sections): Likewise.
3614
3615         * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
3616
3617         * elflink.c (match_group_member): New.
3618         (elf_link_input_bfd): Check group member for discarded section.
3619         (try_match_symbols_in_sections): New function.
3620         (already_linked): Likewise.
3621         (_bfd_elf_section_already_linked): Support mixing comdat group
3622         and linkonce section.
3623
3624         * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
3625         * linker.c (bfd_section_already_linked_table_traverse): New.
3626
3627         * libbfd.h: Regenerated.
3628
3629 2004-07-27  Tomer Levi  <[email protected]>
3630
3631         * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
3632         BFD_RELOC_CRX_SWITCH32.
3633         * bfd-in2.h: Regenerate.
3634         * libbfd.h: Regenerate.
3635         * elf32-crx.c: Support relocation/relaxation of
3636         BFD_RELOC_CRX_SWITCH* types.
3637
3638 2004-07-27  Alan Modra  <[email protected]>
3639
3640         * elf64-ppc.c: Correct "Linker stubs" comment.
3641
3642 2004-07-26  H.J. Lu  <[email protected]>
3643
3644         * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
3645         linked-to section.
3646         (elf_linked_to_section): New.
3647
3648         * elf.c (assign_section_numbers): Set up sh_link for
3649         SHF_LINK_ORDER.
3650
3651         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
3652         to sh_link for SHT_IA_64_UNWIND sections.
3653
3654 2004-07-22  H.J. Lu  <[email protected]>
3655
3656         * elflink.c (elf_fixup_link_order): Add _() to error message.
3657
3658 2004-07-22  H.J. Lu  <[email protected]>
3659
3660         * elflink.c (elf_fixup_link_order): Issue a warning and flag
3661         an error if failed.
3662
3663 2004-07-21  H.J. Lu  <[email protected]>
3664
3665         * aout-adobe.c (aout_32_section_already_linked): Defined.
3666         * aout-target.h (MY_section_already_linked): Likewise.
3667         * aout-tic30.c (MY_section_already_linked): Likewise.
3668         * binary.c (binary_section_already_linked): Likewise.
3669         * bout.c (b_out_section_already_linked): Likewise.
3670         * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
3671         * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
3672         * coffcode.h (coff_section_already_linked): Likewise.
3673         * i386msdos.c (msdos_section_already_linked): Likewise.
3674         * i386os9k.c (os9k_section_already_linked): Likewise.
3675         * ieee.c (ieee_section_already_linked): Likewise.
3676         * ihex.c (ihex_section_already_linked): Likewise.
3677         * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
3678         * mmo.c (mmo_section_already_linked): Likewise.
3679         * nlm-target.h (nlm_section_already_linked): Likewise.
3680         * oasys.c (oasys_section_already_linked): Likewise.
3681         * pef.c (bfd_pef_section_already_linked): Likewise.
3682         * ppcboot.c (ppcboot_section_already_linked): Likewise.
3683         * som.c (som_bfd_discard_group): Likewise.
3684         * srec.c (srec_section_already_linked): Likewise.
3685         * tekhex.c (tekhex_section_already_linked): Likewise.
3686         * versados.c (versados_section_already_linked): Likewise.
3687         * vms.c (vms_section_already_linked): Likewise.
3688         * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
3689         * xsym.c (bfd_sym_section_already_linked): Likewise.
3690
3691         * bfd-in.h (bfd_section_already_linked_table_init): New.
3692         (bfd_section_already_linked_table_free): Likewise.
3693
3694         * coff-rs6000.c (rs6000coff_vec): Add
3695         _bfd_generic_section_already_linked.
3696         (pmac_xcoff_vec): Likewise.
3697         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3698         (aix5coff64_vec): Likewise.
3699
3700         * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
3701         * elflink.c (_bfd_elf_section_already_linked): New function.
3702
3703         * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
3704
3705         * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
3706         (_bfd_generic_section_already_linked): New.
3707         (bfd_section_already_linked_hash_entry): Likewise.
3708         (bfd_section_already_linked): Likewise.
3709         (bfd_section_already_linked_table_lookup): Likewise.
3710         (bfd_section_already_linked_table_insert): Likewise.
3711
3712         * linker.c (bfd_section_already_linked): New.
3713         (_bfd_section_already_linked_table): Likewise.
3714         (bfd_section_already_linked_table_lookup): Likewise.
3715         (bfd_section_already_linked_table_insert): Likewise.
3716         (already_linked_newfunc): Likewise.
3717         (bfd_section_already_linked_table_init): Likewise.
3718         (bfd_section_already_linked_table_free): Likewise.
3719         (_bfd_generic_section_already_linked): Likewise.
3720
3721         * section.c (bfd_section): Remove comdat.
3722         (bfd_comdat_info): Moved to ...
3723         * bfd-in.h (coff_comdat_info): Here.
3724         (bfd_coff_get_comdat_section): New.
3725         * coffgen.c (bfd_coff_get_comdat_section): Likewise.
3726         * libcoff-in.h (coff_section_tdata): Add comdat.
3727         * coffcode.h (handle_COMDAT): Updated.
3728         * cofflink.c (coff_link_add_symbols): Likewise.
3729         * ecoff.c (bfd_debug_section): Likewise.
3730
3731         * targets.c (bfd_target): Add _section_already_linked.
3732         (BFD_JUMP_TABLE_LINK): Updated.
3733
3734         * bfd-in2.h: Regenerated.
3735         * libbfd.h: Likewise.
3736         * libcoff.h: Likewise.
3737
3738 2003-07-21  Paul Brook  <[email protected]>
3739
3740         * elflink.c (elf_get_linked_section_vma, compare_link_order,
3741         elf_fixup_link_order): New functions.
3742         (bfd_elf_final_link): Call elf_fixup_link_order.
3743
3744 2004-07-21  Alexandre Oliva  <[email protected]>
3745
3746         * elf-bfd.h (ELF_COMMON_DEF_P): New.
3747         * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
3748         common definitions.
3749         * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
3750         _bfd_elf_symbol_refs_local_p.
3751         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
3752         symbols.
3753
3754 2004-07-19  H.J. Lu  <[email protected]>
3755
3756         * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
3757         DYN_NO_NEEDED.
3758         (bfd_elf_get_dyn_lib_class): New prototype.
3759         * elf.c (bfd_elf_get_dyn_lib_class): New function.
3760
3761         * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
3762         DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
3763         entry is needed. Issue an error if a DT_NEEDED entry is needed
3764         for a file marked DYN_NO_NEEDED.
3765         (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
3766         for DT_NEEDED tags.
3767
3768         * bfd-in2.h: Regenerated.
3769
3770 2004-07-14  John David Anglin  <[email protected]>
3771
3772         * elflink.c (elf_section_complain_discarded): Don't complain in
3773         .PARISC.unwind.
3774
3775 2004-07-10  James E Wilson  <[email protected]>
3776
3777         * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
3778         (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
3779         (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
3780         elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
3781         Fix callers.
3782         (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64.  Change
3783         bfd_put_64 to bfd_putl64.
3784         (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
3785
3786 2004-07-09  H.J. Lu  <[email protected]>
3787
3788         PR 240
3789         * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
3790         .init/.fini sections when trying to relax it.
3791
3792 2004-07-09  Jie Zhang  <[email protected]>
3793
3794         * elf.c (assign_file_positions_for_segments): Make sure the
3795         .dynamic section is the first section in the PT_DYNAMIC segment.
3796
3797 2004-07-09  Nick Clifton  <[email protected]>
3798
3799         * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
3800         * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
3801         sh_elf_get_flags_from_mach functions so that they do not conflict
3802         when this target is built with other sh-elf targets.
3803         * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
3804         suppression of this function.
3805         (sh_elf_find_flags): Likewise.
3806
3807 2004-07-07  Tomer Levi  <[email protected]>
3808
3809         * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
3810         (ALL_MACHINES_CFILES): Add cpu-crx.c.
3811         (BFD32_BACKENDS): Add elf32-crx.lo.
3812         (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
3813         (cpu-crx.lo): New target.
3814         (elf32-crx.lo): New target.
3815         * Makefile.in: Regenerate.
3816         * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
3817         (bfd_archures_list): Add bfd_crx_arch.
3818         * bfd-in2.h: Regenerate.
3819         * config.bfd: Handle crx-*-elf*, crx*.
3820         * configure.in: Handle bfd_elf32_crx_vec.
3821         * configure: Regenerate.
3822         * cpu-crx.c: New file.
3823         * elf32-crx.c: Likewise.
3824         * libbfd.h: Regenerate.
3825         * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
3826         BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
3827         BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
3828         BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
3829         BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
3830         BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
3831         * targets.c (bfd_elf32_crx_vec): Declare.
3832         (bfd_target_vector): Add bfd_elf32_crx_vec.
3833
3834 2004-07-06  Nick Clifton  <[email protected]>
3835
3836         * config.bfd: Add sh-symbian-elf target.
3837         * configure.in: Add bfd_elf32_shl_symbian_vec.
3838         * configure: Regenerate.
3839         * elf-bfd.h (struct elf_backend_data): Add new field
3840         'check_directives'.
3841         * elflink.c (elf_link_add_object_symbols): Invoke the
3842         check_directives function, if defined.
3843         * elfxx-target.h: Provide a default, NULL definition for
3844         check_directives.
3845         * targets.c: Add bfd_elf32_shl_symbian_vec.
3846         * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
3847         definition.
3848         (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
3849         * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
3850         (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
3851         not already been defined.
3852         * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
3853         * sh-symbian.c: New file.  Provide functions to support the
3854         * sh-symbian-elf target.
3855         * Makefile.am: Add elf32-sh-symbian.c
3856         * Makefile.in: Regenerate.
3857
3858 2004-07-05  Andrew Stubbs <[email protected]>
3859
3860         * elf32-sh.c: Include ../opcodes/sh-opc.h.
3861         * Makefile.am: Ran make dep-am.
3862         * Makefile.in: Ran make dep-in.
3863
3864 2004-07-03  Aaron W. LaFramboise  <[email protected]>
3865
3866         * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
3867         externals properly.
3868
3869 2004-07-02  Martin Schwidefsky  <[email protected]>
3870
3871         * config.bfd: Add want64 to configuration target s390-*-linux*.
3872
3873 2004-07-01  H.J. Lu  <[email protected]>
3874
3875         * bfd.c (bfd_get_section_ident): New.
3876
3877         * elflink.c (elf_link_read_relocs_from_section): Call
3878         bfd_get_section_ident to identify the section when reporting
3879         error.
3880         (_bfd_elf_link_output_relocs): Likewise.
3881         (elf_link_output_extsym): Likewise.
3882         (elf_link_input_bfd): Likewise.
3883         (bfd_elf_gc_record_vtinherit): Likewise.
3884
3885         * bfd-in2.h: Regenerated.
3886
3887 2004-07-01  Jie Zhang  <[email protected]>
3888             Nick Clifton  <[email protected]>
3889
3890         PR 204
3891         * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
3892         of section symbols to mips_elf_sort_hash_table ().
3893
3894 2004-07-01  Alan Modra  <[email protected]>
3895
3896         * elflink.c (elf_section_ignore_discarded_relocs): Revert last
3897         change.  Comment.
3898         (elf_section_complain_discarded): New function.  Handle
3899         .gcc_except_table too.
3900         (elf_link_input_bfd): Rewrite handling of relocs against symbols
3901         in discarded sections.
3902         * elf-bfd.h (elf_discarded_section): Protect macro arg.
3903
3904 2004-06-30  James E Wilson  <[email protected]>
3905
3906         * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff.  Initialize
3907         to NULL.  Call get_pltoff if NULL and NEED_PLTOFF is true.
3908
3909 2004-06-30  H.J. Lu  <[email protected]>
3910
3911         PR 233
3912         * elflink.c (elf_link_input_bfd): Issue an error for non-debug
3913         local references to discarded sections and report their
3914         locations.
3915
3916 2004-06-30  Alan Modra  <[email protected]>
3917
3918         * elflink.c (elf_section_ignore_discarded_relocs): Don't test
3919         sec_info_type, test section name instead.
3920
3921 2004-06-29  H.J. Lu  <[email protected]>
3922
3923         PR 240
3924         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
3925         in .init/.fini sections.
3926
3927 2004-06-29  Bob Wilson  <[email protected]>
3928
3929         * elf32-xtensa.c (elf_xtensa_relocate_section): Use
3930         bfd_get_section_limit.
3931
3932 2004-06-29  Bob Wilson  <[email protected]>
3933
3934         * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
3935         output section size.
3936
3937 2004-06-29  Alan Modra  <[email protected]>
3938
3939         * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
3940         rawsize.
3941         (mmix_elf_perform_relocation): Adjust for above change.
3942         (mmix_elf_relocate_section): Likewise.
3943         (mmix_elf_relax_section): Likewise.  Use output_section->rawsize.
3944         (mmix_elf_get_section_contents): Delete.
3945         (bfd_elf64_get_section_contents): Delete.
3946         (mmix_elf_relocate_section): Zero stub area.
3947         * linker.c (default_indirect_link_order): Alloc max of section size
3948         and rawsize.
3949         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3950         * section.c (bfd_malloc_and_get_section): Likewise.
3951         (struct bfd_section): Update rawsize comment.
3952         * bfd-in2.h: Regenerate.
3953
3954         * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
3955
3956 2004-06-29  Alan Modra  <[email protected]>
3957
3958         * bfd-in.h (bfd_get_section_limit): Define.
3959         * reloc.c (bfd_perform_relocation, bfd_install_relocation)
3960         (_bfd_final_link_relocate): Use bfd_get_section_limit.
3961         * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
3962         * coff-arm.c (coff_arm_relocate_section): Likewise.
3963         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
3964         * cpu-ns32k.c (do_ns32k_reloc): Likewise.
3965         (bfd_ns32k_final_link_relocate): Likewise.
3966         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
3967         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
3968         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
3969         (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
3970         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
3971         (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
3972         * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
3973         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
3974         * elf32-or32.c (or32_elf_consth_reloc): Likewise.
3975         * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
3976         * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
3977         * elf32-sh.c (sh_elf_reloc_loop): Likewise.
3978         * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
3979         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
3980         * elf32-v850.c (v850_elf_reloc): Likewise.
3981         * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
3982         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
3983         * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
3984         * elf64-mips.c (mips_elf64_gprel32_reloc)
3985         (mips16_gprel_reloc): Likewise.
3986         * elf64-mmix.c (mmix_elf_reloc): Likewise.
3987         * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
3988         * elf64-sparc.c (init_insn_reloc): Likewise.
3989         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
3990         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
3991         (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
3992         (_bfd_mips_elf_generic_reloc): Likewise.
3993         * bfd-in2.h: Regenerate.
3994
3995 2004-06-28  Alan Modra  <[email protected]>
3996
3997         * bfd-in.h (struct stab_info): Move from stabs.c.
3998         * stabs.c (struct stab_link_includes_table): Delete.
3999         (stab_link_includes_lookup): Delete.
4000         (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
4001         level of indirection from sinfo parm.
4002         (_bfd_link_section_stabs): Likewise.  Set SEC_LINKER_CREATED on
4003         stabstr section.  Adjust hash table accesses.
4004         * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
4005         alloc.  Adjust stab_info test.
4006         * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
4007         (_bfd_coff_final_link): Adjust stab_info test.
4008         (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
4009         * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
4010         in place.
4011         * libcoff-in.h (struct coff_link_hash_table): Likewise.
4012         * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
4013         * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
4014         stabstr section.  Adjust stab_info test.
4015         * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
4016         (_bfd_write_stab_strings): Adjust prototypes.
4017         * libbfd.h: Regenerate.
4018         * libcoff.h: Regenerate.
4019         * bfd-in2.h: Regenerate.
4020
4021 2004-06-27  Mark Kettenis  <[email protected]>
4022
4023         From Miod Vallat <[email protected]>:
4024         * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
4025
4026 2004-06-26  Alexandre Oliva  <[email protected]>
4027
4028         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
4029         (struct elf32_mn10300_link_hash_entry): Remove
4030         pcrel_relocs_copied.
4031         (mn10300_elf_check_relocs): Only reserve dynamic relocations for
4032         R_MN10300_32.  Don't adjust pcrel_relocs_copied.
4033         (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
4034         and gotoff relocations if the symbol doesn't bind locally.  Use
4035         _bfd_elf_symbol_refs_local_p to test.  Don't create dynamic
4036         relocation for PCREL32.
4037         (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
4038         to test whether a symbol binds locally.
4039         (elf32_mn10300_link_hash_newfunc): Don't initialize
4040         pcrel_relocs_copied.
4041         (_bfd_mn10300_elf_discard_copies): Delete.
4042         (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
4043
4044 2004-06-26  Mark Kettenis  <[email protected]>
4045
4046         * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
4047
4048 2004-06-25  Joel Brobecker  <[email protected]>
4049
4050         * som.c (som_set_reloc_info): Correct small typo.
4051
4052 2004-06-25  Kazuhiro Inaoka  <[email protected]>
4053
4054         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
4055         (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
4056         (m32r_elf_gcsweep_hook): Likewise.
4057         (m32r_elf_check_relocs): Likewise.
4058         (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
4059         R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
4060         * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
4061         BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
4062         * bfd-in2.h: Regenerated.
4063         * libbfd.h: Regenerated.
4064
4065 2004-06-24  H.J. Lu  <[email protected]>
4066
4067         * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
4068         relocation symbol.
4069         (elf64_x86_64_relocate_section): Issue an error for
4070         R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
4071         against global symbols when building shared library.
4072
4073 2004-06-24  Alan Modra  <[email protected]>
4074
4075         * section.c (struct sec): Rename "_cooked_size" to "size".
4076         Rename "_raw_size" to "rawsize".
4077         (STD_SECTION): Adjust comments.
4078         (bfd_set_section_size, bfd_get_section_contents): Use size.
4079         (bfd_malloc_and_get_section): New function.
4080         * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
4081         * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
4082         Correctly free reloc and contents memory.
4083         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
4084         and fake CIE now that we can shink section size to zero.
4085         (_bfd_elf_write_section_eh_frame): Likewise..
4086         * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
4087         * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
4088         _bfd_stab_section_offset.  Use _bfd_elf_section_offset.
4089         * stabs.c (_bfd_stab_section_offset_): Remove unused args and
4090         unneeded indirection.
4091         * elf.c (_bfd_elf_section_offset): .. and update call.
4092         * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
4093         * libbfd.h: Regenerate.
4094         * bfd-in2.h: Regenerate.
4095
4096         Replace occurrences of "_raw_size" and "_cooked_size" in most places
4097         with "size".  Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
4098         sections.  Use "rawsize", if non-zero, for bfd_get_section_contents
4099         calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
4100         Similarly use "rawsize", if non-zero, in reloc functions to validate
4101         reloc addresses.  Use new bfd_malloc_and_get_section in most places
4102         where bfd_get_section_contents was called.  Expand all occurrences of
4103         bfd_section_size and bfd_get_section_size.  Rename "raw_size" var in
4104         grok_prstatus and similar functions to "size".
4105         * aix386-core.c (aix386_core_file_p): ..
4106         * aix5ppc-core.c (xcoff64_core_p): ..
4107         * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
4108         aout_adobe_set_section_contents): ..
4109         * aout-target.h (callback): ..
4110         * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
4111         MY_bfd_final_link): ..
4112         * aoutf1.h (sunos4_core_file_p): ..
4113         * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4114         adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
4115         final_link, aout_link_input_section): ..
4116         * binary.c (binary_object_p, binary_canonicalize_symtab,
4117         binary_set_section_contents): ..
4118         * bout.c (b_out_callback, b_out_write_object_contents,
4119         b_out_set_section_contents, b_out_bfd_relax_section,
4120         b_out_bfd_get_relocated_section_contents): ..
4121         * cisco-core.c (cisco_core_file_validate): ..
4122         * coff-alpha.c (alpha_ecoff_object_p,
4123         alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
4124         * coff-arm.c (coff_arm_relocate_section,
4125         bfd_arm_allocate_interworking_sections): ..
4126         * coff-h8300.c (h8300_reloc16_extra_cases,
4127         h8300_bfd_link_add_symbols): ..
4128         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
4129         * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
4130         ppc_bfd_coff_final_link): ..
4131         * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
4132         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4133         sh_align_loads, sh_coff_get_relocated_section_contents): ..
4134         * coff64-rs6000.c (xcoff64_write_object_contents,
4135         xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
4136         * coffcode.h (coff_compute_section_file_positions,
4137         coff_write_object_contents): ..
4138         * coffgen.c (make_a_section_from_file, coff_write_symbols,
4139         coff_section_symbol, build_debug_section): ..
4140         * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
4141         process_embedded_commands, _bfd_coff_link_input_bfd,
4142         _bfd_coff_write_global_sym): ..
4143         * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
4144         * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
4145         * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
4146         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4147         _bfd_dwarf2_find_nearest_line): ..
4148         * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
4149         ecoff_compute_section_file_positions,
4150         _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
4151         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
4152         _bfd_elf_discard_section_eh_frame_hdr,
4153         _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
4154         _bfd_elf_write_section_eh_frame,
4155         _bfd_elf_write_section_eh_frame_hdr): ..
4156         * elf-hppa.h (elf_hppa_sort_unwind): ..
4157         * elf-m10200.c (mn10200_elf_relax_section,
4158         mn10200_elf_relax_delete_bytes,
4159         mn10200_elf_get_relocated_section_contents): ..
4160         * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
4161         mn10300_elf_check_relocs, mn10300_elf_relax_section,
4162         mn10300_elf_relax_delete_bytes,
4163         mn10300_elf_get_relocated_section_contents,
4164         _bfd_mn10300_elf_adjust_dynamic_symbol,
4165         _bfd_mn10300_elf_discard_copies,
4166         _bfd_mn10300_elf_size_dynamic_sections,
4167         _bfd_mn10300_elf_finish_dynamic_sections): ..
4168         * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
4169         _bfd_elf_make_section_from_phdr, elf_fake_sections,
4170         bfd_elf_set_group_contents, map_sections_to_segments,
4171         elf_sort_sections, assign_file_positions_for_segments,
4172         SECTION_SIZE, copy_private_bfd_data,
4173         _bfd_elf_get_dynamic_reloc_upper_bound,
4174         _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
4175         _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
4176         elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
4177         elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
4178         _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
4179         * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
4180         bfd_elf32_arm_process_before_allocation,
4181         elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
4182         elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
4183         elf32_arm_write_section): ..
4184         * elf32-cris.c (cris_elf_grok_prstatus,
4185         elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
4186         elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
4187         cris_elf_check_relocs, elf_cris_size_dynamic_sections,
4188         elf_cris_discard_excess_dso_dynamics,
4189         elf_cris_discard_excess_program_dynamics): ..
4190         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
4191         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
4192         * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
4193         _frv_create_got_section, _frvfdpic_assign_plt_entries,
4194         elf32_frvfdpic_size_dynamic_sections,
4195         elf32_frvfdpic_modify_segment_map,
4196         elf32_frvfdpic_finish_dynamic_sections): ..
4197         * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
4198         elf32_h8_get_relocated_section_contents): ..
4199         * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
4200         elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
4201         allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
4202         elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
4203         elf32_hppa_finish_dynamic_sections): ..
4204         * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
4205         i370_elf_size_dynamic_sections, i370_elf_check_relocs,
4206         i370_elf_finish_dynamic_sections): ..
4207         * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
4208         allocate_dynrelocs, elf_i386_size_dynamic_sections,
4209         elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
4210         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
4211         i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
4212         * elf32-ip2k.c (ip2k_is_switch_table_128,
4213         ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
4214         ip2k_relax_switch_table_256, ip2k_elf_relax_section,
4215         adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
4216         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
4217         m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
4218         allocate_dynrelocs, m32r_elf_size_dynamic_sections,
4219         m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
4220         m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
4221         m32r_elf_get_relocated_section_contents): ..
4222         * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
4223         m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
4224         m68hc11_elf_relax_delete_bytes): ..
4225         * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
4226         m68hc12_elf_size_one_stub): ..
4227         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
4228         elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
4229         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
4230         elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
4231         elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
4232         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4233         elf32_mips_grok_prstatus): ..
4234         * elf32-or32.c (or32_elf_consth_reloc): ..
4235         * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
4236         elf_create_pointer_linker_section, ppc_elf_create_linker_section,
4237         ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
4238         allocate_dynrelocs, ppc_elf_size_dynamic_sections,
4239         ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
4240         ppc_elf_final_write_processing): ..
4241         * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4242         allocate_dynrelocs, elf_s390_size_dynamic_sections,
4243         elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
4244         * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
4245         sh_elf_relax_delete_bytes, sh_elf_align_loads,
4246         sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
4247         sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
4248         sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
4249         * elf32-sh64-com.c (sh64_address_in_cranges,
4250         sh64_get_contents_type): ..
4251         * elf32-sh64.c (sh64_find_section_for_address,
4252         sh64_elf_final_write_processing): ..
4253         * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
4254         sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
4255         allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
4256         elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
4257         * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
4258         * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
4259         elf_vax_size_dynamic_sections, elf_vax_discard_copies,
4260         elf_vax_instantiate_got_entries, elf_vax_relocate_section,
4261         elf_vax_finish_dynamic_sections): ..
4262         * elf32-xstormy16.c (xstormy16_elf_24_reloc,
4263         xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
4264         xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
4265         xstormy16_elf_finish_dynamic_sections): ..
4266         * elf32-xtensa.c (xtensa_read_table_entries,
4267         elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
4268         elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
4269         bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
4270         elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
4271         elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
4272         get_relocation_opcode, retrieve_contents, find_relaxable_sections,
4273         collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
4274         relax_section, shrink_dynamic_reloc_sections, relax_property_section,
4275         xtensa_callback_required_dependence): ..
4276         * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
4277         elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
4278         elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
4279         elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
4280         elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
4281         elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
4282         elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
4283         elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
4284         * elf64-hppa.c (allocate_dynrel_entries,
4285         elf64_hppa_size_dynamic_sections,
4286         elf64_hppa_finish_dynamic_sections): ..
4287         * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
4288         mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
4289         elf64_mips_grok_prstatus): ..
4290         * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
4291         mmix_elf_relocate_section, mmix_elf_final_link,
4292         mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
4293         mmix_elf_relax_section, mmix_elf_get_section_contents): ..
4294         * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
4295         ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
4296         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
4297         allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
4298         ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
4299         toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
4300         ppc64_elf_build_stubs, ppc64_elf_relocate_section,
4301         ppc64_elf_finish_dynamic_sections): ..
4302         * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4303         allocate_dynrelocs, elf_s390_size_dynamic_sections,
4304         elf_s390_finish_dynamic_sections): ..
4305         * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
4306         sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
4307         sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
4308         sh64_elf64_finish_dynamic_sections): ..
4309         * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
4310         sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
4311         sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
4312         sparc64_elf_finish_dynamic_symbol,
4313         sparc64_elf_finish_dynamic_sections): ..
4314         * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
4315         elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
4316         elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
4317         elf64_x86_64_finish_dynamic_sections): ..
4318         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
4319         * elfcode.h (elf_slurp_reloc_table): ..
4320         * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
4321         elf_finalize_dynstr, elf_link_add_object_symbols,
4322         bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
4323         elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
4324         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4325         elf32_mips_grok_prstatus): ..
4326         * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
4327         elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
4328         elfNN_ia64_choose_gp, elfNN_ia64_final_link,
4329         elfNN_ia64_finish_dynamic_sections): ..
4330         * elfxx-mips.c (mips_elf_create_procedure_table,
4331         mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
4332         _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
4333         mips_elf_global_got_index, mips_elf_multi_got,
4334         mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
4335         mips_elf_allocate_dynamic_relocations,
4336         mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
4337         _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
4338         _bfd_mips_elf_always_size_sections,
4339         _bfd_mips_elf_size_dynamic_sections,
4340         _bfd_mips_elf_finish_dynamic_symbol,
4341         _bfd_mips_elf_finish_dynamic_sections,
4342         _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
4343         _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
4344         _bfd_elf_mips_get_relocated_section_contents,
4345         _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
4346         * hp300hpux.c (callback): ..
4347         * hppabsd-core.c (make_bfd_asection): ..
4348         * hpux-core.c (make_bfd_asection): ..
4349         * i386linux.c (linux_link_create_dynamic_sections,
4350         bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
4351         * i386msdos.c (msdos_write_object_contents): ..
4352         * i386os9k.c (os9k_callback, os9k_write_object_contents,
4353         os9k_set_section_contents): ..
4354         * ieee.c (parse_expression, ieee_slurp_external_symbols,
4355         ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
4356         ieee_write_section_part, do_with_relocs, do_as_repeat,
4357         do_without_relocs, ieee_write_debug_part, init_for_output,
4358         ieee_set_section_contents): ..
4359         * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
4360         * irix-core.c (do_sections, make_bfd_asection): ..
4361         * libaout.h (aout_section_merge_with_text_p): ..
4362         * libbfd.c (_bfd_generic_get_section_contents,
4363         _bfd_generic_get_section_contents_in_window): ..
4364         * linker.c (default_indirect_link_order): ..
4365         * lynx-core.c (make_bfd_asection): ..
4366         * m68klinux.c (linux_link_create_dynamic_sections,
4367         bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4368         * mach-o.c (bfd_mach_o_make_bfd_section,
4369         bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
4370         bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
4371         bfd_mach_o_scan_read_segment): ..
4372         * merge.c (_bfd_add_merge_section, record_section, merge_strings,
4373         _bfd_merge_sections): ..
4374         * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
4375         mmo_map_set_sizes, mmo_canonicalize_symtab,
4376         mmo_internal_write_section, mmo_write_object_contents): ..
4377         * netbsd-core.c (netbsd_core_file_p): ..
4378         * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
4379         nlm_alpha_set_public_section): ..
4380         * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
4381         * nlm32-sparc.c (nlm_sparc_write_import): ..
4382         * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
4383         nlm_compute_section_file_positions): ..
4384         * oasys.c (oasys_object_p, oasys_slurp_section_data,
4385         oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
4386         * opncls.c (get_debug_link_info): ..
4387         * osf-core.c (make_bfd_asection): ..
4388         * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4389         adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
4390         final_link, aout_link_input_section): ..
4391         * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
4392         pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
4393         * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
4394         bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
4395         * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
4396         * ptrace-core.c (ptrace_unix_core_file_p): ..
4397         * reloc.c (bfd_perform_relocation, bfd_install_relocation,
4398         _bfd_final_link_relocate, bfd_generic_relax_section,
4399         bfd_generic_get_relocated_section_contents): ..
4400         * reloc16.c (bfd_coff_reloc16_relax_section,
4401         bfd_coff_reloc16_get_relocated_section_c): ..
4402         * riscix.c (riscix_some_aout_object_p): ..
4403         * rs6000-core.c (read_hdr, make_bfd_asection): ..
4404         * sco5-core.c (make_bfd_asection): ..
4405         * simple.c (bfd_simple_get_relocated_section_contents): ..
4406         * som.c (som_object_setup, setup_sections, som_prep_headers,
4407         som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
4408         som_set_reloc_info, som_get_section_contents,
4409         som_bfd_link_split_section): ..
4410         * sparclinux.c (linux_link_create_dynamic_sections,
4411         bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4412         * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
4413         * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
4414         _bfd_write_stab_strings, _bfd_stab_section_offset): ..
4415         * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
4416         bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
4417         sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
4418         sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
4419         sunos_finish_dynamic_link): ..
4420         * syms.c (_bfd_stab_section_find_nearest_line): ..
4421         * tekhex.c (first_phase, tekhex_set_section_contents,
4422         tekhex_write_object_contents): ..
4423         * trad-core.c (trad_unix_core_file_p): ..
4424         * versados.c (process_esd, process_otr, process_otr): ..
4425         * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
4426         * vms-misc.c (add_new_contents): ..
4427         * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
4428         * vms.c (vms_set_section_contents): ..
4429         * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
4430         xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
4431         _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
4432         * xsym.c (bfd_sym_scan): .. See above.
4433
4434 2004-06-21  H.J. Lu  <[email protected]>
4435
4436         * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
4437         calling _bfd_merged_section_offset only for section symbols.
4438
4439 2004-06-22  Alan Modra  <[email protected]>
4440
4441         * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
4442         for handling SEC_MERGE symbols in relax_section.
4443
4444 2004-06-21  Alexandre Oliva  <[email protected]>
4445
4446         2003-05-15  Richard Sandiford  <[email protected]>
4447         * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
4448         linked together. Mark the result as h8300sx code.
4449
4450 2004-06-21  Alexandre Oliva  <[email protected]>
4451
4452         * elf-bfd.h (struct elf_backend_data): Added
4453         elf_backend_omit_section_dynsym.
4454         (_bfd_elf_link_omit_section_dynsym): Declare.
4455         * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
4456         (elf_backend_omit_section_dynsym): Use it for frvfdpic.
4457         * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
4458         (_bfd_elf_link_renumber_dynsyms): ... this function.
4459         * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
4460         _bfd_elf_link_omit_section_dynsym).
4461         (elfNN_bed): Added elf_backend_omit_section_dynsym.
4462
4463 2004-06-21  Nick Clifton  <[email protected]>
4464
4465         * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
4466         flags.
4467
4468 2004-06-17  Jerome Guitton  <[email protected]>
4469
4470         * bfd-in.h (bfd_cache_close_all): New function declaration.
4471         * bfd-in2.h: Regenerate.
4472         * cache.c (bfd_cache_close_all): New function definition.
4473
4474 2004-06-16  Mark Kettenis  <[email protected]>
4475
4476         * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
4477         4.10 and beyond.
4478         * configure: Regenerate.
4479
4480 2004-06-16  Daniel Jacobowitz  <[email protected]>
4481
4482         * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
4483         the pre-existing section.
4484
4485 2004-06-15  Alan Modra  <[email protected]>
4486
4487         * section.c (struct sec): Remove usused flags.  Reorganize a little.
4488         (bfd_get_section_size_before_reloc): Delete.
4489         (bfd_get_section_size_after_reloc): Delete.
4490         (STD_SECTION): Update.
4491         (bfd_get_section_size_now): Delete.
4492         (bfd_set_section_contents): Don't referece reloc_done.
4493         (bfd_get_section_contents): Remove reloc_done comment.
4494         * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
4495         reloc_done.
4496         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
4497         * ecoff.c (bfd_debug_section): Update initializer.
4498         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
4499         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
4500         * bfd-in.h (bfd_section_size): Expand.
4501         (bfd_get_section_size): New macro.
4502         * bfd-in2.h: Regenerate.
4503         * coff64-rs6000.c (xcoff64_write_object_contents): Replace
4504         bfd_get_section_size_before_reloc with bfd_get_section_size.
4505         * coffcode.h (coff_write_object_contents): Likewise.
4506         * coffgen.c (build_debug_section): Likewise.
4507         * dwarf1.c (parse_line_table): Likewise.
4508         (_bfd_dwarf1_find_nearest_line): Likewise.
4509         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
4510         * i386msdos.c (msdos_write_object_contents): Likewise.
4511         * pdp11.c (squirt_out_relocs): Likewise.
4512         * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
4513         * elf64-mmix.c (mmix_elf_final_link): Update comment.
4514
4515 2004-06-14  Chris Demetriou  <[email protected]>
4516
4517         * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
4518         removal) with updated comment.
4519         (bfd_elf32_bfd_reloc_type_lookup): Add back case for
4520         BFD_RELOC_32_PCREL.
4521         (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
4522         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4523
4524 2004-06-12  Alan Modra  <[email protected]>
4525
4526         * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
4527         overflow on branches to undefweaks.
4528
4529 2004-06-11  Maciej W. Rozycki  <[email protected]>
4530
4531         * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
4532         as ecoff_section_data() does not return a valid lvalue.
4533
4534 2004-06-09  Alexandre Oliva  <[email protected]>
4535
4536         * elflink.c (elf_sort_symbol): Compare section id, not pointers.
4537         (elf_link_add_object_symbols): Likewise.
4538
4539         * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
4540         (elf_backend_reloc_type_class): New.
4541
4542 2004-06-08  Mark Kettenis  <[email protected]>
4543
4544         * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
4545         netbsd-core.lo.
4546         * configure: Regenerate.
4547
4548 2004-06-07  Daniel Jacobowitz  <[email protected]>
4549
4550         From:  Albert Chin-A-Young  <[email protected]>
4551         * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
4552         to unsigned int.
4553
4554 2004-05-29  H.J. Lu  <[email protected]>
4555
4556         * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
4557         change.
4558
4559 2004-05-28  DJ Delorie  <[email protected]>
4560
4561         * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
4562         for linking, but otherwise adjust reloc for merged sections.
4563
4564 2004-05-28  H.J. Lu  <[email protected]>
4565
4566         * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
4567         _bfd_merged_section_offset for local symbols.
4568
4569 2004-05-28  Andrew Stubbs <[email protected]>
4570
4571         * Makefile.am: Regenerate dependencies.
4572         * Makefile.in: Regenerate.
4573         * archures.c: Add bfd_mach_sh3_nommu .
4574         * bfd-in2.h: Regenerate.
4575         * cpu-sh.c: Add sh3-nommu architecture.
4576         (bfd_to_arch_table): Create new table.
4577         (sh_get_arch_from_bfd_mach): Create new function.
4578         (sh_get_arch_up_from_bfd_mach): Create new function.
4579         (sh_merge_bfd_arch): Create new function.
4580         * elf32-sh.c (sh_ef_bfd_table): Add table.
4581         (sh_elf_check_relocs): Replace switch statement with
4582         use of sh_ef_bfd_table .
4583         (sh_elf_get_flags_from_mach): Add new function.
4584         (sh_find_elf_flags): Likewise.
4585         (sh_elf_copy_private_data): Replace most of non-elf contents
4586         with a call to sh_merge_bfd_arch() .
4587
4588 2004-05-27  Michael Chastain  <[email protected]>
4589
4590         * Makefile.am (bfdver.h): Use explicit filename, not $< .
4591         * Makefile.in: Regenerate.
4592
4593 2004-05-27  Alexandre Oliva  <[email protected]>
4594
4595         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
4596         custom calling conventions for dynamic symbols.
4597         (mn10300_elf_relax_section): Avoid relaxing a function as a local
4598         symbol if it's an alias to a global one.
4599
4600 2004-05-26  H.J. Lu  <[email protected]>
4601
4602         * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
4603         change.
4604
4605 2004-05-27  Alexandre Oliva  <[email protected]>
4606
4607         * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
4608         loop over hashes.
4609
4610 2004-05-26  Alan Modra  <[email protected]>
4611
4612         * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
4613         for SHT_GROUP sections.
4614
4615 2004-05-25  Alan Modra  <[email protected]>
4616
4617         * elflink.c (elf_link_add_object_symbols): Don't set up merge
4618         section data here..
4619         * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
4620         * merge.c: Formatting.  Remove unnecessary casts.  Expand
4621         bfd_get_section_alignment macro.
4622         (struct sec_merge_sec_info): Rename "first" to "first_str".  Update
4623         use throughout file.
4624         (_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
4625         comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
4626         section name to determine sinfo group, instead test output section
4627         and alignment.
4628         (_bfd_merge_sections): Add struct bfd_link_info param.  Call
4629         _bfd_strip_section_from_output rather than just twiddling flags.
4630         * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
4631         (_bfd_merge_sections): Update prototype.
4632         * libbfd.h: Regenerate.
4633
4634 2004-05-24  Mark Kettenis  <[email protected]>
4635
4636         * netbsd-core.c: Correctly indent section that sets architecture
4637         from machine ID.
4638
4639         From Miod Vallat <[email protected]>:
4640         * m88kopenbsd.c: New file.
4641         * targets.c (m88k_openbsd_vec): New.
4642         * config.bfd: Add m88k-*-openbsd*.
4643         * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
4644         (m88kopenbsd_vec): New.
4645         * configure: Regenerate.
4646         * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
4647         (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
4648         Run "make dep-am".
4649         * Makefile.in: Regenerate.
4650         * po/SRC-POTFILES.in: Regenerate.
4651
4652 2004-05-24  Nick Clifton  <[email protected]>
4653
4654         * hash.c: Remove bogus node "Changing the default Hash Table Size"
4655         introduced by hash table size patch.
4656
4657 2004-05-22  Ben Elliston  <[email protected]>
4658
4659         * configure.in (is_release): Remove.
4660         (bfd_version_date, bfd_version, bfd_version_string): Likewise.
4661         (AC_OUTPUT): Don't output bfdver.h from version.h.
4662         * configure: Regenerate.
4663         * Makefile.am (RELEASE): New variable.
4664         (bfdver.h): New target.
4665         * Makefile.in: Regenerate.
4666         * doc/Makefile.in: Likewise.
4667
4668 2004-05-22  Ben Elliston  <[email protected]>
4669
4670         * Makefile.am (config.status): Don't depend on version.h.
4671         * Makefile.in: Regenerate.
4672
4673 2004-05-22  Alan Modra  <[email protected]>
4674
4675         * merge.c (_bfd_merged_section_offset): Remove "addend" param.
4676         * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
4677         * libbfd.h: Regenerate.
4678         * elf.c (_bfd_elf_rela_local_sym): Adjust call.
4679         (_bfd_elf_rel_local_sym): Likewise.
4680         * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
4681         (elf_link_input_bfd): Likewise.
4682         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
4683         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4684         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4685         (elfNN_ia64_relocate_section): Likewise.
4686
4687 2004-05-21  Andy Chittenden  <[email protected]>
4688
4689         * hash.c (bfd_default_hash_table_size): New variable.
4690         (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
4691         (bfd_hash_set_default_size): New function.  Set the default size
4692         to a selected prime number close to the argument.  Document new
4693         function.
4694         * bfd-in.h: Add prototype for  bfd_hash_set_default_size.
4695         * bfd-in2.h: Regenerate.
4696         * Makefile.am (hash.lo): Add dependency upon libiberty.h.
4697         * Makefile.in: Regenerate.
4698
4699 2004-05-21  Mark Kettenis  <[email protected]>
4700
4701         * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
4702         * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
4703         arm, m68k, m88k and hppa core files.
4704
4705 2004-05-21  Nick Clifton  <[email protected]>
4706
4707         * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
4708         (bfd_bwrite): Likewise.
4709         (bfd_tell): Likewise.
4710         (bfd_flush): Likewise.
4711         (bfd_stat): Likewise.
4712         (bfd_seek): Likewise.
4713         (bfd_get_mtime): Likewise.
4714         (bfd_get_size): Likewise.
4715
4716 2004-05-19  Ben Elliston  <[email protected]>
4717
4718         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
4719
4720 2004-05-19  Mikulas Patocka  <[email protected]>
4721
4722         * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
4723         (bfd_generic_openr_next_archived_file): Likewise.
4724
4725 2004-05-17  Bob Wilson  <[email protected]>
4726
4727         * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
4728         section names by inserting a new substring after .gnu.linkonce, except
4729         for .gnu.linkonce.t.* where the "t." is replaced.
4730
4731 2004-05-17  Adam Nemet  <[email protected]>
4732
4733         * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
4734         (m68-*-lynxos* case): Likewise.
4735         (powerpc-*-lyxnos* case): New case.
4736         (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
4737
4738 2004-05-17  David Heine  <[email protected]>
4739
4740         * aout-target.h (MY_bfd_copy_private_header_data): Define.
4741         * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
4742         * bfd.c (bfd_copy_private_header_data): Define.
4743         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
4744         interface.
4745         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
4746         * coffcode.h (coff_bfd_copy_private_header_data): Define.
4747         * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
4748         * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
4749         segments by calling copy_private_bfd_data.
4750         (_bfd_elf_copy_private_header_data): Define.
4751         * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
4752         * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
4753         * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
4754         * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
4755         * mmo.c (mmo_bfd_copy_private_header_data): Define.
4756         * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
4757         * som.c (som_bfd_copy_private_header_data): Define.
4758         * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
4759         * vms.c (vms_bfd_copy_private_header_data): Define.
4760         * bfd-in2.h: Regenerate.
4761         * libbfd.h: Regenerate.
4762
4763 2004-05-15  Thiemo Seufer  <[email protected]>
4764
4765         * elfxx-mips.c (MINUS_TWO): Define.
4766         (mips_elf_higher, mips_elf_highest,
4767         mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
4768         some bfd_vma values.
4769         (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
4770
4771 2004-05-14  John David Anglin  <[email protected]>
4772
4773         * som.c (log2): Rename to exact_log2.  Adjust all callers.
4774
4775 2004-05-13  Paul Brook  <[email protected]>
4776
4777         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
4778         dwarf3 format CIE entries.  Remove comment about the size of the
4779         ra_column field.  It is now correctly deduced.
4780
4781 2004-05-13  Joel Sherrill <[email protected]>
4782
4783         * config.bfd (or32-*-rtems*): Switch to elf.
4784
4785 2004-05-13  Nick Clifton  <[email protected]>
4786
4787         * po/fr.po: Updated French translation.
4788
4789 2004-05-11  Jakub Jelinek  <[email protected]>
4790
4791         * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
4792         into .dynsym if elf_section_data (sec)->dynindx <= 0.
4793         Adjust counting of last_local.
4794         (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
4795         other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
4796         created by the linker nor !SHF_ALLOC.
4797
4798         * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
4799         DT_PLTGOT to the start of the .got.plt section instead of the
4800         .got output section.  Set sh_entsize for .got section in addition
4801         to .got.plt.
4802         (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
4803         is at sgot->output_section->vma.
4804         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
4805         DT_PLTGOT to the start of the .got.plt section instead of the
4806         .got output section.
4807         (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
4808         is at sgot->output_section->vma.  Set sh_entsize for .got section
4809         in addition to .got.plt.
4810         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
4811         (bfd_section_from_phdr): Likewise.
4812         (map_sections_to_segments): Likewise.
4813         (assign_file_positions_for_segments): Likewise.
4814         (get_program_header_size): Likewise.
4815         * elflink.c (bfd_elf_size_dynamic_sections): Set
4816         elf_tdata (output_bfd)->relro from info->relro.
4817         * elf-bfd.h (struct elf_obj_tdata): Add relro field.
4818
4819 2004-05-08  Alexandre Oliva  <[email protected]>
4820
4821         * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
4822         a zero symndx for which we hadn't accounted a dynamic relocation.
4823         (_frvfdpic_add_rofixup): Likewise.
4824
4825 2004-05-07  Brian Ford  <[email protected]>
4826             DJ Delorie  <[email protected]>
4827
4828         * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
4829         Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
4830         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
4831         IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
4832
4833 2004-05-07  Alexandre Oliva  <[email protected]>
4834
4835         * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
4836         immediately if there's no link info.
4837         (elf32_frvfdpic_copy_private_bfd_data): New.
4838         (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
4839
4840 2004-05-06  Zack Weinberg  <[email protected]>
4841
4842         * dwarf2.c (add_line_info): Also set info->filename to NULL if
4843         filename argument is null; do not call strlen on a null pointer.
4844
4845 2004-05-06  Daniel Jacobowitz  <[email protected]>
4846
4847         * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
4848         special case.
4849
4850 2004-05-05  Alexandre Oliva  <[email protected]>
4851
4852         * configure.in (bfd_elf32_frvfdpic_vec): New.
4853         * configure: Rebuilt.
4854         * targets.c (bfd_elf32_frvfdpic_vec): New.
4855         * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
4856         on the latter.
4857         * elf32-frv.c: Prefix all identifiers added for FDPIC support with
4858         frvfdpic instead of frv.  Rearrange elf-target macros such that
4859         the FDPIC-specific ones are only defined for this new target
4860         vector.
4861         (bfd_elf32_frvfdpic_vec): Declare.
4862         (IS_FDPIC): New.
4863         (elf32_frv_relocate_section): Use it to enable segment checking
4864         and to control rofixup emission.  Add output section vma to
4865         applied relocation in non-LOAD non-ALLOC sections.  Use
4866         _bfd_error_handler for errors.
4867         (_frv_create_got_section): Create .rel.got and .rofixup only in
4868         FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
4869         linker script.
4870         (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
4871         (elf32_frvfdpic_modify_segment_map): Likewise.
4872         (elf32_frv_finish_dynamic_sections): New, do-nothing.
4873         (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
4874         error message if we miscompute the rofixup size.
4875         (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
4876         (frvfdpic_elf_encode_eh_address): Likewise.
4877         (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
4878         Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
4879         relocs.  Reject unknown relocation types.
4880         (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
4881         (frv_elf_merge_private_bfd_data): Likewise.
4882         (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
4883         0x4000 for newly-added elf32-frvfdpic.
4884
4885 2004-05-05  Nick Clifton  <[email protected]>
4886
4887         PR/136
4888         * cache.c (bfd_cache_lookup_worker): Call abort() rather than
4889         returning NULL as most users of this function do not check its
4890         return value.
4891         * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
4892         of bfd_cache_lookup().
4893         * sco5-core.c (sco5_core_file_p): Likewise.
4894         * trad-core.c (trad_unix_core_file_p): Likewise.
4895
4896 2004-05-05  Nick Clifton  <[email protected]>
4897
4898         * cache.c (bfd_cache_lookup): Improve formatting.
4899         * archive.c: Fix formatting.
4900
4901 2004-05-05  Peter Barada  <[email protected]>
4902
4903         * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
4904         * cpu-m68k.c(bfd_m68k_arch): Likewise.
4905         * bfd-in2.h(bfd_architecture): Regenerate.
4906
4907 2004-05-03  Alan Modra  <[email protected]>
4908
4909         * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
4910         SEC_MERGE sections.
4911         * elflink.c (elf_link_input_bfd): Adjust output reloc index for
4912         those against discarded link-once and SEC_MERGE section symbols.
4913
4914 2004-05-02  H.J. Lu  <[email protected]>
4915
4916         * section.c (bfd_get_section_by_name_if): New.
4917         * bfd-in2.h: Regenerated.
4918
4919 2004-05-02  Alan Modra  <[email protected]>
4920
4921         * som.c (som_bfd_is_group_section): Define.
4922
4923 2004-05-01  Alan Modra  <[email protected]>
4924
4925         * section.c (bfd_make_section_anyway): Copy the whole
4926         bfd_hash_entry, not just "next" from existing entry.
4927
4928 2004-04-30  H.J. Lu  <[email protected]>
4929
4930         * elf.c (bfd_section_from_shdr): Maintain the section order in
4931         a section group.
4932         (special_sections): Add ".note.GNU-stack".
4933         (elf_fake_sections): Handle section group for relocatable
4934         link..
4935
4936 2004-04-30  H.J. Lu  <[email protected]>
4937
4938         * section.c (bfd_sections_find_if): New.
4939         * bfd-in2.h: Regenerated.
4940
4941 2004-04-30  Alan Modra  <[email protected]>
4942
4943         * section.c (bfd_make_section_anyway): Add all sections to hash tab.
4944
4945         * elf-bfd.h (bfd_elf_is_group_section): Declare.
4946         * elf.c (bfd_elf_is_group_section): New function.
4947         * elfxx-target.h (bfd_elfNN_bfd_is_group_section
4948         * section.c (bfd_generic_is_group_section): New function.
4949         * targets.c (struct bfd_target): Add _bfd_is_group_section field.
4950         (BFD_JUMP_TABLE_LINK): Adjust.
4951         * aout-adobe.c (aout_32_bfd_is_group_section): Define.
4952         * aout-target.h (MY_bfd_is_group_section): Define.
4953         * aout-tic30.c (MY_bfd_is_group_section): Define.
4954         * bfd.c (bfd_is_group_section): Define.
4955         * binary.c (binary_bfd_is_group_section): Define.
4956         * bout.c (b_out_bfd_is_group_section): Define.
4957         * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
4958         * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
4959         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
4960         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
4961         * coffcode.h (coff_bfd_is_group_section): Define.
4962         * i386msdos.c (msdos_bfd_is_group_section): Define.
4963         * i386os9k.c (os9k_bfd_is_group_section): Define.
4964         * ieee.c (ieee_bfd_is_group_section): Define.
4965         * ihex.c (ihex_bfd_is_group_section): Define.
4966         * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
4967         * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
4968         * mmo.c (mmo_bfd_is_group_section): Define.
4969         * nlm-target.h (nlm_bfd_is_group_section): Define.
4970         * oasys.c (oasys_bfd_is_group_section): Define.
4971         * pef.c (bfd_pef_bfd_is_group_section): Define.
4972         * ppcboot.c (ppcboot_bfd_is_group_section): Define.
4973         * srec.c (srec_bfd_is_group_section): Define.
4974         * tekhex.c (tekhex_bfd_is_group_section): Define.
4975         * versados.c (versados_bfd_is_group_section): Define.
4976         * vms.c (vms_bfd_is_group_section): Define.
4977         * xsym.c (bfd_sym_bfd_is_group_section): Define.
4978         * bfd-in2.h: Regenerate.
4979         * libbfd.h: Regenerate.
4980
4981 2004-04-30  Alan Modra  <[email protected]>
4982
4983         * elflink.c (elf_gc_mark): Follow indirect and warning syms.
4984
4985 2004-04-30  Hans-Peter Nilsson  <[email protected]>
4986
4987         * configure.in: Update version to 2.15.91.
4988         * configure: Regenerate.
4989
4990 2004-04-29  Brian Ford  <[email protected]>
4991
4992         * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
4993         * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
4994         [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
4995         (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
4996         [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
4997         .gnu.linkonce.wi. sections.
4998         * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
4999         (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
5000         .gnu.linkonce.wi..
5001         * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
5002         (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5003
5004 2004-04-28  Chris Demetriou  <[email protected]>
5005
5006         * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
5007         * bfd-in2.h: Regenerate.
5008         * libbfd.h: Likewise.
5009
5010 2004-04-28  John David Anglin  <[email protected]>
5011
5012         * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
5013         dup_common fields.
5014         (setup_sections): Use som_subspace_dictionary_record struct instead
5015         subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
5016         is_comdat, is_common or dup_common.
5017         (som_prep_headers): Use som_subspace_dictionary_record struct.  Set
5018         is_comdat, is_common and dup_common in section subspace_dict from
5019         copy_data.
5020         (som_begin_writing): Use som_subspace_dictionary_record struct.
5021         (som_finish_writing): Likewise.
5022         (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
5023         is_common and dup_common flags in info for symbol.  Add comment
5024         regarding linker support for these fields.  Slightly reorganize
5025         function.
5026         (som_build_and_write_symbol_table): Set is_comdat, is_common and
5027         dup_common fields in symbol table from symbol info.
5028         (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
5029         arguments.  Set corresponding fields in copy_data.  Change all callers.
5030         (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
5031         symbol table.
5032         (som_vec): Add SEC_LINK_ONCE to applicable section flags.
5033         * som.h (som_subspace_dictionary_record): Define.
5034         (som_copyable_section_data_struct): Add is_comdat, is_common and
5035         dup_common fields.
5036         (som_section_data_struct): Use som_subspace_dictionary_record struct
5037         instead of subspace_dictionary_record.
5038         (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
5039
5040 2004-04-27  Bob Wilson  <[email protected]>
5041
5042         * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
5043         if set.  Check reloc_done flag before applying relocations.  Use
5044         output addresses, both when applying relocations and when comparing
5045         against the specified section.
5046         (elf_xtensa_relocate_section): Use output address to check if dynamic
5047         reloc is in a literal pool.  Set section's reloc_done flag.
5048
5049 2004-04-27  H.J. Lu  <[email protected]>
5050
5051         * elf32-sh64.c (elf_backend_section_flags): New. Defined.
5052         (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5053         section.
5054         (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
5055         section.
5056
5057 2004-04-27  Alan Modra  <[email protected]>
5058
5059         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
5060         structure field removed in 2004-04-24 patch.
5061         * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
5062
5063         * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
5064         Constify hdr arg.
5065         * elf32-arm.h (elf32_arm_section_flags): Likewise.
5066         * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
5067         * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
5068         * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
5069         field before calling elf_backend_section_flags.
5070
5071 2004-04-24  Chris Demetriou  <[email protected]>
5072
5073         * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
5074         (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
5075         (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
5076         BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
5077         and BFD_RELOC_32_PCREL.
5078         (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
5079         R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
5080         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5081         (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
5082         (mips_elf_next_relocation): Move comment about matching HI/LO
5083         relocations to...
5084         (_bfd_mips_elf_relocate_section): Here.  Remove handling for
5085         R_MIPS_GNU_REL_HI16.
5086
5087 2004-04-23  Chris Demetriou  <[email protected]>
5088
5089         * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
5090         (mips_switch_reloc, mips_read_relocs, mips_relax_section)
5091         (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
5092         (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
5093         and update comments to reflect current usage.
5094         (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
5095         and MIPS_R_SWITCH, as well as several empty entries.  Update comment
5096         for MIPS_R_PCREL16.
5097         (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
5098         (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
5099         for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5100         (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
5101         type number to be MIPS_R_PCREL16.
5102         (mips_relocate_section): Remove support for link-time relaxation
5103         of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
5104         MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5105         (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
5106         * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
5107         relaxation of branches used by embedded-PIC.
5108         * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
5109         * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
5110         related members, update comment.
5111         * pe-mips.c: Remove disabled (commented-out and #if 0'd)
5112         code related to embedded-PIC.
5113         * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
5114         initialization of now-removed 'adjust' member of
5115         'struct ecoff_debug_info'.
5116
5117 2004-04-23  Chris Demetriou  <[email protected]>
5118
5119         * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
5120
5121 2004-04-21  Philip Blundell  <[email protected]>
5122
5123         * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
5124         relocs for locally defined symbols during -shared final link.
5125         (elf32_arm_final_link_relocate): Likewise.
5126
5127 2004-04-22  Jakub Jelinek  <[email protected]>
5128
5129         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
5130         ELF_LINK_POINTER_EQUALITY_NEEDED.
5131         (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
5132         if r_type is not R_X86_64_PC32.
5133         (elf64_x86_64_finish_dynamic_symbol): If
5134         ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
5135         SHN_UNDEF symbols.
5136
5137 2004-04-22  Kaz Kojima  <[email protected]>
5138
5139         * elf32-sh.c (sh_elf_plt_sym_val): New function.
5140         (elf_backend_plt_sym_val): Define.
5141
5142 2004-04-22  Andrew Cagney  <[email protected]>
5143
5144         * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
5145
5146 2004-04-22  John David Anglin  <[email protected]>
5147
5148         * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5149         make_bfd_asection.
5150         * som.c (som_set_section_contents): Constantify second argument.
5151         (hppa_som_gen_reloc_type): Abort for unsupported selectors.
5152         (som_object_setup): Rework to avoid warning.
5153         (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
5154         Likewise.
5155
5156 2004-04-22  Andrew Cagney  <[email protected]>
5157
5158         * cache.c (bfd_cache_close): Check for a previously closed file.
5159
5160 2004-04-22  Jakub Jelinek  <[email protected]>
5161
5162         * bfd.c (bfd_get_synthetic_symtab): Define.
5163         * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
5164         NAME##_get_synthetic_symtab.
5165         (struct bfd_target): Add _bfd_get_synthetic_symtab.
5166         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
5167         * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
5168         relplt_name fields.
5169         (_bfd_elf_get_synthetic_symtab): New prototype.
5170         * elfcode.h (elf_get_synthetic_symtab): Define.
5171         * elf.c (_bfd_elf_get_synthetic_symtab): New function.
5172         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
5173         (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
5174         (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
5175         * bfd-in2.h: Rebuilt.
5176         * libbfd.h: Rebuilt.
5177         * elf32-i386.c (elf_i386_plt_sym_val): New function.
5178         (elf_backend_plt_sym_val): Define.
5179         * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
5180         (elf_backend_plt_sym_val): Define.
5181         * elf32-s390.c (elf_s390_plt_sym_val): New function.
5182         (elf_backend_plt_sym_val): Define.
5183         * elf64-s390.c (elf_s390_plt_sym_val): New function.
5184         (elf_backend_plt_sym_val): Define.
5185         * elf32-sparc (elf32_sparc_plt_sym_val): New function.
5186         (elf_backend_plt_sym_val): Define.
5187         * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
5188         (elf_backend_plt_sym_val): Define.
5189         * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
5190         (elf_backend_plt_sym_val): Define.
5191         * aout-target.h (MY_get_synthetic_symtab): Define.
5192         * aout-tic30.c (MY_get_synthetic_symtab): Define.
5193         * coff-rs6000.c (rs6000coff_vec): Add
5194         _bfd_nodynamic_get_synthetic_symtab.
5195         (pmac_xcoff_vec): Likewise.
5196         * coff64-rs6000.c (rs6000coff64_vec): Add
5197         _bfd_nodynamic_get_synthetic_symtab.
5198         (aix5coff64_vec): Likewise.
5199         * sunos.c (MY_get_synthetic_symtab): Define.
5200         * vms.c (vms_get_synthetic_symtab): Define.
5201
5202 2004-04-22  Nick Clifton  <[email protected]>
5203
5204         * bfd.c (bfd_archive_filename): Return NULL on NULL input.
5205
5206 2004-04-22  Peter Barada <[email protected]>
5207
5208         * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
5209         * bfd2-in.h: Regenerate.
5210         * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
5211
5212 2004-04-21  Chris Demetriou  <[email protected]>
5213
5214         * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
5215         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
5216         * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
5217         (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
5218         * bfd-in2.h: Regenerate.
5219
5220 2004-04-21  Bob Wilson  <[email protected]>
5221
5222         * elf32-xtensa.c (is_same_value): Add final_static_link argument and
5223         require relocations against a weak symbol to reference the same
5224         symbol hash entry if not a final, static link.
5225         (get_cached_value, add_value_map): Add final_static_link argument.
5226         (remove_literals): Pass final_static_link argument as needed.
5227
5228 2004-04-21  Andrew Cagney  <[email protected]>
5229
5230         * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
5231         (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
5232         (opncls_bwrite, opncls_bclose, opncls_bflush)
5233         (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
5234         bfd iovec that uses function callbacks.
5235         (bfd_close): Use the iovec's bclose.
5236         * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
5237         (cache_bclose, cache_bflush, cache_bstat)
5238         (cache_iovec): New functions and global variable, implement a
5239         cache "iovec", where applicable set bfd_error.
5240         (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
5241         * bfdio.c (struct bfd_iovec): Define.
5242         (real_read): Delete function.
5243         (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
5244         (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
5245         assume that bread and bwrite set bfd_error.
5246         * bfd.c (struct bfd): Add "iovec", update comments.
5247         * bfd-in2.h, libbfd.h: Re-generate.
5248
5249 2004-04-21  Andrew Cagney  <[email protected]>
5250
5251         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5252
5253 2004-04-21  Eric Botcazou  <[email protected]>
5254
5255         * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
5256         (bfd_elf_gc_sections): Fail if a shared object is being created.
5257         Do not fail if dynamic sections have been created.  Instead call
5258         elf_gc_mark_dynamic_ref_symbol to mark sections that contain
5259         dynamically referenced symbols.  Do not mark the whole graph
5260         rooted at .eh_frame, only the section proper.
5261
5262 2004-04-20  DJ Delorie  <[email protected]>
5263
5264         * reloc.c: Add BFD_RELOC_32_SECREL.
5265         * bfd-in2.h: Regenerate.
5266         * libbfd.h: Likewise.
5267         * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
5268         (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
5269         (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
5270
5271 2004-04-19  Jakub Jelinek  <[email protected]>
5272
5273         * elf32-sparc.c (elf32_sparc_relocate_section): Handle
5274         relocs against hidden/protected undefweak symbols properly.
5275         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5276
5277 2004-04-18  Mark Kettenis  <[email protected]>
5278
5279         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5280         * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
5281         core files.
5282
5283 2004-04-17  Brian Ford  <[email protected]>
5284
5285         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
5286         filepos for the SizeOfHeaders field.
5287         (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
5288         overflow.
5289         (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
5290
5291 2004-04-16  Alan Modra  <[email protected]>
5292
5293         * simple.c (bfd_simple_get_relocated_section_contents): Don't
5294         change reloc_done.  Set and restore _cooked_size.
5295         (RETURN): Delete.
5296
5297 2004-04-15  Mark Kettenis  <[email protected]>
5298
5299         * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
5300         core files.
5301
5302 2004-04-15  Nick Clifton  <[email protected]>
5303
5304         * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
5305
5306 2004-04-15  Alan Modra  <[email protected]>
5307
5308         * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
5309
5310 2004-04-15  H.J. Lu  <[email protected]>
5311
5312         * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
5313         when it is a definition.
5314
5315 2004-04-14  Alan Modra  <[email protected]>
5316
5317         * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
5318         when statically linking PIC code.
5319         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5320
5321 2004-04-11  Thiemo Seufer  <[email protected]>
5322
5323         * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
5324         * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
5325         targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
5326         * configure: Regenerate.
5327
5328 2004-04-08  Richard Sandiford  <[email protected]>
5329
5330         * elflink.c: Include libiberty.h.
5331         * Makefile.am (elflink.lo): Depend on libiberty.h.
5332         * Makefile.in: Regenerate.
5333
5334 2004-04-06  Daniel Jacobowitz  <[email protected]>
5335
5336         * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
5337         ".MIPS.stubs".
5338
5339 2004-04-05  H.J. Lu  <[email protected]>
5340
5341         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
5342         reserve the memory for dynamic linker
5343
5344 2004-04-05  Mark Kettenis  <[email protected]>
5345
5346         * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
5347         (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
5348
5349 2004-04-02  H.J. Lu  <[email protected]>
5350
5351         * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
5352         RELOC_FOR_GLOBAL_SYMBOL.
5353         (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
5354
5355 2004-04-02  H.J. Lu  <[email protected]>
5356
5357         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5358         R_ARM_ALU* only if OLD_ARM_ABI is not defined.
5359
5360 2004-04-01  Paul Brook  <[email protected]>
5361
5362         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
5363         * elf32-arm.h (struct elf32_elf_section_map): New.
5364         (struct _arm_elf_section_data): New.
5365         (elf32_arm_section_data): Define.
5366         (struct elf32_arm_link_hash_table): Add byteswap_code.
5367         (elf32_arm_link_hash_table_create): Initialize byteswap_code.
5368         (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
5369         (elf32_arm_post_process_headers): Set EF_ARM_BE8.
5370         (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
5371         elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
5372         (bfd_elf32_new_section_hook, elf_backend_write_section,
5373         elf_backend_link_output_symbol_hook): Define.
5374
5375 2004-04-01  Andy Chittenden  <[email protected]>
5376
5377         * stabs.c (struct stab_link_includes_totals): Add field 'symb'
5378         that keeps the characters in a B_INCL..B_EINCL range.
5379         (_bfd_link_section_stabs): When computing the sum of the
5380         characters in a B_INCL..B_EINCL range also keep a copy of those
5381         characters.  Use this information to distinguish between
5382         include sections that have the same sum and the same length
5383         but which are nevertheless unique.
5384
5385 2004-03-31  Paul Brook  <[email protected]>
5386
5387         * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
5388         * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
5389
5390 2004-03-31  Andy Chittenden <[email protected]>
5391
5392         * stabs.c (struct stab_link_includes_totals): Rename field 'total'
5393         to 'sum_chars' and add field 'num_chars'.
5394         (_bfd_link_section_stabs): When computing the sum of the
5395         characters in a B_INCL..B_EINCL range also keep a count of the
5396         number of characters.  Use this information to help distinguish
5397         between include sections when have the same sum but which
5398         nevertheless are still unique.
5399
5400 2004-03-31  Mattias EngdegÃ¥rd  <[email protected]>
5401
5402         * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
5403
5404 2004-03-30  Galit Heller  <[email protected]>
5405             Tomer Levi    <[email protected]>
5406
5407         * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
5408         (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
5409         (BFD32_BACKENDS): Add elf32-cr16c.lo.
5410         (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
5411         (cpu-cr16c.lo): New target.
5412         (elf32-cr16c.lo): Likewise.
5413         * Makefile.in: Regenerate.
5414         * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
5415         (bfd_archures_list): Add bfd_cr16c_arch.
5416         * config.bfd: Handle cr16c-*-elf*.
5417         * configure.in: Handle bfd_elf32_cr16c_vec.
5418         * configure: Regenerate.
5419         * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
5420         BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
5421         BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
5422         BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
5423         BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
5424         BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
5425         BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
5426         BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
5427         BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
5428         BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
5429         BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
5430         BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
5431         BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
5432         BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
5433         BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
5434         BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
5435         BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
5436         BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
5437         BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
5438         BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
5439         * targets.c (bfd_elf32_cr16c_vec): Declare.
5440         (bfd_target_vector): Add bfd_elf32_cr16c_vec.
5441         * cpu-cr16c.c: New file.
5442         * elf32-cr16c.c: Likewise.
5443         * libbfd.h: Regenerate.
5444         * bfd-in2.h: Likewise.
5445
5446 2004-03-30  Jakub Jelinek  <[email protected]>
5447
5448         * elf.c (map_sections_to_segments): Fix handling of .tbss.
5449
5450 2004-03-27  Alan Modra  <[email protected]>
5451
5452         * Makefile.am: Remove all mention of elflink.h.
5453         * Makefile.in: Regenerate.
5454         * bfd-in.h (bfd_elf_discard_info): Declare.
5455         (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
5456         * bfd-in2.h: Regenerate.
5457         * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
5458         bfd_elf32_link_record_dynamic_symbol,
5459         bfd_elf64_link_record_dynamic_symbol,
5460         _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
5461         bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
5462         _bfd_elf32_link_record_local_dynamic_symbol,
5463         _bfd_elf64_link_record_local_dynamic_symbol,
5464         _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
5465         _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
5466         _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
5467         _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
5468         _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
5469         _bfd_elf32_reloc_symbol_deleted_p,
5470         _bfd_elf64_reloc_symbol_deleted_p): Delete.
5471         (bfd_elf_link_record_dynamic_symbol,
5472         bfd_elf_link_record_local_dynamic_symbol,
5473         bfd_elf_final_link, bfd_elf_gc_sections,
5474         bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
5475         bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
5476         bfd_elf_reloc_symbol_deleted_p): Declare.
5477         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
5478         * elf32-arm.h: Update for changed function names.  Remove local
5479         WILL_CALL_FINISH_DYNAMIC_SECTION define.
5480         * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
5481         * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
5482         * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
5483         * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5484         * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5485         * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
5486         * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
5487         * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
5488         * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
5489         (bfd_elfNN_print_symbol): Define.
5490         * elfcode.h: Don't include elflink.h.
5491         (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
5492         elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
5493         elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
5494         elf_gc_record_vtinherit, elf_gc_record_vtentry,
5495         elf_link_record_local_dynamic_symbol): Don't define.
5496         * elflink.c: Update for changed function names.  Move elflink.h
5497         code here.
5498         * elflink.h: Delete file.
5499         * po/SRC-POTFILES.in: Regenerate.
5500         * po/bfd.pot: Regenerate.
5501
5502 2004-03-27  Alan Modra  <[email protected]>
5503
5504         * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
5505         "name" for global syms accidentally removed in 2004-03-20 change.
5506
5507 2004-03-27  Alan Modra  <[email protected]>
5508
5509         * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
5510         * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
5511         where Elf_External_* is different for 64 and 32 bit, with
5512         corresponding elf_size_info field.
5513         (struct elf_final_link_info): Use "bfd_byte *" instead
5514         of "Elf_External_Sym *" for external_syms and symbuf.
5515         (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
5516         vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
5517         (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
5518         (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
5519         (elf_link_sort_cmp2): Adjust.
5520         (elf_link_sort_relocs): Set up r_sym_mask local var instead of
5521         using ELF_R_SYM macro.  Set u.sym_mask.
5522         (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
5523         version, elf_stringtab_init.  Ditto for bfd_section_from_elf_index
5524         vs. section_from_elf_index.  Adjust Elf_External_Sym pointer
5525         arithmetic.  Pass bed to elf_link_flush_output_syms.  Adjust
5526         Elf_External_Dyn pointer arithmentic.  Use bed swap_dyn_in and
5527         swap_syn_out functions.  Rearrange dyn swap in/out switch.
5528         (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
5529         Pass bed to elf_link_flush_output_syms.  Use bed swap_symbol_out.
5530         (elf_link_flush_output_syms): Add elf_backend_data arg.
5531         (elf_link_check_versioned_symbol): Likewise.
5532         (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
5533         Adjust Elf_External_Sym pointer arithmetic.  Use bed swap_symbol_out.
5534         (elf_link_input_bfd): Use bfd_section_from_elf_index.  Set up
5535         r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
5536         ELF_R_TYPE and ELF_R_INFO macros.
5537         (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
5538         based on size rather than using ELF_R_INFO.
5539         (elf_gc_mark): Set up r_sym_shift local var and use instead of
5540         ELF_R_SYM macro.
5541         (struct alloc_got_off_arg): New.
5542         (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
5543         ARCH_SIZE.  Pass get entry size down to elf_gc_allocate_got_offsets.
5544         (elf_gc_allocate_got_offsets): Adjust.
5545         (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
5546         ELF_R_SYM.  Use bfd_section_from_elf_index.
5547         (elf_bfd_discard_info): Set cookie.r_sym_shift.
5548         * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
5549         (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
5550
5551 2004-03-26  Stan Shebs  <[email protected]>
5552
5553         Remove MPW support, no longer used.
5554         * config.bfd (powerpc-*-mpw*): Remove configuration.
5555         * mpw-config.in, mpw-make.sed: Remove files.
5556         * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
5557
5558 2004-03-26  Alan Modra  <[email protected]>
5559
5560         * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
5561         (ppc64_elf_add_symbol_hook): New function.
5562         * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
5563         const from Elf_Internal_Sym param.
5564         * elflink.c (elf_link_add_object_symbols): Adjust.
5565         * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
5566         * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
5567         * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
5568         * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
5569         * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
5570         * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
5571         * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
5572         * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
5573         * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
5574         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
5575         * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
5576         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
5577         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
5578         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
5579         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
5580         * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
5581
5582 2004-03-26  Alan Modra  <[email protected]>
5583
5584         * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
5585         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
5586         (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
5587         (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
5588         (bfd_elf64_bfd_link_add_symbols): Delete.
5589         (bfd_elf_link_add_symbols): Declare.
5590         * elfcode.h (elf_bfd_link_add_symbols): Delete.
5591         * elflink.c: Include safe-ctype.h.
5592         (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
5593         make static.
5594         (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
5595         (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
5596         static.
5597         (elf_link_add_archive_symbols): Rename from
5598         _bfd_elf_link_add_archive_symbols, make static.
5599         (elf_link_add_object_symbols): New function.  Corresponding
5600         elflink.h function converted to use elf_size_info.
5601         (bfd_elf_link_add_symbols): Likewise.
5602         (bfd_elf_size_dynamic_sections): Adjust.
5603         * elflink.h (elf_bfd_link_add_symbols): Delete.
5604         (elf_link_add_object_symbols): Delete.
5605         * elf32-gen.c (elf32_generic_link_add_symbols): Call
5606         bfd_elf_link_add_symbols.
5607         * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
5608
5609 2004-03-25  Alan Modra  <[email protected]>
5610
5611         * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
5612         and chained shared libs only if dynsym.  Clear dynsym on forced-local.
5613
5614         * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
5615         (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
5616         (_bfd_elf_add_dt_needed_tag): Declare.
5617         (_bfd_elf_sort_symbol): Declare.
5618         (_bfd_elf_finalize_dynstr): Declare.
5619         (RELOC_FOR_GLOBAL_SYM): Formatting.
5620         * elfcode.h (elf_add_dynamic_entry): Delete.
5621         * elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
5622         elflink.h function converted to use elf_size_info.
5623         (_bfd_elf_add_dt_needed_tag): Likewise.
5624         (_bfd_elf_sort_symbol): Likewise.
5625         (_bfd_elf_finalize_dynstr): Likewise.
5626         (compute_bucket_count): Likewise.
5627         (bfd_elf_size_dynamic_sections): Likewise.  Check result of
5628         _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
5629         (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
5630         * elflink.h: ..here.
5631         (sort_symbol, add_dt_needed_tag): Delete.
5632         (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
5633         (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
5634         Update all users.
5635         * elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
5636         * elf32-cris.c (add_dynamic_entry): Likewise.
5637         * elf32-hppa.c (add_dynamic_entry): Likewise.
5638         * elf32-i370.c (add_dynamic_entry): Likewise.
5639         * elf32-i386.c (add_dynamic_entry): Likewise.
5640         * elf32-m32r.c (add_dynamic_entry): Likewise.
5641         * elf32-m68k.c (add_dynamic_entry): Likewise.
5642         * elf32-ppc.c (add_dynamic_entry): Likewise.
5643         * elf32-s390.c (add_dynamic_entry): Likewise.
5644         * elf32-sh.c (add_dynamic_entry): Likewise.
5645         * elf32-sparc.c (add_dynamic_entry): Likewise.
5646         * elf32-vax.c (add_dynamic_entry): Likewise.
5647         * elf32-xtensa.c (add_dynamic_entry): Likewise.
5648         * elf64-alpha.c (add_dynamic_entry): Likewise.
5649         * elf64-hppa.c (add_dynamic_entry): Likewise.
5650         * elf64-ppc.c (add_dynamic_entry): Likewise.
5651         * elf64-s390.c (add_dynamic_entry): Likewise.
5652         * elf64-sparc.c (add_dynamic_entry): Likewise.
5653         * elf64-x86-64.c (add_dynamic_entry): Likewise.
5654         * elfxx-ia64.c (add_dynamic_entry): Likewise.
5655         * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
5656         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
5657         * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
5658         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5659
5660 2004-03-23  Paul Brook  <[email protected]>
5661
5662         * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
5663
5664 2004-03-22  Bob Wilson  <[email protected]>
5665
5666         * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
5667         literal tables and check for relocs outside of literal pools.
5668         (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
5669         (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
5670         set DF_TEXTREL.
5671         (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
5672         (elf_xtensa_relocate_section): Read literal tables and check for
5673         dynamic relocations in read-only sections and not in literal pools.
5674
5675 2004-03-23  Alan Modra  <[email protected]>
5676
5677         PR 51.
5678         * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
5679
5680 2004-03-22  Hans-Peter Nilsson  <[email protected]>
5681
5682         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5683         R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
5684         not defined by the executable, or defined in a DSO.
5685         <eliding run-time relocation of .got>: Initialize GOT entry for a
5686         function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
5687         executable.
5688         (cris_elf_gc_sweep_hook): Improve fallthrough marking.
5689         (elf_cris_try_fold_plt_to_got): Improve head comment.  Do not fold
5690         a PLT reloc to GOT for an executable.
5691         (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
5692         .got for a DSO and explain why.
5693         (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
5694         and unreferenced symbols for which a PLT is defined.  Adjust
5695         dynamic-symbol pruning correspondingly, to make sure we don't lose
5696         a dynamic symbol also defined by a DSO.
5697
5698 2004-03-22  Alan Modra  <[email protected]>
5699
5700         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
5701         and rel args.  Group input and output args.  Wrap to 80 columns.
5702         * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
5703         elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
5704         elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
5705         elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
5706         elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5707         elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
5708         elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
5709         elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
5710         RELOC_FOR_GLOBAL_SYMBOL invocation.
5711
5712 2004-03-20  H.J. Lu  <[email protected]>
5713
5714         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
5715         unresolved symbols in objects aren't allowed.
5716
5717         * elf-hppa.h (elf_hppa_relocate_section): Properly handle
5718         unresolved symbols.
5719         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
5720         (elf_hppa_unmark_useless_dynamic_symbols):
5721         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5722         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5723         (elf32_hppa_relocate_section): Likewise.
5724         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5725         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5726         * elf32-sh.c (sh_elf_relocate_section): Likewise.
5727         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5728         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5729
5730         * elf-m10200.c (mn10200_elf_relocate_section): Use
5731         RELOC_FOR_GLOBAL_SYMBOL.
5732         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5733         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5734         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5735         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5736         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5737         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
5738         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5739         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5740         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5741         * elf32-v850.c (v850_elf_relocate_section): Likewise.
5742         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5743         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5744
5745 2004-03-19  John David Anglin  <[email protected]>
5746
5747         * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
5748         (final_link_relocate): Likewise.
5749         * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
5750         R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
5751
5752 2004-03-19  Alan Modra  <[email protected]>
5753
5754         * Makefile.am: Run "make dep-am".
5755         * Makefile.in: Regenerate.
5756         * aclocal.m4: Regenerate.
5757         * config.in: Regenerate.
5758         * po/bfd.pot: Regenerate.
5759
5760 2004-03-19  Alan Modra  <[email protected]>
5761             H.J. Lu  <[email protected]>
5762
5763         * elflink.c (_bfd_elf_merge_symbol): Revert last change.  Move
5764         type and size change code to where it was previously.  Remove
5765         dt_needed param.  Treat old weak syms as strong if new sym is
5766         from a shared lib, even when old sym is from another shared
5767         lib.  Remove unnecessary tests of oldweak and newweak.  Correct
5768         comments.
5769         (_bfd_elf_add_default_symbol): Remove dt_needed param.  Update
5770         _bfd_elf_merge_symbol calls.
5771         * elflink.h (elf_link_add_object_symbols): Update calls.  Remove
5772         dt_needed local var.  Update comments.
5773         * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
5774         (_bfd_elf_add_default_symbol): Likewise.
5775
5776         * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
5777         strong syms in one shared object overriding weak syms in another.
5778
5779 2004-03-18  Alan Modra  <[email protected]>
5780
5781         * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
5782         dyn_lib_class field.  Rearrange for better packing.
5783         (elf_dt_soname): Delete.
5784         (elf_dyn_lib_class): Define.
5785         * elf.c (bfd_elf_set_dt_needed_name): Update comment.
5786         (bfd_elf_set_dt_needed_soname): Delete.
5787         (bfd_elf_set_dyn_lib_class): New function.
5788         * elflink.h (add_dt_needed_tag): New function.  Split out from..
5789         (elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
5790         Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
5791         initialization of soname.
5792         (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
5793         elf_dt_soname.
5794         * bfd-in.h (enum dynamic_lib_link_class): New.
5795         (bfd_elf_set_dt_needed_soname): Delete.
5796         (bfd_elf_set_dyn_lib_class): Declare.
5797         * bfd-in2.h: Regenerate.
5798
5799         * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
5800         (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
5801         * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
5802         symbol loop.  Instead use add_needed to flag tag as written.
5803
5804 2004-03-17  Nathan Sidwell  <[email protected]>
5805
5806         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
5807         logic for null_input_bfd detection.
5808
5809 2004-03-17  Ralf Corsepius <[email protected]>
5810
5811         * config.bfd: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
5812
5813 2004-03-16  Mark Kettenis  <[email protected]>
5814
5815         * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
5816         code.
5817
5818 2004-03-16  Alan Modra  <[email protected]>
5819
5820         * elflink.c (elf_link_read_relocs_from_section): Don't use
5821         NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
5822         (_bfd_elf_link_read_relocs): ..to here.
5823         * elf32-ppc.c (ppc_elf_relax_section): Formatting.
5824
5825 2004-03-16  Alan Modra  <[email protected]>
5826
5827         * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
5828         values selected in configure.host.  Require both to be defined
5829         before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
5830         corresponding BFD_HOST vars with quotes.
5831         <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
5832         Always require BFD_HOST_64_BIT_DEFINED.
5833         <file_ptr type>: Find off_t size before emitting message.  Combine
5834         off_t and ftello64 conditional.
5835         * configure: Regenerate.
5836
5837 2004-03-16  Alan Modra  <[email protected]>
5838
5839         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
5840         aliasing warning.  Remove trailing whitespace throughout file.
5841
5842 2004-03-15  John David Anglin  <[email protected]>
5843
5844         * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
5845         input_section in calls to get_dyn_name.
5846         * 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
5847         local symbols.
5848         (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
5849
5850 2004-03-15  Alan Modra  <[email protected]>
5851
5852         * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
5853         (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
5854         (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
5855         (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
5856         (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
5857         * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
5858         (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
5859         when using long.
5860         * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
5861         (bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
5862         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
5863         (bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
5864         (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
5865         * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
5866         (read_8_bytes, read_indirect_string, read_address): Likewise.
5867         (read_abbrevs, parse_comp_unit): Likewise.
5868         * targets.c (struct bfd_target): Likewise.
5869         * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
5870         * hppabsd-core.c: Likewise.  Formatting.
5871         * hpux-core.c: Likewise.
5872         * irix-core.c: Likewise.
5873         * netbsd-core.c: Likewise.
5874         * osf-core.c: Likewise.
5875         * ptrace-core.c: Likewise.
5876         * sco5-core.c: Likewise.
5877         * trad-core.c: Likewise.
5878         * configure: Regenerate.
5879         * bfd-in2.h: Regenerate.
5880
5881 2004-03-15  Alan Modra  <[email protected]>
5882
5883         * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
5884         (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
5885         (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
5886         (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
5887         (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
5888         (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
5889         (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
5890         * libbfd.c: Likewise in function definitions.
5891         (bfd_put_8): Mask with 0xff rather than casting to char.
5892         (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
5893         (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
5894         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
5895         (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
5896         (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
5897         (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
5898         * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
5899         (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
5900         (H_GET_64, H_GET_32, H_GET_16): Likewise.
5901         (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
5902         * archive.c (do_slurp_coff_armap): Update swap prototype.
5903         * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
5904         (tic54x_getl_signed_32): Likewise.
5905         (tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
5906         * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
5907         * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
5908         (bfd_getp_signed_32, bfd_putp32): Likewise.
5909         * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
5910         bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
5911         bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
5912         bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
5913         bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
5914         bfd_h_getx_signed_16, bfd_h_putx16.
5915         * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
5916         * hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
5917         * hpux-core.c: Likewise.
5918         * irix-core.c: Likewise.
5919         * netbsd-core.c: Likewise.
5920         * osf-core.c: Likewise.
5921         * ptrace-core.c: Likewise.
5922         * sco5-core.c: Likewise.
5923         * trad-core.c: Likewise.
5924         * bfd-in2.h: Regenerate.
5925
5926 2004-03-15  Matt Thomas  <[email protected]>
5927
5928         * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
5929         selected.
5930
5931 2004-03-13  Mark Kettenis  <[email protected]>
5932
5933         * config.bfd: Add x86_64-*-openbsd*.
5934         * configure.in (x86_64-*-openbsd*): Set COREFILE to
5935         netbsd-core.lo.
5936         * configure: Regenerate.
5937
5938 2004-03-12  Nick Clifton  <[email protected]>
5939             Dave Murphy  <[email protected]>
5940
5941         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
5942         if the input bfd does not contain any code.
5943
5944 2004-03-09  Steve Ellcey  <[email protected]>
5945
5946         * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
5947
5948 2004-03-05  Fred Fish  <[email protected]>
5949
5950         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
5951         mips16 symbols to be even rather than testing first for even/odd.
5952         (_bfd_mips_elf_link_output_symbol_hook): Ditto.
5953
5954 2004-03-05  Nathan Sidwell  <[email protected]>
5955
5956         * elf.c (map_sections_to_segments): Ignore .tbss sections for
5957         layout purposes.
5958
5959 2004-03-03  Alexandre Oliva  <[email protected]>
5960
5961         * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
5962         undefined symbols as hash_new.
5963
5964 2003-03-03  Andrew Stubbs  <[email protected]>
5965
5966         * archures.c: Add bfd_mach_sh4_nommu_nofpu.
5967         * cpu-sh.c: Ditto.
5968         * elf32-sh.c: Ditto.
5969         * bfd-in2.h: Regenerate.
5970
5971 2004-03-02  Alexandre Oliva  <[email protected]>
5972
5973         * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
5974         dynrelocs.
5975         (_frv_count_got_plt_entries): Initialize them.
5976         (frv_pic_relocs_info_find): Add insert argument.  Adjust all
5977         callers.
5978         (frv_pic_relocs_info_for_global): Likewise.
5979         (frv_pic_relocs_info_for_local): Likewise.
5980         (frv_pic_merge_early_relocs_info): New.
5981         (_frv_resolve_final_relocs_info): Use it in case one entry maps to
5982         another.
5983         (_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
5984         Check that we don't exceed the allocated count for entry.
5985         (_frv_add_rofixup): Likewise.
5986         (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
5987         (elf32_frv_finish_dynamic_sections): Improve error message in case
5988         we emit too few rofixup entries.
5989
5990 2004-03-01  Richard Sandiford  <[email protected]>
5991
5992         * archures.c (bfd_mach_fr450): New.
5993         * bfd-in2.h: Regenerate.
5994         * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
5995         (arch_info_500): Link to it.
5996         * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
5997         (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
5998         (frv_elf_arch_extension_p): New function.
5999         (frv_elf_merge_private_bfd_data): Use it.
6000
6001 2004-02-28  H.J. Lu  <[email protected]>
6002
6003         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
6004
6005         * elflink.h (is_global_data_symbol_definition): Moved to
6006         elflink.c.
6007         (elf_link_is_defined_archive_symbol): Likewise.
6008         (elf_link_add_archive_symbols): Likewise. Renamed to
6009         _bfd_elf_link_add_archive_symbols.
6010
6011         * elflink.c (elf_link_is_defined_archive_symbol): Get the size
6012         of ELF symbol table entry from backend.
6013         (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
6014         instead of elf_link_add_object_symbols.
6015
6016 2004-02-27  Alexandre Oliva  <[email protected]>
6017
6018         * elf-bfd.h (struct elf_backend_data): Added
6019         elf_backend_can_make_relative_eh_frame,
6020         elf_backend_can_make_lsda_relative_eh_frame and
6021         elf_backend_encode_eh_address.
6022         (_bfd_elf_encode_eh_address): Declare.
6023         (_bfd_elf_can_make_relative): Declare.
6024         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
6025         hooks to decide whether to attempt to make_relative and
6026         make_lsda_relative.
6027         (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
6028         (_bfd_elf_can_make_relative): New.
6029         (_bfd_elf_encode_eh_address): New.
6030         * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
6031         (frv_elf_encode_eh_address): New.
6032         (elf_backend_can_make_relative_eh_frame): Define.
6033         (elf_backend_can_make_lsda_relative_eh_frame): Define.
6034         (elf_backend_encode_eh_address): Define.
6035         * elfxx-target.h
6036         (elf_backend_can_make_relative_eh_frame): Define.
6037         (elf_backend_can_make_lsda_relative_eh_frame): Define.
6038         (elf_backend_encode_eh_address): Define.
6039         (elfNN_bed): Add them.
6040
6041 2004-02-27  Alexandre Oliva  <[email protected]>
6042
6043         * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
6044         complain_on_overflow to signed.
6045
6046 2004-02-27  H.J. Lu  <[email protected]>
6047
6048         * elflink.h (sort_symbol): New.
6049         (elf_link_add_object_symbols): Use a sorted symbol array for
6050         weakdef.
6051
6052 2004-02-27  Jakub Jelinek  <[email protected]>
6053
6054         * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6055         for pc relative relocs.
6056         (elf_s390_relocate_section): Likewise.
6057         * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6058         for pc relative relocs.
6059         (elf_s390_relocate_section): Likewise.
6060
6061 2004-02-26  H.J. Lu  <[email protected]>
6062
6063         * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
6064         count_dyn_reloc.
6065
6066 2004-02-25  H.J. Lu  <[email protected]>
6067
6068         * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
6069         field to track if a relocation is against readonly section.
6070         (count_dyn_reloc): Take a new argument for rent->reltext.
6071         (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
6072         (get_reloc_section): Don't set ia64_info->reltext here.
6073         (allocate_dynrel_entries): Set ia64_info->reltext here.
6074
6075 2004-02-24  Alexandre Oliva  <[email protected]>
6076
6077         * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
6078         (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
6079         function's descriptor to symbol+offset, and map local undefweak
6080         symbol to NULL function descriptor.
6081         (elf32_frv_relocate_section): Likewise.
6082
6083 2004-02-23  Mark Kettenis  <[email protected]>
6084
6085         * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
6086         M_X86_64_NETBSD.
6087         * netbsd-core.c (M_SPARC64_OPENBSD): Define.
6088         (netbsd_core_file_p): Set architecture from machine ID for
6089         selected machines.
6090
6091 2004-02-23  Jakub Jelinek  <[email protected]>
6092
6093         * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
6094         DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
6095
6096 2004-02-21  H.J. Lu  <[email protected]>
6097
6098         * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
6099         symbols with non-default visibility.
6100
6101 2004-02-21  Danny Smith  <[email protected]>
6102
6103         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
6104         IMAGE_SCN_MEM_WRITE on known sections only.
6105
6106 2004-02-20  Jakub Jelinek  <[email protected]>
6107
6108         * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
6109         symbols used in PIE relocs.
6110
6111 2004-02-19  Jakub Jelinek  <[email protected]>
6112
6113         * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
6114         .plt sh_entsize.
6115
6116 2004-02-18  Daniel Jacobowitz  <[email protected]>
6117
6118         * configure.in: Update version to 2.15.90.
6119         * configure: Regenerate.
6120
6121 2004-02-17  Daniel Jacobowitz  <[email protected]>
6122             Richard Sandiford  <[email protected]>
6123
6124         * elfxx-mips.c (mips_elf_calculate_relocation): Use
6125         _bfd_elf_symbol_refs_local_p to decide whether to decay
6126         a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
6127         (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
6128         relocs if the symbol wasn't defined by a regular object file.
6129         Don't check the symbol's dynindx.
6130
6131 2004-02-16  Andrew Cagney  <[email protected]>
6132
6133         * bfd-in.h (file_ptr, ufile_ptr): Configure type using
6134         @bfd_file_ptr@.
6135         * bfd-in2.h: Re-generate.
6136
6137 2004-02-14  Andrew Cagney  <[email protected]>
6138
6139         * configure.host (HDEFINES): When hppa*-*-hpux*, define
6140         _LARGEFILE64_SOURCE.
6141
6142 2004-02-13  Andrew Cagney  <[email protected]>
6143
6144         * elf.c (vma_page_aligned_bias): New function.
6145         (assign_file_positions_except_relocs)
6146         (assign_file_positions_for_segments): Replace broken modulo
6147         arithmetic with call to vma_page_aligned_bias.
6148
6149 2004-02-11  Andrew Cagney  <[email protected]>
6150
6151         * bfd-in.h: Update copyright.
6152         (bfd_tell): Change return type to file_ptr.
6153         * bfd-in2.h: Re-generate.
6154         * cache.c: Update copyright.
6155         (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
6156         parameter.
6157         (close_one): Use real_ftell.
6158         * bfdio.c: Update copyright.
6159         (real_ftell, real_fseek): New functions.
6160         (bfd_tell): Use real_fseek and real_ftell, change return type to
6161         file_ptr.
6162         (bfd_seek): Use real_ftell and real_fseek, change type of
6163         file_position to a file_ptr.
6164         * libbfd-in.h: Update copyright.
6165         (real_ftell, real_fseek): Declare.
6166         * libbfd.h: Re-generate.
6167
6168         * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
6169         fseeko and fseeko64.  Determine bfd_file_ptr.
6170         * configure: Re-generate.
6171         * config.in: Re-generate.
6172
6173 2004-02-09  Anil Paranjpe  <[email protected]>
6174
6175         * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
6176         * elf32-h8300.c: Likewise.
6177
6178 2004-02-09  Christian Vogel <[email protected]>
6179             Nick Clifton  <[email protected]>
6180
6181         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
6182         GOT entries with no associated GOT subsection.
6183
6184 2004-02-09  Richard Sandiford  <[email protected]>
6185
6186         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
6187         * elf.c (swap_out_syms): Use it to decide whether local section
6188         symbols should be named.
6189         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
6190         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
6191         (elf_backend_name_local_section_symbols): Define.
6192         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
6193
6194 2004-01-30  H.J. Lu  <[email protected]>
6195
6196         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
6197         (elfNN_ia64_relax_section): Optimize brl to br during the relax
6198         finalize pass.
6199
6200 2004-01-30  Alexandre Oliva  <[email protected]>
6201
6202         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
6203         to bfd_link_hash_entry passed by reference to
6204         _bfd_generic_link_add_one_symbol.
6205
6206 2004-01-25  H.J. Lu  <[email protected]>
6207
6208         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
6209         relocations against dynamic symbols.
6210
6211 2004-01-23  Daniel Jacobowitz  <[email protected]>
6212
6213         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
6214         change.
6215
6216 2004-01-21  Tom Rix  <[email protected]>
6217
6218         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
6219         * bfd-in2.h, libbfd.h: Rebuilt.
6220
6221 2004-01-20  Danny Smith  <[email protected]>
6222
6223         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
6224         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
6225         flag has been cleared.
6226
6227 2004-01-19  Kazu Hirata  <[email protected]>
6228
6229         * coff-h8300.c: Add and adjust comments about relaxation.
6230         * elf32-h8300.c: Likewise.
6231
6232 2004-01-16  Kazu Hirata  <[email protected]>
6233
6234         * coff-h8300.c: Fix comment typos.
6235         * elf32-h8300.c: Likewise.
6236
6237 2004-01-16  Kazu Hirata  <[email protected]>
6238
6239         * coff-h8300.c: Add comments about relaxation.
6240         * elf32-h8300.c: Likewise.
6241
6242 2004-01-14  Maciej W. Rozycki  <[email protected]>
6243
6244         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
6245         throughout.
6246         * aclocal.m4: Regenerate.
6247         * configure: Regenerate.
6248
6249 2004-01-13  Ian Lance Taylor  <[email protected]>
6250
6251         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
6252         mips_elf64_rtype_to_howto instead of using howto_table.
6253
6254 2004-01-13  Daniel Jacobowitz  <[email protected]>
6255
6256         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
6257         the .plt section.
6258         (elf32_arm_check_relocs): Don't increment the PLT refcount for
6259         relocs which would not use the PLT.
6260
6261 2004-01-13  Alan Modra  <[email protected]>
6262
6263         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
6264         (ppc64_elf_gc_sweep_hook): Likewise.
6265         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
6266
6267 2004-01-12  Anil Paranjpe  <[email protected]>
6268
6269         Adds linker relaxation support for bit manipulation insns like
6270         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
6271         bst, btst, bxor.
6272         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
6273         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
6274         * coff-h8300.c: Opcode for bit manipulation insn is checked in
6275         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
6276
6277 2004-01-12  Alan Modra  <[email protected]>
6278
6279         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
6280
6281 2004-01-11  Kazu Hirata  <[email protected]>
6282
6283         * elf32-h8300.c: Fix formatting.
6284
6285 2004-01-11  Kazu Hirata  <[email protected]>
6286
6287         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
6288         dynamic object is present.  Declare r_symndx and h in an inner
6289         scope.
6290         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
6291
6292 2004-01-09  Daniel Jacobowitz  <[email protected]>
6293
6294         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
6295         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
6296         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
6297         identically.  Do not emit PC24 relocations for shared libraries.
6298         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
6299         identically.  Don't adjust pc_count.
6300         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
6301         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
6302         adjust count for branch relocations.
6303         (allocate_dynrelocs): Correct typo in call to
6304         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
6305         PC24 or PLT32 relocs when linking.
6306
6307 2004-01-09  Dmitry Semyonov  <[email protected]>
6308
6309         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
6310         relocation howto with ARM_26 one for consistency.
6311         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
6312         that will be converted to ARM_26D ones, since we always want 'done'
6313         relocations to be reflected in section's data.
6314         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
6315         offset.
6316         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
6317         requested.
6318
6319 2004-01-08  Dmitry Semyonov  <[email protected]>
6320
6321         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
6322         are not partial_inplace during a relocatable link.
6323
6324 2004-01-08  Kazu Hirata  <[email protected]>
6325
6326         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
6327         if no dynamic object is present.  Declare r_symndx and h in an
6328         inner scope.
6329
6330 2004-01-07  H.J. Lu  <[email protected]>
6331
6332         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
6333         trampoline if it is known out of range.
6334
6335 2004-01-06  Alexandre Oliva  <[email protected]>
6336
6337         2003-12-17  Alexandre Oliva  <[email protected]>
6338         * elf32-frv.c (_frv_osec_readonly_p): New.
6339         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
6340         undefweak symbol.
6341         (_frv_count_got_plt_entries): Adjust expected count accordingly.
6342         (elf32_frv_relocate_section): Likewise.  Error out if attempting
6343         to emit rofixups or dynamic relocs in read-only segments.  Use
6344         _bfd_elf_section_offset to adjust r_offsets in rofixups and
6345         dynamic relocations.
6346         2003-12-12  Alexandre Oliva  <[email protected]>
6347         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
6348         relocations or fixups involving merged sections correctly.  Avoid
6349         crash when undefined symbol is referenced by R_FRV_32 or
6350         R_FRV_FUNCDESC_VALUE.
6351         2003-12-02  Alexandre Oliva  <[email protected]>
6352         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
6353         input section holding local symbol to addend of R_FRV_32 or
6354         R_FRV_FUNCDESC_VALUE dynamic relocation.
6355         2003-11-27  Alexandre Oliva  <[email protected]>
6356         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
6357         (elf32_frv_always_size_sections): Don't store pointer to
6358         __stacksize symbol in sec_info.
6359         (elf32_frv_modify_segment_map): Look it up here.
6360         2003-11-26  Alexandre Oliva  <[email protected]>
6361         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
6362         of the lazy PLT entry, not only its offset, as the low word of a
6363         function descriptor.
6364         2003-11-10  Alexandre Oliva  <[email protected]>
6365         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
6366         if a hash table entry already exists but is not a definition.
6367         2003-11-05  Alexandre Oliva  <[email protected]>
6368         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
6369         (_frv_add_rofixup): Don't inline.
6370         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
6371         for undefweak symbols.
6372         (elf32_frv_relocate_section): Avoid crash while computing
6373         relocation when linking with shared library.  Only emit rofixups
6374         and dynamic relocations for alloc&load sections.  Mark binaries
6375         with inter-segment relocations for relocation as a unit.
6376         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
6377         (DEFAULT_STACK_SIZE): New.
6378         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
6379         emit rofixups or dynamic relocs when linking dynamic non-PIE
6380         executables.
6381         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
6382         shared libs too.  Reserve the last entry for the GOT pointer.
6383         (elf32_frv_finish_dynamic_sections): Emit it.
6384         (elf32_frv_always_size_sections): New.
6385         (elf32_frv_modify_segment_map): New.
6386         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
6387         sections.
6388         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
6389         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
6390         (elf_backend_always_size_sections): New.
6391         (elf_backend_modify_segment_map): New.
6392         2003-10-31  Alexandre Oliva  <[email protected]>
6393         * config.bfd: Added frv-*-*linux*.
6394         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
6395         ABS section, instead of crashing.
6396         (elf32_frv_relocate_section): Don't crash before warning about
6397         different segments in non-PIC relocation.
6398         2003-10-17  Alexandre Oliva  <[email protected]>
6399         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
6400         relocs to undefweak symbols.
6401         (elf32_frv_relocate_section): Ditto for undefined symbols.
6402         2003-10-06  Alexandre Oliva  <[email protected]>
6403         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
6404         gotfixup section was created.
6405         2003-09-30  Alexandre Oliva  <[email protected]>
6406         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
6407         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
6408         complain_overflow_signed.
6409         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
6410         have not been allocated.
6411         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
6412         privfd only if dynamic sections were created.
6413         (elf32_frv_relocate_section): Compute gprel_segment, and use it
6414         for GPREL relocs.  When linking relocatable FDPIC executables,
6415         emit warnings for relocations that would be illegal on PIE or
6416         shared libraries.  Emit rofixup for R_FRV_32 only if input object
6417         is not FDPIC.
6418         (_frv_create_got_section): Define _gp symbol in the rofixup
6419         section.
6420         (elf32_frv_finish_dynamic_sections): If rofixups needed but
6421         dynamic sections missing, error out requesting -melf32frvfd.
6422         2003-09-19  Alexandre Oliva  <[email protected]>
6423         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
6424         computation of addends from section and global or local symbol
6425         value.  Change return type to bfd_boolean, and return a failure if
6426         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
6427         nonzero addend is required.
6428         (elf32_frv_relocate_section): Likewise.  Print error for
6429         unsupported nonzero addends.
6430         2003-09-18  Alexandre Oliva  <[email protected]>
6431         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
6432         force everything local.
6433         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
6434         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
6435         (frv_gotfixup_section): New.
6436         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
6437         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
6438         and relocsfdv.
6439         (_frv_add_rofixup): New.
6440         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
6441         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
6442         improve some ugly conditions.
6443         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
6444         relocations in fdpic.
6445         (_frv_create_got_section): Create .rofixup.got section.
6446         (struct _frv_dynamic_got_info): Added fixups.
6447         (_frv_count_got_plt_entries): Account in-GOT relocations into
6448         relocs32, relocsfd and relocsfdv.  Account them into relocs or
6449         fixups, as appropriate.
6450         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
6451         sizing of gotrel.
6452         (elf32_frv_finish_dynamic_sections): Verify that the right number
6453         of relocations and fixups was generated.
6454         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
6455         relocsfdv.
6456         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
6457         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
6458         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
6459         descriptor of a (formerly-)global symbol is local.
6460         (struct frv_pic_relocs_info): Adjust comments.
6461         (_frv_emit_got_relocs_plt_entries): Adjust.
6462         (elf32_frv_relocate_section): Likewise.
6463         (_frv_count_got_plt_entries): Likewise.
6464         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
6465         symbol's value to addend in the common preamble.  Decay dynamic
6466         symbols to section+offset if they bind or call locally, for GOT
6467         and FUNCDESC_VALUE, respectively.
6468         (elf32_frv_relocate_section): Likewise.
6469         (elf32_frv_check_relocs): Don't register as dynamic symbols of
6470         internal or hidden visibility.
6471         2003-09-17  Alexandre Oliva  <[email protected]>
6472         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
6473         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
6474         (elf32_frv_relocate_section): Pass relocation addend in.  Use
6475         original relocation addend to look up the got relocs/plt entries
6476         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
6477         processing relocations that reference .scommon symbols.
6478         2003-09-15  Alexandre Oliva  <[email protected]>
6479         Introduce support for dynamic linking.
6480         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
6481         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
6482         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
6483         (frv_reloc_type_lookup): Return REL howtos for executables and
6484         dynamic libraries.
6485         (frv_info_to_howto_rel): New.
6486         (struct frv_elf_link_hash_table): New.
6487         (frv_hash_table, frv_got_section, frv_gotrel_section,
6488         frv_plt_section, frv_pltrel_section, frv_relocs_info,
6489         frv_got_initial_offset, frv_plt_initial_offset): New macros.
6490         (frv_elf_link_hash_table_create): New.
6491         (struct frv_pic_relocs_info): New.
6492         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
6493         (frv_pic_relocs_info_find): New.
6494         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
6495         New.
6496         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
6497         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
6498         (_frv_emit_got_relocs_plt_entries): New.
6499         (elf32_frv_relocate_section): Add support for dynamic linking.
6500         Handle new relocations.
6501         (_frv_create_got_section): New.
6502         (elf32_frv_create_dynamic_sections): New.
6503         (ELF_DYNAMIC_INTERPRETER): New.
6504         (struct _frv_dynamic_got_info): New.
6505         (_frv_count_got_plt_entries): New.
6506         (struct _frv_dynamic_got_plt_info): New.
6507         (_frv_compute_got_alloc_data): New.
6508         (_frv_get_got_entry, _frv_get_fd_entry): New.
6509         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
6510         (_frv_resolve_final_relocs_info): New.
6511         (elf32_frv_size_dynamic_sections): New.
6512         (elf32_frv_finish_dynamic_sections): New.
6513         (elf32_frv_adjust_dynamic_symbol): New.
6514         (elf32_frv_finish_dynamic_symbol): New.
6515         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
6516         whole thing works.
6517         (elf_info_to_howto_rel): Define.
6518         (bfd_elf32_bfd_link_hash_table_create): Define.
6519         (elf_backend_create_dynamic_sections): Define.
6520         (elf_backend_adjust_dynamic_symbol): Define.
6521         (elf_backend_size_dynamic_sections): Define.
6522         (elf_backend_finish_dynamic_symbol): Define.
6523         (elf_backend_finish_dynamic_sections): Define.
6524         (elf_backend_want_got_sym): Define.
6525         (elf_backend_got_header_size): Define.
6526         (elf_backend_want_got_plt): Define.
6527         (elf_backend_plt_readonly): Define.
6528         (elf_backend_want_plt_sym): Define.
6529         (elf_backend_plt_header_size): Define.
6530         (elf_backend_may_use_rel_p): Define.
6531         (elf_backend_may_use_rela_p): Define.
6532         (elf_backend_default_use_rela_p): Define.
6533         2003-08-08  Alexandre Oliva  <[email protected]>
6534         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
6535         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
6536         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
6537         (frv_reloc_map): Map the corresponding BFD relocs to them.
6538         (frv_reloc_type_lookup): ... and back to BFD relocs.
6539         * reloc.c: New relocs.
6540         * bfd-in2.h, libbfd.h: Rebuilt.
6541         2003-08-04  Alexandre Oliva  <[email protected]>
6542         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
6543         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
6544         R_FRV_FUNCDESC_GOTLO): New.
6545         (frv_reloc_map): Map the corresponding BFD relocs to them.
6546         (frv_reloc_type_lookup): ... and back to BFD relocs.
6547         * reloc.c: New relocs.
6548         * bfd-in2.h, libbfd.h: Rebuilt.
6549
6550 2004-01-05  Maciej W. Rozycki  <[email protected]>
6551
6552         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6553         targets to support pages of up to 64kB.
6554         (elf32_bed): Redefine to get a separate backend data structure for
6555         traditional targets.
6556         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6557         targets to support pages of up to 64kB.
6558         (elf64_bed): Redefine to get a separate backend data structure for
6559         traditional targets.
6560         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6561         targets to support pages of up to 64kB.
6562         (elf32_bed): Redefine to get a separate backend data structure for
6563         traditional targets.
6564
6565 2004-01-04  Mark Kettenis  <[email protected]>
6566
6567         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
6568
6569 2004-01-02  Mark Kettenis  <[email protected]>
6570
6571         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
6572         (elf_i386_grok_psinfo): Likewise.
6573
6574 2004-01-02  Bernardo Innocenti  <[email protected]>
6575
6576         * config.bfd: Add m68k-uClinux target.
6577
6578 2004-01-01  Grant Edwards <[email protected]>
6579
6580         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
6581         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
6582         (elf32_h8_gc_sweep_hook): New function.
6583         (elf_backend_gc_mark_hook): Define.
6584         (elf_backend_gc_sweep_hook): Define.
6585         (elf_backend_can_gc_sections): Define.
6586
6587 For older changes see ChangeLog-0203
6588 \f
6589 Local Variables:
6590 mode: change-log
6591 left-margin: 8
6592 fill-column: 74
6593 version-control: never
6594 End:
This page took 0.398622 seconds and 4 git commands to generate.