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