* configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
2
3 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
4 * configure: Regenerate.
5
6 2002-06-25 Jason Eckhardt <jle@rice.edu>
7
8 * dwarf2.c (decode_line_info): Check unit->addr_size
9 to read in the proper number of prologue bytes.
10
11 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
12
13 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
14 aix5coff64_vec if 64-bit bfd support has been enabled.
15 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
16 been enabled.
17
18 * targets.c (_bfd_target_vector[]): Only include
19 aix5coff64_vec if 64-bit bfd support has been enabled.
20
21 2002-06-25 Alan Modra <amodra@bigpond.net.au>
22
23 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
24 * elf32-hppa.c (hppa_add_stub): Likewise.
25 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
26 * elflink.h (elf_add_default_symbol): Fix comment typo.
27 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
28 (elf_link_add_object_symbols): Likewise.
29 (elf_link_assign_sym_version): Likewise.
30 * hash.c (bfd_hash_lookup): Likewise.
31 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
32 * section.c (bfd_get_unique_section_name): Likewise.
33 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
34 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
35 (assign_section_numbers): Likewise.
36 (_bfd_elfcore_make_pseudosection): Likewise.
37 (elfcore_grok_lwpstatus): Likewise.
38 (elfcore_grok_win32pstatus): Likewise.
39 (elfcore_write_note): Constify input params. Use PTR instead of
40 void *. Include terminating NUL in namesz. Correct padding.
41 Support NULL "name" param. Use memcpy instead of strcpy.
42 (elfcore_write_prpsinfo): Constify input params.
43 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
44 (elfcore_write_lwpstatus): Likewise.
45 (elfcore_write_pstatus): Likewise.
46 (elfcore_write_prfpreg): Likewise.
47 (elfcore_write_prxfpreg): Likewise.
48 * elf-bfd.h (elfcore_write_note): Update declaration.
49 (elfcore_write_prpsinfo): Likewise.
50 (elfcore_write_prstatus): Likewise.
51 (elfcore_write_pstatus): Likewise.
52 (elfcore_write_prfpreg): Likewise.
53 (elfcore_write_prxfpreg): Likewise.
54 (elfcore_write_lwpstatus): Likewise.
55
56 2002-06-25 Jason Eckhardt <jle@rice.edu>
57
58 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
59 symbols of type stProc and stStaticProc.
60
61 2002-06-25 Nick Clifton <nickc@redhat.com>
62
63 * ecoff.c: VArious formatting fixes.
64
65 2002-06-25 Alan Modra <amodra@bigpond.net.au>
66
67 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
68
69 2002-06-25 Alan Modra <amodra@bigpond.net.au>
70
71 * aout-adobe.c: Don't compare against "true" or "false.
72 * aout-target.h: Likewise.
73 * aoutx.h: Likewise.
74 * archive.c: Likewise.
75 * bout.c: Likewise.
76 * cache.c: Likewise.
77 * coff-a29k.c: Likewise.
78 * coff-alpha.c: Likewise.
79 * coff-i386.c: Likewise.
80 * coff-mips.c: Likewise.
81 * coff-or32.c: Likewise.
82 * coff64-rs6000.c: Likewise.
83 * coffcode.h: Likewise.
84 * coffgen.c: Likewise.
85 * cpu-ns32k.c: Likewise.
86 * ecoff.c: Likewise.
87 * ecofflink.c: Likewise.
88 * elf.c: Likewise.
89 * elf32-arm.h: Likewise.
90 * elf32-cris.c: Likewise.
91 * elf32-d30v.c: Likewise.
92 * elf32-i386.c: Likewise.
93 * elf32-mcore.c: Likewise.
94 * elf32-ppc.c: Likewise.
95 * elf32-sh.c: Likewise.
96 * elf32-sh64.c: Likewise.
97 * elf32-v850.c: Likewise.
98 * elf64-alpha.c: Likewise.
99 * elf64-sh64.c: Likewise.
100 * elfcode.h: Likewise.
101 * elfcore.h: Likewise.
102 * elflink.h: Likewise.
103 * elfxx-mips.c: Likewise.
104 * i386os9k.c: Likewise.
105 * ieee.c: Likewise.
106 * libbfd.c: Likewise.
107 * linker.c: Likewise.
108 * mmo.c: Likewise.
109 * nlm32-alpha.c: Likewise.
110 * nlm32-i386.c: Likewise.
111 * nlm32-ppc.c: Likewise.
112 * nlm32-sparc.c: Likewise.
113 * nlmcode.h: Likewise.
114 * oasys.c: Likewise.
115 * pdp11.c: Likewise.
116 * peicode.h: Likewise.
117 * reloc.c: Likewise.
118 * som.c: Likewise.
119 * srec.c: Likewise.
120 * tekhex.c: Likewise.
121 * vms.c: Likewise.
122 * xcofflink.c: Likewise.
123 * elf64-sparc.c: Edit comment to not use "== false".
124
125 * aoutf1.h: Don't use "? true : false".
126 * ecoff.c: Likewise.
127 * format.c: Likewise.
128 * ieee.c: Likewise.
129 * linker.c: Likewise.
130 * mmo.c: Likewise.
131 * oasys.c: Likewise.
132
133 2002-06-23 H.J. Lu <hjl@gnu.org>
134
135 * elflink.h (elf_link_add_archive_symbols): For the default
136 version, check references with only one `@' first.
137
138 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
139
140 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
141 function.
142 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
143 symbol table.
144 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
145 (elf64_hppa_size_dynamic_sections): Revise to use
146 elf64_hppa_mark_milli_and_exported_functions.
147 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
148 symbols out of dynamic symbol table.
149
150 2002-06-23 Alan Modra <amodra@bigpond.net.au>
151
152 * Makefile.in: Regenerate.
153 * libbfd.h: Regenerate.
154 * bfd-in2.h: Regenerate.
155 * configure: Regenerate.
156 * po/SRC-POTFILES.in: Regenerate.
157
158 * elflink.h: Comment typo fixes.
159
160 2002-06-23 H.J. Lu <hjl@gnu.org>
161
162 * elf-bfd.h (elf_link_loaded_list): New structure.
163 (elf_link_hash_table): Add "loaded".
164 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
165 * elflink.h (elf_link_check_versioned_symbol): New function.
166 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
167
168 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
169
170 * elflink.h (size_dynamic_sections): If the target does not
171 support an ELF style hash table, return true, indicating that
172 nothing needed to be done, rather than false, indicating that the
173 section's size could not be computed.
174
175 2002-06-18 Dave Brolley <brolley@redhat.com>
176
177 From Catherine Moore, Michael Meissner, Dave Brolley:
178 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
179 * targets.c: Support bfd_elf32_frv_vec.
180 * reloc.c: Add FRV relocs.
181 * configure.in: Add support for bfd-elf32-frv-vec.
182 * config.bfd (targ_cpu): Add support for frv-*-elf.
183 * archures.c: Add frv arch and machines.
184 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
185 (ALL_MACHINES_CFILES): Add cpu-frv.c.
186 (BFD32_BACKENDS): Add elf32-frv.lo.
187 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
188 (cpu-frv.lo): New target.
189 (elf32-frv.lo): New target.
190 * cpu-frv.c: New file.
191 * elf32-frv.c: New file.
192
193 2002-06-18 Jakub Jelinek <jakub@redhat.com>
194
195 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
196 e_shnum == 0.
197 Only read the first section header if e_shoff is non-zero.
198 Don't consider e_shstrndx if there are no sections.
199
200 2002-06-17 Tom Rix <trix@redhat.com>
201
202 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
203 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
204 complain_overflow_bitfield.
205
206 2002-06-17 Alan Modra <amodra@bigpond.net.au>
207
208 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
209 (bfd_fdopenr): Likewise.
210 (bfd_openstreamr): Likewise.
211 (bfd_openw): Likewise.
212
213 * targets.c: Sort target vecs.
214 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
215 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
216 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
217 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
218 * configure.in: Sort target vecs. Add m88kmach3_vec.
219 * configure: Regenerate.
220
221 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
222
223 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
224 bpo_reloc_no to break sort order ties, not address of items.
225
226 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
227
228 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
229 Skip excluded sections in determing __gp value.
230 (elf_hppa_final_link_relocate): Use the symbol's address in
231 R_PARISC_FPTR64 relocations that don't need an opd entry.
232 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
233 (elf64_hppa_finalize_dynreloc): Likewise.
234 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
235 (elf64_hppa_finish_dynamic_symbol): Break up assert.
236
237 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
238
239 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
240 alignment for .bss, .data and .text sections so that sse and sse2
241 code will work.
242 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
243
244 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
245
246 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
247 sh[1234]*-elf*.
248
249 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
250
251 * elflink.h (elf_bfd_final_link): Improve error handling for missing
252 dynamic sections.
253
254 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
255 for a symbol that has no output section.
256 (allocate_dynrel_entries): Correct comment.
257 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
258 unless we want one.
259 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
260 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
261 with no section. Remove unnecessary parentheses.
262
263 2002-06-11 Tom Rix <trix@redhat.com>
264
265 * coffcode.h (coff_compute_section_file_positions): Add data
266 section to AIX loader alignment check.
267
268 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
269 alignment to 4 bytes.
270 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
271 power accessor macro.
272 (do_shared_object_padding): Remove invalid assertion.
273
274 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
275
276 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
277 for removed output sections.
278
279 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
280
281 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
282 htab_alloc.
283 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
284
285 2002-06-08 H.J. Lu <hjl@gnu.org>
286
287 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
288 work around a long long bug in gcc 2.96 on mips.
289
290 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
291
292 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
293 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
294 Regenerate dependency lists.
295 * Makefile.in: Regenerate.
296 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
297 vax1knetbsd_vec to targ_selvecs.
298 * configure.in: Add vax1knetbsd_vec.
299 * configure: Regenerate.
300 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
301 * vax1knetbsd.c: New file.
302 * vaxnetbsd.c: Update copyright years.
303 (TARGET_PAGE_SIZE): Set to 0x1000.
304 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
305
306 2002-06-08 Matt Thomas <matt@3am-software.com>
307
308 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
309
310 2002-06-08 Alan Modra <amodra@bigpond.net.au>
311
312 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
313
314 2002-06-08 Alan Modra <amodra@bigpond.net.au>
315
316 * Makefile.am: Run "make dep-am".
317 * Makefile.in: Regenerate.
318
319 * armnetbsd.c: Replace CONST with const.
320 * corefile.c: Likewise.
321 * elf32-dlx.c: Likewise.
322 * elf64-mips.c: Likewise.
323 * mmo.c: Likewise.
324 * ns32knetbsd.c: Likewise.
325
326 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
327 table is elf64-sparc.
328
329 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
330
331 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
332 Fix RELA addends to get not shifted in the result. Don't do special
333 handling of R_MIPS_64 for NewABI.
334
335 2002-06-07 Alan Modra <amodra@bigpond.net.au>
336
337 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
338 (NAME(aout,slurp_reloc_table)): Likewise.
339 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
340 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
341 (xcoff_write_archive_contents_big): Likewise.
342 (xcoff_generate_rtinit): Likewise.
343 (xcoff_generate_rtinit): Likewise, and check error return.
344 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
345 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
346 (coff_get_normalized_symtab): Likewise.
347 (coff_make_empty_symbol): Likewise.
348 (bfd_coff_set_symbol_class): Likewise.
349 * cofflink.c (coff_link_add_symbols): Likewise.
350 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
351 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
352 (bfd_ecoff_write_accumulated_debug): Likewise.
353 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
354 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
355 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
356 * ieee.c (do_with_relocs): Use bfd_zalloc.
357 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
358 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
359 (NAME(aout,slurp_reloc_table)): Likewise.
360 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
361 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
362 * som.c (som_build_and_write_symbol_table): Likewise.
363 (som_slurp_string_table): Likewise.
364 (som_slurp_symbol_table): Likewise.
365 (som_bfd_ar_write_symbol_stuff): Likewise.
366 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
367 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
368 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
369 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
370 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
371
372 2002-06-07 Alan Modra <amodra@bigpond.net.au>
373
374 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
375 "group" union.
376 (elf_group_name): Update.
377 (elf_group_id): Define.
378 (bfd_elf_set_group_contents): Declare.
379 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
380 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
381 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
382 that sym for the signature.
383 (_bfd_elf_compute_section_file_positions): Don't call
384 set_group_contents for "ld -r" case.
385 (swap_out_syms): Use bfd_zalloc.
386 * elflink.h (elf_link_add_archive_symbols): Likewise.
387 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
388 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
389
390 2002-06-07 Alan Modra <amodra@bigpond.net.au>
391
392 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
393 relocs in opd for non-shared too.
394
395 2002-06-06 Jeffrey Law <law@redhat.com
396
397 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
398 relocations.
399
400 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
401
402 * merge.c: Include libiberty.h.
403 * elf-strtab.c: Include libiberty.h.
404
405 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
406
407 * peXXigen.c (pe_print_idata): Remove unused variable.
408
409 2002-06-06 David Heine <dlheine@tensilica.com>
410
411 * elf.c (assign_file_positions_for_segments): Remove unallocated
412 sections from the section to segment mapping for PT_LOAD segments.
413 Update comment about empty loadable segments.
414
415 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
416
417 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
418 is within the .stabstr section.
419
420 2002-06-06 Alan Modra <amodra@bigpond.net.au>
421
422 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
423 are "const PTR", not "const PTR *".
424 (bfd_elf32_swap_symbol_in): Likewise.
425 (bfd_elf64_swap_symbol_in): Likewise.
426 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
427 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
428 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
429 (elf_link_add_object_symbols): Likewise.
430 (elf_link_record_local_dynamic_symbol): Likewise.
431 (elf_link_input_bfd): Likewise.
432 (elf_gc_mark): Likewise.
433 (elf_reloc_symbol_deleted_p): Likewise.
434 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
435 (mn10200_elf_relax_delete_bytes): Likewise.
436 (mn10200_elf_symbol_address_p): Likewise.
437 (mn10200_elf_get_relocated_section_contents): Likewise.
438 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
439 (mn10300_elf_relax_section): Likewise.
440 (mn10300_elf_relax_delete_bytes): Likewise.
441 (mn10300_elf_symbol_address_p): Likewise.
442 (mn10300_elf_get_relocated_section_contents): Likewise.
443 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
444 (elf32_h8_relax_delete_bytes): Likewise.
445 (elf32_h8_symbol_address_p): Likewise.
446 (elf32_h8_get_relocated_section_contents): Likewise.
447 * elf32-hppa.c (get_local_syms): Likewise.
448 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
449 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
450 * elf32-sh.c (sh_elf_relax_section): Likewise.
451 (sh_elf_relax_delete_bytes): Likewise.
452 (sh_elf_get_relocated_section_contents): Likewise.
453 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
454 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
455 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
456 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
457 * elf64-ppc.c (get_local_syms): Likewise.
458 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
459 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
460
461 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
462
463 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
464
465 2002-06-05 Alan Modra <amodra@bigpond.net.au>
466
467 * elf.c (group_signature): Swap in the whole symbol, and handle
468 extracting section symbol names.
469 (setup_group): Add comment.
470 (set_group_contents): When called from objcopy or ld, arrange for
471 section contents to be written. Write group member output section
472 indices to allow objcopy to reorganize sections.
473 (_bfd_elf_copy_private_section_data): Copy group info.
474
475 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
476 (bfd_elf32_swap_symbol_in): Update prototype.
477 (bfd_elf64_swap_symbol_in): Likewise.
478 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
479 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
480 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
481 (elf_link_add_object_symbols): Likewise.
482 (elf_link_record_local_dynamic_symbol): Likewise.
483 (elf_link_input_bfd): Likewise.
484 (elf_gc_mark): Likewise.
485 (elf_reloc_symbol_deleted_p): Likewise.
486 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
487 (mn10200_elf_relax_delete_bytes): Likewise.
488 (mn10200_elf_symbol_address_p): Likewise.
489 (mn10200_elf_get_relocated_section_contents): Likewise.
490 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
491 (mn10300_elf_relax_section): Likewise.
492 (mn10300_elf_relax_delete_bytes): Likewise.
493 (mn10300_elf_symbol_address_p): Likewise.
494 (mn10300_elf_get_relocated_section_contents): Likewise.
495 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
496 (elf32_h8_relax_delete_bytes): Likewise.
497 (elf32_h8_symbol_address_p): Likewise.
498 (elf32_h8_get_relocated_section_contents): Likewise.
499 * elf32-hppa.c (get_local_syms): Likewise.
500 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
501 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
502 * elf32-sh.c (sh_elf_relax_section): Likewise.
503 (sh_elf_relax_delete_bytes): Likewise.
504 (sh_elf_get_relocated_section_contents): Likewise.
505 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
506 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
507 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
508 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
509 * elf64-ppc.c (get_local_syms): Likewise.
510 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
511 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
512 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
513 * elf64-alpha.c (alpha_elf_size_info): Likewise.
514 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
515 * elf64-mips.c (mips_elf64_size_info): Likewise.
516 * elf64-s390.c (s390_elf64_size_info): Likewise.
517 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
518
519 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
520
521 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
522 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
523 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
524 _bfd_mips_elf_ignore_discarded_relocs.
525 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
526
527 2002-06-05 H.J. Lu <hjl@gnu.org>
528
529 * elfxx-mips.c (mips_elf_calculate_relocation): Call
530 _bfd_elf_rel_local_sym for STT_SECTION relocations against
531 the SEC_MERGE section.
532
533 2002-06-05 Alan Modra <amodra@bigpond.net.au>
534
535 * coff-alpha.c: Update copyright date.
536 * coff-mips.c: Likewise.
537 * xcoff-target.h: Likewise.
538
539 * bfd-in.h: Remove "taken from the source" comment.
540 * libbfd-in.h: Likewise.
541 * libcoff-in.h: Likewise.
542 * bfd-in2.h: Regenerate.
543 * libbfd.h: Regenerate.
544 * libcoff.h: Regenerate.
545
546 * elf.c (bfd_elf_discard_group): Return true.
547 * elf-bfd.h (bfd_elf_discard_group): Declare.
548 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
549 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
550 * bfd.c (bfd_discard_group): Define.
551 * targets.c (struct bfd_target): Add _bfd_discard_group.
552 (BFD_JUMP_TABLE_LINK): Here too.
553 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
554 * aout-adobe.c (aout_32_bfd_discard_group): Define.
555 * aout-target.h (MY_bfd_discard_group): Define.
556 * aout-tic30.c (MY_bfd_discard_group): Define.
557 * binary.c (binary_bfd_discard_group): Define.
558 * bout.c (b_out_bfd_discard_group): Define.
559 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
560 * coffcode.h (coff_bfd_discard_group): Define.
561 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
562 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
563 * i386msdos.c (msdos_bfd_discard_group): Define.
564 * i386os9k.c (os9k_bfd_discard_group): Define.
565 * ieee.c (ieee_bfd_discard_group): Define.
566 * ihex.c (ihex_bfd_discard_group): Define.
567 * mmo.c (mmo_bfd_discard_group): Define.
568 * nlm-target.h (nlm_bfd_discard_group): Define.
569 * oasys.c (oasys_bfd_discard_group): Define.
570 * ppcboot.c (ppcboot_bfd_discard_group): Define.
571 * som.c (som_bfd_discard_group): Define.
572 * srec.c (srec_bfd_discard_group): Define.
573 * tekhex.c (tekhex_bfd_discard_group): Define.
574 * versados.c (versados_bfd_discard_group): Define.
575 * vms.c (vms_bfd_discard_group): Define.
576 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
577 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
578 (aix5coff64_vec): Likewise.
579 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
580
581 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
582
583 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
584 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
585 (elf32-sh64-com.lo): New dependency list.
586 * Makefile.in: Regenerate.
587 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
588 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
589 elf32-sh64-com.lo.
590 * configure: Regenerate.
591 * elf32-sh64.c (sh64_address_in_cranges)
592 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
593 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
594 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
595 * elf32-sh64-com.c: ...here. New file.
596
597 2002-06-04 Alan Modra <amodra@bigpond.net.au>
598
599 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
600 ATTRIBUTE_UNUSED on used params.
601 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
602 before calling bfd_section_from_elf_index on local syms.
603 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
604
605 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
606
607 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
608 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
609 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
610 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
611 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
612 * Makefile.in: Regenerate.
613 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
614 (sh64-*-netbsd*): New targets.
615 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
616 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
617 * configure: Regenerate.
618 * elf32-sh64-nbsd.c: New file.
619 * elf64-sh64-nbsd.c: New file.
620 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
621 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
622 bfd_elf64_sh64lnbsd_vec.
623
624 2002-06-04 Alan Modra <amodra@bigpond.net.au>
625
626 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
627 (bfd_section_from_shdr): Likewise. Set section name of group
628 sections from signature.
629 (group_signature): Split out from setup_group. Ensure symbol table
630 is available.
631 (bfd_elf_discard_group): New function.
632 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
633 .gnu.linkonce* sections if they are members of a group.
634 (set_group_contents): Set GRP_COMDAT flag.
635 * section.c (bfd_discard_group): New function.
636 * bfd-in.h (bfd_elf_discard_group): Declare.
637 * bfd-in2.h: Regenerate.
638 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
639 (elf_linkonce_p): Define.
640
641 2002-06-04 Alan Modra <amodra@bigpond.net.au>
642
643 * elf.c (bfd_section_from_shdr): Make "name" const.
644 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
645 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
646 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
647 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
648 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
649 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
650 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
651 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
652 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
653 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
654 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
655
656 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
657
658 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
659 ABI.
660
661 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
662
663 * elf32-arc.c: Fix formatting.
664 * elf32-arm.h: Likewise.
665 * elf32-cris.c: Likewise.
666 * elf32-dlx.c: Likewise.
667 * elf32-hppa.c: Likewise.
668 * elf32-i386.c: Likewise.
669 * elf32-i386qnx.c: Likewise.
670 * elf32-or32.c: Likewise.
671 * elf32-s390.c: Likewise.
672 * elf32-sh64.c: Likewise.
673 * elf32-vax.c: Likewise.
674 * elf32-xstormy16.c: Likewise.
675 * elf64-alpha.c: Likewise.
676 * elf64-mmix.c: Likewise.
677 * elf64-ppc.c: Likewise.
678 * elf64-s390.c: Likewise.
679 * elf64-sh64.c: Likewise.
680 * elf64-x86-64.c: Likewise.
681
682 2002-06-02 Richard Henderson <rth@redhat.com>
683
684 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
685 null when there are no got entries for a symbol.
686 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
687 uninitialized variable warning.
688
689 2002-06-01 Richard Henderson <rth@redhat.com>
690
691 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
692 undefined symbols here.
693 (elf64_alpha_relax_section): Do it here. Also test for not
694 defined in the current module.
695 (elf64_alpha_relocate_section_r): Split out of ...
696 (elf64_alpha_relocate_section): ... here. Don't dereference
697 NULL when looking up local got entries.
698
699 2002-06-01 Richard Henderson <rth@redhat.com>
700
701 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
702 symbols from JSR relaxation.
703 (elf64_alpha_size_plt_section_1): New.
704 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
705 (elf64_alpha_size_rela_got_1): ... here.
706 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
707 (elf64_alpha_size_rela_got_section): ... here.
708 (elf64_alpha_size_plt_section): New.
709 (elf64_alpha_relax_section): Call them.
710 (elf64_alpha_size_got_sections): Remove output_bfd arg.
711 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
712
713 2002-06-01 Richard Henderson <rth@redhat.com>
714
715 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
716 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
717 in shared libraries. Fix DTPRELHI and TPRELHI value.
718 (INSN_ADDQ, INSN_RDUNIQ): New.
719 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
720 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
721 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
722 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
723 Handle GOTDTPREL and GOTTPREL relocations.
724 (elf64_alpha_relax_gprelhilo): New.
725 (elf64_alpha_relax_tls_get_addr): New.
726 (elf64_alpha_relax_find_tls_segment): New.
727 (elf64_alpha_relax_section): Handle TLS relocations.
728 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
729 (elf64_alpha_check_relocs): Set it.
730
731 2002-06-01 Richard Henderson <rth@redhat.com>
732
733 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
734
735 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
736 check; don't suppress dynamic relocs for non-allocated sections.
737
738 * elf64-alpha.c: Remove dead code.
739
740 2002-05-31 Alan Modra <amodra@bigpond.net.au>
741
742 * bfd-in2.h: Regenerate.
743 * libbfd.h: Regenerate.
744 * po/SRC-POTFILES.in: Regenerate.
745
746 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
747 space for bss .plt.
748
749 2002-05-31 Graeme Peterson <gp@qnx.com>
750
751 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
752 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
753 Run "make dep-am".
754 * Makefile.in: Regenerate.
755 * config.bfd: Add i[3456]86-*-nto-qnx* support.
756 * configure.in: Add bfd_elf32_i386qnx_vec support.
757 * configure: Regenerate.
758 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
759 is_contained_by_filepos, and copy_private_bfd_data_p.
760 * elf.c (assign_file_positions_for_segments): Call backend
761 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
762 (IS_CONTAINED_BY_FILEPOS): Define.
763 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
764 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
765 Fix non-K&R call to _bfd_error_handler.
766 (_bfd_elf_copy_private_section_data): Use backend
767 copy_private_bfd_data_p.
768 * elf32-i386.c: Don't include elfxx-target.h when
769 ELF32_I386_C_INCLUDED is defined.
770 * elf32-i386qnx.c: New QNX elf backend file.
771 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
772 elf_backend_is_contained_by_filepos, and
773 elf_backend_do_copy_private_bfd_data.
774 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
775
776 2002-05-31 Alan Modra <amodra@bigpond.net.au>
777
778 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
779 Move other similar defines to start of file.
780
781 2002-05-30 Tom Rix <trix@redhat.com>
782
783 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
784 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
785
786 2002-05-30 Richard Henderson <rth@redhat.com>
787
788 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
789 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
790 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
791 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
792 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
793 (struct alpha_elf_obj_tdata): Rename total_got_entries and
794 n_local_got_entries to total_got_size and local_got_size.
795 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
796 (alpha_got_entry_size): New.
797 (elf64_alpha_relax_with_lituse): Use it.
798 (elf64_alpha_relax_without_lituse): Likewise.
799 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
800 (get_got_entry): New.
801 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
802 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
803 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
804 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
805 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
806 (elf64_alpha_calc_got_offsets): Likewise.
807 (alpha_dynamic_entries_for_reloc): New.
808 (elf64_alpha_calc_dynrel_sizes): Use it.
809 (elf64_alpha_size_dynamic_sections): Likewise.
810 (elf64_alpha_relocate_section): Handle TLS relocations.
811 * reloc.c: Add Alpha TLS relocations.
812 * bfd-in2.h, libbfd.h: Rebuild.
813
814 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
815
816 * peXXigen.c (pe_print_idata): Remove double printed
817 import table lines; add Bound-To comment.
818
819 2002-05-29 Matt Thomas <matt@3am-software.com>
820
821 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
822 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
823 (elf32-vax.lo): New rule.
824 * Makefile.in: Regenerate.
825 * configure.in (bfd_elf32_vax_vec)
826 (vaxnetbsd_vec): New vectors.
827 * configure: Regenerate.
828 * config.bfd (vax-*-netbsdelf*)
829 (vax-*-netbsdaout*)
830 (vax-*-netbsd*): New targets.
831 * elf32-vax.c: New file.
832 * reloc.c: Add VAX relocations.
833 * bfd-in2.h: Regenerate.
834 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
835
836 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
837
838 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
839 and bfd_elf32_bigarm_vec to targ_selvecs.
840
841 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
842
843 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
844 with auto-imported symbols.
845
846 2002-05-29 Adam Nemet <anemet@lnxw.com>
847
848 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
849 sections only record bfd.
850 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
851 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
852 * bfd-in2.h: Regenerate.
853
854 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
855
856 * syms.c (_bfd_stab_section_find_nearest_line): Move
857 declaration and initialisation of saw_line and saw_func out of
858 for loop.
859
860 2002-05-29 Alan Modra <amodra@bigpond.net.au>
861
862 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
863 (bfd_elf64_get_symbol_info): Define.
864 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
865
866 2002-05-29 Andrey Volkov <avolkov@transas.com>
867
868 * cpu-h8300.c: Make default h8300 machine first in machine list.
869
870 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
871
872 * config.bfd: Added DLX configuraton.
873 * Makefile.am: Added DLX configuraton.
874 * configure.in: Added DLX configuraton.
875 * archures.c: Add DLX architecure.
876 * reloc.c: Add DLX relocs.
877 * targets.c: Added DLX target vector.
878 * configure: Regenerate.
879 * Makefile.in: Regenreate.
880 * bfd-in2.h: Regenreate.
881 * elf32-dlx.c: New file: Support DLX target.
882 * cpu-dlx.c: New file: Support DLX target.
883
884 2002-05-25 Alan Modra <amodra@bigpond.net.au>
885
886 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
887
888 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
889 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
890 strings to point inside function code sym string.
891 (func_desc_adjust): Likewise.
892 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
893
894 2002-05-24 Michal Ludvig <mludvig@suse.cz>
895
896 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
897 (elf64_x86_64_grok_psinfo): Added.
898
899 2002-05-24 TAMURA Kent <kent@netbsd.org>
900
901 * config.bfd: Add a target for i386-netbsdpe.
902
903 2002-05-24 Alan Modra <amodra@bigpond.net.au>
904
905 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
906 and is_func_descriptor.
907 (func_desc_adjust): Hide function code sym in shared libs unless
908 there is a matching exported function descriptor sym.
909
910 2002-05-23 Jakub Jelinek <jakub@redhat.com>
911
912 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
913 for symbols from SHF_TLS section.
914 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
915 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
916 (map_sections_to_segments): Build PT_TLS segment if necessary.
917 (assign_file_positions_for_segments): Likewise.
918 (get_program_header_size): Account for PT_TLS segment.
919 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
920 SEC_THREAD_LOCAL sections to STT_TLS.
921 * reloc.c: Add 386 and IA-64 TLS relocs.
922 * section.c (SEC_THREAD_LOCAL): Define.
923 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
924 Remove.
925 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
926 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
927 unconditionally.
928 (struct elf_final_link_info): Add first_tls_sec.
929 (elf_bfd_final_link): Set first_tls_sec.
930 Compute elf_hash_table (info)->tls_segment.
931 (elf_link_output_extsym): Handle STT_TLS symbols.
932 (elf_link_input_bfd): Likewise.
933 * syms.c (BSF_THREAD_LOCAL): Define.
934 * bfd-in2.h: Rebuilt.
935 * libbfd.h: Rebuilt.
936 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
937 elf_i386_mkobject, elf_i386_object_p): New functions.
938 (elf_howto_table): Add TLS relocs.
939 (elf_i386_reloc_type_lookup): Support TLS relocs.
940 (elf_i386_info_to_howto_rel): Likewise.
941 (struct elf_i386_link_hash_entry): Add tls_type.
942 (struct elf_i386_obj_tdata): New.
943 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
944 New macros.
945 (struct elf_i386_link_hash_table): Add tls_ldm_got.
946 (link_hash_newfunc): Clear tls_type.
947 (elf_i386_check_relocs): Support TLS relocs.
948 (elf_i386_gc_sweep_hook): Likewise.
949 (allocate_dynrelocs): Likewise.
950 (elf_i386_size_dynamic_sections): Likewise.
951 (elf_i386_relocate_section): Likewise.
952 (elf_i386_finish_dynamic_symbol): Likewise.
953 (bfd_elf32_mkobject, elf_backend_object_p): Define.
954 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
955 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
956 want_tprel, want_dtpmod, want_dtprel.
957 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
958 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
959 R_IA64_LTOFF_TPREL22.
960 (elf_code_to_howto_index): Add TLS relocs.
961 (elfNN_ia64_check_relocs): Support TLS relocs.
962 (allocate_global_data_got): Account for TLS .got data.
963 (allocate_dynrel_entries): Account for TLS dynamic relocations.
964 (elfNN_ia64_install_value): Supprt TLS relocs.
965 (set_got_entry): Support TLS relocs.
966 (elfNN_ia64_relocate_section): Likewise.
967
968 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
969
970 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
971 BLX reloc round the relocation up rather than down.
972 * coff-arm.c (coff_arm_relocate_section): Likewise.
973
974 2002-05-21 H.J. Lu (hjl@gnu.org)
975
976 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
977 definition.
978
979 2002-05-22 Alan Modra <amodra@bigpond.net.au>
980
981 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
982 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
983
984 2002-05-22 Alan Modra <amodra@bigpond.net.au>
985
986 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
987 unresolved relocs.
988 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
989
990 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
991
992 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
993 non-ELF targets.
994
995 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
996
997 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
998 an error value.
999 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1000 return with false on error.
1001 (elf_link_input_bfd): Check reloc_emitter return value.
1002
1003 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
1004
1005 * config.bfd (armeb-*-netbsdelf*): New target.
1006
1007 2002-05-20 Alan Modra <amodra@bigpond.net.au>
1008
1009 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1010 at the plt call stub.
1011
1012 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1013
1014 * cpu-mips.c (mips_compatible): Don't try to check machine
1015 compatibility.
1016
1017 2002-05-18 Tom Rix <trix@redhat.com>
1018
1019 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
1020
1021 2002-05-17 Alan Modra <amodra@bigpond.net.au>
1022
1023 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1024 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1025 we've already warned about an undefined symbol. Report more
1026 detail on reloc errors.
1027
1028 2002-05-17 Alan Modra <amodra@bigpond.net.au>
1029
1030 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1031 * configure.in: Invoke AM_INSTALL_LIBBFD.
1032 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
1033 (install_libbfd): .. New target.
1034 (uninstall_libbfd): Likewise.
1035 (install-bfdlibLTLIBRARIES): Likewise.
1036 (uninstall-bfdlibLTLIBRARIES): Likewise.
1037 (bfdlibdir): New.
1038 (bfdincludedir): New.
1039 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1040 * aclocal.m4: Regenerate.
1041 * configure: Regenerate.
1042 * Makefile.in: Regenerate.
1043
1044 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
1045
1046 * hash.c (bfd_hash_lookup): Remove computation of len from inside
1047 hash loop.
1048
1049 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
1050
1051 * config.bfd: Add targets for sh64-linux (little endian and
1052 big endian).
1053
1054 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
1055
1056 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1057 is located in the same section as the import table. Instead
1058 check, and if necessary load the section containing the thunk.
1059
1060 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
1061
1062 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
1063 bfd_bread.
1064 (xcoff64_core_file_matches_executable_p): Replace bfd_read
1065 with bfd_bread.
1066
1067 2002-05-15 Alan Modra <amodra@bigpond.net.au>
1068
1069 * aix5ppc-core.c: Warning fixes.
1070 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1071 * aout-target.h (MY_bfd_link_just_syms): Define.
1072 * aout-tic30.c (MY_bfd_link_just_syms): Define.
1073 * bfd.c (bfd_link_just_syms): Define.
1074 * binary.c (binary_bfd_link_just_syms): Define.
1075 * bout.c (b_out_bfd_link_just_syms): Define.
1076 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1077 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1078 * coffcode.h (coff_bfd_link_just_syms): Define.
1079 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1080 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1081 (_bfd_elf_link_just_syms): Declare.
1082 * elf.c (_bfd_elf_link_just_syms): New function.
1083 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1084 sections haven't already been discarded by the linker.
1085 * elflink.h (elf_link_add_object_symbols): Likewise for stab
1086 sections and SEC_MERGE sections.
1087 (elf_bfd_discard_info): Similarly here.
1088 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1089 * i386msdos.c (msdos_bfd_link_just_syms): Define.
1090 * i386os9k.c (os9k_bfd_link_just_syms): Define.
1091 * ieee.c (ieee_bfd_link_just_syms): Define.
1092 * ihex.c (ihex_bfd_link_just_syms): Define.
1093 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1094 (_bfd_generic_link_just_syms): Declare.
1095 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1096 * linker.c (_bfd_generic_link_just_syms): New function.
1097 * mmo.c (mmo_bfd_link_just_syms): Define.
1098 * nlm-target.h (nlm_bfd_link_just_syms): Define.
1099 * oasys.c (oasys_bfd_link_just_syms): Define.
1100 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1101 * som.c (som_bfd_link_just_syms): Define.
1102 * srec.c (srec_bfd_link_just_syms): Define.
1103 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1104 (BFD_JUMP_TABLE_LINK): And here.
1105 * tekhex.c (tekhex_bfd_link_just_syms): Define.
1106 * versados.c (versados_bfd_link_just_syms): Define.
1107 * vms.c (vms_bfd_link_just_syms): Define.
1108 * libbfd.h: Regenerate.
1109 * bfd-in2.h: Regenerate.
1110
1111 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1112
1113 * elf32-mips.c: Remove superfluous definitions copied from
1114 elfxx-mips.c.
1115 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1116 SGIish vectors to check the special case.
1117 (mips_elf_hi16_reloc): Fix comment.
1118 (mips_elf_got16_reloc): Likewise.
1119 (_bfd_mips_elf32_gprel16_reloc): Likewise.
1120 (elf_reloc_map): Code cleanup.
1121 (mips_reloc_map): Add comment.
1122 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1123 (mips_elf32_rtype_to_howto): Likewise.
1124 (mips_elf32_discard_info): Likewise.
1125 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1126 lead to IRIX compatibility now.
1127
1128 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1129
1130 * elfxx-mips.c: Call it IRIX, not Irix in comments.
1131
1132 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
1133
1134 * config.bfd (shle-*-netbsdelf*): Add target which includes
1135 sh64 support.
1136
1137 2002-05-13 David Edelsohn <edelsohn@gnu.org>
1138
1139 * configure.in: Revert 2002-04-07. Instead, auto-configure
1140 HAVE_ST_C_IMPL.
1141 * configure: Regenerate.
1142 * config.in: Regenerate.
1143 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1144 or AIX_5_CORE.
1145
1146 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1147
1148 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1149 corefiles as well.2
1150 * configure: Regenerate.
1151
1152 2002-05-13 Alan Modra <amodra@bigpond.net.au>
1153
1154 * Makefile.am (install-data-local): Install headers to
1155 $(exec_prefix)/include.
1156 * Makefile.in: Regenerate.
1157
1158 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1159 Daniel Jacobowitz <drow@mvista.com>
1160
1161 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
1162 map BFD_RELOC_RVA.
1163
1164 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1165
1166 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1167 hppa*-*-openbsd*): New targets.
1168 * configure.in (alpha*-*-openbsd*): Set COREFILE.
1169 * configure: Regenerate.
1170
1171 2002-05-10 Tom Rix <trix@redhat.com>
1172
1173 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
1174 xcoff64_ppc_relocate_section.
1175 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
1176 * libxcoff.h: Common xcoff_reloc_type function declaration.
1177
1178 2002-05-10 Alan Modra <amodra@bigpond.net.au>
1179
1180 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
1181 added in 2002-05-09 commit.
1182
1183 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
1184 don't look for stubs on all undefined syms.
1185
1186 2002-05-09 Alan Modra <amodra@bigpond.net.au>
1187
1188 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
1189 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
1190 pcrel_offset.
1191
1192 * elf32-i386.c (elf_howto_table): Comments.
1193 (elf_i386_relocate_section): Handle more relocs for relocatable
1194 linking and against SEC_MERGE sections.
1195
1196 2002-05-08 Alan Modra <amodra@bigpond.net.au>
1197
1198 * elf32-ppc.c (ppc_elf_create_got): New function.
1199 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
1200 _bfd_elf_create_dynamic_sections. Correct .plt flags.
1201 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
1202 _bfd_elf_create_got_section.
1203
1204 2002-05-07 Alan Modra <amodra@bigpond.net.au>
1205
1206 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
1207 * elfxx-target.h (elf_backend_rela_normal): Define.
1208 (elfNN_bed): Init rela_normal.
1209 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
1210 for section symbols here if rela_normal. Simplify abs section test.
1211 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
1212 return immediately. Remove code handling relocatable linking.
1213 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1214 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1215 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1216 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1217 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1218 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1219 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1220 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1221 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1222 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1223 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1224 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1225 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1226 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1227 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
1228 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1229 * elf-m10200.c (elf_backend_rela_normal): Define.
1230 * elf-m10300.c (elf_backend_rela_normal): Define.
1231 * elf32-fr30.c (elf_backend_rela_normal): Define.
1232 * elf32-i370.c (elf_backend_rela_normal): Define.
1233 * elf32-i860.c (elf_backend_rela_normal): Define.
1234 * elf32-m68k.c (elf_backend_rela_normal): Define.
1235 * elf32-mcore.c (elf_backend_rela_normal): Define.
1236 * elf32-openrisc.c (elf_backend_rela_normal): Define.
1237 * elf32-ppc.c (elf_backend_rela_normal): Define.
1238 * elf32-s390.c (elf_backend_rela_normal): Define.
1239 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
1240 * elf64-ppc.c (elf_backend_rela_normal): Define.
1241 * elf64-s390.c (elf_backend_rela_normal): Define.
1242 * elf64-x86-64.c (elf_backend_rela_normal): Define.
1243 * elfxx-ia64.c (elf_backend_rela_normal): Define.
1244 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
1245 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
1246
1247 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
1248
1249 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
1250 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
1251
1252 2002-05-06 Alan Modra <amodra@bigpond.net.au>
1253
1254 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
1255 when not relocatable. Fix reloc_emitter call for K&R.
1256
1257 2002-05-04 Alan Modra <amodra@bigpond.net.au>
1258
1259 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
1260 reloading local sym addend mistakenly removed in 2002-05-01 change.
1261
1262 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
1263 (read_abbrevs): Change "offset" param to bfd_vma.
1264 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
1265 Change "abbrev_offset" to bfd_vma.
1266 (read_indirect_string): Use correct conversion chars in error
1267 message format string, cast bfd_vma's to unsigned long.
1268 (read_abbrevs): Likewise.
1269 (read_attribute_value): Likewise.
1270 (decode_line_info): Likewise.
1271 (scan_unit_for_functions): Likewise.
1272 (parse_comp_unit): Likewise.
1273
1274 2002-05-04 Tom Rix <trix@redhat.com>
1275
1276 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
1277 (coff_swap_reloc_out): Same.
1278 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
1279 (xcoff_swap_reloc_out): Same.
1280 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
1281 case some 16 bit relocs. Add reloc value to output.
1282 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
1283 R_RBR. Improve names.
1284 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
1285 (bfd_xcoff_backend_data): Update with new reloc swap names.
1286 (bfd_pmac_xcoff_backend_data) : Same.
1287 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
1288 (xcoff64_swap_reloc_out): Same.
1289 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
1290 R_POS. Add reloc value to output.
1291 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
1292 bit R_RBR. Improve names, masks.
1293 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
1294 (bfd_xcoff_backend_data): Update with new reloc swap names.
1295 (bfd_xcoff_aix5_backend_data) : Same.
1296
1297 2002-05-04 Alan Modra <amodra@bigpond.net.au>
1298
1299 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
1300 bfd_count top_index, input_list, all_local_syms.
1301 (elf32_hppa_setup_section_lists): New function, split from
1302 elf32_hppa_size_stubs.
1303 (elf32_hppa_next_input_section): Likewise.
1304 (group_sections): Likewise.
1305 (get_local_syms): Likewise.
1306 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
1307 stubs on undefined syms too.
1308 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
1309 Only access htab elf fields when we have an elf hash table.
1310 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
1311 (elf32_hppa_next_input_section): Declare.
1312
1313 2002-05-04 Bob Byrnes <byrnes@curl.com>
1314
1315 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
1316 _bfd_new_bfd.
1317
1318 2002-05-03 H.J. Lu (hjl@gnu.org)
1319
1320 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
1321 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
1322 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
1323 to hide a global symbol.
1324 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
1325 forced_local to true.
1326
1327 2002-05-02 Richard Henderson <rth@redhat.com>
1328
1329 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
1330 vs SHN_UNDEF to zero.
1331
1332 2002-05-02 Alan Modra <amodra@bigpond.net.au>
1333
1334 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
1335 16 bit reloc.
1336 <R_PPC64_SECTOFF_DS>: Likewise.
1337 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1338 SECTOFF reloc.
1339 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
1340 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1341 SECTOFF reloc.
1342
1343 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
1344 (ppc64_elf_ha_reloc): New function.
1345 (ppc64_elf_brtaken_reloc): New function.
1346 (ppc64_elf_sectoff_reloc): New function.
1347 (ppc64_elf_sectoff_ha_reloc): New function.
1348 (ppc64_elf_toc_reloc): New function.
1349 (ppc64_elf_toc_ha_reloc): New function.
1350 (ppc64_elf_toc64_reloc): New function.
1351 (ppc64_elf_unhandled_reloc): New function.
1352 (ppc64_elf_howto_raw): Use the above.
1353 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
1354 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
1355 <R_PPC64_SECTOFF_DS>: Likewise.
1356 (IS_ABSOLUTE_RELOC): Update.
1357 (struct ppc_link_hash_table): Add have_undefweak.
1358 (ppc64_elf_link_hash_table_create): Init.
1359 (func_desc_adjust): Set have_undefweak.
1360 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
1361 add the .sfpr blr when have_undefweak.
1362 (ppc64_elf_setup_section_lists): Check hash table flavour.
1363 (ppc64_elf_next_input_section): Move output_section->owner test to
1364 ppc64elf.em.
1365 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
1366 and relocatable test. Return TOCstart and don't set elf_gp.
1367 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
1368 offset calculation. Add assert on weak sym branch tweaks.
1369 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
1370 (ppc64_elf_toc): Declare.
1371 (ppc64_elf_next_input_section): Update.
1372
1373 2002-05-01 Alan Modra <amodra@bigpond.net.au>
1374
1375 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1376 file_name.
1377
1378 2002-05-01 Alan Modra <amodra@bigpond.net.au>
1379
1380 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1381 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
1382 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
1383 call branches. Correct undefined weak destination.
1384 (ppc64_elf_func_desc_adjust): Always create at least one blr in
1385 .sfpr, and correct case where either only savef* or restf* is
1386 needed.
1387
1388 Long branch stubs, multiple stub sections.
1389 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1390 (ppc64_elf_next_input_section): Declare.
1391 * elf64-ppc.c: Move linker-only prototypes.
1392 (STUB_SUFFIX): Define.
1393 (enum ppc_stub_type): New.
1394 (struct ppc_stub_hash_entry): New.
1395 (struct ppc_branch_hash_entry): New.
1396 (struct ppc_link_hash_entry): Add stub_cache, oh.
1397 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
1398 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1399 Rename plt_overflow to stub_error.
1400 (ppc_stub_hash_lookup): Define.
1401 (ppc_branch_hash_lookup): Define.
1402 (stub_hash_newfunc): New function.
1403 (branch_hash_newfunc): New function.
1404 (link_hash_newfunc): Init new fields.
1405 (ppc64_elf_link_hash_table_create): Likewise.
1406 (ppc64_elf_link_hash_table_free): New function.
1407 (ppc_stub_name): New function.
1408 (ppc_get_stub_entry): New function.
1409 (ppc_add_stub): New function.
1410 (create_linkage_sections): Use bfd_make_section_anyway. Create
1411 .branch_lt and .rela.branch_lt sections. Don't create .stub.
1412 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1413 and set up for plt call stubs. Link func and func desc syms.
1414 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1415 (func_desc_adjust): Avoid hash lookup when func desc sym available
1416 via shortcut, and set links when processing.
1417 (ppc64_elf_hide_symbol): Likewise.
1418 (allocate_dynrelocs): Don't allocate stub section here.
1419 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1420 Remove sstub code.
1421 (ppc_type_of_stub): New function.
1422 (build_one_stub): Delete.
1423 (ppc_build_one_stub): New function.
1424 (ppc_size_one_stub): New function.
1425 (ppc64_elf_setup_section_lists): New function.
1426 (ppc64_elf_next_input_section): New function.
1427 (group_sections): New function.
1428 (get_local_syms): New function.
1429 (ppc64_elf_size_stubs): Rewrite.
1430 (ppc64_elf_build_stubs): Rewrite.
1431 (ppc64_elf_relocate_section): Look up stub entry for REL24
1432 relocs. Don't propagate REL14* to dynamic objects. Look for long
1433 branch stubs if REL14* or REL24 relocs won't reach.
1434 (bfd_elf64_bfd_link_hash_table_free): Define.
1435
1436 2002-04-30 Mark Mitchell <mark@codesourcery.com>
1437
1438 * bfd/config.bfd: Add support for powerpc-*-windiss.
1439
1440 2002-04-30 Tom Rix <trix@redhat.com>
1441
1442 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1443 symbol names into the hash table.
1444
1445 2002-04-28 Tom Rix <trix@redhat.com>
1446
1447 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
1448 calulating relocations.
1449 (xcoff_complain_overflow) : Function table for relocation errors.
1450 (xcoff_ppc_relocate_section): Use relocation and complain function
1451 tables.
1452 (xcoff_complain_overflow_unsigned_func): New complain function.
1453 (xcoff_complain_overflow_signed_func): Same.
1454 (xcoff_complain_overflow_bitfield_func): Same.
1455 (xcoff_complain_overflow_dont_func): Same.
1456 (xcoff_reloc_type_crel): New recot function.
1457 (xcoff_reloc_type_br): Same.
1458 (xcoff_reloc_type_ba): Same.
1459 (xcoff_reloc_type_toc): Same.
1460 (xcoff_reloc_type_rel): Same.
1461 (xcoff_reloc_type_neg): Same.
1462 (xcoff_reloc_type_pos): Same.
1463 (xcoff_reloc_type_fail): Same.
1464 (xcoff_reloc_type_noop): Same.
1465 * libxcoff.h : Declare common parts for xcoff64.
1466 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
1467 and complain function tables.
1468
1469 2002-04-28 Alan Modra <amodra@bigpond.net.au>
1470
1471 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
1472 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
1473
1474 2002-04-26 Alan Modra <amodra@bigpond.net.au>
1475
1476 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
1477 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1478
1479 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
1480 same as the output before calling elf_link_input_bfd.
1481
1482 * coffcode.h (coff_compute_section_file_positions): Set
1483 section_tail after shuffling section list.
1484
1485 2002-04-24 Christian Groessler <chris@groessler.org>
1486
1487 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
1488 addresses are 23bit with a special layout, not plain 32bit
1489 values. Prevent relocation of immediate values.
1490
1491 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
1492
1493 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
1494 MIPS-16 ASE flags are set, print something to indicate that.
1495
1496 2002-04-23 Alan Modra <amodra@bigpond.net.au>
1497
1498 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
1499 under which a plt call stub is used.
1500 (final_link_relocate): Similarly.
1501 (allocate_plt_static): Clear h-plabel except when plt entry is
1502 exclusively used for a plabel.
1503 (allocate_dynrelocs): Use the above to simplify plt sizing.
1504 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
1505 (elf32_hppa_link_hash_table_create): Init.
1506 (BL22_RP): Define.
1507 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
1508 (elf32_hppa_check_relocs): Set has_22bit_branch.
1509
1510 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
1511 (final_link_relocate): Likewise.
1512
1513 2002-04-22 Jakub Jelinek <jakub@redhat.com>
1514
1515 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
1516 search table if some FDE is DW_EH_PE_aligned encoded either.
1517 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
1518
1519 2002-04-22 Richard Smith <richard@ex-parrot.com>
1520 Jakub Jelinek <jakub@redhat.com>
1521
1522 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
1523 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
1524 encoded personality.
1525 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1526 for CIE/FDE removal.
1527
1528 2002-04-20 Tom Rix <trix@redhat.com>
1529
1530 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1531
1532 2002-04-20 Alan Modra <amodra@bigpond.net.au>
1533
1534 * archures.c (bfd_lookup_arch): Move the list order comment..
1535 (struct bfd_arch_info): ..to where it belongs.
1536 * bfd-in2.h: Regenerate.
1537
1538 * archures.c (bfd_lookup_arch): Add comment on list order.
1539 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1540 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1541 is always at head of list.
1542
1543 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1544
1545 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1546 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1547 definition of these functions for ARM_WINCE builds as they are
1548 not used.
1549 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
1550 for ARM_WINCE builds.
1551
1552 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1553
1554 * coff-arm.c (bfd_arm_process_before_allocation):
1555
1556 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
1557
1558 * cpu-sh.c (scan_mach): Delete.
1559 (arch_info_struct): Replace scan_mach with bfd_default_scan.
1560 (bfd_sh_arch): Likewise.
1561
1562 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
1563
1564 * ihex.c (ihex_write_object_contents): Fix check for records
1565 crossing 64K boundaries.
1566
1567 2002-04-16 Alan Modra <amodra@bigpond.net.au>
1568
1569 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1570 type rather than just assuming entries are ELF.
1571 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1572 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1573 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1574 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1575 rather than elf_link_hash_entry.
1576
1577 2002-04-15 Richard Henderson <rth@redhat.com>
1578
1579 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1580 n32 binaries.
1581
1582 2002-04-15 Michael Snyder <msnyder@redhat.com>
1583
1584 * opncls.c (bfd_close): Write contents if writeable.
1585 Minor formatting tidy-ups.
1586
1587 2002-04-15 Alan Modra <amodra@bigpond.net.au>
1588
1589 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1590
1591 2002-04-12 Michael Snyder <msnyder@redhat.com>
1592
1593 * bfd-in.h (bfd_get_section_lma): New access macro.
1594 Minor white-space fix-up.
1595
1596 2002-04-12 Alan Modra <amodra@bigpond.net.au>
1597
1598 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1599 header pad.
1600
1601 2002-04-09 DJ Delorie <dj@redhat.com>
1602
1603 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1604
1605 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
1606
1607 * coffcode.h (coff_read_word): New.
1608 (coff_compute_checksum): New.
1609 (coff_apply_checksum): New.
1610 (coff_write_object_contents): Call coff_apply_checksum () to
1611 apply checksum to PE image.
1612
1613 2002-04-08 Randolph Chung <tausq@debian.org>
1614
1615 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1616 (elf32_hppa_final_link): Split out sorting logic to..
1617 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1618 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1619
1620 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1621
1622 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1623 pattern.
1624 * configure: Re-generate.
1625
1626 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1627
1628 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1629 is greater or equal to 4.3.3.
1630 * configure: Regenerate.
1631 Fix PR gdb/344.
1632
1633 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
1634
1635 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1636 R_CRIS_32_PCREL>: Fix typo in name.
1637 (cris_elf_check_relocs): Always create .rela.got here when
1638 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1639 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1640 assume it's created.
1641
1642 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
1643
1644 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1645 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1646 define.
1647 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1648 * bfd.c (bfd_link_hash_table_free): Define.
1649 * binary.c (binary_bfd_link_hash_table_free): Define.
1650 * bout.c (b_out_bfd_link_hash_table_free): Define.
1651 * coff-rs6000.c (rs6000coff_vec): Include
1652 _bfd_generic_link_hash_table_free.
1653 (pmac_xcoff_vec): Likewise.
1654 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1655 (aix5coff64_vec): Likewise.
1656 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1657 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1658 (bfd_elf32_bfd_link_hash_table_free): Define.
1659 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1660 (bfd_elf32_bfd_link_hash_table_free): Define.
1661 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1662 define.
1663 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1664 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1665 * ieee.c (ieee_bfd_link_hash_table_free): Define.
1666 * ihex.c (ihex_bfd_link_hash_table_free): Define.
1667 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1668 (_bfd_generic_link_hash_table_free): Add prototype.
1669 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1670 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1671 * linker.c (_bfd_generic_link_hash_table_free): New function.
1672 * mmo.c (mmo_bfd_link_hash_table_free): Define.
1673 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1674 * oasys.c (oasys_bfd_link_hash_table_free): Define.
1675 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1676 * som.c (som_bfd_link_hash_table_free): Define.
1677 * srec.c (srec_bfd_link_hash_table_free): Define.
1678 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1679 * versados.c (versados_bfd_link_hash_table_free): Define.
1680 * vms.c (vms_bfd_link_hash_table_free): New function.
1681 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1682
1683 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1684 instead of bfd_alloc.
1685 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1686 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1687 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1688 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1689 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1690 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1691 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1692 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1693 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1694 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1695 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1696 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1697 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1698 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1699 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1700 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1701 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1702 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1703 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1704 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1705 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1706 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1707 * m68klinux.c (linux_link_hash_table_create): Likewise.
1708 * sparclinux.c (linux_link_hash_table_create): Likewise.
1709 * sunos.c (sunos_link_hash_table_create): Likewise.
1710 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1711
1712 * targets.c: Add _bfd_link_hash_table_free to xvec.
1713
1714 * bfd-in2.h: Regenerate.
1715 * libbfd.h: Regenerate.
1716 * libcoff.h: Regenerate.
1717
1718 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1719
1720 * dep-in.sed: Cope with absolute paths.
1721 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1722 Run "make dep-am".
1723 * Makefile.in: Regenerate.
1724 * coff-arm.c: Fix copyright date.
1725 * cpu-h8300.c: Likewise.
1726 * cpu-i370.c: Likewise.
1727 * cpu-s390.c: Likewise.
1728 * cpu-mips.c: Likewise.
1729 * po/SRC-POTFILES.in: Regenerate.
1730
1731 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1732
1733 * Makefile.am: Add elfxx-mips.c to the known backends.
1734 (elf32-mips.lo): remove dependency to coff/external.h.
1735 * Makefile.in: Regenerate.
1736 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1737 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1738 accordingly.
1739 * configure: Regenerate.
1740 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1741 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1742 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1743 MIPS specific backend functions.
1744 * elf32-mips.c: Moved most code to elfxx-mips.c.
1745 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1746 static.
1747 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1748 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1749 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1750 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1751 interface to allow selection of the right REL or RELA howto table.
1752 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1753 static. Let it refuse n32 objects.
1754 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1755 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1756 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1757 (elf32_mips_ignore_discarded_relocs): Rename from
1758 _bfd_elf32_mips_ignore_discarded_relocs.
1759 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1760 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1761 (elf_mips_howto_table_rela): Remove.
1762 * elf64-mips.c: Moved most code to elfxx-mips.c.
1763 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1764 (mips_elf64_rtype_to_howto): New function.
1765 (mips_elf64_object_p): Likewise.
1766 (elf64_mips_irix_compat): Likewise.
1767 * elfxx-mips.c: New file containing common code merged together from
1768 elf32-mips.c and elf64-mips.c.
1769 * elfxx-mips.h: New file containing MIPS specific prototypes from
1770 elf-bfd.h.
1771 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1772 elf_backend_mips_rtype_to_howto.
1773
1774 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1775
1776 * srec.c (MAXCHUNK, Chunk): Revise comments.
1777 (srec_write_record): Correct buffer size.
1778 (srec_write_header): Do without intermediate buffer.
1779 (srec_write_section): Validate Chunk.
1780 (srec_write_terminator): Pass NULL instead of dummy buffer.
1781 (srec_write_symbols): Pass file and symbol names directly to
1782 bfd_bwrite so sprintf won't overflow buffer.
1783
1784 2002-04-03 Jakub Jelinek <jakub@redhat.com>
1785
1786 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1787 PC relative relocs against hidden symbols.
1788 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1789
1790 2002-04-03 Alan Modra <amodra@bigpond.net.au>
1791
1792 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1793 LMAs, loop over segments until p_vaddr and p_memsz specify an
1794 extent enclosing the section.
1795
1796 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1797
1798 * ihex.c (ihex_write_object_contents): Do not allow records to
1799 cross a 64K boundary - wrap if necessary.
1800
1801 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1802
1803 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1804 which caused the returned LWP ID to always be 0.
1805
1806 2002-04-01 Richard Henderson <rth@redhat.com>
1807
1808 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1809 (elf32_sparc_relocate_section): Use it to figure out when to
1810 initialize .got entries.
1811 * elf64-sparc.c: Similarly.
1812
1813 2002-03-28 Alan Modra <amodra@bigpond.net.au>
1814
1815 * linker.c (link_action): Ignore duplicate warning syms.
1816 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1817 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1818 (elf_adjust_dynamic_symbol): Likewise.
1819 (elf_export_symbol): Likewise.
1820 (elf_link_find_version_dependencies): Likewise.
1821 (elf_link_assign_sym_version): Likewise.
1822 (elf_link_sec_merge_syms): Likewise.
1823 (elf_link_output_extsym): Likewise.
1824 (elf_gc_sweep_symbol): Likewise.
1825 (elf_gc_propagate_vtable_entries_used): Likewise.
1826 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1827 (elf_gc_allocate_got_offsets): Likewise.
1828 (elf_collect_hash_codes): Likewise.
1829 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1830 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1831 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1832 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1833 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1834 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1835 (elf_cris_discard_excess_dso_dynamics): Likewise.
1836 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1837 (mark_PIC_calls): Likewise.
1838 (allocate_plt_static): Likewise.
1839 (allocate_dynrelocs): Likewise.
1840 (readonly_dynrelocs): Likewise.
1841 * elf32-i386.c (allocate_dynrelocs): Likewise.
1842 (readonly_dynrelocs): Likewise.
1843 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1844 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1845 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1846 (mips_elf_sort_hash_table_f): Likewise.
1847 (mips_elf_check_mips16_stubs): Likewise.
1848 * elf32-s390.c (allocate_dynrelocs): Likewise.
1849 (readonly_dynrelocs): Likewise.
1850 * elf32-sh.c (sh_elf_discard_copies): Likewise.
1851 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1852 (xstormy16_relax_plt_realloc): Likewise.
1853 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1854 (elf64_alpha_output_extsym): Likewise.
1855 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1856 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1857 (mips_elf64_check_mips16_stubs): Likewise.
1858 (mips_elf64_output_extsym): Likewise.
1859 * elf64-ppc.c (func_desc_adjust): Likewise.
1860 (allocate_dynrelocs): Likewise.
1861 (readonly_dynrelocs): Likewise.
1862 * elf64-s390.c (allocate_dynrelocs): Likewise.
1863 (readonly_dynrelocs): Likewise.
1864 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1865 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1866 (readonly_dynrelocs): Likewise.
1867 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1868 * aoutx.h (aout_link_write_other_symbol): Likewise.
1869 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1870 (_bfd_coff_write_global_sym): Likewise.
1871 * i386linux.c (linux_tally_symbols): Likewise.
1872 * m68klinux.c (linux_tally_symbols): Likewise.
1873 * sparclinux.c (linux_tally_symbols): Likewise.
1874 * pdp11.c (aout_link_write_other_symbol): Likewise.
1875 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1876 * xcofflink.c (xcoff_build_ldsyms): Likewise.
1877 (xcoff_write_global_symbol): Likewise.
1878
1879 * cofflink.c (_bfd_coff_final_link): Formatting.
1880 * cpu-mips.c (mips_compatible): Make static, prototype.
1881 * elf32-i386.c (elf_i386_check_relocs): Formatting.
1882 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1883 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1884 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1885 (mips_elf64_final_link): Likewise.
1886 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1887 prototype.
1888
1889 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
1890
1891 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1892 (SWAP_OUT_RELOC_OFFSET): Define.
1893
1894 2002-03-27 Gregory Steuck <greg@nest.cx>
1895
1896 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1897 terminating NULL if empty symbol table.
1898 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1899
1900 2002-03-26 H.J. Lu (hjl@gnu.org)
1901
1902 * elflink.h (elf_link_input_bfd): Revert the last change since
1903 the gcc exception handling isn't fixed yet.
1904
1905 2002-03-26 H.J. Lu (hjl@gnu.org)
1906
1907 * elflink.h (elf_link_input_bfd): Complain about relocations
1908 against local symbols in discarded sections.
1909
1910 2002-03-26 Alan Modra <amodra@bigpond.net.au>
1911
1912 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
1913
1914 2002-03-23 Alan Modra <amodra@bigpond.net.au>
1915
1916 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1917 section file offset for !SEC_LOAD sections.
1918
1919 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
1920
1921 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
1922 <case R_ARM_GOT>): Handle relocations to Thumb functions.
1923
1924 2002-03-21 Alan Modra <amodra@bigpond.net.au>
1925
1926 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
1927 Whitespace changes.
1928 * archive.c: Update copyright date.
1929 * bfd-in2.h: Regenerate.
1930 * libbfd.h: Regenerate.
1931 * Makefile.am: Run "make dep-am"
1932 * Makefile.in: Regenerate.
1933 * po/SRC-POTFILES.in: Regenerate.
1934
1935 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
1936
1937 * dwarf2.c (struct funcinfo): Move up.
1938 (lookup_address_in_function_table): New argument function_ptr.
1939 Set it.
1940 (lookup_address_in_line_table): New argument function. If function
1941 is non-NULL, use it to handle ``addr'' before the first line note of
1942 the function.
1943 (comp_unit_find_nearest_line): Update and swap calls to
1944 lookup_address_in_function_table and lookup_address_in_line_table.
1945 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
1946 N_SLINE encountered if we see an N_FUN before any N_SLINE.
1947
1948 2002-03-20 Tom Rix <trix@redhat.com>
1949
1950 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
1951 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
1952 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
1953
1954 2002-03-19 Tom Rix <trix@redhat.com>
1955
1956 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
1957 dynamic objects in archives.
1958
1959 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
1960
1961 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
1962 STT_NOTYPE symbols to STT_OBJECT.
1963
1964 2002-03-18 Jan Hubicka <jh@suse.cz>
1965
1966 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
1967
1968 2002-03-18 Tom Rix <trix@redhat.com>
1969
1970 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
1971 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
1972 * coff-rs6000 (do_pad) : New function for archive padding.
1973 (do_copy) : New function for object file copying in archives.
1974 (do_shared_object_padding) : New function for padding shared
1975 objects to their text section alignment in archives.
1976 (bfd_xcoff_ar_achive_set_magic) : Stub.
1977 (xcoff_write_armap_big) : Use do_copy and do_pad.
1978 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
1979 do_copy and do_pad.
1980 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
1981 bfd_xcoff_magic_number.
1982 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
1983 fop.
1984 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
1985 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
1986 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
1987 * rs6000-core.c : Update copyright date.
1988 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
1989 csectpp.
1990 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
1991 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
1992 (coff_set_flags) : Use bfd_xcoff_magic_number.
1993 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
1994 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
1995 * Makefile.am : Same.
1996 * config.bfd : Same.
1997 * targets.c : Same.
1998 * configure : Regnerate.
1999 * Makefile.in : Same.
2000 * bfd-in2.h : Same.
2001
2002 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
2003
2004 * po/fr.po: Updated version.
2005
2006 2002-03-18 Alan Modra <amodra@bigpond.net.au>
2007
2008 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2009 * libbfd.h: Regenerate.
2010 * archive.c (coff_write_armap): Pass on failures from
2011 bfd_write_bigendian_4byte_int.
2012
2013 2002-03-14 H.J. Lu <hjl@gnu.org>
2014
2015 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2016 error to bfd_error_nonrepresentable_section for reinit_array
2017 section in DSO.
2018
2019 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2020
2021 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2022 OR it in rather than replacing previously selected flags.
2023
2024 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2025 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2026
2027 2002-03-14 Alan Modra <amodra@bigpond.net.au>
2028
2029 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
2030 (N): Use the above.
2031 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
2032 ensure reloc size matches before calling elf_link_input_bfd.
2033 Add an assert to check reloc size when counting output relocs.
2034
2035 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2036
2037 * mmo.c (mmo_get_loc): Return NULL rather than false.
2038
2039 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
2040
2041 * po/fr.po: Updated version.
2042
2043 2002-03-13 Alan Modra <amodra@bigpond.net.au>
2044
2045 * archures.c (bfd_default_compatible): Test bits_per_word.
2046 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
2047 bfd_default_compatible.
2048 * cpu-i370.c (i370_compatible): Likewise.
2049 * cpu-sparc.c (sparc_compatible): Likewise.
2050 * cpu-h8300.c (compatible): Test in->arch == out->arch.
2051
2052 * elflink.h: Formatting fixes.
2053 (elf_link_output_extsym): Merge undefined and undef weak cases.
2054
2055 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2056 when word size of input matches output word size.
2057
2058 2002-03-12 Andreas Jaeger <aj@suse.de>
2059
2060 * cpu-i386.c (i386_compatible): New. Use it instead of
2061 bfd_default_compatible.
2062
2063 2002-03-07 H.J. Lu (hjl@gnu.org)
2064
2065 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2066 as the type for bfd_reloc_val.
2067
2068 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
2069
2070 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2071 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2072 (elf_hppa_final_link_relocate): Correct relocations for indirect
2073 references to local data through the DLT. Fix .opd creation for
2074 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2075 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
2076 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2077 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2078 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2079 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2080 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2081
2082 2002-03-05 Jakub Jelinek <jakub@redhat.com>
2083
2084 * merge.c (_bfd_merge_sections): Don't segfault if there
2085 is nothing to merge due to GC.
2086
2087 2002-03-05 Alan Modra <amodra@bigpond.net.au>
2088
2089 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2090 symbols that have been forced local.
2091
2092 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2093 to output forced local syms for non-shared link.
2094 (elf_link_output_extsym): Tweak condition for calling backend
2095 adjust_dynamic_symbol so that previous behaviour is kept.
2096 Whitespace changes throughout file.
2097
2098 2002-03-04 H.J. Lu <hjl@gnu.org>
2099
2100 * elf.c (bfd_section_from_shdr): Handle special sections,
2101 .init_array, .fini_array and .preinit_array.
2102 (elf_fake_sections): Likewise.
2103
2104 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2105 DT entry only if the section is in output for .init_array,
2106 .fini_array and .preinit_array. Complain about .preinit_array
2107 section in DSO.
2108 (elf_bfd_final_link): Warn zero size for .init_array,
2109 .fini_array and .preinit_array sections.
2110
2111 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2112 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2113 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2114 .preinit_array.
2115
2116 2002-03-04 Alan Modra <amodra@bigpond.net.au>
2117
2118 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2119 * configure: Regenerate.
2120
2121 2002-03-02 Tom Rix <trix@redhat.com>
2122
2123 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2124 symbolic equiv.
2125 * coff-rs6000.c (xcoff_howto_table): Same.
2126
2127 2002-03-01 David Mosberger <davidm@hpl.hp.com>
2128
2129 * elflink.h (size_dynamic_sections): If section named
2130 ".preinit_array" exists, create DT_PREINIT_ARRAY and
2131 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
2132 ".init_array" and ".fini_array".
2133 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2134 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2135 DT_FINI_ARRAY.
2136
2137 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
2138
2139 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2140 dynsyms.
2141
2142 2002-02-25 Alan Modra <amodra@bigpond.net.au>
2143
2144 * elf64-hppa.h: Update copyright date.
2145
2146 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2147 (ppc64_elf_relocate_section): Don't generate power4 style branch
2148 hints for *_BRTAKEN and *_BRNTAKEN relocs.
2149
2150 2002-02-22 Jakub Jelinek <jakub@redhat.com>
2151
2152 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2153 last patch.
2154 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2155
2156 2002-02-21 Andreas Jaeger <aj@suse.de>
2157
2158 * elf64-x86-64.c: Major rework that introduces all recent changes
2159 to the x86-64 backend. Get a closer match to elf32-i386.
2160 (struct elf64_x86_64_dyn_relocs): Rename from
2161 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
2162 all users.
2163 (struct elf64_x86_64_link_hash_table): Add short cuts to some
2164 sections.
2165 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2166 remove casts, initialize new hash members.
2167 (create_got_section): New.
2168 (elf64_x86_64_create_dynamic_sections): New.
2169 (elf64_x86_64_copy_indirect_symbol): New.
2170 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
2171 relocs, .got or .relgot here but do it in allocate_dynrelocs.
2172 Reference count possible .plt and .got entries. Don't test input
2173 section SEC_READONLY here to try to avoid copy relocs, and keep
2174 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
2175 DF_TEXTREL here. Delay setting of variables until needed. Cache
2176 pointer to "sreloc" section in elf_section_data. Tweak condition
2177 under which .got created. Report files with bad relocation
2178 section names.
2179 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2180 Reference count possible .plt entries. Don't deallocate .got and
2181 .relgot space here.
2182 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
2183 do copy reloc processing for weakdefs. Remove redundant casts and
2184 aborts. Delay setting of vars until needed. Move creation of
2185 dynamic symbols and allocation of .plt and .rela.plt to
2186 allocate_dynrelocs. Replace BFD_ASSERT with abort.
2187 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2188 (allocate_dynrelocs): New.
2189 (readonly_dynrelocs): New.
2190 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
2191 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
2192 Zero out the dynamic allocated content space.
2193 (elf64_x86_64_discard_copies): Removed.
2194 (elf64_x86_64_relocate_section): Make use of dynamic section
2195 short-cuts. Localise vars, and delay setting. Better error
2196 reporting, replace BFD_ASSERT with abort. Check
2197 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
2198 regular object file and tread the weak definition as the normal
2199 one. Don't discard relocs for undefweak or undefined symbols and
2200 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
2201 relocs.
2202 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
2203 symbols that have been forced local. Use same test to decide if
2204 we can use a relative reloc for got as relocate_section. Expand
2205 SHN_UNDEF comment. Move expressions out of function calls.
2206 Replace BFD_ASSERT with abort.
2207 (bfd_elf64_bfd_final_link): Removed.
2208 (elf_backend_copy_indirect_symbol): Define.
2209
2210 2002-02-20 Tom Rix <trix@redhat.com>
2211
2212 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
2213 (_bfd_xcoff_reloc_type_lookup): Use it.
2214 * coff64-rs6000.c (xcoff64_howto_table): Same.
2215 (xcoff64_reloc_type_lookup): Same.
2216
2217 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
2218
2219 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
2220 little endian.
2221
2222 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
2223
2224 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
2225 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
2226 * bfd-in2.h: Regenerate.
2227 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
2228 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
2229 with "s390:64-bit".
2230 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
2231 (elf_s390_reloc_type_lookup): Likewise.
2232 (elf_s390_check_relocs): Likewise.
2233 (elf_s390_gc_sweep_hook): Likewise.
2234 (elf_s390_relocate_section): Likewise.
2235 (elf_s390_object_p): Use renamed architecture define.
2236 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2237
2238 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
2239
2240 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
2241
2242 2002-02-19 Jakub Jelinek <jakub@redhat.com>
2243
2244 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
2245 absptr -> pcrel optimization for shared libs.
2246 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
2247 library cannot be converted to pcrel.
2248 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
2249 relative.
2250 * elf32-i386.c (elf_i386_relocate_section): If
2251 _bfd_elf_section_offset returned -2, skip, but make sure the
2252 relocation is installed.
2253 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
2254 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2255 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2256 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2257 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2258 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2259 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2260 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2261 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2262 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2263 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2264 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2265 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2266 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2267 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
2268 _bfd_elf_section_offset returning -2 the same way as -1.
2269 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2270 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
2271 and BFD_ASSERT.
2272 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2273
2274 2002-02-18 Tom Rix <trix@redhat.com>
2275
2276 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
2277 (bfd_xcoff_size_dynamic_sections): Same.
2278 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
2279 (bfd_xcoff_size_dynamic_sections): Same.
2280 * coff-rs6000.c (xcoff_generate_rtinit): Same.
2281 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
2282 * libxcoff.h (struct xcoff_backend_data_rec): Same.
2283 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
2284 * bfd-in2.h: Regenerate.
2285
2286 2002-02-18 Alan Modra <amodra@bigpond.net.au>
2287
2288 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
2289 (struct ppc_link_hash_table): Add sfpr.
2290 (ppc64_elf_link_hash_table_create): Init it.
2291 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
2292 .glink out to..
2293 (create_linkage_sections): ..here. Make .sfpr too.
2294 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
2295 dynobj early.
2296 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
2297 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
2298 ._restf* functions, and create as needed.
2299 (func_desc_adjust): Only force_local for shared libs.
2300
2301 2002-02-18 David O'Brien <obrien@FreeBSD.org>
2302
2303 * configure.in: Bump version number post 2.12 branching.
2304 * configure: Regenerate.
2305
2306 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
2307
2308 * mmo.c: Correct and improve comments.
2309 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
2310 zero-pad. Use input to fill up non-empty bfd buffer.
2311 (mmo_flush_chunk): New function.
2312 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
2313 changed. Don't emit location specifier if VMA is same as
2314 *LAST_VMAP after omitting leading zero contents. Call
2315 mmo_flush_chunk before emitting location specifier.
2316 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
2317 with mmo_write_loc_chunk calls.
2318 (mmo_internal_write_section): Call mmo_flush_chunk after
2319 mmo_write_chunk.
2320 (mmo_write_symbols_and_terminator): Move :Main to first position
2321 in symbol array. Add faked one if it does not exist if there are
2322 other symbols. Don't add it if there are no symbols at all. Move
2323 out test for value of :Main from symbol loop. Rename table
2324 fakemain to maintable and variable mainsym to fakemain.
2325
2326 2002-02-15 Richard Henderson <rth@redhat.com>
2327
2328 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
2329 section with no got matches any got. Simplify error generaion.
2330
2331 2002-02-15 Alan Modra <amodra@bigpond.net.au>
2332
2333 Support arbitrary length fill patterns.
2334 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
2335 (_bfd_default_link_order): Remove bfd_fill_link_order code.
2336 Call default_data_link_order.
2337 (default_fill_link_order): Delete.
2338 (default_data_link_order): New function.
2339 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
2340 of bfd_fill_link_order with bfd_data_link_order.
2341 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
2342 * elf64-mips.c (mips_elf64_final_link): Likewise.
2343
2344 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
2345 Correct value returned in "end" for "0x<non-hex>".
2346
2347 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
2348
2349 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
2350 (scan): Test against 'mach' field in info structure.
2351
2352 2002-02-14 Alan Modra <amodra@bigpond.net.au>
2353
2354 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2355
2356 2002-02-14 Matt Fredette <fredette@netbsd.org>
2357
2358 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
2359 EF_M68000.
2360
2361 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
2362
2363 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
2364 non-zero physical addresses when adjusting the LMAs of new
2365 sections.
2366
2367 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2368
2369 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
2370 from _bfd_elf_hppa_gen_reloc_type.
2371 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2372 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2373 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2374 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2375
2376 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
2377
2378 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2379 loading its contents if there's nothing to do in it.
2380
2381 2002-02-12 Alan Modra <amodra@bigpond.net.au>
2382
2383 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2384 64k boundary.
2385
2386 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2387 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2388 (ppc64_elf_finish_dynamic_sections): Set values for them.
2389
2390 2002-02-11 Michael Snyder <msnyder@redhat.com>
2391
2392 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2393 * elf.c (elfcore_grok_pstatus): Add prototype.
2394 (elfcore_grok_lwpstatus): Add prototype.
2395 (elfcore_write_lwpstatus): New function.
2396 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2397
2398 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
2399
2400 * elf32-sh.c: Added missing prototypes.
2401 * elf32-sh64.c: Likewise.
2402 (sh_elf_align_loads): Mark unused args as such.
2403 * elf64-sh64.c: Added missing prototypes.
2404 (struct elf_sh64_link_hash_entry): Fix typo.
2405 (sh_elf64_relocate_section): Fix info argument passed to
2406 _bfd_elf_section_offset.
2407
2408 2002-02-11 Alan Modra <amodra@bigpond.net.au>
2409
2410 * Makefile.am: "make dep-am".
2411 * Makefile.in: Regenerate.
2412 * aclocal.m4: Regenerate.
2413 * config.in: Regenerate.
2414 * configure: Regenerate.
2415
2416 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
2417
2418 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2419 variable warnings.
2420 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2421 comparison warning.
2422 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2423 cast warnings for the common case.
2424
2425 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
2426
2427 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2428 vectors.
2429 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2430 vectors.
2431
2432 2002-02-09 Richard Henderson <rth@redhat.com>
2433
2434 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2435 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2436 (elf64_alpha_relocate_section): Likewise.
2437 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2438 * bfd-in2.h, libbfd.h: Rebuild.
2439
2440 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
2441
2442 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2443 that base-plus-offset reloc accounting is consistent.
2444 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2445 up to date for undefined symbols.
2446
2447 2002-02-08 Eric Christopher <echristo@redhat.com>
2448
2449 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2450
2451 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2452 sections for the O32 ABI.
2453
2454 2002-02-08 Chris Demetriou <cgd@broadcom.com>
2455
2456 * elf32-arm.h: Fix formatting of _("...").
2457 * elf32-d10v.c: Likewise.
2458 * elf32-m68k.c: Likewise.
2459 * elf32-mips.c: Likewise.
2460
2461 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
2462
2463 * coff-or32.c: Fix compile time warning messages.
2464
2465 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
2466
2467 Contribute sh64-elf.
2468 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
2469 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
2470 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
2471 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
2472 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
2473 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
2474 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
2475 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
2476 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
2477 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
2478 New relocs.
2479 * libbfd.h, bfd-in2.h: Rebuilt.
2480 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
2481 (sh_reloc_map): Map them.
2482 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2483 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
2484 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
2485 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2486 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
2487 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
2488 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
2489 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
2490 datalabel_got_offset.
2491 (sh_elf_link_hash_newfunc): Initialize it.
2492 (sh_elf_relocate_section): Augment the scope of
2493 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
2494 GOT and GOTOFF handling to new SHmedia relocation types. Support
2495 GOT_BIAS.
2496 (sh_elf_check_relocs): Likewise.
2497 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
2498 PLT entries using movi_shori_putval. Support GOT_BIAS.
2499 (sh_elf_finish_dynamic_sections): Likewise.
2500 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
2501 relocation, it's now done by the caller.
2502 (GOT_BIAS): New.
2503 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
2504 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
2505 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
2506 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
2507 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
2508 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
2509 sh64_elf64_hash_table): New.
2510 (sh_elf64_howto_table): Introduce new relocs.
2511 (sh_elf64_info_to_howto): Accept new PIC relocs.
2512 (sh_elf64_relocate_section): Augment the scope of
2513 seen_stt_datalabel. Support new PIC relocs.
2514 (sh_elf64_check_relocs): Support new PIC relocs.
2515 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
2516 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
2517 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
2518 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
2519 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
2520 movi_shori_putval, movi_3shori_putval,
2521 sh64_elf64_create_dynamic_sections,
2522 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
2523 sh64_elf64_size_dynamic_sections,
2524 sh64_elf64_finish_dynamic_symbol,
2525 sh64_elf64_finish_dynamic_sections): New.
2526 (elf_backend_create_dynamic-sections,
2527 bfd_elf64_bfd_link_hash_table_create,
2528 elf_backend_adjust_dynamic_symbol,
2529 elf_backend_size_dynamic_sections,
2530 elf_backend_finish_dynamic_symbol,
2531 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2532 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2533 elf_backend_got_header_size, elf_backend_plt_header_size):
2534 Define.
2535 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2536 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2537 match official numbers and names; moved unmaching ones to the
2538 range 0xf2-0xff.
2539 * elf32-sh64.c, elf64-sh64.c: Likewise.
2540 2001-03-12 DJ Delorie <dj@redhat.com>
2541 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2542 sections.
2543 2001-03-12 DJ Delorie <dj@redhat.com>
2544 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2545 be aligned.
2546 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2547 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
2548 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2549 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2550 .cranges section with SEC_SORT_ENTRIES set.
2551 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2552 incoming sorted .cranges section.
2553 (sh64_bfd_elf_copy_private_section_data): New.
2554 (sh64_elf_final_write_processing): Only sort .cranges and modify
2555 start address if called by linker.
2556 2001-01-08 Ben Elliston <bje@redhat.com>
2557 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2558 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
2559 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2560 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2561 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2562 line. Add comments before all entries.
2563 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2564 comment.
2565 (sh_elf64_reloc): Correct head comment.
2566 (sh_elf64_relocate_section): Correct spacing.
2567 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2568 instead call reloc_dangerous callback.
2569 <case R_SH_SHMEDIA_CODE>: New case.
2570 (sh_elf64_gc_mark_hook): Correct spacing.
2571 (sh_elf64_check_relocs): Ditto.
2572 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2573 New case.
2574 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2575 functions.
2576 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2577 clarify describing comment. Add comments before all entries.
2578 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2579 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2580 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2581 Sort .cranges section in final link. Prepare to set bit 0 on
2582 entry address.
2583 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2584 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2585 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2586 .cranges section.
2587 (sh64_backend_section_from_shdr): New, to recognize
2588 SHT_SH5_CR_SORTED on incoming .cranges section.
2589 (elf_backend_section_from_shdr): Define.
2590 (sh64_elf_final_write_processing): Sort outgoing .cranges
2591 section. (New, temporarily disabled:) Set bit 0 on entry address
2592 according to ISA type.
2593 (sh64_find_section_for_address): New.
2594 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2595 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2596 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
2597 bfd_malloc, not xmalloc.
2598 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
2599 global.
2600 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2601 temporarily disabled) setting bit 0 on entry address.
2602 (elf_backend_final_write_processing): Define.
2603 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
2604 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2605 be a proper relocation for PTA and PTB rather than a marker.
2606 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2607 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2608 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2609 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2610 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2611 Zero src_mask.
2612 * elf64-sh64.c: Ditto.
2613 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2614 * elf32-sh64.c: Include opcodes/sh64-opc.h
2615 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2616 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
2617 parameters. No unused parameters. Caller changed.
2618 <case R_SH_PT_16>: New case.
2619 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2620 * Makefile.in: Regenerate.
2621 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
2622 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2623 all code sections.
2624 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2625 (sh64_elf_merge_private_data): Ditto.
2626 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2627 to access stored section flags.
2628 (sh64_elf_final_write_processing): Return immediately unless
2629 called by linker. Use sh64_elf_section_data (cranges) to get size
2630 of linker-generated cranges entries.
2631 (sh64_elf_copy_private_data): Add missing "return true".
2632 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2633 (sh_elf64_merge_private_data): Ditto.
2634 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
2635 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2636 elf64-sh64.c:sh64_elf_fake_sections.
2637 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2638 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
2639 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2640 (sh64_elf_final_write_processing): New.
2641 (elf_backend_final_write_processing): Define.
2642 (sh64_elf_fake_sections): Get header flags from tdata field.
2643 (sh64_elf_copy_private_data): Do not call
2644 sh64_elf_copy_private_data_internal, just copy e_flags field.
2645 (sh64_elf_merge_private_data): Do not call
2646 sh64_elf_copy_private_data_internal.
2647 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
2648 Remove EF_SH64_ABI64, let ELF size make difference.
2649 Remove SH64-specific BFD section flag.
2650 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2651 containing SHmedia through elf_section_data (asect)->tdata
2652 non-zero, not using a BFD section flag.
2653 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2654 (sh64_elf_merge_private_data): Similar.
2655 (elf_backend_section_flags): Don't define.
2656 (sh64_elf_backend_section_flags): Delete.
2657 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2658 not EF_SH64_ABI64.
2659 (sh_elf64_merge_private_data): Similar.
2660 * section.c (Section flags definitions): Don't define
2661 SEC_SH_ISA_SHMEDIA.
2662 (bfd-in2.h): Regenerate.
2663 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
2664 Make DataLabel references work with partial linking.
2665 * elf32-sh64.c: Fix formatting.
2666 (sh64_elf_link_output_symbol_hook): New.
2667 (elf_backend_link_output_symbol_hook): Define to
2668 sh64_elf_link_output_symbol_hook.
2669 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2670 undefined if partial linking. Adjust sanity check.
2671 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2672 (elf_backend_link_output_symbol_hook): Define to
2673 sh64_elf64_link_output_symbol_hook.
2674 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2675 undefined if partial linking. Adjust sanity check.
2676 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
2677 Implement semantics for inter-file DataLabel references.
2678 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2679 (sh64_elf64_add_symbol_hook): New.
2680 (sh_elf64_relocate_section): If passing an indirect symbol with
2681 st_type STT_DATALABEL on the way to a symbol with st_other
2682 STO_SH5_ISA32, do not bitor 1 to the relocation.
2683 (elf_backend_add_symbol_hook): Define to
2684 sh64_elf64_add_symbol_hook.
2685 * elf64-sh32.c: Tweak comments.
2686 (DATALABEL_SUFFIX): Define.
2687 (sh64_elf_add_symbol_hook): New.
2688 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2689 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2690 symbol with st_type STT_DATALABEL on the way to a symbol with
2691 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2692 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
2693 Pass through STT_DATALABEL.
2694 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2695 (elf_backend_get_symbol_type): Define.
2696 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2697 (elf_backend_get_symbol_type): Define.
2698 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
2699 * elf32-sh64.c: Tweak comments.
2700 (sh64_elf_copy_private_data_internal): Add prototype.
2701 (bfd_elf32_bfd_set_private_flags): Define.
2702 (sh64_elf_copy_private_data_internal): Compare machine name, not
2703 textual BFD target name, to check whether to copy section flag
2704 SHF_SH5_ISA32.
2705 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2706 Tweak section-contents-type-mismatch message.
2707 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2708 Validize reloc-types.
2709 * elf64-sh64.c: New file.
2710 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2711 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2712 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2713 Regenerate dependencies.
2714 * Makefile.in: Regenerate.
2715 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2716 bfd_elf64_sh64l_vec.
2717 * configure.in: Handle bfd_elf64_sh64_vec and
2718 bfd_elf64_sh64l_vec.
2719 * configure: Regenerate.
2720 * po/POTFILES.in: Regenerate.
2721 * po/bfd.pot: Regenerate.
2722 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
2723 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2724 anything else but EF_SH64 and EF_SH64_ABI64.
2725 (sh64_elf_merge_private_data): Emit error for anything else but
2726 EF_SH64 and EF_SH64_ABI64.
2727 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2728 from targ_selvecs.
2729 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2730 bfd_elf32_sh64l_vec as a temporary measure.
2731 * configure: Regenerate.
2732 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2733 * cpu-sh.c (arch_info_struct): Include sh5 item
2734 unconditionalized.
2735 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2736 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2737 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2738 * elf32-sh64.c: Tweak comments.
2739 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2740 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2741 (sh64_elf_copy_private_data_internal): Wrap long line.
2742 (sh64_elf_merge_private_data): Rewrite to allow objects from
2743 SH64 subsets to be linked together.
2744 (INCLUDE_SHMEDIA): Define.
2745 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2746 Parenthesize plus-expression inside or-expression.
2747 <global symbol>: Ditto.
2748 (sh_elf_set_mach_from_flags): Remove code refusing
2749 deleted EF_SH64_32BIT_ABI flag.
2750 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2751 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2752 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2753 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2754 (sh_elf_relocate_section) <local symbol>: Or 1 in
2755 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2756 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2757 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2758 relocation.
2759 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2760 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2761 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2762 Regenerate dependencies.
2763 * Makefile.in: Regenerate.
2764 * archures.c: Add bfd_mach_sh5.
2765 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2766 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2767 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2768 * configure: Regenerate.
2769 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2770 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2771 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2772 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2773 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2774 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2775 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2776 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2777 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2778 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2779 in item for SH5.
2780 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2781 for SHmedia relocs.
2782 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2783 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2784 shmedia_prepare_reloc, goto final_link_relocate if it returns
2785 non-zero, else fail as before.
2786 (sh_elf_set_mach_from_flags): Provide function only if not defined
2787 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2788 (sh_elf_set_private_flags): Provide function only if not defined
2789 as a macro.
2790 (sh_elf_copy_private_data): Similar.
2791 (sh_elf_merge_private_data): Similar.
2792 * section.c (SEC_SH_ISA_SHMEDIA): New.
2793 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2794 * elf32-sh64.c: New file.
2795 * libbfd.h: Regenerate.
2796 * bfd-in2.h: Regenerate.
2797 * po/POTFILES.in: Regenerate.
2798 * po/bfd.pot: Regenerate.
2799 * bfd-in2.h: Regenerate.
2800 * libbfd.h: Regenerate.
2801
2802 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
2803
2804 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2805 been included, not drag it in.
2806 * bfd-in2.h: Regenerate.
2807
2808 2002-02-06 H.J. Lu (hjl@gnu.org)
2809
2810 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2811 the mach and ISA fields if necessary.
2812
2813 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2814
2815 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2816 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2817 be sure exactly which architecture this represents.
2818
2819 2002-02-05 Nick Clifton <nickc@redhat.com>
2820
2821 * po/tr.po: Updated translation.
2822
2823 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2824
2825 From Jimi X <jimix@watson.ibm.com>
2826 * archures (bfd_mach_ppc64): Define.
2827 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2828 (bfd_powerpc_arch): Define.
2829 * bfd-in2.h: Regenerate.
2830 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2831 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2832 (bfd_powerpc_archs): Add default powerpc64 arch.
2833
2834 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2835
2836 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2837 against section syms in readonly sections. Don't do the global
2838 sym check if we find one.
2839 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2840 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2841 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2842 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2843 (elf_s390_grok_prstatus): Add missing prototype.
2844
2845 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
2846
2847 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2848 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2849 Call bfd_get_section_by_name only once. Initialize
2850 bpodata->n_bpo_relocs_this_section.
2851 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2852 referring to DSOs.
2853 (bpo_reloc_request_sort_fn): Don't use difference of values as
2854 return-value.
2855
2856 2002-02-02 David O'Brien <obrien@FreeBSD>
2857
2858 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
2859 version 4.5 and later the same as 5-CURRENT.
2860 * configure: Re-generate.
2861
2862 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
2863
2864 * config.bfd (hppa*-*-netbsd*): New target.
2865
2866 2002-01-31 Philipp Thomas <pthomas@suse.de>
2867
2868 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2869 to front of message. Unify messages with elf32-arm.h. Use
2870 commas where neccessary.
2871 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2872 ERROR in messages. Unify messages with coff-arm.c. Correct
2873 VFP/FPA error message.
2874 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2875 APCS-32 for translation.
2876
2877 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
2878
2879 Perform on-demand global register allocation from
2880 R_MMIX_BASE_PLUS_OFFSET relocs.
2881 * elf64-mmix.c (struct bpo_reloc_section_info, struct
2882 bpo_reloc_request, struct bpo_greg_section_info): New.
2883 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2884 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2885 _bfd_mmix_check_all_relocs,
2886 _bfd_mmix_prepare_linker_allocated_gregs,
2887 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2888 (elf_mmix_howto_table): Correct src_mask for most relocs.
2889 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2890 case.
2891 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2892 case. Fix typo in comment. New label do_mmix_reloc.
2893 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2894 store first object file with a base-plus-offset reloc. Call
2895 mmix_elf_check_common_relocs for the part common with mmo.
2896 (mmix_elf_final_link): Write out linker-allocated register
2897 contents section.
2898 (elf_backend_gc_sweep_hook): Define.
2899 (bfd_elf64_bfd_relax_section): Define.
2900
2901 * mmo.c: Don't include <ctype.h>
2902 (mmo_init): Correct init-once logic.
2903
2904 2002-02-01 Tom Rix <trix@redhat.com>
2905
2906 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2907
2908 2002-02-01 Alan Modra <amodra@bigpond.net.au>
2909
2910 * Makefile.am: Run "make dep-am"
2911 * Makefile.in: Regenerate.
2912
2913 2002-01-31 David O'Brien <obrien@FreeBSD>
2914
2915 * configure.in: Recognize the differences in core files from FreeBSD
2916 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
2917 5-CURRENT.
2918 * configure: Regenerate.
2919
2920 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
2921
2922 * coff-or32.c: New file.
2923 * cpu-or32.c: New file.
2924 * elf32-or32.c: New file.
2925 * archures.c: Add support for or32.
2926 * targets.c: Add support for or32.
2927 * bfd-in2.h: Regenerate.
2928 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
2929 coff_write_object_contents): Add support for or32.
2930 * config.bfd: Add target.
2931 * configure.in: Add support for or32.
2932 * configure: Regenerate.
2933 * Makefile.am: Add support for or32.
2934 * Makefile.in: Regenerate.
2935 * po/SRC-POTFILES.in: Add or32 files.
2936 * po/bfd.pot: Regenerate.
2937
2938 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
2939 Don Lindsay <lindsayd@cisco.com>
2940
2941 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
2942 false' with a return of a bfd_reloc_ error code.
2943
2944 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
2945
2946 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2947 unexport unreferenced symbols when --export-dynamic. Call
2948 _bfd_elf_strtab_delref when unexporting.
2949
2950 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
2951
2952 * bfd-in.h: Include <stdbool.h> if it is available.
2953 * bfd-in2.h: Regenerated.
2954
2955 2002-01-31 Alan Modra <amodra@bigpond.net.au>
2956
2957 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
2958 not go via the plt.
2959
2960 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2961
2962 * archures.c: Tidy up formatting of embedded comments.
2963 * bfd.c: Tidy up formatting of embedded comments.
2964 * bfd-in.h: Fix formatting of comments.
2965 * reloc.c: Tidy up formatting of ordinary & embedded comments.
2966 * section.c: Tidy up formatting of embedded comments.
2967 * syms.c: Tidy up formatting of embedded comments.
2968 * targets.c: Tidy up formatting of embedded comments.
2969
2970 * bfd-in2.h: Regenerate.
2971
2972 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2973
2974 * vms-tir.c (cmd_name): New function.
2975 (tir_cmd_name): New function.
2976 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
2977 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
2978 Fix formatting.
2979
2980 * peXXigen.c (pe_print_idata): Rearrange message to aid in
2981 translation.
2982 (pe_print_pdata): Rearrange message to aid in translation.
2983
2984 * libbfd.c (warn_deprecated): Rearrange error message to aid in
2985 translation.
2986
2987 * ihex.c (ihex_write_object_contents): Fix spelling typo.
2988
2989 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
2990
2991 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
2992 message to aid in translation.
2993
2994 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
2995 to aid in translation.
2996
2997 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2998
2999 2002-01-30 Philipp Thomas <pthomas@suse.de>
3000
3001 * coff-arm.c, elf32-elf.h: Unify messages.
3002
3003 2002-01-30 Nick Clifton <nickc@redhat.com>
3004
3005 * po/sv.po: Updated translation.
3006
3007 2002-01-30 Philipp Thomas <pthomas@suse.de>
3008
3009 * dwarf2.c (read_abbrev): Use full section name in error message.
3010 (decode_line_info): Likewise.
3011
3012 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3013 message.
3014
3015 2002-01-30 Alan Modra <amodra@bigpond.net.au>
3016
3017 * elf64-ppc.c (func_desc_adjust): Only provide missing function
3018 descriptor symbols for undefined function code syms. Clear
3019 ELF_LINK_NON_ELF so that they can stay weak.
3020
3021 2002-01-29 Chris Demetriou <cgd@broadcom.com>
3022 Mitch Lichtenberg <mpl@broadcom.com>
3023
3024 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3025 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3026 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3027 generation.
3028 * bfd-in2.h: Regenerate.
3029
3030 2002-01-29 Chris Demetriou <cgd@broadcom.com>
3031
3032 * elf32-mips.c: Add additional comments about HI16 relocation
3033 processing.
3034 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3035 pc-relative relocations. (Reverts change made on 2001-10-31.)
3036 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3037 for pc-relative relocations.
3038 (mips_elf_calculate_relocation): Add a comment about a kludge
3039 in the R_MIPS_GNU_REL_HI16 handling.
3040 (_bfd_mips_elf_relocate_section): Implement that kludge;
3041 adjust pc-relative HI16 relocation for difference in HI16 and
3042 LO16 addresses, since it can't easily be done in
3043 mips_elf_calculate_relocation.
3044
3045 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
3046
3047 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3048 relocations with PC32 relocations for undefined or weak symbols.
3049 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3050 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3051
3052 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
3053
3054 * elfcore.h (elf_core_file_p): Improve comment for last change.
3055
3056 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
3057
3058 * configure: Regenerated.
3059
3060 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
3061
3062 * elfcore.h (elf_core_file_p): Set the machine architecture
3063 before processing the program headers.
3064
3065 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
3066
3067 * configure.in <64-bit configuration>: If using gcc, check and
3068 emit error for egcs-1.1.2.
3069 * configure: Regenerate.
3070
3071 2002-01-26 Egor Duda <deo@logos-m.ru>
3072
3073 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3074 as possible to avoid stack corruption.
3075
3076 2002-01-26 Richard Henderson <rth@redhat.com>
3077
3078 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3079 for non-allocated sections.
3080
3081 2002-01-25 Mark Kettenis <kettenis@gnu.org>
3082
3083 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3084 prstat.pr_reg even if it is a struct.
3085
3086 2002-01-25 Steve Ellcey <sje@cup.hp.com>
3087
3088 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3089
3090 2002-01-25 Philipp Thomas <pthomas@suse.de>
3091
3092 * coffgen.c (coff_print_symbol): Don't mark info message
3093 for translation.
3094
3095 2002-01-25 Nick Clifton <nickc@redhat.com>
3096
3097 * po/fr.po: Updated translation.
3098 * po/es.po: Updated translation.
3099
3100 2002-01-25 Philipp Thomas <pthomas@suse.de>
3101
3102 * coff-alpha.c (alpha_relocate_section): Unify warning message
3103 for GP relative relocations without GP defined.
3104 * coff-mips.c (mips_relocate_section): Likewise.
3105
3106 2002-01-25 Alan Modra <amodra@bigpond.net.au>
3107
3108 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3109 unsigned overflow when new_offset < old_offset.
3110
3111 2002-01-24 Philipp Thomas <pthomas@suse.de>
3112
3113 * bfd.c (_bfd_abort): Fix typo.
3114
3115 2002-01-23 Richard Henderson <rth@redhat.com>
3116
3117 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3118 plt entries for undefweak symbols.
3119
3120 2002-01-23 Steve Ellcey <sje@cup.hp.com>
3121
3122 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3123 DEFAULT_VECTOR.
3124 (bfd_elf64_ia64_hpux_big_vec): Ditto.
3125 (bfd_elf32_h8300_vec): Ditto.
3126
3127 2002-01-23 Alan Modra <amodra@bigpond.net.au>
3128
3129 * elf64-ppc.c: Remove stale part of ABI comment.
3130 (NO_OPD_RELOCS): Define.
3131 (ppc64_elf_check_relocs): Use it.
3132 (ppc64_elf_relocate_section): Here too.
3133 (build_one_stub): Don't point function syms at the stub. Instead,
3134 hijack plt.offset.
3135 (ppc64_elf_relocate_section): Check whether REL24 relocs should
3136 really go to the stub. Make all dynamic relocs in opd against
3137 locals.
3138 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3139 plt.offset.
3140
3141 2002-01-22 Richard Henderson <rth@redhat.com>
3142
3143 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3144
3145 2002-01-22 Alan Modra <amodra@bigpond.net.au>
3146
3147 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3148 TOC_BASE_OFF adjustment.
3149
3150 * Makefile.am: Run "make dep-am".
3151 * Makefile.in: Regenerate.
3152 * po/SRC-POTFILES.in: Regenerate.
3153
3154 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
3155
3156 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3157 host defines.
3158
3159 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
3160
3161 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3162 Check for and emit error if sgot is NULL at this point.
3163
3164 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
3165
3166 * config.bfd (ia64*-*-netbsd*): New target.
3167
3168 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
3169
3170 * som.c (som_write_space_strings): Comment typo fix.
3171
3172 2002-01-21 Alan Modra <amodra@bigpond.net.au>
3173
3174 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
3175 is_func_descriptor fields.
3176 (link_hash_newfunc): Init them.
3177 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
3178 dot are candidates for plt entries. When processing .opd relocs,
3179 set function descriptor strings to point inside function code
3180 string, and set new ppc_link_hash_entry fields.
3181 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
3182 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
3183 function descriptors. It's now done in..
3184 (func_desc_adjust): New.
3185 (ppc64_elf_func_desc_adjust): New.
3186 (define elf_backend_always_size_sections): Define.
3187 (ppc64_elf_hide_symbol): New.
3188 (define elf_backend_hide_symbol): Define.
3189 (allocate_dynrelocs): Remove code looking up function descriptors
3190 as that has been done earlier.
3191 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
3192 table.
3193 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
3194 up function descriptor.
3195 (build_one_stub): Look up the function code sym. Check for
3196 invalid plt offsets.
3197 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
3198 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
3199
3200 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
3201 boolean param.
3202 (_bfd_elf_link_hash_hide_symbol): Likewise.
3203 * elflink.h (elf_link_add_object_symbols): Adjust call to
3204 elf_backend_hide_symbol.
3205 (elf_fix_symbol_flags): Likewise.
3206 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
3207 than bfd_alloc.
3208 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
3209 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
3210 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3211 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
3212 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
3213 and adjust to suit.
3214 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
3215 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
3216 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3217
3218 2002-01-18 Alan Modra <amodra@bigpond.net.au>
3219
3220 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
3221 dynamic function descriptor symbol, not the associated function
3222 symbol.
3223
3224 2002-01-17 Eric Christopher <echristo@redhat.com>
3225
3226 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
3227
3228 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
3229
3230 * po/bfd.pot: Regenerate.
3231 * po/fr.po: Regenerate.
3232
3233 2002-01-17 Alan Modra <amodra@bigpond.net.au>
3234
3235 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
3236 Remove "Elf_Internal_Shdr *" param.
3237 (_bfd_mips_elf_section_from_bfd_section): Ditto.
3238 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
3239 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
3240 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
3241 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
3242 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
3243 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
3244 function to override special sections. Remove hdr arg from
3245 backend call, and don't loop.
3246
3247 2002-01-16 Eric Christopher <echristo@redhat.com>
3248
3249 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
3250 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
3251 relocations requiring gp0 and gp.
3252
3253 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
3254
3255 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
3256 EF_ARM_VFP_FLOAT.
3257 (elf32_arm_print_private_bfd_data): Likewise.
3258
3259 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
3260
3261 * po/tr.po: Import new version.
3262
3263 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3264
3265 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
3266 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
3267 (ORI_R0_R0_0): Correct.
3268
3269 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3270
3271 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
3272 when plt_not_loaded.
3273 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
3274 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
3275 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
3276 (ppc64_elf_glink_code): Delete.
3277 (PPC64_ELF_GLINK_SIZE): Delete.
3278 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
3279 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
3280 ORI_R0_R0_0): Define.
3281 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
3282 (struct ppc_link_hash_table): Add sstub and plt_overflow.
3283 (ppc64_elf_link_hash_table_create): Init them.
3284 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
3285 Don't copy to shared lib.
3286 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
3287 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
3288 (allocate_dynrelocs <plt>): Don't change function sym here. Make
3289 room for .stub and .glink code.
3290 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
3291 DT_PPC64_GLINK.
3292 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
3293 bfd_elf64_bfd_final_link.
3294 (bfd_elf64_bfd_final_link): Don't define.
3295 (ppc64_elf_size_stubs): New.
3296 (build_plt_stub): New.
3297 (build_one_stub): New.
3298 (ppc64_elf_build_stubs): New.
3299 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
3300 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
3301 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
3302 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
3303 case output sections not separate. Adjust DT_RELASZ to not
3304 include plt relocs. Set reserved got entry. Set got and plt
3305 entry size.
3306 (elf_backend_got_header_size): Set to 8.
3307 * elf64-ppc.h: New file.
3308
3309 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3310
3311 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
3312 sections, use bfd_section_list_remove.
3313 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3314 * elflink.h (elf_link_add_object_symbols): When removing all
3315 sections, use bfd_section_list_clear.
3316
3317 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3318
3319 * po/sv.po: New file: Swedish translation.
3320 * configure.in (ALL_LINGUAS): Add sv.
3321 * configure: Regenerate.
3322
3323 2002-01-15 Jakub Jelinek <jakub@redhat.com>
3324
3325 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
3326 * elf.c (merge_sections_remove_hook): New function.
3327 (_bfd_elf_merge_sections): Pass it as 3rd argument to
3328 _bfd_merge_sections.
3329 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
3330 * libbfd.h: Rebuilt.
3331 * merge.c (_bfd_merge_sections): Add remove_hook argument.
3332 Call remove_hook if a SEC_EXCLUDE section is encountered.
3333
3334 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3335
3336 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
3337 (xstormy16_reloc_map): Initialise new field with correct howto
3338 table.
3339 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
3340 howto entry.
3341
3342 2002-01-10 Michael Snyder <msnyder@redhat.com>
3343
3344 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
3345 (elfcore_write_pstatus): Use long instead of pid_t;
3346 * elf-bfd.h: Change prototypes to use long instead of pid_t;
3347
3348 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
3349
3350 * elf.c: Update copyright years.
3351 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
3352 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
3353
3354 2002-01-08 Michael Snyder <msnyder@redhat.com>
3355
3356 Add capability to write corefile note sections, for gdb.
3357 * elf.c (elfcore_write_note): New function.
3358 (elfcore_write_prpsinfo): New function.
3359 (elfcore_write_prstatus): New function.
3360 (elfcore_write_pstatus): New function.
3361 (elfcore_write_prfpreg): New function.
3362 (elfcore_write_prxfpreg): New function.
3363 * elf-bfd.h: Add prototypes for above functions.
3364
3365 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
3366
3367 * elf.c (elf_fake_sections): Propagate errors from
3368 elf_backend_fake_section.
3369
3370 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
3371
3372 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3373 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3374 (elf32-sh-nbsd.lo): New rule.
3375 * Makefile.in: Regenerate.
3376 * config.bfd (sh*le-*-netbsdelf*): New target.
3377 (sh*-*-netbsdelf*): New target.
3378 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3379 (bfd_elf32_shnbsd_vec): New vector.
3380 (bfd_elf32_shlnbsd_vec): New vector.
3381 * configure: Regenerate.
3382 * elf32-sh-nbsd.c: New file.
3383 * targets.c: Update copyright years.
3384 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
3385 bfd_elf32_shnbsd_vec.
3386
3387 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
3388
3389 * coff-rs6000.c (READ20): Use bfd_scan_vma.
3390
3391 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
3392
3393 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3394 of a symbol in a section that will be deleted.
3395
3396 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
3397
3398 * po/es.po: New file: Spanish translation.
3399 * configure.in (ALL_LINGUAS): Add es.
3400 * configure: Regenerate.
3401
3402 2002-01-06 Steve Ellcey <sje@cup.hp.com>
3403
3404 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3405 argument so we can handle HP-UX specially.
3406 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3407 (elfNN_hpux_backend_section_from_bfd_section): New for support
3408 of SHN_IA_64_ANSI_COMMON.
3409 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3410 (is_unwind_section_name): Add special HP-UX support.
3411 (elfNN_ia64_section_from_shdr): Add support for more sections.
3412 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3413 add support for more sections.
3414 (elfNN_ia64_additional_program_headers): Modify
3415 is_unwind_section_name call.
3416 (elfNN_ia64_modify_segment_map): Remove assumption that there is
3417 only one unwind section in segment.
3418
3419 2002-01-06 Alan Modra <amodra@bigpond.net.au>
3420
3421 * syms.c (_bfd_generic_make_empty_symbol): New function.
3422 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3423 _bfd_generic_make_empty_symbol.
3424 * libbfd.h: Regenerate.
3425 * bfd-in2.h: Regenerate.
3426 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3427 (hppabsd_core_get_symtab_upper_bound): Don't define.
3428 (hppabsd_core_get_symtab): Likewise.
3429 (hppabsd_core_print_symbol): Likewise.
3430 (hppabsd_core_get_symbol_info): Likewise.
3431 (hppabsd_core_bfd_is_local_label_name): Likewise.
3432 (hppabsd_core_get_lineno): Likewise.
3433 (hppabsd_core_find_nearest_line): Likewise.
3434 (hppabsd_core_bfd_make_debug_symbol): Likewise.
3435 (hppabsd_core_read_minisymbols): Likewise.
3436 (hppabsd_core_minisymbol_to_symbol): Likewise.
3437 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3438 Formatting fixes.
3439 * hpux-core.c: Similarly.
3440 * irix-core.c: Similarly.
3441 * osf-core.c: Similarly.
3442 * sco5-core.c: Similarly.
3443 * binary.c (binary_make_empty_symbol): Remove function, define as
3444 _bfd_generic_make_empty_symbol.
3445 * ihex.c (ihex_make_empty_symbol): Likewise.
3446 * mmo.c (mmo_make_empty_symbol): Likewise.
3447 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3448 * srec.c (srec_make_empty_symbol): Likewise.
3449 * versados.c (versados_make_empty_symbol): Likewise.
3450 * vms.c (_bfd_vms_make_empty_symbol): Remove.
3451 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3452 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
3453 rather than _bfd_vms_make_empty_symbol.
3454 * vms-misc.c (new_symbol): Likewise.
3455
3456 2002-01-05 Alan Modra <amodra@bigpond.net.au>
3457
3458 * section.c (bfd_section_init): Remove unnecessary initialisations.
3459 (bfd_section_list_clear): New function.
3460 (bfd_section_list_remove, bfd_section_list_insert): New macros.
3461 (_bfd_strip_section_from_output): Use them.
3462 * coffcode.h (coff_set_alignment_hook): Likewise.
3463 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
3464 * elf64-mips.c (mips_elf64_final_link): Likewise.
3465 * elf64-mmix.c (mmix_elf_final_link): Likewise.
3466 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3467 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3468 * bfd-in2.h: Regenerate.
3469
3470 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
3471 rather than doing our own section handling. Clean up after errors
3472 with bfd_release and bfd_section_list_clear. Handle unexpected
3473 flags.
3474 * aoutf1.h (sunos4_core_file_p): Likewise.
3475 * aix386-core.c (aix386_core_file_p): Likewise.
3476 * cisco-core.c (cisco_core_file_validate): Likewise.
3477 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3478 * trad-core.c (trad_unix_core_file_p): Likewise.
3479
3480 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
3481 with bfd_release and bfd_section_list_clear.
3482 * hpux-core.c (hpux_core_core_file_p): Likewise.
3483 * irix-core.c (irix_core_core_file_p): Likewise.
3484 * lynx-core.c (lynx_core_file_p): Likewise.
3485 * osf-core.c (osf_core_core_file_p): Likewise.
3486 * rs6000-core.c (rs6000coff_core_p): Likewise.
3487 * sco5-core.c (sco5_core_file_p): Likewise.
3488
3489 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
3490 sign extension adjustments without conditionals.
3491
3492 2002-01-04 Jakub Jelinek <jakub@redhat.com>
3493
3494 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
3495 CIE at .eh_frame start is removed due to no FDEs referencing it.
3496
3497 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
3498
3499 * config.bfd (x86_64-*-netbsd*): New target.
3500 * configure.in (x86_64-*-netbsd*): Set COREFILE
3501 to netbsd-core.lo.
3502 * configure: Regenerated.
3503
3504 2002-01-03 Tom Rix <trix@redhat.com>
3505
3506 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
3507 for recent bfd_make_section_anyway change.
3508
3509 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
3510
3511 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3512 R_ARM_THM_PC11 reloc.
3513
3514 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3515
3516 * configure.in (LINGUAS): Add ja.
3517 * configure: Regenerate.
3518 * po/ja.po: Import from translation project's web site.
3519
3520 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3521
3522 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
3523 messages to ease translation into other languages.
3524
3525 For older changes see ChangeLog-0001
3526 \f
3527 Local Variables:
3528 mode: change-log
3529 left-margin: 8
3530 fill-column: 74
3531 version-control: never
3532 End:
This page took 0.105965 seconds and 5 git commands to generate.