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