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