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