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