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