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