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