* elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2001-11-03 Alan Modra <amodra@bigpond.net.au>
2
3 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
4
5 2001-11-02 H.J. Lu <hjl@gnu.org>
6
7 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
8 dynamic relocation for symbols defined in regular objects when
9 creating executables.
10
11 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
12
13 * configure.in (ALL_LINGUAS): Add "fr".
14 * configure: Regenerate.
15 * po/fr.po: New file.
16
17 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
18
19 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
20
21 * som.c (setup_sections): Initialize subspace_sections.
22
23 2001-11-02 H.J. Lu (hjl@gnu.org)
24
25 * coffgen.c (coff_object_p): Return 0 if the header is too big.
26
27 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
28
29 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
30 information. Save bfd arch and mach values. Restore on error.
31
32 2001-11-02 Alan Modra <amodra@bigpond.net.au>
33
34 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
35 (allocate_PIC_calls): New function.
36 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
37 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
38 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
39
40 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
41
42 * elf32-cris.c (cris_elf_grok_prstatus): New function.
43 (cris_elf_grok_psinfo): New function.
44 (elf_backend_grok_prstatus): Define.
45 (elf_backend_grok_psinfo): Define.
46
47 2001-11-01 Alan Modra <amodra@bigpond.net.au>
48
49 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
50 prediction bits.
51
52 2001-10-31 Chris Demetriou <cgd@demetriou.com>
53
54 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
55 relocations properly.
56
57 2001-10-31 H.J. Lu <hjl@gnu.org>
58
59 * elflink.h (elf_link_output_extsym): Don't clear the visibility
60 field for relocateable.
61
62 2001-11-01 Alan Modra <amodra@bigpond.net.au>
63
64 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
65 .plt relocs in DT_RELASZ.
66
67 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
68
69 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
70 targets.
71
72 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
73
74 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
75
76 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
77
78 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
79 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
80 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
81 Regenerate dependencies.
82 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
83 * config.bfd: [BFD64] (mmix-*-*): New case.
84 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
85 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
86 (bfd_mmix_arch): Declare.
87 (bfd_archures_list): Add bfd_mmix_arch.
88 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
89 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
90 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
91 bfd_mmo_mmix_vec.
92 * reloc.c: Add MMIX relocations.
93 * bfd.c (struct _bfd, tdata): Add mmo_data.
94 * Makefile.in: Regenerate.
95 * configure: Regenerate.
96 * libbfd.h: Regenerate.
97 * bfd-in2.h: Regenerate.
98 * configure: Rebuild.
99
100 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
101
102 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
103 p_paddr of the segment that contains it.
104 (copy_private_bfd_data): If the LMA for a segment is known, use it
105 for matching sections to segments.
106 (assign_file_positions_for_segments): Use the LMA when adjusting
107 for inter-section alignment padding.
108
109 2001-10-29 Kazu Hirata <kazu@hxi.com>
110
111 * README: Fix a typo.
112
113 2001-10-24 Richard Henderson <rth@redhat.com>
114
115 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
116 timestamp to time_t for ctime.
117
118 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
119
120 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
121 unsigned, increasing index.
122
123 2001-10-23 H.J. Lu <hjl@gnu.org>
124
125 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
126 m != NULL before accessing it.
127
128 2001-10-23 Alan Modra <amodra@bigpond.net.au>
129
130 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
131 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
132 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
133
134 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
135 (hppa_link_hash_newfunc): Likewise.
136 (elf32_hppa_finish_dynamic_symbol): Likewise.
137 (allocate_dynrelocs): Always allocate .got relocs if shared.
138 (elf32_hppa_relocate_section): Output them too. Similarly
139 consolidate .plt reloc code, and no longer initialise .plt
140 when a reloc is output.
141 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
142 when no reloc is output.
143
144 From Herbert Xu <herbert@gondor.apana.org.au>
145 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
146 unreachable branches.
147
148 2001-10-22 H.J. Lu <hjl@gnu.org>
149
150 * configure.in (WIN32LIBADD): Use -L../libiberty for
151 mips*-*-linux*.
152 * configure: Rebuild.
153
154 2001-10-21 H.J. Lu <hjl@gnu.org>
155
156 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
157 if shared library is enabled only for Linux hosts.
158 * configure: Rebuild.
159
160 2001-10-21 H.J. Lu <hjl@gnu.org>
161
162 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
163 ../libiberty/Makefile instead of $enable_shared.
164 * configure: Rebuild.
165
166 2001-10-21 H.J. Lu <hjl@gnu.org>
167
168 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
169 index 0.
170
171 2001-10-20 H.J. Lu <hjl@gnu.org>
172
173 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
174 if shared library is enabled.
175 * configure: Rebuild.
176
177 2001-10-20 H.J. Lu <hjl@gnu.org>
178
179 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
180
181 2001-10-19 H.J. Lu <hjl@gnu.org>
182
183 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
184 size is empty.
185
186 2001-10-18 H.J. Lu <hjl@gnu.org>
187
188 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
189 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
190
191 2001-10-18 Jakub Jelinek <jakub@redhat.com>
192
193 * section.c (_bfd_strip_section_from_output): Don't count
194 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
195
196 2001-10-17 Alan Modra <amodra@bigpond.net.au>
197
198 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
199 Elf_Internal_Shdr.contents now that it's no longer a PTR.
200 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
201 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
202 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
203 * elf32-sh.c (sh_elf_relax_section): Likewise.
204 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
205 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
206 * elf.c (setup_group): Warning fixes.
207 * elflink.h (elf_link_sort_relocs): Likewise.
208 * pdp11.c (slurp_reloc_table): Likewise.
209
210 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
211
212 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
213 casts.
214
215 2001-10-15 H.J. Lu <hjl@gnu.org>
216
217 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
218 for relocations against discarded link-once section.
219
220 2001-10-15 Alan Modra <amodra@bigpond.net.au>
221
222 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
223 bfd_reloc_outofrange and similar errors.
224
225 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
226 rather than ind->weakdef.
227 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
228 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
229 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
230 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
231 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
232
233 2001-10-15 Alan Modra <amodra@bigpond.net.au>
234 H.J. Lu <hjl@gnu.org>
235
236 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
237 counts for aliases instead of aborting.
238 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
239 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
240
241 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
242 to -1 for non-function symbols.
243 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
244 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
245 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
246 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
247 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
248 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
249 plt.offset instead of plt.refcount when setting to -1.
250
251 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
252
253 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
254 like R_ARM_PC24. Include reloc number in error message about
255 unresolvable relocs.
256
257 2001-10-10 Jakub Jelinek <jakub@redhat.com>
258
259 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
260 relocations against the same symbol in .rel{,a}.dyn section.
261
262 2001-10-10 Kazu Hirata <kazu@hxi.com>
263
264 * aout-encap.c: Fix comment typos.
265 * aoutx.h: Likewise.
266 * archive.c: Likewise.
267 * bout.c: Likewise.
268 * coff64-rs6000.c: Likewise.
269 * coffcode.h: Likewise.
270 * coffgen.c: Likewise.
271 * cofflink.c: Likewise.
272 * coff-mips.c: Likewise.
273 * ecoff.c: Likewise.
274 * elf32-m32r.c: Likewise.
275 * libcoff-in.h: Likewise.
276 * libecoff.h: Likewise.
277 * libxcoff.h: Likewise.
278 * nlm32-i386.c: Likewise.
279 * pdp11.c: Likewise.
280 * section.c: Likewise.
281 * som.c: Likewise.
282 * som.h: Likewise.
283 * bfd-in2.h: Regenerate.
284 * libcoff.h: Likewise.
285
286 2001-10-10 Alan Modra <amodra@bigpond.net.au>
287
288 * elf.c (elf_map_symbols): Don't create new section symbols; Use
289 existing section syms. Update comments.
290 (copy_private_bfd_data): Formatting fixes.
291 (elfcore_grok_win32pstatus): Likewise.
292 (swap_out_syms): Likewise. Remove unnecessary level of braces.
293
294 2001-10-09 Alan Modra <amodra@bigpond.net.au>
295
296 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
297 "group_name".
298 (elf_group_name): Define.
299 (elf_next_in_group): Define.
300 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
301 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
302 first member section; Instead use elf_next_in_group.
303 (bfd_section_from_shdr): Likewise.
304 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
305
306 2001-10-09 Alan Modra <amodra@bigpond.net.au>
307
308 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
309 "next_in_group". Fix gp and gp_size comments.
310 * elf.c (union elf_internal_group): New.
311 (setup_group): New function.
312 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
313 Call setup_group for SHF_GROUP sections.
314 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
315 (elf_fake_sections): Set header type for SEC_GROUP, and header
316 flags for sections in a group.
317 (set_group_contents): New function.
318 (_bfd_elf_compute_section_file_positions): Call it.
319 (assign_section_numbers): Set sh_link for SHT_GROUP.
320
321 * elflink.h (gc_mark_hook): Handle section groups.
322 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
323 * section.c (SEC_GROUP): Define.
324 (struct sec): Comment fixes.
325 * bfd-in2.h: Regenerate.
326
327 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
328 out of function args.
329 (_bfd_elf_canonicalize_reloc): Similarly.
330 (_bfd_elf_get_symtab): Here too.
331 (_bfd_elf_canonicalize_dynamic_symtab): And here.
332 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
333 bfd_bread, and remove unnecessary cast.
334
335 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
336
337 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
338
339 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
340
341 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
342 compilation unit.
343
344 2001-10-06 Alan Modra <amodra@bigpond.net.au>
345
346 * bfd.c (bfd_assert): Report bfd version.
347 (_bfd_abort): Likewise.
348
349 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
350 section sym values. Instead replace any relocs against them with
351 relocs against STN_UNDEF, which has a zero value.
352
353 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
354 relocs.
355
356 2001-10-05 Jeff Law <law@redhat.com>
357
358 * som.h (som_exec_data): New field "version_id".
359 * som.c (som_object_setup): Record the version_id if it
360 exists.
361 (som_prep_headers): Do not initialize version_id here.
362 (som_finish_writing): Initialize version_id here.
363
364 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
365
366 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
367 according to the MIPS/SGI ELF64 ABI Draft.
368 (mips_elf_sort_hash_table): Typo.
369
370 2001-10-04 Alan Modra <amodra@bigpond.net.au>
371
372 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
373
374 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
375 copying flags if this is a weakdef.
376
377 2001-10-04 Alan Modra <amodra@bigpond.net.au>
378
379 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
380 packing.
381
382 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
383 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
384 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
385
386 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
387 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
388 backends we configure. Run "make dep-am".
389 (install-data-local): Install symcat.h.
390 * dep-in.sed: Remove symcat.h from dependencies.
391 * Makefile.in: Regenerate.
392
393 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
394
395 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
396
397 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
398
399 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
400 (elf_backend_default_use_rela_p): New define.
401
402 2001-10-03 Alan Modra <amodra@bigpond.net.au>
403
404 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
405 change.
406
407 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
408 * configure: Regenerate.
409 * Makefile.am (BFD_H_FILES): Add version.h.
410 * Makefile.in: Regenerate.
411 * po/SRC-POTFILES.in: Regenerate.
412
413 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
414 elf_backend_copy_indirect_symbol so that backend has a chance to
415 copy other necessary fields.
416 * elf-bfd.h (struct elf_backend_data): Update description of
417 elf_backend_copy_indirect_symbol.
418 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
419 copying flags if this is a weakdef.
420 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
421 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
422 than bfd_link_hash_lookup.
423 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
424 reloc processing for weakdefs.
425 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
426 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
427
428 2001-10-02 Alan Modra <amodra@bigpond.net.au>
429
430 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
431 result of ELF64_R_TYPE to enum before using in a switch.
432 (ppc64_elf_gc_mark_hook): Likewise.
433 (ppc64_elf_gc_sweep_hook): Likewise.
434 (ppc64_elf_reloc_type_class): Likewise.
435
436 2001-10-02 Alan Modra <amodra@bigpond.net.au>
437
438 * version.h: New file.
439 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
440 (BFD_VERSION_DATE): Define.
441 (BFD_VERSION_STRING): Define.
442 * configure.in: AC_SUBST bfd_version, bfd_version_date and
443 bfd_version_string.
444 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
445 * bfd-in2.h: Regenerate.
446 * configure: Regenerate.
447 * Makefile.am: Run "make dep-am".
448 * Makefile.in: Regenerate.
449
450 * bfd-in.h: Include "symcat.h".
451 (CONCAT4): Redefine as for old CAT4.
452 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
453 Add warning regarding whitespace.
454 * aout-cris.c: Likewise.
455 * aout-ns32k.c: Likewise.
456 * aout-sparcle.c: Likewise.
457 * aout-tic30.c: Likewise.
458 * aout0.c: Likewise.
459 * armnetbsd.c: Likewise.
460 * demo64.c: Likewise.
461 * elf-bfd.h: Likewise.
462 * gen-aout.c: Likewise.
463 * host-aout.c: Likewise.
464 * hp300bsd.c: Likewise.
465 * hp300hpux.c: Likewise.
466 * i386aout.c: Likewise.
467 * i386bsd.c: Likewise.
468 * i386dynix.c: Likewise.
469 * i386freebsd.c: Likewise.
470 * i386linux.c: Likewise.
471 * i386lynx.c: Likewise.
472 * i386mach3.c: Likewise.
473 * i386netbsd.c: Likewise.
474 * libaout.h: Likewise.
475 * m68k4knetbsd.c: Likewise.
476 * m68klinux.c: Likewise.
477 * m68klynx.c: Likewise.
478 * m68knetbsd.c: Likewise.
479 * m88kmach3.c: Likewise.
480 * mipsbsd.c: Likewise.
481 * newsos3.c: Likewise.
482 * ns32knetbsd.c: Likewise.
483 * pc532-mach.c: Likewise.
484 * pdp11.c: Likewise.
485 * riscix.c: Likewise.
486 * sparclinux.c: Likewise.
487 * sparclynx.c: Likewise.
488 * sparcnetbsd.c: Likewise.
489 * sunos.c: Likewise.
490 * targets.c: Likewise.
491 * vaxnetbsd.c: Likewise.
492 * vms-hdr.c: Likewise.
493
494 2001-10-01 Alan Modra <amodra@bigpond.net.au>
495
496 * bfd-in.h: Remove comments regarding generated files.
497 * libbfd-in.h: Likewise.
498 * libcoff-in.h: Likewise.
499 * bfd-in2.h: Regenerate.
500 * libbfd.h: Likewise.
501 * libcoff.h: Likewise.
502
503 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
504 Hans-Peter Nilsson <hp@bitrange.com>
505
506 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
507 partial_inplace, matching assembler output. Set src_mask to
508 all ones.
509 (sh_elf_relocate_section): Delete misplaced comment.
510 For relocatable linking against section symbol, call
511 _bfd_relocate_contents for partial_inplace relocs and adjust
512 rel->r_addend for others.
513 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
514 bfd_get_32, not at rel->r_addend.
515
516 2001-09-30 Alan Modra <amodra@bigpond.net.au>
517
518 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
519 the old dir refcount, so we indirectly set them to init_refcount.
520 Short-circuit asserts when we've just verified they are true.
521
522 2001-09-29 Alan Modra <amodra@bigpond.net.au>
523
524 * section.c (struct sec): Remove kept_section.
525 (STD_SECTION): Remove kept_section initialisation.
526 (bfd_make_section_anyway): Here too.
527 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
528 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
529 * elflink.h (elf_link_input_bfd): Set discarded link-once section
530 symbols to zero, and remove all code involved with kept_section
531 and tracking section symbol values.
532 * bfd-in2.h: Regenerate.
533 * configure.in: Bump version number.
534 * configure: Regenerate.
535
536 2001-09-29 Alan Modra <amodra@bigpond.net.au>
537
538 * elf64-ppc.c (struct ppc_dyn_relocs): New.
539 (IS_ABSOLUTE_RELOC): Define.
540 (struct ppc_link_hash_entry): New.
541 (struct ppc_link_hash_table): New.
542 (ppc_hash_table): Define.
543 (link_hash_newfunc): New function.
544 (ppc64_elf_link_hash_table_create): New function.
545 (create_got_section): New function.
546 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
547 pointers to our dynamic sections in hash table.
548 (ppc64_elf_copy_indirect_symbol): New function.
549 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
550 dynamic sections. Localise vars. Modify code for refcounts
551 starting from zero. Don't allocate here, or force symbols dynamic.
552 Don't copy all relocs if shared, select ones we need. Add code
553 to track possible copy relocs for non-shared link.
554 (ppc64_elf_gc_mark_hook): Update comment.
555 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
556 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
557 code for reference counting garbage collection. Don't create .plt
558 entries for functions that don't comply with ABI naming convention,
559 and don't allocate .plt space here. Use short-cuts to dynamic
560 sections. If possible, keep dynamic relocations instead of using
561 copy relocs. Remove confused comments.
562 (ppc_adjust_dynindx): Delete.
563 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
564 (allocate_dynrelocs): New function.
565 (readonly_dynrelocs): New function.
566 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
567 space here, and call allocate_dynrelocs to allocate space for
568 global .plt, .got and reloc sections. Use short-cuts to dynamic
569 sections. Call readonly_dynrelocs to determine whether we need
570 DT_TEXTREL. Don't generate section symbols here, the generic
571 ELF linker code does it for us.
572 (ppc64_elf_final_link): Call regular ELF backend linker rather than
573 gc variety, since we do our own .got handling.
574 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
575 dynamic section short-cuts. Localise vars, and delay setting.
576 Handle unknown relocs in main switch statement. Replace ugly
577 complicated tests for unresolvable relocs with a simple direct
578 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
579 before allowing an undefined sym in a shared lib. Do R_*_DS tests
580 after main switch, when we've set addend. Do non-addend insn
581 tweaks before main swithc. Ignore input_section->vma when
582 calculating reloc offsets as it's always zero. Rewrite dynamic
583 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
584 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
585 of dynamic section short-cuts. Reorganise .plt handling code.
586 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
587 Move expressions out of swap_reloca_out function calls.
588 (ppc64_elf_reloc_type_class): New function.
589 (ppc64_elf_info_to_howto): Move common expression to local var.
590 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
591 of dynamic section short-cuts. Don't fiddle with section syms
592 here as the ELF linker does it for us.
593 (elf_backend_can_refcount): Define.
594 (bfd_elf64_bfd_link_hash_table_create): Define.
595 (elf_backend_copy_indirect_symbol): Define.
596 (elf_backend_reloc_type_class): Define.
597 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
598
599 2001-09-29 Alan Modra <amodra@bigpond.net.au>
600
601 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
602 (struct elf_backend_data): Add can_refcount.
603 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
604 got.refcount and plt.refcount from init_refcount.
605 (_bfd_elf_link_hash_table_init): Set up init_refcount.
606 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
607 rather than got/plt.offset, and test for <= 0 rather than -1.
608 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
609 * elfxx-target.h (elf_backend_can_refcount): Define.
610 (elfNN_bed): Init can_refcount.
611 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
612 (_bfd_generic_link_hash_newfunc): Likewise.
613 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
614 starting from zero.
615 (elf_backend_can_refcount): Define.
616 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
617 starting from zero.
618 (elf32_hppa_copy_indirect_symbol): Make static to agree with
619 prototype.
620 (elf_backend_can_refcount): Define.
621 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
622 starting from zero.
623 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
624 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
625 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
626 (elf_backend_can_refcount): Define.
627 (elf_i386_copy_indirect_symbol): Make static to agree with
628 prototype. Formatting fix.
629 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
630 starting from zero.
631 (elf_backend_can_refcount): Define.
632 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
633 starting from zero.
634 (elf_backend_can_refcount): Define.
635 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
636 starting from zero.
637 (elf_backend_can_refcount): Define.
638 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
639 starting from zero.
640 (elf_backend_can_refcount): Define.
641 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
642 starting from zero.
643 (elf_backend_can_refcount): Define.
644
645 * som.c (som_write_symbol_strings): Cast current_offset in
646 bfd_seek call to match param type.
647
648 2001-09-28 J. Brobecker <brobecker@gnat.com>
649
650 * som.c (som_write_symbol_strings): Fix incorrect type of
651 current_offset to match the function definition. Fixes a build
652 failure on HPUX-11.00.
653
654 2001-09-28 Richard Henderson <rth@redhat.com>
655
656 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
657 SEC_MERGE, SEC_STRINGS.
658
659 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
660 * bfd-in2.h: Rebuild.
661
662 2001-09-28 Alan Modra <amodra@bigpond.net.au>
663
664 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
665 reloc code using x86_64_reloc_map.
666
667 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
668 no longer allocate here. Localise some vars to blocks where they
669 are used.
670 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
671 setting of vars until needed.
672 (allocate_dynrelocs): Don't create a .plt entry without a reloc
673 when symbol visibilty makes a function local.
674 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
675 swap_reloca_out function calls.
676 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
677 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
678 switch statement.
679
680 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
681 no longer allocate here. Localise some vars to blocks where they
682 are used. Remove separate switch stmt for creating .got sec.
683 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
684 redundant casts and aborts. Delay setting of vars until needed.
685 (allocate_dynrelocs): Remove redundant casts and aborts.
686 (elf_i386_size_dynamic_sections): Move comment.
687 (elf_i386_finish_dynamic_symbol): Move expressions out of function
688 calls.
689 (elf_i386_relocate_section): Likewise. Comment typo fix.
690 (elf_i386_finish_dynamic_sections): Migrate common code out of
691 switch statement.
692 (elf_backend_* defines): Sort.
693
694 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
695 without a reloc when symbol visibilty makes a function local.
696
697 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
698
699 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
700 conflicting float flags.
701
702 2001-09-26 Alan Modra <amodra@bigpond.net.au>
703
704 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
705 (elf_backend_copy_indirect_symbol): Define.
706 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
707 (struct elf_i386_link_hash_table): Likewise.
708 (link_hash_newfunc): Get rid of unnecessary casts.
709 (elf_i386_link_hash_table_create): Likewise.
710 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
711 Don't test input section SEC_READONLY here to try to avoid copy
712 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
713 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
714 here to properly test whether we need copy relocs. Do so for weak
715 syms too.
716
717 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
718 (elf_backend_copy_indirect_symbol): Define.
719 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
720 (stub_hash_newfunc): Get rid of unnecessary casts.
721 (hppa_link_hash_newfunc): Likewise.
722 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
723 Don't test input section SEC_READONLY here to try to avoid copy
724 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
725 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
726 here to properly test whether we need copy relocs. Do so for weak
727 syms too.
728
729 2001-09-26 Alan Modra <amodra@bigpond.net.au>
730
731 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
732 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
733 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
734
735 2001-09-25 Jakub Jelinek <jakub@redhat.com>
736
737 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
738 computation.
739
740 2001-09-25 H.J. Lu <hjl@gnu.org>
741
742 * bfd-in2.h: Regenerated.
743
744 2001-09-25 Alan Modra <amodra@bigpond.net.au>
745
746 * elf32-i386.c: Add comment re linker function names and ordering.
747 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
748 (elf_i386_grok_prstatus): Move before linker functions.
749 (elf_i386_grok_psinfo): Likewise.
750 (elf_i386_fake_sections): Move so that functions are ordered.
751 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
752
753 2001-09-25 Alan Modra <amodra@bigpond.net.au>
754
755 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
756 throughout file.
757
758 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
759 code handling this option.
760 (LONG_BRANCH_VIA_PLT): Likewise.
761 (RELATIVE_DYNRELOCS): Define as zero.
762 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
763 "pc_count" fields. Remove "section" field.
764 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
765 (elf32_hppa_check_relocs): Don't allocate space for dynamic
766 relocs here. Instead, record all needed dynamic relocs via
767 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
768 in elf_section_data.
769 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
770 (allocate_plt_and_got_and_discard_relocs): Rename to
771 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
772 (readonly_dynrelocs): New function.
773 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
774 Call readonly_dynrelocs to determine need for DT_TEXTREL.
775 Rename "i" to "ibfd". Allocate space for local dyn relocs.
776 (elf32_hppa_relocate_section): Make use of cached sreloc.
777 (elf32_hppa_reloc_type_class): New function.
778 (elf_backend_reloc_type_class): Define.
779
780 2001-09-25 Alan Modra <amodra@bigpond.net.au>
781
782 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
783 and "sreloc" fields.
784 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
785 "pc_count" fields. Remove "section" field.
786 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
787 allocate space for dynamic relocs here. Instead, record all
788 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
789 pointer to "sreloc" section in elf_section_data.
790 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
791 (allocate_plt_and_got_and_discard_relocs): Rename to
792 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
793 (readonly_dynrelocs): New function.
794 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
795 Rename "i" to "ibfd". Allocate space for local dyn relocs.
796 (elf_i386_relocate_section): Make use of cached sreloc.
797
798 2001-09-24 Alan Modra <amodra@bigpond.net.au>
799
800 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
801 reloc rather than just the type.
802 (_bfd_elf_reloc_type_class): Likewise.
803 * elf.c (_bfd_elf_reloc_type_class): Likewise.
804 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
805 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
806 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
807 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
808 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
809 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
810 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
811 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
812 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
813 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
814 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
815 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
816 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
817 * elflink.h: Formatting fixes.
818 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
819 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
820 o->contents to PTR. Update call to elf_backend_reloc_type_class.
821
822 2001-09-22 John Reiser <jreiser@BitWagon.com>
823
824 * elfcode.h (elf_object_p): Allow for no section header at all in
825 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
826
827 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
828
829 * elfxx-ia64.c: Fix compile time warning messages.
830 * coff-mcore.c: Fix compile time warning messages.
831 * coff-ppc.c: Fix compile time warning messages.
832 * coffcode.h: Fix compile time warning messages.
833 * elf32-mips.c: Fix compile time warning messages.
834 * elf64-alpha.c: Fix compile time warning messages.
835 * libbfd.c: Fix compile time warning messages.
836 * bfd-in2.h: Regenerate.
837
838 2001-09-21 Alan Modra <amodra@bigpond.net.au>
839
840 * Makefile.am: Run "make dep-am".
841 * Makefile.in: Regenerate.
842
843 * aoutx.h: Formatting fixes.
844 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
845
846 * linker.c: Replace bfd_get_filename with bfd_archive_filename
847 in error message.
848
849 2001-09-21 Alan Modra <amodra@bigpond.net.au>
850
851 * bfd.c (bfd_archive_filename): New function.
852 * bfd-in2.h: Regenerate.
853 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
854 in error messages where the bfd is an input bfd.
855 * aout-cris.c: Likewise.
856 * coff-arm.c: Likewise.
857 * coff-mcore.c: Likewise.
858 * coff-ppc.c: Likewise.
859 * coff-rs6000.c: Likewise.
860 * coff-sh.c: Likewise.
861 * coff-tic54x.c: Likewise.
862 * coff-tic80.c: Likewise.
863 * coff64-rs6000.c: Likewise.
864 * coffcode.h: Likewise.
865 * coffgen.c: Likewise.
866 * cofflink.c: Likewise.
867 * ecofflink.c: Likewise.
868 * elf-hppa.h: Likewise.
869 * elf.c: Likewise.
870 * elf32-arm.h: Likewise.
871 * elf32-cris.c: Likewise.
872 * elf32-gen.c: Likewise.
873 * elf32-hppa.c: Likewise.
874 * elf32-i370.c: Likewise.
875 * elf32-i386.c: Likewise.
876 * elf32-m32r.c: Likewise.
877 * elf32-mcore.c: Likewise.
878 * elf32-mips.c: Likewise.
879 * elf32-ppc.c: Likewise.
880 * elf32-s390.c: Likewise.
881 * elf32-sh.c: Likewise.
882 * elf32-sparc.c: Likewise.
883 * elf32-v850.c: Likewise.
884 * elf64-alpha.c: Likewise.
885 * elf64-gen.c: Likewise.
886 * elf64-ppc.c: Likewise.
887 * elf64-s390.c: Likewise.
888 * elf64-sparc.c: Likewise.
889 * elf64-x86-64.c: Likewise.
890 * elflink.h: Likewise.
891 * elfxx-ia64.c: Likewise.
892 * ieee.c: Likewise.
893 * ihex.c: Likewise.
894 * libbfd.c: Likewise.
895 * pdp11.c: Likewise.
896 * pe-mips.c: Likewise.
897 * peicode.h: Likewise.
898 * srec.c: Likewise.
899 * xcofflink.c: Likewise.
900
901 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
902
903 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
904 error message.
905
906 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
907 error message.
908
909 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
910 Consolidate error messages, and split long messages to two lines.
911
912 2001-09-20 John Reiser <jreiser@BitWagon.com>
913
914 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
915 and info->allow_shlib_undefined.
916 * elf32-cris.c: Likewise.
917 * elf32-hppa.c: Likewise.
918 * elf32-m68k.c: Likewise.
919 * elf32-mips.c: Likewise.
920 * elf32-ppc.c: Likewise.
921 * elf32-s390.c: Likewise.
922 * elf32-sh.c: Likewise.
923 * elf32-sparc.c: Likewise.
924 * elf64-alpha.c: Likewise.
925 * elf64-hppa.c: Likewise.
926 * elf64-ppc.c: Likewise.
927 * elf64-s390.c: Likewise.
928 * elf64-sparc.c: Likewise.
929 * elf64-x86-64.c: Likewise.
930 * elfxx-ia64.c: Likewise.
931
932 2001-09-18 Bruno Haible <haible@clisp.cons.org>
933
934 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
935 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
936 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
937 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
938 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
939 (bfd_default_scan): Use ISDIGIT instead of isdigit.
940 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
941 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
942 isxdigit/isdigit/islower.
943 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
944 (mangle_name): Use ISALNUM instead of isalnum.
945 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
946 (scan): Use ISDIGIT instead of isdigit.
947 * hosts/alphavms.h: Don't include <ctype.h>.
948 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
949 (ieee_object_p): Use TOUPPER instead of toupper.
950 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
951 (ihex_bad_byte): Use ISPRINT instead of isprint.
952 * merge.c: Don't include <ctype.h>.
953 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
954 (oasys_write_sections): Use ISDIGIT instead of isdigit.
955 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
956 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
957 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
958 (mangle_name): Use ISALNUM instead of isalnum.
959 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
960 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
961 isupper/islower/isdigit.
962 (som_decode_symclass): Use TOUPPER instead of toupper.
963 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
964 (srec_bad_byte): Use ISPRINT instead of isprint.
965 (srec_scan): Use ISSPACE instead of isspace.
966 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
967 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
968 * syms.c: Include "safe-ctype.h"
969 (islower, toupper): Remove macro definitions.
970 (bfd_decode_symclass): Use TOUPPER instead of toupper.
971 * vms-gsd.c: Don't include <ctype.h>.
972 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
973 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
974 islower/toupper.
975 * vms-tir.c: Don't include <ctype.h>.
976
977 2001-09-18 Alan Modra <amodra@bigpond.net.au>
978
979 * libbfd.c (bfd_bread): New function replacing bfd_read without
980 redundant params. Allow reads up to (size_t) -2 in length.
981 (bfd_bwrite): Similarly for bfd_write.
982 (real_read): Return a size_t.
983 (bfd_read): Call bfd_bread.
984 (bfd_write): Call bfd_bwrite.
985 (warn_deprecated): New function to annoy everybody.
986 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
987 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
988 (bfd_read, bfd_write): Define as macro.
989 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
990 likewise for bfd_write. Ensure function args are correct size by
991 using casts or local vars. In some cases, remove unnecessary
992 casts. Formatting fixes, in some cases removing a large expression
993 from function args by using a local var. Replace CONST with const.
994 Modify variable types to avoid warings. Use casts to avoid
995 warnings when using negative numbers in unsigned expressions.
996 * aout-adobe.c: Likewise.
997 * aout-arm.c: Likewise.
998 * aout-cris.c: Likewise.
999 * aout-encap.c: Likewise.
1000 * aout-ns32k.c: Likewise.
1001 * aout-target.h: Likewise.
1002 * aout-tic30.c: Likewise.
1003 * aoutf1.h: Likewise.
1004 * aoutx.h: Likewise.
1005 * archive.c: Likewise.
1006 * archures.c: Likewise.
1007 * bfd-in.h: Likewise.
1008 * bfd.c: Likewise.
1009 * binary.c: Likewise.
1010 * bout.c: Likewise.
1011 * cache.c: Likewise.
1012 * cisco-core.c: Likewise.
1013 * coff-a29k.c: Likewise.
1014 * coff-alpha.c: Likewise.
1015 * coff-arm.c: Likewise.
1016 * coff-h8300.c: Likewise.
1017 * coff-h8500.c: Likewise.
1018 * coff-i386.c: Likewise.
1019 * coff-i860.c: Likewise.
1020 * coff-i960.c: Likewise.
1021 * coff-ia64.c: Likewise.
1022 * coff-m68k.c: Likewise.
1023 * coff-m88k.c: Likewise.
1024 * coff-mcore.c: Likewise.
1025 * coff-mips.c: Likewise.
1026 * coff-ppc.c: Likewise.
1027 * coff-rs6000.c: Likewise.
1028 * coff-sh.c: Likewise.
1029 * coff-sparc.c: Likewise.
1030 * coff-stgo32.c: Likewise.
1031 * coff-tic30.c: Likewise.
1032 * coff-tic54x.c: Likewise.
1033 * coff-tic80.c: Likewise.
1034 * coff-w65.c: Likewise.
1035 * coff-z8k.c: Likewise.
1036 * coff64-rs6000.c: Likewise.
1037 * coffcode.h: Likewise.
1038 * coffgen.c: Likewise.
1039 * cofflink.c: Likewise.
1040 * coffswap.h: Likewise.
1041 * corefile.c: Likewise.
1042 * cpu-arc.c: Likewise.
1043 * cpu-h8300.c: Likewise.
1044 * cpu-h8500.c: Likewise.
1045 * cpu-i960.c: Likewise.
1046 * cpu-ia64-opc.c: Likewise.
1047 * cpu-ns32k.c: Likewise.
1048 * cpu-pdp11.c: Likewise.
1049 * cpu-pj.c: Likewise.
1050 * cpu-sh.c: Likewise.
1051 * cpu-w65.c: Likewise.
1052 * cpu-z8k.c: Likewise.
1053 * dwarf1.c: Likewise.
1054 * dwarf2.c: Likewise.
1055 * ecoff.c: Likewise.
1056 * ecofflink.c: Likewise.
1057 * ecoffswap.h: Likewise.
1058 * elf-bfd.h: Likewise.
1059 * elf-hppa.h: Likewise.
1060 * elf-m10200.c: Likewise.
1061 * elf-m10300.c: Likewise.
1062 * elf.c: Likewise.
1063 * elf32-arc.c: Likewise.
1064 * elf32-arm.h: Likewise.
1065 * elf32-avr.c: Likewise.
1066 * elf32-cris.c: Likewise.
1067 * elf32-fr30.c: Likewise.
1068 * elf32-gen.c: Likewise.
1069 * elf32-h8300.c: Likewise.
1070 * elf32-hppa.c: Likewise.
1071 * elf32-i370.c: Likewise.
1072 * elf32-i386.c: Likewise.
1073 * elf32-i860.c: Likewise.
1074 * elf32-m32r.c: Likewise.
1075 * elf32-m68k.c: Likewise.
1076 * elf32-mcore.c: Likewise.
1077 * elf32-mips.c: Likewise.
1078 * elf32-openrisc.c: Likewise.
1079 * elf32-pj.c: Likewise.
1080 * elf32-ppc.c: Likewise.
1081 * elf32-s390.c: Likewise.
1082 * elf32-sh-lin.c: Likewise.
1083 * elf32-sh.c: Likewise.
1084 * elf32-sparc.c: Likewise.
1085 * elf32-v850.c: Likewise.
1086 * elf64-alpha.c: Likewise.
1087 * elf64-hppa.c: Likewise.
1088 * elf64-mips.c: Likewise.
1089 * elf64-ppc.c: Likewise.
1090 * elf64-s390.c: Likewise.
1091 * elf64-sparc.c: Likewise.
1092 * elf64-x86-64.c: Likewise.
1093 * elfarm-nabi.c: Likewise.
1094 * elfcode.h: Likewise.
1095 * elfcore.h: Likewise.
1096 * elflink.c: Likewise.
1097 * elflink.h: Likewise.
1098 * elfxx-ia64.c: Likewise.
1099 * elfxx-target.h: Likewise.
1100 * format.c: Likewise.
1101 * hash.c: Likewise.
1102 * hp300hpux.c: Likewise.
1103 * hppabsd-core.c: Likewise.
1104 * hpux-core.c: Likewise.
1105 * i386aout.c: Likewise.
1106 * i386dynix.c: Likewise.
1107 * i386linux.c: Likewise.
1108 * i386lynx.c: Likewise.
1109 * i386mach3.c: Likewise.
1110 * i386msdos.c: Likewise.
1111 * i386os9k.c: Likewise.
1112 * ieee.c: Likewise.
1113 * ihex.c: Likewise.
1114 * irix-core.c: Likewise.
1115 * libaout.h: Likewise.
1116 * libbfd-in.h: Likewise.
1117 * libbfd.c: Likewise.
1118 * libcoff-in.h: Likewise.
1119 * libecoff.h: Likewise.
1120 * libieee.h: Likewise.
1121 * libnlm.h: Likewise.
1122 * libpei.h: Likewise.
1123 * libxcoff.h: Likewise.
1124 * linker.c: Likewise.
1125 * lynx-core.c: Likewise.
1126 * m68klinux.c: Likewise.
1127 * merge.c: Likewise.
1128 * mipsbsd.c: Likewise.
1129 * netbsd-core.c: Likewise.
1130 * nlm.c: Likewise.
1131 * nlm32-alpha.c: Likewise.
1132 * nlm32-i386.c: Likewise.
1133 * nlm32-ppc.c: Likewise.
1134 * nlm32-sparc.c: Likewise.
1135 * nlmcode.h: Likewise.
1136 * nlmswap.h: Likewise.
1137 * ns32k.h: Likewise.
1138 * oasys.c: Likewise.
1139 * opncls.c: Likewise.
1140 * osf-core.c: Likewise.
1141 * pc532-mach.c: Likewise.
1142 * pdp11.c: Likewise.
1143 * pe-mips.c: Likewise.
1144 * peXXigen.c: Likewise.
1145 * peicode.h: Likewise.
1146 * ppcboot.c: Likewise.
1147 * ptrace-core.c: Likewise.
1148 * reloc.c: Likewise.
1149 * reloc16.c: Likewise.
1150 * riscix.c: Likewise.
1151 * rs6000-core.c: Likewise.
1152 * sco5-core.c: Likewise.
1153 * section.c: Likewise.
1154 * som.c: Likewise.
1155 * sparclinux.c: Likewise.
1156 * sparclynx.c: Likewise.
1157 * srec.c: Likewise.
1158 * stabs.c: Likewise.
1159 * sunos.c: Likewise.
1160 * syms.c: Likewise.
1161 * targets.c: Likewise.
1162 * tekhex.c: Likewise.
1163 * trad-core.c: Likewise.
1164 * versados.c: Likewise.
1165 * vms-gsd.c: Likewise.
1166 * vms-hdr.c: Likewise.
1167 * vms-misc.c: Likewise.
1168 * vms-tir.c: Likewise.
1169 * vms.c: Likewise.
1170 * vms.h: Likewise.
1171 * xcofflink.c: Likewise.
1172 * bfd-in2.h: Regenerate.
1173 * libbfd.h: Regenerate.
1174 * libcoff.h: Regenerate.
1175
1176 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1177 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1178 (ufile_ptr): Define.
1179 (bfd_tell): Return a ufile_ptr.
1180 * libbfd.c (bfd_tell): Likewise.
1181 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1182 unnecessarily.
1183 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1184 * aoutf1.h: Likewise.
1185 * som.c: Likewise.
1186 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1187 larger than unsigned long can represent.
1188
1189 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1190 size overflows size_t.
1191 (bfd_realloc): Likewise.
1192 (bfd_zmalloc): Likewise.
1193 * opncls.c (bfd_alloc): Likewise.
1194 (bfd_zalloc): Likewise.
1195 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1196 (bfd_alloc, bfd_zalloc): Update.
1197
1198 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1199 8 bits.
1200 (bfd_get_signed_8): Likewise.
1201 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1202 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1203 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1204 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1205 * libaout.h: Likewise define and use here.
1206 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1207 * aout-arm.c: Likewise.
1208 * aout-encap.c: Likewise.
1209 * aout-ns32k.c: Likewise.
1210 * aout-tic30.c: Likewise.
1211 * aoutf1.h: Likewise.
1212 * aoutx.h: Likewise.
1213 * bout.c: Likewise.
1214 * coff-alpha.c: Likewise.
1215 * coff-h8300.c: Likewise.
1216 * coff-h8500.c: Likewise.
1217 * coff-i960.c: Likewise.
1218 * coff-ia64.c: Likewise.
1219 * coff-m88k.c: Likewise.
1220 * coff-mips.c: Likewise.
1221 * coff-ppc.c: Likewise.
1222 * coff-rs6000.c: Likewise.
1223 * coff-sh.c: Likewise.
1224 * coff-sparc.c: Likewise.
1225 * coff-stgo32.c: Likewise.
1226 * coff-tic30.c: Likewise.
1227 * coff-tic80.c: Likewise.
1228 * coff-w65.c: Likewise.
1229 * coff-z8k.c: Likewise.
1230 * coff64-rs6000.c: Likewise.
1231 * coffgen.c: Likewise.
1232 * cofflink.c: Likewise.
1233 * coffswap.h: Likewise.
1234 * ecoff.c: Likewise.
1235 * ecoffswap.h: Likewise.
1236 * elf.c: Likewise.
1237 * elf32-mips.c: Likewise.
1238 * elf64-mips.c: Likewise.
1239 * hp300hpux.c: Likewise.
1240 * i386dynix.c: Likewise.
1241 * i386lynx.c: Likewise.
1242 * i386msdos.c: Likewise.
1243 * i386os9k.c: Likewise.
1244 * libpei.h: Likewise.
1245 * nlm32-alpha.c: Likewise.
1246 * nlm32-i386.c: Likewise.
1247 * nlm32-ppc.c: Likewise.
1248 * nlmcode.h: Likewise.
1249 * nlmswap.h: Likewise.
1250 * oasys.c: Likewise.
1251 * pdp11.c: Likewise.
1252 * pe-mips.c: Likewise.
1253 * peXXigen.c: Likewise.
1254 * peicode.h: Likewise.
1255 * riscix.c: Likewise.
1256 * sunos.c: Likewise.
1257 * xcofflink.c: Likewise.
1258 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1259 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1260 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1261 equivalent H_PUT_* macro instead.
1262 (GETWORD, GETHALF, GETBYTE): Similarly.
1263 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1264 (GETWORD, GETHALF, GETBYTE): Likewise.
1265 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1266
1267 * bfd-in.h (struct orl): Change "pos" to a union.
1268 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1269 (bsd_write_armap): Here too.
1270 (coff_write_armap): And here.
1271 * coff-rs6000.c (xcoff_write_armap_old): And here.
1272 (xcoff_write_one_armap_big): And here.
1273 (xcoff_write_armap_big): And here.
1274 * ecoff.c (_bfd_ecoff_write_armap): And here.
1275 * elf64-mips.c (mips_elf64_write_armap): And here.
1276
1277 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1278 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1279 * elf32-h8300.c (elf32_h8_mach): Likewise.
1280 * elf32-mips.c (elf_mips_mach): Likewise.
1281 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1282
1283 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1284 calls.
1285 (aix386_core_vec): Typo fix.
1286
1287 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1288 etc. to avoid redefined macro warning.
1289 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1290 (MY(fix_pcrel_26)): Likewise.
1291 * aout-ns32k.c (MY(put_reloc)): Likewise.
1292 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1293 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1294 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1295
1296 * aout-encap.c: Include "file", not <file> for binutils headers.
1297 (encap_object_p): Half baked attempt to fix compile errors in
1298 code dealing with "magic".
1299
1300 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1301 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1302 bfd_vma's rather than longs.
1303 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1304 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1305 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1306 remove case 3.
1307 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1308 Use unsigned comparisons.
1309 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1310 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1311 (_bfd_do_ns32k_reloc_contents): Likewise.
1312 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1313 (_bfd_ns32k_get_immediate): Likewise.
1314 (_bfd_ns32k_put_displacement): Likewise.
1315 (_bfd_ns32k_put_immediate): Likewise.
1316 (bfd_reloc_status_type): Likewise.
1317
1318 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1319 to avoid shadowing.
1320 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1321 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1322 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1323 avoid shadowing.
1324 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1325 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1326 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1327 shadow warning.
1328 (_bfd_elfcore_strndup): Likewise for "dup".
1329 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1330 "name" to avoid shadowing.
1331 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1332 definition of "off".
1333 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1334 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1335 definition of "s".
1336 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1337 "secpp".
1338 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1339 to avoid shadowing.
1340 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1341 to avoid shadowing.
1342 (elf_link_input_bfd): Likewise.
1343 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1344 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1345 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1346 "input_section".
1347 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1348 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1349 (sunos_write_dynamic_symbol): Remove unused vars.
1350 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1351 innermost "directory_name" and "file_name" vars.
1352 * tekhex.c (first_phase): Rename local var "type" to "stype".
1353 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1354 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1355 doing comparison at caller.
1356 (vms_esecflag_by_name): Likewise.
1357 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1358 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1359 (xcoff_write_global_symbol): Rename "p" param to "inf".
1360
1361 * cisco-core.c: Add missing prototypes.
1362 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1363 (cisco_core_file_failing_signal): Likewise.
1364 (cisco_core_file_matches_executable_p): Likewise.
1365 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1366 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1367 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1368 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1369
1370 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1371 thumb_glue_size and arm_glue_size.
1372 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1373
1374 * coff64-rs6000.c: Group prototypes together.
1375
1376 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1377 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1378
1379 * cpu-arc.c: Add missing prototypes.
1380 * cpu-h8500.c: Likewise.
1381 * cpu-i960.c: Likewise.
1382 * cpu-pj.c: Likewise.
1383 * cpu-sh.c: Likewise.
1384 * cpu-w65.c: Likewise.
1385 * cpu-z8k.c: Likewise.
1386 * elf32-fr30.c: Likewise.
1387 * elf32-h8300.c: Likewise.
1388 * elf32-i370.c: Likewise.
1389 * hpux-core.c: Likewise.
1390 * versados.c: Likewise.
1391
1392 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1393 * cpu-h8500.c: Likewise.
1394 * cpu-i960.c: Likewise.
1395 * cpu-z8k.c: Likewise.
1396
1397 * cpu-ia64-opc.c: Correct comment.
1398
1399 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1400
1401 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1402 to unsigned.
1403 (bfd_elf32_write_out_phdrs): Likewise.
1404 (bfd_elf64_write_out_phdrs): Likewise.
1405 (elf_linker_section_pointers): Change addend to bfd_vma.
1406 (_bfd_elf_find_pointer_linker_section): Likewise.
1407 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1408 filepos to unsigned file_ptr.
1409 (_bfd_elfcore_strndup): Change max param to size_t.
1410 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1411 (_bfd_elfcore_strndup): Likewise.
1412 (_bfd_elf_find_pointer_linker_section): Likewise.
1413
1414 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1415 insn and sym_value to ints.
1416
1417 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1418 bfd_size_type.
1419 (elfcore_read_notes): Likewise.
1420
1421 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1422 param from unsigned char to int.
1423 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1424 for info_to_howto call.
1425 (add_dynamic_entry): Define macro.
1426 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1427
1428 * elf32-cris.c (add_dynamic_entry): Define macro.
1429 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1430
1431 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1432 (elf32_h8_object_p): Likewise.
1433 (elf32_h8_merge_private_bfd_data): Likewise.
1434 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1435
1436 * elf32-hppa.c (add_dynamic_entry): Define macro.
1437 (elf32_hppa_size_dynamic_sections): Use it.
1438 * elf32-i370.c (add_dynamic_entry): Define macro.
1439 (i370_elf_size_dynamic_sections): Use it.
1440 (i370_noop): Make static.
1441 * elf32-i386.c (add_dynamic_entry): Define macro.
1442 (elf_i386_size_dynamic_sections): Use it.
1443 * elf32-m68k.c (add_dynamic_entry): Define macro.
1444 (elf_m68k_size_dynamic_sections): Use it.
1445 * elf32-ppc.c (add_dynamic_entry): Define macro.
1446 (ppc_elf_size_dynamic_sections): Use it.
1447 * elf32-s390.c (add_dynamic_entry): Define macro.
1448 (elf_s390_size_dynamic_sections): Use it.
1449 * elf64-alpha.c (add_dynamic_entry): Define macro.
1450 (elf64_alpha_size_dynamic_sections): Use it.
1451 * elf64-hppa.c (add_dynamic_entry): Define macro.
1452 (elf64_hppa_size_dynamic_sections): Use it.
1453 * elf64-ppc.c (add_dynamic_entry): Define macro.
1454 (ppc64_elf_size_dynamic_sections): Use it.
1455 * elf64-s390.c (add_dynamic_entry): Define macro.
1456 (elf_s390_size_dynamic_sections): Use it.
1457 * elf64-sparc.c (add_dynamic_entry): Define macro.
1458 (sparc64_elf_size_dynamic_sections): Use it.
1459 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1460 (elf64_x86_64_size_dynamic_sections): Use it.
1461 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1462 (elfNN_ia64_size_dynamic_sections): Use it.
1463
1464 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1465 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1466
1467 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1468 false if the first malloc fails rather than going via error_return.
1469
1470 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1471 "index" param.
1472 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1473
1474 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1475
1476 * elfxx-ia64.c (global_sym_index): Return a long.
1477
1478 * ieee.c (get_symbol): Use int rather than char param.
1479 (ieee_slurp_sections): Move "section" var to inner blocks.
1480 (copy_expression): Don't init "value" to zero or worry about
1481 clearing to zero after using.
1482 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1483 shadowing.
1484
1485 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1486 unsigned int.
1487
1488 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1489 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1490
1491 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1492
1493 * pc532-mach.c (MYNSX): Delete.
1494 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1495 (write_object_contents): Correct prototype.
1496
1497 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1498 than unsigned short.
1499
1500 * section.c (bfd_set_section_contents): Remove redundant
1501 "offset < 0" test. Check that "count" doesn't overflow size_t.
1502 (bfd_get_section_contents): Likewise.
1503
1504 * som.c (som_fixup_formats): Add missing braces.
1505 (som_reloc_addend): Pass a bfd_vma for "addend".
1506
1507 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1508 (srec_write_symbols): Remove an unnecessary var.
1509
1510 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1511 to match.
1512 * configure.in: Sort to match. Bump version number.
1513 * configure: Regenerate.
1514
1515 * tekhex.c (move_section_contents): Assert offset == 0.
1516
1517 * versados.c (new_symbol_string): Constify arg.
1518 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1519 (versados_get_symbol_info): Make static.
1520 (versados_print_symbol): Likewise.
1521 (versados_get_reloc_upper_bound): Likewise.
1522 (versados_canonicalize_reloc): Likewise.
1523
1524 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1525
1526 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1527
1528 2001-09-17 H.J. Lu <hjl@gnu.org>
1529
1530 * dwarf1.c (parse_die): Take a new arg for the end of the
1531 section. Return false if die is beyond the section.
1532 (parse_functions_in_unit): Pass the end of the section to
1533 parse_die ().
1534 (_bfd_dwarf1_find_nearest_line): Likewise.
1535
1536 2001-09-14 Michael Rauch <mrauch@netbsd.org>
1537
1538 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1539 just like R_SPARC_32.
1540
1541 2001-09-14 Kevin Lo <kevlo@openbsd.org>
1542
1543 * configure.bfd: Add arm-openbsd target.
1544
1545 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1546
1547 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1548 Add support for mips64.
1549
1550 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
1551
1552 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1553
1554 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1555
1556 * elf.c (prep_headers): Get the machine code from the elf
1557 backend data.
1558 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1559 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1560 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1561 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1562 * elf-arc.c (arc_elf_final_write_processing): Don't override
1563 e_machine, it's now properly set in prep_headers.
1564 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1565 EM_AVR_OLD.
1566 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1567 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1568 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1569 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1570 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1571 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1572 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1573 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1574 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1575 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1576 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1577 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1578
1579 2001-09-11 Richard Henderson <rth@redhat.com>
1580
1581 * elf64-alpha.c (elf64_alpha_section_flags): New.
1582 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1583
1584 2001-09-11 Richard Henderson <rth@redhat.com>
1585
1586 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1587 apply HINT relocations against dynamic symbols.
1588
1589 2001-09-11 H.J. Lu <hjl@gnu.org>
1590
1591 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
1592
1593 2001-09-09 Richard Henderson <rth@redhat.com>
1594
1595 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1596
1597 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1598 following a call to a near function.
1599
1600 2001-09-08 Richard Henderson <rth@redhat.com>
1601
1602 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1603 relocation errors. Fail gp-relative relocations against
1604 dynamic symbols.
1605
1606 2001-09-08 Alan Modra <amodra@bigpond.net.au>
1607
1608 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1609 as well as DEF_DYNAMIC in test for avoided copy relocs.
1610 (allocate_plt_and_got_and_discard_relocs): Likewise.
1611 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1612 (allocate_plt_and_got_and_discard_relocs): Likewise.
1613
1614 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1615
1616 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1617 of R_MIPS_PC16.
1618
1619 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1620
1621 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1622 definitions.
1623 (mips_elf64_howto_table_rel): Likewise.
1624
1625 2001-09-05 Tom Rix <trix@redhat.com>
1626
1627 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1628 and syscall symbols.
1629 (write_global_symbol) : Same.
1630 (bfd_xcoff_export_symbol): Remove unused syscall param.
1631 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1632 bfd_xcoff_import_symbol.
1633 * bfd-in.h: Same.
1634 * bfd-in2.h : Regenerate.
1635
1636 2001-09-04 Richard Henderson <rth@redhat.com>
1637
1638 * elf64-alpha.c (SKIP_HOWTO): New.
1639 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1640 Fix sizes of 16-bit mem format relocs.
1641 (elf64_alpha_reloc_map): Update to match.
1642 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1643 (elf64_alpha_relax_without_lituse): Likewise.
1644 (elf64_alpha_check_relocs): Handle GPREL16.
1645 (elf64_alpha_relocate_section): Likewise.
1646 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1647 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1648 * bfd-in2.h, libbfd.h: Rebuild.
1649
1650 2001-09-04 Jeff Law <law@redhat.com>
1651
1652 * elf32-h8300.c (elf32_h8_relax_section): New function.
1653 (elf32_h8_relax_delete_bytes): Likewise.
1654 (elf32_h8_symbol_address_p): Likewise.
1655 (elf32_h8_get_relocated_section_contents): Likewise.
1656 (bfd_elf32_bfd_relax_section): Define.
1657 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1658
1659 * elf32-h8300.c (special): New function.
1660 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1661 all relocations.
1662 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1663 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1664 Fix minor problems with 8bit and 16bit PC relative relocations.
1665
1666 2001-09-01 Andreas Jaeger <aj@suse.de>
1667
1668 * vms-tir.c: Add missing prototypes.
1669 * vms-hdr.c: Likewise.
1670 * vms-gsd.c: Likewise.
1671 * vms-misc.c: Likewise.
1672
1673 2001-08-31 H.J. Lu <hjl@gnu.org>
1674
1675 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1676 with bad relocation.
1677
1678 2001-08-31 Eric Christopher <echristo@redhat.com>
1679 Jason Eckhardt <jle@redhat.com>
1680
1681 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1682 mips32_4k and mips64.
1683 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1684 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1685 * bfd/cpu-mips.c: Ditto.
1686 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1687 * bfd/bfd-in2.h: Regenerate.
1688
1689 2001-08-31 Jakub Jelinek <jakub@redhat.com>
1690
1691 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1692 value into R_ALPHA_RELATIVE's addend.
1693 (elf64_alpha_finish_dynamic_symbol): Likewise.
1694
1695 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1696
1697 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1698 recomputed addend during relocatable link if not USE_REL.
1699
1700 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1701 error.
1702
1703 2001-08-30 H.J. Lu <hjl@gnu.org>
1704
1705 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1706 2 changes.
1707 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1708 relocations for weak definitions.
1709
1710 2001-08-30 H.J. Lu <hjl@gnu.org>
1711
1712 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1713 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1714 * Makefile.in: Rebuild.
1715
1716 2001-08-30 H.J. Lu <hjl@gnu.org>
1717
1718 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1719 dynamic relocation for undefined weak symbols when creating
1720 executables. Check h->root.root.type, instead of h->root.type.
1721
1722 2001-08-29 Joel Sherrill <joel@OARcorp.com>
1723
1724 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1725 default from coff to elf.
1726
1727 2001-08-29 Jeff Law <law@redhat.com>
1728
1729 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1730 relocations.
1731 (h8_reloc_map): Similarly.
1732 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1733 Add support for PC relative relocations.
1734
1735 * elf32-h8300.c: Put all prototypes together.
1736 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1737 (elf32_h8_final_link_relocate): New function for linker.
1738 (elf32_h8_relocate_section): Similarly.
1739 (elf_backend_relocate_section): Define.
1740
1741 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1742 (h8300_scan): Handle architecture:machine encodings typically
1743 found in linker scripts.
1744 * elf.c (prep_headers): Do not try to do H8 machine recognition
1745 here.
1746 * elf32-h8300.c: Add some missing prototypes.
1747 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1748 (elf32_h8_object_p): Similarly.
1749
1750 2001-08-29 Tom Rix <trix@redhat.com>
1751
1752 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1753 does not follow a XTY_SD.
1754
1755 2001-08-29 Alan Modra <amodra@bigpond.net.au>
1756
1757 * targmatch.sed: Delete case statements.
1758 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1759 aix4.3 and above.
1760
1761 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1762
1763 * Makefile.am (elf32-h8300.lo): New target.
1764 * config.bfd (h8300*-*-elf): New case.
1765 * configure.in (bfd_elf32_h8300_vec): New case.
1766 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1767 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1768 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1769 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1770 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1771 * elf32-h8300.c: New file.
1772 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1773
1774 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1775
1776 * sparclynx.c: Add missing prototypes.
1777 * coff-mcore.c: Add missing prototypes.
1778 * elf32-pj.c: Add missing prototypes.
1779 * nlm32-sparc.c: Add missing prototypes.
1780 * oasys.c: Add missing prototypes.
1781 * pdp11.c: Add missing prototypes.
1782 * pe-mips.c: Add missing prototypes.
1783 * riscix.c: Add missing prototypes.
1784
1785 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1786
1787 * elf32-i386.c: Add missing prototypes.
1788 * elf32-ppc.c: Likewise.
1789 * elf32-sh-lin.c: Likewise.
1790 * elfarm-nabi.c: Likewise.
1791
1792 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1793
1794 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1795 (elf_i386_grok_psinfo): New function.
1796 (elf_backend_grok_prstatus): Define.
1797 (elf_backend_grok_psinfo): Likewise.
1798 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1799 (ppc_elf_grok_psinfo): New function.
1800 (elf_backend_grok_prstatus): Define.
1801 (elf_backend_grok_psinfo): Likewise.
1802 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1803 (elf32_shlin_grok_psinfo): New function.
1804 (elf_backend_grok_prstatus): Define.
1805 (elf_backend_grok_psinfo): Likewise.
1806 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1807 (elf32_arm_nabi_grok_psinfo): New function.
1808 (elf_backend_grok_prstatus): Define.
1809 (elf_backend_grok_psinfo): Likewise.
1810
1811 2001-08-27 H.J. Lu <hjl@gnu.org>
1812
1813 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1814 sanity check.
1815 (mips_elf_calculate_relocation): Create dynamic relocation for
1816 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1817 bit is not set.
1818
1819 2001-08-27 H.J. Lu <hjl@gnu.org>
1820
1821 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1822 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1823 (_bfd_elf32_mips_grok_prstatus): Likewise.
1824 (_bfd_elf32_mips_grok_psinfo): Likewise.
1825 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1826 `struct mips_elf_link_hash_entry *'.
1827 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1828
1829 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1830
1831 * mipsbsd.c: Add missing prototypes.
1832 * hp300hpux.c: Add missing prototypes.
1833 * i386aout.c: Add missing prototypes.
1834 * i386lynx.c: Add missing prototypes.
1835 * i386mach3.c: Add missing prototypes.
1836 * i386msdos.c: Add missing prototypes.
1837 * i386os9k.c: Add missing prototypes.
1838
1839 2001-08-27 Linus Nordberg <linus@swox.se>
1840 Torbjorn Granlund <tege@swox.com>
1841 Staffan Ulfberg <staffanu@swox.se>
1842 Alan Modra <amodra@bigpond.net.au>
1843
1844 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1845 targ64_selvecs for 32 bit powerpc targets.
1846 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1847 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1848 Run "make dep-am".
1849 * Makefile.in: Regenerate.
1850 * configure.in: Add elf64_powerpc vecs.
1851 * configure: Regenerate.
1852 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1853 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1854 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1855 * elf64-ppc.c: New file.
1856 * reloc.c: Add powerpc64 relocs.
1857 * libbfd.h: Regenerate.
1858 * bfd-in2.h: Regenerate.
1859
1860 2001-08-27 Andreas Schwab <schwab@suse.de>
1861
1862 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1863 reloc is against read-only section.
1864 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1865 looking up section names for DT_TEXTREL.
1866 (elf32_m68k_reloc_type_class): New function.
1867 (elf_backend_reloc_type_class): Define.
1868
1869 2001-08-27 Andreas Jaeger <aj@suse.de>
1870
1871 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1872 reloc is against read-only section.
1873 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1874 looking up section names for DT_TEXTREL.
1875 (elf_s390_reloc_type_class): New.
1876 (elf_backend_reloc_type_class): Define.
1877
1878 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1879 reloc is against read-only section.
1880 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1881 looking up section names for DT_TEXTREL.
1882 (elf_s390_reloc_type_class): New.
1883 (elf_backend_reloc_type_class): Define.
1884
1885 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1886 is against read-only section.
1887 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1888 looking up section names for DT_TEXTREL.
1889 (ppc_elf_reloc_type_class): New.
1890 (elf_backend_reloc_type_class): Define.
1891
1892 2001-08-26 Andreas Jaeger <aj@suse.de>
1893
1894 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1895 reloc is against read-only section.
1896 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1897 looking up section names for DT_TEXTREL.
1898 (elf_cris_reloc_type_class): New.
1899 (elf_backend_reloc_type_class): Define.
1900
1901 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1902 against read-only section.
1903 (elf_backend_reloc_type_class): Define.
1904 (sh_elf_reloc_type_class): New.
1905 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1906 looking up section names for DT_TEXTREL.
1907
1908 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1909 reloc is against read-only section.
1910 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1911 looking up section names for DT_TEXTREL.
1912 (elf32_arm_reloc_type_class): New.
1913 (elf_backend_reloc_type_class): Define.
1914
1915 2001-08-25 Andreas Jaeger <aj@suse.de>
1916
1917 * oasys.c: Add missing prototypes.
1918
1919 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1920 attribute for parameter.
1921 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1922
1923 * versados.c (get_4): Make static.
1924 (get_10): Make static.
1925 Add missing prototypes.
1926 (process_esd): Fix call to versados_new_symbol.
1927
1928 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1929
1930 * coff-a29k.c: Add missing prototypes.
1931 * coff-apollo.c: Add missing prototypes.
1932 * coff-arm.c: Add missing prototypes.
1933 * coff-i860.c: Add missing prototypes.
1934 * coff-rs6000.c: Add missing prototypes.
1935 * coff-tic80.c: Add missing prototypes.
1936 * elf-m10200.c: Add missing prototypes.
1937 * elf-m10300.c: Add missing prototypes.
1938 * elf32-arm.h: Add missing prototypes.
1939 * elf32-d10v.c: Add missing prototypes.
1940 * elf32-m32r.c: Add missing prototypes.
1941 * elf32-mcore.c: Add missing prototypes.
1942 * elf32-openrisc.c: Add missing prototypes.
1943 * elf32-sh.c: Add missing prototypes.
1944 * elf32-sparc.c: Add missing prototypes.
1945 * elf32-v850.c: Add missing prototypes.
1946 * elfarm-nabi.c: Add missing prototypes.
1947 * elfarm-oabi.c: Add missing prototypes.
1948
1949 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1950
1951 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1952 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1953
1954 2001-08-24 H.J. Lu <hjl@gnu.org>
1955
1956 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1957 hash structure.
1958
1959 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1960
1961 * elf-bfd.h (elf_hash_table): Revert definition.
1962 (is_elf_hash_table): New macro.
1963 * elflink.h (elf_link_add_object_symbols): Test
1964 is_elf_hash_table before accessing ELF only fields in hash
1965 structure.
1966 (elf_link_create_dynamic_sections): Fail if not using an ELF
1967 hash structure.
1968 (elf_add_dynamic_entry): Fail if not using an ELF hash
1969 structure.
1970 (elf_link_record_local_dynamic_symbol): Fail if not using an
1971 ELF hash structure.
1972 (size_dynamic_sections): Fail if not using an ELF hash
1973 structure.
1974 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1975 hash structure.
1976 (elf_bfd_final_link): Fail if not using an ELF hash
1977 structure.
1978
1979 2001-08-24 H.J. Lu <hjl@gnu.org>
1980
1981 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1982 table is not an ELF linker hash table.
1983
1984 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1985 table type to bfd_link_elf_hash_table.
1986
1987 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1988 the last change.
1989
1990 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1991 table type to bfd_link_generic_hash_table.
1992
1993 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1994
1995 * bfd.c (bfd_alt_mach_code): New function.
1996 * bfd-in2.h: Rebuilt.
1997
1998 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1999
2000 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2001 `type' field in the hash entry when deciding whether to follow a
2002 link.
2003
2004 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2005
2006 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2007 last.
2008 (elf_link_sort_relocs): Adjust accordingly.
2009
2010 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2011 (elf64_alpha_check_relocs): Set it if section this reloc is against
2012 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2013 read-only section.
2014 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2015 is is against read-only section.
2016 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2017 check section names.
2018 (elf64_alpha_reloc_type_class): New.
2019 (elf_backend_reloc_type_class): Define.
2020
2021 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2022
2023 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2024 by bfd_malloc().
2025
2026 2001-08-23 Andreas Jaeger <aj@suse.de>
2027
2028 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2029 the reloc is against read-only section.
2030 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2031 of looking up section names for DT_TEXTREL.
2032 (elf64_x86_64_reloc_type_class): New.
2033 (elf_backend_reloc_type_class): Define.
2034
2035 2001-08-23 H.J. Lu <hjl@gnu.org>
2036
2037 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2038 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2039
2040 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2041 bfd_print_symbol_vandf.
2042 * coffgen.c (coff_print_symbol): Likewise.
2043 * elf.c (bfd_elf_print_symbol): Likewise.
2044 * ieee.c (ieee_print_symbol): Likewise.
2045 * nlmcode.h (nlm_print_symbol): Likewise.
2046 * oasys.c (oasys_print_symbol): Likewise.
2047 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2048 * som.c (som_print_symbol): Likewise.
2049 * srec.c (srec_print_symbol): Likewise.
2050 * tekhex.c (tekhex_print_symbol): Likewise.
2051 * versados.c (versados_print_symbol): Likewise.
2052 * vms.c (vms_print_symbol): Likewise.
2053
2054 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2055 with bfd_fprintf_vma.
2056 (bfd_elf_print_symbol): Likewise.
2057 * syms.c (bfd_print_symbol_vandf): Likewise.
2058
2059 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2060
2061 * aoutf1.h (sunos_write_object_contents): Silence compile time
2062 warning.
2063 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2064
2065 * bout.c: Add missing function prototypes. Fix formatting.
2066 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2067 * coff-w65.c: Add missing function prototypes. Fix formatting.
2068 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2069 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2070 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2071 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2072 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2073 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2074 * coff-sh.c: Add missing function prototypes. Fix formatting.
2075
2076 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2077
2078 * elf-bfd.h (enum elf_reloc_type_class): New.
2079 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2080 (_bfd_elf_reloc_type_class): New.
2081 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2082 (elfNN_bed): Add elf_backend_reloc_type_class.
2083 * elf.c (_bfd_elf_reloc_type_class): New.
2084 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2085 is against read-only section.
2086 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2087 looking up section names for DT_TEXTREL.
2088 (elf_i386_reloc_type_class): New.
2089 (elf_backend_reloc_type_class): Define.
2090 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2091 reloc is against read-only section.
2092 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2093 looking up section names for DT_TEXTREL.
2094 (elf32_sparc_reloc_type_class): New.
2095 (elf_backend_reloc_type_class): Define.
2096 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2097 reloc is against read-only section.
2098 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2099 looking up section names for DT_TEXTREL.
2100 (sparc64_elf_reloc_type_class): New.
2101 (elf_backend_reloc_type_class): Define.
2102 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2103 (elfNN_ia64_hash_table_create): Clear ia64_info.
2104 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2105 section.
2106 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2107 instead of looking up section names for DT_TEXTREL.
2108 (elfNN_ia64_reloc_type_class): New.
2109 (elf_backend_reloc_type_class): Define.
2110 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2111 (struct elf_link_sort_rela): New.
2112 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2113 (elf_bfd_final_link): Call elf_link_sort_relocs.
2114 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2115 necessary.
2116
2117 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2118
2119 * configure.in (x86-bsdi): No corefile support.
2120 * configure: Regenerate.
2121
2122 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2123
2124 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2125 comma.
2126
2127 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2128
2129 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2130 the alignment of dwarf2 linkonce sections to 0.
2131 * coff-sto32.c: Likewise.
2132
2133 2001-08-20 Andreas Jaeger <aj@suse.de>
2134
2135 * coff-sparc.c: Add missing prototypes.
2136 * elf32-s390.c: Likewise.
2137 * elf32-i960.c: Likewise.
2138 * aout-target.h: Likewise.
2139
2140 2001-08-20 H.J. Lu <hjl@gnu.org>
2141
2142 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2143 (elf_num_section_syms): New for num_section_syms.
2144
2145 * elf.c (elf_map_symbols): Set num_section_syms.
2146 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2147 the section symbol index.
2148
2149 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2150
2151 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2152 select the generic has table creator. All elf backends need elf
2153 specific fields in the hash table.
2154
2155 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2156
2157 * archive.c (offsetof): Remove define.
2158 * elf.c: Likewise.
2159 * oasys.c: Likewise
2160 * sysdep.h (offsetof): Define.
2161
2162 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2163
2164 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2165 (bfd_set_gp_size): Make param unsigned.
2166 * bfd-in2.h: Regenerate.
2167 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2168 than calling bfd_get_gp_size.
2169 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2170 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2171
2172 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2173
2174 * linker.c (default_fill_link_order): Handle four byte fill value.
2175
2176 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2177
2178 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2179 prototype.
2180 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2181
2182 * elf64-mips.c (UNUSED_RELOC): Define.
2183 (mips_elf64_howto_table_rel): Use it.
2184 (mips_elf64_howto_table_rela): Here too.
2185 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2186
2187 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2188 silence warning.
2189 * coffgen.c (coff_print_symbol): Fix warnings.
2190 (coff_find_nearest_line): Likewise.
2191 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2192 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2193 * format.c (bfd_check_format_matches): Likewise.
2194 (bfd_set_format): Likewise.
2195 * coff-ia64.c: Add missing prototypes.
2196 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2197 signed to silence warnings.
2198 (elf64_alpha_relocate_section): Likewise.
2199 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2200 (elf64_alpha_add_symbol_hook): Likewise.
2201 (elf64_alpha_final_link): Likewise.
2202 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2203 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2204 (elf64_alpha_size_got_sections): Likewise.
2205 * elfxx-ia64.c: Add missing prototypes.
2206 (elfNN_ia64_relocate_section): Fix warning.
2207 (elfNN_ia64_unwind_entry_compare): Make params const.
2208
2209 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2210
2211 * config.bfd (targ64_selvecs): New.
2212 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2213
2214 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2215 (BFD_DEFAULT_TARGET_SIZE): New.
2216 (BFD_ARCH_SIZE): Comment.
2217 * configure.in (target_size): New. Set instead of target64 in
2218 selvecs case statement. Set target64 from it.
2219 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2220 * bfd-in2.h: Regenerate.
2221 * configure: Regenerate.
2222
2223 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2224
2225 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2226 (bfd_errmsgs): Add corresponding message.
2227 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2228 finding an archive that contains different format object files.
2229 Return bfd_error_wrong_object_format for this case.
2230 * format.c: Formatting fixes. s/CONST/const/.
2231 (bfd_check_format_matches): Accept archives that give
2232 bfd_error_wrong_object_format if no full match is found. Tidy
2233 code handling matching_vector. Don't return a pointer to freed
2234 memory in `matching'. Handle ambiguous matches as for partial
2235 archive matches.
2236 * bfd-in2.h: Regenerate.
2237
2238 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2239
2240 * libieee.h (common_header_type): Add last_byte field.
2241
2242 * ieee.c: Add missing prototypes. Some format fixes.
2243 (struct output_buffer_struct): Move for availability to prototypes.
2244 (ieee_part_after): New function.
2245 (ieee_slurp_debug): Use it here.
2246 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2247 ieee_part_after to set last_byte to one past end of current part.
2248 Update callers.
2249 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2250 Update callers.
2251 (parse_expression): Don't go beyond the end of the current part.
2252 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2253 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2254 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2255 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2256 ieee_set_section_contents, ieee_write_object_contents,
2257 ieee_make_empty_symbol): Make static.
2258 (ieee_archive_p): Correct comments regarding bfd_read.
2259 (ieee_object_p): Similarly.
2260 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2261 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2262 input_bfd, output_bfd, output_buffer.
2263 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2264 do_with_relocs, ie. as a symbol for relocatable files.
2265 (ieee_vec): Add comments showing functions referenced by macros.
2266
2267 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2268
2269 * aout-tic30.c: Add missing prototypes. Fix formatting.
2270 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2271 * peXXigen.c: Add missining prototypes. Fix formatting.
2272 * aout-adobe.c: Add missining prototypes. Fix formatting.
2273
2274 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2275
2276 * elf32-v850.c: Add missing function prototypes.
2277 Fix some formatting.
2278
2279 * cpu-v850.c: Add missing function prototype.
2280 Fix some formatting.
2281
2282 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2283
2284 * elf-bfd.h (struct elf_backend_data): Add new fields
2285 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2286 (bfd_elf_sprintf_vma): Rename function prototype to
2287 '_bfd_elf_sprintf_vma'.
2288 (bfd_elf_fprintf_vma): Rename function prototype to
2289 '_bfd_elf_fprintf_vma'.
2290 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2291 directly, instead indirect via the elf_backend_data structure.
2292 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2293 instead indirect via the elf_backend_data structure.
2294 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2295 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2296 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2297 already defined.
2298 (elf_backend_fprintf_vma): Initialise if not already defined.
2299 (struct elf_backend_data): Initialise the
2300 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2301
2302 2001-08-10 Andreas Jaeger <aj@suse.de>
2303
2304 * elf64-sparc.c: Add missing prototypes.
2305 * elf32-cris.c: Likewise.
2306 * elf32-i370.c: Likewise.
2307 * elf64-hppa.c: Likewise.
2308 * elf64-s390.c: Likewise.
2309
2310 2001-08-10 Andreas Jaeger <aj@suse.de>
2311
2312 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2313 Add prototypes where needed.
2314
2315 2001-08-10 H.J. Lu <hjl@gnu.org>
2316
2317 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2318 (bfd_fprintf_vma): Likewise.
2319
2320 2001-08-10 H.J. Lu <hjl@gnu.org>
2321
2322 * bfd.c (bfd_sprintf_vma): Don't return void.
2323 (bfd_fprintf_vma): Likewise.
2324
2325 2001-08-10 Andreas Jaeger <aj@suse.de>
2326
2327 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2328 to build warnings.
2329 * configure: Regenerate.
2330
2331 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2332
2333 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2334 warning if not BFD64. Add braces so emacs auto format works.
2335 (bfd_elf_fprintf_vma): Likewise.
2336
2337 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2338 of _xcoff_swap_ld*.
2339 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2340 param to agree with libxcoff.h.
2341 (xcoff_swap_ldhdr_out): Likewise.
2342 (xcoff_swap_ldsym_in): Likewise.
2343 (xcoff_swap_ldsym_out): Likewise.
2344 (xcoff_swap_ldrel_in): Likewise.
2345 (xcoff_swap_ldrel_out): Likewise.
2346 (xcoff_create_csect_from_smclas): Likewise.
2347 * coff64-rs6000.c: Add missing prototypes.
2348 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2349 with libxcoff.h.
2350 (xcoff64_swap_ldhdr_out): Likewise.
2351 (xcoff64_swap_ldsym_in): Likewise.
2352 (xcoff64_swap_ldsym_out): Likewise.
2353 (xcoff64_swap_ldrel_in): Likewise.
2354 (xcoff64_swap_ldrel_out): Likewise.
2355 (xcoff64_ppc_relocate_section): Make static.
2356 (xcoff64_slurp_armap): Likewise.
2357 (xcoff64_archive_p): Likewise.
2358 (xcoff64_openr_next_archived_file): Likewise.
2359 (xcoff64_sizeof_headers): Likewise.
2360 (xcoff64_is_lineno_count_overflow): Likewise.
2361 (xcoff64_is_reloc_count_overflow): Likewise.
2362 (xcoff64_loader_symbol_offset): Likewise.
2363 (xcoff64_loader_reloc_offset): Likewise.
2364 * elf64-gen.c: Add missing prototypes.
2365
2366 2001-08-09 H.J. Lu <hjl@gnu.org>
2367
2368 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2369 (bfd_elf_fprintf_vma): Likewise.
2370
2371 2001-08-09 H.J. Lu <hjl@gnu.org>
2372
2373 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2374 to ...
2375 * elf-bfd.h: Here.
2376 * bfd-in2.h: Regenerated.
2377
2378 2001-08-09 H.J. Lu <hjl@gnu.org>
2379
2380 * bfd-in.h (bfd_sprintf_vma): New prototype.
2381 (bfd_fprintf_vma): Likewise.
2382 (bfd_elf_sprintf_vma): Likewise.
2383 (bfd_elf_fprintf_vma): Likewise.
2384 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2385 * bfd-in2.h: Regenerated.
2386
2387 * bfd.c (bfd_sprintf_vma): New. Defined.
2388 (bfd_fprintf_vma): Likewise.
2389
2390 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2391 (bfd_elf_fprintf_vma): Likewise.
2392
2393 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2394
2395 * coff-rs6000.c: Add missing prototypes.
2396 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2397 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2398 xcoff_loader_reloc_offset): Make static.
2399 * dwarf1.c: Add missing prototypes.
2400 * dwarf2.c: Add missing prototypes.
2401 (struct abbrev_info): Move definition.
2402 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2403 * elf.c: Add missing prototypes.
2404 * elf32-gen.c: Likewise.
2405 * elf32-i386.c: Likewise.
2406 * elf32-ppc.c: Likewise.
2407 (ppc_elf_sort_rela): Use PTR instead of "void *".
2408 * elflink.h: Add missing prototypes. Formatting fixes.
2409 * merge.c: Add missing prototypes.
2410 (last4_eq): Use PTR instead of "void *".
2411 (last_eq): Likewise.
2412 * syms.c: Add missing prototypes.
2413
2414 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2415
2416 * bfd.c: Fix formatting.
2417 * bfd-in2.h: Regenerate.
2418
2419 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2420
2421 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2422 true (this target uses REL relocations) and 'pcrel_offset' to
2423 false (the PC is implied, not stored in the offset).
2424
2425 2001-08-08 Alan Modra <amodra@bigpond.net.au>
2426
2427 1999-10-19 Linus Nordberg <linus@swox.se>
2428 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2429 * elfxx-target.h (elf_backend_want_got_sym): Define.
2430 (elfNN_bed): Add elf_backend_want_got_sym.
2431 * elflink.c (_bfd_elf_create_got_section): Define
2432 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2433
2434 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
2435
2436 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2437 (find_rela_addend): New function.
2438 (parse_comp_unit): Call it to find the abbrev offset addend.
2439 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2440 members of dwarf2_debug as debugging information is read.
2441
2442 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2443
2444 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2445 targets as well as sh-pe.
2446
2447 2001-08-03 Ben Harris <bjh21@netbsd.org>
2448
2449 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2450 reloc from start of section when computing value for R_ARM_REL32
2451 reloc.
2452
2453 2001-08-03 Alan Modra <amodra@bigpond.net.au>
2454
2455 From H.J. Lu <hjl@gnu.org>
2456 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2457 keep relocs for undefined syms if there are no dynamic sections in
2458 executable.
2459 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2460
2461 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2462
2463 * cofflink.c (coff_link_check_ar_symbols): also search for
2464 __imp__symbol as well as _symbol.
2465 * linker.c (_bfd_generic_link_add_archive_symbols): also
2466 search for __imp__symbol as well as _symbol.
2467
2468 2001-08-01 Adam Nemet <anemet@lnxw.com>
2469
2470 * elf.c (elf_sort_sections): Return zero only as the last step.
2471
2472 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2473
2474 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2475 ARM_COFF_BUGFIX.
2476 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2477 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2478 ARM_COFF_BUGFIX.
2479
2480 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2481
2482 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2483 to match corresponding bfd_coff_backend data member.
2484
2485 2001-07-24 Alan Modra <amodra@bigpond.net.au>
2486
2487 * Makefile.am: Update dependencies with "make dep-am".
2488 * Makefile.in: Regenerate
2489
2490 2001-07-15 H.J. Lu <hjl@gnu.org>
2491
2492 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2493 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2494 * Makefile.in: Regenerate.
2495
2496 2001-07-11 H.J. Lu <hjl@gnu.org>
2497
2498 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2499 flags when creating the reloc section if the ALLOC flag in the
2500 source section is set.
2501
2502 2001-07-11 Steve Ellcey <sje@cup.hp.com>
2503
2504 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2505 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2506 * bfd-in2.h: Regenerate.
2507 * libbfd.h: Regenerate.
2508 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2509 new relocations.
2510 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2511 (elfNN_ia64_check_relocs): Likewise.
2512 (elfNN_ia64_install_value): Likewise.
2513 (elfNN_ia64_relocate_section): Likewise.
2514
2515 2001-07-11 Jakub Jelinek <jakub@redhat.com>
2516
2517 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2518 R_SPARC_UA64.
2519 (elf32_sparc_check_relocs): Likewise.
2520 Only create .rela section for alloced sections in shared libraries.
2521 (elf32_sparc_relocate_section): Likewise.
2522 Remove redundant check.
2523 Optimize unaligned reloc usage.
2524 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2525 check.
2526
2527 2001-07-11 H.J. Lu <hjl@gnu.org>
2528
2529 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2530 ALLOC|LOAD flags as the source section for debugging sections
2531 when creating the reloc section.
2532
2533 2001-07-05 Jim Wilson <wilson@redhat.com>
2534
2535 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2536 the section of the bigger symbol.
2537
2538 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2539
2540 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2541
2542 * peicode.h (coff_swap_scnhdr_in): For sections containing
2543 uninitialised data, only set their size to s_paddr if this does
2544 not reset their size to zero. MS's latest compilers will set
2545 s_paddr to zero.
2546
2547 2001-07-04 H.J. Lu <hjl@gnu.org>
2548
2549 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2550 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2551 bfd_mach_mips5000.
2552
2553 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
2554
2555 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2556
2557 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2558 sections being discarded.
2559
2560 2001-06-30 Alan Modra <amodra@bigpond.net.au>
2561
2562 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2563 instead of _bfd_elfcore_section_from_phdr.
2564 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2565 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2566 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2567 (elfcore_grok_prstatus): Likewise.
2568 (elfcore_grok_lwpstatus): Likewise.
2569 (bfd_get_elf_phdr_upper_bound): Likewise.
2570 (elfcore_make_note_pseudosection): Formatting.
2571 (_bfd_elfcore_strndup): Formatting.
2572 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2573 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2574
2575 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
2576
2577 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2578 and _bfd_elfcore_strndup.
2579 (struct elf_backend_data): Add elf_backend_grok_prstatus
2580 and elf_backend_grok_psinfo.
2581 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2582 (elfcore_grok_prstatus): Use it.
2583 (elfcore_make_note_pseudosection): Likewise.
2584 (elfcore_strndup): Rename to...
2585 (_bfd_elfcore_strndup): Here, and make global.
2586 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2587 (elfcore_grok_note): Call elf_backend_grok_prstatus
2588 and elf_backend_grok_psinfo if available.
2589 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2590 (_bfd_elf32_mips_grok_psinfo): New function.
2591 (elf_backend_grok_prstatus): Define.
2592 (elf_backend_grok_psinfo): Define.
2593 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2594 (elf_backend_grok_psinfo): Likewise.
2595 (elfNN_bed): Include elf_backend_grok_prstatus and
2596 elf_backend_grok_psinfo.
2597
2598 2001-06-29 H.J. Lu <hjl@gnu.org>
2599
2600 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2601 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2602 is NULL before filling PLT.
2603
2604 2001-06-29 Alan Modra <amodra@bigpond.net.au>
2605
2606 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2607
2608 2001-06-27 Alan Modra <amodra@bigpond.net.au>
2609
2610 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2611 here..
2612 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2613 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2614 after gc has run.
2615
2616 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2617 (IS_ABSOLUTE_RELOC): Define.
2618 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2619 (hppa_link_hash_newfunc): Always init it.
2620 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2621 create COPY relocs only when the reloc is in a read-only section.
2622 Instead, allocate space for a dynamic reloc to reference the
2623 library symbol directly. Keep track of space we allocate using
2624 relocs_entries.
2625 (hppa_discard_copies): Delete, and move code to..
2626 (allocate_plt_and_got): ..here. Rename to
2627 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2628 relocs for non-shared link.
2629 (elf32_hppa_size_dynamic_sections): Update calls to above.
2630 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2631 in lieu of COPY relocs.
2632
2633 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2634 here..
2635 (elf_i386_adjust_dynamic_symbol): ..nor here..
2636 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2637 after gc has run.
2638 (elf_i386_size_dynamic_sections): Fix a comment.
2639 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2640 involved in writing reloc out.
2641
2642 2001-06-25 Alan Modra <amodra@bigpond.net.au>
2643
2644 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2645 Ensure syms are dynamic if we might be emitting a reloc.
2646 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2647 for undefweak or undefined syms..
2648 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2649
2650 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2651 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2652 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2653 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2654
2655 2001-06-24 H.J. Lu <hjl@gnu.org>
2656
2657 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2658 strncasecmp/strcasecmp instead of strncmp/strcmp.
2659
2660 2001-06-23 H.J. Lu <hjl@gnu.org>
2661
2662 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2663 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2664 in the regular object file and treat the weak definition as
2665 the normal one.
2666
2667 2001-06-23 Alan Modra <amodra@bigpond.net.au>
2668
2669 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2670 unresolved_reloc test to exclude cases where we use "relocation"
2671 before setting it to point into the .got. Reinstate fudge for
2672 unresolved relocs in debugging sections.
2673
2674 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2675 complicated tests for unresolvable relocs with a simple direct
2676 scheme using "unresolved_reloc" var.
2677
2678 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2679 elf_i386_dyn_relocs. Update comment.
2680 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2681 dyn_relocs.
2682 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2683 others to aborts.
2684 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2685 abort.
2686 (elf_i386_size_dynamic_sections): Likewise.
2687 (elf_i386_finish_dynamic_symbol): Likewise.
2688 (elf_i386_finish_dynamic_sections): Likewise.
2689 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2690 handling code.
2691
2692 Avoid creating COPY relocs if possible.
2693 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2694 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2695 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2696 reloc is in a read-only section. Instead, allocate space for a
2697 dynamic reloc to reference the library symbol directly. Keep
2698 track of space we allocate using pcrel_relocs_copied.
2699 (discard_copies): Delete, and move code to ..
2700 (allocate_plt_and_got): ..here. Rename to
2701 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2702 relocs for non-shared link.
2703 (elf_i386_size_dynamic_sections): Update calls to above functions.
2704 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2705 more ugly logic to avoid "unresolvable relocation" error. Use
2706 htab shortcut in place of elf_hash_table macro.
2707 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2708 not always be created now.
2709
2710 2001-06-20 Bo Thorsen <bo@suse.co.uk>
2711
2712 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2713 shared libraries.
2714
2715 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2716
2717 * configure.host (mips64-*-linux): Reformat.
2718
2719 2001-06-21 Alan Modra <amodra@bigpond.net.au>
2720
2721 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2722 allocate local .got space. Use shortcuts from hash table for .got
2723 and .plt rather than comparing section names.
2724 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2725 adjusting index into local_got_refcounts to document what we are
2726 really doing.
2727 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2728 Tidy .got and .plt error checking.
2729
2730 2001-06-20 Catherine Moore <clm@redhat.com>
2731
2732 * elf-bfd.h (struct elf_backend_data):
2733 elf_backend_emit_relocs: New field: Function for emitting
2734 relocs.
2735 elf_backend_count_relocs: New field: Function for determining
2736 the number of relocs to be emitted.
2737 * elfxx-target.h: Provide default (NULL) values for
2738 elf_backend_emit_relocs and elf_backend_count_relocs.
2739 * elflink.h (elf_link_size_reloc_section): Make the hash table
2740 big enough to hold the relocs counted by either reloc_count or
2741 o->reloc_count.
2742 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2743 should be emitted, either because of a command line option
2744 stored in the info structure or because the target provides a
2745 special reloc emitting function.
2746 If the target provides a reloc counting function use it,
2747 unless performing a relocatable link or emitting all relocs.
2748 Also set the SEC_RELOC flag on any output section which will
2749 contain relocs.
2750 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2751 should be emitted, either because of a command line option
2752 stored in the info structure or because the target provides a
2753 special reloc emitting function.
2754 If the target provides a reloc emitting function, use it,
2755 unless performing a relocatable link or emitting all relocs.
2756
2757 2001-06-20 H.J. Lu <hjl@gnu.org>
2758
2759 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2760 allocate local .got space.
2761
2762 2001-06-19 Andreas Jaeger <aj@suse.de>
2763
2764 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2765 dynamic symbols.
2766
2767 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
2768
2769 * elflink.h (struct elf_assign_sym_version_info): Remove member
2770 export_dynamic. All users changed to use info member.
2771 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2772 export_dynamic, instead use member in parameter info.
2773 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2774 bfd_elf64_size_dynamic_sections): Update prototype.
2775 * bfd-in2.h: Regenerate.
2776
2777 2001-06-18 H.J. Lu <hjl@gnu.org>
2778
2779 * elflink.h (elf_info_failed): Add a new field, verdefs.
2780 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2781 elf_export_symbol.
2782 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2783 should be exported.
2784
2785 2001-06-17 H.J. Lu <hjl@gnu.org>
2786
2787 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2788 readonly_reloc, to record if a relocation in the .rel.dyn
2789 section is against a read-only section.
2790 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2791 field to false.
2792 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2793 in the .rel.dyn section against a read-only section by setting
2794 DF_TEXTREL or readonly_reloc.
2795 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2796 it is true.
2797 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2798 there is a relocation in the .rel.dyn section against a
2799 read-only section.
2800 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2801 DF_TEXTREL is set.
2802
2803 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2804
2805 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2806 function. Move flagword result into parameter list. Remove
2807 comment about setting bfd_error_handler to intercept failure
2808 results.
2809 * coffgen.c (make_a_section_from_file): Examine result of
2810 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2811 caller.
2812 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2813 function. Move flagword result into parameter list.
2814 * libcoff.h: Regenerate.
2815 * libecoff.h: Regenerate.
2816
2817 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2818
2819 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2820 section is going to follow it.
2821
2822 2001-06-12 Catherine Moore <clm@redhat.com>
2823
2824 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2825 with the file_align entry from elf_backend_data.
2826 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2827 (elf_gc_record_vtentry): Likewise.
2828
2829 2001-06-10 Alan Modra <amodra@bigpond.net.au>
2830
2831 * elflink.h: Whitespace changes.
2832 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2833 rather than "unsigned char".
2834 (elf_link_output_relocs): Likewise.
2835 (elf_link_input_bfd): Likewise.
2836 (elf_reloc_link_order): LIkewise.
2837 * elf.c: s/CONST/const/. Whitespace changes.
2838 * elf32-mips.c: Formatting fix.
2839
2840 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2841 * Makefile.in: Regenerate.
2842 * po/Make-in: Remove trailing tab.
2843
2844 2001-06-09 Philip Blundell <philb@gnu.org>
2845
2846 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2847 change.
2848 (elf32_arm_plt_entry): Likewise.
2849
2850 2001-06-08 H.J. Lu <hjl@gnu.org>
2851
2852 * elf.c (swap_out_syms): Keep names for global section symbols.
2853
2854 2001-06-07 H.J. Lu <hjl@gnu.org>
2855
2856 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2857 MIPS-based machines need it.
2858
2859 2001-06-07 H.J. Lu <hjl@gnu.org>
2860
2861 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2862 for SGI only.
2863
2864 * config.bfd: Remove ecoff from Linux/mips.
2865
2866 2001-06-07 Andreas Jaeger <aj@suse.de>
2867
2868 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2869 assertion.
2870 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2871 alignment of 8 for .rela sections; handle further relocations.
2872
2873 2001-06-06 Christian Groessler <cpg@aladdin.de>
2874
2875 * coff-z8k.c: Fix formatting.
2876 Fix howtos: howto->size was always 1.
2877
2878 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2879
2880 * configure.host (mips64*-*-linux*): Define.
2881
2882 2001-06-05 Alan Modra <amodra@bigpond.net.au>
2883
2884 * elf32-i386.c (elf_i386_discard_copies): Rename to
2885 discard_copies, and use elf_link_hash_entry arg rather than
2886 elf_i386_link_hash_entry.
2887 (elf_i386_link_hash_traverse): Delete.
2888 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2889 Tidy sizing of dynamic sections.
2890 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2891 possible .plt entries.
2892 (elf_i386_gc_sweep_hook): Likewise.
2893 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2894 everything with plt.refcount <= 0.
2895
2896 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2897 .relgot space here.
2898 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2899 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2900 .rel.plt here..
2901 (allocate_plt_and_got): ..instead do it all here. New function.
2902 (elf_i386_size_dynamic_sections): Allocate local .got space and
2903 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2904 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2905 rather than gc variety).
2906 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2907 (elf_i386_relocate_section): Use it here and correct handling of
2908 R_386_GOT32. Provide section and offset for "unresolvable
2909 relocation" error message.
2910 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2911
2912 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2913 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2914 (elf_i386_link_hash_table_create): Init them.
2915 (create_got_section): New function.
2916 (elf_i386_create_dynamic_sections): New function.
2917 (elf_backend_create_dynamic_sections): Set to above.
2918 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2919 calling bfd_get_section_by_name.
2920 (elf_i386_gc_sweep_hook): Likewise.
2921 (elf_i386_adjust_dynamic_symbol): Likewise.
2922 (elf_i386_size_dynamic_sections): Likewise.
2923 (elf_i386_relocate_section): Likewise.
2924 (elf_i386_finish_dynamic_sections): Likewise.
2925
2926 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2927
2928 2001-06-02 H.J. Lu <hjl@gnu.org>
2929
2930 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2931 and ELFOSABI_HPUX.
2932 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2933
2934 2001-06-02 H.J. Lu <hjl@gnu.org>
2935
2936 * aout-cris.c (MACHTYPE_OK): New. Defined.
2937
2938 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
2939
2940 * section.c (_bfd_strip_section_from_output): Handle NULL
2941 output_section.
2942
2943 2001-06-02 H.J. Lu <hjl@gnu.org>
2944
2945 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2946 rs6000coff64_vec only if BFD64 is defined.
2947 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2948
2949 2001-06-02 H.J. Lu <hjl@gnu.org>
2950
2951 * coff-ia64.c (ia64coff_object_p): Rewrite with
2952 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2953
2954 2001-06-01 Andreas Jaeger <aj@suse.de>
2955
2956 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2957 relocation, small reformatting.
2958
2959 2001-05-29 Andreas Jaeger <aj@suse.de>
2960
2961 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2962 (elf64_x86_64_relocate_section): Likewise.
2963
2964 2001-05-30 Alan Modra <amodra@one.net.au>
2965
2966 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2967 millicode. Don't allocate .got and .rela.got space here..
2968 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2969 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2970 .rela.plt here..
2971 (hppa_handle_PIC_calls): ..nor here..
2972 (allocate_plt_and_got): ..instead do it all here. New function.
2973 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2974 call allocate_plt_and_got. No need to zap .got if not dynamic.
2975 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2976 gc_common_final_link.
2977 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2978 (elf32_hppa_relocate_section): Use it here.
2979 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2980 dynamic_sections_created.
2981 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2982
2983 2001-05-28 Andreas Jaeger <aj@suse.de>
2984
2985 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2986 generic version since we want a hashsize of 4.
2987 (elf_backend_size_info): Likewise.
2988
2989 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2990
2991 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2992 a zeroing loop.
2993 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2994 (elf_link_input_bfd): Likewise.
2995 (elf_reloc_link_order): Likewise.
2996 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2997 relocations correctly.
2998
2999 2001-05-28 Nicolas Pitre <nico@cam.org>
3000
3001 * elf32-arm.h: fix PLT generation for big endian ARM
3002
3003 2001-05-28 Alan Modra <amodra@one.net.au>
3004
3005 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3006 for symbols forced local that need plabels.
3007 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3008 .plt.rela for local syms if non-shared.
3009 (hppa_build_one_stub): Mask lsb of plt.offset.
3010 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3011 (clobber_millicode_symbols): Correct comment.
3012 (elf32_hppa_relocate_section): Likewise.
3013 (elf32_hppa_finish_dynamic_symbol): Likewise.
3014
3015 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3016
3017 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3018 * bfd-in2.h: Regenerate.
3019 * libbfd.h: Regenerate.
3020 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3021 and BFD_RELOC_SPARC_UA64 mapping
3022 * elf64-sparc.c: Likewise.
3023
3024 2001-05-25 H.J. Lu <hjl@gnu.org>
3025
3026 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3027 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3028 (coff-rs6000.lo): Remove the old dependency.
3029 * Makefile.in: Rebuild.
3030
3031 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3032 coff-rs6000.lo.
3033
3034 2001-05-25 H.J. Lu <hjl@gnu.org>
3035
3036 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3037 rs6000coff_core_file_matches_executable_p,
3038 rs6000coff_core_file_failing_command and
3039 rs6000coff_core_file_failing_signal only if AIX_CORE is
3040 defined.
3041 (pmac_xcoff_vec): Likewise.
3042 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3043
3044 2001-05-25 Timothy Wall <twall@redhat.com>
3045
3046 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3047 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3048
3049 2001-05-25 H.J. Lu <hjl@gnu.org>
3050
3051 * bfd-in2.h: Regenerated.
3052 * libcoff.h: Likewise.
3053
3054 2001-05-25 Alan Modra <amodra@one.net.au>
3055
3056 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3057 undefined millicode syms in shared libs.
3058 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3059 (elf32_hppa_check_relocs): Likewise.
3060 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3061 (elf32_hppa_size_dynamic_sections): Likewise.
3062 (elf32_hppa_relocate_section): Likewise.
3063 (elf32_hppa_finish_dynamic_symbol): Likewise.
3064 (elf32_hppa_finish_dynamic_sections): Likewise.
3065
3066 2001-05-24 Tom Rix <trix@redhat.com>
3067
3068 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3069 xcoff-target.h not used to define rs6000 or ppc bfd.
3070 * Makefile.in same
3071
3072 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3073 to 64 bit.
3074
3075 * coff-rs6000.c : Many changes for 64 bit support. Move common
3076 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3077 and pmac_xcoff_vec
3078
3079 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3080 linker now supported. Explictly define the rs6000coff64_vec.
3081
3082 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3083 (coff_print_aux) same
3084 (coff_write_object_contents) same
3085 (coff_slurp_line_table) same
3086
3087 * coffgen.c : (coff_fix_symbol_name) formatting
3088 (coff_mangle_symbols) xcoff 64 bit support
3089 (coff_write_symbol) same
3090 (coff_write_alien_symbol) same
3091 (coff_write_native_symbol) same
3092 (coff_write_symbols) same
3093 (coff_get_symbol_info) same
3094 (bfd_coff_get_syment) same
3095 (coff_print_symbol) same
3096
3097 * config.bfd : add powerpc64-*-aix* target
3098
3099 * libcoff-in.h : formatting
3100
3101 * libcoff.h : move xcoff extern declarations to libxcoff.h
3102
3103 * libxcoff.h : New file
3104
3105 * xcofflink.c : Many changes for xcoff64 support. Move common
3106 structures to include/coff/xcoff.h. Move specific structure to
3107 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3108 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3109
3110 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3111 aix4.2+ -binitfini.
3112
3113 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3114
3115 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3116
3117 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3118 s/ENTIRES/ENTRIES/.
3119
3120 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3121
3122 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3123 * libbfd.h: Regenerate.
3124 * bfd-in2.h: Regenerate.
3125
3126 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3127 * archures.c (bfd_mach_mips12000): Define.
3128 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3129 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3130 support.
3131 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3132 * bfd-in2.h: Regenerate.
3133 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3134
3135 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3136
3137 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3138 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3139 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3140 that is used by GCC.
3141
3142 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3143
3144 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3145 of entries in a structured section.
3146 * elf.c: Use new macro.
3147 * elf32-i386.c: Use new macro.
3148 * elf32-mips.c: Use new macro.
3149 * elf64-alpha.c: Use new macro.
3150 * elf64-sparc.c: Use new macro.
3151 * elfcode.h: Use new macro.
3152 * elflink.h: Use new macro.
3153
3154 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3155
3156 * bfdint.texi: Replace -oformat with --oformat.
3157
3158 2001-05-21 Andreas Jaeger <aj@suse.de>
3159
3160 * dwarf2.c (decode_line_info): Fix error message.
3161 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3162 adjust error message.
3163
3164 2001-05-18 H.J. Lu <hjl@gnu.org>
3165
3166 * elflink.h (elf_link_add_object_symbols): Revert the last
3167 change.
3168
3169 2001-05-17 Alan Modra <amodra@one.net.au>
3170
3171 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3172 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3173 (hppa_build_one_stub): Add an assert to check plt.offset.
3174
3175 2001-05-17 H.J. Lu <hjl@gnu.org>
3176
3177 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3178 version definition to basename of the output filename.
3179
3180 2001-05-17 H.J. Lu <hjl@gnu.org>
3181
3182 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3183 basename of the bfd filename.
3184
3185 2001-05-16 Alan Modra <amodra@one.net.au>
3186
3187 * section.c (asection): Add linker_has_input field.
3188 (STD_SECTION): Adjust initialization to suit.
3189 * ecoff.c (bfd_debug_section): Likewise.
3190 * bfd-in2.h: Regenerate.
3191
3192 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3193
3194 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3195 negative 32-bit operands to 16 operands when the operand is
3196 going to be zero-extended by the modified opcode.
3197
3198 2001-05-12 Peter Targett <peter.targett@arccores.com>
3199
3200 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3201 name for 'arc5' core versions.
3202 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3203
3204 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3205 architecture.
3206 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3207
3208 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3209
3210 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3211 sections as well.
3212 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3213 to .gnu.linkonce.t.FOO text section.
3214
3215 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3216
3217 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3218 fields, change sec into secinfo.
3219 (struct sec_merge_info): Add chain, remove last fields.
3220 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3221 (sec_merge_hash_lookup): If lookup could not use a string only
3222 because it has bad alignment, mark the old string for deletion.
3223 (sec_merge_add): Add secinfo argument. Don't compute entry's
3224 position, instead record the section.
3225 (sec_merge_emit): Update for the sec into secinfo change in
3226 struct sec_merge_hash_entry.
3227 (_bfd_merge_section): Only record the section for merging, defer
3228 putting strings into the hash table.
3229 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3230 _bfd_merge_sections): New functions.
3231 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3232 changes.
3233 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3234 (_bfd_nolink_bfd_merge_sections): Define.
3235 * libbfd.h: Likewise.
3236 (bfd_generic_merge_sections): Add prototype.
3237 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3238 (struct bfd_target): Likewise.
3239 * bfd.c (bfd_merge_sections): Define.
3240 * bfd-in2.h: Rebuilt.
3241 * elf.c (_bfd_elf_merge_sections): New function.
3242 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3243 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3244 * reloc.c (bfd_generic_merge_sections): New function.
3245 * vms.c (vms_bfd_merge_sections): New function.
3246 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3247 * aout-target.h (MY_bfd_merge_sections): Define.
3248 * aout-tic30.c (MY_bfd_merge_sections): Define.
3249 * binary.c (binary_bfd_merge_sections): Define.
3250 * bout.c (b_out_bfd_merge_sections): Define.
3251 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3252 * coffcode.c (coff_bfd_merge_sections): Define.
3253 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3254 * i386msdos.c (msdos_bfd_merge_sections): Define.
3255 * i386os9k.c (os9k_bfd_merge_sections): Define.
3256 * ieee.c (ieee_bfd_merge_sections): Define.
3257 * ihex.c (ihex_bfd_merge_sections): Define.
3258 * nlm-target.h (nlm_bfd_merge_sections): Define.
3259 * oasys.c (oasys_bfd_merge_sections): Define.
3260 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3261 * som.c (som_bfd_merge_sections): Define.
3262 * srec.c (srec_bfd_merge_sections): Define.
3263 * tekhex.c (tekhex_bfd_merge_sections): Define.
3264 * versados.c (versados_bfd_merge_sections): Define.
3265 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3266
3267 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3268
3269 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3270 to be unsigned long, in order to match its use.
3271
3272 2001-05-10 H.J. Lu <hjl@gnu.org>
3273
3274 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3275 indirect symbols.
3276
3277 2001-05-09 H.J. Lu <hjl@gnu.org>
3278
3279 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3280 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3281 Remove the unused veriable `dynver'.
3282
3283 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3284
3285 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3286 NULL or is not COFF.
3287 (coff_i386_rtype_to_howto): Don't dump core if output section
3288 owner is not COFF.
3289
3290 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3291
3292 * ecoff.c (bfd_debug_section): Fix initialization.
3293 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3294 is always a positive integer. Cast away sign mismatch.
3295 * elf32-mips.c: Fix misleading comment and typo.
3296 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3297 correct data type.
3298 * elflink.c: Fix typo.
3299 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3300 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3301
3302 2001-05-04 Richard Henderson <rth@redhat.com>
3303
3304 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3305
3306 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3307
3308 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3309 EF_ARM_HASENTRY if the start address is set.
3310
3311 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3312
3313 * targets.c (_bfd_target_vector_entries): Compute value based on
3314 the size of the _bfd_target_vector and not bfd_target_vector.
3315
3316 2001-05-03 H.J. Lu <hjl@gnu.org>
3317
3318 * elfcode.h: Include "libiberty.h".
3319
3320 * elflink.h (elf_link_add_object_symbols): Set
3321 elf_dt_name (abfd) to basename of the bfd filename.
3322 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3323 of the bfd filename.
3324
3325 2001-05-03 Andreas Jaeger <aj@suse.de>
3326
3327 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3328 (elf_generic_info_to_howto_rel): Likewise.
3329 * coff-alpha.c (reloc_nil): Likewise.
3330 (alpha_ecoff_bad_format_hook): Likewise.
3331 (alpha_adjust_reloc_out): Likewise.
3332 (alpha_bfd_reloc_type_lookup): Likewise.
3333 (alpha_convert_external_reloc): Likewise.
3334 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3335 (elf64_alpha_reloc_bad): Likewise.
3336 (elf64_alpha_reloc_gpdisp): Likewise.
3337 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3338 (elf64_alpha_info_to_howto): Likewise.
3339 (elf64_alpha_add_symbol_hook): Likewise.
3340 (elf64_alpha_create_got_section): Likewise.
3341 (elf64_alpha_is_local_label_name): Likewise.
3342 (elf64_alpha_merge_ind_symbols): Likewise.
3343 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3344 (mips_elf64_get_reloc_upper_bound): Likewise.
3345 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3346 (nlm_alpha_get_public_offset): Likewise.
3347
3348 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3349
3350 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3351 about overflow in R_OPENRISC_LO_16_IN_INSN and
3352 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3353
3354 2001-04-30 H.J. Lu <hjl@gnu.org>
3355
3356 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3357 only for ELF_LINK_FORCED_LOCAL.
3358 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3359 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3360 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3361
3362 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3363 if the symbol has hidden or internal visibility.
3364
3365 2001-04-30 Alan Modra <amodra@one.net.au>
3366
3367 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3368 calls to undefined weak symbols.
3369
3370 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3371
3372 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3373 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3374
3375 2001-04-27 Andreas Jaeger <aj@suse.de>
3376
3377 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3378 out handled entries.
3379 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3380 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3381 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3382 GOT32.
3383
3384 2001-04-27 Sean McNeil <sean@mcneil.com>
3385
3386 * config.bfd: Add arm-vxworks target.
3387 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3388 addend (fro VXworks targets).
3389
3390 2001-04-26 H.J. Lu <hjl@gnu.org>
3391
3392 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3393 valid.
3394
3395 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3396
3397 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3398 * bfd-in2.h: Regenerated.
3399
3400 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3401
3402 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3403 (struct sec_merge_hash): Remove alignment_power.
3404 (sec_merge_hash_newfunc): Clear alignment.
3405 (sec_merge_hash_lookup): Pass alignment as argument.
3406 Use hashp->root.next, not hashp->next to walk the hash chain.
3407 If a string already in the hashtable does not have required
3408 alignment, create a new hashtable entry.
3409 (sec_merge_init): Remove alignment_power argument.
3410 (sec_merge_add): Add alignment argument.
3411 (sec_merge_emit): Alignment is now a per-entity thing, not per
3412 section.
3413 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3414 for proper alignment.
3415 Pass alignment information to sec_merge_add.
3416
3417 2001-04-24 Christian Groessler <cpg@aladdin.de>
3418
3419 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3420 and R_REL16 reloc types; accept odd values for R_REL16 type
3421
3422 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3423
3424 * cpu-openrisc.c: New file.
3425 * elf32-openrisc.c: Likewise.
3426
3427 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3428 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3429 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3430 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3431 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3432 * Makefile.in: Regenerated.
3433 * config.bfd: (openrisc-*-elf): New target.
3434 * configure.in (bfd_elf32_openrisc_vec): New vector.
3435 * configure: Regenerated.
3436 * libbfd.h: Regenerated.
3437 * bfd-in2.h: Regenerated.
3438 * reloc.c: Add OpenRISC relocations.
3439 * targets.c (bfd_elf32_openrisc_vec): Declare.
3440 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3441 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3442 (bfd_openrisc_arch): Declare.
3443 (bfd_archures_list): Add bfd_openrisc_arch.
3444 * elf.c (prep_headers): Add bfd_arch_openrisc.
3445
3446 2001-04-23 Bo Thorsen <bo@suse.de>
3447
3448 * elf64-x86-64.c: Add c++ vtable hack.
3449 Small whitespace and comment changes.
3450
3451 2001-04-19 Andreas Jaeger <aj@suse.de>
3452
3453 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3454 (elf64_x86_64_plt_entry): Likewise.
3455 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3456 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3457
3458 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
3459
3460 * elf32-cris.c: Tweak comments related to dynamic linking.
3461 (cris_elf_relocate_section): When not creating shared object, fill
3462 in the .got table for any symbol not in the dynamic symbol table.
3463 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3464 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3465 table.
3466 (cris_elf_check_relocs): Use variable r_type in all places rather
3467 than the original expression. Add default case in switch for
3468 reloc types.
3469 (elf_cris_size_dynamic_sections): Iterate over
3470 elf_cris_discard_excess_program_dynamics when not creating shared
3471 library.
3472 (elf_cris_discard_excess_dso_dynamics): Renamed from
3473 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3474 (elf_cris_discard_excess_program_dynamics): New.
3475
3476 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3477
3478 * coffcode.h (coff_write_object_contents): Use
3479 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3480
3481 2001-04-14 H.J. Lu <hjl@gnu.org>
3482
3483 * bfd-in2.h: Regenerate.
3484
3485 2001-04-14 Jakub Jelinek <jakub@redhat.com>
3486
3487 * section.c (STD_SECTION): Add entsize.
3488
3489 2001-04-13 H.J. Lu <hjl@gnu.org>
3490
3491 * section.c (SEC_MERGE): Define new flag for merging.
3492 (SEC_STRINGS): Likewise.
3493 (entsize): New field.
3494
3495 2001-04-13 Roger Sayle <roger@metaphorics.com>
3496
3497 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3498 flag on pe-i386 targets.
3499
3500 2001-04-13 Jakub Jelinek <jakub@redhat.com>
3501
3502 * libbfd-in.h (_bfd_merge_section): New.
3503 (_bfd_write_merged_section): New.
3504 (_bfd_merged_section_offset): New.
3505 * libbfd.h: Rebuilt.
3506 * linker.c (_bfd_generic_link_output_symbols): Handle
3507 discard_sec_merge.
3508 * aoutx.h (aout_link_write_symbols): Likewise.
3509 * pdp11.c (aout_link_write_symbols): Likewise.
3510 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3511 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3512 sections.
3513 (elf_link_sec_merge_syms): New.
3514 (elf_link_input_bfd): Call _bfd_merged_section_offset
3515 and _bfd_write_merged_section.
3516 Handle discard_sec_merge.
3517 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3518 field.
3519 (struct bfd_elf_section_data): Likewise.
3520 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3521 SEC_STRINGS section flags and entsize from their ELF counterparts.
3522 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3523 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3524 from their BFD counterparts.
3525 * merge.c: New file.
3526 * Makefile.am: Add strtab.lo.
3527 * Makefile.in: Rebuilt.
3528
3529 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3530
3531 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3532 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3533
3534 2001-04-05 Steven J. Hill <sjhill@cotw.com>
3535
3536 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3537 endian MIPS ELF target.
3538 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3539 MIPS ELF target.
3540
3541 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3542 64bit big endian MIPS ELF target.
3543 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3544 endian MIPS ELF target.
3545 * configure: Regenerated.
3546
3547 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3548 little endian targets.
3549 (mips_elf_sym_is_global): Handle traditional targets.
3550
3551 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3552 64bit big endian MIPS ELF target.
3553 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3554 endian MIPS ELF target.
3555
3556 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3557 and bfd_elf64_tradlittlemips_vec.
3558
3559 2001-04-05 David Mosberger <davidm@hpl.hp.com>
3560
3561 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3562 ordinary "progbits" section.
3563
3564 2001-04-04 Alan Modra <alan@linuxcare.com.au>
3565
3566 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3567 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3568
3569 2001-04-03 David Mosberger <davidm@hpl.hp.com>
3570
3571 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3572
3573 2001-03-30 H.J. Lu <hjl@gnu.org>
3574
3575 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3576 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3577
3578 2001-03-26 H.J. Lu <hjl@gnu.org>
3579
3580 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3581 if there are any relocations for generic ELF.
3582 (bfd_elf32_bfd_link_add_symbols): Defined to
3583 elf32_generic_link_add_symbols.
3584 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3585 if there are any relocations for generic ELF.
3586 (bfd_elf64_bfd_link_add_symbols): Defined to
3587 elf64_generic_link_add_symbols.
3588
3589 2001-03-23 Nick Clifton <nickc@redhat.com>
3590
3591 * Makefile.am (BUILD_CFILES): New variable: List of C source
3592 files created in build directory.
3593 (BUILD_HFILES): New variable: List of header files created in
3594 build directory.
3595 (POTFILES): Delete.
3596 (po/POTFILES.in): Replace rule with empty entry.
3597 (po/SRC-POTFILES.in): New rule: Create a list of source files
3598 in the source directory.
3599 (po/BLD-POTFILES.in): New rule: Create a list of source files
3600 in the build directory.
3601 (MOSTLYCLEAN): Do not delete source files created in build
3602 directory.
3603 * Makefile.in: Regenerate.
3604 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3605 into po/Makefile.
3606 * configure: Regenerate.
3607
3608 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3609 and BLD_POTFILES.
3610 Add .. to the search path when building bfd.pot.
3611 Delete POTFILES when performing distclean.
3612 Add comment describing why distclean is broken in maintainer mode.
3613 * po/POTFILES.in: Delete.
3614 * po/SRC-POTFILES.in: New file.
3615 * po/BLD-POTFILES.in: New file.
3616 * po/bfd.pot: Regenerate.
3617
3618 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
3619
3620 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3621 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3622 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3623 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3624 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3625 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3626 functions.
3627 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3628 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3629 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3630 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3631 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3632 New HOWTO members for new relocs.
3633 (cris_reloc_map): Map new relocs.
3634 (ELF_DYNAMIC_INTERPRETER): Define.
3635 (PLT_ENTRY_SIZE): Define.
3636 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3637 elf_cris_pic_plt_entry): New, PLT templates.
3638 (struct elf_cris_pcrel_relocs_copied, struct
3639 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3640 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3641 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3642 positive values. Adjust PCREL relocs to be relative to location
3643 after relocation.
3644 (cris_elf_relocate_section): Handle relocations to dynamic
3645 objects. Handle new relocations. Call error handler when seeing
3646 non-PIC relocation for read-only sections while generating shared
3647 object.
3648 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3649 entries.
3650 (bfd_elf32_bfd_link_hash_table_create,
3651 elf_backend_adjust_dynamic_symbol,
3652 elf_backend_size_dynamic_sections,
3653 elf_backend_finish_dynamic_symbol,
3654 elf_backend_finish_dynamic_sections,
3655 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3656 elf_backend_hide_symbol, elf_backend_want_got_plt,
3657 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3658 elf_backend_got_header_size, elf_backend_plt_header_size):
3659 Define.
3660
3661 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3662 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3663 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3664 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3665 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3666 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3667 * bfd-in2.h, libbfd.h: Regenerate.
3668
3669 2001-03-21 Diego Novillo <dnovillo@redhat.com>
3670
3671 (_bfd_mips_elf_relocate_section): Give a better error message when
3672 a relocation is not recognized.
3673
3674 2001-03-21 Alan Modra <alan@linuxcare.com.au>
3675
3676 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3677 non-NULL before attempting to dereference.
3678
3679 2001-03-20 H.J. Lu <hjl@gnu.org>
3680
3681 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3682 * configure: Rebuild.
3683
3684 2001-03-20 Andreas Schwab <schwab@suse.de>
3685
3686 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3687 relocation value when resolving a reference from a debugging
3688 section.
3689
3690 2001-03-16 Scott Thomason <SThomaso@hii.com>
3691
3692 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3693 (xcoff64_swap_sym_out): Fix syntax errors.
3694
3695 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
3696
3697 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3698
3699 2001-03-15 Alan Modra <alan@linuxcare.com.au>
3700
3701 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3702 (hppa_link_hash_newfunc): Init it.
3703 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3704 section appears to be non-PIC.
3705 (final_link_relocate): Likewise.
3706 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3707 possible candidate function, and set pic_call for those that will
3708 only have a .plt entry for the PIC call stub.
3709 (hppa_handle_PIC_calls): Set maybe_pic_call.
3710
3711 2001-03-12 DJ Delorie <dj@redhat.com>
3712
3713 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3714 R_SH_DIR8WP* relocs if they're against external symbols, else
3715 they're just for relaxing. Validate the reloc values.
3716
3717 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3718
3719 * binary.c (bfd_external_binary_architecture): Declare.
3720 (binary_object_p): If bfd_external_binary_architecture is defined,
3721 set the architecture to this string.
3722
3723 2001-03-11 Philip Blundell <philb@gnu.org>
3724
3725 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3726 entries that could serve as a definition for a weak symbol.
3727
3728 2001-03-08 Nick Clifton <nickc@redhat.com>
3729
3730 * Most files: Update copyright notices using Perl script created
3731 by Kevin Buettner <kevinb@redhat.com>.
3732
3733 2001-03-07 Nick Clifton <nickc@redhat.com>
3734
3735 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3736 prior patch on ! defined OLD_ARM_ABI.
3737
3738 2001-03-07 Andreas Jaeger <aj@suse.de>
3739
3740 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3741 some relocation values.
3742
3743 2001-03-06 Nick Clifton <nickc@redhat.com>
3744
3745 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3746 of offset in BLX(1) instruction.
3747 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3748 offset in BLX(1) instruction.
3749 Fix formatting.
3750
3751 2001-03-06 Nick Clifton <nickc@redhat.com>
3752
3753 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3754 BFD_RELOC_THUMB_PCREL_BLX.
3755
3756 2001-03-06 Igor Shevlyakov <igor@windriver.com>
3757
3758 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3759 * bfd-in2.h: Regenerate.
3760 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3761 * ieee.c (ieee_write_processor): Set proper id for
3762 Coldfire CPUs.
3763
3764 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3765
3766 * configure.in: Add s390 target.
3767 * configure: Regenerate.
3768
3769 2001-02-28 Andreas Jaeger <aj@suse.de>
3770
3771 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3772 to addend.
3773
3774 2001-02-28 Philip Blundell <pb@futuretv.com>
3775
3776 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3777 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3778
3779 2001-02-27 H.J. Lu <hjl@gnu.org>
3780
3781 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3782 abfd->tdata.aout_data == NULL.
3783
3784 2001-02-27 Alan Modra <alan@linuxcare.com.au>
3785
3786 * elf32-hppa.c: Correct field selector in stub comments.
3787 (clobber_millicode_symbols): Formatting fix.
3788
3789 * configure.in: Bump version to 2.11.90.
3790 * configure: Regenerate.
3791 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3792 (CFILES): $SOURCE_CFILES + generated C files.
3793 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3794 Run "make dep-am"
3795 * Makefile.in: Regenerate.
3796 * doc/Makefile.in: This too.
3797
3798 2001-02-26 Timothy Wall <twall@cygnus.com>
3799
3800 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3801 comments.
3802
3803 2001-02-26 Nick Clifton <nickc@redhat.com>
3804
3805 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3806 up, replacing multiple if statements with a switch.
3807 (handle_COMDAT): New function.
3808
3809 2001-02-26 H.J. Lu <hjl@gnu.org>
3810
3811 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3812 a warning for section flags we do not handle instead of
3813 aborting.
3814
3815 2001-02-26 Andreas Jaeger <aj@suse.de>
3816
3817 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3818
3819 2001-02-22 Timothy Wall <twall@cygnus.com>
3820
3821 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3822 * configure.in: Add objects for elf64_ia64_aix vectors.
3823 * configure: Regenerated.
3824 * configure.host: Recognize ia64-*-aix*.
3825 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3826 for AIX. AIX5 requires most relocations to be dynamic (*all*
3827 binaries are somewhat similar to shared libraries).
3828 * targets.c: Add elf64_ia64_aix vectors.
3829
3830 2001-02-21 David Mosberger <davidm@hpl.hp.com>
3831
3832 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3833 C8 said "1" instead of "8". Clarify error string for IMM22:
3834 "signed integer" instead of just "integer".
3835
3836 2001-02-20 Andreas Jaeger <aj@suse.de>
3837
3838 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3839 PLT entries that could serve as a definition for a weak symbol.
3840
3841 2001-02-19 Jakub Jelinek <jakub@redhat.com>
3842
3843 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3844 entries that could serve as a definition for a weak symbol.
3845 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3846
3847 2001-02-18 David O'Brien <obrien@FreeBSD>
3848
3849 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3850 FreeBSD/i386-CURRENT differently until I can figure out the needed
3851 corefile changes.
3852 * configure: Regenerate.
3853 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3854 FreeBSD/PowerPC, and FreeBSD/sparc64.
3855
3856 2001-02-18 lars brinkhoff <lars@nocrew.org>
3857
3858 * Makefile.am: Add PDP-11 a.out target.
3859 * config.bfd: Likewise.
3860 * configure.in: Likewise.
3861 * targets.c: Likewise.
3862 * archures.c: Likewise.
3863 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3864 * libbfd.h: Add PDP-11 relocations.
3865 * reloc.c: Likewise.
3866 * cpu-pdp11.c: New file.
3867 * pdp11.c: New file.
3868
3869 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3870 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3871 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3872 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3873 (GET_MAGIC): New macro.
3874 (PUT_MAGIC): Likewise.
3875 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3876
3877 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3878
3879 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3880 multiarch needs it).
3881
3882 2001-02-18 H.J. Lu <hjl@gnu.org>
3883
3884 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3885 index.
3886
3887 2001-02-18 Kazu Hirata <kazu@hxi.com>
3888
3889 * vms-misc.c: Fix formatting.
3890
3891 2001-02-16 Kazu Hirata <kazu@hxi.com>
3892
3893 * vms.c: Fix formatting.
3894
3895 2001-02-14 H.J. Lu <hjl@gnu.org>
3896
3897 * elf.c (elf_find_function): New function.
3898 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3899 the file name and function name.
3900
3901 2001-02-14 Nick Clifton <nickc@redhat.com>
3902
3903 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3904 asection structure.
3905
3906 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3907 (BFD64_BACKENDS): Add pepigen.c
3908 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3909
3910 * Makefile.in: Regenerate.
3911 * configure: Regenerate.
3912 * po/POTFILES.in: Regenerate.
3913 * po/bfd.pot: Regenerate.
3914
3915 2001-02-14 H.J. Lu <hjl@gnu.org>
3916
3917 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3918 force_minimum_alignment.
3919
3920 2001-02-14 Bo Thorsen <bo@suse.de>
3921
3922 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3923 (elf64_86_64_size_info): Struct added to fix a problem
3924 with the hashtable string entries.
3925 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3926 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3927 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3928 remove the FIXME for this.
3929 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3930 section. Also removed the FIXME for it.
3931 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3932 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3933 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3934
3935 2001-02-13 Richard Henderson <rth@redhat.com>
3936
3937 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3938 and not user provided.
3939
3940 2001-02-13 Kazu Hirata <kazu@hxi.com>
3941
3942 * vms.c (vms_print_symbol): Remove unreachable code.
3943
3944 * rs6000-core.c: Fix formatting.
3945
3946 2001-02-13 David Mosberger <davidm@hpl.hp.com>
3947
3948 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3949 as _bfd_XXi_only_swap_filehdr_out.
3950 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3951 pe->force_minimum_alignment to TRUE.
3952 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3953 PEI_TARGET_SUBSYSTEM.
3954 (pe_print_private_bfd_data): Call
3955 _bfd_XX_print_private_bfd_data_common() instead of
3956 _bfd_pe_print_private_bfd_data_common().
3957 (pe_bfd_copy_private_bfd_data): Call
3958 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3959 _bfd_pe_bfd_copy_private_bfd_data_common().
3960 (coff_bfd_copy_private_section_data): Define as
3961 _bfd_XX_bfd_copy_private_section_data instead of
3962 _bfd_pe_bfd_copy_private_section_data.
3963 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3964 of a _bfd_pe_get_symbol_info.
3965
3966 * peigen.c: Delete.
3967
3968 * peXXigen.c: Renamed from peigen.c.
3969 (COFF_WITH_XX): Define this macro (will get expanded into
3970 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3971 compiled as peigen.c or pepigen.c.
3972 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3973 define the canonical PEP structures and definitions.
3974 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3975 effect, enforce minimum file and section alignments. If
3976 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3977 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3978 so, by default, this is a no-op).
3979
3980 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3981 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3982 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3983 _bfd_pefoo if it's not defined. Use these macros to define
3984 coff swap macros.
3985
3986 * libcoff.h (pe_tdata): Add members target_subsystem and
3987 force_minimum_alignment.
3988
3989 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3990 COFF_WITH_pep.
3991 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3992
3993 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3994 peigen.lo.
3995
3996 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3997 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3998 PEPAOUTHDR.
3999
4000 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4001 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4002 (peigen.c): Add rule to generate from peXXigen.c.
4003 (pepigen.c): Ditto.
4004 (pepigen.lo): List dependencies for pepigen.lo.
4005
4006 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4007
4008 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4009 $global$ referenced but not defined, set its value here.
4010
4011 2001-02-09 Bo Thorsen <bo@suse.de>
4012
4013 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4014 alignment to 3.
4015 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4016 and relocation.
4017 (elf64_x86_64_relocate_section): Fix formatting.
4018 (elf64_x86_64_relocate_section): Fix addend for relocation of
4019 R_X86_64_(8|16|32|PC8|PC16|PC32).
4020
4021 2001-02-12 Jan Hubicka <jh@suse.cz>
4022
4023 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4024
4025 2001-02-11 H.J. Lu <hjl@gnu.org>
4026
4027 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4028 alignment.
4029
4030 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4031
4032 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4033 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4034 relocations against dynsym symbols.
4035
4036 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4037 the R_MIPS_26 relocation.
4038 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4039 the R_MIPS_26 relocation.
4040 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4041 relocation.
4042 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4043 the R_MIPS_26 relocation.
4044 (mips_elf64_howto_table_rela): Likewise.
4045
4046 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4047 member to mark symbols that have non-CALL relocations against
4048 them.
4049 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4050 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4051 R_MIPS_GOT16.
4052 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4053 non-CALL relocation against it is encountered.
4054 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4055 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4056 no_fn_stub is not set.
4057
4058 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4059 information from the real symbol for indirect ones.
4060 Check no_fn_stub to find out if a symbol has a function stub
4061 indeed.
4062
4063 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4064
4065 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4066 * Makefile.in: Regenerate.
4067
4068 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4069
4070 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4071 true if section name is an unwind table section name.
4072 (elfNN_ia64_additional_program_headers): Count each unwind section
4073 separately.
4074 (elfNN_ia64_modify_segment_map): Install one unwind program header
4075 for each unwind separate section. Note: normally the linker
4076 script merges the unwind sections that go into a single segment,
4077 so this still generates at most one unwind program header per
4078 segment.
4079
4080 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4081 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4082 (elfNN_ia64_fake_sections): Mark sections with names that start
4083 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4084 unwind section.
4085
4086 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4087 Use it to make sh_info in unwind section point to the text section
4088 it applies to.
4089
4090 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4091
4092 * Makefile.am: Add linux target for S/390.
4093 * archures.c: Likewise.
4094 * bfd-in2.h: Likewise.
4095 * config.bfd: Likewise.
4096 * configure.in: Likewise.
4097 * elf.c: Likewise.
4098 * libbfd.h: Likewise.
4099 * targets.c: Likewise.
4100 * cpu-s390.c: New file.
4101 * elf32-s390.c: New file.
4102 * elf64-s390.c: New file.
4103
4104 2001-02-09 Nick Clifton <nickc@redhat.com>
4105
4106 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4107 ImageBase. This has already been done by coff_swap_hdr_in.
4108
4109 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4110
4111 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4112
4113 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4114
4115 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4116 (sparc64_elf_relocate_section): Likewise.
4117
4118 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4119
4120 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4121 similar to R_SPARC_32.
4122 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4123
4124 2001-02-08 H.J. Lu <hjl@gnu.org>
4125
4126 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4127 relocation entries for weak definitions when building DSO with
4128 -Bsymbolic.
4129
4130 2001-02-08 Richard Henderson <rth@redhat.com>
4131
4132 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4133 before visibility. Locally defined protected symbols are not
4134 dynamic.
4135
4136 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4137
4138 * config.bfd: Enable coff64 for rs6000-*. Patch from
4139 <hzoli@austin.ibm.com>.
4140
4141 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4142
4143 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4144 found, do not attempt to find dwarf2 info before returning.
4145
4146 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4147
4148 * elflink.h (is_global_symbol_definition): Rename to
4149 is_global_data_symbol_definition and have it reject function
4150 symbols.
4151 (elf_link_is_defined_archive_symbol): Use renamed function.
4152
4153 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4154
4155 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4156 * libbfd.h (bfd_target_vector): Likewise.
4157 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4158 make static; create pointer reference named bfd_target_vector.
4159 (_bfd_target_vector_entries): Calculate this based on the array
4160 typed _bfd_target_vector.
4161
4162 2001-02-06 H.J. Lu <hjl@gnu.org>
4163
4164 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4165 internal symbols are not dynamic.
4166 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4167
4168 2001-02-06 Nick Clifton <nickc@redhat.com>
4169
4170 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4171 that it will not be pulled into the list of files that make up
4172 po/POTFILES.in.
4173 * Makefile.in: Regenerate.
4174 * po/bfd.pot: Regenerate.
4175
4176 2001-02-06 H.J. Lu <hjl@gnu.org>
4177
4178 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4179 checking.
4180 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4181 external_PEI_IMAGE_hdr.
4182
4183 2001-02-06 Kazu Hirata <kazu@hxi.com>
4184
4185 * elf-m10200.c: Fix formatting.
4186
4187 2001-02-04 Nick Clifton <nickc@redhat.com>
4188
4189 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4190 rel, it will be handled later on.
4191
4192 2001-02-02 Fred Fish <fnf@ninemoons.com>
4193
4194 * Makefile.in: Fix typo.
4195
4196 2001-02-01 Kazu Hirata <kazu@hxi.com>
4197
4198 * elf-m10300.c: Fix formatting.
4199
4200 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4201
4202 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4203 (elf_backend_get_symbol_type): Define.
4204 (elf64_hppa_object_p): Set architecture and machine from elf
4205 header flags.
4206
4207 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4208
4209 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4210 before mdebug.
4211
4212 2001-01-26 Richard Henderson <rth@redhat.com>
4213
4214 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4215 for non-default visibility.
4216 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4217 delete ugly macro and replace with pretty function.
4218
4219 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4220
4221 * coff-go32.c: Update copyright.
4222 * coff-stgo32.c: Likewise.
4223 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4224 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4225 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4226 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4227
4228 2001-01-25 Kazu Hirata <kazu@hxi.com>
4229
4230 * bfd-in2.h: Rebuild.
4231 * libbfd.h: Likewise.
4232
4233 2001-01-23 H.J. Lu <hjl@gnu.org>
4234
4235 * bfd-in2.h: Rebuild.
4236
4237 2001-01-23 H.J. Lu <hjl@gnu.org>
4238
4239 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4240 is NULL or PRIV(vms_rec) is outside of the buffer.
4241
4242 2001-01-23 Kazu Hirata <kazu@hxi.com>
4243
4244 * coff64-rs6000.c: Fix formatting.
4245 * coff-arm.c: Likewise.
4246 * coffgen.c: Likewise.
4247 * cofflink.c: Likewise.
4248 * coff-mcore.c: Likewise.
4249 * coff-mips.c: Likewise.
4250 * coff-pmac.c: Likewise.
4251 * coff-ppc.c: Likewise.
4252 * coff-rs6000.c: Likewise.
4253 * elf32.c: Likewise.
4254 * elf32-fr30.c: Likewise.
4255 * elf32-i370.c: Likewise.
4256 * elf32-i860.c: Likewise.
4257 * elf32-m32r.c: Likewise.
4258 * elf32-m68k.c: Likewise.
4259 * elf32-mcore.c: Likewise.
4260 * elf32-ppc.c: Likewise.
4261 * elf32-sh.c: Likewise.
4262 * elf32-v850.c: Likewise.
4263 * elf64-alpha.c: Likewise.
4264 * elf64-sparc.c: Likewise.
4265 * elflink.c: Likewise.
4266 * elflink.h: Likewise.
4267 * elf-m10200.c: Likewise.
4268 * elf-m10300.c: Likewise.
4269 * elfxx-ia64.c: Likewise.
4270
4271 * aoutx.h: Fix formatting.
4272 * bfd.c: Likewise.
4273 * bfd-in2.h: Likewise.
4274 * bfd-in.h: Likewise.
4275 * cpu-i386.c: Likewise.
4276 * cpu-m68hc11.c: Likewise.
4277 * dwarf2.c: Likewise.
4278 * elf64-x86-64.c: Likewise.
4279 * format.c: Likewise.
4280 * freebsd.h: Likewise.
4281 * hash.c: Likewise.
4282 * hp300hpux.c: Likewise.
4283 * hppabsd-core.c: Likewise.
4284 * hpux-core.c: Likewise.
4285
4286 2001-01-22 Bo Thorsen <bo@suse.de>
4287
4288 * elf64-x86-64.c: Added PIC support for X86-64.
4289 (elf64_x86_64_link_hash_newfunc): Function added.
4290 (elf64_x86_64_link_hash_table_create): Likewise.
4291 (elf64_x86_64_check_relocs): Likewise.
4292 (elf64_x86_64_gc_mark_hook): Likewise.
4293 (elf64_x86_64_gc_sweep_hook): Likewise.
4294 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4295 (elf64_x86_64_size_dynamic_sections): Likewise.
4296 (elf64_x86_64_discard_copies): Likewise.
4297 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4298 (elf64_x86_64_finish_dynamic_sections): Likewise.
4299 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4300
4301 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4302
4303 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4304 * Makefile.in: Regenerate.
4305
4306 2001-01-21 Kazu Hirata <kazu@hxi.com>
4307
4308 * coff-a29k.c: Fix formatting.
4309
4310 2001-01-19 H.J. Lu <hjl@gnu.org>
4311
4312 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4313 relocation section names.
4314 (elf_i386_relocate_section): Report files with bad relocation
4315 section names and return false.
4316
4317 2001-01-17 Bo Thorsen <bo@suse.de>
4318
4319 * targets.c: Alphabetize list of xvecs.
4320
4321 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4322
4323 * config.bfd: Add linux target variant for elfxx-hppa.
4324 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4325 bfd_elf64_hppa_linux_vec.
4326 * configure: Regenerate.
4327 * elf64-hppa.c: Include elf64-target.h again to support linux
4328 target variant.
4329 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4330 * elf32-hppa.c: Include elf32-target.h again to support linux
4331 target variant.
4332 (elf32_hppa_post_process_headers): New function.
4333 (elf_backend_post_process_headers): Define.
4334 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4335 bfd_elf32_hppa_linux_vec.
4336
4337 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4338 and data_segment_base fields.
4339 (elf32_hppa_link_hash_table_create ): Init them.
4340 (elf32_hppa_check_relocs): Update comments.
4341 (hppa_record_segment_addr): New function.
4342 (elf32_hppa_relocate_section): Call it.
4343 (final_link_relocate): Handle R_PARISC_SEGREL32.
4344 (elf32_hppa_final_link): New function.
4345 (bfd_elf32_bfd_final_link): Define to call it.
4346 (hppa_unwind_entry_compare): New function.
4347 * cache.c (bfd_open_file): Create files in write+read mode.
4348
4349 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4350 SEGREL32 and numerous other relocs. Change duplicate
4351 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4352
4353 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4354 O_ACCMODE.
4355
4356 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4357 .plt entries for DT_INIT and DT_FINI.
4358 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4359 DT_INIT and DT_FINI.
4360
4361 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4362 offsets for stub .plt access if wide mode. Check offset in range.
4363
4364 2001-01-13 Nick Clifton <nickc@redhat.com>
4365
4366 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4367 line.
4368
4369 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4370 line.
4371
4372 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4373
4374 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4375 * configure: Regenerate.
4376
4377 2001-01-11 Peter Targett <peter.targett@arccores.com>
4378
4379 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4380 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4381 * cpu-arc.c (arch_info_struct): Add entries for variants.
4382 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4383 (arc_get_mach) Don't assume machine names prefixed arc- before
4384 testing.
4385 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4386 selections.
4387 (arc_elf_final_write_processing) Likewise.
4388 (ELF_MACHINE_CODE) Use EM_ARC.
4389
4390 2001-01-10 Nick Clifton <nickc@redhat.com>
4391
4392 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4393
4394 2001-01-07 Philip Blundell <philb@gnu.org>
4395
4396 * README: Replace `bug-gnu-utils@gnu.org' with
4397 `bug-binutils@gnu.org'.
4398
4399 2001-01-04 Kazu Hirata <kazu@hxi.com>
4400
4401 * som.c: Fix formatting.
4402
4403 2001-01-03 Kazu Hirata <kazu@hxi.com>
4404
4405 * ecoffswap.h: Fix formatting.
4406 * elf-bfd.h: Likewise.
4407 * elfarm-nabi.c: Likewise.
4408 * elfarm-oabi.c: Likewise.
4409 * elfcode.h: Likewise.
4410 * elfcore.h: Likewise.
4411 * elflink.c: Likewise.
4412 * elflink.h: Likewise.
4413 * elfxx-ia64.c: Likewise.
4414 * elfxx-target.h: Likewise.
4415 * libbfd.c: Likewise
4416 * linker.c: Likewise.
4417 * lynx-core.c: Likewise.
4418
4419 2001-01-02 Kazu Hirata <kazu@hxi.com>
4420
4421 * pc532-mach.c: Fix formatting.
4422 * pe-arm.c: Likewise.
4423 * pe-i386.c: Likewise.
4424 * pe-mips.c: Likewise.
4425 * pe-ppc.c: Likewise.
4426 * pe-sh.c: Likewise.
4427 * pei-mips.c: Likewise.
4428 * pei-sh.c: Likewise.
4429 * peicode.h: Likewise.
4430 * ppcboot.c: Likewise.
4431 * ptrace-core.c: Likewise.
4432
4433 2001-01-01 Kazu Hirata <kazu@hxi.com>
4434
4435 * reloc.c: Fix formatting.
4436 * riscix.c: Likewise.
4437 * rs6000-core.c: Likewise.
4438 * xcoff-target.h: Likewise.
4439
4440 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4441
4442 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4443 error, by calling bfd_default_set_arch_mach with incoming
4444 values.
4445
4446 2000-12-26 Kazu Hirata <kazu@hxi.com>
4447
4448 * vaxnetbsd.c: Fix formatting.
4449 * versados.c: Likewise.
4450 * vms-gsd.c: Likewise.
4451 * vms-hdr.c: Likewise.
4452 * vms-misc.c: Likewise.
4453
4454 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4455
4456 * archive.c (coff_write_armap): Don't write more than symbol_count
4457 `archive_member_file_ptr's.
4458
4459 2000-12-25 Kazu Hirata <kazu@hxi.com>
4460
4461 * vms-tir.c: Fix formatting.
4462
4463 2000-12-23 Kazu Hirata <kazu@hxi.com>
4464
4465 * vms.c: Fix formatting.
4466 * vms.h: Likewise.
4467
4468 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4469
4470 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4471
4472 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4473
4474 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4475 arithmetic.
4476
4477 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4478
4479 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4480
4481 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
4482
4483 * libbfd.c (bfd_get_bits): Added
4484 (bfd_put_bits): Likewise
4485 * bfd-in.h: Declared the above.
4486 * bfd-in2.h: Regenerated.
4487
4488 2000-12-20 Kazu Hirata <kazu@hxi.com>
4489
4490 * targets.c: Fix formatting.
4491 * tekhex.c: Likewise.
4492 * trad-core.c: Likewise.
4493
4494 2000-12-19 Kazu Hirata <kazu@hxi.com>
4495
4496 * sco5-core.c: Fix formatting.
4497 * section.c: Likewise.
4498 * sparclinux.c: Likewise.
4499 * sparclynx.c: Likewise.
4500 * sparcnetbsd.c: Likewise.
4501 * srec.c: Likewise.
4502 * stabs.c: Likewise.
4503 * stab-syms.c: Likewise.
4504 * sunos.c: Likewise.
4505 * syms.c: Likewise.
4506 * sysdep.h: Likewise.
4507
4508 2000-12-18 Nick Clifton <nickc@redhat.com>
4509
4510 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4511 defined.
4512 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4513 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4514
4515 2000-12-18 Nick Clifton <nickc@redhat.com>
4516
4517 * vms-misc.c (_bfd_vms_get_record): Add default case to
4518 file_format switch.
4519
4520 2000-12-15 Miloslav Trmac <mitr@volny.cz>
4521
4522 * elfcore.h (elf_core_file_p): Move to the start of the program
4523 headers before attempting to read them.
4524
4525 2000-12-14 Kazu Hirata <kazu@hxi.com>
4526
4527 * peigen.c: Fix formatting.
4528 * som.c: Likewise.
4529 * som.h: Likewise.
4530
4531 2000-12-13 Kazu Hirata <kazu@hxi.com>
4532
4533 * peigen.c: Fix formatting.
4534
4535 2000-12-12 Jim Wilson <wilson@redhat.com>
4536
4537 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4538
4539 2000-12-08 Mark Salter <msalter@redhat.com>
4540
4541 * binary.c (binary_set_section_contents): Ignore sections
4542 with zero size.
4543
4544 2000-12-12 Kazu Hirata <kazu@hxi.com>
4545
4546 * m68klinux.c: Fix formatting.
4547 * m68knetbsd.c: Likewise.
4548 * mipsbsd.c: Likewise.
4549 * netbsd-core.c: Likewise.
4550 * netbsd.h: Likewise.
4551 * newsos3.c: Likewise.
4552 * nlm32-alpha.c: Likewise.
4553 * nlm32-i386.c: Likewise.
4554 * nlm32-ppc.c: Likewise.
4555 * nlm32-sparc.c: Likewise.
4556 * nlmcode.h: Likewise.
4557 * nlmswap.h: Likewise.
4558 * nlm-target.h: Likewise.
4559 * ns32knetbsd.c: Likewise.
4560
4561 2000-12-10 Fred Fish <fnf@be.com>
4562
4563 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4564 symbols in shared objects if allow_shlib_undefined is true.
4565
4566 2000-12-12 Nick Clifton <nickc@redhat.com>
4567
4568 * cpu-sh.c: Fix formattng.
4569 * elf.c: Fix formattng.
4570 * elf32-mips.c: Fix formattng.
4571 * elf32-sh.c: Fix formattng.
4572 * elf64-alpha.c: Fix formattng.
4573
4574 2000-12-09 Nick Clifton <nickc@redhat.com>
4575
4576 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4577 dwarf2_find_line_info as last parameter to invocation of
4578 _bfd_dwarf2_find_nearest_line.
4579 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4580 dwarf2_find_line_info as last parameter to invocation of
4581 _bfd_dwarf2_find_nearest_line.
4582
4583 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4584
4585 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4586 (BFD_LIBS): ...to here.
4587 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4588 (BFD_LIBS_CFILES): ...to here.
4589 * Makefile.in: Regenerate.
4590 * configure.in: Remove dwarf.lo from the elf shell variable.
4591 * configure: Regenerate.
4592 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4593 * libcoff.h: Regenerate.
4594 * coffgen.c (coff_find_nearest_line): Call
4595 _bfd_dwarf2_find_nearest_line.
4596 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4597 accordingly.
4598 (read_abbrevs): Likewise
4599 (decode_line_info): Likewise.
4600 (parse_comp_unit): Likewise.
4601 (comp_unit_find_nearest_line): Likewise.
4602 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4603 * libbfd.h: Regenerate.
4604 * elf.c (_bfd_elf_find_nearest_line): Update call.
4605 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4606 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4607 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4608 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4609 (styp_to_sec_flags): Handle DWARF2 sections.
4610 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4611 to _bfd_find_nearest_line.
4612 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4613 call to _bfd_find_nearest_line.
4614
4615 2000-12-08 Kazu Hirata <kazu@hxi.com>
4616
4617 * coffgen.c: Fix formatting.
4618 * elf-m10300.c: Likewise.
4619 * elf32-i386.c: Likewise.
4620 * elf32-i960.c: Likewise.
4621 * elf32-m68k.c: Likewise.
4622 * elf32-mcore.c: Likewise.
4623 * elf32-ppc.c: Likewise.
4624 * elf32-sh.c: Likewise.
4625 * elf32-sparc.c: Likewise.
4626 * elf32-v850.c: Likewise.
4627 * elf64-alpha.c: Likewise.
4628 * elf64-hppa.c: Likewise.
4629 * elf64-mips.c: Likewise.
4630 * elf64-sparc.c: Likewise.
4631
4632 2000-12-07 Kazu Hirata <kazu@hxi.com>
4633
4634 * elf32-ppc.c: Fix formatting.
4635 * elf64-x86-64.c: Likewise.
4636
4637 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4638
4639 From Ralf Baechle <ralf@gnu.org>
4640
4641 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4642 BFDs containing no sections or empty .text, .data or .bss sections
4643 to be merged, regardless of their flags.
4644
4645 2000-12-06 Kazu Hirata <kazu@hxi.com>
4646
4647 * elf32-m32r.c: Fix formatting.
4648 * elf32-m68hc11.c: Likewise.
4649 * elf32-m68hc12.c: Likewise.
4650 * elf32-m68k.c: Likewise.
4651 * elf32-mcore.c: Likewise.
4652 * elf32-pj.c: Likewise.
4653 * elf32-ppc.c: Likewise.
4654
4655 2000-12-05 Kazu Hirata <kazu@hxi.com>
4656
4657 * elf32-fr30.c: Fix formatting.
4658 * elf32-hppa.c: Likewise.
4659 * elf32-i370.c: Likewise.
4660 * elf32-i386.c: Likewise.
4661 * elf32-i860.c: Likewise.
4662 * elf32-i960.c: Likewise.
4663
4664 2000-12-03 Kazu Hirata <kazu@hxi.com>
4665
4666 * elf32-arm.h: Fix formatting.
4667 * elf32-avr.c: Likewise.
4668 * elf32-cris.c: Likewise.
4669 * elf32-d10v.c: Likewise.
4670 * elf32-d30v.c: Likewise.
4671 * elf-hppa.h: Likewise.
4672 * elf-m10200.c: Likewise.
4673 * elf-m10300.c: Likewise.
4674
4675 2000-12-01 Chris Demetriou <cgd@sibyte.com>
4676
4677 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4678 bfd_mach_mips32_4k. Update FIXME comment.
4679 * archures.c (bfd_mach_mips32): New constant.
4680 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4681 the latter, renumber it.
4682 * bfd-in2.h (bfd_mach_mips32): New constant.
4683 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4684 the latter, renumber it.
4685 * cpu-mips.c (I_mips32): New constant.
4686 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4687 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4688 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4689 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4690 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4691 with E_MIPS_MACH_MIPS32_4K.
4692 (_bfd_mips_elf_final_write_processing): Replace
4693 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4694 bfd_mach_mips32 case.
4695 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4696 comparison with support for MIPS32.
4697 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4698 MIPS32.
4699
4700 * aoutx.h (NAME(aout,machine_type)): Add cases for
4701 bfd_mach_mips5 and bfd_mach_mips64.
4702 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4703 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4704 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4705 (arch_info_struct): Add entries for bfd_mach_mips5 and
4706 bfd_mach_mips64.
4707 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4708 _bfd_mips_elf_print_private_bfd_data): Add cases for
4709 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4710 (_bfd_mips_elf_final_write_processing): Add cases for
4711 bfd_mach_mips5 and bfd_mach_mips64.
4712
4713 * aoutx.h (NAME(aout,machine_type)): Add a
4714 bfd_mach_mips_sb1 case.
4715 * archures.c (bfd_mach_mips_sb1): New constant.
4716 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4717 * cpu-mips.c (I_sb1): New constant.
4718 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4719 * elf32-mips.c (elf_mips_mach): Add case for
4720 E_MIPS_MACH_SB1.
4721 (_bfd_mips_elf_final_write_processing): Add case for
4722 bfd_mach_mips_sb1.
4723
4724 2000-12-01 Joel Sherrill <joel@OARcorp.com>
4725
4726 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4727 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4728 (sparc*-*-rtems*): Switched from a.out to ELF.
4729
4730 2000-11-30 Jan Hubicka <jh@suse.cz>
4731
4732 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4733 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4734 (elf64-x86-64.lo): Add dependencies.
4735 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4736 bfd_mach_x86_64_intel_syntax.
4737 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4738 * config.bfd (x86_64): Add.
4739 * configure.in: Add support for bfd_elf64_x86_64_vec.
4740 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4741 (bfd_i386_arch, i8086_ar): Link in.
4742 * elf64-x86-64.c: New file.
4743 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4744 * targets.c (bfd_elf64_x86_64_vec): Add.
4745 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4746
4747 2000-11-30 Kazu Hirata <kazu@hxi.com>
4748
4749 * xcofflink.c: Fix formatting.
4750
4751 2000-11-28 Kazu Hirata <kazu@hxi.com>
4752
4753 * aoutx.h: Fix formatting.
4754 * bfd-in.h: Likewise.
4755 * bfd-in2.h: Likewise.
4756 * cache.c: Likewise.
4757 * cisco-core.c: Likewise.
4758 * coff64-rs6000.c: Likewise.
4759 * coffcode.h: Likewise.
4760 * coffswap.h: Likewise.
4761 * corefile.c: Likewise.
4762 * elf32-mips.c: Likewise.
4763
4764 2000-11-27 Kazu Hirata <kazu@hxi.com>
4765
4766 * aout-adobe.c: Fix formatting.
4767 * coff64-rs6000.c: Likewise.
4768 * coffgen.c: Likewise.
4769 * cofflink.c: Likewise.
4770
4771 2000-11-27 Philip Blundell <pb@futuretv.com>
4772
4773 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4774 (obj_coff_strings_written): New accessor macro for above.
4775 * libcoff.h: Regenerate.
4776 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4777 strings.
4778 * coffcode.h (coff_write_object_contents): No need to write out
4779 the string table if it's already been done.
4780
4781 2000-11-22 Philip Blundell <pb@futuretv.com>
4782
4783 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4784 weak undefined symbols.
4785
4786 2000-11-24 Nick Clifton <nickc@redhat.com>
4787
4788 * archures.c (bfd_mach_arm_5TE): Define.
4789 (bfd_mach_arm+XScale): Define.
4790 * bfd-in2.h: Regenerate.
4791
4792 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4793 BFD_RELOC_ARM_PCREL_BLX.
4794
4795 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4796 XScale machine numbers.
4797
4798 * config.bfd (xscale-elf): Add target.
4799 (xscale-coff): Add target.
4800
4801 * cpu-arm.c: Add xscale machine name.
4802 Add v5t, v5te and XScale machine numbers.
4803
4804 2000-11-23 Kazu Hirata <kazu@hxi.com>
4805
4806 * aix386-core.c: Fix formatting.
4807
4808 2000-11-22 Jim Wilson <wilson@redhat.com>
4809
4810 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4811 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4812 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4813 (ins_imms_scaled): Initialize sign_bit at function entry.
4814 (elf64_ia64_operands): Add missing initializers.
4815 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4816 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4817 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4818 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4819 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4820 parameters.
4821 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4822 and free_extsyms at function entry.
4823 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4824 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4825 (get_got): Delete unused local srel.
4826 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4827 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4828
4829 2000-11-21 Kazu Hirata <kazu@hxi.com>
4830
4831 * coff-a29k.c: Fix formatting.
4832 * coff-h8500.c: Likewise.
4833 * coff-i960.c: Likewise.
4834 * coff-ppc.c: Likewise.
4835 * coff-rs6000.c: Likewise.
4836 * coff-stgo32.c: Likewise.
4837 * coff-tic54x.c: Likewise.
4838 * coff-w65.c: Likewise.
4839 * cpu-h8500.c: Likewise.
4840 * cpu-hppa.c: Likewise.
4841 * cpu-ns32k.c: Likewise.
4842 * ecoff.c: Likewise.
4843 * ecofflink.c: Likewise.
4844
4845 2000-11-21 Nick Clifton <nickc@redhat.com>
4846
4847 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4848 remove possibility of infinite loop.
4849
4850 2000-11-20 Kazu Hirata <kazu@hxi.com>
4851
4852 * aix386-core.c: Fix formatting.
4853 * aout-adobe.c: Likewise.
4854 * aout-arm.c: Likewise.
4855 * aout-encap.c: Likewise.
4856 * aout-ns32k.c: Likewise.
4857 * aout-target.h: Likewise.
4858 * aout-tic30.c: Likewise.
4859 * aoutf1.h: Likewise.
4860 * aoutx.h: Likewise.
4861 * archive.c: Likewise.
4862 * bfd-in.h: Likewise.
4863 * bfd-in2.h: Likewise.
4864 * bfd.c: Likewise.
4865 * bout.c: Likewise.
4866
4867 2000-11-17 H.J. Lu <hjl@gnu.org>
4868
4869 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4870 pltoff entries for DT_INIT and DT_FINI.
4871 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4872 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4873 entries.
4874
4875 2000-11-16 Richard Henderson <rth@redhat.com>
4876
4877 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4878 (allocate_dynrel_entries): Likewise.
4879 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4880 (set_pltoff_entry): Likewise.
4881 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4882 (elfNN_ia64_reloc_type_lookup): Likewise.
4883 (elfNN_ia64_install_value): Likewise.
4884 (elfNN_ia64_relocate_section): Likewise.
4885 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4886 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4887
4888 2000-11-16 Kazu Hirata <kazu@hxi.com>
4889
4890 * cpu-a29k.c: Fix formatting.
4891 * cpu-alpha.c: Likewise.
4892 * cpu-arm.c: Likewise.
4893 * cpu-avr.c: Likewise.
4894 * cpu-d10v.c: Likewise.
4895 * cpu-h8500.c: Likewise.
4896 * cpu-hppa.c: Likewise.
4897 * cpu-i370.c: Likewise.
4898 * cpu-i386.c: Likewise.
4899 * cpu-i960.c: Likewise.
4900 * cpu-ia64-opc.c: Likewise.
4901 * cpu-ia64.c: Likewise.
4902 * cpu-m32r.c: Likewise.
4903 * cpu-m68hc11.c: Likewise.
4904 * cpu-m68hc12.c: Likewise.
4905 * cpu-m68k.c: Likewise.
4906 * cpu-m88k.c: Likewise.
4907 * cpu-mips.c: Likewise.
4908 * cpu-ns32k.c: Likewise.
4909 * cpu-pj.c: Likewise.
4910 * cpu-powerpc.c: Likewise.
4911 * cpu-sh.c: Likewise.
4912 * cpu-sparc.c: Likewise.
4913 * cpu-tic54x.c: Likewise.
4914 * cpu-v850.c: Likewise.
4915 * cpu-vax.c: Likewise.
4916 * cpu-w65.c: Likewise.
4917 * cpu-we32k.c: Likewise.
4918 * cpu-z8k.c: Likewise.
4919 * dwarf1.c: Likewise.
4920 * dwarf2.c: Likewise.
4921
4922 2000-11-15 Kazu Hirata <kazu@hxi.com>
4923
4924 * coff-arm.c: Fix formatting.
4925 * coff-ppc.c: Likewise.
4926 * coff-rs6000.c: Likewise.
4927 * coff-sh.c: Likewise.
4928 * coff-sparc.c: Likewise.
4929 * coff-tic30.c: Likewise.
4930 * coff-tic54x.c: Likewise.
4931 * coff-tic80.c: Likewise.
4932 * coff-w65.c: Likewise.
4933 * coff-we32k.c: Likewise.
4934 * coff-z8k.c: Likewise.
4935
4936 2000-11-15 Richard Henderson <rth@redhat.com>
4937
4938 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4939 section with the same ALLOC|LOAD flags as the source section.
4940
4941 2000-11-14 Jakub Jelinek <jakub@redhat.com>
4942
4943 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4944 by STO_ALPHA constants.
4945
4946 2000-11-14 Kazu Hirata <kazu@hxi.com>
4947
4948 * coff-pmac.c: Fix formatting.
4949 * coff-ppc.c: Likewise.
4950
4951 2000-11-13 H.J. Lu <hjl@gnu.org>
4952
4953 * elflink.h (elf_link_add_object_symbols): Also add indirect
4954 symbols for common symbols with the default version.
4955
4956 2000-11-09 Philip Blundell <pb@futuretv.com>
4957
4958 * section.c (STD_SECTION): Set gc_mark flag.
4959
4960 2000-11-11 Kazu Hirata <kazu@hxi.com>
4961
4962 * coff-i960.c: Likewise.
4963 * coff-m68k.c: Likewise.
4964 * coff-m88k.c: Likewise.
4965 * coff-mcore.c: Likewise.
4966 * coff-mips.c: Likewise.
4967
4968 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4969
4970 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4971
4972 2000-11-10 Kazu Hirata <kazu@hxi.com>
4973
4974 * coff-h8300.c: Fix formatting.
4975 * coff-h8500.c: Likewise.
4976 * coff-i386.c: Likewise.
4977 * coff-i860.c: Likewise.
4978 * coff-i960.c: Likewise.
4979 * coff-ia64.c: Likewise.
4980
4981 2000-11-09 Kazu Hirata <kazu@hxi.com>
4982
4983 * archive.c: Fix formatting.
4984 * archures.c: Likewise.
4985
4986 2000-11-07 Richard Henderson <rth@redhat.com>
4987
4988 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4989 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4990 * section.c (bfd_set_section_contents): Call memcpy if
4991 section->contents set and location not equal to contents plus offset.
4992
4993 2000-11-08 Kazu Hirata <kazu@hxi.com>
4994
4995 * bfd-in.h: Fix formatting.
4996 * bfd-in2.h: Likewise.
4997 * bfd.c: Likewise.
4998 * binary.c: Likewise.
4999 * bout.c: Likewise.
5000 * coff-a29k.c: Likewise.
5001 * coff-alpha.c: Likewise.
5002 * coff-apollo.c: Likewise.
5003 * coff-aux.c: Likewise.
5004
5005 2000-11-07 Kazu Hirata <kazu@hxi.com>
5006
5007 * aix386-core.c: Fix formatting.
5008 * aoutf1.h: Likewise.
5009 * aoutx.h: Likewise.
5010 * archures.c: Likewise.
5011 * armnetbsd.c: Likewise.
5012
5013 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5014
5015 * coff-h8300.c (special): Adjust reloc address.
5016
5017 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5018
5019 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5020 to differentiate elf32 and elf64 on ia64.
5021 * bfd-in2.h: Regenerate.
5022 * config.bfd: Add target for "ia64*-*-hpux*".
5023 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5024 * configure: Regenerate.
5025 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5026 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5027
5028 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5029 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5030 * Makefile.in: Regnerate.
5031 * elf64-ia64.c: Deleted.
5032 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5033
5034 2000-11-06 Kazu Hirata <kazu@hxi.com>
5035
5036 * aout-adobe.c: Fix formatting.
5037 * aout-arm.c: Likewise.
5038 * aout-cris.c: Likewise.
5039 * aout-encap.c: Likewise.
5040 * aout-ns32k.c: Likewise.
5041 * aout-target.h: Likewise.
5042 * aout-tic30.c: Likewise.
5043
5044 2000-11-05 Philip Blundell <philb@gnu.org>
5045
5046 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5047 BFDs containing no sections to be merged, regardless of their flags.
5048
5049 2000-11-04 Philip Blundell <philb@gnu.org>
5050
5051 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5052 if a relocation for an undefined symbol also results in an
5053 overflow.
5054
5055 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5056
5057 * config.bfd: Add support for Sun Chorus.
5058
5059 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5060
5061 * configure.in: Recognize alpha-*-freebsd*.
5062 * configure: Regenerate.
5063
5064 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5065
5066 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5067 (Chunk): New global variable set by a parameter in objcopy.c.
5068 (S3Forced): New global variable set by a parameter in
5069 objcopy.c.
5070 (srec_set_section_contents): If S3Forced is true, always generate
5071 S3 records.
5072 (srec_write_section): Use 'Chunk' to limit maximum length of S
5073 records.
5074
5075 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5076
5077 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5078 * Makefile.in: Regenerate.
5079 * bfd-in2.h: Regenerate.
5080 * po/bfd.pot: Regenerate.
5081
5082 2000-10-31 Philip Blundell <philb@gnu.org>
5083
5084 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5085 EF_SOFT_FLOAT if it is defined.
5086
5087 2000-10-27 Philip Blundell <philb@gnu.org>
5088
5089 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5090 attempts to mix PIC code with non-PIC, just mark the output as
5091 being position dependent.
5092 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5093 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5094 all mismatches, not just the first one.
5095
5096 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5097
5098 * ieee.c (ieee_archive_p): Plug one of many possible
5099 memory leaks in error handling.
5100
5101 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5102
5103 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5104 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5105 Support v8plusb.
5106 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5107 sparc64_elf_object_p): Support v9b.
5108 * archures.c: Declare v8plusb and v9b machines.
5109 * bfd-in2.h: Ditto.
5110 * cpu-sparc.c: Ditto.
5111
5112 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5113
5114 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5115 of a GOT reloc.
5116
5117 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5118 (SYMBOL_CALLS_LOCAL): New macro.
5119 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5120 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5121 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5122 (ppc_elf_relocate_section): Use flag variable to determine
5123 whether the relocation refers to a local symbol.
5124 Test whether a PLTREL24 reloc will produce a reloc by looking
5125 to see whether a PLT entry was made.
5126
5127 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5128
5129 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5130 entries that could serve as a definition for a weak symbol.
5131
5132 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5133
5134 From Ralf Baechle <ralf@gnu.org>
5135
5136 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5137 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5138 against local symbols.
5139 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5140
5141 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5142
5143 * section.c (struct sec): Add kept_section.
5144 (struct bfd_comdat_info): Remove sec, we can use above.
5145 (STD_SECTION): Add initializer.
5146 (bfd_make_section_anyway): Init here too.
5147
5148 * bfd-in2.h: Regenerate.
5149
5150 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5151 zeroing of `flags'.
5152 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5153 fudge values for discarded link-once section symbols.
5154
5155 * elf64-hppa.c: Include alloca-conf.h
5156
5157 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5158
5159 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5160
5161 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5162
5163 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5164
5165 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5166
5167 2000-10-10 Tom Rix <trix@redhat.com>
5168
5169 * section.c (bfd_make_section_anyway): Release newsect ptr when
5170 newsect->symbol fails to alloc. Use bfd_release instead of free.
5171
5172 2000-10-09 Richard Henderson <rth@cygnus.com
5173
5174 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5175 (elf64_ia64_unwind_entry_compare): New.
5176 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5177
5178 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5179
5180 * elflink.h (size_dynamic_sections): Don't create various tags if
5181 .dynstr is excluded from the link. Don't set first dynsym entry
5182 if dynsymcount is zero.
5183 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5184 .dynsym excluded from the link. Don't try to write any dynamic
5185 sections excluded from the link.
5186
5187 * elf.c (swap_out_syms): Handle global section symbols.
5188
5189 2000-10-05 DJ Delorie <dj@redhat.com>
5190
5191 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5192 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5193 (coff_write_relocs): write extended reloc count
5194 (coff_write_object_contents): account for extended relocs
5195
5196 2000-10-05 Jim Wilson <wilson@cygnus.com>
5197
5198 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5199 field.
5200 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5201 elf_backend_section_flags function.
5202 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5203 code.
5204 (elf64_ia64_section_flags): New function containing flag conversion
5205 code.
5206 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5207 * elfxx-target.h (elf_backend_section_flags): Define.
5208 (elfNN_bed): Initialize elf_backend_section_flags field.
5209
5210 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5211
5212 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5213 _bfd_elf32_gc_record_vtable. Correct a comment.
5214
5215 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5216
5217 From Ralf Baechle <ralf@gnu.org>
5218
5219 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5220 produces binaries with got[1] = 0x80000001 to differenciate them
5221 for the dynamic linker from the broken binaries produced by old
5222 versions.
5223
5224 2000-09-30 Petr Sorfa <petrs@sco.com>
5225
5226 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5227 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5228 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5229 * configure: Regenerate.
5230
5231 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5232
5233 Define two bfd_targets for absence and presence of leading
5234 underscore on symbols. Make sure to only link same kind.
5235 * elf32-cris.c (cris_elf_object_p,
5236 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5237 cris_elf_merge_private_bfd_data): New.
5238 (elf_backend_object_p, elf_backend_final_write_processing,
5239 bfd_elf32_bfd_print_private_bfd_data,
5240 bfd_elf32_bfd_merge_private_bfd_data): Define.
5241 <Target vector definition>: Include elf32-target.h twice with
5242 different macro settings:
5243 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5244 bfd_elf32_us_cris_vec.
5245 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5246 (elf_symbol_leading_char): First as 0, then '_'.
5247 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5248 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5249 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5250 * configure: Regenerate.
5251 * targets.c: Declare bfd_elf32_us_cris_vec.
5252 * po/bfd.pot: Regenerate.
5253
5254 2000-09-29 Momchil Velikov <velco@fadata.bg>
5255
5256 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5257 R_ARM_THM_PC22 relocations.
5258
5259 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5260
5261 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5262
5263 2000-09-29 Momchil Velikov <velco@fadata.bg>
5264
5265 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5266 is has the SEC_HAS_CONTENTS flag set.
5267
5268 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
5269 Hans-Peter Nilsson <hp@axis.com>
5270
5271 * aout-cris.c (N_TXTADDR): Define.
5272
5273 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5274
5275 * som.c: Include alloca-conf.h.
5276 * Makefile.am: "make dep-am"
5277 * Makefile.in: Regenerate.
5278
5279 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5280
5281 * elf32-hppa.c (plt_stub): New.
5282 (PLT_STUB_ENTRY): Define.
5283 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5284 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5285 (elf32_hppa_link_hash_table_create): Init to suit.
5286 (elf32_hppa_check_relocs): Set has_12bit_branch and
5287 has_17bit_branch as appropriate.
5288 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5289 non-local functions.
5290 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5291 Add space for plt_stub as needed.
5292 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5293 functions at plt_stub.
5294 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5295 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5296
5297 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5298 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5299 of fixed size, and if negative, disable handling of input sections
5300 before stub section. Set up default stub group size depending
5301 on detected branch relocs.
5302 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5303 ensure different offsets from sym_value aren't rounded to
5304 different 2k blocks. Use lrsel and rrsel for other stubs too for
5305 consistency rather than necessity.
5306 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5307 (final_link_relocate): Likewise.
5308 (elf32_hppa_relocate_section): Likewise.
5309
5310 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5311 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5312 (elf_hppa_final_link_relocate): Handle them.
5313 (elf_hppa_relocate_insn): Likewise.
5314 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5315
5316 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5317
5318 * elfcode.h (elf_object_p): Preserve and clear abfd section
5319 information. Restore at error.
5320
5321 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5322
5323 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5324 is empty, make sure that its rva also 0. NT loader dislikes
5325 having otherwise.
5326
5327 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5328
5329 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5330 global by default.
5331
5332 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5333
5334 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5335 currently unused RELATIVE_DYNAMIC_RELOCS code.
5336 (hppa_discard_copies): Likewise.
5337 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5338 comments. Don't check non-code output sections for stub grouping.
5339
5340 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5341
5342 * section.c (bfd_get_unique_section_name): Return NULL if
5343 bfd_malloc fails.
5344
5345 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5346
5347 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5348 instruction sequence to actually work.
5349 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5350 accordingly.
5351
5352 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5353
5354 * elf32-sh.c (sh_elf_relocate_section): Use
5355 _bfd_final_link_relocate to apply the relocation against a section
5356 symbol, when doing relocatable links.
5357
5358 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5359
5360 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5361 to id_sec.
5362 (stub_hash_newfunc): Here too.
5363 (hppa_add_stub): And here.
5364 (elf32_hppa_link_hash_table): Remove stub_section_created,
5365 reloc_section_created, first_init_sec and first_fini_sec. Add
5366 stub_group.
5367 (elf32_hppa_link_hash_table_create): Init to suit.
5368 (hppa_get_stub_entry): Add support for grouping stub sections.
5369 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5370 section code. Index stub vars by section->id.
5371 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5372 exit paths. Zap allocation of above removed vars. Refine
5373 link-once test.
5374
5375 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5376 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5377 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5378 rather than pointer to bfd_link_info.
5379 (hppa_add_stub): Likewise.
5380 (final_link_relocate): Likewise.
5381
5382 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5383
5384 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5385 link-once sections.
5386
5387 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5388
5389 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5390 ld/emulparams/shelf.sh.
5391
5392 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5393
5394 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5395 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5396 * bfd-in2.h: Regenerate.
5397
5398 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5399
5400 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5401 LITUSE relocations incorrectly if -relax is specified on the ld
5402 command line and the displacement field of the load or store
5403 instruction is non-zero. (Patch by paul.winalski@compaq.com)
5404
5405 2000-09-15 Alan Modra <alan@linuxcare.com.au>
5406
5407 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5408 first_fini_sec here.
5409 (elf32_hppa_size_stubs): Instead correctly find the first .init
5410 and .fini section here.
5411
5412 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5413
5414 * elf32-hppa.c (clobber_millicode_symbols): New function.
5415 (elf32_hppa_size_dynamic_sections): Call it.
5416
5417 2000-09-14 Alan Modra <alan@linuxcare.com.au>
5418
5419 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5420 packed. Add plabel, plt_abs packed booleans.
5421 (hppa_link_hash_newfunc): Init new fields.
5422 (PLABEL_PLT_ENTRY_SIZE): Define.
5423 (hppa_stub_name): Use size_t len vars.
5424 (hppa_add_stub): Likewise.
5425 (elf32_hppa_build_stubs): Likewise.
5426 (hppa_build_one_stub): Kill some compiler warnings.
5427 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5428 if dynamic linking. Munge the local plt offsets into
5429 local_got_refcounts. Set h->plabel for all global PLABELs. Use
5430 size_t len vars. Add assert for plabel addend.
5431 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5432 (elf32_hppa_hide_symbol): New function.
5433 (elf_backend_hide_symbol): Define.
5434 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5435 with h->plabel set. Don't make plt entries to have dynamic syms
5436 when they have been forced local. If plt entry is used by a
5437 plabel, make it PLABEL_PLT_ENTRY_SIZE.
5438 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5439 Set up .plt offsets for local syms.
5440 (elf32_hppa_relocate_section): Initialise plt entries for local
5441 syms. Leave weak undefined plabels zero. Make global plabel
5442 relocs against function symbol, and leave the addend zero.
5443 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5444 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5445 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
5446 relocs instead of SEGREL32 for dynamic got relocs.
5447 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5448 (elf_backend_got_header_size): Adjust.
5449 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5450
5451 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5452 (hppa_type_of_stub): Use it instead of #if 0
5453 (hppa_discard_copies): Use it here too.
5454 (elf32_hppa_size_dynamic_sections): And here.
5455
5456 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5457 (elf32_hppa_link_hash_table_create): And here.
5458 (hppa_build_one_stub): And here. Instead keep track of stub
5459 offset using _raw_size.
5460 (elf32_hppa_size_stubs): Likewise.
5461 (elf32_hppa_build_stubs): Likewise.
5462 (hppa_size_one_stub): Likewise. Resize reloc section too.
5463
5464 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5465 first_fini_sec handling. Don't search for reloc section or set
5466 hplink->reloc_section_created here.
5467 (elf32_hppa_size_stubs): Instead search for reloc sections, and
5468 set reloc_section_created here.
5469 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5470 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
5471 and DT_FINI.
5472 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
5473
5474 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
5475 with `hplink->root.'.
5476 (elf32_hppa_check_relocs): Likewise.
5477 (elf32_hppa_gc_sweep_hook): Likewise.
5478 (elf32_hppa_adjust_dynamic_symbol): Likewise.
5479 (hppa_handle_PIC_calls): Likewise.
5480 (elf32_hppa_size_dynamic_sections): Likewise.
5481 (elf32_hppa_set_gp): Likewise.
5482 (elf32_hppa_relocate_section): Likewise.
5483 (elf32_hppa_finish_dynamic_symbol): Likewise.
5484 (elf32_hppa_finish_dynamic_sections): Likewise.
5485
5486 From David Huggins-Daines <dhd@linuxcare.com>
5487 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
5488 defined weak symbols in shared links.
5489 (final_link_relocate): Calls to defined weak symbols in shared
5490 objects must go via import stubs, as the target might not be known
5491 at link time.
5492
5493 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
5494
5495 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
5496 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
5497 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
5498 the original entries with EMPTY_HOWTOs, and added new ones to fill
5499 in the gap.
5500 (sh_elf_info_to_howto): Make sure the new gap isn't used.
5501 (sh_elf_relocate_section): Likewise.
5502
5503 2000-09-13 Anders Norlander <anorland@acc.umu.se>
5504
5505 * cpu-mips.c (arch_info_struct): Add mips:4K
5506 * bfd-in2.h (bfd_mach_mips4K): New define.
5507 * archures.c: Add bfd_mach_mips4K to comment.
5508 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
5509 E_MIPS_ARCH_2 for bfd_mach_mips4K.
5510
5511 2000-09-13 Marco Franzen <marcof@thyron.com>
5512
5513 * som.c (som_write_symbol_strings): Do not used fixed buffers,
5514 use size_t as a counter.
5515 (som_write_space_strings): Similarly.
5516
5517 2000-09-12 Jason Eckhardt <jle@cygnus.com>
5518
5519 * elf32-i860.c (elf32_i860_relocate_pc26): New function
5520 and prototype.
5521 (elf32_i860_relocate_section): Invoke new function from here.
5522
5523 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5524
5525 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
5526 static.
5527
5528 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5529
5530 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
5531 target section name instead of dumping core when the target symbol is
5532 undefined.
5533
5534 2000-09-09 Kazu Hirata <kazu@hxi.com>
5535
5536 * riscix.c: Remove DEFUN.
5537
5538 2000-09-08 Nick Clifton <nickc@redhat.com>
5539
5540 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
5541 initialise flags in output bfd if the input bfd is the default
5542 architecture with the default flags.
5543
5544 2000-09-08 Kazu Hirata <kazu@hxi.com>
5545
5546 * archive.c: Fix formatting.
5547 * coff-arm.c: Likewise.
5548 * doc/chew.c: Likewise.
5549
5550 2000-09-08 Alan Modra <alan@linuxcare.com.au>
5551
5552 * section.c (bfd_get_unique_section_name): Put a dot before the
5553 numeric suffix.
5554
5555 2000-09-07 Kazu Hirata <kazu@hxi.com>
5556
5557 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
5558 * elf.c: Fix formatting.
5559
5560 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
5561
5562 * config.bfd (sh-*-linux*): Added.
5563 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
5564 * targets.c: Declare them.
5565 * elf32-sh-lin.c: New file.
5566 * Makefile.am: Compile it.
5567 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
5568 * configure, Makefile.in: Rebuilt.
5569
5570 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
5571
5572 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
5573 pseduo-section when determining where the TOC ends.
5574
5575 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
5576 output x_tvndx as it is only two bytes wide.
5577
5578 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
5579 reloc is 26 or 32 bits wide.
5580
5581 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
5582 for relocs that don't change anything. Also look at the full
5583 6 bits of bitsize.
5584
5585 2000-09-06 Philip Blundell <philb@gnu.org>
5586
5587 * config.bfd (arm*-*-uclinux*): New target.
5588
5589 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
5590
5591 * configure: Rebuilt with new libtool.m4.
5592
5593 2000-09-06 Alan Modra <alan@linuxcare.com.au>
5594
5595 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
5596 word for variable name.
5597 * bfd-in2.h: Regenerate.
5598
5599 2000-09-05 Nick Clifton <nickc@redhat.com>
5600
5601 * config.in: Regenerate.
5602 * libbfd.h: Regenerate.
5603 * po/bfd.pot: Regenerate.
5604 * doc/bfdint.texi: Remove CVS date string - it foils compares with
5605 local versions.
5606
5607 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
5608
5609 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
5610
5611 2000-09-05 Alan Modra <alan@linuxcare.com.au>
5612
5613 Shared library and PIC support.
5614 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
5615 (GOT_ENTRY_SIZE): New.
5616 (ELF_DYNAMIC_INTERPRETER): New.
5617 (STUB_SUFFIX): Define.
5618 (LONG_BRANCH_PIC_IN_SHLIB): Define.
5619 (RELATIVE_DYNAMIC_RELOCS): Define.
5620 (enum elf32_hppa_stub_type): New.
5621 (struct elf32_hppa_stub_hash_entry): Rename offset to
5622 stub_offset. Add a number of new fields.
5623 (struct elf32_hppa_link_hash_entry): New.
5624 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
5625 global_value.
5626 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
5627 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
5628 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
5629 new fields.
5630 (hppa_link_hash_newfunc): New function.
5631 (elf32_hppa_link_hash_table_create): Use above function. Init new
5632 fields.
5633 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
5634 instead of addend, and remove sym_name from args. Don't use
5635 symbol name for local syms, instead use sym index.
5636 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
5637 stub type rather than size. Pass in hash and handle import stub
5638 case. Also pass in reloc instead of offset so we can calculate
5639 PCREL22F and PCREL12F branches properly.
5640 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
5641 import and export stubs too.
5642 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
5643 import and export stub sizing.
5644 (elf32_hppa_check_relocs): New function.
5645 (elf32_hppa_adjust_dynamic_symbol): New function.
5646 (hppa_discard_copies): New function.
5647 (elf32_hppa_size_dynamic_sections): New function.
5648 (elf_backend_size_dynamic_sections): Define.
5649 (elf32_hppa_finish_dynamic_symbol): New function.
5650 (elf_backend_finish_dynamic_symbol): Define.
5651 (elf32_hppa_size_stubs): Stash params in link hash table, and move
5652 some local vars into the link hash table too. For shared links,
5653 trundle over function syms, generating export stubs. Handle
5654 PCREL22F branches. Break out stub creation code from here..
5655 (hppa_add_stub): .. to here. New function.
5656 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
5657 call the bfd linker. Use elf_gp to record global pointer.
5658 Calculate a value from sections if $global$ is missing.
5659 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
5660 (elf32_hppa_gc_mark_hook): New function.
5661 (elf_backend_gc_mark_hook): Define.
5662 (elf32_hppa_gc_sweep_hook): New function.
5663 (elf_backend_gc_sweep_hook): Define.
5664 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
5665 Add rel to args, and remove howto, input_bfd, offset, addend,
5666 sym_name as we can recalculate these locally. Handle calls to
5667 dynamic objects, extra PIC relocs, PCREL22F branches. Change
5668 handling of undefined weak syms. Check that stubs are in range.
5669 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
5670 message on hitting a DPREL21L reloc that needs fixing. Subtract
5671 off PC for PCREL14F. Break out code that does a stub lookup from
5672 here..
5673 (hppa_get_stub_entry): ..to here. New function.
5674 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
5675 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
5676 relocs, etc. etc.
5677 (elf32_hppa_finish_dynamic_sections): New function.
5678 (elf_backend_finish_dynamic_sections): Define.
5679 (elf_backend_final_write_processing) Define.
5680 (hppa_handle_PIC_calls): New function.
5681 (elf32_hppa_build_stubs): Call it. Pass link_info to
5682 hppa_build_one_stub.
5683 (elf32_hppa_create_dynamic_sections): New function
5684 to create .plt and .got then set .plt flags correctly.
5685 (elf_backend_create_dynamic_sections): Define.
5686 (elf32_hppa_object_p): New function.
5687 (elf_backend_object_p): Define.
5688 (elf32_hppa_elf_get_symbol_type): New function.
5689 (elf_backend_get_symbol_type): Define.
5690 (elf_backend_can_gc_sections): Define.
5691 (elf_backend_want_got_plt): Define.
5692 (elf_backend_plt_alignment): Set to 2.
5693 (elf_backend_plt_readonly): Define.
5694 (elf_backend_want_plt_sym): Define.
5695 (elf_backend_got_header_size): Reserve one entry.
5696
5697 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
5698 (elf32_hppa_size_stubs): Pass in multi_subspace.
5699 (elf32_hppa_set_gp): Declare.
5700
5701 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
5702 (bfd_get_unique_section_name): New function.
5703 * bfd-in2.h: Regenerate.
5704
5705 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
5706 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
5707 comment.
5708
5709 From David Huggins-Daines <dhd@linuxcare.com>
5710 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
5711 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
5712 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
5713 been updated in finish_dynamic_symbol before modifying function
5714 symbol.
5715
5716 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
5717 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
5718 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
5719 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
5720 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
5721 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
5722 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
5723 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
5724
5725 From David Huggins-Daines <dhd@linuxcare.com>
5726 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
5727 style of local labels as well.
5728
5729 2000-09-03 Philip Blundell <philb@gnu.org>
5730
5731 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
5732 references to undefined symbols in debugging sections.
5733
5734 2000-09-02 H.J. Lu <hjl@gnu.org>
5735
5736 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5737 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
5738 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
5739 section.
5740
5741 2000-09-02 Jason Eckhardt <jle@cygnus.com>
5742
5743 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
5744 (elf32_i860_is_local_label_name): New function and prototype.
5745
5746 2000-09-02 Nick Clifton <nickc@redhat.com>
5747
5748 * configure.in: Increase version number to 2.10.91.
5749 * configure: Regenerate.
5750 * aclocal.m4: Regenerate.
5751 * config.in: Regenerate.
5752 * po/bfd.pot: Regenerate.
5753
5754 2000-09-02 Daniel Berlin <dberlin@redhat.com>
5755
5756 * elf.c (_bfd_elf_make_section_from_shdr): Add
5757 .gnu.linkobce.wi. to the list of debug section names.
5758
5759 2000-09-02 Nick Clifton <nickc@redhat.com>
5760
5761 * dwarf2.c (find_debug_info): New function: Locate a section
5762 containing dwarf2 debug information.
5763 (bfd_dwarf2_find_nearest_line): Find all sections containing
5764 debug information and include them in the stash.
5765
5766 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
5767
5768 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
5769 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
5770 (sh_reloc_map): Add new relocs.
5771 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
5772 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
5773 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
5774 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
5775 functions.
5776 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
5777 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5778 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
5779 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5780 New array constants.
5781 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
5782 New variables.
5783 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5784 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
5785 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
5786 elf_sh_plt_reloc_offset): Define.
5787 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
5788 elf_sh_link_hash_table): New structs.
5789 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
5790 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
5791 relocation types.
5792 (elf_backend_create_dynamic_sections,
5793 bfd_elf32_bfd_link_hash_table_create,
5794 elf_backend_adjust_dynamic_symbol,
5795 elf_backend_size_dynamic_sections,
5796 elf_backend_finish_dynamic_symbol,
5797 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5798 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5799 elf_backend_got_header_size, elf_backend_plt_header_size):
5800 Define.
5801 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5802 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
5803 New relocs.
5804 * bfd-in2.h, libbfd.h: Rebuilt.
5805
5806 2000-09-01 Alan Modra <alan@linuxcare.com.au>
5807
5808 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
5809 change.
5810
5811 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
5812
5813 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
5814 not initialized, set them to indicate the SH1 instruction set.
5815
5816 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
5817
5818 * acinclude.m4: Include libtool and gettext macros from the
5819 top level.
5820 * aclocal.m4, configure: Rebuilt.
5821
5822 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
5823
5824 * elf.c: Eliminate references to __sparcv9 macro; replace with
5825 autoconf variables HAVE_PSINFO32_T etc.
5826 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
5827 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
5828 * config.in: Ditto.
5829 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
5830 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
5831 * aclocal.m4: Ditto.
5832 * configure: Regenerate.
5833
5834 2000-08-27 Alan Modra <alan@linuxcare.com.au>
5835
5836 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
5837 for any shared link, not just shared -Bsymbolic.
5838 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
5839 any shared link, and pass link info to it.
5840 (elf_i386_size_dynamic_sections): Update comment.
5841 (elf_i386_discard_copies): Modify to discard relocs for symbols
5842 that have been forced local.
5843 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
5844 that have been forced local.
5845
5846 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
5847
5848 * elflink.h (elf_link_add_object_symbols): Allow common
5849 symbols to have an alignment of 1 if explicitly requested, and
5850 not overridden by other definitions.
5851
5852 2000-08-22 Doug Kwan <dkwan@transmeta.com>
5853
5854 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
5855 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
5856
5857 2000-08-22 H.J. Lu <hjl@gnu.org>
5858
5859 * elf-bfd.h (elf_link_hash_table): Add runpath.
5860
5861 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
5862 * bfd-in2.h: Rebuilt.
5863
5864 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
5865 "runpath" field to NULL.
5866 (bfd_elf_get_runpath_list): New function.
5867
5868 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
5869 DT_RUNPATH entries.
5870
5871 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
5872
5873 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
5874 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
5875 explicitly. Improve validation of r_type.
5876
5877 2000-08-21 H.J. Lu <hjl@gnu.org>
5878
5879 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
5880 dynamic allocated content space. Add a comment to remind us that
5881 one day this ought to be fixed.
5882 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5883 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5884 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
5885
5886 2000-08-21 Jason Eckhardt <jle@cygnus.com>
5887
5888 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
5889 field with the newly relocated value instead of adding it to the
5890 existing immediate field.
5891 (elf32_i860_relocate_splitn): Likewise.
5892 (elf32_i860_relocate_highadj): Likewise.
5893
5894 2000-08-16 Jason Eckhardt <jle@cygnus.com>
5895
5896 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
5897 was previously just a stub).
5898
5899 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
5900
5901 * elflink.c (_bfd_elf_create_got_section): Don't abort().
5902 Formatting fixes.
5903 (_bfd_elf_create_dynamic_sections): Likewise.
5904
5905 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
5906
5907 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
5908 for undefined symbols to be the beginning of the section.
5909
5910 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
5911 four extra entries at the beginning of the .rela.plt section.
5912 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
5913 section to account for the four reserved entries in the .plt section.
5914
5915 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
5916
5917 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
5918 to the list of NOPs we recognize after a branch-and-link.
5919 Use the ori NOP when one is needed.
5920
5921 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
5922 for large archives.
5923
5924 2000-08-14 Jim Wilson <wilson@cygnus.com>
5925
5926 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
5927 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
5928 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
5929 EF_IA_64_ABSOLUTE.
5930
5931 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
5932
5933 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
5934
5935 2000-08-10 Jason Eckhardt <jle@cygnus.com>
5936
5937 * elf32-i860.c (elf32_i860_relocate_section): New function.
5938 (i860_final_link_relocate): New function.
5939 (elf32_i860_relocate_splitn): New function.
5940 (elf32_i860_relocate_pc16): New function.
5941 (elf32_i860_relocate_highadj): New function.
5942 (elf32_i860_howto): Minor adjustments to some relocations.
5943 (elf_info_to_howto_rel): Define.
5944 (elf_backend_relocate_section): Define.
5945
5946 2000-08-10 Nick Clifton <nickc@cygnus.com>
5947
5948 * elf32-arm.h: Fix formatting.
5949
5950 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
5951
5952 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
5953
5954 2000-08-08 Jason Eckhardt <jle@cygnus.com>
5955
5956 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
5957
5958 2000-08-07 Kazu Hirata <kazu@hxi.com>
5959
5960 * ieee.c (ieee_write_debug_part): Rewrite a comment.
5961 * elf64-ia64.c: Fix a typo.
5962
5963 2000-08-05 Jason Eckhardt <jle@cygnus.com>
5964
5965 * elf32-i860.c (elf32_i860_howto_table): New structure.
5966 (lookup_howto): New function.
5967 (elf32_i860_reloc_type_lookup): New function.
5968 (elf32_i860_info_to_howto_rela): New function.
5969 (elf_code_to_howto_index): New structure.
5970 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
5971 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
5972 elf32_i860_reloc_type_lookup.
5973
5974 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
5975
5976 * som.c (struct fixup_format): Constify `format'.
5977 (som_hppa_howto_table): Use SOM_HOWTO macro.
5978 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
5979 (som_bfd_reloc_type_lookup): Likewise.
5980 (compare_subspaces): Remove unused `count1', `count2'.
5981 (som_begin_writing): Remove unused `total_reloc_size'.
5982 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
5983 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
5984 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
5985 (som_find_nearest_line): Decorate unused parameter(s).
5986 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
5987 (som_bfd_link_split_section): Likewise.
5988
5989 2000-08-03 Nick Clifton <nickc@cygnus.com>
5990
5991 * section.c: Restore backed out code.
5992 * elf.c: Restore backed out code.
5993 (copy_private_bfd_data): Fix bug preventing stipped dynamic
5994 binaries from working.
5995 * bfd-in2.h: Regenerate.
5996
5997 2000-08-03 H.J. Lu <hjl@gnu.org>
5998
5999 * section.c: Back out the change made by Nick Clifton
6000 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6001 binaries.
6002 * bfd-in2.h: Likewise.
6003 * elf.c: Likewise.
6004
6005 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6006
6007 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6008
6009 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6010
6011 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6012 * bfd-in2.h, libbfd.h: Regenerate.
6013
6014 2000-07-31 Nick Clifton <nickc@cygnus.com>
6015
6016 * section.c (struct sec): Add new boolean field 'segment_mark'.
6017 (STD_SECTION): Initialise new field to zero.
6018
6019 * bfd-in2.h: Regenerate.
6020
6021 * elf.c (copy_private_bfd_data): Reorganise section to segment
6022 mapping to cope with moved sections requiring new segments,
6023 and overlapping segments.
6024 (SEGMENT_END): New macro: Return the end address of a segment.
6025 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6026 contains a section by comparing their VMA addresses.
6027 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6028 contains a section by comparing their LMA addresses.
6029 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6030 section should be included in a segment.
6031 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6032 follows another in memory.
6033 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6034 segments overlap.
6035
6036 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6037
6038 * cpu-i860.c: Added comments.
6039
6040 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6041 bfd_elf32_i860_little_vec.
6042 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6043 (ELF_MAXPAGESIZE): Changed to 4096.
6044
6045 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6046 new target.
6047 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6048
6049 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6050 config for little endian elf32 i860.
6051 (targ_defvec): Define for the new config above
6052 as "bfd_elf32_i860_little_vec".
6053 (targ_selvecs): Define for the new config above
6054 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6055
6056 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6057 of new target vec.
6058
6059 * configure: Regenerated.
6060
6061 2000-07-27 H.J. Lu <hjl@gnu.org>
6062
6063 * elflink.h (elf_merge_symbol): Take one more argument,
6064 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6065 entry. Don't overide the existing weak definition if dt_needed
6066 is true.
6067 (elf_link_add_object_symbols): Pass dt_needed to
6068 elf_merge_symbol ().
6069
6070 2000-07-27 Nick Clifton <nickc@cygnus.com>
6071
6072 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6073 allocated contents.
6074
6075 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6076
6077 * configure.host (*-*-aix*): AIX has 'long long' always.
6078
6079 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6080 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6081 (xcoff_write_archive_contents_big): Don't update the offset
6082 of the symbol table, xcoff_write_armap will do it.
6083
6084 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6085
6086 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6087 of dynobj for SGI_COMPAT checks.
6088
6089 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6090
6091 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6092 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6093 * bfd-in2.h: Regenerate.
6094
6095 2000-07-21 Nick Clifton <nickc@cygnus.com>
6096
6097 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6098 range symbol indices in relocs and issue an error message.
6099
6100 2000-07-20 H.J. Lu <hjl@gnu.org>
6101
6102 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6103 info->new_dtags when setting DT_FLAGS_1. It will only be set
6104 by the new linker options. It shouldn't break anything.
6105
6106 2000-07-20 H.J. Lu <hjl@gnu.org>
6107
6108 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6109 only if info->new_dtags is true.
6110
6111 2000-07-20 H.J. Lu <hjl@gnu.org>
6112
6113 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6114 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6115
6116 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6117
6118 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6119 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6120 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6121 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6122 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6123 * Makefile.in: Rebuild.
6124 * aclocal.m4: Rebuild.
6125 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6126 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6127 (bfd_cris_arch): Declare.
6128 (bfd_archures_list): Add bfd_cris_arch.
6129 * bfd-in2.h: Rebuild.
6130 * config.bfd: (cris-*-*): New target.
6131 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6132 * configure: Rebuild.
6133 * elf.c (prep_headers): Add bfd_arch_cris.
6134 * libbfd.h: Rebuild.
6135 * libaout.h (enum machine_type): Add M_CRIS.
6136 * reloc.c: Add CRIS relocations.
6137 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6138 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6139 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6140 * po/POTFILES.in, po/bfd.pot: Regenerate.
6141
6142 2000-07-19 H.J. Lu <hjl@gnu.org>
6143
6144 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6145 DF_TEXTREL if DT_TEXTREL is set.
6146 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6147 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6148 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6149 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6150 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6151 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6152 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6153 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6154 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6155 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6156
6157 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6158 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6159 DT_RPATH is set.
6160 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6161
6162 2000-07-19 H.J. Lu <hjl@gnu.org>
6163
6164 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6165 * bfd-in2.h: Rebuild.
6166
6167 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6168 (elf_dt_soname): New.
6169
6170 * elf.c (bfd_elf_set_dt_needed_soname): New.
6171
6172 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6173 entry if the shared object loaded by DT_NEEDED is used to
6174 resolve the reference in a regular object.
6175
6176 2000-07-19 H.J. Lu <hjl@gnu.org>
6177
6178 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6179 DT_DEPAUDIT and DT_AUDIT as strings.
6180
6181 2000-07-19 Nick Clifton <nickc@cygnus.com>
6182
6183 * format.c: Fix formatting.
6184
6185 2000-07-19 H.J. Lu <hjl@gnu.org>
6186
6187 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6188
6189 2000-07-19 H.J. Lu <hjl@gnu.org>
6190
6191 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6192 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6193 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6194 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6195 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6196 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6197 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6198
6199 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6200
6201 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6202 renamed functions from here...
6203 (assign_section_numbers): Use renamed functions.
6204 (prep_headers): Use renamed functions.
6205
6206 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6207 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6208 * bfd-in2.h: Regenerate.
6209
6210 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6211
6212 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6213 parenthesis in if statement.
6214
6215 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6216
6217 Enable the support for Traditional MIPS.
6218 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6219 return ict_none appropriately for traditional mips targets.
6220 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6221 (STUB_MOVE): Conditionalize for traditonal mips.
6222 (STUB_LI16): Likewise.
6223 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6224 room for RTPROC header.
6225 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6226 the permission for the PT_DYNAMIC as read, write and execute.
6227 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6228 for traditonal mips.
6229 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6230 _DYNAMIC_LINKING for traditonal mips.
6231 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6232 in case of traditonal mips.
6233 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6234 entry is required. For a function if PLT is not required then set the
6235 corresponding hash table entry to 0.
6236 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6237 traditonal mips.
6238 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6239 shared object set the value to 0.
6240 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6241 _DYNAMIC_LINKING for traditonal mips.
6242 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6243 for traditonal mips.
6244
6245 2000-07-15 H.J. Lu <hjl@gnu.org>
6246
6247 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6248
6249 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6250
6251 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6252 out a structure that is BFD_IN_MEMORY.
6253
6254 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6255
6256 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6257 bfd pointer. Print section id instead of bfd pointer for local
6258 syms. Prefix addend with `+' for global syms as well as local.
6259 Correct calculation of name component lengths.
6260 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6261
6262 From David Huggins-Daines <dhd@linuxcare.com>
6263 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6264 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6265 (elf64_hppa_modify_segment_map): Likewise.
6266
6267 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6268
6269 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6270 addresses to be "naturally" sign extended. Return -1 if unknown.
6271 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6272 * bfd-in2.h: Regenerate.
6273
6274 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6275
6276 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6277 and ECOF_SIGNED_64 to list ways to extract an offset.
6278 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6279 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6280 Update.
6281 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6282 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6283
6284 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6285
6286 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6287 bfd_get_start_address.
6288 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6289 (elf_swap_ehdr_out): Ditto.
6290
6291 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6292
6293 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6294 compatibility with older binutils.
6295
6296 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6297
6298 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6299 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6300
6301 From Ryan Bradetich <rbradetich@uswest.net>
6302 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6303 (parse_line_table): Ditto.
6304 (_bfd_dwarf1_find_nearest_line): Ditto.
6305 * syms.c (cmpindexentry): Remove extra `*' from params.
6306
6307 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6308
6309 * elf32-mips.c (sort_dynamic_relocs): New Function.
6310 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6311 via qsort to sort the dynamic relocations in increasing r_symndx
6312 value.
6313
6314 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6315
6316 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6317 ATTRIBUTE_UNUSED to unused args.
6318 (get_opd): Likewise.
6319 (get_plt): Likewise.
6320 (get_dlt): Likewise.
6321 (get_stub): Likewise.
6322 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6323 (elf64_hppa_link_output_symbol_hook): Likewise.
6324 (elf64_hppa_check_relocs): Delete unused var.
6325 (elf64_hppa_size_dynamic_sections): Likewise.
6326 (elf64_hppa_finalize_opd): Likewise.
6327 (elf64_hppa_finalize_dynreloc): Likewise.
6328 (elf64_hppa_modify_segment_map): Likewise.
6329 (elf64_hppa_finish_dynamic_sections): Likewise.
6330
6331 * elf-hppa.h (elf_hppa_final_write_processing): Add
6332 ATTRIBUTE_UNUSED to unused args.
6333 (elf_hppa_final_link_relocate): Likewise.
6334 (elf_hppa_record_segment_addrs): Add paretheses.
6335 (elf_hppa_relocate_section): Constify dyn_name.
6336
6337 From David Huggins-Daines <dhd@linuxcare.com>
6338 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6339 rearrange case statement so that it gets preferred to 32-bit ones.
6340
6341 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6342 asection->id instead of address of asection structure.
6343 (elf32_hppa_size_stubs): Likewise.
6344
6345 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6346 for .init* and .fini*.
6347
6348 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6349 and addends used in stub names to 32 bits.
6350 (elf32_hppa_size_stubs): Likewise.
6351
6352 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6353 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6354 not bfd_put_64. Fix minor comment typo and formatting.
6355
6356 Changes to create multiple linker stubs, positioned immediately
6357 before the section where they are required.
6358 * elf32-hppa.c: Don't include hppa_stubs.h.
6359 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6360 (elf32_hppa_stub_hash_table): Delete.
6361 (elf32_hppa_link_hash_entry): Delete.
6362 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6363 stub_hash_table, and store the struct here rather than a pointer.
6364 Delete output_symbol_count. Add offset array. Change
6365 global_value to a bfd_vma.
6366 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6367 (elf32_hppa_stub_hash_traverse): Delete.
6368 (elf32_hppa_name_of_stub): Delete.
6369 (elf32_hppa_link_hash_lookup): Delete.
6370 (elf32_hppa_link_hash_traverse): Delete.
6371 (elf32_hppa_stub_hash_table_init): Delete.
6372 (elf32_hppa_size_of_stub): Pass input section and offset rather
6373 than location and calculate location here. Don't pass name as all
6374 stubs are now the same size.
6375 (elf32_hppa_stub_hash_newfunc): Init new fields.
6376 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6377 too.
6378 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6379 comparing against ints. Rewrite stub handling code.
6380 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6381 Case enums to int before comparing against ints. Remove
6382 bfd_reloc_dangerous case.
6383 (elf32_hppa_build_one_stub): Rewrite.
6384 (elf32_hppa_size_one_stub): New function.
6385 (elf32_hppa_build_stubs): Rewrite.
6386 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6387 Rewrite stub-handling specific code.
6388
6389 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6390
6391 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6392
6393 * hppa_stubs.h: Delete.
6394 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6395 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6396 * Makefile.in: Regenerate.
6397
6398 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6399 e_nlrsel.
6400
6401 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6402
6403 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6404 and section name for bfd_reloc_notsupported error message.
6405 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6406 bfd_reloc_notsupported.
6407 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6408
6409 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6410 undefined weak symbols for all relocs.
6411 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6412 offsets are relative to one past the delay slot.
6413 (elf32_hppa_size_stubs): Account for reloc addend when calculating
6414 branch destination. Put addend into stub name too.
6415 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6416 adjust by 8 when deciding whether a linker stub is needed. Put
6417 addend into stub name as for above.
6418
6419 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6420 various args and vars.
6421 (elf32_hppa_bfd_final_link_relocate): Here too.
6422 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
6423 inner block var to avoid shadowing.
6424
6425 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
6426 unsigned.
6427 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6428 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6429 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6430
6431 * libhppa.h: Change practically all unsigned ints to plain ints.
6432 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
6433 prototypes.
6434
6435 From Ryan Bradetich <rbradetich@uswest.net>
6436 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6437 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6438 suit above.
6439 From David Huggins-Daines <dhd@linuxcare.com>
6440 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6441 to the new OP_* ones.
6442
6443 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6444 error exit. Bail out earlier on plabel relocs that we aren't
6445 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
6446 string, and then don't free our copy.
6447 (elf32_hppa_build_one_stub): Make insn unsigned int.
6448
6449 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6450 available with BL, not BE and BLE.
6451
6452 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6453 code for elf arg relocs.
6454 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6455 argument with elf_link_hash_entry h. Handle undefined weak
6456 symbols. Move $global$ lookup from here...
6457 (elf32_hppa_relocate_section): ...to here. Return correct error
6458 message for non-handled relocs.
6459 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
6460 wrong test was -0x3ffff to +0x40000.
6461
6462 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6463 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6464 Handle them as such.
6465 (elf_hppa_relocate_insn): Fix a typo.
6466
6467 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6468 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6469 assemble_17, assemble_21): Delete.
6470 Supply defines for all 64 possible opcodes.
6471 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
6472 formats. Handle COMICLR.
6473 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
6474 -10, -16, 16, 22.
6475
6476 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
6477 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
6478 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
6479 to suit.
6480 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
6481 the local syms - did this code get deleted accidentally? Ignore
6482 undefined and undefweak syms.
6483
6484 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
6485 block. Use it instead of elf64_hppa_hash_table (info).
6486 (elf_hppa_final_link_relocate): Use hppa_info instead of
6487 elf64_hppa_hash_table (info).
6488
6489 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6490 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6491 (hppa_rebuild_insn): Mask immediate bits here instead.
6492 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6493
6494 2000-07-08 Alan Modra <alan@linuxcare.com.au>
6495
6496 * section.c (struct sec): Add id field. Tidy comment formatting.
6497 (bfd_make_section_anyway): Set id.
6498 (STD_SECTION): Init id too.
6499 Change CONST to const throughout.
6500 * archures.c (bfd_arch_info): Tidy comment.
6501 (bfd_arch_list): Change a CONST to const.
6502 * libbfd-in.h: Tidy comments and replace CONST with const.
6503 * elf-bfd.h: Likewise.
6504 * libbfd.h: Regenerate.
6505 * bfd-in2.h: Regenerate.
6506 * libcoff.h: Regenerate.
6507
6508 2000-07-07 DJ Delorie <dj@redhat.com>
6509
6510 * archive.c (_bfd_write_archive_contents): Add an informative
6511 comment.
6512
6513 2000-07-06 Kazu Hirata <kazu@hxi.com>
6514
6515 * srec.c: Fix formatting.
6516
6517 2000-06-05 DJ Delorie <dj@redhat.com>
6518
6519 * MAINTAINERS: new
6520
6521 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
6522
6523 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
6524 value of PC-relative offsets.
6525
6526 2000-07-03 Jim Wilson <wilson@cygnus.com>
6527
6528 * elf64-alpha.c (alpha_elf_size_info): New.
6529 (elf_backend_size_info): Define to alpha_elf_size_info.
6530 * elfcode.h (elf_size_info): Change hash bucket size to 4.
6531
6532 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
6533
6534 * elf32-mips.c: Include elf32-target.h again for the traditional
6535 MIPS targets.
6536
6537 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
6538
6539 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
6540 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
6541 (avr_info_to_howto_rela): Likewise.
6542 (elf32_avr_gc_mark_hook): Likewise.
6543 (elf32_avr_gc_sweep_hook): Likewise.
6544 (elf32_avr_relocate_section): Likewise.
6545
6546 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
6547
6548 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
6549 an external symbol for a non-shared, non-relocatable link.
6550
6551 2000-07-03 Nick Clifton <nickc@redhat.com>
6552
6553 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
6554 is an external symbol.
6555 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
6556 external symbol.
6557
6558 2000-07-03 Kazu Hirata <kazu@hxi.com>
6559
6560 * reloc16.c: Fix formatting.
6561
6562 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
6563
6564 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
6565 to add a new target for traditional mips i.e
6566 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
6567 * configure.in: Likewise.
6568 * configure: Rebuild.
6569 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
6570 bfd_target_vector.
6571 (bfd_elf32_tradlittlemips_vec): Likewise.
6572 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
6573 to see that elfNN_bed does not get redefined even if the target file
6574 is included twice for a chip. See elf32-mips.c.
6575
6576 2000-07-01 Alan Modra <alan@linuxcare.com.au>
6577
6578 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6579 (CLEANFILES): Add DEPA.
6580 * Makefile.in: Regenerate.
6581
6582 2000-06-30 DJ Delorie <dj@cygnus.com>
6583
6584 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
6585 can't assume the PE header is at 0x80.
6586
6587 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
6588
6589 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
6590
6591 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
6592
6593 * go32stub.h: Update stub.
6594
6595 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
6596
6597 * archures.c (bfd_mach_avr5): Define.
6598 * bfd-in2.h (bfd_mach_avr5): Define.
6599 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
6600 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
6601 (compatible): Update comment. Add missing test.
6602 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
6603 for avr2 and avr4. Simplify 8K wrap code.
6604 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
6605 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
6606
6607 2000-06-26 Kazu Hirata <kazu@hxi.com>
6608
6609 * coff-h8300.c: Fix formatting.
6610 * cpu-h8300.c: Likewise.
6611
6612 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
6613
6614 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
6615 for local symbols whose names are unknown.
6616
6617 2000-06-22 Alan Modra <alan@linuxcare.com.au>
6618
6619 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6620 find one.
6621 * Makefile.in: Regenerate.
6622 * doc/Makefile.in: Regenerate.
6623
6624 2000-06-20 H.J. Lu <hjl@gnu.org>
6625
6626 * Makefile.am: Rebuild dependency.
6627 * Makefile.in: Rebuild.
6628
6629 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6630
6631 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
6632 (elf_backend_copy_indirect_symbol): Map to the new function.
6633
6634 2000-06-20 Alan Modra <alan@linuxcare.com.au>
6635
6636 * archive.c (normalize): Correct pointer comparison when checking
6637 for backslashes.
6638 (bfd_bsd_truncate_arname): Likewise.
6639 (bfd_gnu_truncate_arname): Likewise.
6640
6641 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
6642
6643 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
6644 sections elf_{text,data}_{section,symbol}.
6645 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
6646 (_bfd_mips_elf_hide_symbol): New function.
6647 (elf_backend_hide_symbol): Map to the new function.
6648 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
6649 definitions of mips_elf_{text,data}_{section,symbol}.
6650 (mips_elf_local_relocation_p): Try to find the direct symbol
6651 based on new check_forced argument.
6652 (mips_elf_calculate_relocation): Use new version of
6653 mips_elf_local_relocation_p.
6654 (mips_elf_relocate_section): Likewise.
6655 (_bfd_mips_elf_relocate_section): Likewise.
6656 (mips_elf_sort_hash_table): Only assert that have enough GOT
6657 space.
6658 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
6659 entry if the relocation based on the new external argument.
6660 (mips_elf_create_dynamic_relocation): Assert that we have a
6661 section contents allocated where we can swap out the dynamic
6662 relocations.
6663 (mips_elf_calculate_relocation): Find the real hash-table entry
6664 correctly by using h->root.root.type. Only create a dynamic
6665 relocation entry if the symbol is defined in a shared library.
6666 Create an external GOT entry for the GOT16 relocation if the
6667 symbol was forced local.
6668 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
6669 dynamic index if the symbol was forced local.
6670
6671 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6672
6673 * elf32-mips.c: Fix typos in comments.
6674
6675 2000-06-19 Mark Kettenis <kettenis@gnu.org>
6676
6677 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
6678 CORE_VERSION_1.
6679
6680 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
6681
6682 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
6683 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
6684 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
6685 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
6686 (bfd_elf32_m68hc11_vec): Likewise.
6687 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
6688 Supports 68hc11 & 68hc12 at the same time.
6689 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
6690 bfd_target_vector.
6691 (bfd_elf32_m68hc11_vec): Likewise.
6692 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
6693 * archures.c (bfd_m68hc12_arch): Define and register in global list
6694 (bfd_m68hc11_arch): Likewise.
6695 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
6696 BFD_RELOC_M68HC11_3B): Define.
6697 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
6698 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
6699
6700 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
6701
6702 * elf_bfd.h (struct elf_backend_data): Add info argument to
6703 elf_backend_hide_symbol.
6704 (_bfd_elf_link_hash_hide_symbol): Likewise.
6705 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
6706 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
6707 * elflink.h (elf_link_add_object_symbols): Likewise.
6708 (elf_link_assign_sym_version): Likewise.
6709
6710 2000-06-18 H.J. Lu <hjl@gnu.org>
6711
6712 * coff-i386.c (coff_i386_reloc): Don't return in case of
6713 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
6714 Compensate PE relocations when linking with non-PE object
6715 files to generate a non-PE executable.
6716
6717 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
6718
6719 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
6720 GOT entries if we're doing a static link or -Bsymbolic link.
6721
6722 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
6723
6724 * elflink.h (elf_link_adjust_relocs): Check for and call backend
6725 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
6726 available.
6727 (elf_link_output_relocs): Likewise.
6728 (elf_reloc_link_order): Likewise.
6729
6730 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6731
6732 * archures.c (enum bfd_architecture): #define constants for
6733 PowerPc and RS6000 machine numbers.
6734 * bfd-in2.h: Regenerate.
6735 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
6736 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
6737 and RS6000 machine numbers using #defined constants from
6738 archures.c.
6739 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
6740 machine numbers using #defined constants from archures.c. Add
6741 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
6742 64-bit words in 620 entry.
6743 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
6744 RSC, and RS2.
6745 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
6746
6747 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
6748
6749 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
6750 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
6751 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
6752
6753 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6754
6755 * bfd-in.h (bfd_family_coff): Define.
6756 * bfd-in2.h: Regenerate.
6757 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
6758 coff_find_nearest_line): Check COFFness using bfd_family_coff()
6759 instead of bfd_target_coff_flavour.
6760 * cofflink.c (_bfd_coff_final_link): Likewise.
6761 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
6762 exclude XCOFF files.
6763 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
6764 Likewise.
6765 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
6766 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
6767 * xcofflink.c (XCOFF_XVECP): Delete.
6768 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
6769 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
6770 bfd_xcoff_record_link_assignment,
6771 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
6772 check for bfd_target_xcoff_flavour.
6773
6774 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6775
6776 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
6777 files on AIX 4.3.
6778 (read_hdr): New function.
6779 (rs6000coff_core_p): Store mstsave or __context64 struct instead
6780 of trying to extract individual registers. Set abfd->arch_info
6781 to match the architecture that created the core file.
6782 (rs6000coff_get_section_contents): Delete.
6783 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
6784
6785 2000-06-14 H.J. Lu <hjl@gnu.org>
6786
6787 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
6788 is NULL.
6789
6790 2000-06-13 H.J. Lu <hjl@gnu.org>
6791
6792 * configure: Regenerate.
6793
6794 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
6795
6796 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
6797 armpei_little_vec.
6798
6799 2000-06-08 David O'Brien <obrien@FreeBSD.org>
6800
6801 * configure.in (VERSION): Update to show this is the CVS mainline.
6802
6803 2000-06-07 Alan Modra <alan@linuxcare.com.au>
6804
6805 * elf32-d10v.c: Include elf/d10v.h
6806 (enum reloc_type): Delete.
6807 * elf32-d30v.c: Include elf/d30v.h
6808 (enum reloc_type): Delete.
6809
6810 * Makefile.am: Run "make dep-am" to regenerate dependencies.
6811 * Makefile.in: Regenerate.
6812
6813 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
6814 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
6815 move HOWTOs into elf_howto_table.
6816 (R_386_standard, R_386_ext_offset): Define.
6817 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
6818 (elf_i386_reloc_type_lookup): Modify calculation of index into
6819 elf_howto_table since we've removed the padding.
6820 (elf_i386_info_to_howto_rel): Likewise.
6821 (elf_i386_relocate_section): Likewise.
6822
6823 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
6824
6825 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
6826
6827 2000-06-05 H.J. Lu <hjl@gnu.org>
6828
6829 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
6830 an error when seeing an undefined symbol with hidden/internal
6831 attribute. It is handled in *_relocate_section ().
6832
6833 2000-06-05 H.J. Lu <hjl@gnu.org>
6834
6835 * elflink.h (elf_fix_symbol_flags): Follow the link for the
6836 indirect symbol for the ELF_LINK_NON_ELF bit.
6837 (elf_link_output_extsym): Don't output the indirect symbol even
6838 if the ELF_LINK_NON_ELF bit is set.
6839
6840 2000-06-01 J.T. Conklin <jtc@redback.com>
6841
6842 * config.bfd (i[3456]86-*-netbsdelf*): New target.
6843 (i[3456]86-*-netbsdaout*): New target.
6844 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
6845 (i[3456]86-*-openbsd*): Likewise.
6846
6847 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
6848
6849 * trad-core.c: From hpux-core.c, include <dirent.h> or
6850 <sys/ndir.h> when possible.
6851
6852 2000-05-31 Ulrich Drepper <drepper@redhat.com>
6853
6854 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
6855 definitions. We must not assume they are sorted in the file
6856 according to their index numbers.
6857
6858 2000-05-31 Alan Modra <alan@linuxcare.com.au>
6859
6860 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
6861 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
6862 R_PARISC_DIR17F are for absolute branches; Handle them as such.
6863
6864 2000-05-30 Nick Clifton <nickc@cygnus.com>
6865
6866 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
6867 80960CA, 80960MC as valid machine names.
6868
6869 2000-05-30 H.J. Lu <hjl@gnu.org>
6870
6871 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
6872 visibility bits if the symbol is undefined. Correctly handle
6873 weak undefined symbols with hidden and internal attributes.
6874
6875 * elflink.h (elf_link_add_object_symbols): Always turn the
6876 symbol into local if it has the hidden or internal attribute.
6877
6878 2000-05-29 Philip Blundell <philb@gnu.org>
6879
6880 * ppcboot.c: Add packed attribute if compiling with GCC.
6881
6882 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
6883
6884 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
6885
6886 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
6887
6888 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
6889 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
6890 corefile on a 64-bit (Sparc Solaris) host. Also clean up
6891 a few old comments.
6892
6893 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6894
6895 * Makefile.am: Update dependencies with "make dep-am"
6896 * Makefile.in: Regenerate.
6897
6898 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
6899 bindtextdomain): Replace defines with those from intl/libgettext.h
6900 to quieten gcc warnings.
6901
6902 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
6903
6904 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
6905
6906 * archive.c (normalize, bfd_bsd_truncate_arname,
6907 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
6908 file names with backslashes.
6909
6910 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
6911 before opening it.
6912
6913 * sysdep.h: Include filenames.h.
6914
6915 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6916
6917 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
6918
6919 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6920
6921 * elf64-sparc.c (sparc64_elf_relax_section): New.
6922 (sparc64_elf_relocate_section): Optimize tail call into branch always
6923 if possible.
6924 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6925 (elf32_sparc_relax_section): New.
6926
6927 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6928
6929 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
6930 Remove unusued variables.
6931 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
6932 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
6933 previous fix, so that shared libs really don't influence targets
6934 extension mask and memory model.
6935
6936 2000-05-23 H.J. Lu <hjl@gnu.org>
6937
6938 * elf64-alpha.c (elf64_alpha_relocate_section): Check
6939 h->root.other not h->other.
6940 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6941
6942 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
6943
6944 2000-05-23 H.J. Lu <hjl@gnu.org>
6945
6946 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
6947 undefined symbol with the non-default visibility attributes.
6948 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
6949 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
6950 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6951 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6952 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6953 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6954 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6955 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6956 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6957 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
6958 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6959
6960 2000-05-22 Richard Henderson <rth@cygnus.com>
6961
6962 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
6963 PCREL22, PCREL64I. Zero size of special relocs.
6964 (elf64_ia64_reloc_type_lookup): Likewise.
6965 (USE_BRL, oor_brl, oor_ip): New.
6966 (elf64_ia64_relax_section): New.
6967 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
6968 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
6969 (elf64_ia64_relocate_section): Likewise.
6970 (bfd_elf64_bfd_relax_section): New.
6971 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
6972 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
6973 * bfd-in2.h, libbfd.h: Regenerate.
6974
6975 2000-05-22 Nick Clifton <nickc@cygnus.com>
6976
6977 * configure.in : Add peigen.lo to MIPS PE targets.
6978 * configure: Regenerate.
6979
6980 2000-05-22 Momchil Velikov <velco@fadata.bg>
6981
6982 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
6983 only if it is known for both input and output bfds. Separate
6984 error message strings as in some languages, it may be necessary
6985 to change more than one place in the string to change between
6986 'big' and 'little'.
6987
6988 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
6989 endianess checks, call _bfd_generic_verify_endian_match() instead.
6990
6991 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
6992
6993 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
6994
6995 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
6996 endianess before checking bfd flavours.
6997
6998 2000-05-22 H.J. Lu <hjl@gnu.org>
6999
7000 * elflink.h (elf_link_output_extsym): Clear the visibility
7001 field for symbols not defined locally.
7002
7003 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7004
7005 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7006 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7007 (hppa_rebuild_insn): Mask immediate bits here instead.
7008 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7009
7010 2000-05-18 Momchil Velikov <velco@fadata.bg>
7011
7012 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7013 relocs for an executable, ensure that they are virtual addresses.
7014
7015 2000-05-18 Jeffrey A Law (law@cygnus.com)
7016
7017 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7018
7019 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7020 Rick Gorton <gorton@scrugs.lkg.dec.com>
7021
7022 * elflink.h: Add emitrelocations support: when enabled, relocation
7023 information and relocation sections are put into final output
7024 executables. If the emitrelocations flag is set, do the following:
7025 (elf_bfd_final_link): Emit relocation sections.
7026 (elf_link_input_bfd): Compute relocation section contents.
7027 (elf_gc_sections): Don't clean relocation sections.
7028
7029 2000-05-16 Catherine Moore <clm@cygnus.com>
7030
7031 * som.c (som_decode_symclass): Recognize weak symbols.
7032
7033 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7034
7035 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7036 read idata section only from dataoff.
7037 (pe_print_edata): Correctly check for valid eat_member.
7038
7039 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7040
7041 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7042
7043 2000-05-14 Philip Blundell <philb@gnu.org>
7044
7045 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7046
7047 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7048
7049 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7050
7051 * peigen.c (pe_print_idata): Look for .idata section and print
7052 info even if data directory has zero entries. Read idata section
7053 starting from dataoff, and adjust all data offsets to suit. Cast
7054 all bfd_vma vars to unsigned long before passing to fprintf.
7055 * peigen.c (pe_print_edata): Similarly, look for .edata section
7056 and print info even if data directory has zero entries. Cast
7057 all bfd_vma vars to unsigned long before passing to fprintf.
7058
7059 From Szabolcs Szakacsits <szaka@F-Secure.com>
7060 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7061 directory size which may be bogus.
7062 * peigen.c (pe_print_edata): Similarly.
7063
7064 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7065
7066 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7067 section is empty.
7068 (copy_private_bfd_data): Allow for space possibly taken up by elf
7069 headers when calculating segment physical address from lma.
7070
7071 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7072
7073 * versados.c (versados_scan): Init stringlen and pass_2_done.
7074
7075 * trad-core.c (trad_unix_core_file_p): Return
7076 bfd_error_wrong_format rather than bfd_error_file_truncated.
7077
7078 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7079 add_data_entry. DataDirectory virtual address is relative.
7080 (pe_print_idata): Account for relative DataDirectory virtual
7081 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7082 (pe_print_edata): Similarly.
7083
7084 From Szabolcs Szakacsits <szaka@F-Secure.com>
7085 * peigen.c (dir_names): Add Delay Import Directory.
7086 (pe_print_idata): Always search for bfd section containing
7087 idata address rather than looking up section name. Print this
7088 section name rather than .idata.
7089 (pe_print_edata): Similarly. Also print some fields as %08lx.
7090 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7091 Win32Version.
7092
7093 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7094
7095 * xcoff.h: Rename to xcoff-target.h
7096 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7097 * coff-rs6000.c: Ditto.
7098 * coff64-rs6000.c: Ditto.
7099 * coff-pmac.c: Ditto.
7100 * Makefile.in: Regenerate.
7101
7102 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7103
7104 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7105 Change U802TOC64MAGIC to U803XTOCMAGIC.
7106
7107 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7108
7109 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7110 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7111 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7112
7113 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7114
7115 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7116
7117 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7118
7119 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7120 hidden and internal symbols.
7121 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7122 visibility.
7123 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7124 assign a PLT or GOT entry to symbols with hidden and
7125 internal visibility.
7126
7127 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7128
7129 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7130 the .bss section.
7131 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7132
7133 2000-05-02 H.J. Lu <hjl@gnu.org>
7134
7135 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7136 ELFOSABI_SYSV.
7137
7138 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7139
7140 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7141 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7142 dependencies.
7143 * Makefile.in: Regenerate.
7144
7145 2000-05-01 Jim Wilson <wilson@cygnus.com>
7146
7147 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7148 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7149 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7150 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7151 * Makefile.in: Rebuild.
7152
7153 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7154
7155 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7156 doesn't work very well.
7157
7158 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7159 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7160 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7161 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7162 (elf_hppa_info_to_howto): Likewise.
7163 (elf_hppa_info_to_howto_rel): Likewise.
7164 (elf_hppa_reloc_type_lookup): Likewise.
7165 (elf_hppa_is_local_label_name): Likewise.
7166 (elf_hppa_fake_sections): Likewise.
7167 (elf_hppa_final_write_processing): Likewise.
7168 (elf_hppa_howto_table): Fully initialise all entries.
7169 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7170 (elf_hppa_info_to_howto): Likewise.
7171 (elf_hppa_info_to_howto_rel): Likewise.
7172 (elf_hppa_reloc_type_lookup): Likewise.
7173 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7174 elf_hppa_unmark_useless_dynamic_symbols,
7175 elf_hppa_remark_useless_dynamic_symbols,
7176 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7177 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7178 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7179 elf32-hppa.c mess is cleaned up.
7180 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7181 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7182 r_field then call hppa_field_adjust inline func with variable
7183 r_field arg, instead call hppa_field_adjust with fixed arg.
7184 In case R_PARISC_PCREL22F, don't set r_field.
7185 (elf_hppa_relocate_insn): Change args and return type to unsigned
7186 int. Call re_assemble_* funcs to do the work.
7187
7188 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7189 sign extending.
7190
7191 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7192 extending.
7193 (sign_extend): Mask first before sign extending.
7194 (low_sign_extend): Rewrite without condition expression.
7195 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7196 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7197 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7198 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7199 result as function return value rather than through pointer arg.
7200 Accept unsigned int args, and return unsigned int.
7201 (re_assemble_3): New. Combines function of dis_assemble_3 with
7202 re-assembly of opcode and immediate.
7203 (re_assemble_12): Likewise.
7204 (re_assemble_16): Likewise.
7205 (re_assemble_17): Likewise.
7206 (re_assemble_21): Likewise.
7207 (re_assemble_22): Likewise.
7208 (hppa_field_adjust): Rewrite and document, paying attention to
7209 size of types and signed/unsigned issues.
7210 (get_opcode): Shift before masking.
7211 (FDLW): Rename to FLDW.
7212 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7213 (hppa_rebuild_insn): Change args and return value to unsigned
7214 int. Make use of re_assemble_*. Correct case 11.
7215
7216 * dep-in.sed: Handle ../opcodes/.
7217 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7218 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7219 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7220 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7221 elfarm-nabi.lo dependencies outside of auto-dependency area.
7222 Regenerate dependencies.
7223 * Makefile.in: Regenerate.
7224
7225 * configure.in (TRAD_HEADER): Test non-null before
7226 AC_DEFINE_UNQUOTED.
7227 * configure: Regenerate.
7228
7229 * reloc.c: Fix mis-spelling in comment.
7230
7231 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7232
7233 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7234 * vms.c (vms_openr_next_archived_file): Return NULL.
7235
7236 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7237
7238 * coffcode.h Copy changes mistakenly done to libcoff.h in
7239 4/24/2000 patch.
7240
7241 2000-04-29 Andreas Jaeger <aj@suse.de>
7242
7243 * libbfd-in.h: Correctly check GCC version.
7244 * bfd-in.h: Likewise.
7245 * libhppa.h: Likewise.
7246 * libbfd.h: Regenerate.
7247 * bfd-in2.h: Regenerate.
7248
7249 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7250
7251 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7252 coffdu-rs6000.{lo,c}.
7253 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7254 on xcoff.h
7255 * Makefile.in: Regenerate.
7256 * xcoff.h: New file.
7257 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7258 * coff-rs6000.c: Move all declarations and defines that are
7259 common to the xcoff backends into xcoff.h
7260 * coff64-rs6000.c: Ditto,
7261
7262 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7263
7264 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7265 _bfd_coff_force_symnames in strings and
7266 _bfd_coff_debug_string_prefix_length to their default values.
7267 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7268
7269 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7270
7271 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7272 _bfd_coff_force_symnames in strings and
7273 _bfd_coff_debug_string_prefix_length to their default values.
7274
7275 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7276
7277 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7278 Check local_got_refcounts before dereferencing.
7279
7280 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7281 before deciding we don't need R_PPC_PLT32 relocation.
7282 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7283 dereferencing.
7284
7285 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7286
7287 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7288 .plt entries.
7289 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7290 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7291 (elf_i386_relocate_section): Allow for .plt to go missing.
7292 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7293 can use a relative reloc for got as elf_i386_relocate_section.
7294 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7295
7296 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7297
7298 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7299
7300 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7301
7302 * Makefile.am (coff64-rs6000.lo): New rule.
7303 * Makefile.in: Regenerate.
7304 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7305 xcoff_is_local_label_name, xcoff_rtype2howto,
7306 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7307 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7308 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7309 (NO_COFF_SYMBOLS): Define.
7310 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7311 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7312 internally.
7313 (MINUS_ONE): New macro.
7314 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7315 relocation.
7316 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7317 coff_SWAP_aux_out): Map to the new functions.
7318 * coff64-rs6000.c: New file.
7319 * libcoff.h (bfd_coff_backend_data): Add new fields
7320 _bfd_coff_force_symnames_in_strings and
7321 _bfd_coff_debug_string_prefix_length.
7322 (bfd_coff_force_symnames_in_strings,
7323 bfd_coff_debug_string_prefix_length): New macros for above fields.
7324 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7325 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7326 of using coff_swap_sym_in directly.
7327 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7328 (coff_set_flags) Set magic for XCOFF64.
7329 (coff_compute_section_file_positions): Add symbol name length to
7330 string section length if bfd_coff_debug_string_prefix_length is
7331 true.
7332 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7333 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7334 using coff_swap_lineno_in directly.
7335 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7336 and _bfd_coff_debug_string_prefix_length fields.
7337 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7338 symbol names into strings table when
7339 bfd_coff_force_symnames_in_strings is true.
7340 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7341 SET_RELOC_VADDR): New macros.
7342 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7343 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7344 code.
7345 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7346 changes within RS6000COFF_C specific code.
7347 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7348 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7349 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7350 Extend existing hack on target name.
7351 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7352 target name.
7353 * coff-tic54x.c (ticof): Keep up to date with new fields
7354 in bfd_coff_backend_data.
7355 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7356 targ_selvecs to include rs6000coff64_vec for rs6000.
7357 * configure.in: Add rs6000coff64_vec case.
7358 * cpu-powerpc.c: New bfd_arch_info_type.
7359
7360 2000-04-24 Jeffrey A Law (law@cygnus.com)
7361
7362 * config.bfd: Only disable elf32-hppa vectors, not all of the
7363 BSD and OSF configuration support. Provide (disabled) clauses
7364 for PA64 support.
7365 * configure.in: Add clause for PA64 support.
7366 * configure: Rebuilt.
7367
7368 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7369 (bfd_elf64_hppa_vec): Declare.
7370
7371 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7372 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7373 (elf64-hppa.lo): Add dependencies.
7374 * Makefile.in: Rebuilt.
7375
7376 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7377
7378 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7379
7380 * libhppa.h (dis_assemble_16): New function.
7381 (pa_arch): Added pa20w element.
7382
7383 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7384
7385 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7386 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7387 bfd_elf64_slurp_reloc_table.
7388
7389 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7390 definitions to get external names.
7391 (elf_write_relocs): Renamed from write_relocs and make global.
7392 (elf_slurp_reloc_table): Make global.
7393 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7394
7395 * archive.c (hpux_uid_gid_encode): New function.
7396 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7397 defined and the ID is greater than 99999.
7398 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7399 special uid/gid fields into 32 bit values.
7400
7401 2000-04-21 Matthew Green <mrg@cygnus.com>
7402
7403 * config.bfd: Add NetBSD/sparc64 support.
7404
7405 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
7406 David Mosberger <davidm@hpl.hp.com>
7407 Timothy Wall <twall@cygnus.com>
7408 Jim Wilson <wilson@cygnus.com>
7409
7410 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7411 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7412 (BFD64_BACKENDS): Add elf64-ia64.lo.
7413 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7414 (cpu-ia64.lo, elf64-ia64.lo): New rules.
7415 * Makefile.in: Rebuild.
7416 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7417 (bfd_ia64_arch): Declare.
7418 (bfd_archures_list): Add bfd_ia64_arch.
7419 * bfd-in2.h: Rebuild.
7420 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7421 * configure: Rebuild.
7422 * configure.host: (ia64-*-linux*): New host.
7423 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7424 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7425 * elf.c (prep_headers): Add bfd_arch_ia64.
7426 * libbfd.h: Rebuild.
7427 * reloc.c: Add IA-64 relocations.
7428 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7429 Declare.
7430 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7431 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7432
7433 2000-04-21 Richard Henderson <rth@cygnus.com>
7434
7435 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7436 contents when performing a partial link.
7437 (bfd_elf_d30v_reloc_21): Likewise.
7438
7439 2000-04-20 H.J. Lu <hjl@gnu.org>
7440
7441 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7442 patch to symbols defined by a shared object.
7443 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7444
7445 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7446
7447 K&R compiler fixes.
7448 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7449 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7450
7451 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
7452
7453 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7454 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7455 (coff-ia64.lo): Add dependency.
7456 * Makefile.in: Regenerate.
7457 * coff-ia64.c: New file.
7458 * efi-app-ia32.c: Ditto.
7459 * efi-app-ia64.c: Ditto.
7460 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7461 (coff_set_flags): Ditto.
7462 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7463 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7464 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7465 * configure: Regenerate.
7466 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7467 (PUT_OPTHDR_IMAGE_BASE): Ditto.
7468 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7469 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7470 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7471 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7472 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7473 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7474 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7475 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7476 (GET_PDATA_ENTRY): Ditto.
7477 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
7478 data_start. Use above macros to read fields that are 64 bit wide for
7479 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
7480 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
7481 FileAlignment and SectionAlignment to minimum alignment if they
7482 are zero.
7483 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
7484 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
7485 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
7486 Use above macros to write fields that are 64 bit wide for
7487 COFF_WITH_PEP64.
7488 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
7489 5*4 otherwise. This should be right for IA-32 and IA-64, but may
7490 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
7491 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
7492 begin address, end address, and unwind info address only. Use
7493 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
7494 print addresses.
7495 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
7496 HIGH3ADJ relocation names.
7497 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
7498 * targets.c: Declare bfd_efi_app_ia32_vec and
7499 bfd_efi_app_ia64_vec.
7500 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
7501 bfd_efi_app_ia64_vec.
7502
7503 2000-04-17 Timothy Wall <twall@cygnus.com>
7504
7505 * bfd-in2.h: Add prototypes for tic54x load page access.
7506 * bfd-in.h: Regenerate.
7507 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
7508 in customized _set_arch_mach function.
7509 * coffcode.h (coff_set_alignment_hook): Set section load page if
7510 the appropriate macro is defined.
7511 (write_object_contents): Read section load page.
7512
7513 2000-04-13 Alan Modra <alan@linuxcare.com.au>
7514
7515 * elf32-hppa.h: Update copyright date.
7516
7517 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
7518 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
7519
7520 * elf32-d30v.c (MAX32): Don't use LL suffix.
7521 (MIN32): Define in terms of MAX32.
7522 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
7523
7524 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
7525 expression.
7526
7527 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
7528
7529 2000-04-12 Alan Modra <alan@linuxcare.com.au>
7530
7531 * dep-in.sed: Match space before file name, not after.
7532 * Makefile.am: Regenerate dependencies.
7533 * Makefile.in: Regenerate.
7534
7535 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
7536 case, allow address wrap-around stupidly removed 2000-03-17. Sign
7537 extend without an if statement.
7538
7539 2000-04-11 Alan Modra <alan@linuxcare.com.au>
7540
7541 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
7542 signed quantites.
7543 * elf32-mips.c (gprel16_with_gp): Likewise.
7544 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
7545 here using -0x40000, not (int)0xfffc0000.
7546 (elf32_hppa_size_of_stub): Likewise.
7547
7548 2000-04-11 Timothy Wall <twall@cygnus.com>
7549
7550 * coff-tic54x.c: Now builds with all targets.
7551 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
7552 * Makefile.in: Regenerate.
7553 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
7554 unitialized variable.
7555
7556 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
7557
7558 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
7559 --enable-build-warnings option.
7560 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
7561 * Makefile.in, configure: Re-generate.
7562
7563 2000-04-07 Nick Clifton <nickc@cygnus.com>
7564
7565 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
7566 BFD_RELOC_THUMB_PCREL_BLX.
7567
7568 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7569 R_ARM_XPC25 and R_ARM_THM_PC22.
7570
7571 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
7572 R_ARM_XPC25 and R_ARM_THM_XPC22.
7573 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
7574 R_ARM_[XPC25|THM_XPC22].
7575
7576 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
7577 elf/arm-oabi.h to elf/arm.h
7578
7579 * Makefile.am: Fix dependency for elfarm-oabi.c
7580 * Makefile.in: Regenerate.
7581
7582 * bfd-in2.h: Regenerate.
7583 * libbfd.h: Regenerate.
7584
7585 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7586
7587 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
7588 and restore it on failure. Release newly allocated tdata on
7589 failure.
7590
7591 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
7592
7593 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
7594 (decode_line_info): Set it. Report error if unit->line_offset is
7595 equal to or larger than it.
7596
7597 2000-04-07 Timothy Wall <twall@cygnus.com>
7598
7599 * targets.c: Added vecs for tic54x.
7600 * reloc.c: Added relocs for tic54x.
7601 * libbfd.h: Regenerated.
7602 * configure: Add TI COFF vecs for tic54x.
7603 * configure.in: Ditto.
7604 * config.bfd (targ_cpu): Recognize new tic54x target.
7605 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
7606 * bfd-in2.h: Add tic54x target and relocations.
7607 * Makefile.am, Makefile.in: Add tic54x target.
7608 * archures.c (bfd_archures_list): Add tic54x target.
7609 * coff-tic54x.c: New.
7610 * cpu-tic54x.c: New.
7611
7612 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7613
7614 * elfcore.h (elf_core_file_p): call backend_object_p which
7615 thereby gets an opportunity to update the arch/machine type.
7616
7617 2000-04-06 Timothy Wall <twall@cygnus.com>
7618
7619 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
7620 class. Handle SEC_CLINK and SEC_BLOCK flags.
7621 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
7622 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
7623
7624 2000-04-06 Nick Clifton <nickc@cygnus.com>
7625
7626 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
7627 EF_INTERWORK if this is an unknown EABI.
7628 (elf32_arm_merge_private_bfd_data): Check EABI version
7629 numbers. Only check EF_xxx flags if the EABI version number
7630 is unknown.
7631 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
7632 if the EABI version number is unknown.
7633 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
7634 if the EABI version number is unknown.
7635
7636 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
7637
7638 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
7639 BFD_RELOC_SH_LOOP_END.
7640 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
7641 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
7642 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
7643 (sh_elf_reloc_loop): New function.
7644 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
7645 any more.
7646 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
7647 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
7648 * bfd-in2.h, libbfd.h: Regenerate.
7649
7650 2000-04-04 Alan Modra <alan@linuxcare.com.au>
7651
7652 * po/bfd.pot: Regenerate.
7653
7654 * Makefile.am: Remove extraneous mkdep comment.
7655 (MKDEP): Use gcc -MM rather than mkdep.
7656 (DEP): Quote when passing vars to sub-make. Add warning
7657 message to end.
7658 (DEP1): Rewrite for "gcc -MM".
7659 (CLEANFILES): Add DEP2.
7660 Update dependencies.
7661 * Makefile.in: Regenerate.
7662
7663 2000-04-03 Kevin Buettner <kevinb@redhat.com>
7664
7665 * configure.in: Added corefile support for AIX 4.3. In particular,
7666 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
7667 compiling rs6000-core.c.
7668 * configure: Regenerated.
7669
7670 2000-04-03 H.J. Lu <hjl@gnu.org>
7671
7672 * cache.c (bfd_open_file): Unlink the output file only if
7673 it has non-zero size.
7674
7675 2000-04-01 Ken Block USG <block@zk3.dec.com>
7676
7677 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
7678 relative relocations for non-loaded sections in shared objects.
7679 (elf64_alpha_check_relocs): Similarly.
7680
7681 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
7682
7683 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
7684 BFD_RELOC_16 to switch for extended relocs.
7685 (MY_swap_ext_reloc_in): New.
7686 (MY_swap_ext_reloc_out): New.
7687 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
7688 than NAME(aout,swap_ext_reloc_in) for extended relocs.
7689 (NAME(aout,squirt_out_relocs)): Similarly use
7690 MY_swap_ext_reloc_out.
7691 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
7692
7693 2000-04-03 Kazu Hirata <kazu@hxi.com>
7694
7695 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
7696 the R_PCRWORD_B case.
7697
7698 2000-03-31 Thomas de Lellis <tdel@wrs.com>
7699
7700 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
7701 on some targets.
7702 * ihex.c : Ditto.
7703
7704 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
7705
7706 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
7707 HOWTO references to bfd_elf_generic_reloc, that have
7708 partial_inplace == true, now use the new function. The function
7709 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
7710 extends its fixes to the R_M32R_{16,24,32} relocs.
7711 The new logic in m32r_elf_lo16_reloc() has been removed, and
7712 it instead calls the new routine to obtain that functionality.
7713
7714 2000-03-27 Alan Modra <alan@linuxcare.com.au>
7715
7716 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
7717 elf32_avr_check_relocs, avr_final_link_relocate,
7718 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
7719 elf32_avr_object_p): Add prototypes.
7720 (elf32_avr_gc_mark_hook): Add default for h->root.type.
7721 (bfd_elf_avr_final_write_processing): Make static.
7722
7723 2000-03-27 Denis Chertykov <denisc@overta.ru>
7724
7725 * cpu-avr.c: New file. BFD support routines for AVR architecture.
7726 * archures.c (bfd_architecture): Add AVR architecture.
7727 (bfd_archures_list): Add reference to AVR architecture info.
7728 * elf.c (prep_headers): Handle bfd_arch_avr.
7729 * reloc.c: Add various AVR relocation enums.
7730 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
7731 list.
7732 * Makefile.am: Add support for AVR elf.
7733 * configure.in: Likewise.
7734 * config.bfd: Likewise.
7735 * Makefile.in: Regenerate.
7736 * configure: This too.
7737 * bfd-in2.h: And this.
7738 * libbfd.h: And this.
7739
7740 2000-03-24 H.J. Lu <hjl@gnu.org>
7741
7742 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
7743 (elf64_alpha_find_reloc_at_ofs): Likewise.
7744
7745 2000-03-17 Alan Modra <alan@linuxcare.com.au>
7746
7747 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
7748 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
7749 allowable range used to be -2**(n-1) to 2**n-1.
7750 * reloc.c (_bfd_relocate_contents): Same here. Also replace
7751 "boolean overflow" with "bfd_reloc_status_type flag".
7752
7753 2000-03-14 Doug Evans <dje@casey.transmeta.com>
7754
7755 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
7756
7757 2000-03-14 Kazu Hirata <kazu@hxi.com>
7758
7759 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
7760 of shrinks properly, including the last reloc.
7761
7762 2000-03-13 Kazu Hirata <kazu@hxi.com>
7763
7764 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
7765 check for R_MOVL2.
7766
7767 2000-03-11 Alan Modra <alan@linuxcare.com.au>
7768
7769 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
7770 a format mismatch rather than an "error" from bfd_read such as
7771 bfd_error_file_truncated.
7772
7773 2000-03-10 Geoff Keating <geoffk@cygnus.com>
7774
7775 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
7776 sign-extension and big-endian compensation for
7777 R_MIPS_64 even in ld -r.
7778
7779 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
7780
7781 * elf32-mips.c (mips_elf_next_relocation): Rename from
7782 mips_elf_next_lo16_relocation, and generalize to look
7783 for any relocation type.
7784 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
7785 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
7786 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
7787 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
7788 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
7789 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
7790 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
7791 (mips_rtype_to_howto): Likewise.
7792 (mips_elf_calculate_relocation): Handle new relocs.
7793 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
7794 are paired. The addend for R_MIPS_GNU_REL16_S2
7795 is shifted right two bits.
7796
7797 2000-03-10 Alan Modra <alan@linuxcare.com.au>
7798
7799 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
7800 comment, and ensure it doesn't happen again.
7801 (bfd_install_relocation): Same here.
7802 (_bfd_relocate_contents): Don't bother assigning unused signmask
7803 shift result. Fix typos in comments.
7804 Remove trailing whitespace throughout file.
7805
7806 2000-03-07 Doug Evans <dje@casey.transmeta.com>
7807
7808 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
7809 * bfd-in2.h: Rebuild.
7810
7811 2000-03-06 Nick Clifton <nickc@cygnus.com>
7812
7813 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
7814 sym_ptr_ptr fields.
7815 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
7816 (SIZEOF_ILF_STRINGS): Redefine.
7817 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
7818 relative reloc, as opposed to a section relative reloc.
7819 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
7820 not C_LABEL.
7821 Add length of symbol's prefix to string pointer.
7822 Store a pointer to the symbol in the symbol pointer table.
7823 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
7824 Initialise the symbol pointer table.
7825 Store the hint in the Hint/Name table.
7826 Make the jump reloc be symbol realtive, not section relative.
7827 Create an import symbol for imported code.
7828
7829 2000-03-06 Catherine Moore <clm@cygnus.com>
7830
7831 * elf.c (swap_out_syms): Check for null type_ptr.
7832
7833 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
7834
7835 * aout-target.h (MY(write_object_contents)): Remove unused
7836 and unusable "#if CHOOSE_RELOC_SIZE".
7837 * pc532-mach.c (MY(write_object_contents)): Ditto.
7838 * netbsd.h (MY(write_object_contents)): Ditto.
7839 * hp300hpux.c (MY(write_object_contents)): Ditto.
7840 * freebsd.h (MY(write_object_contents)): Ditto.
7841 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
7842
7843 2000-02-29 H.J. Lu <hjl@gnu.org>
7844
7845 * peicode.h (jtab): Make it static.
7846
7847 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
7848 defined and COFF_IMAGE_WITH_PE is not defined.
7849 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
7850 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
7851
7852 2000-03-01 Nick Clifton <nickc@cygnus.com>
7853
7854 * coff-arm.c (bfd_arm_process_before_allocation): Make
7855 'symndx' signed to prevent compile time warning.
7856
7857 * coff-mcore.c: Remove unused prototype for pe_object_p.
7858
7859 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
7860 functions that are not used when COFF_IMAGE_WITH_PE is
7861 defined.
7862 (struct sh_opcode): Change type of 'flags' field to unsigned
7863 long so that it can hold the USESAS flag.
7864
7865 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
7866
7867 * elf-m10300.c (mn10300_elf_relax_section): Initialise
7868 'sym_sec'.
7869
7870 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
7871 parameters.
7872 Remove unusued variables and code.
7873 (elf_backend_add_symbol_hook): Fix prototype.
7874
7875 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
7876 'srelgot'.
7877
7878 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
7879 'oldinst'.
7880
7881 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
7882 parameters.
7883 Remove unusued variables and code.
7884 (elf_backend_add_symbol_hook): Fix prototype.
7885
7886 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
7887
7888 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
7889 to unused function parameter.
7890
7891 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
7892 parameters.
7893 Use EMPTY_HOWTO to initialise empty howto slots.
7894 Remove unused variables.
7895
7896 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
7897
7898 2000-03-01 H.J. Lu <hjl@gnu.org>
7899
7900 * aoutx.h (aout_link_input_section_std): Pass "true" to
7901 the undefined_symbol callback.
7902 (aout_link_input_section_ext): Likewise.
7903 * bout.c (get_value): Likewise.
7904 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
7905 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
7906 Likewise.
7907 (alpha_relocate_section): Likewise.
7908 * coff-arm.c (coff_arm_relocate_section): Likewise.
7909 * coff-i960.c (coff_i960_relocate_section): Likewise.
7910 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
7911 * coff-mips.c (mips_relocate_section): Likewise.
7912 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
7913 * coff-sh.c (sh_relocate_section): Likewise.
7914 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
7915 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
7916 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
7917 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7918 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7919 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7920 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7921 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7922 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7923 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7924 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7925 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7926 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7927 * elflink.h (elf_link_output_extsym): Likewise.
7928 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
7929 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
7930 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
7931
7932 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
7933 undefined_symbol callback when building shared library with
7934 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
7935 "true".
7936 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7937 * elf32-i386.c (elf_i386_relocate_section): Likewise.
7938 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7939 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7940 (elf32_mips_get_relocated_section_content): Likewise.
7941 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7942 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7943 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7944 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7945
7946 2000-02-28 Nick Clifton <nickc@cygnus.com>
7947
7948 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
7949 * Makefile.in: Regenerate.
7950
7951 * configure.in: Add support for mips and sh pe vectors.
7952 * configure: regenerate.
7953
7954 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
7955 targets.
7956
7957 * targets.c: Add mips and sh pe vectors.
7958
7959 * libpei.h (coff_final_link_postscript): Only define if not
7960 already defined.
7961
7962 * coffcode.h: Add support for WinCE magic numbers.
7963
7964 * peigen.c (pe_print_reloc): Update comment and rearrange
7965 appending of newline character.
7966
7967 * peicode.h: Add support for Image Library Format.
7968 (pe_ILF_vars): Structure containing data used by ILF code.
7969 (pe_ILF_make_a_section): New function. Create a section based
7970 on ILF data.
7971 (pe_ILF_make_a_reloc): New function. Create a reloc based on
7972 ILF data.
7973 (pe_ILF_make_a_symbol): New function. Create a symbol based
7974 on ILF data.
7975 (pe_ILF_save_relocs): New function. Store the relocs created
7976 by pe_ILF_make_a_reloc in a section.
7977 (pe_ILF_build_a_bfd): New function. Create a BFD describing
7978 an ILF object.
7979 (pe_ILF_object_p): New function. Return a bfd_target pointer
7980 for an ILF object.
7981 (pe_bfd_object_p): If an ILF object is detected call
7982 pe_ILF_object_p on it.
7983
7984 * coff-arm.c: Add support for WinCE relocs which are different
7985 from normal ARM COFF relocs.
7986 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
7987
7988 * coff-sh.c: Add support for sh-pe target.
7989 * pe-sh.c: New file. Support code for sh-pe target.
7990 * pei-sh.c: New file. Support code for sh-pe target.
7991
7992 * pe-mips.c: New file. Support code for mips-pe target.
7993 * pei-mips.c: New file. Support code for mips-pe target.
7994
7995 2000-02-27 Jakub Jelinek <jakub@redhat.com>
7996
7997 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
7998 architecture if the object causing the bump is dynamic.
7999 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8000 and also don't it for memory ordering.
8001 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8002
8003 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8004
8005 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8006 calling bfd_get_section_size_before_reloc.
8007 (decode_line_info): Likewise.
8008 (_bfd_dwarf2_find_nearest_line): Likewise.
8009
8010 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8011
8012 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8013 name of the libtool directory.
8014 * Makefile.in: Rebuild.
8015
8016 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
8017
8018 * som.c (SOM_HOWTO): Define.
8019 (som_hppa_howto_table): Use it.
8020
8021 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8022
8023 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8024
8025 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8026
8027 2000-02-24 Catherine Moore <clm@cygnus.com>
8028
8029 * som.c (som_misc_symbol_info): Add field
8030 secondary_def.
8031 (som_bfd_derive_misc_symbol_info): Initialize
8032 secondary_def.
8033 (som_build_and_write_symbol_table): Keep track
8034 of secondary_def field.
8035 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8036 if secondary_def field is set.
8037 (som_bfd_ar_write_symbol_stuff): Initialize
8038 secondary_def.
8039
8040 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8041
8042 * dwarf2.c (read_address): Read 16-bits addresses.
8043 (parse_comp_unit): Accept addr_size == 2.
8044
8045 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8046
8047 * bfd-in.h: Update copyright date.
8048
8049 2000-02-23 Linas Vepstas <linas@linas.org>
8050
8051 * cpu-i370.c: New file.
8052 * elf32-i370.c: New file.
8053 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8054 (bfd_i370_arch): New.
8055 (bfd_archures_list): Add bfd_i370_arch.
8056 * elf.c (prep_headers): Add bfd_arch_i370.
8057 * Makefile.am: Add support for IBM 370 elf.
8058 * config.bfd: Likewise.
8059 * configure.in: Likewise.
8060 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8061 * reloc.c (bfd_reloc_code_type): Likewise.
8062 * targets.c: Likewise.
8063
8064 * Makefile.in: Regenerate.
8065 * configure: Regenerate.
8066 * bfd-in2.h: Regenerate.
8067
8068 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8069
8070 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8071 invalid relocation types, and change them to R_386_NONE.
8072
8073 2000-02-22 H.J. Lu <hjl@gnu.org>
8074
8075 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8076 not defined, don't add a second ELF_VER_CHR.
8077
8078 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8079 symbols converted to local symbols even when stripping all
8080 symbols.
8081 (elf_link_output_extsym): Process global symbols converted to
8082 local symbols even if they are being stripped.
8083
8084 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8085
8086 * archures.c (bfd_octets_per_byte): Return unsigned int.
8087 (bfd_arch_mach_octets_per_byte): Ditto.
8088 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8089 comparison warning.
8090 * section.c (bfd_get_section_size_before_reloc): Quell signed
8091 vs. unsigned comparison warning.
8092 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8093 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8094 change. What was I thinking?
8095 * bfd-in2.h: Regenerate.
8096
8097 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8098 (elf_gc_sections): Same here.
8099 (elf_gc_common_finalize_got_offsets): And here.
8100
8101 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8102
8103 ELF HPPA doesn't work at present; remove it until it does.
8104 * config.bfd: Comment out setting targ_defvec to
8105 bfd_elf32_hppa_vec.
8106 * Makefile.am: Rebuild dependencies.
8107 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8108 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8109 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8110 * Makefile.in: Rebuild.
8111 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8112
8113 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8114
8115 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8116 is no bfd_free(). Revert bfd_free part of previous change.
8117
8118 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8119
8120 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8121 arrays.
8122 (coff_compute_section_file_positions): Use bfd_free to pair
8123 bfd_malloc.
8124 (coff_write_object_contents): Likewise.
8125
8126 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8127 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8128
8129 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8130
8131 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8132 (xcoff_ar_file_hdr_big): New structure.
8133 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8134 (xcoff_ar_hdr_big): New structure.
8135 (SIZEOF_AR_HDR_BIG): New macro.
8136 (xcoff_big_format_p): New macro.
8137 (xcoff_ardata_big): New macro.
8138 (arch_xhdr_big): New macro.
8139 (xcoff_slurp_armap): Handle large archives.
8140 (xcoff_archive_p): Detect large archives.
8141 (xcoff_read_ar_hdr): Handle large archives.
8142 (xcoff_openr_next_archived_file): Handle large archives.
8143 (xcoff_generic_stat_arch_elt): Handle large archives.
8144 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8145 (xcoff_write_armap_big): New function.
8146 (xcoff_write_armap): New function, dispatch to _old or _big.
8147 (xcoff_write_archive_contents_old): Rename from
8148 xcoff_write_archive_contents.
8149 (xcoff_write_archive_contents_big): New function.
8150 (xcoff_write_archive_contents): New function, dispatch to _old or
8151 _big.
8152
8153 2000-02-18 Richard Henderson <rth@cygnus.com>
8154
8155 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8156 and hide_symbol members.
8157 (elf_link_hash_copy_indirect): Remove.
8158 (elf_link_hash_hide_symbol): Remove.
8159 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8160 and elf_backend_hide_symbol.
8161 (_bfd_elf_link_hash_copy_indirect): Declare.
8162 (_bfd_elf_link_hash_hide_symbol): Declare.
8163 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8164 (_bfd_elf_link_hash_hide_symbol): Likewise.
8165 (_bfd_elf_link_hash_table_init): Don't init killed members.
8166 * elflink.h (elf_link_add_object_symbols): Use the bed function
8167 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8168 (elf_link_assign_sym_version): Likewise.
8169 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8170 (elf_backend_hide_symbol): Likewise.
8171 (elfNN_bed): Update for new members.
8172
8173 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8174
8175 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8176 STACK_END_ADDR): Define for new core file format.
8177 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8178 for handling the vagaries of the various core file structures used
8179 by AIX over the years.
8180 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8181 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8182 core_dumpx structure.
8183
8184 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8185
8186 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8187 (bfd_mach_sh3_dsp): Likewise.
8188 (bfd_mach_sh4): Reinstate.
8189 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8190 * bfd-in2.h: Regenerate.
8191 * coff-sh.c (struct sh_opcode): flags is no longer short.
8192 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8193 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8194 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8195 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8196 (sh_opcodes): No longer const.
8197 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8198 (sh_insn_uses_reg): Check for USESAS and USESR8.
8199 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8200 (_bfd_sh_align_load_span): Return early for SH4.
8201 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8202 Take into account that field b of a parallel processing insn
8203 could be mistaken for a separate insn.
8204 * cpu-sh.c (arch_info_struct): New array elements for
8205 sh2, sh-dsp and sh3-dsp.
8206 Reinstate element for sh4.
8207 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8208 (SH4_NEXT): Reinstate.
8209 (SH3_NEXT, SH3E_NEXT): Adjust.
8210 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8211 * elf32-sh.c (sh_elf_set_private_flags): New function.
8212 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8213 (sh_elf_merge_private_data): New function.
8214 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8215 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8216 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8217 sh_elf_merge_private_data.
8218
8219 2000-02-13 Richard Henderson <rth@cygnus.com>
8220
8221 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8222 hide_symbol members.
8223 (elf_link_hash_copy_indirect): New.
8224 (elf_link_hash_hide_symbol): New.
8225 * elflink.h (elf_link_add_object_symbols): Break out copy from
8226 indirect new new symbol to elf.c.
8227 (elf_link_assign_sym_version): Break out privatization of
8228 non-exported symbol to elf.c.
8229 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8230 (_bfd_elf_link_hash_hide_symbol): New.
8231 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8232
8233 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8234
8235 * section.c (_bfd_strip_section_from_output): Add info parameter.
8236 If it passed as non-NULL, use it to check whether any input BFD
8237 has an input section which uses this output section. Change all
8238 callers.
8239 * bfd-in2.h: Rebuild.
8240
8241 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8242 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8243 1999-11-29.
8244 * bfd-in2.h: Rebuild.
8245
8246 2000-02-10 Timothy Wall <twall@cygnus.com>
8247
8248 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8249 allow final modifications of swapped-in symbol.
8250 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8251 * coffcode.h (coff_write_relocs): Use macro
8252 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8253 symbol index should be set to -1.
8254
8255 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
8256
8257 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8258 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8259 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8260 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8261 sh_insns_uses_or_sets_freg): New functions.
8262 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8263 * (sh_insns_conflict): Use new functions and new macros to
8264 detect conflicts when two instructions both set same integer registers,
8265 both set same fp register, and both set special register.
8266
8267 2000-02-09 Timothy Wall <twall@cygnus.com>
8268
8269 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8270 swapping in sections, so that the swapping routines have access to
8271 the arch/mach info.
8272
8273 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8274
8275 * coff-go32.c: Update comment. Update copyright.
8276
8277 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8278
8279 * syms.c (bfd_decode_symclass)
8280 Two new class characters were added - 'V' and 'v'. The
8281 meaning of 'W' is now restricted to just weak non-object
8282 symbols. This allows differentiation between, for example,
8283 weak functions vs weak objects. nm for example now dumps:
8284 'W' = weak global
8285 'w' = weak unresolved
8286 'V' = weak global object
8287 'v' = weak unresolved object
8288
8289 (bfd_is_undefined_symclass): New function. Return true if the
8290 given symbol class represents and undefined/unresolved symbol.
8291
8292 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8293 unresolved symbols.
8294
8295 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8296
8297 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8298 STT_ARM_16BIT flag set, but it is not attached to a data object
8299 return STT_ARM_16BIT so that it will be treated as code by the
8300 disassembler.
8301
8302 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8303
8304 * coff-i386.c (i3coff_object_p): Remove prototype.
8305 Update copyright.
8306
8307 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8308 to name. Update copyright.
8309
8310 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8311 assignment to avoid warning. Update copyright.
8312
8313 2000-01-24 Robert Lipe (robertl@sco.com)
8314
8315 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8316 instead of using GNU C extension.
8317
8318 2000-01-21 Nick Clifton <nickc@cygnus.com>
8319
8320 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8321 amount from a bfd_in_memory structure.
8322 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8323 structure.
8324
8325 2000-01-14 Nick Clifton <nickc@cygnus.com>
8326
8327 * linker.c (default_indirect_link_order): oops - fix incorrectly
8328 applied patch from Tim Wall.
8329
8330 2000-01-13 Timothy Wall (twall@tiac.net>
8331
8332 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8333 = scnhsz, filhsz, relsz, aoutsz, etc)
8334
8335 * coffswap.h: Ditto.
8336
8337 2000-01-13 Nick Clifton <nickc@cygnus.com>
8338
8339 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8340 interwork thumb to arm stub.
8341
8342 2000-01-13 Timothy Wall (twall@tiac.net>
8343
8344 * archures.c (bfd_octets_per_byte): New function: Return
8345 target byte size.
8346 (bfd_arch_mach_octets_per_byte): New function: Return target
8347 byte size.
8348
8349 * section.c: Distinguish between octets and bytes for usage of
8350 _cooked_size, _raw_size, and output_offset. Clarify
8351 description of bfd_set_section_contents.
8352
8353 * bfd-in2.h: Regenerate.
8354
8355 * coffgen.c: Indicate that the offset parameter is in bytes, not
8356 octets.
8357
8358 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8359 where appropriate to get the octet offset when calling
8360 bfd_set_section_contents.
8361 (bfd_coff_reloc_link_order): Ditto.
8362
8363 * linker.c (bfd_generic_reloc_link_order): Ditto.
8364 (_bfd_default_link_order): Ditto.
8365
8366 * reloc.c (bfd_perform_relocation): Distinguish between octets
8367 and bytes. Use octets when indexing into octet data; use bytes
8368 when calculating target addresses.
8369 (bfd_install_relocation): Ditto.
8370
8371 * srec.c (srec_write_section): Ditto.
8372
8373 2000-01-13 Nick Clifton <nickc@cygnus.com>
8374
8375 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8376 3 to 2. This allows 4 byte sized sections, which is necessary for
8377 dlltool to build functioning DLLs.
8378
8379 2000-01-10 Philip Blundell <pb@futuretv.com>
8380
8381 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8382 (arm*-*-conix*): New target.
8383
8384 2000-01-10 Egor Duda <deo@logos-m.ru>
8385
8386 * config.bfd: Include elf32_i386 vector to target list for cygwin
8387 and mingw.
8388
8389 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8390 * configure.in: Test for structure win32_pstatus_t in
8391 <sys/procfs.h>
8392 * configure: Regenerate.
8393
8394 * elf.c (elfcore_grok_win32pstatus): New function: process
8395 win32_pstatus_t notes in elf core file.
8396 (elfcore_grok_note): Detect win32_pstatus notes.
8397
8398 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8399
8400 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8401 visibility.
8402 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8403 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8404
8405 For older changes see ChangeLog-9899
8406 \f
8407 Local Variables:
8408 mode: change-log
8409 left-margin: 8
8410 fill-column: 74
8411 version-control: never
8412 End:
This page took 0.220448 seconds and 5 git commands to generate.