s/value_ptr/struct value */
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
2cd533b7
L
12001-10-31 H.J. Lu <hjl@gnu.org>
2
3 * elflink.h (elf_link_output_extsym): Don't clear the visibility
4 field for relocateable.
5
4578e0a7
AM
62001-11-01 Alan Modra <amodra@bigpond.net.au>
7
4e12ff7f
AM
8 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
9 .plt relocs in DT_RELASZ.
4578e0a7 10
7649aa50
NC
112001-10-29 NIIBE Yutaka <gniibe@m17n.org>
12
13 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
14 targets.
15
a53ecf01
NC
162001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
17
18 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
19
3c3bdf30
NC
202001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
21
22 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
23 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
24 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
25 Regenerate dependencies.
26 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
27 * config.bfd: [BFD64] (mmix-*-*): New case.
28 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
29 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
30 (bfd_mmix_arch): Declare.
31 (bfd_archures_list): Add bfd_mmix_arch.
32 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
33 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
34 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
35 bfd_mmo_mmix_vec.
36 * reloc.c: Add MMIX relocations.
37 * bfd.c (struct _bfd, tdata): Add mmo_data.
38 * Makefile.in: Regenerate.
39 * configure: Regenerate.
40 * libbfd.h: Regenerate.
41 * bfd-in2.h: Regenerate.
42 * configure: Rebuild.
43
e0e8c97f
NC
442001-10-30 Richard Earnshaw (rearnsha@arm.com)
45
46 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
47 p_paddr of the segment that contains it.
f5ffc919
NC
48 (copy_private_bfd_data): If the LMA for a segment is known, use it
49 for matching sections to segments.
50 (assign_file_positions_for_segments): Use the LMA when adjusting
51 for inter-section alignment padding.
e0e8c97f 52
5b74f489
KH
532001-10-29 Kazu Hirata <kazu@hxi.com>
54
55 * README: Fix a typo.
56
0b6488e2
RH
572001-10-24 Richard Henderson <rth@redhat.com>
58
59 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
60 timestamp to time_t for ctime.
61
908d94bf
HPN
622001-10-24 Hans-Peter Nilsson <hp@axis.com>
63
64 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
65 unsigned, increasing index.
66
1b58be7e
L
672001-10-23 H.J. Lu <hjl@gnu.org>
68
69 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
70 m != NULL before accessing it.
71
ce757d15
AM
722001-10-23 Alan Modra <amodra@bigpond.net.au>
73
74 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
75 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
76 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
77
78 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
79 (hppa_link_hash_newfunc): Likewise.
80 (elf32_hppa_finish_dynamic_symbol): Likewise.
81 (allocate_dynrelocs): Always allocate .got relocs if shared.
82 (elf32_hppa_relocate_section): Output them too. Similarly
83 consolidate .plt reloc code, and no longer initialise .plt
84 when a reloc is output.
85 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
86 when no reloc is output.
87
88 From Herbert Xu <herbert@gondor.apana.org.au>
89 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
90 unreachable branches.
91
ca51bfff
L
922001-10-22 H.J. Lu <hjl@gnu.org>
93
94 * configure.in (WIN32LIBADD): Use -L../libiberty for
95 mips*-*-linux*.
96 * configure: Rebuild.
97
78be1d6e
L
982001-10-21 H.J. Lu <hjl@gnu.org>
99
100 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
101 if shared library is enabled only for Linux hosts.
102 * configure: Rebuild.
103
1b90af26
L
1042001-10-21 H.J. Lu <hjl@gnu.org>
105
106 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
107 ../libiberty/Makefile instead of $enable_shared.
108 * configure: Rebuild.
109
ebe7507a
L
1102001-10-21 H.J. Lu <hjl@gnu.org>
111
908d94bf
HPN
112 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
113 index 0.
ebe7507a 114
39691762
L
1152001-10-20 H.J. Lu <hjl@gnu.org>
116
117 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
118 if shared library is enabled.
119 * configure: Rebuild.
120
6a7805b5
L
1212001-10-20 H.J. Lu <hjl@gnu.org>
122
123 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
124
e0740195
L
1252001-10-19 H.J. Lu <hjl@gnu.org>
126
127 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
128 size is empty.
129
7595d193
L
1302001-10-18 H.J. Lu <hjl@gnu.org>
131
132 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
133 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
134
25263aad
JJ
1352001-10-18 Jakub Jelinek <jakub@redhat.com>
136
137 * section.c (_bfd_strip_section_from_output): Don't count
138 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
139
973ffd63
AM
1402001-10-17 Alan Modra <amodra@bigpond.net.au>
141
142 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
143 Elf_Internal_Shdr.contents now that it's no longer a PTR.
144 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
145 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
146 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
147 * elf32-sh.c (sh_elf_relax_section): Likewise.
148 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
149 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
150 * elf.c (setup_group): Warning fixes.
151 * elflink.h (elf_link_sort_relocs): Likewise.
152 * pdp11.c (slurp_reloc_table): Likewise.
153
df22989b
JH
1542001-10-16 Jeff Holcomb <jeffh@redhat.com>
155
156 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
157 casts.
158
1e09179f
L
1592001-10-15 H.J. Lu <hjl@gnu.org>
160
161 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
162 for relocations against discarded link-once section.
163
1e370bd2
AM
1642001-10-15 Alan Modra <amodra@bigpond.net.au>
165
cf5c0c5b
AM
166 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
167 bfd_reloc_outofrange and similar errors.
168
1e370bd2
AM
169 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
170 rather than ind->weakdef.
171 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
172 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
173 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
174 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
175 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
176
bbd7ec4a
AM
1772001-10-15 Alan Modra <amodra@bigpond.net.au>
178 H.J. Lu <hjl@gnu.org>
179
180 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
181 counts for aliases instead of aborting.
182 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
183 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
184
185 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
186 to -1 for non-function symbols.
187 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
188 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
189 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
190 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
191 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
192 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
193 plt.offset instead of plt.refcount when setting to -1.
194
6a360bf4
NC
1952001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
196
197 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
198 like R_ARM_PC24. Include reloc number in error message about
199 unresolvable relocs.
200
290394d6
JJ
2012001-10-10 Jakub Jelinek <jakub@redhat.com>
202
203 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
204 relocations against the same symbol in .rel{,a}.dyn section.
205
08da05b0
KH
2062001-10-10 Kazu Hirata <kazu@hxi.com>
207
208 * aout-encap.c: Fix comment typos.
209 * aoutx.h: Likewise.
210 * archive.c: Likewise.
211 * bout.c: Likewise.
212 * coff64-rs6000.c: Likewise.
213 * coffcode.h: Likewise.
214 * coffgen.c: Likewise.
215 * cofflink.c: Likewise.
216 * coff-mips.c: Likewise.
217 * ecoff.c: Likewise.
218 * elf32-m32r.c: Likewise.
219 * libcoff-in.h: Likewise.
220 * libecoff.h: Likewise.
221 * libxcoff.h: Likewise.
222 * nlm32-i386.c: Likewise.
223 * pdp11.c: Likewise.
224 * section.c: Likewise.
225 * som.c: Likewise.
226 * som.h: Likewise.
227 * bfd-in2.h: Regenerate.
228 * libcoff.h: Likewise.
229
079e9a2f
AM
2302001-10-10 Alan Modra <amodra@bigpond.net.au>
231
232 * elf.c (elf_map_symbols): Don't create new section symbols; Use
233 existing section syms. Update comments.
234 (copy_private_bfd_data): Formatting fixes.
235 (elfcore_grok_win32pstatus): Likewise.
236 (swap_out_syms): Likewise. Remove unnecessary level of braces.
237
945906ff
AM
2382001-10-09 Alan Modra <amodra@bigpond.net.au>
239
240 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
241 "group_name".
242 (elf_group_name): Define.
243 (elf_next_in_group): Define.
244 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
245 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
246 first member section; Instead use elf_next_in_group.
247 (bfd_section_from_shdr): Likewise.
248 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
249
dbb410c3
AM
2502001-10-09 Alan Modra <amodra@bigpond.net.au>
251
252 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
253 "next_in_group". Fix gp and gp_size comments.
254 * elf.c (union elf_internal_group): New.
255 (setup_group): New function.
256 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
257 Call setup_group for SHF_GROUP sections.
258 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
259 (elf_fake_sections): Set header type for SEC_GROUP, and header
260 flags for sections in a group.
261 (set_group_contents): New function.
262 (_bfd_elf_compute_section_file_positions): Call it.
263 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 264
dbb410c3
AM
265 * elflink.h (gc_mark_hook): Handle section groups.
266 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
267 * section.c (SEC_GROUP): Define.
268 (struct sec): Comment fixes.
269 * bfd-in2.h: Regenerate.
270
271 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
272 out of function args.
273 (_bfd_elf_canonicalize_reloc): Similarly.
274 (_bfd_elf_get_symtab): Here too.
275 (_bfd_elf_canonicalize_dynamic_symtab): And here.
276 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
277 bfd_bread, and remove unnecessary cast.
278
24c603fa
AH
2792001-10-08 Aldy Hernandez <aldyh@redhat.com>
280
bbd7ec4a 281 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 282
3f5864e1
SC
2832001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
284
285 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
286 compilation unit.
287
fb9ceeac
AM
2882001-10-06 Alan Modra <amodra@bigpond.net.au>
289
aec2f561
AM
290 * bfd.c (bfd_assert): Report bfd version.
291 (_bfd_abort): Likewise.
292
50b4d486
AM
293 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
294 section sym values. Instead replace any relocs against them with
295 relocs against STN_UNDEF, which has a zero value.
296
fb9ceeac
AM
297 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
298 relocs.
299
17617495
JL
3002001-10-05 Jeff Law <law@redhat.com>
301
302 * som.h (som_exec_data): New field "version_id".
303 * som.c (som_object_setup): Record the version_id if it
304 exists.
305 (som_prep_headers): Do not initialize version_id here.
306 (som_finish_writing): Initialize version_id here.
307
3082000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
309
310 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
311 according to the MIPS/SGI ELF64 ABI Draft.
312 (mips_elf_sort_hash_table): Typo.
313
58e3d09d
AM
3142001-10-04 Alan Modra <amodra@bigpond.net.au>
315
8ea52284
AM
316 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
317
58e3d09d
AM
318 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
319 copying flags if this is a weakdef.
320
b13c7b49
AM
3212001-10-04 Alan Modra <amodra@bigpond.net.au>
322
a90b9fca
AM
323 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
324 packing.
325
bbd7ec4a 326 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
327 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
328 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
329
b13c7b49
AM
330 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
331 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
332 backends we configure. Run "make dep-am".
333 (install-data-local): Install symcat.h.
334 * dep-in.sed: Remove symcat.h from dependencies.
335 * Makefile.in: Regenerate.
336
8bd621d8
AM
3372001-10-03 Vassili Karpov <malc@pulsesoft.com>
338
339 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
340
1e2be829
TS
3412001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
342
343 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
344 (elf_backend_default_use_rela_p): New define.
345
0a991dfe
AM
3462001-10-03 Alan Modra <amodra@bigpond.net.au>
347
57c7194e
AM
348 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
349 change.
350
87b632fc
AM
351 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
352 * configure: Regenerate.
353 * Makefile.am (BFD_H_FILES): Add version.h.
354 * Makefile.in: Regenerate.
355 * po/SRC-POTFILES.in: Regenerate.
356
0a991dfe
AM
357 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
358 elf_backend_copy_indirect_symbol so that backend has a chance to
359 copy other necessary fields.
360 * elf-bfd.h (struct elf_backend_data): Update description of
361 elf_backend_copy_indirect_symbol.
362 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
363 copying flags if this is a weakdef.
364 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
365 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
366 than bfd_link_hash_lookup.
bbd7ec4a 367 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
368 reloc processing for weakdefs.
369 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
370 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
371
a33d1f77
AM
3722001-10-02 Alan Modra <amodra@bigpond.net.au>
373
374 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
375 result of ELF64_R_TYPE to enum before using in a switch.
376 (ppc64_elf_gc_mark_hook): Likewise.
377 (ppc64_elf_gc_sweep_hook): Likewise.
378 (ppc64_elf_reloc_type_class): Likewise.
379
e43d48cc
AM
3802001-10-02 Alan Modra <amodra@bigpond.net.au>
381
382 * version.h: New file.
383 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
384 (BFD_VERSION_DATE): Define.
385 (BFD_VERSION_STRING): Define.
386 * configure.in: AC_SUBST bfd_version, bfd_version_date and
387 bfd_version_string.
388 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
389 * bfd-in2.h: Regenerate.
390 * configure: Regenerate.
391 * Makefile.am: Run "make dep-am".
392 * Makefile.in: Regenerate.
393
394 * bfd-in.h: Include "symcat.h".
395 (CONCAT4): Redefine as for old CAT4.
396 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
397 Add warning regarding whitespace.
398 * aout-cris.c: Likewise.
399 * aout-ns32k.c: Likewise.
400 * aout-sparcle.c: Likewise.
401 * aout-tic30.c: Likewise.
402 * aout0.c: Likewise.
403 * armnetbsd.c: Likewise.
404 * demo64.c: Likewise.
405 * elf-bfd.h: Likewise.
406 * gen-aout.c: Likewise.
407 * host-aout.c: Likewise.
408 * hp300bsd.c: Likewise.
409 * hp300hpux.c: Likewise.
410 * i386aout.c: Likewise.
411 * i386bsd.c: Likewise.
412 * i386dynix.c: Likewise.
413 * i386freebsd.c: Likewise.
414 * i386linux.c: Likewise.
415 * i386lynx.c: Likewise.
416 * i386mach3.c: Likewise.
417 * i386netbsd.c: Likewise.
418 * libaout.h: Likewise.
419 * m68k4knetbsd.c: Likewise.
420 * m68klinux.c: Likewise.
421 * m68klynx.c: Likewise.
422 * m68knetbsd.c: Likewise.
423 * m88kmach3.c: Likewise.
424 * mipsbsd.c: Likewise.
425 * newsos3.c: Likewise.
426 * ns32knetbsd.c: Likewise.
427 * pc532-mach.c: Likewise.
428 * pdp11.c: Likewise.
429 * riscix.c: Likewise.
430 * sparclinux.c: Likewise.
431 * sparclynx.c: Likewise.
432 * sparcnetbsd.c: Likewise.
433 * sunos.c: Likewise.
434 * targets.c: Likewise.
435 * vaxnetbsd.c: Likewise.
436 * vms-hdr.c: Likewise.
437
4eef72c7
AM
4382001-10-01 Alan Modra <amodra@bigpond.net.au>
439
440 * bfd-in.h: Remove comments regarding generated files.
441 * libbfd-in.h: Likewise.
442 * libcoff-in.h: Likewise.
443 * bfd-in2.h: Regenerate.
444 * libbfd.h: Likewise.
445 * libcoff.h: Likewise.
446
146be91a 4472001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 448 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
449
450 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
451 partial_inplace, matching assembler output. Set src_mask to
452 all ones.
453 (sh_elf_relocate_section): Delete misplaced comment.
454 For relocatable linking against section symbol, call
455 _bfd_relocate_contents for partial_inplace relocs and adjust
456 rel->r_addend for others.
457 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
458 bfd_get_32, not at rel->r_addend.
459
3c3e9281
AM
4602001-09-30 Alan Modra <amodra@bigpond.net.au>
461
462 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
463 the old dir refcount, so we indirectly set them to init_refcount.
464 Short-circuit asserts when we've just verified they are true.
465
862517b6
AM
4662001-09-29 Alan Modra <amodra@bigpond.net.au>
467
468 * section.c (struct sec): Remove kept_section.
469 (STD_SECTION): Remove kept_section initialisation.
470 (bfd_make_section_anyway): Here too.
471 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
472 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
473 * elflink.h (elf_link_input_bfd): Set discarded link-once section
474 symbols to zero, and remove all code involved with kept_section
475 and tracking section symbol values.
476 * bfd-in2.h: Regenerate.
477 * configure.in: Bump version number.
478 * configure: Regenerate.
479
65f38f15
AM
4802001-09-29 Alan Modra <amodra@bigpond.net.au>
481
482 * elf64-ppc.c (struct ppc_dyn_relocs): New.
483 (IS_ABSOLUTE_RELOC): Define.
484 (struct ppc_link_hash_entry): New.
485 (struct ppc_link_hash_table): New.
486 (ppc_hash_table): Define.
487 (link_hash_newfunc): New function.
488 (ppc64_elf_link_hash_table_create): New function.
489 (create_got_section): New function.
490 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
491 pointers to our dynamic sections in hash table.
492 (ppc64_elf_copy_indirect_symbol): New function.
493 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
494 dynamic sections. Localise vars. Modify code for refcounts
495 starting from zero. Don't allocate here, or force symbols dynamic.
496 Don't copy all relocs if shared, select ones we need. Add code
497 to track possible copy relocs for non-shared link.
498 (ppc64_elf_gc_mark_hook): Update comment.
499 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
500 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
501 code for reference counting garbage collection. Don't create .plt
502 entries for functions that don't comply with ABI naming convention,
503 and don't allocate .plt space here. Use short-cuts to dynamic
504 sections. If possible, keep dynamic relocations instead of using
505 copy relocs. Remove confused comments.
506 (ppc_adjust_dynindx): Delete.
507 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
508 (allocate_dynrelocs): New function.
509 (readonly_dynrelocs): New function.
510 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
511 space here, and call allocate_dynrelocs to allocate space for
512 global .plt, .got and reloc sections. Use short-cuts to dynamic
513 sections. Call readonly_dynrelocs to determine whether we need
514 DT_TEXTREL. Don't generate section symbols here, the generic
515 ELF linker code does it for us.
516 (ppc64_elf_final_link): Call regular ELF backend linker rather than
517 gc variety, since we do our own .got handling.
518 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
519 dynamic section short-cuts. Localise vars, and delay setting.
520 Handle unknown relocs in main switch statement. Replace ugly
521 complicated tests for unresolvable relocs with a simple direct
522 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
523 before allowing an undefined sym in a shared lib. Do R_*_DS tests
524 after main switch, when we've set addend. Do non-addend insn
525 tweaks before main swithc. Ignore input_section->vma when
526 calculating reloc offsets as it's always zero. Rewrite dynamic
527 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
528 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
529 of dynamic section short-cuts. Reorganise .plt handling code.
530 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
531 Move expressions out of swap_reloca_out function calls.
532 (ppc64_elf_reloc_type_class): New function.
533 (ppc64_elf_info_to_howto): Move common expression to local var.
534 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
535 of dynamic section short-cuts. Don't fiddle with section syms
536 here as the ELF linker does it for us.
537 (elf_backend_can_refcount): Define.
538 (bfd_elf64_bfd_link_hash_table_create): Define.
539 (elf_backend_copy_indirect_symbol): Define.
540 (elf_backend_reloc_type_class): Define.
541 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
542
21d17a58
AM
5432001-09-29 Alan Modra <amodra@bigpond.net.au>
544
51b64d56
AM
545 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
546 (struct elf_backend_data): Add can_refcount.
547 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
548 got.refcount and plt.refcount from init_refcount.
549 (_bfd_elf_link_hash_table_init): Set up init_refcount.
550 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
551 rather than got/plt.offset, and test for <= 0 rather than -1.
552 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
553 * elfxx-target.h (elf_backend_can_refcount): Define.
554 (elfNN_bed): Init can_refcount.
555 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
556 (_bfd_generic_link_hash_newfunc): Likewise.
557 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
558 starting from zero.
559 (elf_backend_can_refcount): Define.
560 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
561 starting from zero.
562 (elf32_hppa_copy_indirect_symbol): Make static to agree with
563 prototype.
564 (elf_backend_can_refcount): Define.
565 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
566 starting from zero.
567 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
568 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
569 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
570 (elf_backend_can_refcount): Define.
571 (elf_i386_copy_indirect_symbol): Make static to agree with
572 prototype. Formatting fix.
573 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
574 starting from zero.
575 (elf_backend_can_refcount): Define.
576 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
577 starting from zero.
578 (elf_backend_can_refcount): Define.
579 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
580 starting from zero.
581 (elf_backend_can_refcount): Define.
582 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
583 starting from zero.
584 (elf_backend_can_refcount): Define.
585 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
586 starting from zero.
587 (elf_backend_can_refcount): Define.
588
21d17a58
AM
589 * som.c (som_write_symbol_strings): Cast current_offset in
590 bfd_seek call to match param type.
591
78ae4cb9
JB
5922001-09-28 J. Brobecker <brobecker@gnat.com>
593
594 * som.c (som_write_symbol_strings): Fix incorrect type of
595 current_offset to match the function definition. Fixes a build
596 failure on HPUX-11.00.
597
65db3b0d
RH
5982001-09-28 Richard Henderson <rth@redhat.com>
599
e0aae569
RH
600 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
601 SEC_MERGE, SEC_STRINGS.
602
65db3b0d
RH
603 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
604 * bfd-in2.h: Rebuild.
605
ced53ee5
AM
6062001-09-28 Alan Modra <amodra@bigpond.net.au>
607
ffaef159
AM
608 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
609 reloc code using x86_64_reloc_map.
610
3ac8354b
AM
611 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
612 no longer allocate here. Localise some vars to blocks where they
613 are used.
614 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
615 setting of vars until needed.
616 (allocate_dynrelocs): Don't create a .plt entry without a reloc
617 when symbol visibilty makes a function local.
618 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
619 swap_reloca_out function calls.
620 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
621 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
622 switch statement.
623
0ac8d2ca
AM
624 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
625 no longer allocate here. Localise some vars to blocks where they
626 are used. Remove separate switch stmt for creating .got sec.
627 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
628 redundant casts and aborts. Delay setting of vars until needed.
629 (allocate_dynrelocs): Remove redundant casts and aborts.
630 (elf_i386_size_dynamic_sections): Move comment.
631 (elf_i386_finish_dynamic_symbol): Move expressions out of function
632 calls.
633 (elf_i386_relocate_section): Likewise. Comment typo fix.
634 (elf_i386_finish_dynamic_sections): Migrate common code out of
635 switch statement.
636 (elf_backend_* defines): Sort.
637
ced53ee5
AM
638 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
639 without a reloc when symbol visibilty makes a function local.
640
63b0f745
NC
6412001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
642
06317a27
NC
643 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
644 conflicting float flags.
63b0f745 645
ebe50bae
AM
6462001-09-26 Alan Modra <amodra@bigpond.net.au>
647
648 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
649 (elf_backend_copy_indirect_symbol): Define.
650 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
651 (struct elf_i386_link_hash_table): Likewise.
652 (link_hash_newfunc): Get rid of unnecessary casts.
653 (elf_i386_link_hash_table_create): Likewise.
654 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
655 Don't test input section SEC_READONLY here to try to avoid copy
656 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
657 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
658 here to properly test whether we need copy relocs. Do so for weak
659 syms too.
660
661 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
662 (elf_backend_copy_indirect_symbol): Define.
663 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
664 (stub_hash_newfunc): Get rid of unnecessary casts.
665 (hppa_link_hash_newfunc): Likewise.
666 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
667 Don't test input section SEC_READONLY here to try to avoid copy
668 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
669 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
670 here to properly test whether we need copy relocs. Do so for weak
671 syms too.
672
af6166c0
AM
6732001-09-26 Alan Modra <amodra@bigpond.net.au>
674
675 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
676 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
677 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
678
e62de969
JJ
6792001-09-25 Jakub Jelinek <jakub@redhat.com>
680
681 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
682 computation.
683
09c1cc88
L
6842001-09-25 H.J. Lu <hjl@gnu.org>
685
686 * bfd-in2.h: Regenerated.
687
38701953
AM
6882001-09-25 Alan Modra <amodra@bigpond.net.au>
689
690 * elf32-i386.c: Add comment re linker function names and ordering.
691 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
692 (elf_i386_grok_prstatus): Move before linker functions.
693 (elf_i386_grok_psinfo): Likewise.
694 (elf_i386_fake_sections): Move so that functions are ordered.
695 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
696
98ceb8ce
AM
6972001-09-25 Alan Modra <amodra@bigpond.net.au>
698
0ac8d2ca 699 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
700 throughout file.
701
98ceb8ce
AM
702 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
703 code handling this option.
704 (LONG_BRANCH_VIA_PLT): Likewise.
705 (RELATIVE_DYNRELOCS): Define as zero.
706 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
707 "pc_count" fields. Remove "section" field.
708 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
709 (elf32_hppa_check_relocs): Don't allocate space for dynamic
710 relocs here. Instead, record all needed dynamic relocs via
711 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
712 in elf_section_data.
713 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
714 (allocate_plt_and_got_and_discard_relocs): Rename to
715 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
716 (readonly_dynrelocs): New function.
717 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
718 Call readonly_dynrelocs to determine need for DT_TEXTREL.
719 Rename "i" to "ibfd". Allocate space for local dyn relocs.
720 (elf32_hppa_relocate_section): Make use of cached sreloc.
721 (elf32_hppa_reloc_type_class): New function.
722 (elf_backend_reloc_type_class): Define.
723
0c715baa
AM
7242001-09-25 Alan Modra <amodra@bigpond.net.au>
725
726 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
727 and "sreloc" fields.
728 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
729 "pc_count" fields. Remove "section" field.
730 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
731 allocate space for dynamic relocs here. Instead, record all
732 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
733 pointer to "sreloc" section in elf_section_data.
734 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
735 (allocate_plt_and_got_and_discard_relocs): Rename to
736 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
737 (readonly_dynrelocs): New function.
738 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
739 Rename "i" to "ibfd". Allocate space for local dyn relocs.
740 (elf_i386_relocate_section): Make use of cached sreloc.
741
f51e552e
AM
7422001-09-24 Alan Modra <amodra@bigpond.net.au>
743
744 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
745 reloc rather than just the type.
746 (_bfd_elf_reloc_type_class): Likewise.
747 * elf.c (_bfd_elf_reloc_type_class): Likewise.
748 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
749 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
750 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
751 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
752 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
753 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
754 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
755 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
756 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
757 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
758 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
759 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
760 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
761 * elflink.h: Formatting fixes.
762 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
763 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
764 o->contents to PTR. Update call to elf_backend_reloc_type_class.
765
0c35f01a
AM
7662001-09-22 John Reiser <jreiser@BitWagon.com>
767
768 * elfcode.h (elf_object_p): Allow for no section header at all in
769 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
770
1e738b87
NC
7712001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
772
773 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
774 * coff-mcore.c: Fix compile time warning messages.
775 * coff-ppc.c: Fix compile time warning messages.
776 * coffcode.h: Fix compile time warning messages.
777 * elf32-mips.c: Fix compile time warning messages.
778 * elf64-alpha.c: Fix compile time warning messages.
779 * libbfd.c: Fix compile time warning messages.
780 * bfd-in2.h: Regenerate.
1e738b87 781
923f08ff
AM
7822001-09-21 Alan Modra <amodra@bigpond.net.au>
783
784 * Makefile.am: Run "make dep-am".
785 * Makefile.in: Regenerate.
786
787 * aoutx.h: Formatting fixes.
788 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
789
790 * linker.c: Replace bfd_get_filename with bfd_archive_filename
791 in error message.
792
8f615d07
AM
7932001-09-21 Alan Modra <amodra@bigpond.net.au>
794
795 * bfd.c (bfd_archive_filename): New function.
796 * bfd-in2.h: Regenerate.
797 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
798 in error messages where the bfd is an input bfd.
799 * aout-cris.c: Likewise.
800 * coff-arm.c: Likewise.
801 * coff-mcore.c: Likewise.
802 * coff-ppc.c: Likewise.
803 * coff-rs6000.c: Likewise.
804 * coff-sh.c: Likewise.
805 * coff-tic54x.c: Likewise.
806 * coff-tic80.c: Likewise.
807 * coff64-rs6000.c: Likewise.
808 * coffcode.h: Likewise.
809 * coffgen.c: Likewise.
810 * cofflink.c: Likewise.
811 * ecofflink.c: Likewise.
812 * elf-hppa.h: Likewise.
813 * elf.c: Likewise.
814 * elf32-arm.h: Likewise.
815 * elf32-cris.c: Likewise.
816 * elf32-gen.c: Likewise.
817 * elf32-hppa.c: Likewise.
818 * elf32-i370.c: Likewise.
819 * elf32-i386.c: Likewise.
820 * elf32-m32r.c: Likewise.
821 * elf32-mcore.c: Likewise.
822 * elf32-mips.c: Likewise.
823 * elf32-ppc.c: Likewise.
824 * elf32-s390.c: Likewise.
825 * elf32-sh.c: Likewise.
826 * elf32-sparc.c: Likewise.
827 * elf32-v850.c: Likewise.
828 * elf64-alpha.c: Likewise.
829 * elf64-gen.c: Likewise.
830 * elf64-ppc.c: Likewise.
831 * elf64-s390.c: Likewise.
832 * elf64-sparc.c: Likewise.
833 * elf64-x86-64.c: Likewise.
834 * elflink.h: Likewise.
835 * elfxx-ia64.c: Likewise.
836 * ieee.c: Likewise.
837 * ihex.c: Likewise.
838 * libbfd.c: Likewise.
839 * pdp11.c: Likewise.
840 * pe-mips.c: Likewise.
841 * peicode.h: Likewise.
842 * srec.c: Likewise.
843 * xcofflink.c: Likewise.
844
845 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
846
847 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
848 error message.
849
850 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
851 error message.
852
853 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
854 Consolidate error messages, and split long messages to two lines.
855
671bae9c 8562001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 857
f51e552e
AM
858 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
859 and info->allow_shlib_undefined.
860 * elf32-cris.c: Likewise.
861 * elf32-hppa.c: Likewise.
862 * elf32-m68k.c: Likewise.
863 * elf32-mips.c: Likewise.
864 * elf32-ppc.c: Likewise.
865 * elf32-s390.c: Likewise.
866 * elf32-sh.c: Likewise.
867 * elf32-sparc.c: Likewise.
868 * elf64-alpha.c: Likewise.
869 * elf64-hppa.c: Likewise.
870 * elf64-ppc.c: Likewise.
871 * elf64-s390.c: Likewise.
872 * elf64-sparc.c: Likewise.
873 * elf64-x86-64.c: Likewise.
874 * elfxx-ia64.c: Likewise.
671bae9c 875
3882b010
L
8762001-09-18 Bruno Haible <haible@clisp.cons.org>
877
878 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
879 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
880 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
881 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
882 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
883 (bfd_default_scan): Use ISDIGIT instead of isdigit.
884 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
885 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
886 isxdigit/isdigit/islower.
887 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
888 (mangle_name): Use ISALNUM instead of isalnum.
889 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
890 (scan): Use ISDIGIT instead of isdigit.
891 * hosts/alphavms.h: Don't include <ctype.h>.
892 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
893 (ieee_object_p): Use TOUPPER instead of toupper.
894 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
895 (ihex_bad_byte): Use ISPRINT instead of isprint.
896 * merge.c: Don't include <ctype.h>.
897 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
898 (oasys_write_sections): Use ISDIGIT instead of isdigit.
899 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
900 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
901 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
902 (mangle_name): Use ISALNUM instead of isalnum.
903 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
904 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
905 isupper/islower/isdigit.
906 (som_decode_symclass): Use TOUPPER instead of toupper.
907 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
908 (srec_bad_byte): Use ISPRINT instead of isprint.
909 (srec_scan): Use ISSPACE instead of isspace.
910 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
911 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
912 * syms.c: Include "safe-ctype.h"
913 (islower, toupper): Remove macro definitions.
914 (bfd_decode_symclass): Use TOUPPER instead of toupper.
915 * vms-gsd.c: Don't include <ctype.h>.
916 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
917 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
918 islower/toupper.
919 * vms-tir.c: Don't include <ctype.h>.
920
dc810e39
AM
9212001-09-18 Alan Modra <amodra@bigpond.net.au>
922
923 * libbfd.c (bfd_bread): New function replacing bfd_read without
924 redundant params. Allow reads up to (size_t) -2 in length.
925 (bfd_bwrite): Similarly for bfd_write.
926 (real_read): Return a size_t.
927 (bfd_read): Call bfd_bread.
928 (bfd_write): Call bfd_bwrite.
929 (warn_deprecated): New function to annoy everybody.
930 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
931 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
932 (bfd_read, bfd_write): Define as macro.
933 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
934 likewise for bfd_write. Ensure function args are correct size by
935 using casts or local vars. In some cases, remove unnecessary
936 casts. Formatting fixes, in some cases removing a large expression
937 from function args by using a local var. Replace CONST with const.
938 Modify variable types to avoid warings. Use casts to avoid
939 warnings when using negative numbers in unsigned expressions.
940 * aout-adobe.c: Likewise.
941 * aout-arm.c: Likewise.
942 * aout-cris.c: Likewise.
943 * aout-encap.c: Likewise.
944 * aout-ns32k.c: Likewise.
945 * aout-target.h: Likewise.
946 * aout-tic30.c: Likewise.
947 * aoutf1.h: Likewise.
948 * aoutx.h: Likewise.
949 * archive.c: Likewise.
950 * archures.c: Likewise.
951 * bfd-in.h: Likewise.
952 * bfd.c: Likewise.
953 * binary.c: Likewise.
954 * bout.c: Likewise.
955 * cache.c: Likewise.
956 * cisco-core.c: Likewise.
957 * coff-a29k.c: Likewise.
958 * coff-alpha.c: Likewise.
959 * coff-arm.c: Likewise.
960 * coff-h8300.c: Likewise.
961 * coff-h8500.c: Likewise.
962 * coff-i386.c: Likewise.
963 * coff-i860.c: Likewise.
964 * coff-i960.c: Likewise.
965 * coff-ia64.c: Likewise.
966 * coff-m68k.c: Likewise.
967 * coff-m88k.c: Likewise.
968 * coff-mcore.c: Likewise.
969 * coff-mips.c: Likewise.
970 * coff-ppc.c: Likewise.
971 * coff-rs6000.c: Likewise.
972 * coff-sh.c: Likewise.
973 * coff-sparc.c: Likewise.
974 * coff-stgo32.c: Likewise.
975 * coff-tic30.c: Likewise.
976 * coff-tic54x.c: Likewise.
977 * coff-tic80.c: Likewise.
978 * coff-w65.c: Likewise.
979 * coff-z8k.c: Likewise.
980 * coff64-rs6000.c: Likewise.
981 * coffcode.h: Likewise.
982 * coffgen.c: Likewise.
983 * cofflink.c: Likewise.
984 * coffswap.h: Likewise.
985 * corefile.c: Likewise.
986 * cpu-arc.c: Likewise.
987 * cpu-h8300.c: Likewise.
988 * cpu-h8500.c: Likewise.
989 * cpu-i960.c: Likewise.
990 * cpu-ia64-opc.c: Likewise.
991 * cpu-ns32k.c: Likewise.
992 * cpu-pdp11.c: Likewise.
993 * cpu-pj.c: Likewise.
994 * cpu-sh.c: Likewise.
995 * cpu-w65.c: Likewise.
996 * cpu-z8k.c: Likewise.
997 * dwarf1.c: Likewise.
998 * dwarf2.c: Likewise.
999 * ecoff.c: Likewise.
1000 * ecofflink.c: Likewise.
1001 * ecoffswap.h: Likewise.
1002 * elf-bfd.h: Likewise.
1003 * elf-hppa.h: Likewise.
1004 * elf-m10200.c: Likewise.
1005 * elf-m10300.c: Likewise.
1006 * elf.c: Likewise.
1007 * elf32-arc.c: Likewise.
1008 * elf32-arm.h: Likewise.
1009 * elf32-avr.c: Likewise.
1010 * elf32-cris.c: Likewise.
1011 * elf32-fr30.c: Likewise.
1012 * elf32-gen.c: Likewise.
1013 * elf32-h8300.c: Likewise.
1014 * elf32-hppa.c: Likewise.
1015 * elf32-i370.c: Likewise.
1016 * elf32-i386.c: Likewise.
1017 * elf32-i860.c: Likewise.
1018 * elf32-m32r.c: Likewise.
1019 * elf32-m68k.c: Likewise.
1020 * elf32-mcore.c: Likewise.
1021 * elf32-mips.c: Likewise.
1022 * elf32-openrisc.c: Likewise.
1023 * elf32-pj.c: Likewise.
1024 * elf32-ppc.c: Likewise.
1025 * elf32-s390.c: Likewise.
1026 * elf32-sh-lin.c: Likewise.
1027 * elf32-sh.c: Likewise.
1028 * elf32-sparc.c: Likewise.
1029 * elf32-v850.c: Likewise.
1030 * elf64-alpha.c: Likewise.
1031 * elf64-hppa.c: Likewise.
1032 * elf64-mips.c: Likewise.
1033 * elf64-ppc.c: Likewise.
1034 * elf64-s390.c: Likewise.
1035 * elf64-sparc.c: Likewise.
1036 * elf64-x86-64.c: Likewise.
1037 * elfarm-nabi.c: Likewise.
1038 * elfcode.h: Likewise.
1039 * elfcore.h: Likewise.
1040 * elflink.c: Likewise.
1041 * elflink.h: Likewise.
1042 * elfxx-ia64.c: Likewise.
1043 * elfxx-target.h: Likewise.
1044 * format.c: Likewise.
1045 * hash.c: Likewise.
1046 * hp300hpux.c: Likewise.
1047 * hppabsd-core.c: Likewise.
1048 * hpux-core.c: Likewise.
1049 * i386aout.c: Likewise.
1050 * i386dynix.c: Likewise.
1051 * i386linux.c: Likewise.
1052 * i386lynx.c: Likewise.
1053 * i386mach3.c: Likewise.
1054 * i386msdos.c: Likewise.
1055 * i386os9k.c: Likewise.
1056 * ieee.c: Likewise.
1057 * ihex.c: Likewise.
1058 * irix-core.c: Likewise.
1059 * libaout.h: Likewise.
1060 * libbfd-in.h: Likewise.
1061 * libbfd.c: Likewise.
1062 * libcoff-in.h: Likewise.
1063 * libecoff.h: Likewise.
1064 * libieee.h: Likewise.
1065 * libnlm.h: Likewise.
1066 * libpei.h: Likewise.
1067 * libxcoff.h: Likewise.
1068 * linker.c: Likewise.
1069 * lynx-core.c: Likewise.
1070 * m68klinux.c: Likewise.
1071 * merge.c: Likewise.
1072 * mipsbsd.c: Likewise.
1073 * netbsd-core.c: Likewise.
1074 * nlm.c: Likewise.
1075 * nlm32-alpha.c: Likewise.
1076 * nlm32-i386.c: Likewise.
1077 * nlm32-ppc.c: Likewise.
1078 * nlm32-sparc.c: Likewise.
1079 * nlmcode.h: Likewise.
1080 * nlmswap.h: Likewise.
1081 * ns32k.h: Likewise.
1082 * oasys.c: Likewise.
1083 * opncls.c: Likewise.
1084 * osf-core.c: Likewise.
1085 * pc532-mach.c: Likewise.
1086 * pdp11.c: Likewise.
1087 * pe-mips.c: Likewise.
1088 * peXXigen.c: Likewise.
1089 * peicode.h: Likewise.
1090 * ppcboot.c: Likewise.
1091 * ptrace-core.c: Likewise.
1092 * reloc.c: Likewise.
1093 * reloc16.c: Likewise.
1094 * riscix.c: Likewise.
1095 * rs6000-core.c: Likewise.
1096 * sco5-core.c: Likewise.
1097 * section.c: Likewise.
1098 * som.c: Likewise.
1099 * sparclinux.c: Likewise.
1100 * sparclynx.c: Likewise.
1101 * srec.c: Likewise.
1102 * stabs.c: Likewise.
1103 * sunos.c: Likewise.
1104 * syms.c: Likewise.
1105 * targets.c: Likewise.
1106 * tekhex.c: Likewise.
1107 * trad-core.c: Likewise.
1108 * versados.c: Likewise.
1109 * vms-gsd.c: Likewise.
1110 * vms-hdr.c: Likewise.
1111 * vms-misc.c: Likewise.
1112 * vms-tir.c: Likewise.
1113 * vms.c: Likewise.
1114 * vms.h: Likewise.
1115 * xcofflink.c: Likewise.
1116 * bfd-in2.h: Regenerate.
1117 * libbfd.h: Regenerate.
1118 * libcoff.h: Regenerate.
1119
1120 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1121 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1122 (ufile_ptr): Define.
1123 (bfd_tell): Return a ufile_ptr.
1124 * libbfd.c (bfd_tell): Likewise.
1125 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1126 unnecessarily.
1127 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1128 * aoutf1.h: Likewise.
1129 * som.c: Likewise.
1130 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1131 larger than unsigned long can represent.
1132
1133 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1134 size overflows size_t.
1135 (bfd_realloc): Likewise.
1136 (bfd_zmalloc): Likewise.
1137 * opncls.c (bfd_alloc): Likewise.
1138 (bfd_zalloc): Likewise.
1139 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1140 (bfd_alloc, bfd_zalloc): Update.
1141
1142 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1143 8 bits.
1144 (bfd_get_signed_8): Likewise.
1145 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1146 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1147 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1148 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1149 * libaout.h: Likewise define and use here.
1150 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1151 * aout-arm.c: Likewise.
1152 * aout-encap.c: Likewise.
1153 * aout-ns32k.c: Likewise.
1154 * aout-tic30.c: Likewise.
1155 * aoutf1.h: Likewise.
1156 * aoutx.h: Likewise.
1157 * bout.c: Likewise.
1158 * coff-alpha.c: Likewise.
1159 * coff-h8300.c: Likewise.
1160 * coff-h8500.c: Likewise.
1161 * coff-i960.c: Likewise.
1162 * coff-ia64.c: Likewise.
1163 * coff-m88k.c: Likewise.
1164 * coff-mips.c: Likewise.
1165 * coff-ppc.c: Likewise.
1166 * coff-rs6000.c: Likewise.
1167 * coff-sh.c: Likewise.
1168 * coff-sparc.c: Likewise.
1169 * coff-stgo32.c: Likewise.
1170 * coff-tic30.c: Likewise.
1171 * coff-tic80.c: Likewise.
1172 * coff-w65.c: Likewise.
1173 * coff-z8k.c: Likewise.
1174 * coff64-rs6000.c: Likewise.
1175 * coffgen.c: Likewise.
1176 * cofflink.c: Likewise.
1177 * coffswap.h: Likewise.
1178 * ecoff.c: Likewise.
1179 * ecoffswap.h: Likewise.
1180 * elf.c: Likewise.
1181 * elf32-mips.c: Likewise.
1182 * elf64-mips.c: Likewise.
1183 * hp300hpux.c: Likewise.
1184 * i386dynix.c: Likewise.
1185 * i386lynx.c: Likewise.
1186 * i386msdos.c: Likewise.
1187 * i386os9k.c: Likewise.
1188 * libpei.h: Likewise.
1189 * nlm32-alpha.c: Likewise.
1190 * nlm32-i386.c: Likewise.
1191 * nlm32-ppc.c: Likewise.
1192 * nlmcode.h: Likewise.
1193 * nlmswap.h: Likewise.
1194 * oasys.c: Likewise.
1195 * pdp11.c: Likewise.
1196 * pe-mips.c: Likewise.
1197 * peXXigen.c: Likewise.
1198 * peicode.h: Likewise.
1199 * riscix.c: Likewise.
1200 * sunos.c: Likewise.
1201 * xcofflink.c: Likewise.
1202 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1203 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1204 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1205 equivalent H_PUT_* macro instead.
1206 (GETWORD, GETHALF, GETBYTE): Similarly.
1207 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1208 (GETWORD, GETHALF, GETBYTE): Likewise.
1209 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1210
1211 * bfd-in.h (struct orl): Change "pos" to a union.
1212 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1213 (bsd_write_armap): Here too.
1214 (coff_write_armap): And here.
1215 * coff-rs6000.c (xcoff_write_armap_old): And here.
1216 (xcoff_write_one_armap_big): And here.
1217 (xcoff_write_armap_big): And here.
1218 * ecoff.c (_bfd_ecoff_write_armap): And here.
1219 * elf64-mips.c (mips_elf64_write_armap): And here.
1220
1221 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1222 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1223 * elf32-h8300.c (elf32_h8_mach): Likewise.
1224 * elf32-mips.c (elf_mips_mach): Likewise.
1225 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1226
1227 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1228 calls.
1229 (aix386_core_vec): Typo fix.
1230
1231 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1232 etc. to avoid redefined macro warning.
1233 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1234 (MY(fix_pcrel_26)): Likewise.
1235 * aout-ns32k.c (MY(put_reloc)): Likewise.
1236 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1237 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1238 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1239
1240 * aout-encap.c: Include "file", not <file> for binutils headers.
1241 (encap_object_p): Half baked attempt to fix compile errors in
1242 code dealing with "magic".
1243
1244 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1245 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1246 bfd_vma's rather than longs.
1247 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1248 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1249 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1250 remove case 3.
1251 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1252 Use unsigned comparisons.
1253 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1254 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1255 (_bfd_do_ns32k_reloc_contents): Likewise.
1256 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1257 (_bfd_ns32k_get_immediate): Likewise.
1258 (_bfd_ns32k_put_displacement): Likewise.
1259 (_bfd_ns32k_put_immediate): Likewise.
1260 (bfd_reloc_status_type): Likewise.
1261
1262 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1263 to avoid shadowing.
1264 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1265 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1266 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1267 avoid shadowing.
1268 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1269 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1270 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1271 shadow warning.
1272 (_bfd_elfcore_strndup): Likewise for "dup".
1273 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1274 "name" to avoid shadowing.
1275 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1276 definition of "off".
1277 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1278 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1279 definition of "s".
1280 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1281 "secpp".
1282 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1283 to avoid shadowing.
1284 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1285 to avoid shadowing.
1286 (elf_link_input_bfd): Likewise.
1287 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1288 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1289 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1290 "input_section".
1291 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1292 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1293 (sunos_write_dynamic_symbol): Remove unused vars.
1294 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1295 innermost "directory_name" and "file_name" vars.
1296 * tekhex.c (first_phase): Rename local var "type" to "stype".
1297 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1298 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1299 doing comparison at caller.
1300 (vms_esecflag_by_name): Likewise.
1301 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1302 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1303 (xcoff_write_global_symbol): Rename "p" param to "inf".
1304
1305 * cisco-core.c: Add missing prototypes.
1306 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1307 (cisco_core_file_failing_signal): Likewise.
1308 (cisco_core_file_matches_executable_p): Likewise.
1309 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1310 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1311 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1312 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1313
1314 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1315 thumb_glue_size and arm_glue_size.
1316 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1317
1318 * coff64-rs6000.c: Group prototypes together.
1319
1320 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1321 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1322
1323 * cpu-arc.c: Add missing prototypes.
1324 * cpu-h8500.c: Likewise.
1325 * cpu-i960.c: Likewise.
1326 * cpu-pj.c: Likewise.
1327 * cpu-sh.c: Likewise.
1328 * cpu-w65.c: Likewise.
1329 * cpu-z8k.c: Likewise.
1330 * elf32-fr30.c: Likewise.
1331 * elf32-h8300.c: Likewise.
1332 * elf32-i370.c: Likewise.
1333 * hpux-core.c: Likewise.
1334 * versados.c: Likewise.
1335
1336 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1337 * cpu-h8500.c: Likewise.
1338 * cpu-i960.c: Likewise.
1339 * cpu-z8k.c: Likewise.
1340
1341 * cpu-ia64-opc.c: Correct comment.
1342
1343 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1344
1345 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1346 to unsigned.
1347 (bfd_elf32_write_out_phdrs): Likewise.
1348 (bfd_elf64_write_out_phdrs): Likewise.
1349 (elf_linker_section_pointers): Change addend to bfd_vma.
1350 (_bfd_elf_find_pointer_linker_section): Likewise.
1351 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1352 filepos to unsigned file_ptr.
1353 (_bfd_elfcore_strndup): Change max param to size_t.
1354 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1355 (_bfd_elfcore_strndup): Likewise.
1356 (_bfd_elf_find_pointer_linker_section): Likewise.
1357
1358 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1359 insn and sym_value to ints.
1360
1361 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1362 bfd_size_type.
1363 (elfcore_read_notes): Likewise.
1364
1365 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1366 param from unsigned char to int.
1367 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1368 for info_to_howto call.
1369 (add_dynamic_entry): Define macro.
1370 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1371
1372 * elf32-cris.c (add_dynamic_entry): Define macro.
1373 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1374
1375 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1376 (elf32_h8_object_p): Likewise.
1377 (elf32_h8_merge_private_bfd_data): Likewise.
1378 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1379
1380 * elf32-hppa.c (add_dynamic_entry): Define macro.
1381 (elf32_hppa_size_dynamic_sections): Use it.
1382 * elf32-i370.c (add_dynamic_entry): Define macro.
1383 (i370_elf_size_dynamic_sections): Use it.
1384 (i370_noop): Make static.
1385 * elf32-i386.c (add_dynamic_entry): Define macro.
1386 (elf_i386_size_dynamic_sections): Use it.
1387 * elf32-m68k.c (add_dynamic_entry): Define macro.
1388 (elf_m68k_size_dynamic_sections): Use it.
1389 * elf32-ppc.c (add_dynamic_entry): Define macro.
1390 (ppc_elf_size_dynamic_sections): Use it.
1391 * elf32-s390.c (add_dynamic_entry): Define macro.
1392 (elf_s390_size_dynamic_sections): Use it.
1393 * elf64-alpha.c (add_dynamic_entry): Define macro.
1394 (elf64_alpha_size_dynamic_sections): Use it.
1395 * elf64-hppa.c (add_dynamic_entry): Define macro.
1396 (elf64_hppa_size_dynamic_sections): Use it.
1397 * elf64-ppc.c (add_dynamic_entry): Define macro.
1398 (ppc64_elf_size_dynamic_sections): Use it.
1399 * elf64-s390.c (add_dynamic_entry): Define macro.
1400 (elf_s390_size_dynamic_sections): Use it.
1401 * elf64-sparc.c (add_dynamic_entry): Define macro.
1402 (sparc64_elf_size_dynamic_sections): Use it.
1403 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1404 (elf64_x86_64_size_dynamic_sections): Use it.
1405 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1406 (elfNN_ia64_size_dynamic_sections): Use it.
1407
1408 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1409 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1410
1411 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1412 false if the first malloc fails rather than going via error_return.
1413
1414 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1415 "index" param.
1416 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1417
1418 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1419
1420 * elfxx-ia64.c (global_sym_index): Return a long.
1421
1422 * ieee.c (get_symbol): Use int rather than char param.
1423 (ieee_slurp_sections): Move "section" var to inner blocks.
1424 (copy_expression): Don't init "value" to zero or worry about
1425 clearing to zero after using.
1426 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1427 shadowing.
1428
1429 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1430 unsigned int.
1431
1432 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1433 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1434
1435 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1436
1437 * pc532-mach.c (MYNSX): Delete.
1438 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1439 (write_object_contents): Correct prototype.
1440
1441 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1442 than unsigned short.
1443
1444 * section.c (bfd_set_section_contents): Remove redundant
1445 "offset < 0" test. Check that "count" doesn't overflow size_t.
1446 (bfd_get_section_contents): Likewise.
1447
1448 * som.c (som_fixup_formats): Add missing braces.
1449 (som_reloc_addend): Pass a bfd_vma for "addend".
1450
1451 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1452 (srec_write_symbols): Remove an unnecessary var.
1453
1454 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1455 to match.
1456 * configure.in: Sort to match. Bump version number.
1457 * configure: Regenerate.
1458
1459 * tekhex.c (move_section_contents): Assert offset == 0.
1460
1461 * versados.c (new_symbol_string): Constify arg.
1462 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1463 (versados_get_symbol_info): Make static.
1464 (versados_print_symbol): Likewise.
1465 (versados_get_reloc_upper_bound): Likewise.
1466 (versados_canonicalize_reloc): Likewise.
1467
417412a2
NC
14682001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1469
1470 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1471
bb731fb6
L
14722001-09-17 H.J. Lu <hjl@gnu.org>
1473
1474 * dwarf1.c (parse_die): Take a new arg for the end of the
1475 section. Return false if die is beyond the section.
1476 (parse_functions_in_unit): Pass the end of the section to
1477 parse_die ().
1478 (_bfd_dwarf1_find_nearest_line): Likewise.
1479
841989d6
NC
14802001-09-14 Michael Rauch <mrauch@netbsd.org>
1481
1482 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1483 just like R_SPARC_32.
1484
056a1d49
NC
14852001-09-14 Kevin Lo <kevlo@openbsd.org>
1486
1487 * configure.bfd: Add arm-openbsd target.
1488
4008bd9b
TS
14892001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1490
1491 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1492 Add support for mips64.
1493
c11cc227
AO
14942001-09-13 Alexandre Oliva <aoliva@redhat.com>
1495
1496 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1497
aa4f99bb
AO
14982001-09-12 Alexandre Oliva <aoliva@redhat.com>
1499
1500 * elf.c (prep_headers): Get the machine code from the elf
1501 backend data.
1502 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1503 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1504 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1505 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1506 * elf-arc.c (arc_elf_final_write_processing): Don't override
1507 e_machine, it's now properly set in prep_headers.
1508 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1509 EM_AVR_OLD.
1510 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1511 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1512 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1513 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1514 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1515 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1516 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1517 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1518 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1519 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1520 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1521 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1522
204692d7
RH
15232001-09-11 Richard Henderson <rth@redhat.com>
1524
1525 * elf64-alpha.c (elf64_alpha_section_flags): New.
1526 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1527
f94952df
RH
15282001-09-11 Richard Henderson <rth@redhat.com>
1529
1530 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1531 apply HINT relocations against dynamic symbols.
1532
146f1a87
L
15332001-09-11 H.J. Lu <hjl@gnu.org>
1534
f94952df 1535 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 1536
1cd6895c
RH
15372001-09-09 Richard Henderson <rth@redhat.com>
1538
96e2734b
RH
1539 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1540
1cd6895c
RH
1541 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1542 following a call to a near function.
1543
f16fbd61
RH
15442001-09-08 Richard Henderson <rth@redhat.com>
1545
1546 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1547 relocation errors. Fail gp-relative relocations against
1548 dynamic symbols.
1549
56882138
AM
15502001-09-08 Alan Modra <amodra@bigpond.net.au>
1551
1552 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1553 as well as DEF_DYNAMIC in test for avoided copy relocs.
1554 (allocate_plt_and_got_and_discard_relocs): Likewise.
1555 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1556 (allocate_plt_and_got_and_discard_relocs): Likewise.
1557
cb56d3d3
TS
15582001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1559
1560 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1561 of R_MIPS_PC16.
56882138
AM
1562
15632001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1564
1565 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1566 definitions.
1567 (mips_elf64_howto_table_rel): Likewise.
1568
15692001-09-05 Tom Rix <trix@redhat.com>
1570
1571 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1572 and syscall symbols.
1573 (write_global_symbol) : Same.
1574 (bfd_xcoff_export_symbol): Remove unused syscall param.
1575 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1576 bfd_xcoff_import_symbol.
1577 * bfd-in.h: Same.
1578 * bfd-in2.h : Regenerate.
1579
15802001-09-04 Richard Henderson <rth@redhat.com>
1581
1582 * elf64-alpha.c (SKIP_HOWTO): New.
1583 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1584 Fix sizes of 16-bit mem format relocs.
1585 (elf64_alpha_reloc_map): Update to match.
1586 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1587 (elf64_alpha_relax_without_lituse): Likewise.
1588 (elf64_alpha_check_relocs): Handle GPREL16.
1589 (elf64_alpha_relocate_section): Likewise.
1590 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1591 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1592 * bfd-in2.h, libbfd.h: Rebuild.
1593
15942001-09-04 Jeff Law <law@redhat.com>
1595
1596 * elf32-h8300.c (elf32_h8_relax_section): New function.
1597 (elf32_h8_relax_delete_bytes): Likewise.
1598 (elf32_h8_symbol_address_p): Likewise.
1599 (elf32_h8_get_relocated_section_contents): Likewise.
1600 (bfd_elf32_bfd_relax_section): Define.
1601 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1602
1603 * elf32-h8300.c (special): New function.
1604 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1605 all relocations.
1606 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1607 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1608 Fix minor problems with 8bit and 16bit PC relative relocations.
1609
16102001-09-01 Andreas Jaeger <aj@suse.de>
1611
1612 * vms-tir.c: Add missing prototypes.
1613 * vms-hdr.c: Likewise.
1614 * vms-gsd.c: Likewise.
1615 * vms-misc.c: Likewise.
1616
16172001-08-31 H.J. Lu <hjl@gnu.org>
1618
1619 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1620 with bad relocation.
1621
16222001-08-31 Eric Christopher <echristo@redhat.com>
1623 Jason Eckhardt <jle@redhat.com>
1624
1625 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1626 mips32_4k and mips64.
1627 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1628 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1629 * bfd/cpu-mips.c: Ditto.
1630 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1631 * bfd/bfd-in2.h: Regenerate.
1632
16332001-08-31 Jakub Jelinek <jakub@redhat.com>
1634
1635 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1636 value into R_ALPHA_RELATIVE's addend.
1637 (elf64_alpha_finish_dynamic_symbol): Likewise.
1638
16392001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1640
1641 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1642 recomputed addend during relocatable link if not USE_REL.
1643
1644 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1645 error.
1646
16472001-08-30 H.J. Lu <hjl@gnu.org>
1648
1649 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1650 2 changes.
1651 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1652 relocations for weak definitions.
1653
16542001-08-30 H.J. Lu <hjl@gnu.org>
1655
1656 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1657 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1658 * Makefile.in: Rebuild.
1659
16602001-08-30 H.J. Lu <hjl@gnu.org>
1661
1662 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1663 dynamic relocation for undefined weak symbols when creating
1664 executables. Check h->root.root.type, instead of h->root.type.
1665
16662001-08-29 Joel Sherrill <joel@OARcorp.com>
1667
1668 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1669 default from coff to elf.
1670
16712001-08-29 Jeff Law <law@redhat.com>
1672
1673 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1674 relocations.
1675 (h8_reloc_map): Similarly.
1676 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1677 Add support for PC relative relocations.
1678
1679 * elf32-h8300.c: Put all prototypes together.
1680 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1681 (elf32_h8_final_link_relocate): New function for linker.
1682 (elf32_h8_relocate_section): Similarly.
1683 (elf_backend_relocate_section): Define.
1684
1685 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1686 (h8300_scan): Handle architecture:machine encodings typically
1687 found in linker scripts.
1688 * elf.c (prep_headers): Do not try to do H8 machine recognition
1689 here.
1690 * elf32-h8300.c: Add some missing prototypes.
1691 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1692 (elf32_h8_object_p): Similarly.
1693
16942001-08-29 Tom Rix <trix@redhat.com>
1695
1696 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1697 does not follow a XTY_SD.
1698
16992001-08-29 Alan Modra <amodra@bigpond.net.au>
1700
1701 * targmatch.sed: Delete case statements.
1702 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1703 aix4.3 and above.
1704
1705Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1706
1707 * Makefile.am (elf32-h8300.lo): New target.
1708 * config.bfd (h8300*-*-elf): New case.
1709 * configure.in (bfd_elf32_h8300_vec): New case.
1710 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1711 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1712 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1713 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1714 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1715 * elf32-h8300.c: New file.
1716 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1717
17182001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1719
1720 * sparclynx.c: Add missing prototypes.
1721 * coff-mcore.c: Add missing prototypes.
1722 * elf32-pj.c: Add missing prototypes.
1723 * nlm32-sparc.c: Add missing prototypes.
1724 * oasys.c: Add missing prototypes.
1725 * pdp11.c: Add missing prototypes.
1726 * pe-mips.c: Add missing prototypes.
1727 * riscix.c: Add missing prototypes.
1728
17292001-08-27 Daniel Jacobowitz <drow@mvista.com>
1730
1731 * elf32-i386.c: Add missing prototypes.
1732 * elf32-ppc.c: Likewise.
1733 * elf32-sh-lin.c: Likewise.
1734 * elfarm-nabi.c: Likewise.
1735
17362001-08-27 Daniel Jacobowitz <drow@mvista.com>
1737
1738 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1739 (elf_i386_grok_psinfo): New function.
1740 (elf_backend_grok_prstatus): Define.
1741 (elf_backend_grok_psinfo): Likewise.
1742 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1743 (ppc_elf_grok_psinfo): New function.
1744 (elf_backend_grok_prstatus): Define.
1745 (elf_backend_grok_psinfo): Likewise.
1746 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1747 (elf32_shlin_grok_psinfo): New function.
1748 (elf_backend_grok_prstatus): Define.
1749 (elf_backend_grok_psinfo): Likewise.
1750 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1751 (elf32_arm_nabi_grok_psinfo): New function.
1752 (elf_backend_grok_prstatus): Define.
1753 (elf_backend_grok_psinfo): Likewise.
1754
17552001-08-27 H.J. Lu <hjl@gnu.org>
1756
1757 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1758 sanity check.
1759 (mips_elf_calculate_relocation): Create dynamic relocation for
1760 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1761 bit is not set.
1762
17632001-08-27 H.J. Lu <hjl@gnu.org>
1764
1765 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1766 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1767 (_bfd_elf32_mips_grok_prstatus): Likewise.
1768 (_bfd_elf32_mips_grok_psinfo): Likewise.
1769 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1770 `struct mips_elf_link_hash_entry *'.
1771 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1772
17732001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1774
1775 * mipsbsd.c: Add missing prototypes.
1776 * hp300hpux.c: Add missing prototypes.
1777 * i386aout.c: Add missing prototypes.
1778 * i386lynx.c: Add missing prototypes.
1779 * i386mach3.c: Add missing prototypes.
1780 * i386msdos.c: Add missing prototypes.
1781 * i386os9k.c: Add missing prototypes.
1782
17832001-08-27 Linus Nordberg <linus@swox.se>
1784 Torbjorn Granlund <tege@swox.com>
1785 Staffan Ulfberg <staffanu@swox.se>
1786 Alan Modra <amodra@bigpond.net.au>
1787
1788 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1789 targ64_selvecs for 32 bit powerpc targets.
1790 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1791 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1792 Run "make dep-am".
1793 * Makefile.in: Regenerate.
1794 * configure.in: Add elf64_powerpc vecs.
1795 * configure: Regenerate.
1796 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1797 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1798 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1799 * elf64-ppc.c: New file.
1800 * reloc.c: Add powerpc64 relocs.
1801 * libbfd.h: Regenerate.
1802 * bfd-in2.h: Regenerate.
1803
18042001-08-27 Andreas Schwab <schwab@suse.de>
1805
1806 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1807 reloc is against read-only section.
1808 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1809 looking up section names for DT_TEXTREL.
1810 (elf32_m68k_reloc_type_class): New function.
1811 (elf_backend_reloc_type_class): Define.
1812
18132001-08-27 Andreas Jaeger <aj@suse.de>
1814
1815 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1816 reloc is against read-only section.
1817 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1818 looking up section names for DT_TEXTREL.
1819 (elf_s390_reloc_type_class): New.
1820 (elf_backend_reloc_type_class): Define.
1821
1822 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1823 reloc is against read-only section.
1824 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1825 looking up section names for DT_TEXTREL.
1826 (elf_s390_reloc_type_class): New.
1827 (elf_backend_reloc_type_class): Define.
1828
1829 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1830 is against read-only section.
1831 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1832 looking up section names for DT_TEXTREL.
1833 (ppc_elf_reloc_type_class): New.
1834 (elf_backend_reloc_type_class): Define.
1835
18362001-08-26 Andreas Jaeger <aj@suse.de>
1837
1838 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1839 reloc is against read-only section.
1840 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1841 looking up section names for DT_TEXTREL.
1842 (elf_cris_reloc_type_class): New.
1843 (elf_backend_reloc_type_class): Define.
1844
1845 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1846 against read-only section.
1847 (elf_backend_reloc_type_class): Define.
1848 (sh_elf_reloc_type_class): New.
1849 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1850 looking up section names for DT_TEXTREL.
1851
1852 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1853 reloc is against read-only section.
1854 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1855 looking up section names for DT_TEXTREL.
1856 (elf32_arm_reloc_type_class): New.
1857 (elf_backend_reloc_type_class): Define.
1858
18592001-08-25 Andreas Jaeger <aj@suse.de>
1860
1861 * oasys.c: Add missing prototypes.
1862
1863 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1864 attribute for parameter.
1865 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1866
1867 * versados.c (get_4): Make static.
1868 (get_10): Make static.
1869 Add missing prototypes.
1870 (process_esd): Fix call to versados_new_symbol.
1871
18722001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1873
1874 * coff-a29k.c: Add missing prototypes.
1875 * coff-apollo.c: Add missing prototypes.
1876 * coff-arm.c: Add missing prototypes.
1877 * coff-i860.c: Add missing prototypes.
1878 * coff-rs6000.c: Add missing prototypes.
1879 * coff-tic80.c: Add missing prototypes.
1880 * elf-m10200.c: Add missing prototypes.
1881 * elf-m10300.c: Add missing prototypes.
1882 * elf32-arm.h: Add missing prototypes.
1883 * elf32-d10v.c: Add missing prototypes.
1884 * elf32-m32r.c: Add missing prototypes.
1885 * elf32-mcore.c: Add missing prototypes.
1886 * elf32-openrisc.c: Add missing prototypes.
1887 * elf32-sh.c: Add missing prototypes.
1888 * elf32-sparc.c: Add missing prototypes.
1889 * elf32-v850.c: Add missing prototypes.
1890 * elfarm-nabi.c: Add missing prototypes.
1891 * elfarm-oabi.c: Add missing prototypes.
1892
18932001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1894
1895 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1896 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1897
18982001-08-24 H.J. Lu <hjl@gnu.org>
1899
1900 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1901 hash structure.
1902
19032001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1904
1905 * elf-bfd.h (elf_hash_table): Revert definition.
1906 (is_elf_hash_table): New macro.
1907 * elflink.h (elf_link_add_object_symbols): Test
1908 is_elf_hash_table before accessing ELF only fields in hash
1909 structure.
1910 (elf_link_create_dynamic_sections): Fail if not using an ELF
1911 hash structure.
1912 (elf_add_dynamic_entry): Fail if not using an ELF hash
1913 structure.
1914 (elf_link_record_local_dynamic_symbol): Fail if not using an
1915 ELF hash structure.
1916 (size_dynamic_sections): Fail if not using an ELF hash
1917 structure.
1918 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1919 hash structure.
1920 (elf_bfd_final_link): Fail if not using an ELF hash
1921 structure.
1922
19232001-08-24 H.J. Lu <hjl@gnu.org>
1924
1925 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1926 table is not an ELF linker hash table.
1927
1928 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1929 table type to bfd_link_elf_hash_table.
1930
1931 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1932 the last change.
1933
1934 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1935 table type to bfd_link_generic_hash_table.
1936
19372001-08-24 Alexandre Oliva <aoliva@redhat.com>
1938
1939 * bfd.c (bfd_alt_mach_code): New function.
1940 * bfd-in2.h: Rebuilt.
1941
19422001-08-24 Alexandre Oliva <aoliva@redhat.com>
1943
1944 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1945 `type' field in the hash entry when deciding whether to follow a
1946 link.
1947
19482001-08-24 Jakub Jelinek <jakub@redhat.com>
1949
1950 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1951 last.
1952 (elf_link_sort_relocs): Adjust accordingly.
1953
1954 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
1955 (elf64_alpha_check_relocs): Set it if section this reloc is against
1956 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
1957 read-only section.
1958 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
1959 is is against read-only section.
1960 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
1961 check section names.
1962 (elf64_alpha_reloc_type_class): New.
1963 (elf_backend_reloc_type_class): Define.
1964
19652001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1966
1967 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1968 by bfd_malloc().
1969
19702001-08-23 Andreas Jaeger <aj@suse.de>
1971
1972 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
1973 the reloc is against read-only section.
1974 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
1975 of looking up section names for DT_TEXTREL.
1976 (elf64_x86_64_reloc_type_class): New.
1977 (elf_backend_reloc_type_class): Define.
1978
19792001-08-23 H.J. Lu <hjl@gnu.org>
1980
1981 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1982 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
1983
1984 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
1985 bfd_print_symbol_vandf.
1986 * coffgen.c (coff_print_symbol): Likewise.
1987 * elf.c (bfd_elf_print_symbol): Likewise.
1988 * ieee.c (ieee_print_symbol): Likewise.
1989 * nlmcode.h (nlm_print_symbol): Likewise.
1990 * oasys.c (oasys_print_symbol): Likewise.
1991 * pdp11.c (NAME(aout,print_symbol)): Likewise.
1992 * som.c (som_print_symbol): Likewise.
1993 * srec.c (srec_print_symbol): Likewise.
1994 * tekhex.c (tekhex_print_symbol): Likewise.
1995 * versados.c (versados_print_symbol): Likewise.
1996 * vms.c (vms_print_symbol): Likewise.
1997
1998 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
1999 with bfd_fprintf_vma.
2000 (bfd_elf_print_symbol): Likewise.
2001 * syms.c (bfd_print_symbol_vandf): Likewise.
2002
20032001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2004
2005 * aoutf1.h (sunos_write_object_contents): Silence compile time
2006 warning.
2007 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2008
2009 * bout.c: Add missing function prototypes. Fix formatting.
2010 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2011 * coff-w65.c: Add missing function prototypes. Fix formatting.
2012 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2013 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2014 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2015 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2016 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2017 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2018 * coff-sh.c: Add missing function prototypes. Fix formatting.
2019
20202001-08-23 Jakub Jelinek <jakub@redhat.com>
2021
2022 * elf-bfd.h (enum elf_reloc_type_class): New.
2023 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2024 (_bfd_elf_reloc_type_class): New.
2025 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2026 (elfNN_bed): Add elf_backend_reloc_type_class.
2027 * elf.c (_bfd_elf_reloc_type_class): New.
2028 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2029 is against read-only section.
2030 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2031 looking up section names for DT_TEXTREL.
2032 (elf_i386_reloc_type_class): New.
2033 (elf_backend_reloc_type_class): Define.
2034 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2035 reloc is against read-only section.
2036 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2037 looking up section names for DT_TEXTREL.
2038 (elf32_sparc_reloc_type_class): New.
2039 (elf_backend_reloc_type_class): Define.
2040 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2041 reloc is against read-only section.
2042 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2043 looking up section names for DT_TEXTREL.
2044 (sparc64_elf_reloc_type_class): New.
2045 (elf_backend_reloc_type_class): Define.
2046 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2047 (elfNN_ia64_hash_table_create): Clear ia64_info.
2048 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2049 section.
2050 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2051 instead of looking up section names for DT_TEXTREL.
2052 (elfNN_ia64_reloc_type_class): New.
2053 (elf_backend_reloc_type_class): Define.
2054 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2055 (struct elf_link_sort_rela): New.
2056 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2057 (elf_bfd_final_link): Call elf_link_sort_relocs.
2058 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2059 necessary.
2060
20612001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2062
2063 * configure.in (x86-bsdi): No corefile support.
2064 * configure: Regenerate.
2065
20662001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2067
2068 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2069 comma.
2070
20712001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2072
2073 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2074 the alignment of dwarf2 linkonce sections to 0.
2075 * coff-sto32.c: Likewise.
2076
20772001-08-20 Andreas Jaeger <aj@suse.de>
2078
2079 * coff-sparc.c: Add missing prototypes.
2080 * elf32-s390.c: Likewise.
2081 * elf32-i960.c: Likewise.
2082 * aout-target.h: Likewise.
2083
20842001-08-20 H.J. Lu <hjl@gnu.org>
2085
2086 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2087 (elf_num_section_syms): New for num_section_syms.
2088
2089 * elf.c (elf_map_symbols): Set num_section_syms.
2090 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2091 the section symbol index.
2092
20932001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2094
2095 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2096 select the generic has table creator. All elf backends need elf
2097 specific fields in the hash table.
2098
20992001-08-20 Alan Modra <amodra@bigpond.net.au>
2100
2101 * archive.c (offsetof): Remove define.
2102 * elf.c: Likewise.
2103 * oasys.c: Likewise
2104 * sysdep.h (offsetof): Define.
2105
21062001-08-17 Alan Modra <amodra@bigpond.net.au>
2107
2108 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2109 (bfd_set_gp_size): Make param unsigned.
2110 * bfd-in2.h: Regenerate.
2111 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2112 than calling bfd_get_gp_size.
2113 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2114 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2115
21162001-08-17 Alan Modra <amodra@bigpond.net.au>
2117
2118 * linker.c (default_fill_link_order): Handle four byte fill value.
2119
21202001-08-17 Alan Modra <amodra@bigpond.net.au>
2121
2122 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2123 prototype.
2124 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2125
2126 * elf64-mips.c (UNUSED_RELOC): Define.
2127 (mips_elf64_howto_table_rel): Use it.
2128 (mips_elf64_howto_table_rela): Here too.
2129 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2130
2131 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2132 silence warning.
2133 * coffgen.c (coff_print_symbol): Fix warnings.
2134 (coff_find_nearest_line): Likewise.
2135 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2136 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2137 * format.c (bfd_check_format_matches): Likewise.
2138 (bfd_set_format): Likewise.
2139 * coff-ia64.c: Add missing prototypes.
2140 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2141 signed to silence warnings.
2142 (elf64_alpha_relocate_section): Likewise.
2143 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2144 (elf64_alpha_add_symbol_hook): Likewise.
2145 (elf64_alpha_final_link): Likewise.
2146 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2147 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2148 (elf64_alpha_size_got_sections): Likewise.
2149 * elfxx-ia64.c: Add missing prototypes.
2150 (elfNN_ia64_relocate_section): Fix warning.
2151 (elfNN_ia64_unwind_entry_compare): Make params const.
2152
21532001-08-17 Alan Modra <amodra@bigpond.net.au>
2154
2155 * config.bfd (targ64_selvecs): New.
2156 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2157
2158 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2159 (BFD_DEFAULT_TARGET_SIZE): New.
2160 (BFD_ARCH_SIZE): Comment.
2161 * configure.in (target_size): New. Set instead of target64 in
2162 selvecs case statement. Set target64 from it.
2163 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2164 * bfd-in2.h: Regenerate.
2165 * configure: Regenerate.
2166
21672001-08-17 Alan Modra <amodra@bigpond.net.au>
2168
2169 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2170 (bfd_errmsgs): Add corresponding message.
2171 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2172 finding an archive that contains different format object files.
2173 Return bfd_error_wrong_object_format for this case.
2174 * format.c: Formatting fixes. s/CONST/const/.
2175 (bfd_check_format_matches): Accept archives that give
2176 bfd_error_wrong_object_format if no full match is found. Tidy
2177 code handling matching_vector. Don't return a pointer to freed
2178 memory in `matching'. Handle ambiguous matches as for partial
2179 archive matches.
2180 * bfd-in2.h: Regenerate.
2181
21822001-08-15 Alan Modra <amodra@bigpond.net.au>
2183
2184 * libieee.h (common_header_type): Add last_byte field.
2185
2186 * ieee.c: Add missing prototypes. Some format fixes.
2187 (struct output_buffer_struct): Move for availability to prototypes.
2188 (ieee_part_after): New function.
2189 (ieee_slurp_debug): Use it here.
2190 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2191 ieee_part_after to set last_byte to one past end of current part.
2192 Update callers.
2193 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2194 Update callers.
2195 (parse_expression): Don't go beyond the end of the current part.
2196 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2197 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2198 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2199 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2200 ieee_set_section_contents, ieee_write_object_contents,
2201 ieee_make_empty_symbol): Make static.
2202 (ieee_archive_p): Correct comments regarding bfd_read.
2203 (ieee_object_p): Similarly.
2204 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2205 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2206 input_bfd, output_bfd, output_buffer.
2207 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2208 do_with_relocs, ie. as a symbol for relocatable files.
2209 (ieee_vec): Add comments showing functions referenced by macros.
2210
22112001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2212
2213 * aout-tic30.c: Add missing prototypes. Fix formatting.
2214 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2215 * peXXigen.c: Add missining prototypes. Fix formatting.
2216 * aout-adobe.c: Add missining prototypes. Fix formatting.
2217
22182001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2219
2220 * elf32-v850.c: Add missing function prototypes.
2221 Fix some formatting.
2222
2223 * cpu-v850.c: Add missing function prototype.
2224 Fix some formatting.
2225
22262001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2227
2228 * elf-bfd.h (struct elf_backend_data): Add new fields
2229 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2230 (bfd_elf_sprintf_vma): Rename function prototype to
2231 '_bfd_elf_sprintf_vma'.
2232 (bfd_elf_fprintf_vma): Rename function prototype to
2233 '_bfd_elf_fprintf_vma'.
2234 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2235 directly, instead indirect via the elf_backend_data structure.
2236 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2237 instead indirect via the elf_backend_data structure.
2238 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2239 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2240 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2241 already defined.
2242 (elf_backend_fprintf_vma): Initialise if not already defined.
2243 (struct elf_backend_data): Initialise the
2244 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2245
22462001-08-10 Andreas Jaeger <aj@suse.de>
2247
2248 * elf64-sparc.c: Add missing prototypes.
2249 * elf32-cris.c: Likewise.
2250 * elf32-i370.c: Likewise.
2251 * elf64-hppa.c: Likewise.
2252 * elf64-s390.c: Likewise.
2253
22542001-08-10 Andreas Jaeger <aj@suse.de>
2255
2256 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2257 Add prototypes where needed.
2258
22592001-08-10 H.J. Lu <hjl@gnu.org>
2260
2261 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2262 (bfd_fprintf_vma): Likewise.
2263
22642001-08-10 H.J. Lu <hjl@gnu.org>
2265
2266 * bfd.c (bfd_sprintf_vma): Don't return void.
2267 (bfd_fprintf_vma): Likewise.
2268
22692001-08-10 Andreas Jaeger <aj@suse.de>
2270
2271 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2272 to build warnings.
2273 * configure: Regenerate.
2274
22752001-08-10 Alan Modra <amodra@bigpond.net.au>
2276
2277 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2278 warning if not BFD64. Add braces so emacs auto format works.
2279 (bfd_elf_fprintf_vma): Likewise.
2280
2281 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2282 of _xcoff_swap_ld*.
2283 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2284 param to agree with libxcoff.h.
2285 (xcoff_swap_ldhdr_out): Likewise.
2286 (xcoff_swap_ldsym_in): Likewise.
2287 (xcoff_swap_ldsym_out): Likewise.
2288 (xcoff_swap_ldrel_in): Likewise.
2289 (xcoff_swap_ldrel_out): Likewise.
2290 (xcoff_create_csect_from_smclas): Likewise.
2291 * coff64-rs6000.c: Add missing prototypes.
2292 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2293 with libxcoff.h.
2294 (xcoff64_swap_ldhdr_out): Likewise.
2295 (xcoff64_swap_ldsym_in): Likewise.
2296 (xcoff64_swap_ldsym_out): Likewise.
2297 (xcoff64_swap_ldrel_in): Likewise.
2298 (xcoff64_swap_ldrel_out): Likewise.
2299 (xcoff64_ppc_relocate_section): Make static.
2300 (xcoff64_slurp_armap): Likewise.
2301 (xcoff64_archive_p): Likewise.
2302 (xcoff64_openr_next_archived_file): Likewise.
2303 (xcoff64_sizeof_headers): Likewise.
2304 (xcoff64_is_lineno_count_overflow): Likewise.
2305 (xcoff64_is_reloc_count_overflow): Likewise.
2306 (xcoff64_loader_symbol_offset): Likewise.
2307 (xcoff64_loader_reloc_offset): Likewise.
2308 * elf64-gen.c: Add missing prototypes.
2309
23102001-08-09 H.J. Lu <hjl@gnu.org>
2311
2312 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2313 (bfd_elf_fprintf_vma): Likewise.
2314
23152001-08-09 H.J. Lu <hjl@gnu.org>
2316
2317 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2318 to ...
2319 * elf-bfd.h: Here.
2320 * bfd-in2.h: Regenerated.
2321
23222001-08-09 H.J. Lu <hjl@gnu.org>
2323
2324 * bfd-in.h (bfd_sprintf_vma): New prototype.
2325 (bfd_fprintf_vma): Likewise.
2326 (bfd_elf_sprintf_vma): Likewise.
2327 (bfd_elf_fprintf_vma): Likewise.
2328 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2329 * bfd-in2.h: Regenerated.
2330
2331 * bfd.c (bfd_sprintf_vma): New. Defined.
2332 (bfd_fprintf_vma): Likewise.
2333
2334 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2335 (bfd_elf_fprintf_vma): Likewise.
2336
23372001-08-09 Alan Modra <amodra@bigpond.net.au>
2338
2339 * coff-rs6000.c: Add missing prototypes.
2340 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2341 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2342 xcoff_loader_reloc_offset): Make static.
2343 * dwarf1.c: Add missing prototypes.
2344 * dwarf2.c: Add missing prototypes.
2345 (struct abbrev_info): Move definition.
2346 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2347 * elf.c: Add missing prototypes.
2348 * elf32-gen.c: Likewise.
2349 * elf32-i386.c: Likewise.
2350 * elf32-ppc.c: Likewise.
2351 (ppc_elf_sort_rela): Use PTR instead of "void *".
2352 * elflink.h: Add missing prototypes. Formatting fixes.
2353 * merge.c: Add missing prototypes.
2354 (last4_eq): Use PTR instead of "void *".
2355 (last_eq): Likewise.
2356 * syms.c: Add missing prototypes.
2357
23582001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2359
2360 * bfd.c: Fix formatting.
2361 * bfd-in2.h: Regenerate.
2362
23632001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2364
2365 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2366 true (this target uses REL relocations) and 'pcrel_offset' to
2367 false (the PC is implied, not stored in the offset).
2368
23692001-08-08 Alan Modra <amodra@bigpond.net.au>
2370
2371 1999-10-19 Linus Nordberg <linus@swox.se>
2372 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2373 * elfxx-target.h (elf_backend_want_got_sym): Define.
2374 (elfNN_bed): Add elf_backend_want_got_sym.
2375 * elflink.c (_bfd_elf_create_got_section): Define
2376 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2377
23782001-08-08 Alexandre Oliva <aoliva@redhat.com>
2379
2380 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2381 (find_rela_addend): New function.
2382 (parse_comp_unit): Call it to find the abbrev offset addend.
2383 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2384 members of dwarf2_debug as debugging information is read.
2385
23862001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2387
2388 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2389 targets as well as sh-pe.
2390
23912001-08-03 Ben Harris <bjh21@netbsd.org>
2392
2393 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2394 reloc from start of section when computing value for R_ARM_REL32
2395 reloc.
2396
23972001-08-03 Alan Modra <amodra@bigpond.net.au>
2398
2399 From H.J. Lu <hjl@gnu.org>
2400 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2401 keep relocs for undefined syms if there are no dynamic sections in
2402 executable.
2403 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2404
24052001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2406
2407 * cofflink.c (coff_link_check_ar_symbols): also search for
2408 __imp__symbol as well as _symbol.
2409 * linker.c (_bfd_generic_link_add_archive_symbols): also
2410 search for __imp__symbol as well as _symbol.
2411
24122001-08-01 Adam Nemet <anemet@lnxw.com>
2413
2414 * elf.c (elf_sort_sections): Return zero only as the last step.
2415
24162001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2417
2418 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2419 ARM_COFF_BUGFIX.
2420 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2421 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2422 ARM_COFF_BUGFIX.
2423
24242001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2425
2426 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2427 to match corresponding bfd_coff_backend data member.
2428
24292001-07-24 Alan Modra <amodra@bigpond.net.au>
2430
2431 * Makefile.am: Update dependencies with "make dep-am".
2432 * Makefile.in: Regenerate
2433
24342001-07-15 H.J. Lu <hjl@gnu.org>
2435
2436 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2437 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2438 * Makefile.in: Regenerate.
2439
24402001-07-11 H.J. Lu <hjl@gnu.org>
2441
2442 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2443 flags when creating the reloc section if the ALLOC flag in the
2444 source section is set.
2445
24462001-07-11 Steve Ellcey <sje@cup.hp.com>
2447
2448 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2449 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2450 * bfd-in2.h: Regenerate.
2451 * libbfd.h: Regenerate.
2452 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2453 new relocations.
2454 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2455 (elfNN_ia64_check_relocs): Likewise.
2456 (elfNN_ia64_install_value): Likewise.
2457 (elfNN_ia64_relocate_section): Likewise.
2458
24592001-07-11 Jakub Jelinek <jakub@redhat.com>
2460
2461 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2462 R_SPARC_UA64.
2463 (elf32_sparc_check_relocs): Likewise.
2464 Only create .rela section for alloced sections in shared libraries.
2465 (elf32_sparc_relocate_section): Likewise.
2466 Remove redundant check.
2467 Optimize unaligned reloc usage.
2468 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2469 check.
2470
24712001-07-11 H.J. Lu <hjl@gnu.org>
2472
2473 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2474 ALLOC|LOAD flags as the source section for debugging sections
2475 when creating the reloc section.
2476
24772001-07-05 Jim Wilson <wilson@redhat.com>
2478
2479 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2480 the section of the bigger symbol.
2481
2482 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2483
24842001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2485
2486 * peicode.h (coff_swap_scnhdr_in): For sections containing
2487 uninitialised data, only set their size to s_paddr if this does
2488 not reset their size to zero. MS's latest compilers will set
2489 s_paddr to zero.
2490
24912001-07-04 H.J. Lu <hjl@gnu.org>
2492
2493 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2494 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2495 bfd_mach_mips5000.
2496
24972001-07-03 Mark Elbrecht <snowball3@softhome.net>
2498
2499 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2500
2501 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2502 sections being discarded.
2503
25042001-06-30 Alan Modra <amodra@bigpond.net.au>
2505
2506 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2507 instead of _bfd_elfcore_section_from_phdr.
2508 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2509 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2510 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2511 (elfcore_grok_prstatus): Likewise.
2512 (elfcore_grok_lwpstatus): Likewise.
2513 (bfd_get_elf_phdr_upper_bound): Likewise.
2514 (elfcore_make_note_pseudosection): Formatting.
2515 (_bfd_elfcore_strndup): Formatting.
2516 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2517 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2518
25192001-06-29 Daniel Jacobowitz <drow@mvista.com>
2520
2521 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2522 and _bfd_elfcore_strndup.
2523 (struct elf_backend_data): Add elf_backend_grok_prstatus
2524 and elf_backend_grok_psinfo.
2525 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2526 (elfcore_grok_prstatus): Use it.
2527 (elfcore_make_note_pseudosection): Likewise.
2528 (elfcore_strndup): Rename to...
2529 (_bfd_elfcore_strndup): Here, and make global.
2530 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2531 (elfcore_grok_note): Call elf_backend_grok_prstatus
2532 and elf_backend_grok_psinfo if available.
2533 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2534 (_bfd_elf32_mips_grok_psinfo): New function.
2535 (elf_backend_grok_prstatus): Define.
2536 (elf_backend_grok_psinfo): Define.
2537 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2538 (elf_backend_grok_psinfo): Likewise.
2539 (elfNN_bed): Include elf_backend_grok_prstatus and
2540 elf_backend_grok_psinfo.
2541
25422001-06-29 H.J. Lu <hjl@gnu.org>
2543
2544 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2545 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2546 is NULL before filling PLT.
2547
25482001-06-29 Alan Modra <amodra@bigpond.net.au>
2549
2550 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2551
25522001-06-27 Alan Modra <amodra@bigpond.net.au>
2553
2554 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2555 here..
2556 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2557 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2558 after gc has run.
2559
2560 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2561 (IS_ABSOLUTE_RELOC): Define.
2562 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2563 (hppa_link_hash_newfunc): Always init it.
2564 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2565 create COPY relocs only when the reloc is in a read-only section.
2566 Instead, allocate space for a dynamic reloc to reference the
2567 library symbol directly. Keep track of space we allocate using
2568 relocs_entries.
2569 (hppa_discard_copies): Delete, and move code to..
2570 (allocate_plt_and_got): ..here. Rename to
2571 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2572 relocs for non-shared link.
2573 (elf32_hppa_size_dynamic_sections): Update calls to above.
2574 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2575 in lieu of COPY relocs.
2576
2577 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2578 here..
2579 (elf_i386_adjust_dynamic_symbol): ..nor here..
2580 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2581 after gc has run.
2582 (elf_i386_size_dynamic_sections): Fix a comment.
2583 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2584 involved in writing reloc out.
2585
25862001-06-25 Alan Modra <amodra@bigpond.net.au>
2587
2588 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2589 Ensure syms are dynamic if we might be emitting a reloc.
2590 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2591 for undefweak or undefined syms..
2592 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2593
2594 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2595 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2596 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2597 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2598
25992001-06-24 H.J. Lu <hjl@gnu.org>
2600
2601 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2602 strncasecmp/strcasecmp instead of strncmp/strcmp.
2603
26042001-06-23 H.J. Lu <hjl@gnu.org>
2605
2606 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2607 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2608 in the regular object file and treat the weak definition as
2609 the normal one.
2610
26112001-06-23 Alan Modra <amodra@bigpond.net.au>
2612
2613 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2614 unresolved_reloc test to exclude cases where we use "relocation"
2615 before setting it to point into the .got. Reinstate fudge for
2616 unresolved relocs in debugging sections.
2617
2618 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2619 complicated tests for unresolvable relocs with a simple direct
2620 scheme using "unresolved_reloc" var.
2621
2622 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2623 elf_i386_dyn_relocs. Update comment.
2624 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2625 dyn_relocs.
2626 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2627 others to aborts.
2628 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2629 abort.
2630 (elf_i386_size_dynamic_sections): Likewise.
2631 (elf_i386_finish_dynamic_symbol): Likewise.
2632 (elf_i386_finish_dynamic_sections): Likewise.
2633 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2634 handling code.
2635
2636 Avoid creating COPY relocs if possible.
2637 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2638 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2639 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2640 reloc is in a read-only section. Instead, allocate space for a
2641 dynamic reloc to reference the library symbol directly. Keep
2642 track of space we allocate using pcrel_relocs_copied.
2643 (discard_copies): Delete, and move code to ..
2644 (allocate_plt_and_got): ..here. Rename to
2645 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2646 relocs for non-shared link.
2647 (elf_i386_size_dynamic_sections): Update calls to above functions.
2648 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2649 more ugly logic to avoid "unresolvable relocation" error. Use
2650 htab shortcut in place of elf_hash_table macro.
2651 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2652 not always be created now.
2653
26542001-06-20 Bo Thorsen <bo@suse.co.uk>
2655
2656 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2657 shared libraries.
2658
26592001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2660
2661 * configure.host (mips64-*-linux): Reformat.
2662
26632001-06-21 Alan Modra <amodra@bigpond.net.au>
2664
2665 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2666 allocate local .got space. Use shortcuts from hash table for .got
2667 and .plt rather than comparing section names.
2668 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2669 adjusting index into local_got_refcounts to document what we are
2670 really doing.
2671 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2672 Tidy .got and .plt error checking.
2673
26742001-06-20 Catherine Moore <clm@redhat.com>
2675
2676 * elf-bfd.h (struct elf_backend_data):
2677 elf_backend_emit_relocs: New field: Function for emitting
2678 relocs.
2679 elf_backend_count_relocs: New field: Function for determining
2680 the number of relocs to be emitted.
2681 * elfxx-target.h: Provide default (NULL) values for
2682 elf_backend_emit_relocs and elf_backend_count_relocs.
2683 * elflink.h (elf_link_size_reloc_section): Make the hash table
2684 big enough to hold the relocs counted by either reloc_count or
2685 o->reloc_count.
2686 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2687 should be emitted, either because of a command line option
2688 stored in the info structure or because the target provides a
2689 special reloc emitting function.
2690 If the target provides a reloc counting function use it,
2691 unless performing a relocatable link or emitting all relocs.
2692 Also set the SEC_RELOC flag on any output section which will
2693 contain relocs.
2694 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2695 should be emitted, either because of a command line option
2696 stored in the info structure or because the target provides a
2697 special reloc emitting function.
2698 If the target provides a reloc emitting function, use it,
2699 unless performing a relocatable link or emitting all relocs.
2700
27012001-06-20 H.J. Lu <hjl@gnu.org>
2702
2703 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2704 allocate local .got space.
2705
27062001-06-19 Andreas Jaeger <aj@suse.de>
2707
2708 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2709 dynamic symbols.
2710
27112001-06-18 Hans-Peter Nilsson <hp@axis.com>
2712
2713 * elflink.h (struct elf_assign_sym_version_info): Remove member
2714 export_dynamic. All users changed to use info member.
2715 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2716 export_dynamic, instead use member in parameter info.
2717 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2718 bfd_elf64_size_dynamic_sections): Update prototype.
2719 * bfd-in2.h: Regenerate.
2720
27212001-06-18 H.J. Lu <hjl@gnu.org>
2722
2723 * elflink.h (elf_info_failed): Add a new field, verdefs.
2724 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2725 elf_export_symbol.
2726 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2727 should be exported.
2728
27292001-06-17 H.J. Lu <hjl@gnu.org>
2730
2731 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2732 readonly_reloc, to record if a relocation in the .rel.dyn
2733 section is against a read-only section.
2734 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2735 field to false.
2736 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2737 in the .rel.dyn section against a read-only section by setting
2738 DF_TEXTREL or readonly_reloc.
2739 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2740 it is true.
2741 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2742 there is a relocation in the .rel.dyn section against a
2743 read-only section.
2744 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2745 DF_TEXTREL is set.
2746
27472001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2748
2749 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2750 function. Move flagword result into parameter list. Remove
2751 comment about setting bfd_error_handler to intercept failure
2752 results.
2753 * coffgen.c (make_a_section_from_file): Examine result of
2754 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2755 caller.
2756 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2757 function. Move flagword result into parameter list.
2758 * libcoff.h: Regenerate.
2759 * libecoff.h: Regenerate.
2760
27612001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2762
2763 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2764 section is going to follow it.
2765
27662001-06-12 Catherine Moore <clm@redhat.com>
2767
2768 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2769 with the file_align entry from elf_backend_data.
2770 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2771 (elf_gc_record_vtentry): Likewise.
2772
27732001-06-10 Alan Modra <amodra@bigpond.net.au>
2774
2775 * elflink.h: Whitespace changes.
2776 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2777 rather than "unsigned char".
2778 (elf_link_output_relocs): Likewise.
2779 (elf_link_input_bfd): Likewise.
2780 (elf_reloc_link_order): LIkewise.
2781 * elf.c: s/CONST/const/. Whitespace changes.
2782 * elf32-mips.c: Formatting fix.
2783
2784 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2785 * Makefile.in: Regenerate.
2786 * po/Make-in: Remove trailing tab.
2787
27882001-06-09 Philip Blundell <philb@gnu.org>
2789
2790 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2791 change.
2792 (elf32_arm_plt_entry): Likewise.
2793
27942001-06-08 H.J. Lu <hjl@gnu.org>
2795
2796 * elf.c (swap_out_syms): Keep names for global section symbols.
2797
27982001-06-07 H.J. Lu <hjl@gnu.org>
2799
2800 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2801 MIPS-based machines need it.
2802
28032001-06-07 H.J. Lu <hjl@gnu.org>
2804
2805 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2806 for SGI only.
2807
2808 * config.bfd: Remove ecoff from Linux/mips.
2809
28102001-06-07 Andreas Jaeger <aj@suse.de>
2811
2812 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2813 assertion.
2814 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2815 alignment of 8 for .rela sections; handle further relocations.
2816
28172001-06-06 Christian Groessler <cpg@aladdin.de>
2818
2819 * coff-z8k.c: Fix formatting.
2820 Fix howtos: howto->size was always 1.
2821
28222001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2823
2824 * configure.host (mips64*-*-linux*): Define.
2825
28262001-06-05 Alan Modra <amodra@bigpond.net.au>
2827
2828 * elf32-i386.c (elf_i386_discard_copies): Rename to
2829 discard_copies, and use elf_link_hash_entry arg rather than
2830 elf_i386_link_hash_entry.
2831 (elf_i386_link_hash_traverse): Delete.
2832 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2833 Tidy sizing of dynamic sections.
2834 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2835 possible .plt entries.
2836 (elf_i386_gc_sweep_hook): Likewise.
2837 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2838 everything with plt.refcount <= 0.
2839
2840 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2841 .relgot space here.
2842 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2843 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2844 .rel.plt here..
2845 (allocate_plt_and_got): ..instead do it all here. New function.
2846 (elf_i386_size_dynamic_sections): Allocate local .got space and
2847 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2848 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2849 rather than gc variety).
2850 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2851 (elf_i386_relocate_section): Use it here and correct handling of
2852 R_386_GOT32. Provide section and offset for "unresolvable
2853 relocation" error message.
2854 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2855
2856 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2857 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2858 (elf_i386_link_hash_table_create): Init them.
2859 (create_got_section): New function.
2860 (elf_i386_create_dynamic_sections): New function.
2861 (elf_backend_create_dynamic_sections): Set to above.
2862 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2863 calling bfd_get_section_by_name.
2864 (elf_i386_gc_sweep_hook): Likewise.
2865 (elf_i386_adjust_dynamic_symbol): Likewise.
2866 (elf_i386_size_dynamic_sections): Likewise.
2867 (elf_i386_relocate_section): Likewise.
2868 (elf_i386_finish_dynamic_sections): Likewise.
2869
2870 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2871
28722001-06-02 H.J. Lu <hjl@gnu.org>
2873
2874 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2875 and ELFOSABI_HPUX.
2876 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2877
28782001-06-02 H.J. Lu <hjl@gnu.org>
2879
2880 * aout-cris.c (MACHTYPE_OK): New. Defined.
2881
28822001-06-02 Hans-Peter Nilsson <hp@axis.com>
2883
2884 * section.c (_bfd_strip_section_from_output): Handle NULL
2885 output_section.
2886
28872001-06-02 H.J. Lu <hjl@gnu.org>
2888
2889 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2890 rs6000coff64_vec only if BFD64 is defined.
2891 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2892
28932001-06-02 H.J. Lu <hjl@gnu.org>
2894
2895 * coff-ia64.c (ia64coff_object_p): Rewrite with
2896 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2897
28982001-06-01 Andreas Jaeger <aj@suse.de>
2899
2900 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2901 relocation, small reformatting.
2902
29032001-05-29 Andreas Jaeger <aj@suse.de>
2904
2905 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2906 (elf64_x86_64_relocate_section): Likewise.
2907
29082001-05-30 Alan Modra <amodra@one.net.au>
2909
2910 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2911 millicode. Don't allocate .got and .rela.got space here..
2912 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2913 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2914 .rela.plt here..
2915 (hppa_handle_PIC_calls): ..nor here..
2916 (allocate_plt_and_got): ..instead do it all here. New function.
2917 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2918 call allocate_plt_and_got. No need to zap .got if not dynamic.
2919 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2920 gc_common_final_link.
2921 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2922 (elf32_hppa_relocate_section): Use it here.
2923 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2924 dynamic_sections_created.
2925 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2926
29272001-05-28 Andreas Jaeger <aj@suse.de>
2928
2929 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2930 generic version since we want a hashsize of 4.
2931 (elf_backend_size_info): Likewise.
2932
29332001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2934
2935 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2936 a zeroing loop.
2937 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2938 (elf_link_input_bfd): Likewise.
2939 (elf_reloc_link_order): Likewise.
2940 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2941 relocations correctly.
2942
29432001-05-28 Nicolas Pitre <nico@cam.org>
2944
2945 * elf32-arm.h: fix PLT generation for big endian ARM
2946
29472001-05-28 Alan Modra <amodra@one.net.au>
2948
2949 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2950 for symbols forced local that need plabels.
2951 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2952 .plt.rela for local syms if non-shared.
2953 (hppa_build_one_stub): Mask lsb of plt.offset.
2954 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
2955 (clobber_millicode_symbols): Correct comment.
2956 (elf32_hppa_relocate_section): Likewise.
2957 (elf32_hppa_finish_dynamic_symbol): Likewise.
2958
29592001-05-28 Jeff Sturm <jsturm@one-point.com>
2960
2961 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
2962 * bfd-in2.h: Regenerate.
2963 * libbfd.h: Regenerate.
2964 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
2965 and BFD_RELOC_SPARC_UA64 mapping
2966 * elf64-sparc.c: Likewise.
2967
29682001-05-25 H.J. Lu <hjl@gnu.org>
2969
2970 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
2971 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
2972 (coff-rs6000.lo): Remove the old dependency.
2973 * Makefile.in: Rebuild.
2974
2975 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2976 coff-rs6000.lo.
2977
29782001-05-25 H.J. Lu <hjl@gnu.org>
2979
2980 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
2981 rs6000coff_core_file_matches_executable_p,
2982 rs6000coff_core_file_failing_command and
2983 rs6000coff_core_file_failing_signal only if AIX_CORE is
2984 defined.
2985 (pmac_xcoff_vec): Likewise.
2986 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2987
29882001-05-25 Timothy Wall <twall@redhat.com>
2989
2990 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2991 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2992
29932001-05-25 H.J. Lu <hjl@gnu.org>
2994
2995 * bfd-in2.h: Regenerated.
2996 * libcoff.h: Likewise.
2997
29982001-05-25 Alan Modra <amodra@one.net.au>
2999
3000 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3001 undefined millicode syms in shared libs.
3002 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3003 (elf32_hppa_check_relocs): Likewise.
3004 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3005 (elf32_hppa_size_dynamic_sections): Likewise.
3006 (elf32_hppa_relocate_section): Likewise.
3007 (elf32_hppa_finish_dynamic_symbol): Likewise.
3008 (elf32_hppa_finish_dynamic_sections): Likewise.
3009
30102001-05-24 Tom Rix <trix@redhat.com>
3011
3012 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3013 xcoff-target.h not used to define rs6000 or ppc bfd.
3014 * Makefile.in same
3015
3016 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3017 to 64 bit.
3018
3019 * coff-rs6000.c : Many changes for 64 bit support. Move common
3020 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3021 and pmac_xcoff_vec
3022
3023 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3024 linker now supported. Explictly define the rs6000coff64_vec.
3025
3026 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3027 (coff_print_aux) same
3028 (coff_write_object_contents) same
3029 (coff_slurp_line_table) same
3030
3031 * coffgen.c : (coff_fix_symbol_name) formatting
3032 (coff_mangle_symbols) xcoff 64 bit support
3033 (coff_write_symbol) same
3034 (coff_write_alien_symbol) same
3035 (coff_write_native_symbol) same
3036 (coff_write_symbols) same
3037 (coff_get_symbol_info) same
3038 (bfd_coff_get_syment) same
3039 (coff_print_symbol) same
3040
3041 * config.bfd : add powerpc64-*-aix* target
3042
3043 * libcoff-in.h : formatting
3044
3045 * libcoff.h : move xcoff extern declarations to libxcoff.h
3046
3047 * libxcoff.h : New file
3048
3049 * xcofflink.c : Many changes for xcoff64 support. Move common
3050 structures to include/coff/xcoff.h. Move specific structure to
3051 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3052 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3053
3054 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3055 aix4.2+ -binitfini.
3056
3057 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3058
30592001-05-23 Alexandre Oliva <aoliva@redhat.com>
3060
3061 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3062 s/ENTIRES/ENTRIES/.
3063
30642001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3065
3066 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3067 * libbfd.h: Regenerate.
3068 * bfd-in2.h: Regenerate.
3069
3070 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3071 * archures.c (bfd_mach_mips12000): Define.
3072 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3073 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3074 support.
3075 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3076 * bfd-in2.h: Regenerate.
3077 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3078
30792001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3080
3081 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3082 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3083 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3084 that is used by GCC.
3085
30862001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3087
3088 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3089 of entries in a structured section.
3090 * elf.c: Use new macro.
3091 * elf32-i386.c: Use new macro.
3092 * elf32-mips.c: Use new macro.
3093 * elf64-alpha.c: Use new macro.
3094 * elf64-sparc.c: Use new macro.
3095 * elfcode.h: Use new macro.
3096 * elflink.h: Use new macro.
3097
30982001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3099
3100 * bfdint.texi: Replace -oformat with --oformat.
3101
31022001-05-21 Andreas Jaeger <aj@suse.de>
3103
3104 * dwarf2.c (decode_line_info): Fix error message.
3105 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3106 adjust error message.
3107
31082001-05-18 H.J. Lu <hjl@gnu.org>
3109
3110 * elflink.h (elf_link_add_object_symbols): Revert the last
3111 change.
3112
31132001-05-17 Alan Modra <amodra@one.net.au>
3114
3115 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3116 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3117 (hppa_build_one_stub): Add an assert to check plt.offset.
3118
31192001-05-17 H.J. Lu <hjl@gnu.org>
3120
3121 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3122 version definition to basename of the output filename.
3123
31242001-05-17 H.J. Lu <hjl@gnu.org>
3125
3126 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3127 basename of the bfd filename.
3128
31292001-05-16 Alan Modra <amodra@one.net.au>
3130
3131 * section.c (asection): Add linker_has_input field.
3132 (STD_SECTION): Adjust initialization to suit.
3133 * ecoff.c (bfd_debug_section): Likewise.
3134 * bfd-in2.h: Regenerate.
3135
31362001-05-15 Alexandre Oliva <aoliva@redhat.com>
3137
3138 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3139 negative 32-bit operands to 16 operands when the operand is
3140 going to be zero-extended by the modified opcode.
3141
31422001-05-12 Peter Targett <peter.targett@arccores.com>
3143
3144 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3145 name for 'arc5' core versions.
3146 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3147
3148 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3149 architecture.
3150 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3151
31522001-05-11 Jakub Jelinek <jakub@redhat.com>
3153
3154 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3155 sections as well.
3156 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3157 to .gnu.linkonce.t.FOO text section.
3158
31592001-05-11 Jakub Jelinek <jakub@redhat.com>
3160
3161 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3162 fields, change sec into secinfo.
3163 (struct sec_merge_info): Add chain, remove last fields.
3164 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3165 (sec_merge_hash_lookup): If lookup could not use a string only
3166 because it has bad alignment, mark the old string for deletion.
3167 (sec_merge_add): Add secinfo argument. Don't compute entry's
3168 position, instead record the section.
3169 (sec_merge_emit): Update for the sec into secinfo change in
3170 struct sec_merge_hash_entry.
3171 (_bfd_merge_section): Only record the section for merging, defer
3172 putting strings into the hash table.
3173 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3174 _bfd_merge_sections): New functions.
3175 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3176 changes.
3177 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3178 (_bfd_nolink_bfd_merge_sections): Define.
3179 * libbfd.h: Likewise.
3180 (bfd_generic_merge_sections): Add prototype.
3181 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3182 (struct bfd_target): Likewise.
3183 * bfd.c (bfd_merge_sections): Define.
3184 * bfd-in2.h: Rebuilt.
3185 * elf.c (_bfd_elf_merge_sections): New function.
3186 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3187 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3188 * reloc.c (bfd_generic_merge_sections): New function.
3189 * vms.c (vms_bfd_merge_sections): New function.
3190 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3191 * aout-target.h (MY_bfd_merge_sections): Define.
3192 * aout-tic30.c (MY_bfd_merge_sections): Define.
3193 * binary.c (binary_bfd_merge_sections): Define.
3194 * bout.c (b_out_bfd_merge_sections): Define.
3195 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3196 * coffcode.c (coff_bfd_merge_sections): Define.
3197 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3198 * i386msdos.c (msdos_bfd_merge_sections): Define.
3199 * i386os9k.c (os9k_bfd_merge_sections): Define.
3200 * ieee.c (ieee_bfd_merge_sections): Define.
3201 * ihex.c (ihex_bfd_merge_sections): Define.
3202 * nlm-target.h (nlm_bfd_merge_sections): Define.
3203 * oasys.c (oasys_bfd_merge_sections): Define.
3204 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3205 * som.c (som_bfd_merge_sections): Define.
3206 * srec.c (srec_bfd_merge_sections): Define.
3207 * tekhex.c (tekhex_bfd_merge_sections): Define.
3208 * versados.c (versados_bfd_merge_sections): Define.
3209 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3210
32112001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3212
3213 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3214 to be unsigned long, in order to match its use.
3215
32162001-05-10 H.J. Lu <hjl@gnu.org>
3217
3218 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3219 indirect symbols.
3220
32212001-05-09 H.J. Lu <hjl@gnu.org>
3222
3223 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3224 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3225 Remove the unused veriable `dynver'.
3226
32272001-05-08 Ian Lance Taylor <ian@zembu.com>
3228
3229 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3230 NULL or is not COFF.
3231 (coff_i386_rtype_to_howto): Don't dump core if output section
3232 owner is not COFF.
3233
32342001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3235
3236 * ecoff.c (bfd_debug_section): Fix initialization.
3237 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3238 is always a positive integer. Cast away sign mismatch.
3239 * elf32-mips.c: Fix misleading comment and typo.
3240 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3241 correct data type.
3242 * elflink.c: Fix typo.
3243 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3244 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3245
32462001-05-04 Richard Henderson <rth@redhat.com>
3247
3248 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3249
32502001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3251
3252 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3253 EF_ARM_HASENTRY if the start address is set.
3254
32552001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3256
3257 * targets.c (_bfd_target_vector_entries): Compute value based on
3258 the size of the _bfd_target_vector and not bfd_target_vector.
3259
32602001-05-03 H.J. Lu <hjl@gnu.org>
3261
3262 * elfcode.h: Include "libiberty.h".
3263
3264 * elflink.h (elf_link_add_object_symbols): Set
3265 elf_dt_name (abfd) to basename of the bfd filename.
3266 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3267 of the bfd filename.
3268
32692001-05-03 Andreas Jaeger <aj@suse.de>
3270
3271 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3272 (elf_generic_info_to_howto_rel): Likewise.
3273 * coff-alpha.c (reloc_nil): Likewise.
3274 (alpha_ecoff_bad_format_hook): Likewise.
3275 (alpha_adjust_reloc_out): Likewise.
3276 (alpha_bfd_reloc_type_lookup): Likewise.
3277 (alpha_convert_external_reloc): Likewise.
3278 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3279 (elf64_alpha_reloc_bad): Likewise.
3280 (elf64_alpha_reloc_gpdisp): Likewise.
3281 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3282 (elf64_alpha_info_to_howto): Likewise.
3283 (elf64_alpha_add_symbol_hook): Likewise.
3284 (elf64_alpha_create_got_section): Likewise.
3285 (elf64_alpha_is_local_label_name): Likewise.
3286 (elf64_alpha_merge_ind_symbols): Likewise.
3287 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3288 (mips_elf64_get_reloc_upper_bound): Likewise.
3289 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3290 (nlm_alpha_get_public_offset): Likewise.
3291
32922001-05-02 Johan Rydberg <jrydberg@opencores.org>
3293
3294 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3295 about overflow in R_OPENRISC_LO_16_IN_INSN and
3296 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3297
32982001-04-30 H.J. Lu <hjl@gnu.org>
3299
3300 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3301 only for ELF_LINK_FORCED_LOCAL.
3302 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3303 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3304 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3305
3306 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3307 if the symbol has hidden or internal visibility.
3308
33092001-04-30 Alan Modra <amodra@one.net.au>
3310
3311 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3312 calls to undefined weak symbols.
3313
33142001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3315
3316 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3317 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3318
33192001-04-27 Andreas Jaeger <aj@suse.de>
3320
3321 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3322 out handled entries.
3323 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3324 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3325 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3326 GOT32.
3327
33282001-04-27 Sean McNeil <sean@mcneil.com>
3329
3330 * config.bfd: Add arm-vxworks target.
3331 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3332 addend (fro VXworks targets).
3333
33342001-04-26 H.J. Lu <hjl@gnu.org>
3335
3336 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3337 valid.
3338
33392001-04-25 Frank Ch. Eigler <fche@redhat.com>
3340
3341 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3342 * bfd-in2.h: Regenerated.
3343
33442001-04-24 Jakub Jelinek <jakub@redhat.com>
3345
3346 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3347 (struct sec_merge_hash): Remove alignment_power.
3348 (sec_merge_hash_newfunc): Clear alignment.
3349 (sec_merge_hash_lookup): Pass alignment as argument.
3350 Use hashp->root.next, not hashp->next to walk the hash chain.
3351 If a string already in the hashtable does not have required
3352 alignment, create a new hashtable entry.
3353 (sec_merge_init): Remove alignment_power argument.
3354 (sec_merge_add): Add alignment argument.
3355 (sec_merge_emit): Alignment is now a per-entity thing, not per
3356 section.
3357 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3358 for proper alignment.
3359 Pass alignment information to sec_merge_add.
3360
33612001-04-24 Christian Groessler <cpg@aladdin.de>
3362
3363 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3364 and R_REL16 reloc types; accept odd values for R_REL16 type
3365
33662001-04-24 Johan Rydberg <jrydberg@opencores.org>
3367
3368 * cpu-openrisc.c: New file.
3369 * elf32-openrisc.c: Likewise.
3370
3371 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3372 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3373 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3374 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3375 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3376 * Makefile.in: Regenerated.
3377 * config.bfd: (openrisc-*-elf): New target.
3378 * configure.in (bfd_elf32_openrisc_vec): New vector.
3379 * configure: Regenerated.
3380 * libbfd.h: Regenerated.
3381 * bfd-in2.h: Regenerated.
3382 * reloc.c: Add OpenRISC relocations.
3383 * targets.c (bfd_elf32_openrisc_vec): Declare.
3384 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3385 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3386 (bfd_openrisc_arch): Declare.
3387 (bfd_archures_list): Add bfd_openrisc_arch.
3388 * elf.c (prep_headers): Add bfd_arch_openrisc.
3389
33902001-04-23 Bo Thorsen <bo@suse.de>
3391
3392 * elf64-x86-64.c: Add c++ vtable hack.
3393 Small whitespace and comment changes.
3394
33952001-04-19 Andreas Jaeger <aj@suse.de>
3396
3397 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3398 (elf64_x86_64_plt_entry): Likewise.
3399 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3400 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3401
34022001-04-17 Hans-Peter Nilsson <hp@axis.com>
3403
3404 * elf32-cris.c: Tweak comments related to dynamic linking.
3405 (cris_elf_relocate_section): When not creating shared object, fill
3406 in the .got table for any symbol not in the dynamic symbol table.
3407 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3408 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3409 table.
3410 (cris_elf_check_relocs): Use variable r_type in all places rather
3411 than the original expression. Add default case in switch for
3412 reloc types.
3413 (elf_cris_size_dynamic_sections): Iterate over
3414 elf_cris_discard_excess_program_dynamics when not creating shared
3415 library.
3416 (elf_cris_discard_excess_dso_dynamics): Renamed from
3417 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3418 (elf_cris_discard_excess_program_dynamics): New.
3419
34202001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3421
3422 * coffcode.h (coff_write_object_contents): Use
3423 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3424
34252001-04-14 H.J. Lu <hjl@gnu.org>
3426
3427 * bfd-in2.h: Regenerate.
3428
34292001-04-14 Jakub Jelinek <jakub@redhat.com>
3430
3431 * section.c (STD_SECTION): Add entsize.
3432
34332001-04-13 H.J. Lu <hjl@gnu.org>
3434
3435 * section.c (SEC_MERGE): Define new flag for merging.
3436 (SEC_STRINGS): Likewise.
3437 (entsize): New field.
3438
34392001-04-13 Roger Sayle <roger@metaphorics.com>
3440
3441 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3442 flag on pe-i386 targets.
3443
34442001-04-13 Jakub Jelinek <jakub@redhat.com>
3445
3446 * libbfd-in.h (_bfd_merge_section): New.
3447 (_bfd_write_merged_section): New.
3448 (_bfd_merged_section_offset): New.
3449 * libbfd.h: Rebuilt.
3450 * linker.c (_bfd_generic_link_output_symbols): Handle
3451 discard_sec_merge.
3452 * aoutx.h (aout_link_write_symbols): Likewise.
3453 * pdp11.c (aout_link_write_symbols): Likewise.
3454 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3455 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3456 sections.
3457 (elf_link_sec_merge_syms): New.
3458 (elf_link_input_bfd): Call _bfd_merged_section_offset
3459 and _bfd_write_merged_section.
3460 Handle discard_sec_merge.
3461 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3462 field.
3463 (struct bfd_elf_section_data): Likewise.
3464 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3465 SEC_STRINGS section flags and entsize from their ELF counterparts.
3466 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3467 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3468 from their BFD counterparts.
3469 * merge.c: New file.
3470 * Makefile.am: Add strtab.lo.
3471 * Makefile.in: Rebuilt.
3472
34732001-04-09 Hans-Peter Nilsson <hp@axis.com>
3474
3475 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3476 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3477
34782001-04-05 Steven J. Hill <sjhill@cotw.com>
3479
3480 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3481 endian MIPS ELF target.
3482 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3483 MIPS ELF target.
3484
3485 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3486 64bit big endian MIPS ELF target.
3487 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3488 endian MIPS ELF target.
3489 * configure: Regenerated.
3490
3491 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3492 little endian targets.
3493 (mips_elf_sym_is_global): Handle traditional targets.
3494
3495 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3496 64bit big endian MIPS ELF target.
3497 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3498 endian MIPS ELF target.
3499
3500 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3501 and bfd_elf64_tradlittlemips_vec.
3502
35032001-04-05 David Mosberger <davidm@hpl.hp.com>
3504
3505 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3506 ordinary "progbits" section.
3507
35082001-04-04 Alan Modra <alan@linuxcare.com.au>
3509
3510 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3511 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3512
35132001-04-03 David Mosberger <davidm@hpl.hp.com>
3514
3515 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3516
35172001-03-30 H.J. Lu <hjl@gnu.org>
3518
3519 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3520 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3521
35222001-03-26 H.J. Lu <hjl@gnu.org>
3523
3524 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3525 if there are any relocations for generic ELF.
3526 (bfd_elf32_bfd_link_add_symbols): Defined to
3527 elf32_generic_link_add_symbols.
3528 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3529 if there are any relocations for generic ELF.
3530 (bfd_elf64_bfd_link_add_symbols): Defined to
3531 elf64_generic_link_add_symbols.
3532
35332001-03-23 Nick Clifton <nickc@redhat.com>
3534
3535 * Makefile.am (BUILD_CFILES): New variable: List of C source
3536 files created in build directory.
3537 (BUILD_HFILES): New variable: List of header files created in
3538 build directory.
3539 (POTFILES): Delete.
3540 (po/POTFILES.in): Replace rule with empty entry.
3541 (po/SRC-POTFILES.in): New rule: Create a list of source files
3542 in the source directory.
3543 (po/BLD-POTFILES.in): New rule: Create a list of source files
3544 in the build directory.
3545 (MOSTLYCLEAN): Do not delete source files created in build
3546 directory.
3547 * Makefile.in: Regenerate.
3548 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3549 into po/Makefile.
3550 * configure: Regenerate.
3551
3552 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3553 and BLD_POTFILES.
3554 Add .. to the search path when building bfd.pot.
3555 Delete POTFILES when performing distclean.
3556 Add comment describing why distclean is broken in maintainer mode.
3557 * po/POTFILES.in: Delete.
3558 * po/SRC-POTFILES.in: New file.
3559 * po/BLD-POTFILES.in: New file.
3560 * po/bfd.pot: Regenerate.
3561
35622001-03-22 Hans-Peter Nilsson <hp@axis.com>
3563
3564 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3565 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3566 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3567 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3568 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3569 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3570 functions.
3571 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3572 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3573 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3574 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3575 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3576 New HOWTO members for new relocs.
3577 (cris_reloc_map): Map new relocs.
3578 (ELF_DYNAMIC_INTERPRETER): Define.
3579 (PLT_ENTRY_SIZE): Define.
3580 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3581 elf_cris_pic_plt_entry): New, PLT templates.
3582 (struct elf_cris_pcrel_relocs_copied, struct
3583 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3584 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3585 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3586 positive values. Adjust PCREL relocs to be relative to location
3587 after relocation.
3588 (cris_elf_relocate_section): Handle relocations to dynamic
3589 objects. Handle new relocations. Call error handler when seeing
3590 non-PIC relocation for read-only sections while generating shared
3591 object.
3592 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3593 entries.
3594 (bfd_elf32_bfd_link_hash_table_create,
3595 elf_backend_adjust_dynamic_symbol,
3596 elf_backend_size_dynamic_sections,
3597 elf_backend_finish_dynamic_symbol,
3598 elf_backend_finish_dynamic_sections,
3599 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3600 elf_backend_hide_symbol, elf_backend_want_got_plt,
3601 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3602 elf_backend_got_header_size, elf_backend_plt_header_size):
3603 Define.
3604
3605 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3606 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3607 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3608 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3609 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3610 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3611 * bfd-in2.h, libbfd.h: Regenerate.
3612
36132001-03-21 Diego Novillo <dnovillo@redhat.com>
3614
3615 (_bfd_mips_elf_relocate_section): Give a better error message when
3616 a relocation is not recognized.
3617
36182001-03-21 Alan Modra <alan@linuxcare.com.au>
3619
3620 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3621 non-NULL before attempting to dereference.
3622
36232001-03-20 H.J. Lu <hjl@gnu.org>
3624
3625 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3626 * configure: Rebuild.
3627
36282001-03-20 Andreas Schwab <schwab@suse.de>
3629
3630 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3631 relocation value when resolving a reference from a debugging
3632 section.
3633
36342001-03-16 Scott Thomason <SThomaso@hii.com>
3635
3636 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3637 (xcoff64_swap_sym_out): Fix syntax errors.
3638
36392001-03-16 Richard Sandiford <rsandifo@redhat.com>
3640
3641 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3642
36432001-03-15 Alan Modra <alan@linuxcare.com.au>
3644
3645 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3646 (hppa_link_hash_newfunc): Init it.
3647 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3648 section appears to be non-PIC.
3649 (final_link_relocate): Likewise.
3650 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3651 possible candidate function, and set pic_call for those that will
3652 only have a .plt entry for the PIC call stub.
3653 (hppa_handle_PIC_calls): Set maybe_pic_call.
3654
36552001-03-12 DJ Delorie <dj@redhat.com>
3656
3657 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3658 R_SH_DIR8WP* relocs if they're against external symbols, else
3659 they're just for relaxing. Validate the reloc values.
3660
36612001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3662
3663 * binary.c (bfd_external_binary_architecture): Declare.
3664 (binary_object_p): If bfd_external_binary_architecture is defined,
3665 set the architecture to this string.
3666
36672001-03-11 Philip Blundell <philb@gnu.org>
3668
3669 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3670 entries that could serve as a definition for a weak symbol.
3671
36722001-03-08 Nick Clifton <nickc@redhat.com>
3673
3674 * Most files: Update copyright notices using Perl script created
3675 by Kevin Buettner <kevinb@redhat.com>.
3676
36772001-03-07 Nick Clifton <nickc@redhat.com>
3678
3679 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3680 prior patch on ! defined OLD_ARM_ABI.
3681
36822001-03-07 Andreas Jaeger <aj@suse.de>
3683
3684 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3685 some relocation values.
3686
36872001-03-06 Nick Clifton <nickc@redhat.com>
3688
3689 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3690 of offset in BLX(1) instruction.
3691 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3692 offset in BLX(1) instruction.
3693 Fix formatting.
3694
36952001-03-06 Nick Clifton <nickc@redhat.com>
3696
3697 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3698 BFD_RELOC_THUMB_PCREL_BLX.
3699
37002001-03-06 Igor Shevlyakov <igor@windriver.com>
3701
3702 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3703 * bfd-in2.h: Regenerate.
3704 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3705 * ieee.c (ieee_write_processor): Set proper id for
3706 Coldfire CPUs.
3707
37082001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3709
3710 * configure.in: Add s390 target.
3711 * configure: Regenerate.
3712
37132001-02-28 Andreas Jaeger <aj@suse.de>
3714
3715 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3716 to addend.
3717
37182001-02-28 Philip Blundell <pb@futuretv.com>
3719
3720 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3721 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3722
37232001-02-27 H.J. Lu <hjl@gnu.org>
3724
3725 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3726 abfd->tdata.aout_data == NULL.
3727
37282001-02-27 Alan Modra <alan@linuxcare.com.au>
3729
3730 * elf32-hppa.c: Correct field selector in stub comments.
3731 (clobber_millicode_symbols): Formatting fix.
3732
3733 * configure.in: Bump version to 2.11.90.
3734 * configure: Regenerate.
3735 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3736 (CFILES): $SOURCE_CFILES + generated C files.
3737 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3738 Run "make dep-am"
3739 * Makefile.in: Regenerate.
3740 * doc/Makefile.in: This too.
3741
37422001-02-26 Timothy Wall <twall@cygnus.com>
3743
3744 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3745 comments.
3746
37472001-02-26 Nick Clifton <nickc@redhat.com>
3748
3749 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3750 up, replacing multiple if statements with a switch.
3751 (handle_COMDAT): New function.
3752
37532001-02-26 H.J. Lu <hjl@gnu.org>
3754
3755 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3756 a warning for section flags we do not handle instead of
3757 aborting.
3758
37592001-02-26 Andreas Jaeger <aj@suse.de>
3760
3761 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3762
37632001-02-22 Timothy Wall <twall@cygnus.com>
3764
3765 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3766 * configure.in: Add objects for elf64_ia64_aix vectors.
3767 * configure: Regenerated.
3768 * configure.host: Recognize ia64-*-aix*.
3769 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3770 for AIX. AIX5 requires most relocations to be dynamic (*all*
3771 binaries are somewhat similar to shared libraries).
3772 * targets.c: Add elf64_ia64_aix vectors.
3773
37742001-02-21 David Mosberger <davidm@hpl.hp.com>
3775
3776 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3777 C8 said "1" instead of "8". Clarify error string for IMM22:
3778 "signed integer" instead of just "integer".
3779
37802001-02-20 Andreas Jaeger <aj@suse.de>
3781
3782 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3783 PLT entries that could serve as a definition for a weak symbol.
3784
37852001-02-19 Jakub Jelinek <jakub@redhat.com>
3786
3787 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3788 entries that could serve as a definition for a weak symbol.
3789 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3790
37912001-02-18 David O'Brien <obrien@FreeBSD>
3792
3793 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3794 FreeBSD/i386-CURRENT differently until I can figure out the needed
3795 corefile changes.
3796 * configure: Regenerate.
3797 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3798 FreeBSD/PowerPC, and FreeBSD/sparc64.
3799
38002001-02-18 lars brinkhoff <lars@nocrew.org>
3801
3802 * Makefile.am: Add PDP-11 a.out target.
3803 * config.bfd: Likewise.
3804 * configure.in: Likewise.
3805 * targets.c: Likewise.
3806 * archures.c: Likewise.
3807 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3808 * libbfd.h: Add PDP-11 relocations.
3809 * reloc.c: Likewise.
3810 * cpu-pdp11.c: New file.
3811 * pdp11.c: New file.
3812
3813 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3814 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3815 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3816 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3817 (GET_MAGIC): New macro.
3818 (PUT_MAGIC): Likewise.
3819 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3820
38212001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3822
3823 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3824 multiarch needs it).
3825
38262001-02-18 H.J. Lu <hjl@gnu.org>
3827
3828 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3829 index.
3830
38312001-02-18 Kazu Hirata <kazu@hxi.com>
3832
3833 * vms-misc.c: Fix formatting.
3834
38352001-02-16 Kazu Hirata <kazu@hxi.com>
3836
3837 * vms.c: Fix formatting.
3838
38392001-02-14 H.J. Lu <hjl@gnu.org>
3840
3841 * elf.c (elf_find_function): New function.
3842 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3843 the file name and function name.
3844
38452001-02-14 Nick Clifton <nickc@redhat.com>
3846
3847 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3848 asection structure.
3849
3850 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3851 (BFD64_BACKENDS): Add pepigen.c
3852 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3853
3854 * Makefile.in: Regenerate.
3855 * configure: Regenerate.
3856 * po/POTFILES.in: Regenerate.
3857 * po/bfd.pot: Regenerate.
3858
38592001-02-14 H.J. Lu <hjl@gnu.org>
3860
3861 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3862 force_minimum_alignment.
3863
38642001-02-14 Bo Thorsen <bo@suse.de>
3865
3866 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3867 (elf64_86_64_size_info): Struct added to fix a problem
3868 with the hashtable string entries.
3869 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3870 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3871 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3872 remove the FIXME for this.
3873 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3874 section. Also removed the FIXME for it.
3875 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3876 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3877 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3878
38792001-02-13 Richard Henderson <rth@redhat.com>
3880
3881 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3882 and not user provided.
3883
38842001-02-13 Kazu Hirata <kazu@hxi.com>
3885
3886 * vms.c (vms_print_symbol): Remove unreachable code.
3887
3888 * rs6000-core.c: Fix formatting.
3889
38902001-02-13 David Mosberger <davidm@hpl.hp.com>
3891
3892 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3893 as _bfd_XXi_only_swap_filehdr_out.
3894 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3895 pe->force_minimum_alignment to TRUE.
3896 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3897 PEI_TARGET_SUBSYSTEM.
3898 (pe_print_private_bfd_data): Call
3899 _bfd_XX_print_private_bfd_data_common() instead of
3900 _bfd_pe_print_private_bfd_data_common().
3901 (pe_bfd_copy_private_bfd_data): Call
3902 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3903 _bfd_pe_bfd_copy_private_bfd_data_common().
3904 (coff_bfd_copy_private_section_data): Define as
3905 _bfd_XX_bfd_copy_private_section_data instead of
3906 _bfd_pe_bfd_copy_private_section_data.
3907 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3908 of a _bfd_pe_get_symbol_info.
3909
3910 * peigen.c: Delete.
3911
3912 * peXXigen.c: Renamed from peigen.c.
3913 (COFF_WITH_XX): Define this macro (will get expanded into
3914 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3915 compiled as peigen.c or pepigen.c.
3916 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3917 define the canonical PEP structures and definitions.
3918 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3919 effect, enforce minimum file and section alignments. If
3920 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3921 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3922 so, by default, this is a no-op).
3923
3924 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3925 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3926 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3927 _bfd_pefoo if it's not defined. Use these macros to define
3928 coff swap macros.
3929
3930 * libcoff.h (pe_tdata): Add members target_subsystem and
3931 force_minimum_alignment.
3932
3933 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3934 COFF_WITH_pep.
3935 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3936
3937 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3938 peigen.lo.
3939
3940 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3941 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3942 PEPAOUTHDR.
3943
3944 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3945 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3946 (peigen.c): Add rule to generate from peXXigen.c.
3947 (pepigen.c): Ditto.
3948 (pepigen.lo): List dependencies for pepigen.lo.
3949
39502001-02-13 Alan Modra <alan@linuxcare.com.au>
3951
3952 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3953 $global$ referenced but not defined, set its value here.
3954
39552001-02-09 Bo Thorsen <bo@suse.de>
3956
3957 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3958 alignment to 3.
3959 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
3960 and relocation.
3961 (elf64_x86_64_relocate_section): Fix formatting.
3962 (elf64_x86_64_relocate_section): Fix addend for relocation of
3963 R_X86_64_(8|16|32|PC8|PC16|PC32).
3964
39652001-02-12 Jan Hubicka <jh@suse.cz>
3966
3967 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3968
39692001-02-11 H.J. Lu <hjl@gnu.org>
3970
3971 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3972 alignment.
3973
39742001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3975
3976 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
3977 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
3978 relocations against dynsym symbols.
3979
3980 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
3981 the R_MIPS_26 relocation.
3982 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
3983 the R_MIPS_26 relocation.
3984 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
3985 relocation.
3986 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
3987 the R_MIPS_26 relocation.
3988 (mips_elf64_howto_table_rela): Likewise.
3989
3990 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
3991 member to mark symbols that have non-CALL relocations against
3992 them.
3993 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3994 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
3995 R_MIPS_GOT16.
3996 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
3997 non-CALL relocation against it is encountered.
3998 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
3999 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4000 no_fn_stub is not set.
4001
4002 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4003 information from the real symbol for indirect ones.
4004 Check no_fn_stub to find out if a symbol has a function stub
4005 indeed.
4006
40072001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4008
4009 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4010 * Makefile.in: Regenerate.
4011
40122001-02-09 David Mosberger <davidm@hpl.hp.com>
4013
4014 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4015 true if section name is an unwind table section name.
4016 (elfNN_ia64_additional_program_headers): Count each unwind section
4017 separately.
4018 (elfNN_ia64_modify_segment_map): Install one unwind program header
4019 for each unwind separate section. Note: normally the linker
4020 script merges the unwind sections that go into a single segment,
4021 so this still generates at most one unwind program header per
4022 segment.
4023
4024 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4025 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4026 (elfNN_ia64_fake_sections): Mark sections with names that start
4027 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4028 unwind section.
4029
4030 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4031 Use it to make sh_info in unwind section point to the text section
4032 it applies to.
4033
40342001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4035
4036 * Makefile.am: Add linux target for S/390.
4037 * archures.c: Likewise.
4038 * bfd-in2.h: Likewise.
4039 * config.bfd: Likewise.
4040 * configure.in: Likewise.
4041 * elf.c: Likewise.
4042 * libbfd.h: Likewise.
4043 * targets.c: Likewise.
4044 * cpu-s390.c: New file.
4045 * elf32-s390.c: New file.
4046 * elf64-s390.c: New file.
4047
40482001-02-09 Nick Clifton <nickc@redhat.com>
4049
4050 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4051 ImageBase. This has already been done by coff_swap_hdr_in.
4052
40532001-02-09 Jakub Jelinek <jakub@redhat.com>
4054
4055 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4056
40572001-02-09 Jakub Jelinek <jakub@redhat.com>
4058
4059 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4060 (sparc64_elf_relocate_section): Likewise.
4061
40622001-02-09 Mark Kettenis <kettenis@gnu.org>
4063
4064 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4065 similar to R_SPARC_32.
4066 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4067
40682001-02-08 H.J. Lu <hjl@gnu.org>
4069
4070 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4071 relocation entries for weak definitions when building DSO with
4072 -Bsymbolic.
4073
40742001-02-08 Richard Henderson <rth@redhat.com>
4075
4076 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4077 before visibility. Locally defined protected symbols are not
4078 dynamic.
4079
40802001-02-08 Geoffrey Keating <geoffk@redhat.com>
4081
4082 * config.bfd: Enable coff64 for rs6000-*. Patch from
4083 <hzoli@austin.ibm.com>.
4084
40852001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4086
4087 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4088 found, do not attempt to find dwarf2 info before returning.
4089
40902001-02-07 Jakub Jelinek <jakub@redhat.com>
4091
4092 * elflink.h (is_global_symbol_definition): Rename to
4093 is_global_data_symbol_definition and have it reject function
4094 symbols.
4095 (elf_link_is_defined_archive_symbol): Use renamed function.
4096
40972001-02-07 Todd Vierling <tv@wasabisystems.com>
4098
4099 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4100 * libbfd.h (bfd_target_vector): Likewise.
4101 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4102 make static; create pointer reference named bfd_target_vector.
4103 (_bfd_target_vector_entries): Calculate this based on the array
4104 typed _bfd_target_vector.
4105
41062001-02-06 H.J. Lu <hjl@gnu.org>
4107
4108 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4109 internal symbols are not dynamic.
4110 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4111
41122001-02-06 Nick Clifton <nickc@redhat.com>
4113
4114 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4115 that it will not be pulled into the list of files that make up
4116 po/POTFILES.in.
4117 * Makefile.in: Regenerate.
4118 * po/bfd.pot: Regenerate.
4119
41202001-02-06 H.J. Lu <hjl@gnu.org>
4121
4122 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4123 checking.
4124 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4125 external_PEI_IMAGE_hdr.
4126
41272001-02-06 Kazu Hirata <kazu@hxi.com>
4128
4129 * elf-m10200.c: Fix formatting.
4130
41312001-02-04 Nick Clifton <nickc@redhat.com>
4132
4133 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4134 rel, it will be handled later on.
4135
41362001-02-02 Fred Fish <fnf@ninemoons.com>
4137
4138 * Makefile.in: Fix typo.
4139
41402001-02-01 Kazu Hirata <kazu@hxi.com>
4141
4142 * elf-m10300.c: Fix formatting.
4143
41442001-01-30 Alan Modra <alan@linuxcare.com.au>
4145
4146 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4147 (elf_backend_get_symbol_type): Define.
4148 (elf64_hppa_object_p): Set architecture and machine from elf
4149 header flags.
4150
41512001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4152
4153 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4154 before mdebug.
4155
41562001-01-26 Richard Henderson <rth@redhat.com>
4157
4158 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4159 for non-default visibility.
4160 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4161 delete ugly macro and replace with pretty function.
4162
41632001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4164
4165 * coff-go32.c: Update copyright.
4166 * coff-stgo32.c: Likewise.
4167 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4168 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4169 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4170 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4171
41722001-01-25 Kazu Hirata <kazu@hxi.com>
4173
4174 * bfd-in2.h: Rebuild.
4175 * libbfd.h: Likewise.
4176
41772001-01-23 H.J. Lu <hjl@gnu.org>
4178
4179 * bfd-in2.h: Rebuild.
4180
41812001-01-23 H.J. Lu <hjl@gnu.org>
4182
4183 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4184 is NULL or PRIV(vms_rec) is outside of the buffer.
4185
41862001-01-23 Kazu Hirata <kazu@hxi.com>
4187
4188 * coff64-rs6000.c: Fix formatting.
4189 * coff-arm.c: Likewise.
4190 * coffgen.c: Likewise.
4191 * cofflink.c: Likewise.
4192 * coff-mcore.c: Likewise.
4193 * coff-mips.c: Likewise.
4194 * coff-pmac.c: Likewise.
4195 * coff-ppc.c: Likewise.
4196 * coff-rs6000.c: Likewise.
4197 * elf32.c: Likewise.
4198 * elf32-fr30.c: Likewise.
4199 * elf32-i370.c: Likewise.
4200 * elf32-i860.c: Likewise.
4201 * elf32-m32r.c: Likewise.
4202 * elf32-m68k.c: Likewise.
4203 * elf32-mcore.c: Likewise.
4204 * elf32-ppc.c: Likewise.
4205 * elf32-sh.c: Likewise.
4206 * elf32-v850.c: Likewise.
4207 * elf64-alpha.c: Likewise.
4208 * elf64-sparc.c: Likewise.
4209 * elflink.c: Likewise.
4210 * elflink.h: Likewise.
4211 * elf-m10200.c: Likewise.
4212 * elf-m10300.c: Likewise.
4213 * elfxx-ia64.c: Likewise.
4214
4215 * aoutx.h: Fix formatting.
4216 * bfd.c: Likewise.
4217 * bfd-in2.h: Likewise.
4218 * bfd-in.h: Likewise.
4219 * cpu-i386.c: Likewise.
4220 * cpu-m68hc11.c: Likewise.
4221 * dwarf2.c: Likewise.
4222 * elf64-x86-64.c: Likewise.
4223 * format.c: Likewise.
4224 * freebsd.h: Likewise.
4225 * hash.c: Likewise.
4226 * hp300hpux.c: Likewise.
4227 * hppabsd-core.c: Likewise.
4228 * hpux-core.c: Likewise.
4229
42302001-01-22 Bo Thorsen <bo@suse.de>
4231
4232 * elf64-x86-64.c: Added PIC support for X86-64.
4233 (elf64_x86_64_link_hash_newfunc): Function added.
4234 (elf64_x86_64_link_hash_table_create): Likewise.
4235 (elf64_x86_64_check_relocs): Likewise.
4236 (elf64_x86_64_gc_mark_hook): Likewise.
4237 (elf64_x86_64_gc_sweep_hook): Likewise.
4238 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4239 (elf64_x86_64_size_dynamic_sections): Likewise.
4240 (elf64_x86_64_discard_copies): Likewise.
4241 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4242 (elf64_x86_64_finish_dynamic_sections): Likewise.
4243 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4244
42452001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4246
4247 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4248 * Makefile.in: Regenerate.
4249
42502001-01-21 Kazu Hirata <kazu@hxi.com>
4251
4252 * coff-a29k.c: Fix formatting.
4253
42542001-01-19 H.J. Lu <hjl@gnu.org>
4255
4256 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4257 relocation section names.
4258 (elf_i386_relocate_section): Report files with bad relocation
4259 section names and return false.
4260
42612001-01-17 Bo Thorsen <bo@suse.de>
4262
4263 * targets.c: Alphabetize list of xvecs.
4264
42652001-01-14 Alan Modra <alan@linuxcare.com.au>
4266
4267 * config.bfd: Add linux target variant for elfxx-hppa.
4268 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4269 bfd_elf64_hppa_linux_vec.
4270 * configure: Regenerate.
4271 * elf64-hppa.c: Include elf64-target.h again to support linux
4272 target variant.
4273 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4274 * elf32-hppa.c: Include elf32-target.h again to support linux
4275 target variant.
4276 (elf32_hppa_post_process_headers): New function.
4277 (elf_backend_post_process_headers): Define.
4278 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4279 bfd_elf32_hppa_linux_vec.
4280
4281 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4282 and data_segment_base fields.
4283 (elf32_hppa_link_hash_table_create ): Init them.
4284 (elf32_hppa_check_relocs): Update comments.
4285 (hppa_record_segment_addr): New function.
4286 (elf32_hppa_relocate_section): Call it.
4287 (final_link_relocate): Handle R_PARISC_SEGREL32.
4288 (elf32_hppa_final_link): New function.
4289 (bfd_elf32_bfd_final_link): Define to call it.
4290 (hppa_unwind_entry_compare): New function.
4291 * cache.c (bfd_open_file): Create files in write+read mode.
4292
4293 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4294 SEGREL32 and numerous other relocs. Change duplicate
4295 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4296
4297 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4298 O_ACCMODE.
4299
4300 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4301 .plt entries for DT_INIT and DT_FINI.
4302 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4303 DT_INIT and DT_FINI.
4304
4305 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4306 offsets for stub .plt access if wide mode. Check offset in range.
4307
43082001-01-13 Nick Clifton <nickc@redhat.com>
4309
4310 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4311 line.
4312
4313 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4314 line.
4315
43162001-01-12 Alan Modra <alan@linuxcare.com.au>
4317
4318 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4319 * configure: Regenerate.
4320
43212001-01-11 Peter Targett <peter.targett@arccores.com>
4322
4323 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4324 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4325 * cpu-arc.c (arch_info_struct): Add entries for variants.
4326 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4327 (arc_get_mach) Don't assume machine names prefixed arc- before
4328 testing.
4329 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4330 selections.
4331 (arc_elf_final_write_processing) Likewise.
4332 (ELF_MACHINE_CODE) Use EM_ARC.
4333
43342001-01-10 Nick Clifton <nickc@redhat.com>
4335
4336 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4337
43382001-01-07 Philip Blundell <philb@gnu.org>
4339
4340 * README: Replace `bug-gnu-utils@gnu.org' with
4341 `bug-binutils@gnu.org'.
4342
43432001-01-04 Kazu Hirata <kazu@hxi.com>
4344
4345 * som.c: Fix formatting.
4346
43472001-01-03 Kazu Hirata <kazu@hxi.com>
4348
4349 * ecoffswap.h: Fix formatting.
4350 * elf-bfd.h: Likewise.
4351 * elfarm-nabi.c: Likewise.
4352 * elfarm-oabi.c: Likewise.
4353 * elfcode.h: Likewise.
4354 * elfcore.h: Likewise.
4355 * elflink.c: Likewise.
4356 * elflink.h: Likewise.
4357 * elfxx-ia64.c: Likewise.
4358 * elfxx-target.h: Likewise.
4359 * libbfd.c: Likewise
4360 * linker.c: Likewise.
4361 * lynx-core.c: Likewise.
4362
43632001-01-02 Kazu Hirata <kazu@hxi.com>
4364
4365 * pc532-mach.c: Fix formatting.
4366 * pe-arm.c: Likewise.
4367 * pe-i386.c: Likewise.
4368 * pe-mips.c: Likewise.
4369 * pe-ppc.c: Likewise.
4370 * pe-sh.c: Likewise.
4371 * pei-mips.c: Likewise.
4372 * pei-sh.c: Likewise.
4373 * peicode.h: Likewise.
4374 * ppcboot.c: Likewise.
4375 * ptrace-core.c: Likewise.
4376
43772001-01-01 Kazu Hirata <kazu@hxi.com>
4378
4379 * reloc.c: Fix formatting.
4380 * riscix.c: Likewise.
4381 * rs6000-core.c: Likewise.
4382 * xcoff-target.h: Likewise.
4383
43842000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4385
4386 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4387 error, by calling bfd_default_set_arch_mach with incoming
4388 values.
4389
43902000-12-26 Kazu Hirata <kazu@hxi.com>
4391
4392 * vaxnetbsd.c: Fix formatting.
4393 * versados.c: Likewise.
4394 * vms-gsd.c: Likewise.
4395 * vms-hdr.c: Likewise.
4396 * vms-misc.c: Likewise.
4397
43982000-12-25 Alexandre Oliva <aoliva@redhat.com>
4399
4400 * archive.c (coff_write_armap): Don't write more than symbol_count
4401 `archive_member_file_ptr's.
4402
44032000-12-25 Kazu Hirata <kazu@hxi.com>
4404
4405 * vms-tir.c: Fix formatting.
4406
44072000-12-23 Kazu Hirata <kazu@hxi.com>
4408
4409 * vms.c: Fix formatting.
4410 * vms.h: Likewise.
4411
44122000-12-21 Santeri Paavolainen <santtu@ssh.com>
4413
4414 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4415
4416 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4417
4418 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4419 arithmetic.
4420
4421 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4422
4423 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4424
44252000-12-21 Richard Sandiford <rsandifo@redhat.com>
4426
4427 * libbfd.c (bfd_get_bits): Added
4428 (bfd_put_bits): Likewise
4429 * bfd-in.h: Declared the above.
4430 * bfd-in2.h: Regenerated.
4431
44322000-12-20 Kazu Hirata <kazu@hxi.com>
4433
4434 * targets.c: Fix formatting.
4435 * tekhex.c: Likewise.
4436 * trad-core.c: Likewise.
4437
44382000-12-19 Kazu Hirata <kazu@hxi.com>
4439
4440 * sco5-core.c: Fix formatting.
4441 * section.c: Likewise.
4442 * sparclinux.c: Likewise.
4443 * sparclynx.c: Likewise.
4444 * sparcnetbsd.c: Likewise.
4445 * srec.c: Likewise.
4446 * stabs.c: Likewise.
4447 * stab-syms.c: Likewise.
4448 * sunos.c: Likewise.
4449 * syms.c: Likewise.
4450 * sysdep.h: Likewise.
4451
44522000-12-18 Nick Clifton <nickc@redhat.com>
4453
4454 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4455 defined.
4456 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4457 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4458
44592000-12-18 Nick Clifton <nickc@redhat.com>
4460
4461 * vms-misc.c (_bfd_vms_get_record): Add default case to
4462 file_format switch.
4463
44642000-12-15 Miloslav Trmac <mitr@volny.cz>
4465
4466 * elfcore.h (elf_core_file_p): Move to the start of the program
4467 headers before attempting to read them.
4468
44692000-12-14 Kazu Hirata <kazu@hxi.com>
4470
4471 * peigen.c: Fix formatting.
4472 * som.c: Likewise.
4473 * som.h: Likewise.
4474
44752000-12-13 Kazu Hirata <kazu@hxi.com>
4476
4477 * peigen.c: Fix formatting.
4478
44792000-12-12 Jim Wilson <wilson@redhat.com>
4480
4481 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4482
44832000-12-08 Mark Salter <msalter@redhat.com>
4484
4485 * binary.c (binary_set_section_contents): Ignore sections
4486 with zero size.
4487
44882000-12-12 Kazu Hirata <kazu@hxi.com>
4489
4490 * m68klinux.c: Fix formatting.
4491 * m68knetbsd.c: Likewise.
4492 * mipsbsd.c: Likewise.
4493 * netbsd-core.c: Likewise.
4494 * netbsd.h: Likewise.
4495 * newsos3.c: Likewise.
4496 * nlm32-alpha.c: Likewise.
4497 * nlm32-i386.c: Likewise.
4498 * nlm32-ppc.c: Likewise.
4499 * nlm32-sparc.c: Likewise.
4500 * nlmcode.h: Likewise.
4501 * nlmswap.h: Likewise.
4502 * nlm-target.h: Likewise.
4503 * ns32knetbsd.c: Likewise.
4504
45052000-12-10 Fred Fish <fnf@be.com>
4506
4507 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4508 symbols in shared objects if allow_shlib_undefined is true.
4509
45102000-12-12 Nick Clifton <nickc@redhat.com>
4511
4512 * cpu-sh.c: Fix formattng.
4513 * elf.c: Fix formattng.
4514 * elf32-mips.c: Fix formattng.
4515 * elf32-sh.c: Fix formattng.
4516 * elf64-alpha.c: Fix formattng.
4517
45182000-12-09 Nick Clifton <nickc@redhat.com>
4519
4520 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4521 dwarf2_find_line_info as last parameter to invocation of
4522 _bfd_dwarf2_find_nearest_line.
4523 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4524 dwarf2_find_line_info as last parameter to invocation of
4525 _bfd_dwarf2_find_nearest_line.
4526
45272000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4528
4529 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4530 (BFD_LIBS): ...to here.
4531 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4532 (BFD_LIBS_CFILES): ...to here.
4533 * Makefile.in: Regenerate.
4534 * configure.in: Remove dwarf.lo from the elf shell variable.
4535 * configure: Regenerate.
4536 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4537 * libcoff.h: Regenerate.
4538 * coffgen.c (coff_find_nearest_line): Call
4539 _bfd_dwarf2_find_nearest_line.
4540 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4541 accordingly.
4542 (read_abbrevs): Likewise
4543 (decode_line_info): Likewise.
4544 (parse_comp_unit): Likewise.
4545 (comp_unit_find_nearest_line): Likewise.
4546 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4547 * libbfd.h: Regenerate.
4548 * elf.c (_bfd_elf_find_nearest_line): Update call.
4549 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4550 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4551 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4552 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4553 (styp_to_sec_flags): Handle DWARF2 sections.
4554 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4555 to _bfd_find_nearest_line.
4556 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4557 call to _bfd_find_nearest_line.
4558
45592000-12-08 Kazu Hirata <kazu@hxi.com>
4560
4561 * coffgen.c: Fix formatting.
4562 * elf-m10300.c: Likewise.
4563 * elf32-i386.c: Likewise.
4564 * elf32-i960.c: Likewise.
4565 * elf32-m68k.c: Likewise.
4566 * elf32-mcore.c: Likewise.
4567 * elf32-ppc.c: Likewise.
4568 * elf32-sh.c: Likewise.
4569 * elf32-sparc.c: Likewise.
4570 * elf32-v850.c: Likewise.
4571 * elf64-alpha.c: Likewise.
4572 * elf64-hppa.c: Likewise.
4573 * elf64-mips.c: Likewise.
4574 * elf64-sparc.c: Likewise.
4575
45762000-12-07 Kazu Hirata <kazu@hxi.com>
4577
4578 * elf32-ppc.c: Fix formatting.
4579 * elf64-x86-64.c: Likewise.
4580
45812000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4582
4583 From Ralf Baechle <ralf@gnu.org>
4584
4585 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4586 BFDs containing no sections or empty .text, .data or .bss sections
4587 to be merged, regardless of their flags.
4588
45892000-12-06 Kazu Hirata <kazu@hxi.com>
4590
4591 * elf32-m32r.c: Fix formatting.
4592 * elf32-m68hc11.c: Likewise.
4593 * elf32-m68hc12.c: Likewise.
4594 * elf32-m68k.c: Likewise.
4595 * elf32-mcore.c: Likewise.
4596 * elf32-pj.c: Likewise.
4597 * elf32-ppc.c: Likewise.
4598
45992000-12-05 Kazu Hirata <kazu@hxi.com>
4600
4601 * elf32-fr30.c: Fix formatting.
4602 * elf32-hppa.c: Likewise.
4603 * elf32-i370.c: Likewise.
4604 * elf32-i386.c: Likewise.
4605 * elf32-i860.c: Likewise.
4606 * elf32-i960.c: Likewise.
4607
46082000-12-03 Kazu Hirata <kazu@hxi.com>
4609
4610 * elf32-arm.h: Fix formatting.
4611 * elf32-avr.c: Likewise.
4612 * elf32-cris.c: Likewise.
4613 * elf32-d10v.c: Likewise.
4614 * elf32-d30v.c: Likewise.
4615 * elf-hppa.h: Likewise.
4616 * elf-m10200.c: Likewise.
4617 * elf-m10300.c: Likewise.
4618
46192000-12-01 Chris Demetriou <cgd@sibyte.com>
4620
4621 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4622 bfd_mach_mips32_4k. Update FIXME comment.
4623 * archures.c (bfd_mach_mips32): New constant.
4624 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4625 the latter, renumber it.
4626 * bfd-in2.h (bfd_mach_mips32): New constant.
4627 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4628 the latter, renumber it.
4629 * cpu-mips.c (I_mips32): New constant.
4630 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4631 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4632 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4633 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4634 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4635 with E_MIPS_MACH_MIPS32_4K.
4636 (_bfd_mips_elf_final_write_processing): Replace
4637 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4638 bfd_mach_mips32 case.
4639 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4640 comparison with support for MIPS32.
4641 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4642 MIPS32.
4643
4644 * aoutx.h (NAME(aout,machine_type)): Add cases for
4645 bfd_mach_mips5 and bfd_mach_mips64.
4646 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4647 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4648 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4649 (arch_info_struct): Add entries for bfd_mach_mips5 and
4650 bfd_mach_mips64.
4651 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4652 _bfd_mips_elf_print_private_bfd_data): Add cases for
4653 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4654 (_bfd_mips_elf_final_write_processing): Add cases for
4655 bfd_mach_mips5 and bfd_mach_mips64.
4656
4657 * aoutx.h (NAME(aout,machine_type)): Add a
4658 bfd_mach_mips_sb1 case.
4659 * archures.c (bfd_mach_mips_sb1): New constant.
4660 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4661 * cpu-mips.c (I_sb1): New constant.
4662 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4663 * elf32-mips.c (elf_mips_mach): Add case for
4664 E_MIPS_MACH_SB1.
4665 (_bfd_mips_elf_final_write_processing): Add case for
4666 bfd_mach_mips_sb1.
4667
46682000-12-01 Joel Sherrill <joel@OARcorp.com>
4669
4670 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4671 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4672 (sparc*-*-rtems*): Switched from a.out to ELF.
4673
46742000-11-30 Jan Hubicka <jh@suse.cz>
4675
4676 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4677 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4678 (elf64-x86-64.lo): Add dependencies.
4679 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4680 bfd_mach_x86_64_intel_syntax.
4681 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4682 * config.bfd (x86_64): Add.
4683 * configure.in: Add support for bfd_elf64_x86_64_vec.
4684 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4685 (bfd_i386_arch, i8086_ar): Link in.
4686 * elf64-x86-64.c: New file.
4687 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4688 * targets.c (bfd_elf64_x86_64_vec): Add.
4689 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4690
46912000-11-30 Kazu Hirata <kazu@hxi.com>
4692
4693 * xcofflink.c: Fix formatting.
4694
46952000-11-28 Kazu Hirata <kazu@hxi.com>
4696
4697 * aoutx.h: Fix formatting.
4698 * bfd-in.h: Likewise.
4699 * bfd-in2.h: Likewise.
4700 * cache.c: Likewise.
4701 * cisco-core.c: Likewise.
4702 * coff64-rs6000.c: Likewise.
4703 * coffcode.h: Likewise.
4704 * coffswap.h: Likewise.
4705 * corefile.c: Likewise.
4706 * elf32-mips.c: Likewise.
4707
47082000-11-27 Kazu Hirata <kazu@hxi.com>
4709
4710 * aout-adobe.c: Fix formatting.
4711 * coff64-rs6000.c: Likewise.
4712 * coffgen.c: Likewise.
4713 * cofflink.c: Likewise.
4714
47152000-11-27 Philip Blundell <pb@futuretv.com>
4716
4717 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4718 (obj_coff_strings_written): New accessor macro for above.
4719 * libcoff.h: Regenerate.
4720 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4721 strings.
4722 * coffcode.h (coff_write_object_contents): No need to write out
4723 the string table if it's already been done.
4724
47252000-11-22 Philip Blundell <pb@futuretv.com>
4726
4727 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4728 weak undefined symbols.
4729
47302000-11-24 Nick Clifton <nickc@redhat.com>
4731
4732 * archures.c (bfd_mach_arm_5TE): Define.
4733 (bfd_mach_arm+XScale): Define.
4734 * bfd-in2.h: Regenerate.
4735
4736 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4737 BFD_RELOC_ARM_PCREL_BLX.
4738
4739 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4740 XScale machine numbers.
4741
4742 * config.bfd (xscale-elf): Add target.
4743 (xscale-coff): Add target.
4744
4745 * cpu-arm.c: Add xscale machine name.
4746 Add v5t, v5te and XScale machine numbers.
4747
47482000-11-23 Kazu Hirata <kazu@hxi.com>
4749
4750 * aix386-core.c: Fix formatting.
4751
47522000-11-22 Jim Wilson <wilson@redhat.com>
4753
4754 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4755 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4756 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4757 (ins_imms_scaled): Initialize sign_bit at function entry.
4758 (elf64_ia64_operands): Add missing initializers.
4759 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4760 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4761 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4762 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4763 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4764 parameters.
4765 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4766 and free_extsyms at function entry.
4767 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4768 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4769 (get_got): Delete unused local srel.
4770 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4771 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4772
47732000-11-21 Kazu Hirata <kazu@hxi.com>
4774
4775 * coff-a29k.c: Fix formatting.
4776 * coff-h8500.c: Likewise.
4777 * coff-i960.c: Likewise.
4778 * coff-ppc.c: Likewise.
4779 * coff-rs6000.c: Likewise.
4780 * coff-stgo32.c: Likewise.
4781 * coff-tic54x.c: Likewise.
4782 * coff-w65.c: Likewise.
4783 * cpu-h8500.c: Likewise.
4784 * cpu-hppa.c: Likewise.
4785 * cpu-ns32k.c: Likewise.
4786 * ecoff.c: Likewise.
4787 * ecofflink.c: Likewise.
4788
47892000-11-21 Nick Clifton <nickc@redhat.com>
4790
4791 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4792 remove possibility of infinite loop.
4793
47942000-11-20 Kazu Hirata <kazu@hxi.com>
4795
4796 * aix386-core.c: Fix formatting.
4797 * aout-adobe.c: Likewise.
4798 * aout-arm.c: Likewise.
4799 * aout-encap.c: Likewise.
4800 * aout-ns32k.c: Likewise.
4801 * aout-target.h: Likewise.
4802 * aout-tic30.c: Likewise.
4803 * aoutf1.h: Likewise.
4804 * aoutx.h: Likewise.
4805 * archive.c: Likewise.
4806 * bfd-in.h: Likewise.
4807 * bfd-in2.h: Likewise.
4808 * bfd.c: Likewise.
4809 * bout.c: Likewise.
4810
48112000-11-17 H.J. Lu <hjl@gnu.org>
4812
4813 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4814 pltoff entries for DT_INIT and DT_FINI.
4815 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4816 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4817 entries.
4818
48192000-11-16 Richard Henderson <rth@redhat.com>
4820
4821 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4822 (allocate_dynrel_entries): Likewise.
4823 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4824 (set_pltoff_entry): Likewise.
4825 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4826 (elfNN_ia64_reloc_type_lookup): Likewise.
4827 (elfNN_ia64_install_value): Likewise.
4828 (elfNN_ia64_relocate_section): Likewise.
4829 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4830 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4831
48322000-11-16 Kazu Hirata <kazu@hxi.com>
4833
4834 * cpu-a29k.c: Fix formatting.
4835 * cpu-alpha.c: Likewise.
4836 * cpu-arm.c: Likewise.
4837 * cpu-avr.c: Likewise.
4838 * cpu-d10v.c: Likewise.
4839 * cpu-h8500.c: Likewise.
4840 * cpu-hppa.c: Likewise.
4841 * cpu-i370.c: Likewise.
4842 * cpu-i386.c: Likewise.
4843 * cpu-i960.c: Likewise.
4844 * cpu-ia64-opc.c: Likewise.
4845 * cpu-ia64.c: Likewise.
4846 * cpu-m32r.c: Likewise.
4847 * cpu-m68hc11.c: Likewise.
4848 * cpu-m68hc12.c: Likewise.
4849 * cpu-m68k.c: Likewise.
4850 * cpu-m88k.c: Likewise.
4851 * cpu-mips.c: Likewise.
4852 * cpu-ns32k.c: Likewise.
4853 * cpu-pj.c: Likewise.
4854 * cpu-powerpc.c: Likewise.
4855 * cpu-sh.c: Likewise.
4856 * cpu-sparc.c: Likewise.
4857 * cpu-tic54x.c: Likewise.
4858 * cpu-v850.c: Likewise.
4859 * cpu-vax.c: Likewise.
4860 * cpu-w65.c: Likewise.
4861 * cpu-we32k.c: Likewise.
4862 * cpu-z8k.c: Likewise.
4863 * dwarf1.c: Likewise.
4864 * dwarf2.c: Likewise.
4865
48662000-11-15 Kazu Hirata <kazu@hxi.com>
4867
4868 * coff-arm.c: Fix formatting.
4869 * coff-ppc.c: Likewise.
4870 * coff-rs6000.c: Likewise.
4871 * coff-sh.c: Likewise.
4872 * coff-sparc.c: Likewise.
4873 * coff-tic30.c: Likewise.
4874 * coff-tic54x.c: Likewise.
4875 * coff-tic80.c: Likewise.
4876 * coff-w65.c: Likewise.
4877 * coff-we32k.c: Likewise.
4878 * coff-z8k.c: Likewise.
4879
48802000-11-15 Richard Henderson <rth@redhat.com>
4881
4882 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4883 section with the same ALLOC|LOAD flags as the source section.
4884
48852000-11-14 Jakub Jelinek <jakub@redhat.com>
4886
4887 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4888 by STO_ALPHA constants.
4889
48902000-11-14 Kazu Hirata <kazu@hxi.com>
4891
4892 * coff-pmac.c: Fix formatting.
4893 * coff-ppc.c: Likewise.
4894
48952000-11-13 H.J. Lu <hjl@gnu.org>
4896
4897 * elflink.h (elf_link_add_object_symbols): Also add indirect
4898 symbols for common symbols with the default version.
4899
49002000-11-09 Philip Blundell <pb@futuretv.com>
4901
4902 * section.c (STD_SECTION): Set gc_mark flag.
4903
49042000-11-11 Kazu Hirata <kazu@hxi.com>
4905
4906 * coff-i960.c: Likewise.
4907 * coff-m68k.c: Likewise.
4908 * coff-m88k.c: Likewise.
4909 * coff-mcore.c: Likewise.
4910 * coff-mips.c: Likewise.
4911
49122000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4913
4914 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4915
49162000-11-10 Kazu Hirata <kazu@hxi.com>
4917
4918 * coff-h8300.c: Fix formatting.
4919 * coff-h8500.c: Likewise.
4920 * coff-i386.c: Likewise.
4921 * coff-i860.c: Likewise.
4922 * coff-i960.c: Likewise.
4923 * coff-ia64.c: Likewise.
4924
49252000-11-09 Kazu Hirata <kazu@hxi.com>
4926
4927 * archive.c: Fix formatting.
4928 * archures.c: Likewise.
4929
49302000-11-07 Richard Henderson <rth@redhat.com>
4931
4932 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4933 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4934 * section.c (bfd_set_section_contents): Call memcpy if
4935 section->contents set and location not equal to contents plus offset.
4936
49372000-11-08 Kazu Hirata <kazu@hxi.com>
4938
4939 * bfd-in.h: Fix formatting.
4940 * bfd-in2.h: Likewise.
4941 * bfd.c: Likewise.
4942 * binary.c: Likewise.
4943 * bout.c: Likewise.
4944 * coff-a29k.c: Likewise.
4945 * coff-alpha.c: Likewise.
4946 * coff-apollo.c: Likewise.
4947 * coff-aux.c: Likewise.
4948
49492000-11-07 Kazu Hirata <kazu@hxi.com>
4950
4951 * aix386-core.c: Fix formatting.
4952 * aoutf1.h: Likewise.
4953 * aoutx.h: Likewise.
4954 * archures.c: Likewise.
4955 * armnetbsd.c: Likewise.
4956
49572000-11-07 Alan Modra <alan@linuxcare.com.au>
4958
4959 * coff-h8300.c (special): Adjust reloc address.
4960
49612000-11-06 Steve Ellcey <sje@cup.hp.com>
4962
4963 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
4964 to differentiate elf32 and elf64 on ia64.
4965 * bfd-in2.h: Regenerate.
4966 * config.bfd: Add target for "ia64*-*-hpux*".
4967 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
4968 * configure: Regenerate.
4969 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
4970 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
4971
4972 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
4973 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
4974 * Makefile.in: Regnerate.
4975 * elf64-ia64.c: Deleted.
4976 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
4977
49782000-11-06 Kazu Hirata <kazu@hxi.com>
4979
4980 * aout-adobe.c: Fix formatting.
4981 * aout-arm.c: Likewise.
4982 * aout-cris.c: Likewise.
4983 * aout-encap.c: Likewise.
4984 * aout-ns32k.c: Likewise.
4985 * aout-target.h: Likewise.
4986 * aout-tic30.c: Likewise.
4987
49882000-11-05 Philip Blundell <philb@gnu.org>
4989
4990 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4991 BFDs containing no sections to be merged, regardless of their flags.
4992
49932000-11-04 Philip Blundell <philb@gnu.org>
4994
4995 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4996 if a relocation for an undefined symbol also results in an
4997 overflow.
4998
49992000-11-06 Christopher Faylor <cgf@cygnus.com>
5000
5001 * config.bfd: Add support for Sun Chorus.
5002
50032000-11-05 David O'Brien <obrien@FreeBSD.org>
5004
5005 * configure.in: Recognize alpha-*-freebsd*.
5006 * configure: Regenerate.
5007
50082000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5009
5010 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5011 (Chunk): New global variable set by a parameter in objcopy.c.
5012 (S3Forced): New global variable set by a parameter in
5013 objcopy.c.
5014 (srec_set_section_contents): If S3Forced is true, always generate
5015 S3 records.
5016 (srec_write_section): Use 'Chunk' to limit maximum length of S
5017 records.
5018
50192000-11-02 Per Lundberg <plundis@chaosdev.org>
5020
5021 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5022 * Makefile.in: Regenerate.
5023 * bfd-in2.h: Regenerate.
5024 * po/bfd.pot: Regenerate.
5025
50262000-10-31 Philip Blundell <philb@gnu.org>
5027
5028 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5029 EF_SOFT_FLOAT if it is defined.
5030
50312000-10-27 Philip Blundell <philb@gnu.org>
5032
5033 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5034 attempts to mix PIC code with non-PIC, just mark the output as
5035 being position dependent.
5036 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5037 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5038 all mismatches, not just the first one.
5039
50402000-10-25 Chris Demetriou <cgd@sibyte.com>
5041
5042 * ieee.c (ieee_archive_p): Plug one of many possible
5043 memory leaks in error handling.
5044
50452000-10-20 Jakub Jelinek <jakub@redhat.com>
5046
5047 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5048 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5049 Support v8plusb.
5050 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5051 sparc64_elf_object_p): Support v9b.
5052 * archures.c: Declare v8plusb and v9b machines.
5053 * bfd-in2.h: Ditto.
5054 * cpu-sparc.c: Ditto.
5055
50562000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5057
5058 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5059 of a GOT reloc.
5060
5061 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5062 (SYMBOL_CALLS_LOCAL): New macro.
5063 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5064 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5065 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5066 (ppc_elf_relocate_section): Use flag variable to determine
5067 whether the relocation refers to a local symbol.
5068 Test whether a PLTREL24 reloc will produce a reloc by looking
5069 to see whether a PLT entry was made.
5070
50712000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5072
5073 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5074 entries that could serve as a definition for a weak symbol.
5075
50762000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5077
5078 From Ralf Baechle <ralf@gnu.org>
5079
5080 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5081 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5082 against local symbols.
5083 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5084
50852000-10-12 Alan Modra <alan@linuxcare.com.au>
5086
5087 * section.c (struct sec): Add kept_section.
5088 (struct bfd_comdat_info): Remove sec, we can use above.
5089 (STD_SECTION): Add initializer.
5090 (bfd_make_section_anyway): Init here too.
5091
5092 * bfd-in2.h: Regenerate.
5093
5094 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5095 zeroing of `flags'.
5096 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5097 fudge values for discarded link-once section symbols.
5098
5099 * elf64-hppa.c: Include alloca-conf.h
5100
51012000-10-11 Alan Modra <alan@linuxcare.com.au>
5102
5103 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5104
5105 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5106
51072000-10-10 Alan Modra <alan@linuxcare.com.au>
5108
5109 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5110
51112000-10-10 Tom Rix <trix@redhat.com>
5112
5113 * section.c (bfd_make_section_anyway): Release newsect ptr when
5114 newsect->symbol fails to alloc. Use bfd_release instead of free.
5115
51162000-10-09 Richard Henderson <rth@cygnus.com
5117
5118 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5119 (elf64_ia64_unwind_entry_compare): New.
5120 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5121
51222000-10-07 Alan Modra <alan@linuxcare.com.au>
5123
5124 * elflink.h (size_dynamic_sections): Don't create various tags if
5125 .dynstr is excluded from the link. Don't set first dynsym entry
5126 if dynsymcount is zero.
5127 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5128 .dynsym excluded from the link. Don't try to write any dynamic
5129 sections excluded from the link.
5130
5131 * elf.c (swap_out_syms): Handle global section symbols.
5132
51332000-10-05 DJ Delorie <dj@redhat.com>
5134
5135 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5136 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5137 (coff_write_relocs): write extended reloc count
5138 (coff_write_object_contents): account for extended relocs
5139
51402000-10-05 Jim Wilson <wilson@cygnus.com>
5141
5142 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5143 field.
5144 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5145 elf_backend_section_flags function.
5146 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5147 code.
5148 (elf64_ia64_section_flags): New function containing flag conversion
5149 code.
5150 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5151 * elfxx-target.h (elf_backend_section_flags): Define.
5152 (elfNN_bed): Initialize elf_backend_section_flags field.
5153
51542000-10-02 Alan Modra <alan@linuxcare.com.au>
5155
5156 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5157 _bfd_elf32_gc_record_vtable. Correct a comment.
5158
51592000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5160
5161 From Ralf Baechle <ralf@gnu.org>
5162
5163 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5164 produces binaries with got[1] = 0x80000001 to differenciate them
5165 for the dynamic linker from the broken binaries produced by old
5166 versions.
5167
51682000-09-30 Petr Sorfa <petrs@sco.com>
5169
5170 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5171 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5172 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5173 * configure: Regenerate.
5174
51752000-09-27 Hans-Peter Nilsson <hp@axis.com>
5176
5177 Define two bfd_targets for absence and presence of leading
5178 underscore on symbols. Make sure to only link same kind.
5179 * elf32-cris.c (cris_elf_object_p,
5180 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5181 cris_elf_merge_private_bfd_data): New.
5182 (elf_backend_object_p, elf_backend_final_write_processing,
5183 bfd_elf32_bfd_print_private_bfd_data,
5184 bfd_elf32_bfd_merge_private_bfd_data): Define.
5185 <Target vector definition>: Include elf32-target.h twice with
5186 different macro settings:
5187 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5188 bfd_elf32_us_cris_vec.
5189 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5190 (elf_symbol_leading_char): First as 0, then '_'.
5191 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5192 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5193 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5194 * configure: Regenerate.
5195 * targets.c: Declare bfd_elf32_us_cris_vec.
5196 * po/bfd.pot: Regenerate.
5197
51982000-09-29 Momchil Velikov <velco@fadata.bg>
5199
5200 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5201 R_ARM_THM_PC22 relocations.
5202
52032000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5204
5205 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5206
52072000-09-29 Momchil Velikov <velco@fadata.bg>
5208
5209 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5210 is has the SEC_HAS_CONTENTS flag set.
5211