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