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