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